Skip to content

Commit

Permalink
refresh docs (#711)
Browse files Browse the repository at this point in the history
remove some outdated references, make it clear that staking and
delegating are different
  • Loading branch information
nicolasochem authored Oct 1, 2024
1 parent ab8f87a commit cdf7d38
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 53 deletions.
8 changes: 3 additions & 5 deletions docs/configuration.rst
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 docs/index.rst
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 docs/payouttiming.rst

This file was deleted.

26 changes: 4 additions & 22 deletions docs/run.rst
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 docs/state_machine.rst
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 docs/testing.rst
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

0 comments on commit cdf7d38

Please sign in to comment.