Skip to content

Commit

Permalink
Update variables in the potential mana section
Browse files Browse the repository at this point in the history
This change is mostly cosmetic; the result does not change with this update.
  • Loading branch information
oliviasaa authored Jan 15, 2024
1 parent a4247f9 commit b9cfc9f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tips/TIP-0039/tip-0039.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,13 @@ applies the decay to the result, where:
- `Mana Generated = Generate Mana(Amount, Slots Since Epoch Start)`
- If `Output Creation Epoch < Transaction Creation Epoch - 1`:
- Let `Epoch Index Diff` be `Transaction Creation Epoch - Output Creation Epoch`.
- Return `Potential Mana_0 - Potential Mana_n_1 + Potential Mana_n`, where
- `Potential Mana_n = Decay(Generate Mana(Amount, Slots Before Next Epoch), Epoch Index Diff)`
- `Potential Mana_n_1 = Decay(c, Epoch Index Diff - 1)`
- `Potential Mana_0 = c + Generate Mana(Amount, Slots Since Epoch Start) - (c >> Decay Factors Exponent)`
- Return `Potential Mana First Epoch + Potential Mana Intermediate Epochs + Potential Mana Last Epoch - Correction Term`, where
- `Potential Mana First Epoch = Decay(Generate Mana(Amount, Slots Before Next Epoch), Epoch Index Diff)`
- `Potential Mana Intermediate Epochs = c - c2`
- `Potential Mana Last Epoch = Generate Mana(Amount, Slots Since Epoch Start)`
- `Correction Term = c >> Decay Factors Exponent`
- `c = Multiplication And Shift(Upper Bits(Amount, 32), Lower Bits(Amount, 32), Decay Factor Epochs Sum * Generation Rate , Decay Factor Epochs Sum Exponent+generationRateExponent-slotsPerEpochExponent)`.
- `c2 = Decay(c, Epoch Index Diff - 1)`

## Stored Mana

Expand Down

0 comments on commit b9cfc9f

Please sign in to comment.