From 8a78c71ca83b9ef274424fe4b818fa672fb570e5 Mon Sep 17 00:00:00 2001 From: Philipp Gackstatter Date: Thu, 14 Dec 2023 14:08:24 +0100 Subject: [PATCH] Add names of Validator & Delegator Reward funcs --- tips/TIP-0040/tip-0040.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tips/TIP-0040/tip-0040.md b/tips/TIP-0040/tip-0040.md index 2bfb6bde2..30fed7e67 100644 --- a/tips/TIP-0040/tip-0040.md +++ b/tips/TIP-0040/tip-0040.md @@ -370,7 +370,7 @@ side. There are thus two types of transitions: delayed claiming transition and d corresponds to the `Delegation ID` of the one on the input side, which may be an implicit or explicit Delegation ID. The next state is the empty state. - During this transition, Mana rewards may be added to the total sum of Mana on the output side of the transaction, - according to [delegation rewards](#delegation-rewards). + according to [delegator rewards](#delegator-rewards). #### Created Outputs @@ -625,12 +625,13 @@ the amount of Mana Rewards that can be claimed is defined as follows. - `Epoch Index >= Start Epoch + 1`. - `Epoch Index < Last Reward Epoch` where `Last Reward Epoch` is the minimum of `Future Bounded Epoch Index` and `End Epoch + 1`. -- The total claimable decayed rewards for a validator `id` is the sum of `Rewards(Decay End Epoch, n)` for each epoch - `n` in `Claimable Rewards(id)` where `Decay End Epoch` is the maximum of `Future Bounded Epoch Index - 1` (or `0` if - that would underflow) and `Last Reward Epoch`. +- Let `Validator Rewards(Account ID)` be the total claimable decayed rewards for the Account Output identified by + `Account ID`. It is the sum of `Rewards(Decay End Epoch, n)` for each epoch `n` in `Claimable Rewards(Account ID)` + where `Decay End Epoch` is the maximum of `Future Bounded Epoch Index - 1` (or `0` if that would underflow) and + `Last Reward Epoch`. - Note: The `- 1` is applied to allow claiming the full, undecayed reward for an epoch `n - 1` in epoch `n`. -## Delegation Rewards +## Delegator Rewards To claim rewards, a _Delegation Output_ must be destroyed. Depending on the state it is in at that point, different conditions for claiming rewards apply. An output destroyed in _Delegating State_ will always forfeit _potential_ rewards @@ -680,9 +681,10 @@ The amount of Mana Rewards that can be claimed for a _Delegation Output_ which i - Note that no transaction validation rule exists to prevent claiming rewards too early, that is, before the rewards of the previous epoch became available, thus forfeiting the potential rewards of that previous epoch. - If the output is in _Delayed Claiming State_ let `Delegation End` be `End Epoch`. -- The total claimable decayed rewards for a Delegation Output with `address` set to the `Validator Address`, be the sum - of `Rewards(Decay End Epoch, n)` for each epoch `n` in `Claimable Rewards(address)`, where `Decay End Epoch` is the - maximum of `Future Bounded Epoch Index - 1` (or `0` if that would underflow) and `Delegation End`. +- Let `Delegator Rewards(Delegation ID)` be the total claimable decayed rewards for the Delegation Output identified by + `Delegation ID` with `address` set to the `Validator Address`. It is the sum of `Rewards(Decay End Epoch, n)` for each + epoch `n` in `Claimable Rewards(address)`, where `Decay End Epoch` is the maximum of `Future Bounded Epoch Index - 1` + (or `0` if that would underflow) and `Delegation End`. - Note: The `- 1` is applied to allow claiming the full, undecayed reward for an epoch `n - 1` in epoch `n`. # Rationale & Design