In the _updateReferralBonus
function, there's an inconsistency in rounding between the bonus calculations and the remaining fee calculation. This could lead to small discrepancies in the final amounts.
Over time and with many transactions, this inconsistency could result in a small but persistent loss of platform fees. While each instance might be negligible, the cumulative effect could be significant.
Manual Review
Use consistent rounding throughout the calculation:
Alternatively, consider accumulating small rounding errors in a separate variable and redistributing them periodically to ensure no value is lost over time.
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.