Description: when a buyer calls the buyOrder
function,
it is possible for the order creator to front-run the transaction by editing the order to give less tokens.
This can lead to the buyer receiving fewer tokens than expected, resulting in a loss of funds.
Impact: Buyer may receive fewer tokens than intended, leading to financial loss.
Proof of Concept: add the following test to TestOrderBook.t.sol
:
Recommended Mitigation:
can add a parameter amount
and price
to the buyOrder
function to ensure the order is not modified
A malicious seller can front-run a buy order for their order, and decrease the amount of assets to be sold. If the price is unchanged, the buy transaction fulfills, but the buyer gets lesser amount than expected.
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.