We first show how to compare Loan-to-Value (LTV) / collateral factors between borrowing A with B as a collateral vs. borrowing A against an A/B LP pool share
Turns out, with dynamically adjusted LTVs you can make LP share lending *more* safe than lending of the underlying
👉🏾 Lending + CFMM protocols like @SushiSwap’s Kashi can provide way better efficiency if they dynamically adjust LTVs in response to price changes and fee accruals
I found this insanely counterintuitive until I wrote the equations — LP shares can be amazing collateral w/ care
Another cool thing: we describe generalized LTVs which show that traditional lending in Aave/Compound can be viewed as a subset of CFMM lending
This suggests that the space of structured products spanned by borrowing against CFMMs is quite massive — does it include all payoffs?
We generalize our previous result on replicating market makers and show that *any* bounded convex payoff can be replicated by borrowing against an LP share with a particular curve
The precise bound depends on the choice generalized LTV — important for @AlphaFinanceLab users
Why? Effectively the convexity of their exposure is determined by the LP share value function except when they’re close to liquidation (Gamma violently changes sign near liquidation) — we quantify the amount this happens for generic portfolio value functions which keeps you safe
But what’s the risk held by these CFMM lenders?
While you need to do more in-depth fee & slippage simulation analysis for a true assessment (see: @gauntletnetwork), we describe an idealized, no-arbitrage way to hedge the risk held by a CFMM lender using barrier/exotic options
What does this mean?
Each loan that a lending protocol issues is *almost* a covered call exposure: 1. Holds collateral 2. Sold options to the borrower to repurchase collateral 3. Sold options to the liquidator for buy defaulted loans
But it’s not *quite* a covered call
Why? 1. @AaveAave and @compoundfinance define liquidatable and default states which are triggered when the price touches a certain limit (vanilla call options don’t do this)
2. Liquidators get paid an incentive — their execution price is different than that of a call
So what can we do?
In 2011, @arbitragegoth taught me about the *dirtiest* sounding product in FX finance: “one-touch digital options”
These are binary options triggered by the price touching a particular level — which is exactly the type of option a borrower in a protocol has!
One-touches are notoriously hard to price — they are path-dependent, making normal stochastic calculus methods hard to use
Luckily, Carr and El Karoui invented some tricks — namely Put-Call symmetry — to price these options
Also change of numéraire (Shreve II, Ch9) is used
What’s the upshot of such a hedge? 1. Represent protocol exposure as basket of options 2. Protocol can dynamically buy portfolio insurance to cover/hedge these risks
Insurance funds like @AaveAave safety module and @compoundfinance staking chain are DeFi’s first attempts at (2)
Can we do better than this when protecting users and protocols in DeFi?
Yes! But more on that in the coming weeks 🔮🔮🔮
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Wow, y'all really aped into this paper, thanks for all the memes (@0xtuba) & thoughtful comments
I figured I'd go a little deeper into the connection between lending protocols and options selling but first, don't forget to follow @htkao, @GuilleAngeris, and @alexhevans ☺️
As @cuckqueeen points out, numerical methods for simulating barrier options are hard to execute correctly (one of the reasons we run all such simulations @gauntletnetwork against the contract execution state in EVM, otherwise you will mess up liq barrier)
The paper explicitly connects the option that a liquidator holds to a down-and-in knock-in option
- a: liquidation incentive
- l: ratio of liq threshold to LTV
- p(t0): loan entry price
But you might be asking: how the hell did we get an exact, analytical formula for this?
One thing I will say is that most of the fair methodologies have a downsides themselves: 1. Added latency 2. Lack of guarantees about economic price ordering 3. Extremely unproven in production (similar to ZKPs in 2012)
Theoretical (@vegaprotocol’s Wendy) and practical protocols (@valardragon) add a >= 1 block commit-reveal from validators OR added rounds of BFT-style message passing. Griefing vectors (DDoS-esque) are abundant + provable models have weak synchrony guarantees
Recent papers from @algo_class and Joachim Neu show lower bounds on these latencies and it is very unclear if the practical implementations even come close to saturating these bounds (Kelkar, et. al get to weaker bounds in their paper)
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 🤑🤑
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
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)