If amount > balanceOf(from)
, it will revert.
Attackers could block burns by transferring tokens away just before execution.
function burn(address from, uint256 amount) external override onlyStabilityPool {
if (from == address(0))
revert InvalidAddress();
if (amount == 0)
revert InvalidAmount();
_burn(from, amount); }
Check if the user has enough tokens before burning.
Ensure burning is limited to actual balance.
function burn(address from, uint256 amount) external override onlyStabilityPool {
uint256 balance = balanceOf(from);
if (amount > balance) revert BurnAmountExceedsBalance();
_burn(from, amount); }
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.