Ramblings on DeFi derivatives

https://mirror.xyz/0x0C23E0dE114d28112f52203cb9583B9826b05dDe/8W5T5qFJerprS92FCF9858HFU-juoqoLJFwdEaH2re4

Jan 2022

background

in the last year options protocols have grown from around $85m to over $1b in tvl, similarly perpetual swap trading platforms have seen quite the growth in trading volume from far less than $1b to coming close to clearing $10b in volume in a single day. value locked and volumes traded will only increase in 2022 with new platforms and products being released practically weekly (as im writing this squeeth, zeta, invariant, and 01protocol all released or are releasing in next few days).

there have been several good writeups on defi derivatives and their outlook for 2022 here is a particularly good one from jump trading.

in the post shanav highlights that if you take crypto options volume (this includes centralized exchanges as well) as a % of spot volume, options only make up 2% of total volume traded. compare this to equity markets where options volume trades at a 35x multiple to spot volume. crypto derivative markets have a massive growth opportunity in front of them and the growth is particularly in defi.

in the rest of the post I will detail types of derivatives and their implementation and design in DeFi. along with innovations and what I am looking at next.

types

perpetuals

a product initially developed by bitmex perp swaps have no expiry, and function similar to a spot margin account allowing for highly leveraged long/short trading.

since perps have no expiry the concept of a funding rate is introduced to tether the price of the perp to the current spot price.

  • mark price refers to the current price of the perp

  • index price refers to the current spot price to tether to

  • negative funding rate shorts pay longs

  • positive funding rate longs pay shorts

  • funding rate is calculated by funding_period * (mark - index) / index

paradigms cartoon guide to perps also gives a very good explanation

perps quickly have become the most liquid and favorite way to trade on centralized exchanges and are a hot topic to be built out in DeFi.

so far there have been about three different perp designs

  • orderbook + margin account

  • vAMM

  • embedded funding rates

using an orderbook and margin account mirrors a centralized exchange experience and this is what protocols like mango work. trading on an orderbook is nice you can easily set limit orders, you trade directly with other counterparties, and for the protocol trading is very capital efficient (each trade is settled once it can be matched with a counterparty).

a vAMM based model can be extremely advantageous, for a trader there is always guaranteed liquidity since you are trading peer to pool, vAMMs can very easily be cross-margined with just about any asset since all of the trading is virtual.

the third design (which I have only seen opyn and squeeth use) is embedding the funding rate into a parameter of asset. known as in-kind funding squeeth uses a normalization factor to settle funding between longs and shorts without ever having to manage a cash payment. using in-kind funding is something that I think will become much more common management of funding was the largest limitation for perp composability. since funding is handled in-kind squeeth can be easily traded as an ERC20, used to LP, used as collateral on other defi platforms, and the list goes on.

a quick aside on vAMM design

this does not entirely relate to perps (its about interest rate swaps actually), but Voltz has increased the benefits of using a vAMM through a concept known as LP Collateral Recycling.

in voltz example there are three users

  • fixed interest rate taker

  • variable interest rate taker

  • liquidity provider

if a fixed taker takes a trade that uses the LPs liquidity the LP is locked into the given swap at the rate the fixed taker took. but if a variable taker comes along and uses that same liquidity (the same rate) the positions can be netted out and the LP’s collateral can be freed and reused. in turn making the protocol much more capital efficient (there is more free liquidity to trade through).

even cooler this concept can be applied to most vAMMs. imagining recycling within a perp vAMM is even easier, if traders have opposite positions on the same asset you could settle their trades “off the curve”. additionally this might be an interesting way to integrate limit orders. a trader sets their limit price and if there is another trader that has an open position on the other side it settles. if not the limit is open until it can be filled by the vAMM.

in a way this makes a vAMM function like a pseudo orderbook with pricing based off of a curve.

these are all very raw thoughts, iterate, be wrong, and discuss

options

as referenced in the background of this options are only 2% of spot volume in crypto (note the majority of this 2% is centralized exchange volume not DeFi options), where in equity markets options volume trades at a 35x multiple to spot.

this might not be the best comparison as crypto options trade much more like commodities than equities, but either way eye opening

either DeFi and overall crypto options haven’t fully been figured out yet or no one wants to trade them.

I’ll take the former all day, right now it seems like DeFi options haven’t entirely taken off due to fragmentation (more on this in the liquidity section), the design, and getting large funds and market makers to trade on various chains.

the leading option protocol is opyn along with pool based protocols like hegic, pods, lyra, and premia. there was almost zero use of these protocols until option vaults landed early this year (there is an entire section dedicated to this below).

we have seen over a 10x increase in usage of onchain option protocols. I expect this growth to continue, especially as products become more cleanly packaged, capital efficient, and composable.

volatility

there have also been a decent amount of products in the market that package risk or volatility in a simple index. volmex has seen the most traction as a way to trade an assets volatility index. trading on volmex is similar to trading on a prediction market like polymarket or augur, you supply collateral and receive two tokens the IV index and its inverse. from here you can trade the volatility directionally how you choose.

I can see assets that volmex offers to be interesting and attractive to traders, however I think they struggle from a nascent market.

in their methodology section of the docs, its described that the volatility index is taken from averages across call and put options sourced offchain from deribit. while this solution works its not very decentralized or native to DeFi.

although this is not the fault of volmex. if there was a highly liquid onchain options market when they where designing their protocol they could have used that as a source rather than deribit.

power perpetuals can be used as a volatility oracle, also check out oracle-free derivatives from primitive and antimatter

as derivatives markets are built out further, I will be watching for volatility products.

innovations

liquidity and composability

liquidity is by far the most important part to design for when creating a derivatives project, there are just so many ways it can be fragmented.

  • over chains

  • over protocols

  • over strikes

  • over expires

A good thread detailing fragmentation in the options market

when option markets initially started to be designed on ethereum, the orderbook model was out of the question (still is on ethereum, but products like zeta on solana use it), and since AMMs worked so well for spot tokens many protocols began to develop an AMM or pool based model for trading options. Below are a few of the designs

  • Hegic V1

    • hegic works by having option writers function as liquidity providers to a pool in which they are locked for the options expiration

    • hegic was the first to do this, and they have seen considerable first mover advantage

  • Hegic v888

    • the v2 of hegic, which introduced auto-exercising options, pools for both calls and puts, zero-loss pools (when you provide liquidity you can optionally hedge your liquidity)

  • Pods

    • pods released a great pool based options model in which the black scholes pricing model built into the AMM in which all that needs to be inputted is the IV

    • right now each pool is a separate option series, but the pods team is looking at how multiple option series could be in a single pool (see section 7 future work)

  • Premia

    • premia has taken a lot of the options pool concepts to the next level, buyers can select your expiration date and strike price at a granular level and sellers (liquidity providers) can choose which markets they want to underwrite.

  • Lyra

    • lrya functions with two pools, the collateral (writes the options) and the delta pool (hedges option writers delta). lyra also uses market driven IV which is then inputted to the black-scholes model to determine the option price

all of the research that has gone into designing these protocols is very impressive but due to poor capital efficiency and often much higher prices compared to say deribit most of these protocols have not seen significant volume compared to centralized counterparts.

looking at pods and premia’s total volume they have cleared less all time than squeeth has in 2 weeks. nothing against either team (I actually really enjoy reading their docs) but squeeth has cleared more in volume in a fraction of the time because squeeth has done away with 3/4 of the liquidity fragmentations. there is no expiry, no need to select a strike price, and due to built in funding rate (thanks to the normalization factor) squeeth can be cross protocol (see a list of integrations here).

more on squeeth and power perpetuals later, but its important to know that cleanly packaging a payoff, in a perpetual, and composable fashion will always win out.

in addition to composable perpetuals like squeeth and option based AMM formulas there has been significant research in using concentrated liquidity to form option payoffs.

if you are interested in this I suggest you read all ten articles from @guil_lambert starting with Uniswap V3 LP Tokens as Perpetual Put and Call Options, followed by 2, 3, 4, 5, 6, 7, 8, 9, 10. following that go and play around with info.yewbow.org observe the volatility of each pool and visualize the payoff of your LPs

the top tier team at primitive took this a step further and developed an entirely new protocol RMM-01 which focuses on being a spot and derivative exchange through concentrated liquidity. if you are curious on how you can create a replicating portfolio from a constant product market I suggest you read the following

having a spot and derivative exchange bundled in one unlocks tons of capital efficiency, allows for granular strike selection, automatically rolling expires when the AMM rebalances (heads up for searchers), and freedom to select your own quote and base asset.

but… there are always tradeoffs replicating an option with concentrated liquidity only allows you to replicate selling options and the premium yield relies on swap fees from those using the spot exchange or arbitrageurs. yield being derived only from swap fees has two consequences, (1) no swaps or arbs occur in which you would not earn yield and (2) since yield is from swaps your premium is paid over time of the expiry and not given upfront.

there are a few solutions to these: if you want to have a long call payoff you could borrow a primitive position, if you want to have a somewhat guaranteed premium you could lend a primitive position

the vault structure

a somewhat common and basic options strategy to generate additional yield on an asset by forgoing potential upside is known as a covered call strategy. there are plenty of good guides on how this works and the risk associated. the basics are you sell a far out of the money option on a regular cadence taking home the premium as yield and praying (or hopefully hedging) that prices do not rise enough for your calls to be excised.

yield farming to earn 4 digit APYs is extremely lucrative, but not very sustainable by selling risk through options you will have a much lower but sustainable yield. these concepts are summed up nicely in where does yield come from by ribbon co-founder @juliankoh.

the ribbon team (and now a growing list of others) saw strategies like covered calls and yield vaults like yearn as a perfect fit, and thus Option Vaults were formed.

option vaults are simple, user deposits ETH and each week the ETH is used to collateralize 1w expiry and 0.1d options via oTokens using opyns gamma protocol which are then sold to market makers via telegram and airswap or through open access gnosis auctions.

these vaults are somewhat of a win-win for all parties. retail has a clean UX, simple, and easy way to generate constant yield. sophisticated market makers can take advantage of the not very competitive option pricing and arb the prices across other option exchanges.

there has been a decent backlash to option vaults on twitter see

or the quote tweets from here.

all I’ll say on this is option vaults are much more transparent in their onchain activities and structure its just really about communicating that risk to the retail investors using the platform. if you are marketing the option premiums as risk free yield then ya backlash is deserved.

across all option vault protocols there is about $500m of short dated options being sold each week by DOVs, so much that they are starting to affect the skew

some smart traders new this was coming, but I assume most did not

check the date ^

the deribit insights thread aeto was looking for can now be found here

if you take away anything from this post, know that your yield will always be compressed even if it is “sustainable”

so far we have seen 40% interest rate on stablecoins, 4-5 figure APYs on the newest yield farm, very high double digit yields on option vaults, and (likely) will see large swings in negative funding via algorithmic stablecoin mints. and this is were things start getting cool… DeFi products affecting the overall crypto market structure (who would have thought back in 2019 when the entire space was sub $1m TVL).

but high tvl vault projects decimating your yield isn’t the point of this post… so back to derivatives.

another vault structure that is becoming more common is the basis trading vault. uxd and lemma are leading the way. the basis trade is pretty simple especially when you are using perps.

  • notice that funding on your favorite perp protocol is positive (longs pay shorts)

  • spot long an asset

  • short the asset on the perp protocol

  • earn the funding rate while being delta neutral

of course you’ll need to continually hedge your positions to keep your delta neutral

uxd and lemma run strategies on decentralized perp markets (mango and perpetual) in a vault structure allowing anyone to invest. additionally they mint a stablecoin against the position. in uxd example you deposit SOL and the vault shorts SOL perps on mango.

algorithmic stablecoins are another interesting DeFi concept, maybe will detail in a later post but for now this piece from dragonfly and and FRAX’s docs on seniorage shares should get you started

as mentioned above a large influx in delta neutral backed stablecoins could push perp markets funding rates negative.

understanding how these stables pay the negative funding is important (and directly affects your coins stability), generally this is paid through an insurance fund and if thats not enough governance tokens may be auctioned off (similar to maker debt auctions).

however historically the basis trade has been really profitable

Following a 2x long ETH-USDC on Perp and 2x short ETH-PERP in FTX would have yielded over 100% APR since the market was opened

The Quest for Perp AMMs - Deribit InsightsPerpetual swaps (also known as perpetual futures or perps) are the most widely used derivative product in crypto.insights.deribit.com

hidden in this article you will also find some interesting finds relating to the open interest and price on perpetual protocol v1

a quick aside on stablecoins and perps and what they can learn from one another

if your timeline over the past few weeks has been 75% about squeeth like mine, then tweets around “everything being a perp” might have surfaced. here are a few of them

note: all paradigm

quick overview for MakerDAO and DAI is that DAI is an ETH margined USD perp

  • DAI holders are long DAI

  • Vault depositors are short DAI

  • DAI price is the mark

  • $1 is the index

  • the dai savings rate and stability fee act like a funding rate

on the RAI and reflexer side the team has called themselves a stablecoin/perp, if you read closely on the rai use cases you can see how RAIs redemption rate is similar to a funding rate.

another side note A Money God Rises, DAI purple paper, Rico are all good reads

you can read more about perps as stablecoins from a more technical side, written by opyn, here

and a final exercise to the reader from the above post

This is a collateralized zero coupon bond -- the original stablecoin

okay after that quick overview on how everything is a perp, what can perps learn from algorithmic stablecoins (this specifically applies to those built with an AMM for pricing)?

designing a perp market has the benefit of using an AMM for pricing, most vAMM designs use the constant product formula xy=k which has worked quite well.

there have been plenty of iterations and new designs for AMMs for similarly priced assets and if you think of the mark and index of a perp as two separate like priced assets you can start to see how implementing a stableswap-like curve might allow for a perp to maintain a tighter peg.

additionally almost all algorithmic stablecoins trade at a current value (the mark) and peg/target a rate of $1 (the index).

the FEI stablecoin initially had the concept of direct incentives, essentially as FEI deviated from its peg of $1 a reward/penalty would take place for a mint/burn. if FEI is trading at $0.98 minters earn 2% and burners are hit with a 4% penalty and vice versa. the trick here is that the farther FEI deviates from its peg the exponentially higher penalty. here is a (brutal) graph of what FEIs price movement from peg looks like when adding in direct incentives.

ty bantg

note: that this did not work well for FEI and is since removed from the protocol

as much as direct incentives did not really work for FEI, it could be interesting to try in a perp context. as mark deviates from the index you quadratically scale up/down the funding rate. doing so would hopefully attract for arbitrage opportunities and thus maintain a tighter mark/index peg.

closing out this aside, I have a feeling that we will see algo stablecoin designs implemented in perps, and protocols described in the context of perps in the future.

power perpetuals

power perpetuals are perhaps one of the most interesting research topics and products to come out of defi derivatives. the core concept is simple, a power perp (for example ETH^2) tracks the price of ETH squared. if ETHs price rises by 200% ETH^2 rises by 400%, if ETH price goes down you loss less than you would through 2x constant leverage

sidenote you should read: How to lose 99.9% and still score a 500x

squeeth or any power perpetual (01protocol will be launching sol^2 soon) can be used for a lot of different strategies, here is an initial list

  • Longing Squeeth means you are long gamma, and is similar to holding a perpetual at the money call options

  • Shorting Squeeth means you are short gamma, and is similar to selling a perpetual at the money straddle

  • 1x Long ETH Exposure with a oSQTH:USDC LP

  • 1.5x Long ETH Exposure with a oSQTH:ETH LP

  • Usage as a Volatility oracle

you can see a full list of use cases and articles on squeeth here

I am extremely excited to see where power perps take us in 2022 simply because I know that the list above is just scratching the surface.

if you want to think about use cases I suggest reviewing squeeth mental models and iterating from there.

it can also be helpful to know that holding squeeth provides a similar payoff to holding an always at the money call (shorting is like an at the money straddle). however power perps are not limited to just thinking in the option space, it can also be compared to a perp swap and constant leverage (something like FLI).

whats next

this has already been a somewhat long post, so to end here is my shortlist of innovations I’ll be looking at in 2022.

opyn laid it out nicely

  • A 0-perp is a stablecoin

  • A 1-perp is a future

  • Any p-perp that is not 0 or 1 is a volatility oracle

  • Power perps can be traded against fixed-expiry power futures

  • A 2-perp (squeeth) is an excellent hedge for options and constant function market makers such as uniswap and curve

  • A 0.5 perp (sqrth) is a perfect hedge for a uniswap LP position and it's coming next!

  • an increased focus on composability

    • I feel like many derivative designs have been optimizing for liquidity and the next step will be composability

    • I am looking at usage in other protocols, cross margined, (maybe) cross chain margin

  • vaults for everyone

    • continue to create vault products that are accessible (but transparent) to all investors and allow them to participate in high payoff niche trading strategies

Last updated