Precision loss in buyOrder
can lead to decrease in expected protocol fees
While calculating protocol fees in buyOrder
, there is risk of precision loss as solidity does not account for decimals with integers. As such an attacker could batch their transaction to maximize their returns and minimize the fees received by the protocol
Likelihood:
Reason 1: Whenever the result of calculating the protocolFee
gives a floating number
Impact:
Impact 1: This would cause a significant difference in expected protocol fees and actual fees received by the protocol
The protocolFee
is found to be 0
instead of the expected 0.99
Consider higher precison factor while calculating the protocol fee
Protocol Suffers Potential Revenue Leakage due to Precision Loss in Fee Calculation
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.