Beanstalk
  • Farmers' Almanac
  • Disclosures
  • Developers
  • Whitepaper
  • 🌱Introduction
    • Why Beanstalk
    • How Beanstalk Works
  • 🌾Farm
    • Overview
    • Sun
    • Silo
      • Seed Gauge System
    • Field
    • Barn
    • Toolshed
      • Depot
      • Pod Market
      • Tractor
  • βš–οΈPeg Maintenance
    • Overview
    • Temperature
    • Crop Ratio
    • Convert
    • Flood
  • πŸ”¬Advanced
    • Stablecoin Overview
    • Types of Stablecoins
    • Economics
  • 🏦Governance
    • Beanstalk
      • BCM Process
      • BCM Dashboard
      • BIC Process
      • BICM Dashboard
    • Beanstalk Farms
      • BFM Dashboard
      • BFC Dashboard
    • BeaNFTs
      • BDM Dashboard
    • Proposals
  • πŸ—ΊοΈGuides
    • Directory
    • Getting Started
      • Where to Begin?
      • Connect to Beanstalk
      • Where Are My Assets and How to Use Them?
      • Approve Contracts
      • Add Bean to MetaMask
    • Sun
      • Understand the Bean Price
      • Understand the Sun
    • Silo
      • Understand Silo vAPY
      • Deposit in the Silo
      • Understand Silo Deposit Performance
      • Convert in the Silo
      • Transfer Deposits
      • Withdraw from the Silo
      • Claim Silo Rewards
    • Field
      • Sow Beans
      • Transfer Pods
      • Harvest Pods
    • Barn
      • Understand Fert vAPY
      • Buy Fertilizer
      • Rinse Sprouts
      • Transfer Fertilizer
      • Trade Fertilizer
    • Market
      • Buy Pods
      • Sell Pods
    • Balances
      • Understand My Balances
      • Migrate to Arbitrum
    • BeaNFTs
      • Mint BeaNFTs
    • Swap
      • Trade Beans
      • Transfer Balances
    • Governance
      • Vote on Governance Proposals
      • Delegate Votes
    • Unripe Assets
      • Chop Unripe Assets
  • πŸ“–Protocol Resources
    • Glossary
    • Asset States
    • Contracts
    • Audits
    • Bug Bounty
  • 🌐Ecosystem
    • Basin
    • Pipeline
  • 🏫Community Resources
    • Discord
    • Notion
    • Contributing
    • Discord Roles
    • Content
    • Links
  • πŸ“°Archives
    • Bean Sprout
      • BSM Dashboard
    • Governance Proposals (June 2023)
    • Fundraiser
Powered by GitBook
On this page
  • Direction
  • Demand for Soil
  • Acceleration
  • Current and Optimal State
  • Morning
Edit on GitHub
Export as PDF
  1. Peg Maintenance

Temperature

PreviousOverviewNextCrop Ratio

Last updated 11 months ago

Beanstalk relies on a decentralized set of creditors to maintain Bean price stability. Anytime Beanstalk is willing to issue debt, it issues . Soil represents the number of Beans that Beanstalk is currently willing to borrow. Loans to Beanstalk are issued with a fixed interest rate, known as Temperature. If the Temperature is 500%, 1 Bean can be Sown in exchange for 6 Pods. Once those Pods become Harvestable, they can be Harvested in exchange for 6 Beans.

At the beginning of each , Beanstalk changes the Maximum Temperature depending on its position ( and ) and current state ( and ) with respect to its .

The Temperature increases at the beginning of each block of the of each Season (25 blocks) according to a Dutch auction.

Direction

The current state of Beanstalk is in part determined by the direction of change with respect to ideal equilibrium.

The direction of change of Beanstalk with respect to ideal equilibrium is considered either toward or away from ideal equilibrium, based on the current debt level and the over the previous Season.

When the deltaB over the previous Season is > 0, debt is paid back. Therefore, if there is more debt than optimal, Beanstalk is moving toward the ideal equilibrium. If there is less debt than optimal, Beanstalk is moving away from the ideal equilibrium.

When the deltaB over the previous Season is < 0, debt can only increase or remain constant. Therefore, if there is more debt than optimal, Beanstalk is moving away from ideal equilibrium. If there is less debt than optimal, Beanstalk is moving toward ideal equilibrium.

Demand for Soil

Demand for Soil is a factor in the acceleration of Beanstalk with respect to ideal equilibrium, which affects Maximum Temperature changes. Demand for Soil is considered decreasing, steady or increasing.

  • The number of Sown Beans each Season (utu_tut​) indicated demand for Soil over the course of that Season.

  • The rate of change in the number of Sown Beans each Season (Delta Demand) is calculated as the number of Sown Beans in the previous Season (utβˆ’1u_{t-1}utβˆ’1​) divided by the number of Sown Beans two Seasons ago (utβˆ’2u_{t-2}utβˆ’2​).

Based on this ratio of the number of Sown Beans over the prior two Seasons, or Delta Demand:

  • If Delta Demand < 95%, demand for Soil is decreasing.

  • If 95% ≀ Delta Demand < 105%, demand for Soil is steady.

  • If 105% ≀ Delta Demand, demand for Soil is increasing.

However, when there is between 0 and 1 Soil remaining at the end of any Season, the ratio is not used. Instead, Beanstalk checks the following conditions to determine the current demand for Soil:

  • After one or more Seasons in which there was > 1 Soil remaining, if there is between 0 and 1 Soil remaining at the end of the latest Season, demand for Soil is increasing.

  • When there is at most 1 Soil remaining in consecutive Seasons, the difference in time it takes for the excess Soil (S > 1) to be Sown over the previous two Seasons can provide a more accurate measurement.

    • If S > 1 was Sown in the first 10 minutes of the previous Season, demand for Soil is increasing.

    • If S > 1 was not Sown in the first 10 minutes of the previous Season, Beanstalk compares the time it took for all S > 1 to be Sown in the previous two Seasons (utβˆ’1u_{t-1}utβˆ’1​ and utβˆ’2u_{t-2}utβˆ’2​).

    • If it took less than one minute longer for all S > 1 to be Sown in utβˆ’2u_{t-2}utβˆ’2​ than utβˆ’1u_{t-1}utβˆ’1​, demand for Soil is decreasing. If it took longer than one minute, demand for Soil is increasing. Otherwise, demand for Soil is steady.

Acceleration

The current state of Beanstalk with respect to ideal equilibrium is in part determined by the acceleration of change.

The acceleration of Beanstalk affects the magnitude of Maximum Temperature changes and is considered decelerating, steady or accelerating based on the price over the previous Season and the demand for Soil.

Current and Optimal State

Based on a combination of Beanstalk’s direction and acceleration, Beanstalk has six potential current states:

  • Accelerating away from ideal equilibrium;

  • Accelerating toward ideal equilibrium;

  • Steady away from ideal equilibrium;

  • Steady toward ideal equilibrium;

  • Decelerating away from ideal equilibrium; and

  • Decelerating toward ideal equilibrium.

Beanstalk’s optimal state is that which moves Beanstalk toward ideal equilibrium in the healthiest fashion, given the current position.

When the debt level is excessively high or low, an optimal state is accelerating toward ideal equilibrium. When the debt level is reasonably high or low, an optimal state is either steady or decelerating toward ideal equilibrium.

Considering the current state and the debt level, Beanstalk adjusts the Maximum Temperature to move toward the optimal state:

Morning

The contains a graphical representation of each possible state and an explanation for each Maximum Temperature adjustment.

During the Morning of each Season (the first 5 minutes), the Temperature increases logarithmically from 1% in the block of a successful gm function call up to the Maximum Temperature over the course of 5 minutes (See for complete formulas). During times of short-term excess demand for Soil, the Morning results in Beanstalk paying significantly less to attract creditors.

βš–οΈ
Maximum Temperature Flow Chart
Section 8.12.2 of the whitepaper
Season
direction
acceleration
Morning
Soil
price
debt level
ideal equilibrium
deltaB