From d85f813a9daff4346854db4c68d8ba5a363f66e3 Mon Sep 17 00:00:00 2001 From: "steinkirch.eth, phd" <1130416+mvonsteinkirch@users.noreply.github.com> Date: Mon, 19 Jun 2023 09:19:01 -0700 Subject: [PATCH] add info on safemath --- advanced_expert/vulnerabilities/arithmetic_errors/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/advanced_expert/vulnerabilities/arithmetic_errors/README.md b/advanced_expert/vulnerabilities/arithmetic_errors/README.md index 470bcef..534b547 100644 --- a/advanced_expert/vulnerabilities/arithmetic_errors/README.md +++ b/advanced_expert/vulnerabilities/arithmetic_errors/README.md @@ -2,5 +2,7 @@
-* solidity < 0.8: integers in overflow / underflow without any errors. -* solidity >= 0.8: default behaviour of for overflow / underflow is to throw an error. +* defaults: + * solidity < 0.8: integers in overflow / underflow without any errors. + * solidity >= 0.8: default behaviour of for overflow / underflow is to throw an error. +* use **[SafeMath](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol)** to prevent arithmetic overflow and underflow.