Oscar D Þorson 🇺🇦🇮🇱 Profile picture
Outside the metaverse also sometimes known as Stefan Loesch. Finance. Tech. Banking. Fintech. Blockchain. IDCAP & https://t.co/WrruLg4e2y.

Oct 2, 2021, 23 tweets

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

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling