OrderBook::cancelSellOrder
Normally a seller can cancel his sell order by calling the OrderBook::cancelSellOrder
function to make his request order inactive and get his assets back, But Mev bots can scan the cancel tx form the mempool and buy the assets by front-running cnacel tx , resulting the cancel tx reverting and order being sold even if seller does not want to sell it.
Likelihood:
Reason 1 : Whenever a seller calls the cancelSellOrder function and increase the price of the assests.
Impact:
Impact 1: Sellernot able to cancel the order and get his assets back
Impact 2:Order is sold , when seller no longer wants to sell his assets
MevBotAttack contract is made to simulate the bot front running the cancel txn request , it can be added within TestOrderBook.t.sol
file.
Test_MevAttackOnCancelSellOrder
can be added to existing suitcase in which alice creates the order, than goes to cancel it but mev bot scan the txn in mempool and front-run to buy the assets.
MevBotAttack Contract
Use safe rpc api endpoints like FlashBot rpc to make your transaction invisible from the mev bots.
When a seller wants to amend or cancel their sell orders, a malicious entity can front-run their transactions and buy out the orders. This can be especially harmful when real-world prices of listed assets fluctuate and sellers want to adjust the prices listed in their 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.