Skip to content
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

update apy calculation #819

Merged
merged 9 commits into from
Jun 16, 2023
Merged

Conversation

0xm00neth
Copy link
Contributor

No description provided.

@llamatester
Copy link

The spice-finance adapter exports pools:

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

Nb of pools: 3
 

Sample pools:
┌─────────┬────────────────────────┬──────────────────┬────────────┬─────────────────┬────────┬───────────────────┬────────────────────┐
│ (index) │          pool          │     poolMeta     │   chain    │     project     │ symbol │      tvlUsd       │      apyBase       │
├─────────┼────────────────────────┼──────────────────┼────────────┼─────────────────┼────────┼───────────────────┼────────────────────┤
│    0    │ 'Spice-Prologue-Vault' │ 'Prologue Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 628243.2861789927 │ 1917.1536908755727 │
│    1    │ 'Spice-Flagship-Vault' │ 'Flagship Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 338693.8087105418 │  3621.57499865541  │
│    2    │ 'Spice-Leverage-Vault' │ 'Leverage Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 83998.08034667143 │ 651.7098107418207  │
└─────────┴────────────────────────┴──────────────────┴────────────┴─────────────────┴────────┴───────────────────┴────────────────────┘

@llamatester
Copy link

The spice-finance adapter exports pools:

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

Nb of pools: 3
 

Sample pools:
┌─────────┬────────────────────────┬──────────────────┬────────────┬─────────────────┬────────┬───────────────────┬────────────────────┐
│ (index) │          pool          │     poolMeta     │   chain    │     project     │ symbol │      tvlUsd       │      apyBase       │
├─────────┼────────────────────────┼──────────────────┼────────────┼─────────────────┼────────┼───────────────────┼────────────────────┤
│    0    │ 'Spice-Prologue-Vault' │ 'Prologue Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 627303.948598934  │ 19.171536908755726 │
│    1    │ 'Spice-Flagship-Vault' │ 'Flagship Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 338187.3479724459 │  36.2157499865541  │
│    2    │ 'Spice-Leverage-Vault' │ 'Leverage Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 83872.43971252901 │ 7.899938421038397  │
└─────────┴────────────────────────┴──────────────────┴────────────┴─────────────────┴────────┴───────────────────┴────────────────────┘

@slasher125
Copy link
Collaborator

gm, we can't make that change.
apyBase is not supposed to be lifetime apr. however, u can the optional apyBaseInception field for historical values

@llamatester
Copy link

The spice-finance adapter exports pools:

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

Nb of pools: 3
 

Sample pools:
┌─────────┬────────────────────────┬──────────────────┬────────────┬─────────────────┬────────┬────────────────────┬────────────────────┬───────────────────┐
│ (index) │          pool          │     poolMeta     │   chain    │     project     │ symbol │       tvlUsd       │      apyBase       │ apyBaseInception  │
├─────────┼────────────────────────┼──────────────────┼────────────┼─────────────────┼────────┼────────────────────┼────────────────────┼───────────────────┤
│    0    │ 'Spice-Prologue-Vault' │ 'Prologue Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 626769.0756861867  │ 14.33064893216119  │ 19.04976721195062 │
│    1    │ 'Spice-Flagship-Vault' │ 'Flagship Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 338895.46892296354 │ 14.45255185056968  │ 36.2157499865541  │
│    2    │ 'Spice-Leverage-Vault' │ 'Leverage Vault' │ 'Ethereum' │ 'spice-finance' │ 'WETH' │ 84044.93826034616  │ 7.7473330459221845 │ 6.479253990686984 │
└─────────┴────────────────────────┴──────────────────┴────────────┴─────────────────┴────────┴────────────────────┴────────────────────┴───────────────────┘

@slasher125 slasher125 merged commit 74f961d into DefiLlama:master Jun 16, 2023
1 check passed
0xmDreamy pushed a commit to 0xmDreamy/yield-server that referenced this pull request Jul 20, 2023
* add base apy

* update apr object to include apyBase

* add leverage, flagship vaults

* get apy from new api

* remove apy, add poolMeta

* update apy calculation

* update apy calculation

* update apy calculation
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