Trade Delay Mechanism

How does the trade delay mechanism work exactly?

  • Every 5 minutes, we obtain a new price reference based on Uniswap's 5-min TWAP oracle.
    • For example, at T+5m, the price reference is the average uniswap price from T to T+5m.
    • Then at T+10m, the price reference is updated to the average uniswap price from T+5m to T+10m.
    • etc.
  • When a new order comes in, say, at T+3m, it will not be eligible for execution until T+8m. This is the 5-min waiting period.
  • At T+8m, the order becomes eligible for execution. A keeper bot will send an "execute" tx every 5 seconds to clear up all orders that newly became eligible for execution.
  • If the "execute" tx is mined at T+9m, then you order will be executed with the T+5m reference price (T+5m reference price is an average of the Uniswap price between T and T+5m).
    • If the "execute" tx is mined at T+12m, then you order will be executed with the T+10m reference price (T+10m reference price is an average of the Uniswap price between T+5m and T+10m).
  • Price Impact: If there are multiple orders in this execution batch, their sequence in the queue will be kept. The total slippage of the entire batch is as if all the orders are combined into one big order. But because the sequence is kept, earlier orders to have less slippage. The amount of slippage is determined by the AMM curve, which is set to MAX(3x Binance orderbook liquidity, 1x Uniswap).
Designed by rohitkashyap (Integral's Hero)

Why do we need a trade delay?

Although the trade delay is a slightly negative user experience for traders, it is implemented because it is a crucial way to protect LPs.
LPs incur sure losses when sure-profit traders (arbitrageurs, front-running, etc.) are able to trade on Integral.
But with our trade delay mechanism, they can't be certain that they will make sure profits anymore, so they will trade somewhere else.
They can't be sure of the profits because they have to wait 5 minutes, and their 5-min price prediction will carry substantial risk (as former top quants, we know for sure that nobody in the world can continually make 5-min predictions with more than 70% certainty). There is a huge risk to price prediction, so their rational choice is go to some other exchanges to execute their near 100% sure-profit trades, instead of taking their, at best, 70% chances with us.
For a more detailed explanation, you can check our our "Trade Deferral" note.
Last modified 8mo ago