-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sweepERC20() does not fill up withdrawal buffer #322
Comments
CloudEllie marked the issue as primary issue |
alcueca changed the severity to QA (Quality Assurance) |
alcueca marked the issue as grade-a |
Useful suggestion, but hardly a Medium severity. |
alcueca marked the issue as grade-b |
@alcueca Thanks for Judging , Considering the fact that, this discrepancy will make withdrawal unavailable to users when there should be, it temporarily DOS core functionality which IMO makes it a valid medium. In this case, tokens that should be available for withdraw is being sent EL. Please take a second look at this. |
@lanrebayode As mentioned in a comment in another report, sponsor pointed out numerous times that Therefore this claim:
is not true. The protocol doesn't rely on ERC20 donations to fill the withdraw buffer and make funds available to users for withdrawal by any means. |
s1n1st3r0 is right, while filling the withdraw buffer in |
Lines of code
https://github.com/code-423n4/2024-04-renzo/blob/519e518f2d8dec9acf6482b84a181e403070d22d/contracts/Deposits/DepositQueue.sol#L254-L277
Vulnerability details
Impact
DepositQueue.sweepERC20()
fails to callWithdrawQueue.getBufferDeficit()
andDepositQueue.fillERC20withdrawBuffer()
to fill up withdraw buffer deficit with available tokens before callingrestakeManager.depositTokenRewardsFromProtocol()
to deposit into Eigenlayer through the Operator Delegator contract.The protocol usually fill withdraw buffer deficit for both 4th and Erc20 tokens as observed in;
RM.deposit()
,DQ.depositEthFromProtocol
andDQ.forwardFullWithdrawalEth()
. This is done to make Eth/tokens available for withdrawal by user.However, when the sweep function was called, no call was made to fill any withdraw buffer deficit.
Having a withdraw deficit unfilled will reduce the amount of tokens that ought to be available for withdrawal.
Proof of Concept
Also, no call in
RM.depositTokenRewardsFromProtocol
to check if there's a buffer deficit and to fill it.Tools Used
Manual review.
Recommended Mitigation Steps
Include a withdrawal buffer deficit check and fill it if required.
Assessed type
Context
The text was updated successfully, but these errors were encountered: