The burn
method in DecentralizedStableCoin contract reads the user's balance from the storage and reverts with custom error if the amount of DSC to burn exceeds it.
This check is already being performed in the _burn
method of ERC20 contract. The method can therefore be simplified for gas savings:
The custom error DecentralizedStableCoin__BurnAmountExceedsBalance
can be removed.
n/a
Unnecessary gas consumption
Manual review
Please consider removing redundant lines of code as suggested in summary.
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.