Rewards are calculated using a mining script that takes a start block, end block and then using a block step period, walks through snapshots on a roughly 2.5 hour period, calculating reward payments.
The result is a .csv file listing reward payments to be made that we then disperse.
The mining script project can be found here:
To assist with projecting rewards there is also an Excel document that sets out the reward payment logic and allows estimates to be run.
For pools containing two or more tokens that are pegged to the same underlying asset, a penalty is applied according to the reward calculation documentation. The reward payout script correctly takes this into account but the dashboard was not applying this penalty to its APR prediction. This wasn't an issue until recently since no pools contained hard pegged tokens but a pool was recently created containing XDAI and USDC which are two tokens hard pegged to the dollar.
Since people use the APR prediction when choosing where to add liquidity we felt that some people would have made a decision to add liquidity to this pool expecting a higher reward payout. We therefore decided to calculate what the reward payout would have been if a penalty wasn't applied and then payout the difference so that no one would lose out for making a decision based on incorrect predictions.
We fixed the dashboard to ensure it shows correct APR predictions and this payout is to cover that correction.
The DAO proposal authorising this additional payment can be viewed at the following:
DAOhaus
DAOhaus
StablePoolCorrection.csv
2KB
Text
Celo
The reward script uses SYMM price data from CoinGecko when calculating APR's. For one week, Coingecko had an issue which meant it wasn't updating the price of SYMM. This meant that reward payments were half of what they should have been for that week on Celo.
While this was a bug in CoinGecko we decided we didn't want liquidity providers to be impacted and so we would make a corrective payout to all wallets that were impacted.
The DAO proposal authorising this additional payment can be viewed at the following: