Closed sherlock-admin closed 1 year ago
We now check that the withdrawProxy for the current epoch (technically previous epoch) exists before transferring.
Escalate for 1 USDC
Duplicate of #163, which I believe is also invalid
Escalate for 1 USDC
Duplicate of #163, which I believe is also invalid
You've created a valid escalation for 1 USDC!
To remove the escalation from consideration: Delete your comment. To change the amount you've staked on this escalation: Edit your comment (do not create a new comment).
You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.
Escalation accepted. Same issue with different recommendation
Escalation accepted. Same issue with different recommendation
This issue's escalations have been accepted!
Contestants' payouts and scores will be updated according to the changes made on this issue.
Jeiwan
medium
Liquidity providers can lose funds when a withdraw proxy is not set for an epoch
Summary
Liquidity providers can lose funds when a withdraw proxy is not set for an epoch
Vulnerability Detail
The
transferWithdrawReserve
function ofPublicVault
sends withdrawal reserves to aWithdrawProxy
(PublicVault.sol#L341) and subtracts transferred amount from the reserves. However, if a withdraw proxy is not set for an epoch, there's a false positive:withdrawReserve
is updated but no funds are actually transferred:Impact
Liquidity providers might not be able to withdraw liquidity they requested because it wasn't transferred to a WithdrawProxy due to a mistake, yet accounting was updated.
Code Snippet
See Vulnerability Detail
Tool used
Manual Review
Recommendation
Consider reverting in the case when no withdraw proxy is set for the current epoch.
Duplicate of #163