Oscar D Þorson 🇺🇦🇮🇱 Profile picture
Oct 2, 2021 23 tweets 9 min read Read on X
Continuing from yesterday’s thread on Impermanent Loss, and in particular IL for leveraged AMMs

as a recap, the Uniswap v3 style levered AMM is using the regular k=x*y curve, but it restricts it to a particular range
restricting it to a specific range a priori significantly reduces IL, eg to about 2pc for a 60…140 range.

However, this effect is undone by removing collateral that can’t be traded out of the AMM and IL is percentage of levered liquidity is high.
One hallmark of a traditional AMM is that the dollar value of the two constituent assets is always equal.

For the levered AMM this no longer holds: the more prices go towards one of the boundaries, the more it is invested in the falling asset.

At the boundary it is 100pc.
This introduces a complication when we are outside the band. Shall we include this in the definition of IL?

Pro. Those further losses can be substantial when the asset falls further

Con. The position no longer earns fees, so any fee / IL ratio is weird
Ultimately we decided to only count the IL WITHIN the band because

a/ this is consistent with the fee-earning scenario, and

b/ ultimately LPs could just withdraw so maybe they like the position
But it is worth pointing out that providing levered liquidity does catapult LPs into a position where they go full in on the (relatively) falling asset; if they don’t like this they need to actively do something, so they need to pay attention
more generally LPing on Uniswap v3 requires even more confidence in BOTH assets of the underlying pool; if they diverge, the portfolio always tracks the UNDERPERFORMING of the two assets
that’s like a worst-of-2 basket option which again shows how closely related AMMs are to options and other financial derivatives.

I wrote about it here drive.google.com/file/d/1en044m…
the second problem when looking specifically at Uniswap IL is that positions can be amended (add or remove liquidity); that’s a mess because

a/ it happens at different ratios (what is HODL reference for IL?)

b/ what do you assume what happens with the withdrawals
we decided (and a big ht to @MBRichardson87 here) that we split positions every time someone adds or removes liquidity.

In other words: an position that did

open
add
withdraw some
add
withdraw all

would be considered 4 different positions
I should probably point out that this still does not solve all problems — there is no way to aggregate those 4 IL figures into a single one without reference to a specific numeraire such as USD — but that’s a bit hard to discuss on Twitter. It’ll be in the paper though.
nice analysis from @guil_lambert showing again the similarity between AMMs and derivatives lambert-guillaume.medium.com/understanding-…
no idea why I put the charts twice there. anyway, so I’ve got my ipad & pen I had left in the office on Friday so stay put for some markups
here we see the three areas: in-range, out left, out right. I used ETHUSD as example with USD as numeraire to make it more concrete
on the left (ETH downside) the position is 100% ETH, and the formula shown is normalised to 1 unit of the risk asset, ie 1 ETH
on the right, ETH upside, the portfolio is 100% USD. The exchange ratio used is the (geometric) middle of the range.
that geometric middle thing is easy to understand by the way: within the range, Uniswap v3 operates like any traditional AMM. And as discussed eg in our paper, AMMs always transact at the geomtric average before/after (and therefore miss out on Gamma). drive.google.com/file/d/1en044m…
so now the grand finale of this thread: a comparison between the most important AMM protocols

- traditional AMM (Uniswap v2, Bancor v1 etc)
- Uniswap v3
- Curve
- Bancor v2
so here we go: Uniswap and Curve are in red. I am slightly simplifying here because a/ the curves are slightly different, and b/ the Curve curve is shifted, but close emough
the green one on the left is Bancor which allows single asset staking, so f(x) = x (technically there is also f(x)=const but that one is boring
Finally the blue one in the middle is Uni v2 and other traditional AMMs which is in between Uni v3 and Bancor on the upside:

- Uniswap v3 has no upside participation
- Uniswap v2 has some upside participation
- Bancor has full upside participation
On the downside the picture is slightly different

- Both Uniswap v3 and Bancor have full downside participation
- Uniswap v2 and other traditional AMMs ultimately have full downside participation, but behave nicer on the way there

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Oscar D Þorson 🇺🇦🇮🇱

Oscar D Þorson 🇺🇦🇮🇱 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @odtorson

Mar 20, 2023
So after the short commute related interruption let’s get to the meat of the story: how come you can write down AT1 without writing down equity and what does it have to do with the GFC
the pre-history of hybrid capital, its relation to Basel, and the issues of T2 capital experienced in the GFC are here
So the T2 issue was they it did not work without letting the institutions default; people were thinking of scrapping T2 altogether but this would have either meant lowering capital requirements or raising even more massive amounts of equity, none of which sounded nice
Read 32 tweets
Mar 20, 2023
A brief history of Cocos and other AT1 instruments — and how come you can write them down when there is still equity left?
the short answer first: the pecking order most people are thinking of establishes the GONE concern (bankruptcy) waterfall; we are talking about GOING concern events here so they don’t have to be the same
Tier 1 and Tier 2 capital instruments were established under Basel 1 when many banks had to shore up their capital position dramatically. The infamous 8pc was actually 4pc Tier 1 and 4pc Tier 2
Read 13 tweets
Dec 19, 2022
Why AMM Gamma is different from derivatives Gamma

medium.com/@odtorson/why-…
In this article I am looking at the difference in Gamma bleed (or Gamma income) from AMMs and from Black-Scholes-Merton style hedging
As a reminder: when hedging an option, the hedge portfolio is linear (cash+risk asset) and therefore matches the level and slope of the payoff profile; the residual is therefore quadratic

Here we hedge around x=1
Read 12 tweets
Dec 17, 2022
Here a meta-thread, pulling all the AMM Triangle threads together Image
1/ The original thread, introducing the AMM Triangle
2/ The relationship between the AMM Triangle, IL, and LVR
Read 6 tweets
Dec 17, 2022
What we all got wrong about calculating Impermanent Loss

link.medium.com/SWtnmtlzPvb
Essentially, the current definition of IL is this one, and it is impermanent in the sense that it vanishes at xi=1, ie when prices return to their initial value Image
The key operational points are here
1. the AMM portfolio is alway 50/50 in each token
2. the AMM portfolio value is sqrt(xi)

Note that (1) is equivalent to (2) -- (1) is the delta hedging "replicating portfolio" of the square root profile (2) Image
Read 7 tweets
Dec 13, 2022
I wrote a little note on liquidity providers, options and AMMs, following up on today's discussion with @guil_lambert and @MBRichardson87

medium.com/@odtorson/liqu…
It has no real conclusion yet, but I wanted to introduce that AMM Triangle which I feel can become important to understand how to replicate options with AMMs
TLDR:
- liquidity provider: long fees, short options (aka IL)
- arbitrageur: short fees, long Gamma
- option trader: long option, short Gamma
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(