Links

Sun

This page has not been updated yet for BIP-34.
The Beanstalk peg maintenance mechanism requires a protocol-native timekeeping mechanism and regular code execution on Ethereum. The Sun keeps time on the Farm in Seasons and incentivizes cost-efficient and timely calling of the sunrise function.
Beanstalk adjusts itself to return the Bean price to its value peg at the beginning of every Season. Each Season is ~1 hour long. The first Season began when Beanstalk was deployed on August 6, 2021.
The exact beginning of each Season may vary as Seasons do not begin until the sunrise function has been called through an Ethereum transaction. The first transaction that successfully calls the sunrise function after the top of each hour UTC begins a new Season. Beanstalk only accepts one sunrise function call per Season.
Beanstalk covers the cost of calling the sunrise function by awarding the sender of an accepted sunrise function call with newly minted Beans. To encourage regular sunrise function calls even during periods of congestion on Ethereum while minimizing cost, the award starts at 25 Beans and compounds 1% every additional second that elapses for 300 seconds.
Upon acceptance of the sunrise call, the Sun:
  1. 1.
    Increments the Season number;
  2. 2.
    Calculates deltaB, the sum of the time and liquidity weighted average shortage or excess Beans across liquidity pools on the Oracle Whitelist;
  3. 3.
    Changes the Temperature if necessary and checks for Flood;
  4. 4.
    Sets the new Soil supply;
  5. 5.
    Mints Beans if necessary; and
  6. 6.
    Awards Beans to the address that successfully called the sunrise function.

Oracle Whitelist

To be included in the calculation of deltaB, a liquidity pool must be on the Oracle Whitelist.
Additional liquidity pools may be added to the Oracle Whitelist via Beanstalk governance. In order for a liquidity pool to be added to the Oracle Whitelist, Beanstalk requires:
  1. 1.
    The pool address; and
  2. 2.
    A function to calculate the liquidity and time weighted average shortage or excess of Beans in the pool (see Section 14.6 of the Whitepaper for complete formulas).

Current Oracle Whitelist