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

[Synapse] Get pools from router instead of hardcoding addresses #1039

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

WardenJakx
Copy link
Contributor

@WardenJakx WardenJakx commented Oct 16, 2023

Using a router means this adapter will only need to be updated for each new chain synapse launches on, not per pool.

I removed fantom configs there are no synapse pools on the chain

other changes

  • Added SYN token as reward asset for all returned pools

NOTE:

  • no new pools were added or removed compared to before, it is more of a quality of life upgrade to ensure synapse pools are added to defillama as soon as they are launched on supported chains instead of needing a PR

@llamatester
Copy link

The synapse adapter exports pools:

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

Nb of pools: 7
 

Sample pools:
┌─────────┬───────────────────────────────────────────────────────┬─────────────┬────────────────────────────┬───────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────┬────────────────────┬───────────────────┐
│ (index) │                         pool                          │    chain    │           symbol           │  project  │                                                                       underlyingTokens                                                                        │                   rewardTokens                   │       tvlUsd       │        apy        │
├─────────┼───────────────────────────────────────────────────────┼─────────────┼────────────────────────────┼───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────┼────────────────────┼───────────────────┤
│    0    │ '0xcfd72be67ee69a0dd7cf0f846fc0d98c33d60f16-arbitrum' │ 'Arbitrum'  │      'nUSD-USDC-USDT'      │ 'synapse' │         [ '0x2913E812Cf0dcCA30FB28E6Cac3d2DCFF4497688', '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8', '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9' ]          │ [ '0x080F6AEd32Fc474DD5717105Dba5ea57268F46eb' ] │ 5399637.591543035  │ 5.63747689016684  │
│    1    │ '0xd70a52248e546a3b260849386410c7170c7bd1e9-arbitrum' │ 'Arbitrum'  │        'nETH-WETH'         │ 'synapse' │                                [ '0x3ea9B0ab55F34Fb188824Ee288CeaEfC63cf908e', '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1' ]                                 │ [ '0x080F6AEd32Fc474DD5717105Dba5ea57268F46eb' ] │ 3654788.256721649  │ 5.552593839349631 │
│    2    │   '0xc35b09c8fdefc90ec580b327d32deaada4f581da-base'   │   'Base'    │        'nETH-WETH'         │ 'synapse' │                                [ '0xb554A55358fF0382Fb21F0a478C3546d1106Be8c', '0x4200000000000000000000000000000000000006' ]                                 │ [ '0x432036208d2717394d2614d6697c46DF3Ed69540' ] │ 3112785.2134808563 │ 6.519420186947891 │
│    3    │ '0x2c6d91accc5aa38c84653f28a80aec69325bdd12-optimism' │ 'Optimism'  │        'nUSD-USDC'         │ 'synapse' │                                [ '0x67C10C397dD0Ba417329543c1a40eb48AAa7cd00', '0x7F5c764cBc14f9669B88837ca1490cCa17c31607' ]                                 │ [ '0x5A5fFf6F753d7C11A56A52FE47a177a87e431655' ] │ 1701920.4010635868 │ 6.323288431864754 │
│    4    │ '0x7479e1bc2f2473f9e78c89b4210eb6d55d33b645-polygon'  │  'Polygon'  │    'nUSD-DAI-USDC-USDT'    │ 'synapse' │ [ '0xB6c473756050dE474286bED418B77Aeac39B02aF', '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063', '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', ... 1 more item ] │ [ '0xf8F9efC0db77d8881500bb06FF5D6ABc3070E695' ] │ 1578212.0776313816 │ 7.306007223886629 │
│    5    │ '0x4619a06ddd3b8f0f951354ec5e75c09cd1cd1aef-optimism' │ 'Optimism'  │        'nETH-WETH'         │ 'synapse' │                                [ '0x809DC529f07651bD43A172e8dB6f4a7a0d771036', '0x121ab82b49B2BC4c7901CA46B8277962b4350204' ]                                 │ [ '0x5A5fFf6F753d7C11A56A52FE47a177a87e431655' ] │ 1282219.9053060524 │ 5.995034493061628 │
│    6    │   '0xca87bf3ec55372d9540437d7a86a7750b42c02f4-avax'   │ 'Avalanche' │ 'nUSD-DAI.e-USDC.e-USDT.e' │ 'synapse' │ [ '0xCFc37A6AB183dd4aED08C204D1c2773c0b1BDf46', '0xd586E7F844cEa2F87f50152665BCbc2C279D8d70', '0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664', ... 1 more item ] │ [ '0x1f1E7c893855525b303f99bDF5c3c05Be09ca251' ] │ 941782.7196563632  │ 6.477880590361688 │
└─────────┴───────────────────────────────────────────────────────┴─────────────┴────────────────────────────┴───────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────┴────────────────────┴───────────────────┘

@slasher125
Copy link
Collaborator

ty sir

@slasher125 slasher125 merged commit 549fa07 into DefiLlama:master Oct 17, 2023
1 check passed
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