DeFi & Options
DOPEX ESSENTIALS: STABLECOIN EXPLAINER
This article was last updated Late May 2022. Any changes to regulation since then have NOT been considered in this discussion.
Any keen cryptographic currency enthusiast would have come across a growing collection of tokens that have been deemed by the experts as so-called “stablecoins”. They are named for their intended ability to maintain their value (or ‘peg’) to 1 United States Dollar.
However, not all stablecoins are created equal and this plays a key role in their ability to achieve this goal. This will be a whirlwind tour through some of the different stablecoin designs and the importance of deep liquidity in maintaining their peg.
Let’s not pump OR dump that dollar parity, Employees!
There are more stablecoins around than the CEO can count on one hand. Since he has five fingers per hand there are at least five different stablecoins.
Stablecoin design refers to how stablecoins are minted into circulation and is one of the most important factors in determining how strong its peg to 1 USD is. Whilst there are an abundance of stablecoins, they typically fall into one of the following categories:
Only four main designs? Incredible, I can count these on a single hand!
Fiat collateralized stablecoins include USDC, USDT, and BUSD. Let’s use USDC for this explanation for the sake of simplicity.
Fiat-collateralized stablecoins are quite simple to understand:
- You give X USD to a centralized custodian.
- You receive X fiat-collateralized stablecoins that are newly minted.
This means that every 1 USDC is expected to be fully backed by a combination of US dollars and cash market instruments (like treasury notes etc.). At any time, a holder should be able to redeem USDC for the underlying fiat deposit.
You see USDC for 0.98 USD? You buy that bad boy up because that is an 0.02 USD arbitrage opportunity.
This makes fiat-collateralized stablecoins one of the most de-peg resistant designs. However, it should be noted that fiat deposits are stored by a centralized custodian. This does create a single point of failure that may be susceptible to regulations and requires the users to trust the audits and company reports.
Overcollateralized stablecoins include DAI, MIM, and pUSD.
The process for overcollateralized minting is as follows:
- You deposit > X (USD value) of collateral.
- You mint X (USD value) of overcollateralized stablecoins that are newly minted.
This means that every 1 overcollateralized stablecoin should be backed by more than 1 USD worth of collateral. The collateral that can be used differs between protocols - DAI can be minted from ERC-20 tokens such as ETH and wBTC whilst pUSD can be minted using certain NFTs.
Over-collateralized stablecoin protocols are essentially specialized lending markets that let you borrow stablecoins whilst holding your tokens as collateral. If the value of your collateral drops to a point where you are liquidated, your collateral can be seized and sold to ensure the stablecoin remains properly collateralized.
Over-collateralization is deemed necessary for cryptocurrency-backed stablecoins since liquidation on-chain is an imperfect process. Transaction delays and slippage may affect the ability of collateral to be sold at current market price. Over-collateralization provides the necessary buffer against this.
Over-collateralization is a battle-tested design. Earlier this year, there was significant FUD regarding the stablecoin MIM which did result in a moderate deviation in its price. Despite this, MIM only dipped to ~98c and its peg has been roughly maintained ever since.
Algorithmic stablecoins use economic theory rather than collateral to back their stablecoin. The most well known of these projects is the dastardly Terra, which used a two token system of LUNA/UST to maintain their peg.
Terra always allows 1 UST to be exchanged for $1 of LUNA and $1 of LUNA to always be exchanged for 1 UST. This means that in the event of a depeg:
- If UST < $1, UST can be burned for $1 LUNA which decreases UST’s circulating supply to repeg upwards.
- If UST > $1, LUNA can be burned for 1 UST which increases UST’s circulating supply to repeg downwards.
How safe is it? Allow me to direct you towards CoinMarketCap, an exceptional site that aggregates price data of different coins. The CEO salutes his fallen brethren.
This is not to say that algorithmic stablecoins can never work, just that the perfect design is yet to be concocted.
Fractionally-collateralized stablecoins combine aspects of both collateralized and algorithmic designs. FRAX is the most well-known fractionally collateralized stablecoin and is primarily backed by USDC whilst the remainder is backed by mint-and-burn of FXS, Frax’s native token.
Frax implements a ‘Collateral Ratio’, which determines what proportion of FRAX is backed by USDC. For example, at a 95% collateral ratio, 1 FRAX can be redeemed for 95c USDC and 5c of FXS. This allows for a similar type of arbitrage as pure algorithmic coins if the value of 1 Frax deviates from 1 USD.
FRAX and the underlying USDC collateral is deployed to various protocols such as AMMs and lending markets to generate revenue. As revenue increases, this means the backing of FRAX also increases which allows new FRAX to be minted.
Fractionally-collateralized stablecoins have never experienced significant depeg events. Careful control of collateral ratios, stablecoin deployment, and backing accrual have been key to this.
Truly incredible. What a diverse collection of stablecoin designs. Now that you have this stablecoin, what good is it if you can’t buy anything with it? This is where our next section comes in.
An article regarding stablecoins is not complete without a discussion of Curve Finance, a protocol that has been explored in a general context in our recent Curve Explainer. Curve finance is an automated market maker (AMM) that specializes in high volume low slippage swaps for pegged assets, making it the perfect location to swap between different flavors of stablecoin.
Imagine you are a JPEG’d user who deposits their NFT to mint pUSD. pUSD itself has limited utility since there are no DEXs or farms that accept it (other than Curve itself). A pUSD holder can go to Curve and exchange their pUSD for USDC via the pUSD-3CRV pool. USDC is widely accepted across DeFi protocols, allowing a user to transact on DEXs or access farming opportunities. Deep Curve liquidity means pUSD holders aren’t holding a useless stablecoin but rather one that allows them to access the entire DeFi landscape via USDC.
Excellent, Curve liquidity is important. But how does this so-called ‘deep liquidity’ even work?
AMMs accept tokens from liquidity providers in order to create trading markets. Tokens are typically paired together to form a liquidity pool. The price of an asset from an AMM depends on the formula the AMM uses.
Constant Sum Formula
Some AMMs use something known as the Constant Sum Formula, pictured below:
All you need to know is that the Token X, Y, or Z will always be exchangeable for the same amount of one of the other tokens.
Applied to stablecoins, this means that 1 USDC = 1 USDT = 1 dpxUSD.
For assets that are meant to be pegged, this makes swapping between stablecoins slippage free. Incredible!
Constant Product Formula
Other AMMs use something known as the Constant Product Formula, pictured below:
All you need to know is that the price of a token changes depending on the balance of Token X and Token Y that are deposited. If people are buying Token X (which means some Token X is removed by the buyer in exchange for Token Y) the ratio of Token X:Token Y decreasses, causing Token X to increase in price.
For unpegged assets, this is important for price discovery - as more of one token is being purchased, it makes sense for its price to appreciate.
For stablecoins that are supposed to remain pegged, however, the constant product formula can result in stablecoins trading at an ‘incorrect’ price.
Understanding Curve AMM
Constant Sum good, Constant Product bad?
The constant sum formula is effective provided a stablecoin’s design (see above) is not compromised, which would warrant its price to slip from its peg. Using the recent Luna debacle as an example, if UST was widely circulated on AMMs using a constant sum formula, traders would rush to dump their useless UST for stablecoins that are properly pegged (e.g. USDC). This would mean that LPs would only be able to withdraw the significantly devalued UST rather than their original deposit. The constant sum formula can actually be a dangerous design for LPs since it does not properly account for depegging events.
The constant product formula is not ideal for stablecoins since an unbalance in a pool would result in a stablecoin quickly depegging. However, in the event a stablecoin has actually depegged, it is necessary for the AMM to recognise this and quote the appropriate price.
Curve AMM combines both of the above approaches in its design.
How in Nu’s name does it do this? With whatever monstrosity this is, of course.
CEO is not going to pretend he knows how to read this. What he can do is explain how it works.
Whilst the liquidity pool remains sufficiently balanced, stablecoins can be swapped for close to zero price impact by taking the constant sum formula within a range of balances.
Once the liquidity pool becomes sufficiently imbalanced, the Curve takes on characteristics of the constant product formula which means that additional purchases of the high demand stablecoin will increase its price (and the price of the low demand stablecoin will decrease). In the event of a depeg, if a holder wants to exchange their stablecoin, they will receive less than $1 worth of another stablecoin.
But Mr. CEO, what in the devil’s name do you mean by ‘sufficiently imbalanced’?
Curve uses something known as an ‘A-Factor’ that determines how large the imbalance in the trading pool has to be before the constant product formula (and thus slippage) takes proper effect. The monstrosity of a formula featured in Curve’s Approach can be rewritten as below, with the A-factor representing an amplifier of the constant sum formula component:
Different pools have different A-factors which mean they can tolerate different degrees of imbalances within the pool before the effects of the constant product formula are large enough to generate noticeable slippage. This allows CurveDAO to adjust the slippage cost of individual pools.
Stablecoins that are perceived to be safe have a very high A-factor which allows greater imbalances between the tokens before traders experience slippage.
Stablecoins that are perceived to be unsafe will have a low A-factor which means that less imbalance between tokens is necessary before traders experience slippage.
This allows Curve to adjust for the underlying risk of different stablecoins by modifying the A-factor to accommodate for depeg price changes. Using the recent UST depeg as an example, traders that sold 1 UST early (which adds UST and removes another stablecoin from the pool) would receive 1 USDC (for example). As traders continued to sell UST and buy USDC, the pool would become increasingly imbalanced meaning the constant product formula would kick in and each UST would be redeemable for less of the other stablecoins.
“Oh I see my Esteemed Leader. Now explain the importance of Deep Liquidity to me like I am redacted please!”
The effect of the constant product formula on a Curve pool is only really felt when there is sufficient imbalance between the deposited tokens. The notion of ‘imbalance’ is based on proportions.
If we take 70:30 as the ratio required for slippage to be felt by traders, if a pool has $10m TVL then $4m difference (7m vs 3m = 70:30) in the deposited tokens would cause traders to experience slippage. Now if the pool has $1b TVL, a $400m imbalance (700m vs 300m = 70:30) would be needed for the same effect.
This is why deep liquidity is very important to a stablecoin that wants to maintain their peg. The deeper the liquidity (higher the TVL), the more transactions the trading pool can absorb before slippage will become an issue. For stablecoins that aim to be widely circulated, this is essential to their success.
So-called “Dopex” has not kept it a secret that we shall soon be launching our own stablecoin. Whilst the CEO would love to discuss it in detail today, what was meant to be a short article has quickly become a novel.
The Dopex tie-in to this stablecoin discussion will feature in an upcoming article. Before that is released, try to familiarize yourself with the contents of this novel and think about how our stablecoin is designed and how deep Curve liquidity will be achieved to maintain our peg.
Sometimes stablecoin knowledge comes out of places you’d least expect it. Truly profound, esteemed Lil Uzi Vert.
Until next time, my loyal students.
CEO (Chief Education Officer)
Any likeness to real life individuals is purely coincidental
Dopex is a decentralized options protocol that aims to maximize liquidity, minimize losses for option writers and maximize gains for option buyers — all in a passive manner. Dopex uses option pools to allow anyone to earn a yield passively. Offering value to both option sellers and buyers by ensuring fair and optimized option prices across all strike prices and expiries. This is thanks to our own innovative and state-of-the-art option pricing model that replicates volatility smiles.
Follow our official social media accounts and visit our website to stay up to date with everything Dopex.
Be careful of fake Telegram groups, Discord servers and Twitter accounts trying to impersonate Dopex.