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 ApertureSwap adaptor. #1042

Merged
merged 2 commits into from
Oct 25, 2023
Merged

Conversation

gnarlycow
Copy link
Contributor

ApertureSwap adaptor, modeled after 'uniswap-v3' adaptor as ApertureSwap is a UniV3 fork.

@llamatester
Copy link

The apertureswap adapter exports pools:

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

Nb of pools: 7
 

Sample pools:
┌─────────┬──────────────────────────────────────────────┬─────────┬────────────────┬───────────────────────────┬───────────────┬────────────────────┬───────────────────────┬───────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬───────────────────┐
│ (index) │                     pool                     │  chain  │    project     │         poolMeta          │    symbol     │       tvlUsd       │        apyBase        │       apyBase7d       │                                        underlyingTokens                                        │                                                                                   url                                                                                    │    volumeUsd1d     │    volumeUsd7d    │
├─────────┼──────────────────────────────────────────────┼─────────┼────────────────┼───────────────────────────┼───────────────┼────────────────────┼───────────────────────┼───────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼───────────────────┤
│    0    │ '0xb1d248be37c19c3c1539be906c85c617a91323ba' │ 'Manta' │ 'apertureswap' │ '0.01%, stablePool=false' │ 'WETH-WSTETH' │ 3186284.9062961144 │ 0.0010435500266183146 │ 0.0047984598214280945 │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x2fe3ad97a60eb7c79a976fc18bb5ffd07dd94ba5' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x2fe3ad97a60eb7c79a976fc18bb5ffd07dd94ba5-false&feeTier=100'  │ 910.9719722681766  │ 6496.191971156717 │
│    1    │ '0xfee7caae3540d7dbe325b34e57e596139cc81f4e' │ 'Manta' │ 'apertureswap' │ '0.01%, stablePool=true'  │  'USDC-USDT'  │ 2937892.693625044  │  0.20846624795172194  │           0           │ [ '0xb73603c5d87fa094b7314c74ace2e64d165016fb', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=100'  │ 167794.92239035363 │ 580185.6613446573 │
│    2    │ '0xffeee0b83fd00032cb035b57a725c9670dfa6f2f' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-USDT'  │ 1026008.1280444611 │   7.079141755111051   │  0.7680319070699548   │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=500'  │  397986.683853308  │ 1213910.202392362 │
│    3    │ '0xd7f09148eb22686cb5dcbdd0cf27d04123d14c74' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-USDC'  │ 144111.30647197153 │  19.356610230687178   │  1.7287149540444107   │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xb73603c5d87fa094b7314c74ace2e64d165016fb' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&feeTier=500'  │ 152849.66516235942 │ 447872.5732346162 │
│    4    │ '0x96ae63822c9a8a207274a2a77491f8c29068a3cc' │ 'Manta' │ 'apertureswap' │ '0.3%, stablePool=false'  │  'WETH-USDT'  │ 11356.833830395635 │  16.219994388945715   │  1.0523522391045474   │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=3000' │ 1682.2628402301925 │ 9253.479349292164 │
│    5    │ '0xaac26085946561001cca6a1f007bc6e8bad84e8c' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │ 'WETH-STONE'  │ 10134.448683572435 │   21.69152941170304   │           0           │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x80137510979822322193fc997d400d5a6c747bf7' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x80137510979822322193fc997d400d5a6c747bf7-false&feeTier=500'  │ 12045.572147457897 │        NaN        │
│    6    │ '0xd5c7f8d7559674c73cdd21a4fa253bf8fcea198f' │ 'Manta' │ 'apertureswap' │ '0.3%, stablePool=false'  │  'WETH-USDC'  │ 4382.734256889636  │   20.72871798124776   │  0.31781463144891725  │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xb73603c5d87fa094b7314c74ace2e64d165016fb' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&feeTier=3000' │ 829.6663232677511  │ 2316.636281841588 │
└─────────┴──────────────────────────────────────────────┴─────────┴────────────────┴───────────────────────────┴───────────────┴────────────────────┴───────────────────────┴───────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴───────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@slasher125
Copy link
Collaborator

hi, ty for adding, the urls aren't working for me, they just reroute to the main liquidity page.
also, can you share an analytics page so i can double check the nbs?

@gnarlycow
Copy link
Contributor Author

gnarlycow commented Oct 20, 2023

@slasher125 Thanks for the review! You can checkout ApertureSwap analytics here. As for the links to add liquidity, currently these links only work when a wallet is already connected to ApertureSwap. We are making frontend changes to make these work when a wallet is not connected. In the mean time, I think landing users to the add-liquidity page is reasonable; they just need to set the chain and select tokens to provide liquidity for. Thanks!

@llamatester
Copy link

The apertureswap adapter exports pools:

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

Nb of pools: 8
 

Sample pools:
┌─────────┬──────────────────────────────────────────────┬─────────┬────────────────┬───────────────────────────┬───────────────┬────────────────────┬───────────────────────┬──────────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬────────────────────┐
│ (index) │                     pool                     │  chain  │    project     │         poolMeta          │    symbol     │       tvlUsd       │        apyBase        │        apyBase7d         │                                        underlyingTokens                                        │                                                                                   url                                                                                    │    volumeUsd1d     │    volumeUsd7d     │
├─────────┼──────────────────────────────────────────────┼─────────┼────────────────┼───────────────────────────┼───────────────┼────────────────────┼───────────────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
│    0    │ '0xb1d248be37c19c3c1539be906c85c617a91323ba' │ 'Manta' │ 'apertureswap' │ '0.01%, stablePool=false' │ 'WETH-WSTETH' │ 3235416.1335555017 │ 0.0013310818295808355 │ 0.0000029122468310379674 │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x2fe3ad97a60eb7c79a976fc18bb5ffd07dd94ba5' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x2fe3ad97a60eb7c79a976fc18bb5ffd07dd94ba5-false&feeTier=100'  │ 1179.891404522852  │ 12826.699962018858 │
│    1    │ '0xfee7caae3540d7dbe325b34e57e596139cc81f4e' │ 'Manta' │ 'apertureswap' │ '0.01%, stablePool=true'  │  'USDC-USDT'  │ 2737234.3078187034 │  0.12229622222662206  │   0.05922250424500302    │ [ '0xb73603c5d87fa094b7314c74ace2e64d165016fb', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=100'  │ 91713.26443707675  │ 783210.4594316401  │
│    2    │ '0xffeee0b83fd00032cb035b57a725c9670dfa6f2f' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-USDT'  │ 1033643.459121143  │   6.939460514577187   │    1.4625698045432145    │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=500'  │ 393037.1490806658  │ 2056942.701056751  │
│    3    │ '0xd7f09148eb22686cb5dcbdd0cf27d04123d14c74' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-USDC'  │ 151198.0958225588  │   7.452883013222408   │    3.3733035842162153    │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xb73603c5d87fa094b7314c74ace2e64d165016fb' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&feeTier=500'  │ 61745.84767054918  │ 608655.5596957871  │
│    4    │ '0x96ae63822c9a8a207274a2a77491f8c29068a3cc' │ 'Manta' │ 'apertureswap' │ '0.3%, stablePool=false'  │  'WETH-USDT'  │ 9333.698595929996  │  28.029987986878712   │    1.038426232914284     │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=3000' │ 2389.2553380553836 │  8450.0873123952   │
│    5    │ '0xaac26085946561001cca6a1f007bc6e8bad84e8c' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │ 'WETH-STONE'  │ 8177.612610044884  │  13.897688048049254   │            0             │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x80137510979822322193fc997d400d5a6c747bf7' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x80137510979822322193fc997d400d5a6c747bf7-false&feeTier=500'  │ 6227.392275736856  │        NaN         │
│    6    │ '0xd5c7f8d7559674c73cdd21a4fa253bf8fcea198f' │ 'Manta' │ 'apertureswap' │ '0.3%, stablePool=false'  │  'WETH-USDC'  │ 6588.202147192975  │  17.820557038968836   │    0.5467034285676862    │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xb73603c5d87fa094b7314c74ace2e64d165016fb' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&feeTier=3000' │ 1072.1957273818207 │ 4112.131334148195  │
│    7    │ '0xd6e67b3eddd066a7987ce1ac7f2060b544ac3c53' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-DAI'   │ 1855.7680502999387 │  0.19988758556034658  │   0.016711121972313586   │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x1c466b9371f8aba0d7c458be10a62192fcb8aa71' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x1c466b9371f8aba0d7c458be10a62192fcb8aa71-false&feeTier=500'  │ 20.325753147095156 │ 642.7555619671846  │
└─────────┴──────────────────────────────────────────────┴─────────┴────────────────┴───────────────────────────┴───────────────┴────────────────────┴───────────────────────┴──────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@llamatester
Copy link

The apertureswap adapter exports pools:

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

Nb of pools: 8
 

Sample pools:
┌─────────┬──────────────────────────────────────────────┬─────────┬────────────────┬───────────────────────────┬───────────────┬────────────────────┬───────────────────────┬──────────────────────┬────────────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬────────────────────┬────────────────────┐
│ (index) │                     pool                     │  chain  │    project     │         poolMeta          │    symbol     │       tvlUsd       │        apyBase        │      apyBase7d       │                                        underlyingTokens                                        │                                                                                   url                                                                                    │    volumeUsd1d     │    volumeUsd7d     │
├─────────┼──────────────────────────────────────────────┼─────────┼────────────────┼───────────────────────────┼───────────────┼────────────────────┼───────────────────────┼──────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼────────────────────┼────────────────────┤
│    0    │ '0xb1d248be37c19c3c1539be906c85c617a91323ba' │ 'Manta' │ 'apertureswap' │ '0.01%, stablePool=false' │ 'WETH-WSTETH' │ 3627698.247435762  │ 0.0018654968943045127 │ 0.016574443192495972 │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x2fe3ad97a60eb7c79a976fc18bb5ffd07dd94ba5' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x2fe3ad97a60eb7c79a976fc18bb5ffd07dd94ba5-false&feeTier=100'  │ 1854.098579195983  │ 26130.654770468216 │
│    1    │ '0xfee7caae3540d7dbe325b34e57e596139cc81f4e' │ 'Manta' │ 'apertureswap' │ '0.01%, stablePool=true'  │  'USDC-USDT'  │ 2816502.073707407  │  0.18845344295081767  │          0           │ [ '0xb73603c5d87fa094b7314c74ace2e64d165016fb', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=100'  │ 145419.04462144617 │ 1164902.1769199946 │
│    2    │ '0xffeee0b83fd00032cb035b57a725c9670dfa6f2f' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-USDT'  │ 1001485.491554601  │  0.9836575966904176   │  10.881241762486157  │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=500'  │ 53979.11297221482  │ 2664302.777303719  │
│    3    │ '0xd7f09148eb22686cb5dcbdd0cf27d04123d14c74' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │  'WETH-USDC'  │ 183717.0155967497  │   7.229423784571447   │  5.696657723820395   │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xb73603c5d87fa094b7314c74ace2e64d165016fb' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&feeTier=500'  │  72776.3376540069  │ 499008.1890866341  │
│    4    │ '0xaac26085946561001cca6a1f007bc6e8bad84e8c' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=false' │ 'WETH-STONE'  │ 11680.442898722928 │  18.088378724301027   │          0           │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0x80137510979822322193fc997d400d5a6c747bf7' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0x80137510979822322193fc997d400d5a6c747bf7-false&feeTier=500'  │ 11577.001359982074 │ 45969.437945777856 │
│    5    │ '0x96ae63822c9a8a207274a2a77491f8c29068a3cc' │ 'Manta' │ 'apertureswap' │ '0.3%, stablePool=false'  │  'WETH-USDT'  │ 6938.5773479943955 │    25.462971224195    │  1.950957438286988   │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=3000' │ 1613.486715514453  │ 14273.809516334011 │
│    6    │ '0xd5c7f8d7559674c73cdd21a4fa253bf8fcea198f' │ 'Manta' │ 'apertureswap' │ '0.3%, stablePool=false'  │  'WETH-USDC'  │ 4488.947754880854  │   28.32112439283842   │  1.1344772187668681  │ [ '0x0dc808adce2099a9f62aa87d9670745aba741746', '0xb73603c5d87fa094b7314c74ace2e64d165016fb' ] │ 'https://app.aperture.finance/new-position?tokenA=0x0dc808adce2099a9f62aa87d9670745aba741746-false&tokenB=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&feeTier=3000' │ 1161.0232672048714 │ 7723.184886484827  │
│    7    │ '0x3da84afed49746c382d8c952abbe5317b0faab87' │ 'Manta' │ 'apertureswap' │ '0.05%, stablePool=true'  │  'USDC-USDT'  │ 1081.5000254963697 │  3.7312794290540943   │          0           │ [ '0xb73603c5d87fa094b7314c74ace2e64d165016fb', '0xf417f5a458ec102b90352f697d6e2ac3a3d2851f' ] │ 'https://app.aperture.finance/new-position?tokenA=0xb73603c5d87fa094b7314c74ace2e64d165016fb-false&tokenB=0xf417f5a458ec102b90352f697d6e2ac3a3d2851f-false&feeTier=500'  │ 221.11664644690867 │ 264.6957503553496  │
└─────────┴──────────────────────────────────────────────┴─────────┴────────────────┴───────────────────────────┴───────────────┴────────────────────┴───────────────────────┴──────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴────────────────────┴────────────────────┘
This adapter contains some pools with <10k TVL, these pools won't be shown in DefiLlama

@slasher125 slasher125 merged commit f7e2f1e into DefiLlama:master Oct 25, 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