Description
The variables fee and sellerFee are calculated using division, which may lead to truncation issues.
Impact
If truncation happens when calculating the sellerFee, the protocol will be losing money.
Proof of Concepts
A seller creates a sellOrder with 0 wei < price < 200 wei.
A user buys the order
Both fee and sellerFee get truncated, resulting in a value of zero
Foundry, Manual analysis
Recommended mitigation
Add the following code to the contract, in order to ensure that protocol receives ceil(sellerFee) and doesn't lose any ETH:
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.