An update on Anchor(Terra money market)

Pleased to share the current state of Anchor’s design.

For better undertanding, please check here for Anchor v1.

In designing Anchor, we discovered a trade-off between the robustness of a money market and its capital efficiency. Robustness, here, represents the probability of principal guarantee during a massive price fall of CDP assets. Capital efficiency is the borrowing capacity of the money market, i.e. a money market with more capital efficiency translates to higher borrowing capacity. If we want a high probability of principal guarantee during the massive price fall, borrowing capacity must be set low to ensure that the liquidation cost does not harm the borrowed asset. On the other hand, if we want higher borrowing capacity, we reduce the probability of principal guarantee against large price falls.

This post describe Anchor v2 and Anchor v2.1, which attempt to resolve this dilemma.

Anchor v2 uses Terra protocol’s builtin Swap function (in the market module) for liquidations. For robustness, Anchor v2 suggests a maximum spread fee for swaps. As we set the maximum spread for swaps, this will make high principle guarantee. But the problem is that the goal of the swap functionality isn’t aligned with that of Anchor — on-chain swaps are used in the stability mechanism for Terra stablecoins. We shouldn’t have to make changes to the protocol layer design for this specific application.

Anchor v2.1 introduces using put options to cover CDPs. In this scheme, borrowers purchase put options that cover 100% of their borrowing position. As all CDPs are covered by put options, we can provide principal guarantee for the borrowed assets. However, the complexity of our money market structure and the requirement of purchasing put options may disincentivize borrowers to create such positions.

We much look forward to your feedback, this is a work in progress.

Anchor v2

Motivation

We want to allow users to earn interest on Terra assets. Some use cases are:

  • Deposit accounts → a user can earn interest on assets they are not currently using. This allows users to generate passive income by holding stablecoins, and makes Terra an attractive store-of-value.
  • Short assets (stablecoin collateral, borrow assets) → a user can use Terra stablecoins as collateral to borrow Luna, sell Luna, and short Luna.
  • Leverage long assets (asset collateral, borrow more assets) → a user can put up an asset, borrow stablecoins, and use stablecoins to purchase assets.

System overview

Anchor is a money market smart contract on Terra that allows for frictionless borrowing of Terra assets (stablecoins, synthetic assets, and Luna). This system is inspired by the Compound Protocol on Ethereum.

  • Anchor defines a unique money market for each of the Terra assets. For each market for asset A:
    • Lenders can deposit A to the market in a liquidity pool LP and mint cTokens that represent fractional ownership of the assets in the pool. As value accrues to the LP from interest payments, cTokens represent an increasing ownership of the assets in the pool.
  • Borrowers can open a debt position collateralized by any cTokens and borrow any Terra assets, provided that the sum of the value of the user’s underlying token balances, multiplied by the collateral factor, “the borrow capacity” does not exceed the current value of their outstanding loans. The borrow capacity is determined by 1 minus the maximum swap spread of the asset in reference to the collateral asset - for now, let’s assume this is 0.8.
  • Borrowers pay interest in accordance with a demand curve enforced by the protocol. The various parameters of the demand curve can be changed via governance. The interest rate paid by borrowers goes up when borrowing demand is high, and it is low when demand is low. For example, a demand curve for a particular market could be = a + # of borrowed tokens / ( # of tokens in the LP + # of borrowed tokens) * b, where a and b are some constants. The lending interest is implicit - that is, the amount of borrower interest generated is split pro rata among the lenders with open deposits.
  • In the case of liquidation, the cToken collateral is simply redeemed in whole to the underlying token, which is then swapped to the borrowed asset to guarantee the deposit of the lender. In most cases, the liquidation will redeem tokens in excess of the loan (as swap spreads in most cases will be below the maximum), in which case the tokens get swapped to Luna then sent to a reserve_pool , and then staked. The staking rewards from the reserve pool go to subsidize lender interest rate for each of the reward denominations (KRT, UST, etc).
  • Any asset whitelisted by governance on the Terra protocol are supported by Anchor.

Reason for changes from v1

  • Remove reliance on bLuna → Minting bLuna adds significant implementation challenges, it can be punted to a later version once the system is live. Adding bLuna at a later time would be trivial.

Advantages of Anchor

  1. Native swaps offer superior UX to liquidations involving third parties → Terra assets can be swapped with each other without requiring a counterparty. This eliminates the risk of Black Thursday MakerDao and Compound failures when third parties refused to liquidate ETH collateral as its price was falling too quickly.
  2. LTV ratios can be significantly higher → Given that the system can swap on-chain, the LTV of loans can be significantly higher (1 - max_swap_spread), leading to less capital efficiency vs. other platforms

Anchor v2.1

System overview

  • Anchor defines a unique money market for each of the Terra assets. For each market for asset A:
    • Lenders can deposit A to the market in a liquidity pool LP and mint cTokens that represent fractional ownership of the assets in the pool. As value accrues to the LP from interest payments, cTokens represent an increasing ownership of the assets in the pool.
  • Borrowers can open a debt position collateralized by any cTokens. But there is one constraint for opening a debt position. The borrowers have to buy put option token that covers 100% of their debt position from the market after paying premium to the option seller. The borrower sends cToken and put option token to the Anchor contract to create a borrowing position. We call this position as Covered Debt Position(CoDP). By creating a CoDP, the maximum borrowing capacity will be 100%(Strictly speaking, amount of underlying asset guaranteed by put option * strike price of underlying asset, and the amount of underlying asset guaranteed by put option cannot exceed the current amount of their collateral)
  • Options can be bought from the option market. Option market is permissionless so anyone can be the option seller and buyer at the option market. In case of the creating a new option, the option seller send transaction that includes the asset type, strike price, maximum size, maturtity(due date) and reserve asset(Strike price * size). The option market lock reserve asset and mint option token for option seller. The option buyer buys option by paying premium price. If the option buyer want to exercise option, they book exercising by sending asset and option token to the option market before the due date, the option buyer can withdraw their option token and asset before the due date to cancel booking. If there is option token and asset at the due date, the option market contract exercise option by sending option buyer’s asset to the option seller and sending the reserve asset to the deposit pool.
  • Borrowers pay interest in accordance with a demand curve enforced by the protocol. The various parameters of the demand curve can be changed via governance. The interest rate paid by borrowers goes up when borrowing demand is high, and it is low when demand is low. For example, a demand curve for a particular market could be = a + # of borrowed tokens / ( # of tokens in the LP + # of borrowed tokens) * b, where a and b are some constants. The lending interest is implicit - that is, the amount of borrower interest generated is split pro rata among the lenders with open deposits.
  • As all CoDP covered by individual put option, there’s no margin call during the price fall.
  • Any asset whitelisted by governance on the Terra protocol are supported by Anchor.

Reason for changes from v2

  • Remove reliance on swap for liquidation(v2) → If we rely on the swap for the liquidation, we cannot scale our money market. As our money market scales, the risk of liquidation will grow in terms of size and frequency. But, the grow of money market does not guarantee the liquidity improvement of swap. As the money market and the swap does not align, using swap for money market liquidation is not a good choice.

Advantages of Anchor

  1. No thrid party liquidation by using put option → This eliminates the risk of Black Thursday MakerDao and Compound failures when third parties refused to liquidate ETH collateral as its price was falling too quickly.
  2. LTV ratios can be significantly higher → Given that the system use CoDP , the LTV of loans can be significantly higher , leading to less capital efficiency vs. other platforms
4 Likes

Very exciting stuff here! Can’t wait to try it out when it’s ready.

Thank you @EJ_Lee for sharing the proposal. A great one indeed.

I have a question: how can we incentivize market makers to generate sufficient market depth of options of Luna? I feel a significant portion of this proposal is based on the assumption that borrowers will be able to buy options for their assets under collateral with a reasonable price.

It looks like at the moment, crypto options market still primarily focuses on BTC and ETH.

True, that was one of our main concern. Even like BTC, ETH options have relatively low liquidity, It will be really challenging to create liquid Luna option market.

Also, considering current volatility of Luna, the put option premium for Luna will be extremely high. As our v2.1 design require borrower to buy put option, the high price of Luna put option will disincentivize user to borrow asset from market.

We are working on different design, will share it soon!

1 Like

I wonder though, if you constrain the liquidation for options to specific events (not free to be exercised at any time) you could make the premiums lower. Consider the following:

  • Recall that anchor’s v2.1 design forces the Terra borrower to create a CDP collateralized with Luna and fully covered with a put option.
  • If the option is “vanilla”, the option buyer will exercise it whenever Luna spot price < option price at any time prior to maturity.
  • If you have an option where the put option can only be triggered by a withdrawal of Terra deposits on Anchor (to facilitate the withdrawal), then the risk profile becomes different. The Terra depositor is agnostic to changes in Luna price, so the option seller’s risk is a joincidence of there being high demand for Terra withdrawals && Luna prices falling below the price specified in the option.

There’s something here.

1 Like

Have you considered an optional identity layer as a hedge against regulatory risk?

Its difficult to respond if you dont specify what type of regulatory risk you are talking about

Most compliance programs need to tie transactions to identity. The most important are those related to anti-money laundering (AML) and counter-terrorism vis-a-vis organizations like FINCEN and FATF.

Here’s a good video to watch from the Consensus 2019 conference:

So I think at the contract or protocol level it makes sense to have organizations be able to have some sort of identity layer to identify their counterparties so that, for example, they know they aren’t facilitating transactions with a terrorist organization.

I think thats more of a role for the clients that build on top of the protocol. Until Bitcoin builds a KYC layer and mandate all transactions to go through that, neither will Terra.

2 Likes