sei-protocol / sei-js

SeiJS is a monorepo that contains multiple NPM libraries for writing applications that interact with the Sei network.
44 stars 38 forks source link

Add a helper function in sei-js to calculate expected APR. #119

Closed mj850 closed 9 months ago

mj850 commented 9 months ago

Our APR calculation in sei-app is based on hardcoded values on token release. Instead, we want a live APR calculator that queries real data about the upcoming mint schedule.

APR calculation used here is essentially: Upcoming tokens to be minted in next 365 days / bondedTokens

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 0da504e70206d3297d1d4d2f4ba4342cb6fcd13a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------ | ----- | | @sei-js/core | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codecov-commenter commented 9 months ago

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (8141e1d) 76.51% compared to head (0da504e) 75.79%.

Files Patch % Lines
packages/core/src/lib/utils/apr.ts 69.09% 17 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #119 +/- ## ========================================== - Coverage 76.51% 75.79% -0.73% ========================================== Files 35 36 +1 Lines 511 566 +55 Branches 121 131 +10 ========================================== + Hits 391 429 +38 - Misses 120 137 +17 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.