Skip to content

Commit

Permalink
fix: apy formular
Browse files Browse the repository at this point in the history
  • Loading branch information
duongnd-183902 committed Nov 9, 2022
1 parent 5b44470 commit b9360f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/apr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,10 @@ export default class APRCalCulator {
*/
stakingAPY(stakingAPR: number, partition = 0): number {
if (partition === 0) {
return Math.exp(stakingAPR)
return Math.exp(stakingAPR) - 1;
}
else
return (1 + stakingAPR / partition) ** partition;
return (1 + stakingAPR / partition) ** partition - 1;
}
}
function uint8ArrayStringToNumber(
Expand Down

0 comments on commit b9360f8

Please sign in to comment.