Description
Within buyOrder
, the code:
Hence:
The buyer pays at least order.price + sellerFee
.
The seller receives (order.price - sellerFee)
— effectively 0.5% less than order.price
.
The owner receives fee
(which is 1% of order.price
).
The buyer is actually spending order.price + 0.5%
, but the total outflow is order.price - 0.5% (to the seller) + 1% (to the owner) = order.price + 0.5%
.
While this may be intended logic, it is somewhat unintuitive that the buyer pays an extra 0.5% beyond the listed price and that the seller receives 0.5% below the listed price. This effectively means:
Seller loses 0.5% from order.price
.
Buyer pays 0.5% more than order.price
.
Owner gains 1% of order.price
.
Impact
Possible confusion or user dissatisfaction if they do not fully understand that the cost to buy is price + 0.5%
and the seller sees 0.5% subtracted.
Root Cause
Fee distribution logic divides the 1% fee into “half from seller’s proceeds” and “half from buyer's extra payment.”
Recommendation
Make fee logic more explicit in code, documentation, or naming (e.g., rename variables to clarify that half is paid by the seller and half by the buyer).
If the goal is to have the seller pay 1% and the buyer pay exactly order.price
, the math needs to be adjusted accordingly. Decide on a simpler approach if needed:
Entire 1% fee from the seller’s proceeds, or
Entire 1% from the buyer (price + 1%),
Or keep the 50/50 logic but document it clearly.
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.