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

Multiple pause mechanisms #19

Closed
code423n4 opened this issue Apr 16, 2021 · 2 comments
Closed

Multiple pause mechanisms #19

code423n4 opened this issue Apr 16, 2021 · 2 comments

Comments

@code423n4
Copy link
Contributor

Handle

gpersoon

Vulnerability details

Impact

Two different pause mechanisms are used
One with the modifier whenNotPaused from openzeppelin Pausable.sol
And one via the function _whenProtocolNotPaused()

The could lead to confusion, especially because the names are very similar.

Proof of Concept

Loan.sol: function fundLoan(address mintTo, uint256 amt) whenNotPaused external {
LoanFactory.sol: ) external whenNotPaused returns (address) {
PoolFactory.sol: ) public whenNotPaused returns (address) {
StakeLocker.sol: function stake(uint256 amt) whenNotPaused external {

Loan.sol: function _whenProtocolNotPaused() internal {
LoanFactory.sol: function _whenProtocolNotPaused() internal {
Pool.sol: function _whenProtocolNotPaused() internal {
PoolFactory.sol: function _whenProtocolNotPaused() internal {
StakeLocker.sol: function _whenProtocolNotPaused() internal {

Tools Used

grep

Recommended Mitigation Steps

Doublecheck the need for multiple mechanism.
Perhaps change the name of _whenProtocolNotPaused() to be more different from whenNotPaused

@lucas-manuel
Copy link
Collaborator

Will not implement

@Arachnid
Copy link
Collaborator

This appears to correspond to local and global pause mechanisms. Not a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants