Problem

Currently there are 2 problems in Beanstalk related to Deposits.

  1. Farmers with older Deposits may forfeit Stalk when converting from a Whitelisted Silo token with a higher seedsPerBdv to a Whitelisted Silo token with a lower seedsPerBdv
    1. This is due to the fact that we calculate the season of the deposit based on the total grown stalk. For example, if we had an beanLP deposit (meaning they get 4 seeds per BDV) deposited at season 0, and converted into single-sided bean at season 500 (2 seeds), the single sided bean would have to be deposited at season -500 in order for stalk to be properly calculated. since seasons are stored as a uint32 , this sets the value to 0, and causes the user to lose stalk. As the number of seasons increases, so does the likihood that this will occur.
  2. seedsPerBdv must be static over time for each Whitelisted Silo token.
  3. seedsPerBdv cannot have Decimals.

Solution

Implementation

Branch off the zero-withdraw branch

https://github.com/BeanstalkFarms/Beanstalk/pull/172

Token Specific Seeds

Cumulative Grown Stalk Per Bdv

  1. Update SiloSettings to have the following structure (Note: all existing SiloSettings will need to be updated):