Skip to content

Commit

Permalink
Deploying to gh-pages from @ cdf7d38 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasochem committed Oct 1, 2024
1 parent ca9cbcd commit e884074
Show file tree
Hide file tree
Showing 33 changed files with 31 additions and 233 deletions.
Binary file modified .doctrees/configuration.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file removed .doctrees/payouttiming.doctree
Binary file not shown.
Binary file modified .doctrees/run.doctree
Binary file not shown.
Binary file modified .doctrees/state_machine.doctree
Binary file not shown.
Binary file modified .doctrees/testing.doctree
Binary file not shown.
8 changes: 3 additions & 5 deletions _sources/configuration.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ How to configure TRD?
Fee Setup
-----------

| The file *fee.in* has been deprecated.
| **Advanced user**: You can change the values at *src/pay/batch_payer.py*
Baker Configuration:
Expand Down Expand Up @@ -71,7 +70,7 @@ Available configuration parameters are:
service_fee: 10

**founders_map**
A dictionary of PKH and ratio (decimal in the range [0-1]) pairs. Each item in this dictionary represents PKH of each founder and his ratio of the shares coming from the service fee. Implicit or originated addresses are accepted. It is important that the sum of all ratios equals to 1. This map is optional if founders do not want to be paid from service fees, in this case, service fee remains in baking balance.
A dictionary of PKH and ratio (decimal in the range [0-1]) pairs. Each item in this dictionary represents PKH of each founder and their ratio of the shares coming from the service fee. Implicit or originated addresses are accepted. It is important that the sum of all ratios equals to 1. This map is optional if founders do not want to be paid from service fees, in this case, service fee remains in baking balance.

Example::

Expand Down Expand Up @@ -153,22 +152,21 @@ Available configuration parameters are:
Note: This option does also apply to the burn fee needed to payout to kt accounts.

**pay_denunciation_rewards**
True/False - Baker may get rewarded for denunciating another baker's equivocation (double baking or double endorsing). The protocol rewards the baker including the denunciation. When True, these rewards will be distributed. When False, they will remain in the baker's account, allowing the baker to reimburse the party at fault if they desire. Must be set to True when using RPC backend as RPC is not able to itemize rewards.
True/False - Baker may get rewarded for denunciating another baker's equivocation (double baking or double endorsing). The protocol rewards the baker including the denunciation. When True, these rewards will be distributed. When False, they will remain in the baker's account, allowing the baker to reimburse the party at fault if they desire.

Example::

pay_denunciation_rewards: True

**rules_map**
The rules_map is needed to redirect payments. A pre-defined source (left side) is mindelegation. Pre-defined destinations (right side) are: TOF = to founders balance, TOB = to bakers balance, and TOE = to everyone. Variable sources and destinations are PKHs. New since v8.0 PKH: Dexter enables payouts to Dexter liquidity pools.
The rules_map is needed to redirect payments. A pre-defined source (left side) is mindelegation. Pre-defined destinations (right side) are: TOF = to founders balance, TOB = to bakers balance, and TOE = to everyone. Variable sources and destinations are PKHs.

Example::

rules_map:
tz1T5woJN3r7SV5v2HGDyA5kurhbD9Y8ZKHZ: TOF #(redirects payment from tz1T5woJN3r7SV5v2HGDyA5kurhbD9Y8ZKHZ to founders)
tz1YTMY7Zewx6AMM2h9eCwc8TyXJ5wgn9ace: TOB #(payment to tz1YTMY7Zewx6AMM2h9eCwc8TyXJ5wgn9ace will remain in the bakers balance)
tz1V9SpwXaGFiYdDfGJtWjA61EumAH3DwSyT: tz1fgX6oRWQb4HYHUT6eRjW8diNFrqjEfgq7 #(redirects payment from tz1V9S... to tz1fgX...)
tz1RMmSzPSWPSSaKU193Voh4PosWSZx1C7Hs: Dexter #(indicates address is a dexter pool; TRD will send rewards to pool members)
mindelegation: TOE #(mindelegation will be shared with everyone)

**plugins**
Expand Down
11 changes: 5 additions & 6 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ PRIVACY : TEZOS REWARD DISTRIBUTOR COLLECTS ANONYMOUS STATISTICS. PLEASE READ OU
What's TRD?
------------------------------------------------

TRD is an open-source software for distributing staking rewards from bakers to delegators introduced in detail in this Medium article_. This is not a python script but a full scale application which can continuously run in the background as a Linux service. However it does not have to be used as a service, but it can also be used interactively. The tool convinces with its simplicity and yet leaves no configuration wish unfulfilled. Whether minimum delegation threshold, or special fees for some delegators - the TRD covers just about all possible constellations. Furthermore, the tool supports complex payments, pays in batches. It uses TzKT_ API as backend. TRD is developed and tested extensively by the community and the source code which can be found in the following Github_ repo.
TRD is an open-source software for distributing delegation rewards from bakers to delegators. This is a full scale application which can continuously run in the background as a Linux service. However it does not have to be used as a service, but it can also be used interactively. The tool convinces with its simplicity and yet leaves no configuration wish unfulfilled. Whether minimum delegation threshold, or special fees for some delegators - the TRD covers just about all possible constellations. Furthermore, the tool supports complex payments, pays in batches. It uses TzKT_ API as backend. TRD is developed and tested extensively by the community and the source code which can be found in the following Github_ repo.

Tezos offers two kind of rewards: delegating rewards and staking rewards. TRD pays out delegation rewards. Staking rewards are paid by the protocol, and TRD does not concern itself with them.
**Since 2024, Tezos offers two kind of rewards: delegating rewards and [staking rewards](https://news.tezoscommons.org/stake-and-l-earn-a-beginners-guide-to-the-new-tezos-staker-role-7ff1cf2fc8ce). TRD pays out delegation rewards.** Staking rewards are paid by the protocol, and TRD does not concern itself with them.

Who needs TRD?
------------------------------------------------

The TRD is needed by bakers. There are a few payout tools available in the Tezos ecosystem. However, the TRD is probably the most used open source payout tool by bakers. It ranges from small bakers with a couple of delegators to large bakers with more than thousand delegators. The maintainers strive to keep up with the growing Tezos ecosystem. This in turn enables TRD users to participate in the exploration of new business areas like baking for liquidity pools or DAOs.
The TRD is needed by bakers who want to pay delegation rewards. There are a few payout tools available in the Tezos ecosystem. However, the TRD is probably the most used open source payout tool by bakers. It ranges from small bakers with a couple of delegators to large bakers with more than thousand delegators. The maintainers strive to keep up with the growing Tezos ecosystem. This in turn enables TRD users to participate in the exploration of new business areas like baking for liquidity pools or DAOs.

In 2024, another popular payout distribution software is [TezPay](https://github.com/tez-capital/tezpay).

What else do you need for TRD?
------------------------------------------------
Expand All @@ -29,8 +31,6 @@ There are currently the following options to run TRD:

However, for all options the Tezos signer is needed.

**Provider notes:**

TzKT
-----------

Expand Down Expand Up @@ -86,7 +86,6 @@ This Github Repo_ contains logo images. If you are using TRD and want to let eve
tezossigner
run
rundocker
payouttiming
plugins
linuxservice
state_machine
Expand Down
14 changes: 0 additions & 14 deletions _sources/payouttiming.rst.txt

This file was deleted.

26 changes: 4 additions & 22 deletions _sources/run.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Options
``-A --node_endpoint <node_url:port>``
Node potentially with protocol prefix especially if TLS encryption is used. Default value: ``http://127.0.0.1:8732``. This is the main Tezos node used by the client for RPC queries and operation injections.

``-P --reward_data_provider <rpc|prpc|tzpro|tzkt>``
Source that provides all needed data for reward calculations. Default value: ``tzkt`` (TzKT API). Set to ``rpc`` to use your own local node defined with the ``-A`` flag, (it must be an ARCHIVE node in this case). Set to ``prpc`` to use a public RPC node defined with the ``-Ap`` flag. An alternative for providing reward data is ``tzpro``, but an API key associated with your account needs to be provided in the .env file!
``-P --reward_data_provider <tzkt>``
Source that provides all needed data for reward calculations. Default and only value: ``tzkt`` (TzKT API).

``-Ap --node_addr_public <url>``
Public node base URL. Default is ``https://mainnet.smartpy.io``. This argument will only be used in case the reward provider is set to ``prpc``. This node will only be used to query reward data and delegator list. It must be an ARCHIVE node.
Expand Down Expand Up @@ -112,29 +112,11 @@ Make pending payouts beginning from a cycle and exit:

python3 src/main.py -C 300 -M 2 -V

Run in dry-run mode on GRANADANET, make payouts for cycle 300 and exit:
Run in dry-run mode on GHOSTNET, make payouts for cycle 300 and exit:

::

python3 src/main.py -D -N GRANADANET -C 300 -M 3 -V

Run in dry-run mode on MAINNET, make payouts from cycle 300 onwards, for calculations use data provided by local Tezos node RPC interface:

::

python3 src/main.py -C 300 -P rpc -D -V

Run in dry-run mode on MAINNET, make payouts only for cycle 300, for calculations use data provided by the public node RPC:

::

python3 src/main.py -C 300 -P prpc -Ap https://mainnet.smartpy.io -M 3 -V -D

Run in dry-run mode on MAINNET, retry failed payouts only for cycle 300, for calculations use data provided by the TZPRO API:

::

python3 src/main.py -C 300 -P tzpro -M 4 -V -D
python3 src/main.py -D -N GHOSTNET -C 300 -M 3 -V

For help, run:

Expand Down
6 changes: 1 addition & 5 deletions _sources/state_machine.rst.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
TRD State Machines
====================

TRD is designed as a state machine to make sure it's reliable.

In the future TRD will be `formally verified`_ to avoid undetected bugs.
TRD is designed as a state machine for reliability.

Launch state machine diagram
--------------------------------
Expand All @@ -18,5 +16,3 @@ Configuration state machine diagram
.. image:: fsm/graphviz/config_cycle_state_diagram.png
:width: 800
:alt: Configuration State Diagram

.. _formally verified: https://en.wikipedia.org/wiki/Formal_verification
1 change: 0 additions & 1 deletion _sources/testing.rst.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Tests
========
In order to run test which rely on the TZPRO API you have to copy the `.env.example` file to `.env` and add your personal TZPRO API Key.

Test Execution
---------------
Expand Down
1 change: 0 additions & 1 deletion codeofconduct.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<li class="toctree-l1"><a class="reference internal" href="tezossigner.html">How to use the Tezos Signer</a></li>
<li class="toctree-l1"><a class="reference internal" href="run.html">How to run TRD</a></li>
<li class="toctree-l1"><a class="reference internal" href="rundocker.html">How to run TRD in Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="payouttiming.html">Payout timing</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="linuxservice.html">Run as Linux Service (WIP)</a></li>
<li class="toctree-l1"><a class="reference internal" href="state_machine.html">TRD State Machines</a></li>
Expand Down
9 changes: 3 additions & 6 deletions configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
<li class="toctree-l1"><a class="reference internal" href="tezossigner.html">How to use the Tezos Signer</a></li>
<li class="toctree-l1"><a class="reference internal" href="run.html">How to run TRD</a></li>
<li class="toctree-l1"><a class="reference internal" href="rundocker.html">How to run TRD in Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="payouttiming.html">Payout timing</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="linuxservice.html">Run as Linux Service (WIP)</a></li>
<li class="toctree-l1"><a class="reference internal" href="state_machine.html">TRD State Machines</a></li>
Expand Down Expand Up @@ -94,7 +93,6 @@ <h1>How to configure TRD?<a class="headerlink" href="#how-to-configure-trd" titl
<div class="section" id="fee-setup">
<h2>Fee Setup<a class="headerlink" href="#fee-setup" title="Permalink to this headline"></a></h2>
<div class="line-block">
<div class="line">The file <em>fee.in</em> has been deprecated.</div>
<div class="line"><strong>Advanced user</strong>: You can change the values at <em>src/pay/batch_payer.py</em></div>
</div>
</div>
Expand Down Expand Up @@ -156,7 +154,7 @@ <h2>Baker Configuration:<a class="headerlink" href="#baker-configuration" title=
</pre></div>
</div>
</dd>
<dt><strong>founders_map</strong></dt><dd><p>A dictionary of PKH and ratio (decimal in the range [0-1]) pairs. Each item in this dictionary represents PKH of each founder and his ratio of the shares coming from the service fee. Implicit or originated addresses are accepted. It is important that the sum of all ratios equals to 1. This map is optional if founders do not want to be paid from service fees, in this case, service fee remains in baking balance.</p>
<dt><strong>founders_map</strong></dt><dd><p>A dictionary of PKH and ratio (decimal in the range [0-1]) pairs. Each item in this dictionary represents PKH of each founder and their ratio of the shares coming from the service fee. Implicit or originated addresses are accepted. It is important that the sum of all ratios equals to 1. This map is optional if founders do not want to be paid from service fees, in this case, service fee remains in baking balance.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">founders_map</span><span class="p">:</span>
<span class="p">{</span><span class="s1">&#39;tz3VxS7ff4YnZRs8b4mMP4WaMVpoQjuo1rjf&#39;</span> <span class="p">:</span> <span class="mf">0.6</span><span class="p">,</span>
Expand Down Expand Up @@ -227,19 +225,18 @@ <h2>Baker Configuration:<a class="headerlink" href="#baker-configuration" title=
</pre></div>
</div>
</dd>
<dt><strong>pay_denunciation_rewards</strong></dt><dd><p>True/False - Baker may get rewarded for denunciating another baker’s equivocation (double baking or double endorsing). The protocol rewards the baker including the denunciation. When True, these rewards will be distributed. When False, they will remain in the baker’s account, allowing the baker to reimburse the party at fault if they desire. Must be set to True when using RPC backend as RPC is not able to itemize rewards.</p>
<dt><strong>pay_denunciation_rewards</strong></dt><dd><p>True/False - Baker may get rewarded for denunciating another baker’s equivocation (double baking or double endorsing). The protocol rewards the baker including the denunciation. When True, these rewards will be distributed. When False, they will remain in the baker’s account, allowing the baker to reimburse the party at fault if they desire.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pay_denunciation_rewards</span><span class="p">:</span> <span class="kc">True</span>
</pre></div>
</div>
</dd>
<dt><strong>rules_map</strong></dt><dd><p>The rules_map is needed to redirect payments. A pre-defined source (left side) is mindelegation. Pre-defined destinations (right side) are: TOF = to founders balance, TOB = to bakers balance, and TOE = to everyone. Variable sources and destinations are PKHs. New since v8.0 PKH: Dexter enables payouts to Dexter liquidity pools.</p>
<dt><strong>rules_map</strong></dt><dd><p>The rules_map is needed to redirect payments. A pre-defined source (left side) is mindelegation. Pre-defined destinations (right side) are: TOF = to founders balance, TOB = to bakers balance, and TOE = to everyone. Variable sources and destinations are PKHs.</p>
<p>Example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">rules_map</span><span class="p">:</span>
<span class="n">tz1T5woJN3r7SV5v2HGDyA5kurhbD9Y8ZKHZ</span><span class="p">:</span> <span class="n">TOF</span> <span class="c1">#(redirects payment from tz1T5woJN3r7SV5v2HGDyA5kurhbD9Y8ZKHZ to founders)</span>
<span class="n">tz1YTMY7Zewx6AMM2h9eCwc8TyXJ5wgn9ace</span><span class="p">:</span> <span class="n">TOB</span> <span class="c1">#(payment to tz1YTMY7Zewx6AMM2h9eCwc8TyXJ5wgn9ace will remain in the bakers balance)</span>
<span class="n">tz1V9SpwXaGFiYdDfGJtWjA61EumAH3DwSyT</span><span class="p">:</span> <span class="n">tz1fgX6oRWQb4HYHUT6eRjW8diNFrqjEfgq7</span> <span class="c1">#(redirects payment from tz1V9S... to tz1fgX...)</span>
<span class="n">tz1RMmSzPSWPSSaKU193Voh4PosWSZx1C7Hs</span><span class="p">:</span> <span class="n">Dexter</span> <span class="c1">#(indicates address is a dexter pool; TRD will send rewards to pool members)</span>
<span class="n">mindelegation</span><span class="p">:</span> <span class="n">TOE</span> <span class="c1">#(mindelegation will be shared with everyone)</span>
</pre></div>
</div>
Expand Down
1 change: 0 additions & 1 deletion contributors.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
<li class="toctree-l1"><a class="reference internal" href="tezossigner.html">How to use the Tezos Signer</a></li>
<li class="toctree-l1"><a class="reference internal" href="run.html">How to run TRD</a></li>
<li class="toctree-l1"><a class="reference internal" href="rundocker.html">How to run TRD in Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="payouttiming.html">Payout timing</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="linuxservice.html">Run as Linux Service (WIP)</a></li>
<li class="toctree-l1"><a class="reference internal" href="state_machine.html">TRD State Machines</a></li>
Expand Down
1 change: 0 additions & 1 deletion genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
<li class="toctree-l1"><a class="reference internal" href="tezossigner.html">How to use the Tezos Signer</a></li>
<li class="toctree-l1"><a class="reference internal" href="run.html">How to run TRD</a></li>
<li class="toctree-l1"><a class="reference internal" href="rundocker.html">How to run TRD in Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="payouttiming.html">Payout timing</a></li>
<li class="toctree-l1"><a class="reference internal" href="plugins.html">Plugins</a></li>
<li class="toctree-l1"><a class="reference internal" href="linuxservice.html">Run as Linux Service (WIP)</a></li>
<li class="toctree-l1"><a class="reference internal" href="state_machine.html">TRD State Machines</a></li>
Expand Down
Loading

0 comments on commit e884074

Please sign in to comment.