Open code423n4 opened 3 years ago
paulius.eth
Condition could be '>', not '>=' as there is no point in recalculating amount to the same value (waste of gas): if((totalSupply + amount) >= maxSupply){ amount = maxSupply - totalSupply; // Safety, can't mint above maxSupply }
https://github.com/vetherasset/vaderprotocol-contracts/commit/d177dabc0c9e3c56a0ce92413b90e49e8c8a8735
Handle
paulius.eth
Vulnerability details
Impact
Condition could be '>', not '>=' as there is no point in recalculating amount to the same value (waste of gas): if((totalSupply + amount) >= maxSupply){ amount = maxSupply - totalSupply; // Safety, can't mint above maxSupply }