This is part 1 in a series on Constant Function Market Makers and on-chain derivatives. If you are not familiar with financial derivatives, I recommend you check out this page for a quick definition. It will help you make sense of the concepts discussed in this article.
In TradFi, the market size of derivatives is orders of magnitude larger than the underlying markets. Even if it is a bit outdated, I love this infographic from 2016 comparing the size of financial markets.
Since a lot of derivatives transact OTC (Over-The-Counter) it is difficult to estimate the total size of the global derivatives market. In 2016, the notional value of derivative contracts was estimated between $630 trillion and $1.2 quadrillion. It is between 10 to 20 times larger than the $70 trillion global stock market capitalisation at the time.
Derivatives play a key role in financial markets for recycling risks and tailoring instruments for investors’ individual risk profile. However due to their complexity and massive size relative to the underlying markets, they can introduce feedback loops and hidden systemic risks.
As DeFi goes through further development cycles, from the original protocols (MakerDAO, Aave, Yearn), through to “DeFi 2.0” (Rari Capital, OlympusDAO), we discover new building blocks for an open and interoperable financial ecosystem based on public blockchains. DEXs (Decentralised Exchanges) have been popularised in 2020 and constitute today a key infrastructure to exchange crypto-assets in a peer-2-peer way. These exchanges rely on AMM (Automated Market Maker) protocols and LPs (Liquidity Providers) to provide users with an exchange rate and liquidity to swap from one token to another.
These LPs can provide liquidity for a token pair by depositing any 2 assets in a smart-contract, and receive an LPT (Liquidity Provider Token), that represents their position in the liquidity pool. This LPT is yield bearing, it accrues the fees paid by the traders when swapping between the 2 assets in the pool. The LPT is considered as a derivative, since its price changes according to the value of the underlying assets (the 2 assets in the pool), and the AMM formula that determines the weighting between those 2 assets.
Primitive aims to differentiate itself from other AMMs by having financially useful LPTs that can replicate any derivative payoff. Furthermore, the protocol does not require an oracle to provide a price-feed for the underlying assets, which reduces potential smart-contract vulnerabilities and the centralisation component of the protocol. Reliance on oracles can be an issue especially for low-liquidity token pairs, as demonstrated in this Fuse pool exploit on November 2nd.
Here is RMM-01, the first iteration of the Replicating Market Maker protocol. It can be used for:
Primitive has been deployed on the Rinkeby testnet and is currently accessible via the link above. Let’s test the protocol and walk you through the process of setting up positions.
First, connect your Metamask wallet, and you will be greeted by the pools available.
Each of the pools is characterised by 5 properties:
Each of the pools will replicate the payoff of a covered call selling strategy. The strategy replicates a portfolio short a call with strike K and long the base currency. By selling a covered call, you are betting that the base currency will be above your breakeven price (K - Premium) at expiry.
You start using this strategy by choosing the assets you want to trade, the strike price and expiry date, among the existing liquidity pools. You deposit the base and the quote currencies (here YFI and USDC) in quantities defined by the pool parameters, and receive in exchange RMM-01 LPTs. By depositing, you pay a small fee, that will be distributed to existing Liquidity Providers. The protocol does not accrue any fees. These LPTs can be redeemed at any time by withdrawing liquidity. You will receive in exchange the base and quote assets.
The payoff replication comes from arbitrageurs, that are incentivised to rebalance the assets in the pools, earning a profit by moving the pool weightings to match the covered call payoff. If at expiry, the price of the risky asset is above the strike price, the pool will be 100% in the stable asset. On the contrary, the pool will be 100% in the risky asset if the risky asset price is below the strike.
As a trader, you would use a covered-call strategy to collect some option premium (here generated by the trading fees), or get a limited amount of downside protection (the premium offsets some of the losses incurred by the asset depreciation). The risks are a decline of the base currency price under the breakeven price, or the opportunity cost of not participating in a large rise of the base currency price.
I find this first implementation of the RMM interesting, and I believe there would be organic demand for selling covered calls in the current market environment, for example from yield generating strategies in vaults such as Yearn’s or Charm’s. I believe that derivatives on a basket of assets or with different payoff profiles would also be more suited for the asset class. Potential implementations already discussed in Primitive’s Discord range from liquidity staking to volatility harvesting vaults.
The RMM model is proven in theory, but how will it work in practice? Can we expect the LP strategy to replicate exactly the covered call payoff? The RMM-01 whitepaper outlines the existence of a gap between to theoretical and effective payoffs, which can be reduced by optimising the swap fee. The remaining gap can be explained by either imperfect arbitrage conditions or the activity of noise traders, driving the exchange rate further from its theoretical value.
The oracle risk has also been replaced by model risk since Black-Scholes is used to fit the curve during the pool’s configuration. This model is not necessarily true for every situation. The assumption of a constant IV (Implied Volatility) and a lognormal (Gaussian) distribution of returns makes this model fragile for assets having a high volatility skew. The RMM-01 protocol could be improved upon by applying more accurate measures of the volatility smile and using more sophisticated pricing models to fit the RMM curve.
While Primitive’s RMM-01 is the first implementation of a Replicating Market Maker, it sure lays the path for further evolutions and opens a new design space for on-chain derivatives.
There is a window of opportunity for derivative and structured products protocols. We can argue that derivatives have failed to capture the attention of the market participants and find product-market fit, due to their complexity and the infancy of the crypto-markets. The size of the on-chain derivative protocol market (measured by the underlying tokens aggregate valuation) is only $4.12B, or 0.17% of the total cryptocurrency market cap. If institutional participation comes to increase, and derivatives protocols manage to capture value for their token-holders, I would expect their relative valuations to be significantly higher.
This article is only the first one of a multi-part series diving into CFMMs (Constant Function Market Makers), and RMMs (Replicating Market Makers). In the next parts, I will look deeper in the technicals of the RMM protocol and its major differences with the CFMM protocols used in Uniswap and Curve. I will also look for novel implementations of the RMM protocol for derivatives and structured products. As a low-level base protocol, RMMs are particularly interesting because they enable new applications to be built on it and can be used to open DeFi to new institutional actors, accelerating its pace of adoption and the development of a new open and decentralised financial ecosystem.
Thank you for reading! If you enjoyed this article, do not hesitate to follow me on Twitter and reach out to me directly.