Sun
The Sun advances Beanstalk to the next Season through the
sunrise
function in the SeasonFacet
. Every time an hour passes, sunrise
can be called 1 more time.-
Oracle.sol
-> Calculates the time weighted average number of Beans that Bean is above/below its value peg in all pools on the Oracle Whitelist. -
Weather.sol
-> Changes the Max Temperature (interest rate) depending on the Bean price, debt level and demand for Soil.
sunrise
does the following steps:- 1.Increments the Season number;
- 2.Calls
Oracle
to getdeltaB
; - 3.Calls
Weather
to adjust the Max Temperature and checks for Rain and Season of Plenty; - 4.Calls
Sun
to set the Soil and mint Beans ifdeltaB > 0
; and - 5.Pays
msg.sender
Beans for paying the transaction fee associated with calling the function.
In the Beanstalk ecosystem,
- Rain is referred to as Oversaturation; and
- Season of Plenty is referred to as Flood.
Last modified 21d ago