diff --git a/docs/configuration.rst b/docs/configuration.rst index 8903454b..83b489e9 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -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: @@ -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:: @@ -153,14 +152,14 @@ 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:: @@ -168,7 +167,6 @@ Available configuration parameters are: 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** diff --git a/docs/index.rst b/docs/index.rst index 189aeff3..2aab367f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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? ------------------------------------------------ @@ -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 ----------- @@ -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 diff --git a/docs/payouttiming.rst b/docs/payouttiming.rst deleted file mode 100644 index ef4d8f35..00000000 --- a/docs/payouttiming.rst +++ /dev/null @@ -1,14 +0,0 @@ -.. _payout_timing: - -Payout timing -============= - -Tezos rewards are paid out by the protocol at the end of a given cycle. - -By default, TRD then distributes these rewards at the beginning of the next cycle. - -TRD behavior is to pay out the last released payment cycle. - -A cycle on mainnet lists 3 days. - -Delegation takes 2 cycles to take effect. This is unlike staking, which is instantaneous. diff --git a/docs/run.rst b/docs/run.rst index c9d75c54..2904cefb 100644 --- a/docs/run.rst +++ b/docs/run.rst @@ -38,8 +38,8 @@ Options ``-A --node_endpoint `` 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 `` - 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 `` + Source that provides all needed data for reward calculations. Default and only value: ``tzkt`` (TzKT API). ``-Ap --node_addr_public `` 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. @@ -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: diff --git a/docs/state_machine.rst b/docs/state_machine.rst index aec88f4e..525d528e 100644 --- a/docs/state_machine.rst +++ b/docs/state_machine.rst @@ -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 -------------------------------- @@ -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 \ No newline at end of file diff --git a/docs/testing.rst b/docs/testing.rst index 620263f4..ce52a5d7 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -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 ---------------