The mStable protocol pools stablecoins of similar value. For example, mUSD
will pool USD stablecoins, mBTC
would pool tokenised BTC and so on. These stablecoins are selected by Meta Governors and are deemed to have adequate security guarantees against peg loss. This has important implications, one being: any deviation from the peg of an underlying asset is highly likely to be impermanent.
Take USD stablecoins as an example. Say we allow 4 USD stablecoins in the basket. These stablecoins will constantly move slightly from their $1.00 peg, but over time they are very likely to trade around $1.00. For any given period, each stablecoin's price over time will will look something like this:
Price of USDC. source: Messari
So far, the peg deviations of major USD stablecoins have been impermanent. Since these losses are impermanent, we can allow our bonding curve to be constant, namely:
q(x)+q(y)=k
Therefore, the USD stablecoins can be exchanged 1 for 1, a constant bonding curve. The slope is constant, meaning price is independent of supplies of coin x and coin y.
In summary:
Apart from a trading fee, there is zero slippage trading stablecoins and tokenised assets on mStable. Price remains the same independent of assets in the basket.
Since assets are interchangeable, mStable allows minting and redemption of any coin instead of the exact basket (as long as max weights are not breached).
The swap
function can be used to arbitrage between bAssets when a spread exists. This will occur when:
When the price differential is greater than the swap fee plus its gas (Ethereum transation fee) cost.
There is excess room in the system between a bAsset and its max weights to allow mStable to take on more of that undervalued asset.
Swaps that would push a bAsset above its max weight are not allowed. Swaps that do not affect the bAsset at maximum weight are unaffected.
Swap fees are a flat fee, charged in the asset received by a user. These fees are set by Meta Governors.