Hello!
I had some questions about how to avoid these cases. I read in some places that adding overflow-checks=true was enough.
In other places I read that .checked_add(), checked_sub, .checked_div and .checked_mul was needed.
So I created a repo in order to experiment all these combinations.
You can check it out here: https://github.com/esteblock/overflow-soroban
My findings?
Even without any of the techniques above (so just +, - *, /), the contract went to panic for the undesired cases. Why? I don't know. What extra security provide the overflow-checks=true, .checked_add(), checked_sub, .checked_div and .checked_mul? Don't know
Does anyone know? Thanks!