Created
July 13, 2023 09:20
-
-
Save vlzhr/00104fa36cc9599fdc1246d3f70f87ce to your computer and use it in GitHub Desktop.
Puzzle Lend APY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// calc interest | |
const supplyInterest = interests[index].times(UR).times(0.8); | |
// calc supply APY (i = interest) | |
const calcApy = (i: BN) => { | |
if (!i || i.isNaN()) return BN.ZERO; | |
return i.plus(1).pow(365).minus(1).times(100).toDecimalPlaces(2); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment