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

Add factor-v2 #1041

Closed
wants to merge 20 commits into from
Closed

Add factor-v2 #1041

wants to merge 20 commits into from

Conversation

dimasriat
Copy link
Contributor

Factor Single Yield Vaults

Description

Add FactorDAO yield vaults APYs

Related URL

https://app.factor.fi/discover
https://defillama.com/protocol/factor-v2

@llamatester
Copy link

The factor-v2 adapter exports pools:

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

Nb of pools: 16
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬─────────────┬────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────┐
│ (index) │                         pool                          │   chain    │   project   │   symbol   │       tvlUsd       │      apyBase       │                 underlyingTokens                 │                                   url                                    │
├─────────┼───────────────────────────────────────────────────────┼────────────┼─────────────┼────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────┤
│    0    │ '0x9f7323e95f9ee9f7ec295d7545e82cd93fa13f97-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'muxpMAC'  │ 12176.515407418598 │ 13.631724089317121 │ [ '0x7CbaF5a14D953fF896E5B3312031515c858737C8' ] │ 'https://app.factor.fi/vault/0x9F7323E95F9ee9f7Ec295d7545e82Cd93fA13f97' │
│    1    │ '0xa92c3927a69cbb48735de6abf477ea5281152ef3-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'pieREAC'  │ 1207.173116300172  │ 11.571597444158698 │ [ '0x14FbC760eFaF36781cB0eb3Cb255aD976117B9Bd' ] │ 'https://app.factor.fi/vault/0xA92c3927A69cBb48735DE6aBf477ea5281152Ef3' │
│    2    │ '0x3dae492145e0631d341617baa81a4c72c2cd4b99-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factJAC'  │ 729.0031645770393  │ 1.552946041109915  │ [ '0x371c7ec6D8039ff7933a2AA28EB827Ffe1F52f07' ] │ 'https://app.factor.fi/vault/0x3DAe492145e0631D341617bAA81a4c72C2CD4b99' │
│    3    │ '0x89e06baa8e09bf943a767788cf00c9f9e9a873d9-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factGAC'  │ 662.8513820895095  │ 3.4105794293546543 │ [ '0x5402B5F40310bDED796c7D0F3FF6683f5C0cFfdf' ] │ 'https://app.factor.fi/vault/0x89e06Baa8E09Bf943a767788Cf00C9f9e9a873d9' │
│    4    │ '0xf45a9e3f2f5984bab983c9f245204de23ae3b1a1-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'siloSUAC' │ 28.365155944999998 │ 9.417023698858085  │ [ '0x55ADE3B74abef55bF379FF6Ae61CB77a405Eb4A8' ] │ 'https://app.factor.fi/vault/0xF45A9E3f2F5984BaB983C9f245204DE23aE3b1A1' │
│    5    │ '0xdfd0a93a22cae02c81cce29a6a6362bec2d2c282-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'siloSGAC' │    19.869903416    │ 8.003915252926475  │ [ '0x96E1301bd2536A3C56EBff8335FD892dD9bD02dC' ] │ 'https://app.factor.fi/vault/0xdfD0a93a22CAE02C81CCe29A6A6362Bec2D2C282' │
│    6    │ '0x32d1778be7af21e956dfa38683a707f5539cfc8c-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'olivPPO'  │ 9.373094635481792  │ 9.620419861093254  │ [ '0x5402B5F40310bDED796c7D0F3FF6683f5C0cFfdf' ] │ 'https://app.factor.fi/vault/0x32d1778be7aF21E956DFA38683a707F5539cFc8c' │
│    7    │ '0x18dfccb8eac64da10dcc5cbf677314c0125b6c4b-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factTAC'  │ 5.258201002471283  │ 9.901712688956255  │ [ '0x068485a0f964B4c3D395059a19A05a8741c48B4E' ] │ 'https://app.factor.fi/vault/0x18dFCCb8EAc64Da10DCc5cbf677314c0125B6C4B' │
│    8    │ '0xe990f7269e7bdda64b947c81d69aed92a68cebc6-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factWAC'  │ 2.456363642143752  │ 5.6030729639791055 │ [ '0x08a152834de126d2ef83D612ff36e4523FD0017F' ] │ 'https://app.factor.fi/vault/0xE990f7269E7BdDa64b947C81D69aed92a68cEBC6' │
│    9    │ '0xfc0d36c2781f26377da6b72ab448f5b2a71e7d14-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'pieWEAC'  │ 2.323601713931991  │ 7.374723896422997  │ [ '0x08a152834de126d2ef83D612ff36e4523FD0017F' ] │ 'https://app.factor.fi/vault/0xfc0D36C2781F26377da6b72Ab448F5b2a71e7D14' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴─────────────┴────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@slasher125
Copy link
Collaborator

hi, we no longer accept api adapters, data needs to be fetched from on chain or subgraph

@llamatester
Copy link

The factor-v2 adapter exports pools:

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

Nb of pools: 3
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬─────────────┬───────────┬─────────────────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────┐
│ (index) │                         pool                          │   chain    │   project   │  symbol   │       tvlUsd        │      apyBase       │                 underlyingTokens                 │                                   url                                    │
├─────────┼───────────────────────────────────────────────────────┼────────────┼─────────────┼───────────┼─────────────────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────┤
│    0    │ '0x9f7323e95f9ee9f7ec295d7545e82cd93fa13f97-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'muxpMAC' │ 12750.510036671349  │ 18.50411111935848  │ [ '0x7CbaF5a14D953fF896E5B3312031515c858737C8' ] │ 'https://app.factor.fi/vault/0x9F7323E95F9ee9f7Ec295d7545e82Cd93fA13f97' │
│    1    │ '0x89e06baa8e09bf943a767788cf00c9f9e9a873d9-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factGAC' │  714.4257813683055  │ 28.619697961695458 │ [ '0x5402B5F40310bDED796c7D0F3FF6683f5C0cFfdf' ] │ 'https://app.factor.fi/vault/0x89e06Baa8E09Bf943a767788Cf00C9f9e9a873d9' │
│    2    │ '0xe4a286bca6026cccc7d240914c34219d074f4020-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factVAC' │ 0.19053021683650198 │ 24.71754637260437  │ [ '0xC5b2D9FDa8A82E8DcECD5e9e6e99b78a9188eB05' ] │ 'https://app.factor.fi/vault/0xe4a286bCA6026CccC7D240914c34219D074F4020' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴─────────────┴───────────┴─────────────────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@dimasriat dimasriat marked this pull request as draft October 25, 2023 07:34
@dimasriat dimasriat marked this pull request as ready for review November 29, 2023 07:28
@llamatester
Copy link

The factor-v2 adapter exports pools:

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

Nb of pools: 13
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬────────────┬─────────────┬────────────┬────────────────────┬────────────────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────┐
│ (index) │                         pool                          │   chain    │   project   │   symbol   │       tvlUsd       │      apyBase       │                 underlyingTokens                 │                                   url                                    │
├─────────┼───────────────────────────────────────────────────────┼────────────┼─────────────┼────────────┼────────────────────┼────────────────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────┤
│    0    │ '0x89e06baa8e09bf943a767788cf00c9f9e9a873d9-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factGAC'  │ 11795.07279818302  │ 4.359058333817645  │ [ '0x5402B5F40310bDED796c7D0F3FF6683f5C0cFfdf' ] │ 'https://app.factor.fi/vault/0x89e06Baa8E09Bf943a767788Cf00C9f9e9a873d9' │
│    1    │ '0xf45a9e3f2f5984bab983c9f245204de23ae3b1a1-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'siloSUAC' │ 10042.618241450711 │ 1.7362548864752858 │ [ '0x55ADE3B74abef55bF379FF6Ae61CB77a405Eb4A8' ] │ 'https://app.factor.fi/vault/0xF45A9E3f2F5984BaB983C9f245204DE23aE3b1A1' │
│    2    │ '0x9f7323e95f9ee9f7ec295d7545e82cd93fa13f97-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'muxpMAC'  │ 1853.8896514136613 │ 40.61627209993448  │ [ '0x7CbaF5a14D953fF896E5B3312031515c858737C8' ] │ 'https://app.factor.fi/vault/0x9F7323E95F9ee9f7Ec295d7545e82Cd93fA13f97' │
│    3    │ '0xa92c3927a69cbb48735de6abf477ea5281152ef3-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'pieREAC'  │ 1589.2599511881301 │ 15.314232348510547 │ [ '0x14FbC760eFaF36781cB0eb3Cb255aD976117B9Bd' ] │ 'https://app.factor.fi/vault/0xA92c3927A69cBb48735DE6aBf477ea5281152Ef3' │
│    4    │ '0x3dae492145e0631d341617baa81a4c72c2cd4b99-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factJAC'  │ 1260.7299264010005 │ 10.882350111312755 │ [ '0x371c7ec6D8039ff7933a2AA28EB827Ffe1F52f07' ] │ 'https://app.factor.fi/vault/0x3DAe492145e0631D341617bAA81a4c72C2CD4b99' │
│    5    │ '0xdfd0a93a22cae02c81cce29a6a6362bec2d2c282-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'siloSGAC' │ 24.275699141720118 │ 2.0351046558223507 │ [ '0x96E1301bd2536A3C56EBff8335FD892dD9bD02dC' ] │ 'https://app.factor.fi/vault/0xdfD0a93a22CAE02C81CCe29A6A6362Bec2D2C282' │
│    6    │ '0x32d1778be7af21e956dfa38683a707f5539cfc8c-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'olivPPO'  │ 10.57949796369558  │ 5.126989633197931  │ [ '0x5402B5F40310bDED796c7D0F3FF6683f5C0cFfdf' ] │ 'https://app.factor.fi/vault/0x32d1778be7aF21E956DFA38683a707F5539cFc8c' │
│    7    │ '0x18dfccb8eac64da10dcc5cbf677314c0125b6c4b-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factTAC'  │ 6.547404709161391  │ 10.878347799439947 │ [ '0x068485a0f964B4c3D395059a19A05a8741c48B4E' ] │ 'https://app.factor.fi/vault/0x18dFCCb8EAc64Da10DCc5cbf677314c0125B6C4B' │
│    8    │ '0xe990f7269e7bdda64b947c81d69aed92a68cebc6-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'factWAC'  │ 4.790324646234022  │ 5.399342743371305  │ [ '0x08a152834de126d2ef83D612ff36e4523FD0017F' ] │ 'https://app.factor.fi/vault/0xE990f7269E7BdDa64b947C81D69aed92a68cEBC6' │
│    9    │ '0xfc0d36c2781f26377da6b72ab448f5b2a71e7d14-arbitrum' │ 'arbitrum' │ 'factor-v2' │ 'pieWEAC'  │ 3.047919700497961  │ 6.519090169235153  │ [ '0x08a152834de126d2ef83D612ff36e4523FD0017F' ] │ 'https://app.factor.fi/vault/0xfc0D36C2781F26377da6b72Ab448F5b2a71e7D14' │
└─────────┴───────────────────────────────────────────────────────┴────────────┴─────────────┴────────────┴────────────────────┴────────────────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@dimasriat
Copy link
Contributor Author

dimasriat commented Nov 29, 2023

hi, we no longer accept api adapters, data needs to be fetched from on chain or subgraph

gm @slasher125

I have modified the adapters so they are now either on chain or subgraph. I also import other adapter and reprocess it. The only part which use the API are this (which I believe these are reputable):

  1. VLP Auto Compounder: It uses VELA Official API to calculate APR here (https://api.vela.exchange/graph/vlp-apr/42161)
  2. Penpie Auto Compounder: It uses few part from Pendle official API (https://docs.pendle.finance/Developers/API/RESTfulAPI) to calculate maxBoostedApy and swapFeeApy.

Note on Vault Address which use 3rd party API

  • Factor VLP Auto Compounder Vault Address: 0xe4a286bCA6026CccC7D240914c34219D074F4020
  • Factor Penpie Auto Compounder Vault Address: 0xfc0D36C2781F26377da6b72Ab448F5b2a71e7D14 and 0xA92c3927A69cBb48735DE6aBf477ea5281152Ef3

All above are in arbitrum.

And also, VLP is actually already in Defillama Adapter, I actually can use it but, their adapter is broken (test error).

@slasher125
Copy link
Collaborator

sry for late reply.

will require another smol change though: for anything for which we have an adapter u can use our api output eg pendle.
just use our /pools response for adapters we track. apologies, should have made that clearer from the start.

so, to sum up:
for adapters we already track, u can default to our /pools api response to get the apy values.
for any other project, requires on chain/subgraph

@slasher125
Copy link
Collaborator

closing this for now, feel free to reopen with the required changes

@slasher125 slasher125 closed this Jan 24, 2024
@dimasriat dimasriat mentioned this pull request Feb 22, 2024
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