Protocol Math
Calculating Accrued Interest
Calculating the front-end APY Using Rate Per Block
Rate = APY; // rate in smart contract
Blocks Per Year = 2102400
Blocks Per Day = 6570 (13.5 seconds per block)
Days Per Year = 365
APY = ((((Rate / Blocks Per Year * Blocks Per Day + 1) ^ Days Per Year)) - 1) * 100Last updated