One of the DeFi giants is ready to revolutionize the industry.
If you don't know about crvUSD you are NGMI in DeFi.
A megathread on the novel stablecoin introduced by @CurveFinance
🧵
1/ In November, Curve released the CurveUSD whitepaper detailing its forthcoming stablecoin.
Curve Finance's stablecoin design belongs to the type of over-collateralized stablecoins.
2/ In short, it is the same system that MakerDao uses for $DAI.
This type of stablecoin is minted (or borrowed) by using other assets as collateral based on a specific interest rate and the value of the collateral.
3/ Stablecoin architectures of this type always have a liquidation mechanism.
Liquidation refers to the situation when the value of the collateral falls to a certain price, causing the value of the collateral to no longer support the stablecoins borrowed.
4/ This liquidation model has the benefit of simplicity but, on the other hand, has several problems:
1.) When a whale's assets are liquidated, many collaterals will flow into the market, causing market fluctuations.
5/
2.) In most cases, liquidators will sell the liquidated collateral to profit, causing the collateral's price to drop again, resulting in another wave of liquidation.
6/
3.) Liquidators usually sell the auctioned collateral on CEX/DEX. If the exchange lacks liquidity, it will cause bad debts for the lending platform.
4.) Users who are liquidated will suffer permanent losses.
7/ Given these issues, Curve improves the liquidation problem in the following ways:
• Do not rely on external DEXs.
• Reduce users' losses when liquidation occurs.
• Gradually liquidate users' collateral and convert it back when the price rebounds.
8/ So, how does it work?
9/ The following diagram is the architecture shown in the whitepaper, which can be roughly divided into two blocks.
10/ The Controller and LLAMMA are mainly responsible for collateral liquidation-related work (the red box in the figure).
Monetary Policy, PegKeeper, and Stable Pool are mainly responsible for anchoring stablecoins to 1 USD-related work (the green box in the figure).
11/ The core idea of crvUSD is an AMM for continuous liquidation or de-liquidation.
The Lending-Liquidating AMM or LLAMMA.
12/ crvUSD minimizes liquidation penalties significantly through its innovative mechanism.
To give you an example, with LLAMMA, if the price drops 10% below the liquidation threshold and then rebounded later - only 1% of collateral gets lost.
13/ LLAMMA mechanism is similar to ticks in Uniswap-V3.
The AMM divides the collateral price range into different price segments called bands.
14/ When users deposit collateral, they need to provide three things:
• The amount of collateral
• How many bands to store the collateral in
• How much crvUSD to mint (or borrow)
15/ The collateral will be divided into equally small pieces, according to the number of bands to store, and then allocated in a continuous price range composed of bands.
16/ The most significant feature of the LLAMMA Pool is that when the price of collateral (ETH) falls below a specific level, the collateral will gradually turn into crvUSD.
Conversely, when the price is higher than a certain level, crvUSD will gradually turn into collateral.
17/ As price drops, the collateral in the top of the band ranges would be swapped into crvUSD (devaluation).
Since part of the collateral would be already devalued when liquidation happens, losses would be reduced considerably relative to the traditional one-size liquidation.
18/ The figure below shows the price changes in a single-band range.
Purple line = price changes of Po
Red line = price changes of Pamm
Pcd and Pcu can be considered as two equations created to find the upper and lower prices of this band.
19/ When the ETH price is higher than P↑ (yellow range), all assets in the band range will be converted to ETH.
When the ETH price is lower than P↓ (green range), all assets in the band range will be converted to crvUSD.
20/ When the price is between P↑ and P↓ (white range), the assets will be in a partially ETH and partially crvUSD state, with the proportion of ETH and crvUSD determined by the price changes.
21/ Oracle Price Increase
When the price starts to rise, the AMM pool price increases faster than the oracle price.
This creates an opportunity for arbitrage, where external arbitrageurs can deposit ETH into the LLAMMA Pool, exchange it for more crvUSD, and profit.
22/ During this process, the amount of ETH in the pool gradually increases, while the amount of crvUSD decreases.
23/ Oracle Price Decrease
When the price starts to fall, the AMM pool price decreases faster than the oracle price.
This creates an arbitrage opportunity in the opposite direction where arbitrageurs can deposit crvUSD into the pool, exchange it for more ETH, and profit.
24/ During this process, the amount of crvUSD in the pool gradually increases, while the amount of ETH decreases.
25/ LLAMMA intentionally creates an arbitrage opportunity for external traders by utilizing the fact that Pamm fluctuates more than Po.
When arbitrageurs attempt to rebalance the asset ratio in the pool, they are essentially performing partial liquidations of the pool's assets.
26/ The advantage of this dynamic and continuous liquidation process is that it avoids large-scale liquidations that could cause market volatility. As prices recover, the assets will convert back to collateral without causing permanent losses to the collateral.
27/ Example In Action
(Sorry about the low quality)
Yellow Columns = Collateral (ETH)
Light Blue Columns = crvUSD
Red Point = AMM Price
5 Active Bands
28/ In the center, you can see how the red point keeps moving in the purple range (band) before reaching one of the two extremes.
Below you can see how crvUSD gets swapped to ETH as I scroll to the right (price increases) and vice-versa.
29/ So this is how the LLAMMA liquidation mechanism works.
Let's briefly see what PegKeeper and Monetary Policy are and how they function.
30/ PegKeeper and Monetary Policy are the mechanisms used by Curve to anchor crvUSD to 1 USD.
31/ When the crvUSD price is > 1 USD, it means there is a shortage of crvUSD in the Curve pool.
PegKeeper can mint new crvUSD without collateral and deposit it into the Curve Pool to increase the supply of crvUSD in the market.
32/ When crvUSD price is < 1 USD, it means there is an excess of crvUSD in the Curve pool.
PegKeeper will start withdrawing previously minted crvUSD from the Curve Pool and burning these crvUSD to reduce the supply of crvUSD in the market.
33/ What if the PegKeeper has burned all the uncollateralized crvUSD, and the price of crvUSD is still below 1 USD?
Curve Finance has another way to increase the crvUSD price, which is to use Monetary Policy to raise the borrowing rate.
34/ When the price is greater than 1, the borrowing rate is extremely small (tending to 0).
When the price is less than 1, the borrowing rate increases rapidly.
35/ This will cause borrowers who have minted crvUSD to repay their debt quickly. Otherwise, their collateral may be liquidated.
36/ TL;DR
LLAMMA is the algorithm used by Curve to perform collateral liquidation
which reduces losses during liquidation by distributing collateral across different price ranges (Conceptually similar to Uniswap-V3 concentrated liquidity).
37/ This system makes AMM price move faster than Oracle price creating arbitrage opportunities to dynamically liquidate collateral and avoid sudden liquidation cascades.
38/ PegKeeper mints or burns uncollateralized crvUSD to decrease or increase the crvUSD price, while Monetary Policy controls borrowing rates to anchor crvUSD at 1 USD.
39/ Credits
This thread was made thanks to the articles written by @ksin751119 & @0xGeekRunner, go follow them.
40/ Tagging the Curve army and some chads (lmk if it's all right)
Renegade is an on-chain dark pool DEX, providing users total trade privacy. This prevents third parties from tracking and copying the trading strategies of larger entities.
Burrow is a pool-based interest rates platform that enables users to earn interest by supplying assets, borrowing, and creating leveraged staking positions or self-repaying positions.
3 minutes to understand how Chiliz is revolutionizing the sports industry
A Thread🧵
1/ The crypto industry is full of projects creating useless utilities (some of them are not even trying to do it 🐸), forgetting the real purpose of blockchain.
Many CT threads teach you about DEXs and Yield Farming.
But only a few of them explain the technology behind them.
Here is a thread about the history & different models of AMMs🧵
1/ Decentralized exchanges are the backbone of DeFi, and AMMs are the underlying system that supports all DEXs.
A lot of people believe that all AMMs are the same, but in this thread, I will show you the diversity of AMMs and how they have evolved over time.
2/ It all started in 2017 with the launch of Bancor, the first AMM-based protocol. Unfortunately, Bancor was criticised for its high fees and complexity.
3 minutes to understand why Chainlink is one of the top 5 most important crypto
A Thread🧵
1/ Decentralized Finance (DeFi) is built upon smart contracts.
Self-executing contracts with the terms of the agreement being written in the code.
2/ Smart contracts are a revolutionary technology set to change the world, but they have a limitation; they cannot access data outside of the blockchain.
There is a need for something that brings external data to the blockchain.
Stelo is a browser extension that helps protect crypto assets from web3 phishing by conducting predictive risk evaluation and providing an easy-to-read interface.
Amount Raised: $6,000,000
Funding Round Investors: @a16z, @opensea, and others.