Wobbly Umber Haddock
High
An attacker can frontrun Minter.initialize()
, give AMO_ROLE
to a contract they control, and mint unlimited BOOST tokens.
An attacker can frontrun Minter.initialize()
, give AMO_ROLE
to a contract they control, and mint unlimited BOOST tokens.
In Minter.sol:initialize()
, there is no access control on the function call, allowing anyone to call it first by frontrunning.
It gives the msg.sender the DEFAULT_ADMIN_ROLE
, granting them the ability to call AccessControlUpgradeable.grantRole()
and gives a contract they control the AMO_ROLE
needed to mint BOOST tokens with Minter.protocolMint()
.
- Either the
Minter
contract needs to be deployed but not yet initialized - Or the
Minter
contract needs to be deployed and initialized in 2 different transactions
No response
- Attacker monitors the mempool for the
initialize
transaction from the legitimate deployer. - Attacker frontruns this transaction with their own call to
initialize
, setting themselves as the admin. - Attacker grants a contract they control the
AMO_ROLE
to bypass theonlyContract
modifier. - Attacker calls
protocolMint
to mint unlimited BOOST tokens.
The BOOST token holders suffer a complete loss of token value due to unlimited minting. The attacker gains the ability to mint an unlimited amount of BOOST tokens, effectively controlling the entire token supply and rendering the token worthless.
No response
No response