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

1 stars 0 forks source link

Gas Optimization: Remove Overflow Check in Vether.sol Since Solidity 0.8.x Disallows Implicit Overflows #190

Open code423n4 opened 3 years ago

code423n4 commented 3 years ago

Handle

jvaqa

Vulnerability details

Proof of Concept

This check is unnecessary since Solidity 0.8.x prevents overflows: require(_balances[_to] + _value >= _balances[_to], 'Balance overflow');

Recommended Mitigation Steps

Remove the aforementioned line of code, since Vether.sol uses Solidity 0.8.x, so it will revert on an overflow anyways.