Too Long; Didn't Read
The easiest way to avoid overflow and underflow in Solidity is to use at least a 0.8 version of the Solidity compiler. In Solidity 0.7, the compiler will automatically take care of checking for overflows and underflows. Let's create a simple smart contract called "ChangeBalancesol" The initial balance is 0.0. If you press the "decrease" button, then the "balance" is decremented by one. Let’s see what happened next and how it works in practice.