code-423n4 / 2024-06-renzo-mitigation-findings

0 stars 0 forks source link

M-02 MitigationConfirmed #45

Open c4-bot-5 opened 3 months ago

c4-bot-5 commented 3 months ago

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 commented 3 months ago

alcueca marked the issue as satisfactory