Many function uses a ceiling (ceil) operation when calculating token transfers. This can result in rounding up the amount in the favour of user not in vault, allowing user to transfer fewer tokens than expected, potentially leading to an underpayment.
several calculations involve a ceil operation to determine the token amounts that need to be transferred. The ceil operation rounds up the result, which means that users might end up transferring fewer tokens than required by the original fractional calculation.
For instance, when computing the deposit amount is uses Math.Rounding.Ceil
, the result is rounded up to the nearest integer. As a result, the total tokens required for the transaction could be underestimated, allowing the user to transfer fewer tokens while still meeting the contract’s requirements.
This rounding issue can lead to the contract receiving fewer tokens than it should, which can result in underfunded deposits
Manual review.
Review the use of the ceil operation in the createTaker
and _depositTokenWhenCreateTaker
functions, Consider whether rounding up is necessary otherwise round-down .
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.