My Authors
Read all threads
2020: Cambrian explosion in automated market makers — @UniswapExchange, @BalancerLabs, @ShellProtocol, @CurveFinance, ...

A question:

Is there a framework to understand why so many constant function market makers (CFMMs) work IRL?

Yes! Thread 👇🏾

arxiv.org/abs/2003.10001
First of all: Why are there so many different CFMM constructions?

IMO: CFMMs exist to automate ETF underwriting (e.g. @blackrock's ETF division):
- 'create' basket of synth. assets
- 'redeem' same basket

CFMM curve: redistributes rev. to traders, LPs, underwriters (devs!)
What are the advantages to doing this on-chain?

1. Arbitrary decimation: Don't need to redeem integer share quantities [no ILPs, no rounding errors!]

2. Underwriter fees are transparent: @UniswapExchange's sustainability fees are 100x smaller than Blackrock for the same service
3. Flash Loans: You can create/redeem ETF portfolios _as needed_ and fund them with a flash loan that only executes if the portfolio is profitable

This last condition is crucial and unique to cryptocurrencies: You can use halting/reversion of code to *enforce* no-arbitrage!
So, you might ask: no-arbitrage seems to be fundamental — how do CFMMs guarantee that no-arb holds?

In our first paper, @GuilleAngeris, @_charlienoyes, @htkao, @ChiangRei, and I show that no-arb holds if Uniswap is being arb'd as a price oracle. This paper generalizes that!
Why do we need these generalizations?

1. Multiple components: ETFs have N assets you, in theory, should be able to trade any of the pairs of assets to arb the delta between an ETF and it's NAV

2. Bonding curves adjust for volatility: e.g. @CurveFinance and @ShellProtocol
The natural mathematical framework to encapsulate all of the known generalizations is convex analysis.

Why? As we show in the paper, this is a necessary condition for no arbitrage in the n asset to m asset generalization of Uniswap

But what else do we learn from convexity?
Given the close ties between microeconomic trading and convex analysis, @GuilleAngeris and I looked into how convexity plays a starring role in all known CFMMs.

Convexity provides three things:
1. Easy to arbitrage
2. LP returns are computable
3. You _don't require path indep._
A curious thing we discovered: if you try to compare CFMMs to other scoring rules (go read @algo_class's book!) such as LMSRs (used in @gnosisPM and @AugurProject), we find that the required property of 'path independence' is *not* essential!

This is counterintuitive, FYI.
In particular, path independence — breaking splitting a trade into two trades is the same price — is actually *bad* for being a price oracle.

We show that being path deficient — it is more expensive to split trades — makes it *easier* for arbitrageurs to...
... synchronize prices between centralized exchanges and a CFMM — you just trade the largest size possible and it'll be optimal.

A cool result from this: We show that LP returns are related to the Fenchel dual function of the bonding curve!
If you've studied microeconomic theory, this should be striking — this type of duality between 'optimal portfolio and price' shows up often!

@GuilleAngeris and I will be giving some video lectures on 'Convex Analysis and DeFi' soon 😎

[Right, @tzhen?]

homepages.wmich.edu/~zhu/papers/CD…
P.S. We have some secret goodies in this paper about how to optimally choose fees

tl;dr: Unfortunately, you'll need to do it numerically (no closed form)
Missing some Tweet in this thread? You can try to force a refresh.

Enjoying this thread?

Keep Current with Tarun Chitra

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!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


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

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

Become Premium

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

Donate via Paypal Become our Patreon

Thank you for your support!