ERC20Burnable
token have burnFrom()
function. And the DecentralizedStableCoin
is ERC20Burnable
, and the mint() and burn() function have the onlyOwner modifier. Therefore, the DecentralizedStableCoin
should be designed so that it cannot be mint or burn by the user at will. But the burnFrom()
can be called directly by the user.So I think this violates the design principle, and this will affect the correctness of the s_DSCMinted
parameter
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Burnable.sol
As we can see , the ERC20Burnable.sol have the burnFrom()
And the mint() and burn() function have the onlyOwner modifier.
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DecentralizedStableCoin.sol#L39
I think this violates the design principle, and this will affect the correctness of the s_DSCMinted
parameter
vs code
Add onlyOwner modifier to burnFrom()
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.