, 33 tweets, 37 min read
My Authors
Read all threads
For those of you who were annoyed at having to read the Staking vs. Lending paper on DocSend — it is finally on @arxiv!

I'm excited to present it at SBC 2020!

In the spirit of @vgr:
1 like == 1 🥵🔥🌶 take about DeFi and security

arxiv.org/abs/2001.00919
@arxiv @vgr 1. On-Chain lending, by allowing for programmatic loans to instantly pass underwriting and settlement, tend to compete with their underlying security chain, as capital flies to the best combination of yields and security

@surja795
2. Staking derivatives (such as proposals from @sunnya97) and on-chain lending are very similar in spirit, but have very different pricing / volatility mechanics. This means that they could combine in a _cancellative_ fashion to preserve PoS network security

@camlCaseTech
3. DeFi on Layer 2 will be less likely to cause bank runs, as channel close/open fees should go up proportional to the total loan size versus main-chain DeFi requiring a single txn (or meta-txn) for arbitrarily large loan size

@AlokVasudev
4. Composability in DeFi leads to unclear exposures (e.g. SNX/MKR manipulation on 12/25/19) make it hard for participants to price their portfolios. One can synthetically perform oracle manipulation via other contracts (e.g. modify UNI price -> affect SNX mark)

@teo_leibowitz
5. PoS systems, unlike PoW systems, force users to view their assets as a portfolio with constantly rebalancing opportunity costs. PoW with liquid hash power derivatives will have this property, but so far this hasn't been super liquid (c.f. @tzhen)

@UthsavC
6. Strictly speaking, DeFi claims on PoS vs. PoW are not equivalent as bearer liens. This is because without finality / BFT, the liens have a strictly greater expected time of coexisiting on two forks (c.f. @dmoroz's work on @tezos forks and longest-chain PoS)

@tzhen
7. In a world with no slashing, there is still a raison d'être for professionalized validator pools that is the same at with mining: income smoothing. Since we have, to first order, Var[Returns] ~ (stake %)^2 / EpochLength, delegates prefer to delegate to bigger pools

@matts783
8. DeFi contracts and Child-Pays-For-Parent are incentive incompatible as this front-running across blocks is way easier (asymptotically cheaper). You can place transactions with no intention to fill and cancel w/ child chains (akin to @CFTC's def. of spoofing)

@JeremyRubin
9. Hybrid PoW/PoS systems (e.g. Decred) are unlikely to be able to get around the capital flight issues of staking until some critical threshold that is at least >2/3

@Leorzhang
10. An impossibility theorem to prove (maybe @nmushegian's grant money can go towards this 🙃):

Cross-Chain Swaps (cc @_prestwich) require collateral qties on both chain >= (1+ϵ) * min(colA, colB), where colX is collat. X's value in a numéraire to inherit security

@niraj
11. Extending this to a PTAS-like conjecture (for @_prestwich, really!):

CC Swaps can inherit δ * MEV if the collateral value >= (1+sqrt(δ) * min(expected block time)) * min(colA, colB)

@jubos
12. Cross-Shard DeFi front-running is going to be fun 😈 Validators can route cross-shard txns in a way to make front-running hard to decipher. This will also be true in L2

@badcryptobitch
@badcryptobitch 13. Routing attacks on Layer 2 will basically reinvent a lot of HFT-style arbs in which ephemeral nodes join the network, open, and close channel to spoof demand. These strategies are hard to prevent in hub-and-spoke topologies, easier in random graphs (or Kautz graphs)

@hasufl
@badcryptobitch @hasufl 14. Impossibility theorem #2 (@nmushegian might find this one more interesting)

Let 𝛾(duration) be the yield curve for an uncollat. algorithmic stablecoin (e.g. @basisprotocol, @CeloHQ w/o the crypto reserve).

Claim: With probability one, Var[𝛾(d)] = ∞

@mstrakastrak
@badcryptobitch @hasufl @nmushegian @basisprotocol @CeloHQ @mstrakastrak 15. Uniswap Theorem: There exists a function space, contained within a Sobolev space, that defines the set of *all* admissible (admit no-arb equilibrium) automated market makers (e.g. @UniswapExchange / @BalancerLabs). Oh wait, @GuilleAngeris might be doing this 😈

@valardragon
@badcryptobitch @hasufl @nmushegian @basisprotocol @CeloHQ @mstrakastrak @UniswapExchange @BalancerLabs @GuilleAngeris @valardragon 16. Second price auctions (or kth price uniform auctions) will not improve front-running in DeFi. Part of this is c.f. @phildaian's Devcon V talk and part of this is because sharded mempools will have more complicated keys than (gas, timestamp)

@zmanian
@badcryptobitch @hasufl @nmushegian @basisprotocol @CeloHQ @mstrakastrak @UniswapExchange @BalancerLabs @GuilleAngeris @valardragon @phildaian @zmanian 17. Trad. Markets: Futures == leverage, Options == hedging. Recently proposals from @opyn, @synthetix_io, @AugurProject, @Flux_Market, @MonteCarloDEX, etc. have made me think that in DeFi

Futures == Oracle Leverage 🔮
Options == Unsecured Lending 🏦

@AlexisGauba
@badcryptobitch @hasufl @nmushegian @basisprotocol @CeloHQ @mstrakastrak @UniswapExchange @BalancerLabs @GuilleAngeris @valardragon @phildaian @zmanian @OPYN @synthetix_io @AugurProject @Flux_Market @MonteCarloDEX @AlexisGauba 18. Something that @alexhevans and @_charlienoyes will fight me about: Put-Call parity doesn't exist in decentralized options because the vol surface has...
a) E[δ^k] = ∞ for k > 1
b) E[𝛾^k] = Ω(1/k)
because of the gas price auction

*ducks*

@snarkyzk
@badcryptobitch @hasufl @nmushegian @basisprotocol @CeloHQ @mstrakastrak @UniswapExchange @BalancerLabs @GuilleAngeris @valardragon @phildaian @zmanian @OPYN @synthetix_io @AugurProject @Flux_Market @MonteCarloDEX @AlexisGauba @alexhevans @_charlienoyes @snarkyzk 19. There exists an alternative to a mixer that combines a @compoundfinance style bonding curve lending contract with a mixer and/or ZK proof generation contract to directly incentivize people to increase the anonymity set in private txns via on-chain lending.

@zooko
20. Optimizing allocations of a staking portfolio (qty staked, qty lent, qty in passive trading, qty in active trading) is only well approximated by the Hull-White model with zero trading fees.
∴ only exchanges that validate can ctsly rebalance staking assets

@BinanceLabs
21. @UniswapExchange at scale is going to need fees driven by volatility and perhaps higher order Greeks — but it is so cool to see the bowels replicating portfolio theory running in practice on millions of 💸💰💵

@jmo_mx
22. Futures markets on gas costs and other forms of variance reduction will provide better incentives for privacy than ceremonies and mixers over the next decade.

@AnnaRRose
23. Bribing endorsers (akin to @dmoroz's paper arxiv.org/abs/1912.02954) works against HotStuff, PaLa, and Tendermint in a statistical sense — you need to do it within 2 rounds + cause a liveness fault.

@buchmanster (and really, @ittaia + @LibraDev too, but I'll get y'all soon!)
24. There’s a threshold at which staking derivatives help with liquidity — afterwards, you get things like the Uniswap/SNX Christmas arb. Computing this is NP-hard!

@tomhschmidt
25. The introduction of fixed rate on-chain lending products (variable rate + swaps) will cannibalize PoS security almost as much as variable rate on-chain lending products.

@0xlildex
26. Interspersing contract level auction mechanics (e.g. Multicollateral DAI collateral auctions) with mempool level auction mechanics will lead to unstable equilibria if they have two different auction clearing types (e.g. first price, combinatorial)

@ArthurB
27. DeFi on Libra will be interesting because you can use contract events to automate front running the reserve rebalancing mechanism without needing an oracle! You’ll need an oracle for other chains

@b1ackd0g @LibraDev @Libra_
28. There will be an on-chain lending vehicle that:
a) facilitates coin voting bribery (e.g. coins are borrowed just for a vote)
b) prices it’s yield in terms of the cost of corruption / collusion (e.g. PNL sharing)
c) uses a convex bonding curve

@AlexandraBerke
29. Gassy Girsanov Conjecture 🤢:
In the limit of infinite size mempools and a gas price distribution with unbounded support, there exists a risk-neutral measure (with rate equal to inflation) for the gas price stochastic process

@alexhevans
30. Capital flight from poorly designed automated market makers will be facilitated by interest rate swaps and Eurodollar-esque products. If only you could do an on-chain prorata order book 🥱

@Alexintosh
31. Native on-chain DEXs will be good for price discovery, but just as we saw rival centralized futures exchanges mucking around with each other’s oracles, I expect malfeasance to abound

@aeyakovenko

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!