In the _depositTokenWhenCreateTaker
function, there's an inconsistency in rounding that could lead to slightly incorrect deposit amounts. The getDepositAmount
function uses Math.Rounding.Ceil
, but additional fees are added without considering potential rounding errors.
This inconsistency could result in users paying slightly more than necessary for their deposits. Over time and with many transactions, this could lead to a small but unfair accumulation of excess funds in the contract.
Apply consistent rounding throughout the calculation:
Alternatively, consider using a more precise calculation method that minimizes rounding errors.
Duplicate of #456, however, for issues noting rounding directions, will be low severity given the impact is not proven sufficiently with a PoC/numerical example and most rounding will not result in significant losses e.g. most examples only proved at most a 1 wei difference when computing `depositAmount/platFormFees` and involves lower amount offers
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.