From f2116779ec93c2ca481f62bf16625f29bfcab5b8 Mon Sep 17 00:00:00 2001 From: "dr. mia von steinkirch, phd" <1130416+mvonsteinkirch@users.noreply.github.com> Date: Tue, 7 Feb 2023 19:47:06 -0800 Subject: [PATCH] Update just-in-time.md --- uniswap/uniswap-v3/just-in-time.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/uniswap/uniswap-v3/just-in-time.md b/uniswap/uniswap-v3/just-in-time.md index 694ec91..c4170bd 100644 --- a/uniswap/uniswap-v3/just-in-time.md +++ b/uniswap/uniswap-v3/just-in-time.md @@ -12,6 +12,21 @@ * because provision has **high costs**, it's usually only used against very large swaps (i.e., it's a non-atomic strategy). +
+ +### example cex + dex + +
+ +1. consider a JIT LP that has ETH and USDC both in a wallet and in a CEX. +2. when the LP observes a large ETH -> USDC swap in the mempool, they deploy a LP position on Uniswap, and at the same time submit an ETH buy order on the CEX. +3. after both trades, the LP has the same total amount of ETH and USDC as before. +4. assuming that the following holds, the LP are also profitable: + +``` + fees_DEX + price_impact_DEX > fees_CEX + price_impact_CEX +``` +