DefiLlama / yield-server

140 stars 779 forks source link

Add yield tracking for BMX on Mode and Base #1466

Closed daedboi closed 1 month ago

daedboi commented 2 months ago

PR contains old commits that were already merged (for Morphex). Can't get the adapter tester to run for some reason, would you guys be able to assist please? The BMX logic doesn't differ from the Morphex logic in terms of fees calculation, just different addresses / networks. Thanks!

llamatester commented 2 months ago

The bmx adapter exports pools:

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

Nb of pools: 4

Sample pools:
┌─────────┬──────────────────────────────────────────────┬────────┬─────────┬────────────────────────────────────────┬────────────────────┬────────────────────┬───────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │                     pool                     │ chain  │ project │                 symbol                 │       tvlUsd       │      apyBase       │ apyReward │                   rewardTokens                   │                 underlyingTokens                 │
├─────────┼──────────────────────────────────────────────┼────────┼─────────┼────────────────────────────────────────┼────────────────────┼────────────────────┼───────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────┤
│    0    │ '0x2D5875ab0eFB999c1f49C798acb9eFbd1cfBF63c' │ 'Base' │  'bmx'  │ 'BLT(ETH-BTC-YFI-AERO-MOG-USDC-USDBC)' │ 1078589.2083459194 │ 37.73719628992433  │     0     │ [ '0x548f93779fBC992010C07467cBaf329DD5F059B7' ] │ [ '0xe771b4E273dF31B85D7A7aE0Efd22fb44BdD0633' ] │
│    1    │ '0x3085F25Cbb5F34531229077BAAC20B9ef2AE85CB' │ 'Base' │  'bmx'  │                 'BMX'                  │  809867.852683919  │ 11.114163958135613 │     0     │ [ '0x548f93779fBC992010C07467cBaf329DD5F059B7' ] │ [ '0x548f93779fBC992010C07467cBaf329DD5F059B7' ] │
│    2    │ '0x6c72ADbDc1029ee901dC97C5604487285D972A4f' │ 'Mode' │  'bmx'  │     'MLT(ETH-BTC-MODE-WEETH-USDC)'     │ 107215.90247169293 │ 31.156112346094734 │     0     │ [ '0x66eEd5FF1701E6ed8470DC391F05e27B1d0657eb' ] │ [ '0x952AdBB385296Dcf86a668f7eaa02DF7eb684439' ] │
│    3    │ '0x773F34397d5F378D993F498Ee646FFe4184E00A3' │ 'Mode' │  'bmx'  │                 'BMX'                  │ 64601.69248374072  │ 8.574616902487719  │     0     │ [ '0x66eEd5FF1701E6ed8470DC391F05e27B1d0657eb' ] │ [ '0x66eEd5FF1701E6ed8470DC391F05e27B1d0657eb' ] │
└─────────┴──────────────────────────────────────────────┴────────┴─────────┴────────────────────────────────────────┴────────────────────┴────────────────────┴───────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────┘
daedboi commented 2 months ago

This looks correct to me - I'll confirm that we don't have any more emissions, so the apyReward fields are correctly 0.

llamatester commented 1 month ago

The bmx adapter exports pools:

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

Nb of pools: 4

Sample pools:
┌─────────┬──────────────────────────────────────────────┬────────┬─────────┬────────────────────────────────────────┬────────────────────┬────────────────────┬───────────┬──────────────────────────────────────────────────┬──────────────────────────────────────────────────┐
│ (index) │                     pool                     │ chain  │ project │                 symbol                 │       tvlUsd       │      apyBase       │ apyReward │                   rewardTokens                   │                 underlyingTokens                 │
├─────────┼──────────────────────────────────────────────┼────────┼─────────┼────────────────────────────────────────┼────────────────────┼────────────────────┼───────────┼──────────────────────────────────────────────────┼──────────────────────────────────────────────────┤
│    0    │ '0x2D5875ab0eFB999c1f49C798acb9eFbd1cfBF63c' │ 'Base' │  'bmx'  │ 'BLT(ETH-BTC-YFI-AERO-MOG-USDC-USDBC)' │ 1082470.4662115087 │ 37.67951193550613  │     0     │ [ '0x548f93779fBC992010C07467cBaf329DD5F059B7' ] │ [ '0xe771b4E273dF31B85D7A7aE0Efd22fb44BdD0633' ] │
│    1    │ '0x3085F25Cbb5F34531229077BAAC20B9ef2AE85CB' │ 'Base' │  'bmx'  │                 'BMX'                  │ 795730.5988990994  │ 11.332383885933293 │     0     │ [ '0x548f93779fBC992010C07467cBaf329DD5F059B7' ] │ [ '0x548f93779fBC992010C07467cBaf329DD5F059B7' ] │
│    2    │ '0x6c72ADbDc1029ee901dC97C5604487285D972A4f' │ 'Mode' │  'bmx'  │     'MLT(ETH-BTC-MODE-WEETH-USDC)'     │ 107190.54417549448 │ 31.22781617789135  │     0     │ [ '0x66eEd5FF1701E6ed8470DC391F05e27B1d0657eb' ] │ [ '0x952AdBB385296Dcf86a668f7eaa02DF7eb684439' ] │
│    3    │ '0x773F34397d5F378D993F498Ee646FFe4184E00A3' │ 'Mode' │  'bmx'  │                 'BMX'                  │ 63446.77360185121  │ 8.746939312503278  │     0     │ [ '0x66eEd5FF1701E6ed8470DC391F05e27B1d0657eb' ] │ [ '0x66eEd5FF1701E6ed8470DC391F05e27B1d0657eb' ] │
└─────────┴──────────────────────────────────────────────┴────────┴─────────┴────────────────────────────────────────┴────────────────────┴────────────────────┴───────────┴──────────────────────────────────────────────────┴──────────────────────────────────────────────────┘
slasher125 commented 1 month ago

@daedboi hi, pls make this change: symbol: `'ETH-BTC-YFI-AERO-MOG-USDC-USDBC' and add poolMeta: 'BLT'