Seller can front-run the buyer and call OrderBook::amendSellOrder
to reduce the amountToSell
value to 1 wei, which tends to zero and end up keeping their original assets while also making the user pay for the original amount of tokens.
Seller makes ~100% profit while buyer loses ~100% of value
Likelihood: High
Reason 1 Whenever buyer calls buyOrder
, seller can front-run to execute this exploit
Impact: Buyer essentially loses 100% of the assets they were transferring without receiving the source asset's original amount
Seller places an order to sell 1wBTC for 107,000USDC
Buyer calls buyOrder
, assuming he's going to get 1wBTC
Seller front-runs and calls amendSellOrder
, reduces the amountToSell
to 1 wei of wBTC
Seller ends up keeping almost 1wBTC and receives 107,000USDC
Buyer loses 107,000USDC for negligible amount of wBTC
Do not allow amount manipulation in amendSellOrder
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.