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

0x73696d616f - GoodDollarExpansionController inherits PausableUpgradeable but does not make any function pausable #49

Open
sherlock-admin2 opened this issue Oct 31, 2024 · 1 comment
Labels
Sponsor Confirmed The sponsor acknowledged this issue is valid Will Fix The sponsor confirmed this issue will be fixed

Comments

@sherlock-admin2
Copy link
Contributor

sherlock-admin2 commented Oct 31, 2024

0x73696d616f

Medium

GoodDollarExpansionController inherits PausableUpgradeable but does not make any function pausable

Summary

GoodDollarExpansionController inherits PausableUpgradeable but does not have any pausing functionality implemented. This renders the inherited PausableUpgradeable useless and will make it impossible to pause this contract.

Root Cause

In GoodDollarExpansionController:137,153,170,192, the whenNotPaused modifier is not implemented as well as functions to set paused or unpaused.

It calls some functions in GoodDollarExchangeProvider that may be paused there, but it would pause all functions in GoodDollarExchangeProvider, and the protocol may intend to pause only the functions exposed in GoodDollarExpansionController.

Internal pre-conditions

None.

External pre-conditions

None.

Attack Path

  1. Protocol tries to pause GoodDollarExpansionController functions but fails to do so.

Impact

GoodDollarExpansionController can not be paused.

PoC

Check the contract here.

Mitigation

Implement whenNotPause modifiers in the functions and create functions to pause/unpause the contract.

@sherlock-admin3 sherlock-admin3 changed the title Fit Menthol Sawfish - GoodDollarExpansionController inherits PausableUpgradeable but does not make any function pausable 0x73696d616f - GoodDollarExpansionController inherits PausableUpgradeable but does not make any function pausable Nov 5, 2024
@sherlock-admin2
Copy link
Contributor Author

The protocol team fixed this issue in the following PRs/commits:
mento-protocol/mento-core#552

@sherlock-admin3 sherlock-admin3 added Sponsor Confirmed The sponsor acknowledged this issue is valid Will Fix The sponsor confirmed this issue will be fixed labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsor Confirmed The sponsor acknowledged this issue is valid Will Fix The sponsor confirmed this issue will be fixed
Projects
None yet
Development

No branches or pull requests

2 participants