code-423n4 / 2021-04-vader-findings

1 stars 0 forks source link

totalSupply + amount > maxSupply #299

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

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 }

0xBrian commented 3 years ago

https://github.com/vetherasset/vaderprotocol-contracts/commit/d177dabc0c9e3c56a0ce92413b90e49e8c8a8735