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
  • Fert vAPY
  • Estimating Sprouts Fertilized per Season
  • Estimating vAPY for Fertilizer
  • Calculations
Edit on GitHub
Export as PDF
  1. Guides
  2. Barn

Understand Fert vAPY

PreviousBarnNextBuy Fertilizer

Last updated 9 months ago

The Beanstalk UI displays vAPY (variable APY) statistics for Fertilizer. APYs are called variable because they are not enforced by Beanstalk in any way. Rather, the APY uses historical data about Beans earned by Fertilizer holders to estimate future returns.

The APY calculation has two parts:

  1. Estimating the number of Beans that will be minted per Season using recent historical data.

  2. Estimating the number of Beans that a Farmer will receive over time for holding Fertilizer. This takes some about Fertilizer holder behavior.

Fert vAPY

Fertilizer holder earn Bean seignorage when is greater than 0 over the previous Season. Estimated annual Beans earned by a Fertilizer holder is called the Fert vAPY.

Estimating Sprouts Fertilized per Season

The Beanstalk UI and Subgraph use a 30-day (EMA) of Beans earned by Fertilizer holders to estimate future returns. The formula uses a weighted average in which recent Seasons are weighted more heavily.

The current EMA value can be located on the Barn page by hovering over the Fert vAPY.

Estimating vAPY for Fertilizer

The vAPY is determined by the estimated return of holding Fertilizer in 8760 Seasons (1 year).

The vAPY calculation makes the following assumptions:

  • No more Available Fertilizer is purchased; and

  • No Active Fertilizer becomes Used.

Calculations

Exponential Moving Average (EMA)

Fert vAPY

The window of the EMA (uuu), i.e., the number of Seasons in 30 days:

u=24βˆ—30=720u = 24 * 30 = 720u=24βˆ—30=720

The weighting multiplier (Ξ²\betaΞ²); a constant between 0 and 1 that determines how much weight is given to the most recent data point:

Ξ²=2(u+1)\beta=\frac{2}{(u+1)}Ξ²=(u+1)2​

The 30-day exponential moving average at Season ttt (nΛ‰te\bar{n}^e_tnΛ‰te​):

nΛ‰te=Ξ²βˆ‘i=tβˆ’ui≀t(1βˆ’Ξ²)tβˆ’inie\bar{n}^e_t = \beta \sum_{i=t-u}^{i \leq t}(1-\beta)^{t-i} n^e_{i}nΛ‰te​=Ξ²i=tβˆ’uβˆ‘i≀t​(1βˆ’Ξ²)tβˆ’inie​

The formulas for the Fert vAPY (vAPYFert\text{vAPY}^{\text{Fert}}vAPYFert​) take the following variables as inputs:

nΛ‰te\bar{n}^e_tnΛ‰te​, the 30-day EMA of Beans earned by Fertilizer holders at Season ttt​;

hhh, the Humidity at Season ttt​; and

FFF, the Active Fertilizer supply.

vAPYFert\text{vAPY}^{\text{Fert}}vAPYFert​ is calculated using the estimated number of Beans owned by the Fertilizer holder a year from now (8760 Seasons from now).

First, calculate the delta Beans earned per Fertilizer (dBPF\text{dBPF}dBPF​):

dBPF=nΛ‰teF\text{dBPF}=\frac{\bar{n}^e_t}{F}dBPF=FnΛ‰te​​

We define vAPYFert\text{vAPY}^{\text{Fert}}vAPYFert​ as:

vAPYFert=(h1+hBPFΓ·8760)\text{vAPY}^{\text{Fert}}=(\frac{h}{ \frac{1 + h}{\text{BPF}} \div 8760})vAPYFert=(BPF1+h​÷8760h​)
πŸ—ΊοΈ
exponential moving average
assumptions
deltaB