An introduction to Contango

Mitch | Contango
Contango
Published in
6 min readJul 11, 2022
An intro to Contango

On-chain expirables

Contango is the first non-custodial DeFi market to offer expirables, a new derivative that allows traders to buy or sell assets at a specific date and price in the future.

This is indeed what regular dated futures and forward contracts do - as opposed to perpetuals, which never expire (see fig. 1).

Market map. Elaboration from “State of crypto derivatives market” by Jump Capital.
Figure 1. State of the crypto derivative space by Jump Capital

However, there are important differences between Contango’s expirables and the other standard instruments you can find in CeFi or TradFi.

First of all, Contango allows traders to take expirable positions without order books or liquidity pools. Let’s see how that works.

The theoretical model

The theoretical model behind Contango is the famous interest rate parity relationship:

Interest rate parity formula

This well-known formula in traditional finance states that a forward contract on two currencies has a theoretical price P that depends on the spot price of the base currency S, the interest rates r₁ and r₂ of the quote and base currencies, and the maturity T. For more information see: Options, futures and other derivatives, by John C. Hull (chapter 5 on Futures pricing).

Contango synthesizes forwards by following the steps used to demonstrate the interest rate parity formula. When a trader opens a position, the protocol borrows on the fixed-rate market, swaps on the spot market, then lends back on the fixed-rate market. To close a position, the protocol reverses these steps.

Steps to open a long position on Contango
Figure 2. Steps to open a long position on Contango

For v1, the cash flows described above are replicated on Contango by using the spot price on Uniswap and the fixed-rate markets on Yield, currently live on Arbitrum and Ethereum, and Notional, currently live on Ethereum.

However, Contango has derived different formulas to take into account the trader’s collateral, which is used to reduce the amount of capital borrowed and quote you a better price (you’re welcome). See docs.contango.exchange for a detailed explanation.

Collateralization ratio and leverage

The fixed-rate protocols used by Contango offer fixed rates to borrowers and lenders through a zero-coupon bond-like instrument (fCash in Notional, fyToken in Yield). At Contango we call them zcTokens, as in zero-coupon bond Tokens. At a high level:

  • Lending at a fixed rate is equivalent to buying a zero-coupon bond.
  • Borrowing at a fixed rate is equivalent to selling a zero-coupon bond.

However, borrowing on fixed-rate markets, just like anywhere in DeFi, requires overcollateralization, i.e. you need to deposit more than the amount you can borrow to ensure solvency.

In order to achieve leverage, Contango uses the flashswap function on Uniswap. Contango first gets ETH from the flashswap, lends it on the fixed-rate markets, uses the resulting zcDAI from lending as collateral to borrow DAI and gives those DAI back to Uniswap, all in one atomic transaction (see fig. 3)

Flashswap steps to open a position on Contango
Figure 3. Flashswap steps to open a long position on Contango

Contracts

At launch, our beta on Arbitrum will offer several pairs (ETHDAI, ETHUSDC, DAIUSDC) with different maturities.

This will change in the future as we integrate more pairs and maturities, and eventually move to Ethereum too.

Please bear in mind that when opening a short position, under the hood Contango will open a long position through an inverse contract. The latter is simply a linear contract that offers the opposite pair (e.g. DAIETH). Indeed, going long on the inverse (e.g. DAIETH) is equivalent as going short on the linear contract (e.g. ETHDAI).

From a user’s perspective, the only noticeable difference between longing and shorting an asset is the collateral being posted. When going short you should post the base currency (e.g. ETH) and not the quote (e.g. DAI).

This is useful for instance when you have ETH and want to hedge your position by shorting it with a forward: you can go on Contango and post it directly as collateral in a non-custodial way.

Composability

Every position is tokenized as an NFT, enabling other projects to easily build on top of Contango. Each position has a unique futures price, which is determined by the market conditions and collateral ratio at the time of entry. The fact that they are unique makes the ERC-721 standard an appropriate choice.

Tokenizing ownership serves several key purposes:

  • It enables independent transfer of ownership, without the need to update Contango’s internal accounting.
  • Positions can be bought and sold on a secondary market, or in a private transaction.
  • It enhances composability, e.g. Contango positions could potentially be used as collateral in a third-party protocol.

If you have other ideas on how to use this NFT position please join the discussion on Discord. We are currently welcoming developers to build delta-neutral strategies like cash and carry vaults on top of Contango.

Liquidations

Like always in DeFi, if your collateral value diminishes and your position goes underwater (meaning: your collateral is not sufficient to guarantee the repayment of your debt) then you are at risk of liquidation. Contango does not perform any liquidation on its own, but relies instead on the underlying protocols.

Each time a trader opens a position, a borrowing vault is opened on the underlying fixed rate protocol. The zcToken from the lending position is used as collateral to borrow the quote or base currency. If the vault becomes undercollateralized then the vault is closed through a liquidation process on the underlying protocol and the position on Contango is automatically closed.

Settlement

At expiry Contango offers both physical delivery and cash settlement.

Physical delivery is not vulnerable to price manipulation. This is because cash-settled forwards are settled against an index that normally relies on third-party spot markets where sometimes volumes are thin and can be moved — read: manipulated — very easily (source: Coinflex).

Due to the nature of Contango and how it uses the trader’s collateral, at expiry the trader needs to bring the missing capital to make up for the difference in the debt she owes (see fig. 4):

That means that if a trader is long ETHDAI, at expiry she will receive ETH. If she’s short, she’ll have to deliver ETH — which means she’ll be receiving DAI.

Closing a position at expiry on Contango
Figure 4. Steps to settle a long position on Contango

A traders can also cash-settle her position and receive equity (with PnL) to her wallet, with no need to bring any additional capital to deliver the full position. Everything will be settled in the quote currency to her wallet.

Risks of using Contango

In order to discuss the risks of using Contango it’s worth recapping some key features of the protocol:

  • Contango prices expirables via spot and fixed-rate protocols, so it’s reliant on the liquidity of these markets (Uniswap, Yield, Notional). The long-term vision is to aggregate as many markets as possible to offer the most liquid expirable market in DeFi.
  • Contango doesn’t have an order book, nor liquidity pools, which means there’s no liquidity held on protocol (no TVL).
  • Even the trader’s collateral is put to work for better capital efficiency on the underlying protocols so, again, no liquidity is locked within Contango.
  • Liquidations are not carried out on Contango, but on the underlying protocols.
  • At maturity Contango offers physical delivery to eliminate risks of price manipulation.

So, when using Contango, a trader should bear in mind the following risks:

  • Liquidity risk, i.e. the possibility of thin liquidity on underlying markets, especially when closing a position.
  • Market risk, i.e. sudden movements in price that can result in potential liquidations.
  • Smart contract risk, i.e. the risk of using protocols (i.e. lines of code) that can be hacked and exploited. Contango will undergo multiple security audits.

About Contango

Contango is the first DeFi market offering expirables: contracts to buy or sell assets at a set price and date in the future. Contango achieves that without order books or liquidity pools. When a trader opens a position, the protocol borrows on the fixed-rate market, swaps on the spot market, then lends back on the fixed-rate market. Contango offers physical delivery and a minimal price impact for larger trades. Join us at contango.xyz.

Website | Twitter | Discord | Docs | Blog

--

--