The calculateVeAmount function multiplies amount by lockDuration and then divides by 1461 days. However, in Solidity, division (/) always rounds down to the nearest whole number, which can cause a loss of precision.
Since Solidity does not support floating-point arithmetic, when `amount * lockDuration` is divided by `1461 days`, any fractional value will be **rounded down**. This rounding can result in incorrect calculation.
Users could receive less VeAmount than what they expected.
Manual review
To prevent precision loss, we should scale up calculations before performing division. This can be achieved by multiplying with 1e18 before dividing.
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.