Description: The buyOrder function completely removes the seller's order from the s_userToSellOrders array after a purchase, preventing partial order fulfillment and causing potential loss of market flexibility. This is a design flaw that could be considered a medium-severity issue, as it directly reduces the seller's market flexibility and control over their sell orders.
Impact:
Sellers cannot partially sell their listed tokens
Entire sell order is deleted after any purchase
Reduced control over token selling process
Potential economic loss for sellers
Proof of Concept:
Recommended Mitigation:
Implement partial order fulfillment
Reduce order amount instead of deleting entire order
Add logic to track and update remaining token amounts in sell orders
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.