Sirwin
Sirwin

Beanstalk Series - Beanstalk Peg Mechanism Ch. 2



In this series about Beanstalk, we bring you to Ch.2, which addresses the mechanics of how the protocol maintains its dollar peg. After all, it’s the price stability that makes or breaks a stablecoin.

Beanstalk is a permissionless fiat stablecoin protocol on Ethereum. The protocol is designed to remedy the rent-seeking collateralized stablecoin market and deploys a dynamic peg mechanism for BEAN (the native ERC-20 stablecoin) to maintain its dollar peg.

It grew organically to $100M in market cap and attracted $144M in long-term incentivized liquidity within a little over eight months. However, on Apr 17th, 2022, Beanstalk lost nearly $182 m in a flash loan attack.

On Aug 06th, 2022, Beanstalk relaunched the protocol after going offline for four months and one year after its initial deployment. The protocol has undergone some changes since its initial deployment.

Operational Mechanics of Beanstalk

Projects like ESD and Basis Cash inspire Beanstalk’s design; however, it innovates in several aspects to provide users with a working algorithmic stablecoin that prioritizes decentralization with a novel peg mechanism.

Moreover, unlike previously failed algorithmic stablecoins, BEAN’s recovery story corroborates users’ faith in its working.

Beanstalk operations are supported by the following ERC-20 standard tokens issued by the protocol.

  • Beans
    Protocol’s collateral-free, credit-based algorithmic stablecoin.
  • Stalk
    Yield-generating governance token. The amount of Stalk a user, holds determines the percentage allocation of newly minted beans in the protocol.
  • Seeds
    Vested Stalk. Seeds yield 1/10000 Stalk every Season.

*Season is native to Beanstalk and is the timekeeping mechanism. Each Season is approximately 1 hour.

In addition to these native assets, the Beanstalk ecosystem comprises three interconnected facilities to regularly oscillate the price of Bean across its peg.

  • Decentralized Price Oracle
  • Governance mechanism/Beanstalk DAO (Silo)
  • Credit facility (Farm)

Beanstalk has taken the farming terminology beyond and further. We will tune it down to a more understandable form.

Let’s get started.

A simple game of supply and demand.

When the price of BEAN is trading below a dollar

-> The key is to reduce the supply of the native stablecoin.

Beanstalk does this by issuing Pods (debt tokens) in exchange for $BEAN through its Field (the credit facility).

For Beanstalk to issue debt, there needs to be Soil (protocol’s willingness to issue debt) in the Field.

Pods are issued and lent to the creditors, and the received $BEAN is burned to reduce supply and stabilize the peg.

Note — Beanstalk is an algorithmic stablecoin that maintains price stability through a credit-based model instead of the existing collateral-based model. It only fails if it can no longer attract creditors.

The interest rate of Pods is determined by the Temperature (interest rate) at the time of sowing.

The interest payment is made on a FIFO basis, and while Pods are liquid assets, they aren’t redeemable until harvestable. Thus, the maturity of pods is unknown.

Harvesting is done on a FIFO (First In, First Out) basis implying, Pods at the front of the line are harvestable first. The use of FIFO on the blockchain is verifiable and, therefore, trustless in nature.

One Pod can be redeemed for one BEAN at the time of harvest.

The temperatures fluctuate based on the price of BEAN, the debt level, and the change in demand for pods.

At the beginning of each Season, all parameters (like Bean supply, soil supply, and temperature) are reassessed. And the Sun takes upon it to make the necessary adjustments (change temperature, check for flood, set the soil supply, mint new BEANS, etc.)

Now, let’s move on to the other scenario.

When the price of BEAN is trading above a dollar

-> In this case, the key is to increase the supply of the native stablecoin.

The protocol mints new BEAN tokens to increase supply. The newly minted BEANS are distributed in the following ratio.

  • 1/3 $BEAN tokens are used to repay pods (along with accrued interest on a FIFO basis)
  • 1/3 goes to the Stalkholders (governance token holders)
  • 1/3 is used to recapitalize liquidity stolen from users (Active Fertilizer holders)
  • If there is no Active Fertilizer, Stalkholders and Pod holders each receive 1/2 of new Bean mints

Note — Fertilizer is a semi-fungible limited debt issuance to recapitalize the exploited $77M.

If you were part of the protocol pre-exploit, give the updated docs a read.

Decentralized Price Oracle

To create a censorship-resistant stablecoin, the protocol leverages the 3CRV pool (USDC, USDT, and DAI) on Curve as its price oracle. 3CRV is one of the most liquid stablecoin pools in DeFi. While USDC and USDT are largely centralized, the controlling entities cannot blacklist 3CRV without causing substantial damage to their own stablecoins.

It’s important to note; Beanstalk does not calculate the price of 1 Bean. It simply calculates the sum of the liquidity and time-weighted average (TWA) shortage or excess of Beans across the BEAN 3CRV pool over the previous Season.

Convert

Another attribute contributing to peg maintenance is the BEAN and LP deposit conversion within the Silo.

When the price of BEAN is trading below a dollar, debt issuance isn’t the only solution.
Silo Members can convert Deposited LP (BEAN:3CRV LP) to Deposited Beans without letting go of the Seeds and grown Stalk. Silo Members’ conversion removes excess Beans from liquidity pools, stabilizing the peg without debt issuance.

When the price of BEAN is trading above a dollar, minting BEAN isn’t the only solution.
Similar to the above scenario, Silo Members can convert Deposited Beans to Deposited LP (BEAN:3CRV LP), all while retaining Seeds and grown Stalk. In addition, by converting to LP, Silo Members can add liquidity to the BEAN:3CRV pool, thereby increasing liquidity and stabilizing the peg. Thus, the conversion permits stabilizations sans minting of additional BEANS.

Beanstalk relies on its decentralized community of Depositors (Silo Members), Lenders (Sowers), and arbitrageurs to achieve stability. Buying Beans, transferring them, depositing them in the Silo, or lending in the Field all contribute to Beanstalk keeping its $1 peg.

Additionally, to prevent inorganic growth, if the Bean price is too high and the debt level is excessively low for a Season (oversaturated in Beanstalk terminology), it Floods, so Beans are sold directly on Curve to bring the price back to a dollar. Proceeds from the sale are distributed to the Stalkholders (in the form of 3CRV).

 

The terms/nuances used can be overwhelming, and we hope to have simplified some of them through this article. If you are intrigued, check out their discord and become part of the community.


If you find this helpful, please support through subscribing and following.

Everythingblockchain 🧐 - Freethinkers, Writers ✍, Blockchain explorers 🔭
In pursuit of simplifying the different blocks of the chain metaverse

Socials

Twitter, Medium, Youtube, Reddit, Substack 

Referrals

Braintrust, Presearch, Binance, Kucoin

The information provided through this work is intended solely for educational purposes and must not be treated as investment advice. Any lapses in presenting any of the information correctly are ours alone. We disclaim any liability associated with the use of this content.

 

How do you rate this article?

16


EverythingBlockchain
EverythingBlockchain

Freethinkers Writers ✍ Blockchain explorers 🔭 In pursuit of simplifying the different blocks of the chain metaverse


Projects ELI5'ed
Projects ELI5'ed

ELI5 projects, use cases, tokenomics, and other aspects. ❌ Not Investment Advice. DYOR 🔎

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.