The _updateReferralBonus function exhibits rounding inconsistencies between bonus computations and the remaining fee calculations. This misalignment can lead to minor discrepancies in the final amounts.
Over time, these rounding discrepancies may cause a gradual but noticeable loss in platform fees. Although each individual instance may be minor, the aggregate effect could become substantial.
The following illustrates the rounding issue:
Link to code
Ensure consistent rounding across all related calculations:
Consider tracking and redistributing minor rounding discrepancies periodically to prevent cumulative losses.
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.