Skip to content
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

M-02 MitigationConfirmed #13

Open
c4-bot-10 opened this issue Jun 5, 2024 · 2 comments
Open

M-02 MitigationConfirmed #13

c4-bot-10 opened this issue Jun 5, 2024 · 2 comments
Labels
confirmed for report This issue is confirmed for report edited-by-warden mitigation-confirmed MR-M-02 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-bot-10
Copy link
Contributor

c4-bot-10 commented Jun 5, 2024

Lines of code

Vulnerability details

Lines of code

Vulnerability details

C4 issue

M-02: Withdrawals and Claims are meant to be pausable, but it is not possible in practice

Link to issue

Comments

The WithdrawQueue contract’s original implementation does not include the whenNotPaused modifier on the withdraw or claim functions, even though the Renzo protocol documentation mentions the protocol has the ability to pause/unpause deposits and withdrawals.

As a result, neither the withdraw nor the claim functions can be paused if needed. This could pose a problem if the functionality needs to be paused.

Mitigation

PR: Pull Request 87 - M02FIX

The mitigation adds the whenNotPaused modifier to the withdraw and claim functions in the WithdrawQueue contract. This allows the functions to be paused when necessary.

function claim(uint256 withdrawRequestIndex) external nonReentrant whenNotPaused {
	...
}
function withdraw(uint256 _amount, address _assetOut) external nonReentrant whenNotPaused {
	...
}

Test

New test cases have been added to ensure the correct functioning of the whenNotPaused modifier, and all tests are passing.

Contract: WithdrawQueueForkTest

Tests:

  • test_WithdrawQueueConfig
  • test_UserWithdrawClaim

Conclusion

The addition of the whenNotPaused modifier to the withdraw and claim functions ensures that these functions can be paused if necessary.

@c4-judge
Copy link

c4-judge commented Jun 8, 2024

alcueca marked the issue as confirmed for report

@c4-judge c4-judge added confirmed for report This issue is confirmed for report satisfactory satisfies C4 submission criteria; eligible for awards labels Jun 8, 2024
@c4-judge
Copy link

c4-judge commented Jun 8, 2024

alcueca marked the issue as satisfactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed for report This issue is confirmed for report edited-by-warden mitigation-confirmed MR-M-02 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

3 participants