hats-finance / Euro-Dollar-0xa4ccd3b6daa763f729ad59eae75f9cbff7baf2cd

Audit competition repository for Euro-Dollar (0xa4ccd3b6daa763f729ad59eae75f9cbff7baf2cd)
https://hats.finance
MIT License
3 stars 2 forks source link

Pause Mechanism is not effective in InvestToken.sol #14

Open hats-bug-reporter[bot] opened 4 weeks ago

hats-bug-reporter[bot] commented 4 weeks ago

Github username: -- Twitter username: -- Submission hash (on-chain): 0x5bd612725a58c9a9454ac89f151fbb38f6eb69ad38b734318b708dbb70399f7d Severity: medium

Description: we have pause and unpause functions in invest token contract but non of the core functions like deposit and withdraw have whenNotPause modifier so if contract pause, it wont effect anything.

function pause() public onlyRole(PAUSER_ROLE) {
        _pause();
    }

    /**
     * @notice Unpauses the contract. Can only be called by accounts with PAUSER_ROLE.
     */
    function unpause() public onlyRole(PAUSER_ROLE) {
        _unpause();
    }

Recommendation

add whenNotPause modifier to core functions

AndreiMVP commented 4 weeks ago

Similar to https://github.com/hats-finance/Euro-Dollar-0xa4ccd3b6daa763f729ad59eae75f9cbff7baf2cd/issues/12