_mintThe mint function should increase the total supply and the beneficiary's balance, reverting if either overflows.
The _mint function uses assembly to add the minted value to both totalSupply and the account balance without checking for overflow.
Likelihood:
Medium // Requires the ability to mint tokens (often restricted to an owner/minter role, but critical if the minter is malicious or compromised, or if minting is public).
Impact:
High // totalSupply can be manipulated to wrap around to 0, completely breaking the token's economic model.
High // An attacker can mint an infinite amount of tokens to themselves by wrapping their balance.
Similar to the transfer function, we must check for overflows when increasing both the totalSupply and the user's balance. If either addition results in a value smaller than the original, an overflow has occurred, and we must revert.
missing checks for overflow and underflow.
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.