Learn attack vectors and explore H/M severity issues. Over/Underflow

Bloqarl
Coinmonks

--

If you can’t read this article because of the firewall, go here to read it for free!

In this article, I have gathered an explanation for a very popular vulnerability in Solidity, a few high and medium issues that are not a one-time thing but that you will potentially find in other protocols during your next audits.

And I am adding an exercise to practice what you have learned.

This is part of a series of articles where I am going to go through some of the most popular attack vectors.

Content

  • Description
  • Types of high issues
  • Types of medium issues
  • Your time to practice

Description

In solidity you’re going to mainly see used uint data types instead of int like in many other programming languages.

What does that imply?

That, as you see in the picture above, when you have a variable of type uint8, means that its maximum value is 2⁸-1, or 255.

And if you add 1 to 255, is not going to be 256 but 0. And that is what it’s known as overflow.

--

--

No responses yet