Even though the gas cost for comparison operations such as <= or != is the same, it is recommended to abstrain from the check for negative numbers in a uint type variable as they can never be less than zero.
Source: soliditylang
Unnecessary check for negative numbers in burn
and mint
functions of DecentralizedStableCoin.sol
.
Variable _amount
cannot be less than 0 because passing negative numbers to uint variables is not possible.
Manual Review
Replace _amount <= 0
with _amount == 0
in DecentralizedStableCoin.sol#L48
and DecentralizedStableCoin.sol#L61
.
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.