Closed smarteasy closed 3 years ago
The calculation method is different in Calculating the APY Using Rate Per Block at https://compound.finance/docs#networks.
APY = ((((Rate / ETH Mantissa Blocks Per Day + 1) ^ Days Per Year-1))-1) 100
supplyApy = (((Math.pow((supplyRatePerBlock / ethMantissa blocksPerDay) + 1, daysPerYear-1)))-1) 100;
Is it correct to correct this as follows? APY = ((((Rate / ETH Mantissa Blocks Per Day + 1) ^ (Days Per Year-1)))-1) 100
Or is it the opposite? supplyApy = (((Math.pow((supplyRatePerBlock / ethMantissa blocksPerDay) + 1, daysPerYear))-1)-1) 100;
doc is updated.
The calculation method is different in Calculating the APY Using Rate Per Block at https://compound.finance/docs#networks.
APY = ((((Rate / ETH Mantissa Blocks Per Day + 1) ^ Days Per Year-1))-1) 100
supplyApy = (((Math.pow((supplyRatePerBlock / ethMantissa blocksPerDay) + 1, daysPerYear-1)))-1) 100;
Is it correct to correct this as follows? APY = ((((Rate / ETH Mantissa Blocks Per Day + 1) ^ (Days Per Year-1)))-1) 100
Or is it the opposite? supplyApy = (((Math.pow((supplyRatePerBlock / ethMantissa blocksPerDay) + 1, daysPerYear))-1)-1) 100;