Platform: Code4rena
Start Date: 03/10/2023
Pot Size: $24,500 USDC
Total HM: 6
Participants: 62
Period: 3 days
Judge: LSDan
Total Solo HM: 3
Id: 288
League: ETH
Rank: 47/62
Findings: 1
Award: $4.94
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: adriro
Also found by: 0x3b, 0xAadi, 0xDING99YA, 0xTheC0der, 0xWaitress, 0xdice91, 100su, 3docSec, BRONZEDISC, BoRonGod, Eurovickk, GKBG, HChang26, IceBear, JP_Courses, MatricksDeCoder, Mike_Bello90, SovaSlava, Topmark, albahaca, cookedcookee, gzeon, hunter_w3b, kutugu, lukejohn, marqymarq10, matrix_0wl, orion, pep7siup, radev_sw, sces60107, taner2344, tpiliposian, wahedtalash77, xAriextz, zpan
4.9369 USDC - $4.94
Due to the nature of how both claimConcentratedRewards and claimAmbientRewards work, if the DAO changes the rewards ratio before the week is over, the whole rewards for the week are gonna be changed. Current changes to the system effect past rewards.
claimConcentratedRewards calculates the rewards based on concRewardPerWeek_ index. Users accrue
timeWeightedWeeklyPositionInRangeConcLiquidity_
which is multiplyed by concRewardPerWeek_
and devided by the total liquidity staked.
rewardsToSend += inRangeLiquidityOfPosition * concRewardPerWeek_[poolIdx][week] / overallInRangeLiquidity;
After the week is over they are able to call claimConcentratedRewards and claim all of the rewards they have generated. However if the governance executes a call to setConcRewards and changes the rewards mid week, all of the previous rewards that were generated for the current week will change.
Example:
Manual review.
This issue revolves around the the structure of how rewards are calculated and that current changes to the system effect past rewards. I am not able to give the right suggestion, as I am not aware of how the rest of the system works, and my suggestion might cause more harm the good, so I will leave it to the devs.
Math
#0 - c4-pre-sort
2023-10-07T13:39:55Z
141345 marked the issue as duplicate of #81
#1 - c4-judge
2023-10-18T20:49:31Z
dmvt changed the severity to QA (Quality Assurance)
#2 - c4-judge
2023-10-18T22:47:25Z
dmvt marked the issue as grade-b