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
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
gmfunction has been called through an Ethereum transaction. The first transaction that successfully calls the
gmfunction after the top of each hour UTC begins a new Season. Beanstalk only accepts one
gmfunction call per Season.
Beanstalk covers the cost of calling the
gmfunction by awarding the sender of an accepted
gmfunction call with newly minted Beans. To encourage regular
gmfunction calls even during periods of congestion on Ethereum while minimizing cost, the award is based on an approximation of the cost to call the
gmfunction in Beans in the current block and compounds 1% every additional second that elapses for 300 seconds (see Section 4 of the whitepaper for complete formulas).
Upon acceptance of the
gmcall, the Sun:
- 1.Increments the Season number;
- 6.Awards Beans to the address that successfully called the