BeanstalkERC20 tokens can't be paused contrary to desired functionality as the ERC20Pausable contract is not inherited, and the pauser role is not granted.
From the contract description, the various characteristics of the token includes the ability for the holders to burn it, which is enforced by inheriting ERC20Burnable
, a minter role to mint the tokens, which is enforced by inheriting AccessControl
and granting the MINTER_ROLE
to the admin. And the pauser role that allows to stop token transfers. This role is intended to be granted to the admin also.
This role however is not granted, neither is the ERC20Pausable
contract inherited, so tokens cannot be paused and therole's functionality cannot be enforced.
/**
@dev {ERC20} token, including:
ability for holders to burn (destroy) their tokens
a minter role that allows for token minting (creation)
a pauser role that allows to stop all token transfers
..SKIP..The account that deploys the contract will be granted the minter and pauser
roles, as well as the default admin role, which will let it grant both minter
and pauser roles to other accounts.
*/
Incase of an emergency when the beanstalk tokens are to be paused, there's no pauser to pause it, neither can it be paused.
Manual Code Review
Inherit ERC20Pausable.sol
and declare a pauser role that can pause the tokens.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.