The unchecked return values from burnFrom and mint functions of the IERC20 contracts could lead to an inconsistent state within the contract.If these functions fail for any reason, the contract's state could become inconsistent, which could lead to incorrect accounting of user balances or even loss of funds
This could result in incorrect accounting of user balances or even loss of funds.
Manual Review
To address the identified issue, it is recommended to validate the return values of burnFrom
and mint
functions, ensuring their successful execution. In the event of failure, these functions will return false
, necessitating appropriate handling within your contract to avoid state inconsistency.
Furthermore, it is advisable to utilize OpenZeppelin's SafeERC20 library. This library offers secure versions of ERC20 operations, which throw an exception in case of an error. The functions would be referred to as safeBurnFrom
and safeMint
, replacing burnFrom
and mint
.
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.