# Latency Advantage in CEX-DEX Arbitrage by Akaki Mamageishvili | Devcon SEA

- Speakers: [Akaki Mamageishvili](https://streameth.org/speakers/akaki-mamageishvili)
- Channel: [Devcon](https://streameth.org/devcon)
- Date: 2025-10-07
- Duration: 09:23
- Watch: https://streameth.org/watch/yt-9r7hmxQ8DTA
- YouTube: https://www.youtube.com/watch?v=9r7hmxQ8DTA

## Description

We study the effects of having latency advantage in the CEX-DEX arbitrage in the first-come first-serve transaction ordering policies. We search for optimal strategies for a trader that owns such advantage. To find optimal strategies, we simulate price changes on CEX using real data and assume DEX price does not change in the latency advantage interval. We find that optimal strategy can even be to trade right away as soon as the price difference crosses a threshold where trading is profitable

Speaker(s): Akaki Mamageishvili
Skill level: Intermediate
Track: Cryptoeconomics
Keywords: Rollups, Economics, MEV, AMMs, programming, dynamic

Follow us: https://twitter.com/efdevcon, https://twitter.com/ethereum, https://warpcast.com/devcon
Learn more about devcon: https://www.devcon.org/
Learn more about ethereum: https://ethereum.org/ 

Visit the https://archive.devcon.org/ to gain access to the entire library of Devcon talks with the ease of filtering, playlists, personalized suggestions, decentralized access on Swarm, IPFS and more.

Devcon is the Ethereum conference for developers, researchers, thinkers, and makers. 
Devcon SEA was held in Bangkok, Thailand on Nov 12 - Nov 15, 2024.
Devcon is organized and presented by the Ethereum Foundation. To find out more, please visit https://ethereum.foundation/

## Transcript

[Music] [Music] hello everyone welcome to the presentation today I will talk about me capture Through Time Advantage Arbitrage so this is the title of the paper that we wrote together with at Fon Robin FR Maria Silva and beniamin Le sheets and this is different from the title in the of the session so take your time to take a picture or write it down it will be gone I cannot go really back so initially I submit it as a 20 minute uh presentation but it was demoted to 5 minutes so the only thing I can do is to motivate you to read the paper and I hope I can do that okay so main part motivation so we try to understand what time boost does to me and to give you very quick introduction in the time boost this is uh selling fast lane license that allows one player to have 200 millisecond advantage over all other players and this Advantage lasts only for one minute and after 1 minute there will be another auction then Advantage is of course assume achieved by delaying all the other transactions by other users and we want to understand the Arbitrage uh between automated market makers and outside markets so we have a lot of assumptions in order to derive our few the theoretical results and uh many simulation results so we assume that the uh in the outside markets uh fees are very low or let's say zero and the price Discovery happens on the external Market on the IMM that is on the chain it's only Arbitrage transactions of course there are some noise transactions as well but we assume that they can go into into both directions so they cancel the effects we also assume the efficient market assumption which is that the price depends only on the current so price change doesn't depend on the previous price changes so it's a pure random process which is of course not true in reality and we even observed on the data that it's not true uh so the model looks like this we have this one player that has this time Advantage during time t there are two assets one risky asset and the numer rare think of as ether risky asset and numer rare USD or the other way around the amm has a trading fee and the risky assets price changes on the outside market so initially we assume initially of the simulation we assume that they are the same the prices are the same and then once the Arbitrage opportunity arises on the outside market so price moves then arbitrager needs to decide when to capitalize on it and we assume that it has only time Advantage time so after this time passes uh opportunity will be taken away by other arbitragers and this is a conservative assumption for the uh Arbitrage value so this reduces to an optimization problem so we have time advantage arbitrager and we have three parameters that give a state what is the current price difference relative time so price difference how much time passed in this 200 millisecond and how much time passed in the total period of time and we need to decide between trading so taking the Arbitrage or waiting and the punchline here is that dynamic programming solved this problem and with then dynamic programming we simulated on the real data so we took uh let's say ethereum usdt Market on the binance and we step size 10 millisecond we have Advantage window 200 MC and total time 1 minute and we can calculate for each point internal Point uh uh we can calculate what is the optimal move and also what is the uh um average gains average Arbitrage value and we obtain the observation that waiting till the end of this uh Advantage time is mostly optimal but not always so there are some cases when it's not optimal so I will not give you any numbers uh because that's the only thing that people remember in the end how much uh money time boost makes with this assumptions but it gives some upper bound on this type of Arbitrage so centralized exchange decentralized exchange Arbitrage uh additionally to this we also look into opportunity to let the pool contract know about time boosted transactions which allows them to price such transactions differently and this introduces some interesting game between LPS and the time advantaged arbitrager and then we can calculate what will be the distribution of value between these two and other arbitragers so thank you for your attention happy to answer questions about this and the time boost in general thank you very much so raise your hand if you have any question y over there there first oops sorry a bit sorry do you think it's a good idea to use one minute uh allocations to arbitr is too long have you tried to do shorter simulation times I ask for because M multi Block M has has been a problem we don't stud very well so have you tried to simulate shorter so we in simulation of course you can simulate and get results what you get but um we thought that one minute is not very long because um if you make it uh yeah if you make it longer it's even worse from your perspective but if you make it uh short then we need to conduct this auction to frequently and that also has some cost so that was yeah this kind of tradeoff that we analyzed there's another question over there uh did you try this using real money and uh did you find anything interesting between real and the simulation so we didn't try real money but you are welcome to try uh we analyzed the back testing so this was data was Tak in in July but in principle you can forward test that too once once it's there but you can also forward without time boost deployed on arbitrum you can just assume that you have this advantage and you can then see how much you can make with the strategies that we suggest so answer is it's very easy to do but we didn't do it yeah hi um this is K and I'm not sure if covered it but uh was any differential gas uh price that uh was taken into consideration in your simulation so what differential I didn't get uh gas like Am gas fees for decentralized exchange decentralization yeah the gas Fe ah so gas Fe we assume to be um let's say sub Cent for the exchange so so we took realistic C fees and subtract it from the gains but they are very not substantial for for the results I see thank you uh there's one last question over there over there okay over there yeah sorry yeah um what what kind of inventory are is needed to actually pull this off in a relatively profitable manner I mean you need to have both assets on the chain and on the external uh exchange to like try this strategy yeah but I guess I'm just looking from like a like from a volume perspective of what they actually need like in your simulations was there a drop off point where let's say if they only had 100K versus 500k it's no longer profitable yeah actually sometimes you need very large inventory to realize very large price difference but we didn't go into this we assume that you always have enough but you are right that to take this um Advantage you can check numbers to take very large Advantage you need very large inventory as well so that was the last question thank you very much for your talk uh please give a nice round of
