Order being active during amendSellOrder
poses risk of frontrunning
When the price of a token increases and a seller wants to amend the order price to match the new price of the token, an attacker sees the transaction in the mempool and front runs is, buying the order at the stale price before the amendSellOrder
transaction goes through
Describe the normal behavior in one or more sentences
A seller should be able to change the price of tokens for sale without risk of the tokens getting sold while waiting for the amend transaction to go through
Explain the specific issue or problem in one or more sentences
Because the state of the order is active, order.isActive
throughout the amendSellOrder
transaction, there's is risk of front-running by an attacker who sees the amend transaction in the mempool before it goes through
Likelihood: Medium
Reason 1: When there's a an increase in price of a token and a seller wants to amend the price to match the current price action
Impact: The seller risk selling their orders at prices lower down they desire
The sell order should be rendered inactive during amendment and back to active when the amendment is done
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.