MooMs Profile picture
May 16 43 tweets 15 min read Twitter logo Read on Twitter
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
🧵 Image
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. Image
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. Image
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. Image
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.
If you did enjoy the thread, don't forget to like and retweet the following Tweet👇

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with MooMs

MooMs Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @Moomsxxx

May 15
💎Top Crypto VCs Liquid Holdings

$126+ billion have been invested by VCs in crypto startups.

What are the top crypto VCs holding in their wallets right now?

Examining this allows us to see what they believe in - and where they might bet in the future👇 Image
1/ This thread, is based on a publicly available @ArkhamIntel dashboard that keeps track of twelve crypto VCs' wallets that I found on LinkedIn.

I remind you to follow my Notion page that keeps track of VCs' investments👇
2/ Keep in mind that VCs do not disclose their portfolios, so the numbers are not 100% accurate.

However, it is advantageous to know what VCs are betting on in order to know which projects might be good to hold.
Read 21 tweets
May 10
🧠Following the Smart Money: A Closer Look at the Latest Investments of Crypto VCs - Part 2

Want to know what's next in crypto?

Here are 7 promising projects in which VCs have invested.

A thread🧵 Image
1/ @renegade_fi

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.

Amount Raised: $3,400,000

Investors: @dragonfly_xyz, @balajis, and others.
2/ @burrowcash

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.

Amount Raised: $5,000,000

Investors: @dragonfly_xyz, @jump_, and others.
Read 14 tweets
May 8
$CHZ - A Sleeping Giant

3 minutes to understand how Chiliz is revolutionizing the sports industry

A Thread🧵 Image
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.
2/ Speed up all processes through:

• Immutability
• Fraud prevention
• Efficiency
• Trust
• Cost reduction
• Tokenization

Well, that's what Chiliz is doing.

No Speculation
No Hype for Nothing

No Bullshit
Read 27 tweets
May 3
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🧵 Image
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.
Read 23 tweets
May 1
$LINK - The Foundation of DeFi

3 minutes to understand why Chainlink is one of the top 5 most important crypto

A Thread🧵 Image
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.
Read 23 tweets
Apr 24
🧠Following the Smart Money: A Closer Look at the Latest Investments of Crypto VCs

Want to know what's next in crypto?

Here are 12 promising projects in which VCs have invested.

A thread🧵 Image
1/ @stelolabs

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.
2/ @alongsidefi

AMKT is a crypto index token providing market exposure to a 25-asset market-cap-weighted basket rebalanced monthly and reconstituted quarterly.

Amount Raised: $11,000,000

Seed Round Investors: @a16z, @cbventures, and others.
Read 16 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(