Contango: the looping layer of defi

Mitch | Contango
Contango
Published in
8 min readMay 31, 2024
Contango: the looping layer of defi

Contango is becoming the new layer for all-things looping, from Pendle’s PTs to popular LRTs assets.

What’s Contango?

Contango is the looping layer of defi, loved by users and protocols alike.

On Contango you can:

  • Create leveraged positions just like perps with low funding.
  • Lever up on the yield of liquid staking and restaking assets, like stETH or eETH.
  • Lever up on the fixed yield of Pendle’s PTs.
  • Create delta-neutral plays to farm funding rates.
  • Arbitrage rates differentials on stablecoins.
  • Farm rewards, airdrops, points on leverage.

In a nutshell, Contango lets you loop anything on-chain. This allows it to re-position in front of the hottest narratives at any given time.

Because narratives come and go — but looping stays.

How does Contango work?

Contango builds positions by automating a looping strategy, through flash loans.

Let’s unpack what this means.

Looping involves lending or depositing some capital (e.g. ETH into Aave), borrowing another currency (e.g. DAI) against it, swapping the borrowed amount for the original asset (ETH), and repeating the steps through several loops to gain more exposure to the initial asset. Another reason to loop is to farm rewards on the underlying lending protocol; this became popular with the liquidity mining craze of $COMP in 2020.

Nowadays pretty much everyone is levering up on Aave, Compound, Morpho, Spark. For instance, Morpho claims 64% of their volumes comes from users performing looping strategies (source).

Money markets and CDP protocols normally require you to be overcollateralized, meaning that you can only borrow less than the value of what you deposit. For instance, ETH on Aave has a maximum loan-to-value (LTV) ratio of 82.5% meaning that you can only borrow 82.5% of the $ value of the ETH you’ve deposited.

Steps carried out to open a manual looping strategy to long ETH/DAI
Steps carried out to open a manual looping strategy to long ETH/DAI

That’s why, after 12–15 loops normally you get diminishing returns on the effort you’re putting into looping: the exposure you get to the asset you’re lending increases by smaller and smaller amounts (to learn more about looping see this article).

Indeed, manual looping is pretty expensive, especially on L1. That’s why automated strategies were developed through flash loans.

Flash loans allow to achieve leverage in one atomic transaction, as long as any borrowed amount is repaid within the same block. This is indeed the final ingredient to the Contango looping recipe.

When a trader opens a long ETH/DAI position with DAI as margin, Contango gets the remaining DAI from a flash loan, swaps all DAI for ETH on the spot market, and lends ETH back on the money market, to borrow DAI and repay the flash loan.

Looping with flash loans
Looping with flash loans

So Contango doesn’t actually perform real loops: leverage is achieved instantly, in just one transaction.

The diagram below details these steps and provides a numerical example when a trader longs 1 ETH with 200 DAI as margin, and spot ETH = 1000 DAI.

Steps realized by Contango to open a long ETHDAI with DAI as margin
Steps realized by Contango to open a long ETHDAI with DAI as margin

Note that on Contango, traders can post any currency available on the platform as margin. Multiple positions on the same pair and direction can also be opened at the same time.

Who’s this for?

  • Loopers who have been performing manual or automated “loops” can either opt for the Trade or the Strategies interface, depending on their needs. In both cases, thanks to easy-to-read metrics (liquidation price, PnL, margin, mark price) they can better manage their position and control their costs.
  • Traders are welcome too: the Trade interface is geared towards advanced users who want to take directional bets on non-correlated assets. Also, given how positions are built on top of money markets, traders can enjoy deep liquidity as well as cheap and low funding rates.
  • Farmers and newcomers are better off using the Strategies interface directly, as it has a simplified flow. They can farm LST and LRT yields, PT yields, USD rates differentials, or simply the rewards offered by the underlying money markets.

Key features

Liquidity

Contango positions are built on top of spot and money markets: at the time of writing, their TVL amounts to more than $60B across defi. This deep liquidity allows Contango to facilitate large trades with minimal impact on both rates and prices.

This number can also be interpreted as Open Interest. If only 20% is due to looping (Morpho argued it was 64%!),then Contango is well-positioned to go after a whopping $12B market.

Obviously, each instrument listed on Contango has its own specific liquidity, depending on the money market and chain selected by the trader. For instance, ETH/DAI on Aave on mainnet is likely to be highly liquid, whereas a more exotic asset like PTeETH/ETH on Silo on Arbitrum might not be as liquid.

The choice of a specific chain and money market is completely up to the trader. Contango is only in charge of sourcing the best spot liquidity to execute the swap that is required to open, modify or close a position. To achieve this, Contango uses Balmy, a meta aggregator of spot markets.

Implied funding rates (APY)

Conventions on perp exchanges indicate with funding rate the variable interest rate on the underlying debt. Funding rates are charged periodically, e.g. every 1 or 8 hours.

The variable funding rate on Contango is determined by the difference between the cashflow on the lending and borrowing legs of a position, which you normally see referenced as borrow APY and supply APY on the money market. That’s why it’s also called APY on Contango. It can be positive or negative:

  • If it’s positive, it means the trader is receiving money to keep his position opened.
  • If it’s negative, it means the trader is paying money to keep his position opened.

In other words, Contango’s APY is equivalent to a funding rate, but its sign is inverted compared to funding rates on other perp venues. Funding rates on Contango are cheaper and less volatile than perp trading venues. Academic research on this topic shows that positions built on Aave are around 3x cheaper and less volatile than Binance and dYdX (full study).

The APY on Contango is accrued as PnL and settled when closing the position.

Note that the APY varies with leverage and with the size of your position: when inputting a bigger size Contango always takes into account its impact on the rates and adjust the displayed APY accordingly, so you know it beforehand. If everyone uses Contango, this feature would prevent traders to flip the rates inadvertently and even dilute the APY excessively. So, even if you wanna place a trade outside of Contango, at least use it to simulate it beforehand.

Liquidations

Liquidations can happen for several reasons, mostly related to:

  • Price movements: price goes against you, your margin loses value and your position goes underwater.
  • Funding rates changes: rates move against you, eat into your profits and your position goes underwater.

Given the architecture of the protocol, all liquidations are carried out by the underlying money markets, not on Contango. On Contango, the reference price used for liquidations is the mark price, which is the ongoing oracle price used by the underlying money markets.

Just like with some money markets where there is a distinction between max LTV ratios and liquidation thresholds, on Contango there’s a max leverage to open a position and a higher leverage threshold at which traders get liquidated.

Money market might have different liquidation penalties. The liquidation penalty is a fee paid on the price of assets of the collateral when liquidators purchase it as part of the liquidation process.

Rewards, incentives, points

By design, almost any reward or incentive offered by the underlying money market can be accrued by Contango users, simply by trading. These rewards are often in the form of native tokens, like $COMP on Compound pairs, sometimes in the form of chain incentives like $OP on Exactly, or even in the form of plain cash incentives like $USDC on Moonwell.

Recently, the points-farming craze spilled over to Contango, as point-yielding assets were made available on money markets, like sUSDe on Morpho Blue, and as a consequence users started looping on them via Contango.

A multi-chain and multi-protocol approach

Contango is composable by design. It can offer a trading pair on any chain as long as there is a spot and a lending market for that. Exceptions can arise when the assets used for a specific pair are available in isolation mode and/or can’t be used as collateral on the underlying money market.

Currently you can choose among 6 chains, 13 money markets and more than +160 trading pairs. The ability to trade the same instrument on different markets and chains is great for diversification purposes too. Contango plans to integrate different money markets across multiple chains to expand its pair offering as much as possible. Don’t see a chain, money market or an asset you’d love to trade on? Just tell us.

Risks

Beside the obvious risks related to trading, when using Contango you should consider the following aspects:

  • Underlying liquidity. Contango aggregates liquidity from the different money markets it integrates. As a result, traders are exposed to the liquidity of the market they chose to trade on. This aspect should be taken into account when opening and closing a position. Unexpected liquidity crunches are driven by market forces and as such cannot be foreseen nor controlled by Contango.
  • Displayed APY/ROE. Contango always shows the APY/ROE rates using the underlying protocol data coming from their smart contracts or official APIs. However, please note even official API sources might not necessarily reflect real on-chain yields: in some cases Contango.
  • Multi-layered smart contract risk. Even if fully audited, smart contracts can be hacked and exploited anytime. Contango has never released unaudited code in production. Each integration with the underlying money markets has been audited, as well as the main contracts. Please bear in mind that, when trading on Contango, you expose yourself to several layers of smart contracts risks.
  • Multisig risk. At this stage, Contango is not yet a fully decentralized and immutable protocol. Core team members can upgrade the smart contracts via a 3 out of 5 multisig. However, the team is fully doxxed and supported by reputable investors and angels.

More details on risks can be found here.

About Contango

Contango lets you loop anything on-chain. You can create leverage (re)staking positions, arb rates differentials, farm points, or simply go long or short like a perp at low funding. Ape in like a degen with 1-click Strategies, or trade like a pro on the sleek Trade interface.

Website | Twitter | Discord | Docs | Blog

--

--