CompliFi Protocol

From DefiLlama
Jump to navigation Jump to search

CompliFi is a decentralized derivatives protocol built on Ethereum & Polygon. First conceived in January 2020 to prove that it's possible to design an AMM that serves the needs of fee revenue-focused market makers better than Uniswap's original constant product design. After a year in development, the protocol went live on April 2, 2021, allowing anyone to trade derivatives without counterparty risk while eliminating margin calls, liquidations and defaults for on-chain derivatives.

The main features of the protocol are the latest Perpetual x5 Derivatives, Covered Call Options & Unified USDC Pool for liquidity providers.

CompliFi addresses the problem of unbounded potential payoffs, which cannot be fully collateralized upfront. It solves it by modifying all derivative payoffs to fit within a fixed collateral pool. Once this feature is baked into the payoff function, every instrument can be fully collateralized upfront and will never default.

Why create derivatives that don't default?

The risk arises because most regular derivatives have unbounded potential payoffs, which cannot be fully collateralized upfront. For instance, suppose you buy a synthetic leveraged token. If the underlying asset's price keeps on rising, so does your payoff, and someone has to fund it. For that someone, there is no finite amount of collateral that could be posted upfront to guarantee coverage of their liabilities in every market scenario.

A derivative involves multilateral promises of a payment contingent on the future state of the world. Making sure the losing side delivers on their promise is hard. In conventional finance, this job is done together by regulators, central counterparties, internal risk management departments and the judicial system. Associated costs run into hundreds of billions per year, yet we still get epic failures like the 2008 subprime crisis.

Derivative protocols before CompliFi

Derivative protocols tend to manage counterparty risk but adopt a single technique from conventional finance – they ask users to post collateral that partially covers their potential downside, and if the downside starts to materialize, they ask users to post more. If users refuse, derivative positions are liquidated, and proceeds are used to cover the liabilities.

When markets move slowly and there is plenty of block space to get collateral top-up transactions mined in time, the system tends to work. Problems begin when these conditions no longer hold:

  • If the market moves too far too fast, topping up collateral may no longer make sense – users will abandon their positions to be liquidated. Except, the collateral that is already there may not be enough to get everyone paid in full. The "winners" on the other side of the trade will not be able to collect.
  • When users do want to meet their collateral calls but can't due to block capacity constraints, their positions also go into liquidation. Then, the same capacity constraint can prevent the liquidation process from yielding fair value. When a significant portion of potential bidders is excluded, the underlying collateral could be sold too cheaply. The outcome is again the failure of winners to collect their payoff.

How does CompliFi eliminate counterparty risk?

The risk arises because most regular derivatives have unbounded potential payoffs, which cannot be fully collateralized upfront. For instance, suppose you buy a synthetic leveraged token. If the underlying asset's price keeps on rising, so does your payoff, and someone has to fund it. For that someone, there is no finite amount of collateral that could be posted upfront to guarantee coverage of their liabilities in every market scenario.

CompliFi addresses this problem by modifying all derivative payoffs to fit within a fixed collateral pool, effectively "cutting off" the unbounded bits that cause all the trouble. What you get as a result are derivatives that look very much like their conventional counterparts but have a pre-determined floor and ceiling for how much the holder can gain/lose. Once this feature is baked into the payoff function, every instrument can be fully collateralized upfront and will never default.

Leveraging the Uniswap Invariant

Automated market makers often serve a dual purpose in decentralized finance – to generate trading fees for liquidity providers and to rebalance their asset portfolios towards a pre-determined target composition. CompliFi proves that it is possible to design an AMM that serves the needs of fee revenue-focused market makers better than Uniswap's original constant product design by decoupling terms of trade from market markers' inventory.

Even in the most popular AMM pools, only a tiny fraction of assets is ever traded, while the rest lie idle and do not generate trading fees. For the market maker, that is an inefficient use of capital. CompliFi Protocol introduces its own AMM design that removes excess reserves from its pool, allowing it to affect its trading dynamics significantly.

Current State of COMFI Token Implementation

First announced on April 6, 2021, COMFI has a total supply of 10,000,000 tokens. COMFI has been deployed on the Ethereum mainnet but has not been connected to the protocol. As a result, COMFI does not currently allow its holders to participate in the governance of CompliFi directly or to benefit from revenue generated by the protocol.

The upcoming CompliFi V2 lays the foundation for introducing governance & revenue-generating mechanics. [1]

x5 Leveraged Tokens

CompliFi was the first protocol to introduce x5 Leveraged Tokens in DeFi that don't experience margin calls, liquidations, or defaults. The mechanism allows anyone to take on leveraged exposure to anything, as long as it has a price feed on Ethereum.

All tokens start with a nominal value (aka claim on collateral) of 1 USDC. Throughout its life, the token's nominal value rises or falls at 5 times the rate of the underlying asset over the same period but within the corridor of 0–2 USDC.

Let's consider ETHx5 as an example. The corresponding long-short token pair is ETHx5 Up and ETHx5 Down. The "Up" token multiplies the percentage change in ETH price by 5, and the "Down" token by -5. In other words, a 1% increase in the price of ETH would result in the nominal value of ETHx5 Up rising by 5%, at the expense of a corresponding decline in ETHx5 Down. If ETH falls by 1%, the situation is reversed.

When ETH price hits + or -20%, one of the tokens will have a nominal value of 2 USDC and the other zero. These are the nominal value ceiling and floor — nominal value of an x5 token can never go higher than 2 USDC, or below zero (i.e. you would never receive a margin call). [2]

Market Value of the x5 Token

Let's suppose that you are sitting on a winning token with a 2 USDC nominal value, but you are a week away from the settlement. Its value cannot rise any higher, but it could go lower if markets change direction. As a result, you would struggle to find a rational buyer for your position at 2 USDC. However, you would likely find it much easier to sell it at a discount, giving the buyer some nominal value upside to look forward to. This rationale is what gives rise to the difference between a derivative's nominal value and its market price. Calculating the size of that difference is where things get a little technical.

In V2, x5 Leveraged Tokens gained a new feature, as they are now perpetual.

Covered Call Options

Leveraging the same principles that underpin the x5 leveraged token, on Aug 14, 2021 CompliFi introduced a new instrument; Call Options. Like x5 products, Call Options do not pose default risk for traders. Long term investors providing liquidity to these instruments can see superior returns vs classical AMMs and lending protocols, thanks to premiums paid by options traders. [3]

Unlike the x5 leveraged token, there is no cap on the call option payoff — no matter how high the price of an asset goes, there is always enough collateral to cover it. This is because the option is collateralized by the same asset on which it is written (i.e. it is covered), and the USD value of collateral grows in line with the option payoff.

Liquidity Provision

x5 Products

When you add liquidity to a CompliFi AMM pool, you receive LP tokens, just as you would on Uniswap. The basic economics is similar to other AMMs — when traders buy and sell derivatives, they pay trading fees, which accrue to LP token holders.

Differences begin with CompliFi pool contents. All pools contain two assets — the x5 short and x5 long position tokens for the same derivative. This makes LP tokens largely market neutral — when the long position decreases in value, the short position increases.

Traders will buy derivatives from the pool and quantities of long and short tokens will no longer be equal, leading to market risk. CompliFi manages market risk in two ways: 1) exposure is never allowed to exceed pre-determined limits; 2) when a swap makes LP risk position worse, the AMM charges a higher trading fee for it.

Call Options

Unlike x5 products, there is no need to exit the position to stablecoins first or pair it up with another asset. The AMM pool will put your tokens to work, allowing traders to buy and sell their potential upside. For long term investors, providing options liquidity is a unique opportunity to put their capital to work, with prospects of superior returns vs classical AMMs and lending protocols.

On the whole, the CompliFi AMM tries to make sure that, over time, you would do significantly better by providing options liquidity than keeping the tokens in your wallet.