in TokenDivider::buyOrder
when a buyer wants to buy a sell order, he has to send the amount of Ether equal to the sell order price + protocol fees. The seller's fees are then subtracted from the order price. In the current implementation the fee
protocol fees and sellerFee
are calculated as follows:
Due to integer division truncation, orders priced below 200 wei result in zero seller fees and reduced protocol fees. This creates a loophole where sellers can split large orders into smaller ones (each <200 wei) to avoid paying fees entirely.
Additionally, the protocol fees can be bypassed too if the price of each order is below 100 wei.
Example Scenarios
Key Observation:
Splitting a 1500 wei order into ten 150 wei orders reduces total fees from 22 wei to 10 wei, costing the protocol 55% of its revenue.
Malicious users can bypass fees by splitting orders into amounts below 200 wei.
Manual Review
in TokenDivider::sellERC20
we can add a validation check for price
parameter to be more than 199 wei.
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.