mStable — Introducing Constant Sum Bonding Curves for Tokenised Assets

Henrik Andersson, CFA
mStable
Published in
5 min readMay 26, 2020

Please note that this may contain out of date information about the state of the mStable protocol. See docs.mstable.org for up to date information.

Background

Uniswap has become a very popular Decentralised Exchange (DEX) using the Automated Market Making (AMM) model. Instead of an order book, it is built using the concept of a bonding curve and liquidity providers. In order to determine the price for a coin swap on Uniswap, it is using a constant product, an invariant. The formula is:

q(x)*q(y)=k

q(x) and q(y) are quantities of coin x and coin y, k is the invariant. The constant k stays the same before and after a trader swaps one asset for another, it only changes as a liquidity provider adds or subtracts liquidity.

This is a visualisation of the curve in relation of the quantities of coin x and coin y.

Source: https://medium.com/@dsenchenko/impermanent-losses-in-uniswap-like-markets-4315359ea9b1

As we can see from the graph above, the price of coin x becomes more expensive (see how the slope of the curve is more steep to the left in the chart above) expressed in coin y as there is less of coin x in the pool.

As a function of this model, liquidity providers have to supply both coin x and coin y in the correct ratio. Another function of this model is that for a small trade, the slippage is small. On the other hand for a moderately sized trade in comparison to the pool size, the slippage is large. In other words, from a price-perspective the bonding curve is inefficient unless you like to trade a small amount and you don’t ‘move the market’. It also means that liquidity pools using a curve like this will need a significant amount of liquidity before they become very useful — otherwise slippage is just too high. In order words, they are hard to scale.

Introducing Zero-Slippage Swaps

In mStable we are pooling tokenised assets with similar value. For example, mUSD will pool USD stablecoins, mBTC will pool tokenised BTC and so on. This has some important implications, one being; any deviation from the peg is highly likely to be impermanent because they represent the same asset.

Take the example with USD stablecoins. Say we allow 4 different USD stablecoins in the pool. They will all fluctuate slightly from the $1.00 peg, but over time they are very likely to trade around $1.00. For any given time period, each stablecoin will will look something like this:

Price of USDC, source: Coinmarketcap.com

Since losses are only impermanent (asset prices revert back to the mean), we can allow our bonding curve to be a constant sum, namely;

q(x)+q(y)=k

That is to say we can allow these pooled assets to be exchanged 1 for 1. This is what our constant sum bonding curve looks like:

Slope is constant, meaning price is independent of supplies of coin x and coin y

In other words:

  • Apart from a trading fee, there is zero slippage trading tokenised assets on mStable, price remains the same independently of assets in the pool. It also scales from day 1 as prices are not dependent on the amount of liquidity in the pool
  • Since assets are interchangeable, we can allow minting and redemption of any coin instead of the exact basket

We believe this has the potential to create the most used protocol for trading these kind of assets, generating income for the holders of these new assets.

Risk-Management

We don’t believe today’s AMMs are able to mitigate the risk of a permanent loss.

We said that losses are highly likely to be impermanent. What happens if they are not and how do we reduce risk in this system?

  • The system will be backstopped by a governance/protocol token, Meta. If the system detects a permanent loss (importantly, completely oracleless, this is done through a human decision), Meta can be used to recollateralize the system.
  • Each asset will have a maximum weight in the basket, limiting the maximum loss in the event of a permanent loss. Maximum weights will ultimately be set by the governors of the system, the Meta token holders

mAssets are First-Class Citizens

Importantly, and unlike other protocols using pools, we don’t see liquidity providers as mere pool share owners. The goal of the meta-assets are to be regarded as assets in the own right. In fact, we like these assets to be the most attractive tokenised assets in their category on the market. Owners of these mStable assets hold an asset that;

  • Earns a yield through trading fees on our zero slippage exchange
  • Is lent out, earning an additional yield on markets such as Compound and AAVE
  • Is effectively overcollateralised by Meta
  • Has a price that stays at the peg as trading fees and lending income are paid out as interest. Income doesn’t accumulate in the price like is the case for UNI-V1 tokens or cTokens

mUSD is in our view a first-class asset — not just a share in a liquidity pool. The underlying assets for meta-asset holders will drastically change with price fluctuations but over time these assets will be worth close to the peg. In the meantime, holders will harvest the volatility in the underlying assets by earning the trading fees generated.

In Summary

We can ‘afford’ constant bonding curves thanks to the overcollateralisation in the system from Meta. Meta also enables decentralised governance of the system and it balances holder’s interest in growing the mStable ecosystem with their risk aversion stemming from their skin-in-the-game.

Crucial, the backing for Meta token is not dependent on a single meta-asset since that would increase the risk of a negative-spiral in the case of an asset’s permanent peg loss. Instead, it is supported with a small fee across all meta-assets, mUSD, mBTC etc. A diversifying backing making mStable an anti-fragile tokenised asset protocol.

Thanks to Linda Xie, Sidney Powell and the mStable team for reviewing this post, all mistakes are mine.

*This post was updated in September 2020 to reflect changes made to the platform

Henrik Andersson is Co-Founder of mStable and the Chief Investment Officer at Apollo Capital.

--

--

Henrik Andersson, CFA
mStable

Co-founder and CIO Apollo Capital, Australia’s leading crypto asset investment firm. www.apollocap.io