You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
K <--> | Stake Pool Registrations + <br /> Deregistrations | M
45
45
M --> | Unclaimed Refunds for Retired Pools | C
46
46
end
47
47
@@ -60,20 +60,69 @@ flowchart
60
60
style ADA_POTS fill:#f6f9ff,stroke:#f6f9ff
61
61
```
62
62
63
-
## 🚀 Getting Started
64
-
65
-
#### Prerequisites
63
+
## 🤓Interesting Findings
64
+
65
+
While the flowchart above shows the calculation of the Ada pots in general, there are some more aspects that need to be considered:
66
+
67
+
- The point in time 🕑. The reward calculation starts at slot `(4 * 2160) / 0.05) = 172800` (48h) each epoch. Before the Babbage era,
68
+
accounts that were de-registered **before** this point in time were not considered for the rewards calculation.
69
+
This means that the rewards for the de-registered stake addresses are not considered in the rewards calculation.
70
+
Those rewards were not distributed and went therefore back to the **reserves**. Accounts that deregistered **after**
71
+
this point in time, but before the end of the epoch, were considered for the rewards calculation. But as it is not
72
+
possible to send rewards to a de-registered stake address, the rewards went back to the **treasury**.
73
+
- At the Allegra hard fork, the (pre-Shelley) bootstrap addresses were removed from the UTxO and the Ada contained in them was returned to the reserves.
74
+
- There was a different behavior (pre-Allegra): If a pool reward address had been used for multiple pools,
75
+
the stake account only received the reward for one of those pools and did also not get any member rewards.
76
+
This **behavior has changed in mainnet epoch 236** with the Allegra hard fork. Now, the stake account receives the rewards for all pools (including member rewards).
77
+
- Transaction fees and a part of the reserve is used to build the total reward pot. It is often mentioned that
78
+
the monetary expansion rate (protocol parameter) is used to calculate the part coming from the reserves.
79
+
While this is true, the actual calculation is a multiplication of the monetary expansion rate and the performance of all stake pools `eta`.
80
+
`Eta` is the ratio of the blocks produced **by pools** in an epoch and the expected blocks `(432000 slots per epoch / 20 sec per block = 21600)`.
81
+
With beginning of Shelly the blocks were produced by OBFT nodes and not by pools. Therefore, the performance of all stake pools would be 0.
82
+
The decentralization parameter `d` has been introduced to slightly increase the amount of **expected blocks produced by pools**.
83
+
In the time when `d` was above 0.8 `eta` was set to 1.0. `d` decreased over time from 1.0 to 0.0 and disappeared completely with the Vasil hard fork.
84
+
- The pool deposit is currently 500 Ada. This deposit will be returned (on the next epoch boundary) to the pool reward address when the pool is retired.
85
+
However, if the deposit could not be returned (e.g. because the pool reward address is de-registered), the **deposit will be added to the treasury** instead.
86
+
- Pool updates override pool deregistrations. This means that if a pool is updated before the end of the epoch, the pool will not be retired and the deposit will not be returned.
66
87
67
-
Java 17
88
+
## 🚀 Getting Started
68
89
69
-
#### Build & Test
90
+
Make sure to have Java 17 installed and run the following commands:
While the calculation package is used as a pure re-implementation of the ledger specification,
120
+
the validation package is used to get the needed data (e.g. registration/deregistration certificates, epoch stakes, etc.)
121
+
from the data provider and execute the calculation. Furthermore, the validation package is used to compare the calculated
122
+
values with the actual values using DB Sync as ground truth.
123
+
76
124
#### Data Provider
125
+
77
126
The pool rewards calculation and also the treasury calculation requires a data provider to perform the calculation.
78
127
This repository offers different data providers and also an interface if you want to add your own provider. The following data providers are available:
0 commit comments