← Back to Course

Lesson 27: Time to overflow for compounding values

Practice Questions

Question 1: An earnings tracker compounds at 1% per year. It is held in a `uint96`. The value starts at 1e18. In how many years will it overflow?

Question 2: An earnings tracker compounds at 0.3% per year. It is held in a `uint48`. The value starts at 10000. In how many years will it overflow?

Question 3: An earnings tracker compounds at 100% per year. It is held in a `uint128`. The value starts at 1e18. In how many years will it overflow?

Question 4: An earnings tracker compounds at 1000% per year. It is held in a `uint128`. The value starts at 1e18. In how many years will it overflow?

Question 5: An earnings tracker compounds at 10000% per year. It is held in a `uint256`. The value starts at 1e18. In how many years will it overflow?