In flow of deposit queued tokens into staking pool, the state variable sharesSinceLastUpdate
is improperly updated due to wrong implementation
The internal function PriorityPool#_depositQueuedTokens
implements logic to deposit queued tokens into staking pool. The logic also updates state variables if there is deposit from queued tokens, specifically totalQueued
changes. If the case happens, sharesSinceLastUpdate
is added by an amount equals to stakingPool.getSharesByStake(diff)
. However, the amount stakingPool.getSharesByStake(diff)
is the amount of share calculated with contract state after stakingPool.deposit(address(this), toDepositFromQueue, _data)
, meanwhile the actual amount minted for the deposit is calculated by the contract state before stakingPool.deposit(address(this), toDepositFromQueue, _data)
is executed
Offchain calculation for the distributions can be incorrect due to the wrongly tracked amount sharesSinceLastUpdate
. This calculation can effectively affect protocol's funds in distribution flow
Manual
Update the order of the contract calls
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.