There is a math problem in the contract, which was unchecked. It is about the denominator of the vesting factor - _factor.denominator
This vulnerability is in the mint function:
The user will have to set the fraction of their vestingFactorCache
. Due to naivety or any other reason, a user can set their denominator to 0.
In maths, every number with an undefined denominator is assumed to have a denominator of 1. For example, number 8
is simply the same as 8 / 1
.
But now 8 / 0
in the usual Base 10 will result in a total math error, and not even any number at all.
a user sets this _factor.numerator = 60 seconds; ````_factor.denominator = 0 days;
60 / 0
returns an error immediately
Equation is unsuccessful
Function fails
The equation will be unsuccessful and the math will fail!
Manual review.
Create a check that bounces the possibility of the denominator to being set at 0.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.