Skip to content

Commit

Permalink
Add names of Validator & Delegator Reward funcs
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippGackstatter committed Dec 14, 2023
1 parent 593e050 commit 8a78c71
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tips/TIP-0040/tip-0040.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8a78c71

Please sign in to comment.