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 #45

Open
c4-bot-5 opened this issue Jun 7, 2024 · 1 comment
Open

M-02 MitigationConfirmed #45

c4-bot-5 opened this issue Jun 7, 2024 · 1 comment
Labels
mitigation-confirmed MR-M-02 satisfactory satisfies C4 submission criteria; eligible for awards

Comments

@c4-bot-5
Copy link
Contributor

c4-bot-5 commented Jun 7, 2024

Lines of code

Vulnerability details

Original Issue Summary

In the original issue, WithdrawQueue.sol inherits from PausableUpgradeable. However, the whenNotPaused modifier is not used, resulting in withdrawals and claims not being able to be paused.

Mitigation

This mitigation proposes the usage of the whenNotPaused modifier:

-    function withdraw(uint256 _amount, address _assetOut) external nonReentrant {
+    function withdraw(uint256 _amount, address _assetOut) external nonReentrant whenNotPaused {

-    function claim(uint256 withdrawRequestIndex) external nonReentrant {
+    function claim(uint256 withdrawRequestIndex) external nonReentrant whenNotPaused {

Comments

This mitigation succesfully mitigates the original issue. Due to the proposed usage of whenNotPaused, when the project decides to call pause(), users will not be able to call withdraw() or claim(), resulting in succesfully pausing these functions.

Suggestion

n/a

Conclusion

LGTM

@c4-judge
Copy link

c4-judge commented Jun 8, 2024

alcueca marked the issue as satisfactory

@c4-judge c4-judge added the satisfactory satisfies C4 submission criteria; eligible for awards label Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mitigation-confirmed MR-M-02 satisfactory satisfies C4 submission criteria; eligible for awards
Projects
None yet
Development

No branches or pull requests

2 participants