Stablecoins have been the much touted killer app of crypto. Even after the collapse of UST there are more than $160 bio of stablecoins of all shapes and sizes in circulation. To put it simply, stablecoins provide all the stability of fiat currency (most of the time) with all the efficiency, dis-intermediation and composability that smart contract blockchains provide.
Not all stablecoins are created equally; something that was made very clear during the UST collapse. Broadly speaking stablecoins can be split into the below categories based on their underlying mechanism:
A. Centralised and Fiat Currency Backed:
- Think USDC, USDT and BUSD.
- Each coin in circulation is backed by $ in a bank account and/or liquid dollar assets (t-bills/treasuries etc.).
- Coins should always be redeemable for fiat dollars.
- Trust of the issuing entity is required.
B. Decentralised and Over-collateralised:
- MIM, DAI, alUSD etc.
- Coins are created by allowing users to borrow the stablecoin against various types of collateral (ETH, BTC, other stablecoins etc.).
- All coins in circulation are therefore backed by a basket of crypto collateral.
- If the value of a user's collateral drops below a threshold, their collateral will get liquidated ensuring that the stablecoin remains fully backed.
- Redeemable in the sense that if the stablecoin drops below $1 a user can repay their debt at a discount.
C. Decentralised and Algorithmic:
- Basis, Empty Set Dollar, USDN and UST
- These algorithmic stablecoins don't have explicit collateral backing them and rather rely on a two-token system and arbitrage mechanisms to maintain a $1 peg.
- In the case of UST, UST was the stablecoin and it could be redeemed for $1 of LUNA. Vice versa, a $1 of LUNA could be burnt in order to mint 1 UST.
- The idea is that if the stablecoin is trading below $1, participants are incentivised to purchase the cheap UST, exchange it for $1 of LUNA and sell the LUNA on the market locking in a profit. Vice versa if the stablecoin trades at a premium.
- The stablecoin ultimately becomes backed by the value of the alternative token as the arbitrage only works if other participants are willing to bid for Luna.
D. Decentralised and Partially Collateralised
- IRON, FRAX etc.
- These stablecoins look to combine the approaches in B. and C.
- They are partially collateralised by other stablecoins (such as USDC) and the remaining is backed by the second token in the two-token system used by pure algo-stables.
The unwillingness to rely on centralised stablecoin issuers whose assets live off chain and are not censorship resistant has led to a proliferation of decentralised stablecoin projects. We now have everything from aUSD-zUSD, USDa-USDz and many others.
The differences between these various stablecoins boil down to the collateral backing them as well the underlying minting and redeeming mechanism. Although the mechanisms may differ, the main goal of all stablecoins is to expand their supply and be widely used.
A key mechanism for protocols trying to expand the supply of their stablecoin is establishing a liquid market for it in order to reduce frictions for participants looking to buy and sell the stablecoin. The existence of this liquidity is also an important part of giving users confidence that they can exchange the stablecoin for $1 of assets in the future. The advent of Curve has provided protocols with a simple way of bootstrapping liquidity for their stablecoin while at the same time increasing demand.
Anyone can create a liquidity pool on Curve. The protocol can direct CRV (and as a result CVX) emissions to their pool via bribes or protocol-owned veCRV votes. Liquidity providers are then incentivised to deploy capital to the pool in order to capture these emissions/yield.
However, this does not come without risks. Liquidity providers are taking on significant risk to the stablecoin in return for yield. It is still imperative that underlying risks of the stablecoin mechanism are well understood and evaluated against the yield available. While 30% APY may sound juicy, even a minor depeg event can result in a net loss. That being said, liquidity provision to the right pools at the right time can present significant opportunities.
Given the abundance of stablecoin pools available, varying levels of yield on offer as well as the constantly changing DeFi risk landscape (think death spirals and rug pulls); seeking yield on your stablecoins is no longer a set and forget strategy. Brahma’s Stablecoin Risk Framework and continuous monitoring infrastructure has been developed to overcome this. To better understand the need for this framework the implosion of UST is used as a case study.
UST Collapse: Motivating for a formal framework
In the aftermath of the collapse of UST every man and his dog has explained how they knew it would collapse.
Simply put, UST was backed by the value of the Luna token as well as the ability of the LFG (a reasonably well-funded and well-connected peg defence entity) to support the peg. UST seemed to have spectacularly solved the demand issue facing other traditional stablecoins by offering 20% yield to depositors. Deep liquidity for UST on Curve was created via a combination of bribes and CVX purchases to direct emissions to the UST pool which further improved demand. At its peak, the UST pool was among the largest on Curve with $1.3bln of liquidity offering liquidity providers around 15% yield.
These yields were very attractive to capital allocators at the time given that typical Defi yields were compressing. Not many questioned whether the higher yields were sufficient to compensate for the underlying risks inherent to the UST mechanism. Indeed, Brahma’s own PMUSDC DegenVault had allocated base capital to the UST pool in Curve in order to capture these yields. The final outcome is well-known, a bank run on UST began and ignited the death-spiral wiping out billions of dollars of value. So how did Brahma’s PMUSDC vault survive? And what lessons did it provide?
For that, we focus on the dynamics at play in the UST Curve pool in the lead-up to the collapse. Key factors in stablecoin liquidity pools are the amount of liquidity in the pool as well as how balanced that liquidity is. Looking at the pool balance proportions since its creation we note that most of the time the pool actually had too little UST indicating excess demand for it - stemming from the attractive yields on offer.
However, all those months of stability counted for nothing when the pool went completely imbalanced in a matter of hours on the 8th and 9th of May. Zooming into the final days tells a more detailed picture.
In the late hours of Saturday the 7th of May, the first real sign of stress appeared with the pool reaching close to 80% imbalanced with UST. The LFG began to deploy their peg defence funds and by Sunday afternoon the pool was nearly perfectly balanced again (albeit with significantly less liquidity than before). From then it was pretty much one-way traffic as users rushed for the exit and continued to dump UST into the pool in exchange for the other stablecoins. By Monday night, pretty much the entire pool had been drained of exit liquidity.
Looking at the actual pool balances provides further insight. In that initial Saturday evening stress, $390m of USDC/USDT/DAI had been drained from the pool - more than 65% of the pool's $580m of exit liquidity from that Friday. The LFG managed to restore the pool balance proportions on Sunday but the amount of exit liquidity available then was still only $400m. In hindsight, this was a drop in the ocean compared to the roughly $18bln of UST in circulation and so it was quickly drained in the coming hours.
Like many other yield vaults, Brahma’s PMUSDC DegenVault had deployed capital to the UST pool in order to generate high base yields. The underlying mechanism of UST was well understood and the resulting death spiral risks were acknowledged and evaluated against the strength of LFG balance sheet as well as the vested interests of a number of large market makers. The initial indications of curve pool stress were monitored and the resulting response from LFG was noted. When the LFG actions did little to restore the market confidence in the peg and it became clear that the reserves were not nearly significant enough to defend the peg given the broader macro backdrop and the decision was made to exit the pool on Monday evening. This was before the significant depeg occurred resulting in a good outcome for the vault, any later and capital losses would have been catastrophic.
The following key takeaways were identified:
- It is imperative to understand the underlying stablecoin reserves as well as minting and burning mechanism
- If one wasn’t aware of the UST death spiral risks then the Curve pool dynamics would not have been monitored so closely
- Exit Liquidity amounts need to be contextualised against the circulating stablecoin supply
- At the time $600m of exit liquidity in the pool seemed like a lot. However, it disappeared quickly because of how large the circulating supply was.
- Curve stablecoin pool liquidity dynamics and flows can provide key insight into the health of a stablecoin.
Stablecoin Risk Framework
While PMUSDC survived the UST collapse semi-unscathed, Brahma decided it was necessary to create a more formal risk and monitoring framework for stablecoins. The framework was developed in order to manage base capital allocation in stablecoin pools more efficiently and deliberately.
The current framework is centred around being an LP in curve liquidity pools due to the current PMUSDC vault architecture. However, it can easily be extended to include alternate base capital allocations in the future.
The framework is driven by 2 key aims:
- Mitigate capital risks
- Generate the best sustainable returns
Each potential stablecoin pool is first evaluated against a set of qualitative factors. These qualitative factors include the following:
- Underlying stablecoin mechanism and redeemability
- Protocol history - vulnerabilities, team, transparency etc.
- Yield sustainability
- Demand sources/current use cases
Using a tiering approach, these qualitative factors are used to create the universe of stablecoins that are investable as base pools for the PMUSDC vault.
The investable stablecoins are then evaluated against quantitative metrics which include:
- Pool Exit Liquidity
- The amount of exit liquidity relative to the external circulating stablecoin supply
- The resilience of the peg to shocks
- Swap simulations are performed on the current stablecoin pool to determine the amount of volume required to depeg the stablecoin by a certain amount
- The depeg volumes are evaluated against the external circulating stablecoin supply
- Withdrawal Slippage
- Takes into account the current proportions of the curve pool and the cost of removing USDC liquidity.
- Entry and Exit Slippage
- The cost of round-tripping assets into and out of the pool. Every basis point counts in this low-yield environment.
The quantitative factors are used to determine the overall “health” of the stablecoin pool.
After evaluating the quantitative metrics of each investable stablecoin pool a final rating is allocated together with the currently available yield. These ratings then drive the final allocation of capital to the pools.
Capital is allocated to multiple pools in order to diversify underlying stablecoin exposure. However, due to the current compression of Defi yields, most pools offer very similar returns and so diversification for the sake of diversification is avoided.
The initial allocation of capital is only one of the functions of the Risk Framework. The risk landscape in Defi can change incredibly quickly as was evident in the UST collapse. The continuous monitoring of risk parameters, therefore, plays a crucial role in mitigating capital risks.
Brahma’s Stablecoin Risk Framework seeks to leverage the transparency that Defi provides by continuously monitoring the above-mentioned Quantitative Factors for the stablecoin pools in which PMUSDC is allocated to. All necessary pool and token information is collected from on-chain in real-time. Brahma’s Python implementation of Curve’s stableswap allows for a much more comprehensive analysis of stablecoin pool risks. The state of a liquidity pool can be modelled by simulating swaps to determine how the pool will respond in stress events. Key risk parameters such as the amount of volume required to depeg a coin by a certain percentage are obtained using these simulations.
Backend infrastructure ensures that pools are monitored round the clock with automated alerts set up to provide actionable warnings in the event of a significant change in the health of a pool. Users will also be able to see the stablecoin pool parameters in the Frontend as well as in Discord.
Risk-management in Defi is no-longer just a meme?
To make the UX extra transparent for all our fellow degens, Brahma's UI 2.0 will include the risk monitor dynamically updating pool health on the frontend.
Now that you have a stark idea of the building blocks of the Brahma Risk Framework system, expect the best of security and monitoring upgrades on the way to the PMUSDC main vault launch.