Skip to content

Latest commit

 

History

History
18 lines (16 loc) · 1008 Bytes

Overflow-underflow protection.md

File metadata and controls

18 lines (16 loc) · 1008 Bytes

Having overflow/underflow vulnerabilities is very common for smart contracts. It is usually mitigated by using SafeMath or using solidity version ^0.8 (after solidity 0.8 arithmetical operations already have default overflow/underflow protection). In this code, many arithmetical operations are used without the ‘safe’ version. The reasoning behind it is that all the values are derived from the actual ETH values, so they can’t overflow.

Recommendation:

In our opinion, it is still safer to have these operations in a safe mode. So we recommend using SafeMath or solidity version ^0.8 compiler.


Slide Screenshot

014.jpg


Slide Text


References


Tags