Summary
As noticed by the community, it has been common practice by some big tokens holders to add liquidity to the current eligible pool for rewards (SUNDAE/ADA 0.3%), lock them into YF V2 within the last hour (or even minutes before) of the midnight UTC snapshot, and moments after the snapshot is taken, they unlock/withdraw the LP tokens again; thus, they gain full rewards for the day without taking any substantial risk of impermanent loss.
Proposal
The goal of this proposal is to at least “force” big players to take some risk if they wish to get nice daily rewards, by updating the rewards calculation to taken into consideration the duration the LP tokens stayed locked from the snapshot of the day before until the snapshot of current day. The vast majority of holders does not do this “not so cool” move every day, will benefit from this update, and the rewards distribution will be more fair. In addition, the rewards HRA % the community is seeing during the day might not change for some minutes around the snapshot midnight UTC, as noticed the other day it dropping from 235% to 220% right before the snapshot and coming back up to 235% moments after the snapshot.
Implementation details
In terms of making this concrete from an implementation perspective, here is how the calculation would change:
- Assume we’re calculating the rewards for date X, which is done at 2am UTC on date X+1, using the snapshot at midnight UTC between X and X+1;
- Identify the set of all positions that were created before and spent after the slot at midnight UTC between X-1 and X; these are our “initial positions”
- Identify all positions that were created before before and spent after the slot at midnight UTC between X and X+1; these are our “updated positions”
- for each initial position and updated position
a. calculate the relevant_start_time as the maximum between the tx slot time, and the start of the day (midnight UTC between X-1 and X)
b. calculate the relevant_end_time as the maximum between the tx spent slot time, and the end of the day (midnight UTC between X and X+1)
c. sum up the LP tokens for each pool held by the position
d. multiply the LP token quantity by (relevant_end_time - relevant_start_time) (in slots)
e. divide this product by the number of slots in a day, 86400, rounded down.
f. Add this to the LP weight by owner- Split the received rewards among owners of the pool according to this prorated LP weight instead of the raw LP numbers
By Pi
As discussed in the Sundae Labs Discord, this update in the rewards calculation takes into consideration position updates:
in the implementation proposed, it handles updating the position with new LP tokens gracefully; you’d earn half a days worth at the first rate, and half a days worth at the increased rate; And, if you unlocked your LP tokens, you’d earn rewards for the half that you had them locked.
you treat each UTXO as a unit with some amount of LP tokens, and just prorate that for how long that UTXO “lived”
Conclusion
Please indicate below whether you would like to see an on-chain vote for this proposal. Per the governance procedures, once we receive 20 “Interested” votes, we will create the on-chain proposal for voting.
- Yes, distribute prorated rewards
- No, it’s fine the way it is now