⚠️ Paper Alert ⚠️

Remember the Twitter argument between @danrobinson and @SBF_Alameda?

Recall how it hinged on logarithmic vs. linear utility functions?

Using optimal control, we show utilities are a red herring

joint w/ @alexhevans @GuilleAngeris

stanford.edu/~guillean/pape…
Flip the problem upside down: LP returns are a function of how close the weights w (@BalancerLabs portfolio weights) are to the 'optimum' weight w*

Arbitrageurs can be viewed as a stochastic control mechanism that moves w around w*

Can you control |w-w*| as a function of fees?
Trad. Optimal Control: Robot/program has 100% deterministic control over the intervention (e.g. moving robot arm)

LP vs. Arbs: Stochastic control plus fees add a wrinkle — the fee interval. Arbs can never exactly get to w* because of fees, yet Martin/Dave show LPs are still 🤑🤑
Instead of looking at profits as a function of fees, drift, vol, we look at weights (controlled by arbitrageurs)

This gives you a Bellman equation (like those in reinforcement learning!) that only depends on your utility function indirectly (via ϕ)

2-assets: Solved w/ Wronskian
This paper is short and sweet, but gets to the heart of the debate between Dan & SBF: Why does utility matter?

Results intimate:
- When weights are very volatility you prefer linear
- When weights are static, you prefer logarithmic

Volatile weights ~ MMs frequently quoting
In Uniswap, you can replicate the volatile weights by adding and removing liquidity around orders (like sandwich attacks), which is _effectively_ the same as quoting a price schedule in an order book

c.f. @ProfessorJEY's nice little note

professorjey.com/assets/papers/…
By the way, @MartinTassy's discovery of the '0 fee phase transition' looks a lot more like conventional transitions in 1-dimension from the optimal control lens

This paper shows that it is more of a 2nd order transition than a 1st order one for @BalancerLabs/@UniswapProtocol
Timeline 🕰️

October: @alexhevans had a genius idea of viewing LP returns from the perspective of a stochastic process on weights

November: @MartinTassy / @_Dave__White_ result out, we were confused as to why the proof was so specific to Uniswap
December: Rough proof that the zero-fee phase transition from Martin/Dave is real, but is better viewed via the control theory lens

January: Rewrite proof in Reinforcement Learning language — describe Bellman equation for LP returns w/ fees
tl;dr: Given the immense interest in optimal control in DeFi, we found a way to rephrase the 'do you need fees? how much?' problem for AMMs in terms of a RL-like Bellman equation

Perhaps some of the predictions @htkao and I made will come true medium.com/gauntlet-netwo…
*very volatile

• • •

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

Keep Current with Tarun Chitra

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!

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 @tarunchitra

30 Nov 20
⚠️ Γ Alert ⚠️

What does part of Paul Milgrom's 2020 Nobel Memorial Prize have to do with 🦍-ing into pool 2?

2nd part of our series on CFMM shape looks at:

💹 How do you compare LP return from different pools?
🤼 Quantifying adverse selection in CFMMs

medium.com/gauntlet-netwo…
Post 1 tl;dr: Curvature controls pool price stability

Post 2: Curvature *directly* controls:
- LP profits when asset pairs are mean reverting
- ∃ a magic formula relating LP profit to adverse selection (probability α of LP realizing IL), curvature, and fees for *any* CFMM!
These results generalize Glosten & Milgrom (1984), Kyle (1985) to arbitrary CFMMs

This seminal work shows the shape of the order book represents the amount of adverse selection a market maker feels, leading to strategies where they remove liquidity to avoid adverse selection
Read 12 tweets
24 Nov 20
What does Gauss's Theorema Egregium (1827) have to do with getting rug pulled in Uniswap?

This post (1 out of 3) introduces (only w/ pictures!) new work on understanding constant function MMs (CFMMs) as the primary market for an asset

Part I: Curvature

link.medium.com/RVPG7R85Fbb
Why curvature?

@CurveFinance made it clear that some assets perform better on 'flatter' CFMMs and others on 'sharper' CFMMs

But what does it mean to be 'better'?

Our paper studies what happens when traders arbitrage btw. two CFMMs and look at the max their prices differ by
When we dug into this a little more, it became clear that Gaussian curvature controls a lot of facets of CFMMs:

1. Price synchronization between two CFMMs
2. Adverse Selection for LP returns
3. Price stability
4. Optimal incentives for yield farming
Read 7 tweets
2 Nov 20
As much as I love the Penrose tiling and long-range order (I used to do glass research!), this seems like a terrible idea

1. Diverge correlation times/lengths means time to verify of a single transaction’s validity could take way longer than block propagation

😬😬😬
2. If you want to anonymize a transaction graph by using a lattice with dense spectra (like the Penrose tiling) to define a DAG, note that you aren’t guaranteed that there isn’t *any* local structure that an adversary can find — only that no tx ordering will be unique
2. (cont.) It is possible that prefixes of tx ordering overlap an arbitrary amount, so there isn’t as much transaction ordering entropy as there is from cryptographic graph traversals (e.g. expander graph walks in supersingular isogeny signatures, lattice based crypto)
Read 5 tweets
2 Nov 20
Alpha leak: Adverse selection in Uniswap

This beautifully simple paper proves what @theyisun and I called the “noise trader conjecture”:

Strategic LP strategies only profitable if fees are high enough, ∃ many noise traders, and low signal information

papers.ssrn.com/sol3/papers.cf…
This effectively looks at a mean-field, agent-based model of:
1. Noise traders
2. Informed traders
3. Strategic LPs

It shows that as the # of LPs goes to ♾, ∃ a sharp phase transition in LP profits as a function of the number of informed traders (defined via simple signals)
There’s also a kind of curious stability result that is vaguely reminiscent of “rugpull” dynamics: there’s only a stable equilibrium when there are < 4 LPs, if there’s more you have sharp edge equilibria that you can oscillate between (akin to the “last LP holds the bag”)
Read 4 tweets
11 Sep 20
The VC vs. trader “war” of crypto is reminiscent of the previous talent “war” between HFT and online ads: All of these boil down to latency vs. bandwidth trade-offs where "event-driven" investing depends on the condition number of a participants' value function
Trader: need max and min eigenval. of value fn. to be "close" (low condition number) because of regret minimization between your worst and best case outcomes

If your value function is smooth, this gives uniform bounds on the max/min eigenval. of hessian of your val. function
VC: need max eigenval. of value function to optimized

Things like the Tracy-Widom law force you to chase fat tails, terrible Sharpe, and anomalous portfolio construction
Read 8 tweets
30 Aug 20
The number of traditional finance chads (e.g. @arbitragegoth) asking me questions about DeFi LP staking is 📈📈 📈

Here's what it is:
1. @synthetix_io / @kaiynne pioneered paying users for liquidity by staking CFMM LP shares
2. CFMM LP shares replicate options portfolios

👇🏾
∴ LP staking is equivalent to collateralizing a leg of an interest rate swap with future expected cash flows from an options portfolio

This is actually *really* hard to execute in normal finance — especially because the CFMM replication is a continuous combination of strikes
Traditional finance has focused on swaps as
a. In-kind (e.g. interest for interest)
b. Purely Synthetic (e.g. variance swaps, VIX)

DeFi let's you combine the two — in-kind on one side in exchange for synthetic on the other

Impossible to do this without non-custodial assets!
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

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!

Follow Us on Twitter!