Skip to content

fix: Refactor APR calculations to APY for Rezerve's lstRZR #2001

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drecronye
Copy link
Contributor

@drecronye drecronye commented Jul 18, 2025

Updated the calculation functions to use APR instead of APY for better accuracy. Introduced a new function to convert APR to APY. This change enhances the clarity and precision of the financial metrics in the rezerve-money adaptor.
@llamatester
Copy link

The rezerve-money adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 11 passed, 11 total
Snapshots: 0 total
Time: 0.276 s
Ran all test suites.

Nb of pools: 1
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────┬─────────┬─────────────────┬──────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────┬────────────────────┬───────────────────┬───────────┬───────────────────────────────┬──────────────────────────────────────────┐
│ (index) │ pool                                               │ chain   │ project         │ symbol   │ tvlUsd             │ underlyingTokens                                 │ rewardTokens │ apyBase            │ apyBase7d         │ apyReward │ poolMeta                      │ url                                      │
├─────────┼────────────────────────────────────────────────────┼─────────┼─────────────────┼──────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────┼────────────────────┼───────────────────┼───────────┼───────────────────────────────┼──────────────────────────────────────────┤
│ 0       │ '0x67A298e5B65dB2b4616E05C3b455E017275f53cB-sonic' │ 'sonic' │ 'rezerve-money' │ 'lstRZR' │ 465330.07482892467 │ [ '0xb4444468e444f89e1c2cac2f1d3ee7e336cbd1f5' ] │ []           │ 399.18330698693404 │ 534.5355402437343 │ 0         │ 'Liquid Staked Rezerve.money' │ 'https://rezerve.money/stake?tab=vaults' │
└─────────┴────────────────────────────────────────────────────┴─────────┴─────────────────┴──────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────┴────────────────────┴───────────────────┴───────────┴───────────────────────────────┴──────────────────────────────────────────┘

@drecronye drecronye marked this pull request as ready for review July 18, 2025 09:47
@drecronye drecronye changed the title Refactor APR calculations to APY for Rezerve's lstRZR fix: Refactor APR calculations to APY for Rezerve's lstRZR Jul 18, 2025
@llamatester
Copy link

The rezerve-money adapter exports pools:

Test Suites: 1 passed, 1 total
Tests: 11 passed, 11 total
Snapshots: 0 total
Time: 0.31 s
Ran all test suites.

Nb of pools: 1
 

Sample pools:
┌─────────┬────────────────────────────────────────────────────┬─────────┬─────────────────┬──────────┬───────────────────┬──────────────────────────────────────────────────┬──────────────┬───────────────────┬───────────────────┬───────────┬───────────────────────────────┬──────────────────────────────────────────┐
│ (index) │ pool                                               │ chain   │ project         │ symbol   │ tvlUsd            │ underlyingTokens                                 │ rewardTokens │ apyBase           │ apyBase7d         │ apyReward │ poolMeta                      │ url                                      │
├─────────┼────────────────────────────────────────────────────┼─────────┼─────────────────┼──────────┼───────────────────┼──────────────────────────────────────────────────┼──────────────┼───────────────────┼───────────────────┼───────────┼───────────────────────────────┼──────────────────────────────────────────┤
│ 0       │ '0x67A298e5B65dB2b4616E05C3b455E017275f53cB-sonic' │ 'sonic' │ 'rezerve-money' │ 'lstRZR' │ 577110.2521593837 │ [ '0xb4444468e444f89e1c2cac2f1d3ee7e336cbd1f5' ] │ []           │ 297.9650771878728 │ 373.1807621834829 │ 0         │ 'Liquid Staked Rezerve.money' │ 'https://rezerve.money/stake?tab=vaults' │
└─────────┴────────────────────────────────────────────────────┴─────────┴─────────────────┴──────────┴───────────────────┴──────────────────────────────────────────────────┴──────────────┴───────────────────┴───────────────────┴───────────┴───────────────────────────────┴──────────────────────────────────────────┘

@slasher125
Copy link
Collaborator

slasher125 commented Jul 21, 2025

@drecronye does the vault autocompound? yield seems off compared to ur UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants