Closed c4-submissions closed 10 months ago
Right now we are waiting 1 epoch which I don't believe is enough, we are going to add a min epoch
toshiSat (sponsor) confirmed
This report seems to suggest that M-04 is mitigated but with an error.
The error described here, that one can deposit just before an epoch shift, seems duplicate with what the warden mentions in #9 and with other wardens' #45 and #21.
0xleastwood marked the issue as satisfactory
The judge (@0xleastwood) has asked me to update this finding on their behalf, to make it a duplicate of issue #45. So I'm updating the labels and status accordingly.
Lines of code
https://github.com/asymmetryfinance/afeth/blob/main/contracts/strategies/votium/VotiumStrategy.sol#L61-L63
Vulnerability details
Original Issue
Issue Details
Mitigation
The fix proposed was to allow the VotiumStrategy to utilize already unlocked balances(due to expired locks etc...) for withdrawal request fulfillments. The team has successfully mitigated an issue by applying the diff suggested in original issue.
The fix was introduced in the following PR.
Conclusion
After introducing the fix proposed above the sponsors should be aware of the following scenario that could occur:
x afETH
to make sure the withdrawal will be finalized before aq + 2th
epoch occurs.qth
epoch.P(q)
which is unlocked cvx balance that nearly covers the whole requested amount:P(q) >= x
P(q) < x + delta
q + 1th
epoch.y afETH
and front-runs Alice's tx.delta < y
, Bob utlizes the whole unlocked balance to finalize his own withdrawal request atq + 1th
epoch, therefore, Alice's withdrawal request will not be finalised beforeq + 2th
epoch occurs.Basically, it's similar to sandwich attacks, however here we don't gain any profit, but instead the early spot to withdraw.
Recommended Mitigation Steps:
minEpoch
to prevent them from executing withdrawals with an undermined epoch.Assessed type
Context