3

I built a system to monitor token prices on a given EVM blockchain. I monitor the token prices on several decentralized exchanges (DEX) by looking at the reserves of tokens for pairs of tokens.

To achieve that, I perform the following steps:

  • Track the "Sync" events on the pairs when a new block is mined
  • When a "Sync" event is detected on a pair, fetch the reserves for this pair
  • Look at all the pairs involving the same tokens (from other DEX)
  • Find gaps in prices
  • Compute an arbitrage

This process typically takes ~200 ms. This is kinda fast, considering there is some I/O involved. However while running this system, I noticed that profitable arbitrages (i.e: gain from arbitrage + gas fess > 0$) typically stay open for ~300 ms.

And I wonder: how is it possible to close an arbitrage that fast? Am I missing some piece of information?

I would like to know if "fast" arbitrage bots use a specific technique to detect arbitrage opportunities and perform transactions, or if they are just faster. For example:

  • Do they use the pending transactions to compute the pair reserves in advance to have a transaction ready earlier?
  • Is a smart contract trading on their behalf, or are the transactions computed by a machine and then sent to the blockchain?
  • Do they use flashbots to make their transactions faster?
2
  • 1
    Welcome to the world of MEV! You are a bit late to the game and by now arbitrage bots are extremely competitive. You will not get any useful answer here because those who know how to be fast will keep their knowledge a secret as to not have more competition.
    – Undead8
    Aug 1, 2022 at 18:19
  • hello bro.... do u solve he speed problem? please help. every time 4 or 5 arbitragers place order before me when i put order. Nov 14, 2023 at 15:10

1 Answer 1

0

Hello dear friend old post but let me give you my knowledge about this :

  • Scan on every new block the token price or LP token price from Dexes
  • If difference calcul it to avoid gas cost
  • Make bool
  • Execute arbitrage
  • Have Full node
  • Of course you can scan pending Tx to know the impact into the reserve etc ... ;)
  • Solidity is needed for best result ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.