Skip to content

Commit

Permalink
fix: rate
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Nov 30, 2023
1 parent a1768df commit c75ec8c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# 0.3.0 (x/12/2023)
# 0.3.1 (30/11/2023)

- Fix: Divisions by 0 in the veYFI rate calculator

# 0.3.0 (30/11/2023)

- Build: Release the V3 vaults.
- Build: Release the multichain config.
Expand Down
4 changes: 3 additions & 1 deletion apps/veyfi/hooks/useVeYFIAPR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ function useVeYFIAPR({dYFIPrice}: TUseVeYFIAPR): number {
boosted += depositor.balance.raw;
}
}
rate += (rewardRate * (supply - boosted)) / supply;
if (supply > 0n) {
rate += (rewardRate * (supply - boosted)) / supply;
}
}
set_rate(rate);
}, []);
Expand Down

1 comment on commit c75ec8c

@vercel
Copy link

@vercel vercel bot commented on c75ec8c Nov 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.