in DecentralizedStableCoin.sol the burn function using onlyOwner which means the protocol wants only the owner
to burn tokens, but ERC20Burnable.sol has burn
and burnFrom
, so the user can burn his or someone's else tokens.
user1 approve user2 to spend X amount could be any amount
user2 calls burnFrom
to burn all user1 tokens.
users tokens could be lost and collateral froze in the DSCEngine
Manual Review
overide burnFrom
and use onlyOwner modifier.
function burnFrom(address account, uint256 amount) public override onlyOwner {}
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.