DefiLlama / DefiLlama-Adapters

861 stars 4.92k forks source link

Add Avalon finance mainnet and mantle market #11059

Closed tpktpj closed 1 month ago

tpktpj commented 1 month ago
llamatester commented 1 month ago

Error while running adapter at projects/avalon-finance:

Error: 
    Unknown chain(s): mainnet
    Note: if you think that the chain is correct but missing from our list, please add it to 'projects/helper/chains.json' file

Error saving cache: Error: ENOENT: no such file or directory, open '/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/node_modules/@defillama/sdk/build/util/local_cache/zlib-1.0/BlockCache.json'
    at Object.openSync (node:fs:596:3)
    at Object.writeFileSync (node:fs:2322:35)
    at process.saveCache (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/node_modules/@defillama/sdk/build/util/cache.js:152:17)
    at process.emit (node:events:529:35)
    at process.exit (node:internal/process/per_thread:191:15)
    at process.handleError (/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/utils/handleError.js:18:11)
    at process.emit (node:events:529:35)
    at emit (node:internal/process/promises:149:20)
    at processPromiseRejections (node:internal/process/promises:283:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/runner/work/DefiLlama-Adapters/DefiLlama-Adapters/node_modules/@defillama/sdk/build/util/local_cache/zlib-1.0/BlockCache.json'
}
llamatester commented 1 month ago

The adapter at projects/avalon-finance exports TVL:

btr                       217.39 M
borrowed                  185.80 M
btr-borrowed              146.58 M
merlin                    73.11 M
bsc                       53.00 M
core                      43.59 M
bsc-borrowed              17.60 M
merlin-borrowed           16.86 M
core-borrowed             4.45 M
arbitrum                  3.15 M
arbitrum-borrowed         318.59 k
scroll                    14.51 k
ethereum                  7
mantle                    0
scroll-borrowed           0
mantle-borrowed           0
ethereum-borrowed         0

total                    390.26 M 
tpktpj commented 1 month ago

Issue: Token unrecognized: The following tokens cannot be recognized though already submitted to defillama-server: https://github.com/DefiLlama/defillama-server/pull/7526

Balance table for [core] Unrecognized tokens
┌─────────┬────────────────────────┬─────────────┬─────────┬───────────────────────────────────────────────────┬──────────┐
│ (index) │          name          │   symbol    │ balance │                       label                       │ decimals │
├─────────┼────────────────────────┼─────────────┼─────────┼───────────────────────────────────────────────────┼──────────┤
│    0    │ 'Free Bridged SolvBTC' │ 'SolvBTC.m' │  '20'   │ 'core:0xe04d21d999faedf1e72ade6629e20a11a1ed14fa' │   '18'   │
└─────────┴────────────────────────┴─────────────┴─────────┴───────────────────────────────────────────────────┴──────────┘
Balance table for [arbitrum] Unrecognized tokens
┌─────────┬──────────────────┬───────────────┬─────────┬───────────────────────────────────────────────────────┬──────────┐
│ (index) │       name       │    symbol     │ balance │                         label                         │ decimals │
├─────────┼──────────────────┼───────────────┼─────────┼───────────────────────────────────────────────────────┼──────────┤
│    0    │ 'SolvBTC Ethena' │ 'SolvBTC.ENA' │  '11'   │ 'arbitrum:0xafafd68afe3fe65d376eec9eab1802616cfaccb8' │   '18'   │
└─────────┴──────────────────┴───────────────┴─────────┴───────────────────────────────────────────────────────┴──────────┘
Balance table for [ethereum] Unrecognized tokens
┌─────────┬────────────┬───────────┬─────────┬───────────────────────────────────────────────────────┬──────────┐
│ (index) │    name    │  symbol   │ balance │                         label                         │ decimals │
├─────────┼────────────┼───────────┼─────────┼───────────────────────────────────────────────────────┼──────────┤
│    0    │ 'Solv BTC' │ 'SolvBTC' │   '0'   │ 'ethereum:0x7a56e1c57c7475ccf742a1832b028f0456652f97' │   '18'   │
└─────────┴────────────┴───────────┴─────────┴───────────────────────────────────────────────────────┴──────────┘
Balance table for [bsc] Unrecognized tokens
┌─────────┬───────────────────┬───────────────┬─────────┬──────────────────────────────────────────────────┬──────────┐
│ (index) │       name        │    symbol     │ balance │                      label                       │ decimals │
├─────────┼───────────────────┼───────────────┼─────────┼──────────────────────────────────────────────────┼──────────┤
│    0    │ 'SolvBTC Babylon' │ 'SolvBTC.BBN' │  '543'  │ 'bsc:0x1346b618dc92810ec74163e4c27004c921d446a5' │   '18'   │
└─────────┴───────────────────┴───────────────┴─────────┴──────────────────────────────────────────────────┴──────────┘
Balance table for [btr] Unrecognized tokens
┌─────────┬──────────────────────────┬─────────────┬─────────┬──────────────────────────────────────────────────┬──────────┐
│ (index) │           name           │   symbol    │ balance │                      label                       │ decimals │
├─────────┼──────────────────────────┼─────────────┼─────────┼──────────────────────────────────────────────────┼──────────┤
│    0    │ 'Macaron StableSwap LPs' │ 'Stable-LP' │   '0'   │ 'btr:0xb750f79cf4768597f4d05d8009fcc7cee2704824' │   '18'   │
└─────────┴──────────────────────────┴─────────────┴─────────┴──────────────────────────────────────────────────┴──────────┘
Balance table for [merlin] Unrecognized tokens
┌─────────┬──────────────────┬───────────────┬─────────┬─────────────────────────────────────────────────────┬──────────┐
│ (index) │       name       │    symbol     │ balance │                        label                        │ decimals │
├─────────┼──────────────────┼───────────────┼─────────┼─────────────────────────────────────────────────────┼──────────┤
│    0    │ 'SolvBTC Ethena' │ 'SolvBTC.ENA' │  '13'   │ 'merlin:0x88c618b2396c1a11a6aabd1bf89228a08462f2d2' │   '18'   │
└─────────┴──────────────────┴───────────────┴─────────┴─────────────────────────────────────────────────────┴──────────┘
tpktpj commented 1 month ago

Hi team, I would like to know why the tokens are added to tokenMapping.json but still cannot be recognized by the Defillam adapter.

This problem caused a 50M TVL mis-calculated in our protocol (Avalon Finance).

Balance table for [core] Unrecognized tokens
┌─────────┬────────────────────────┬─────────────┬─────────┬───────────────────────────────────────────────────┬──────────┐
│ (index) │ name                   │ symbol      │ balance │ label                                             │ decimals │
├─────────┼────────────────────────┼─────────────┼─────────┼───────────────────────────────────────────────────┼──────────┤
│ 0       │ 'Free Bridged SolvBTC' │ 'SolvBTC.m' │ '0'     │ 'core:0xe04d21d999faedf1e72ade6629e20a11a1ed14fa' │ '18'     │
└─────────┴────────────────────────┴─────────────┴─────────┴───────────────────────────────────────────────────┴──────────┘
Balance table for [core] Unrecognized tokens
┌─────────┬────────────────────────┬─────────────┬─────────┬───────────────────────────────────────────────────┬──────────┐
│ (index) │ name                   │ symbol      │ balance │ label                                             │ decimals │
├─────────┼────────────────────────┼─────────────┼─────────┼───────────────────────────────────────────────────┼──────────┤
│ 0       │ 'Free Bridged SolvBTC' │ 'SolvBTC.m' │ '20'    │ 'core:0xe04d21d999faedf1e72ade6629e20a11a1ed14fa' │ '18'     │
└─────────┴────────────────────────┴─────────────┴─────────┴───────────────────────────────────────────────────┴──────────┘
Balance table for [arbitrum] Unrecognized tokens
┌─────────┬───────────────────┬───────────────┬─────────┬───────────────────────────────────────────────────────┬──────────┐
│ (index) │ name              │ symbol        │ balance │ label                                                 │ decimals │
├─────────┼───────────────────┼───────────────┼─────────┼───────────────────────────────────────────────────────┼──────────┤
│ 0       │ 'SolvBTC Babylon' │ 'SolvBTC.BBN' │ '14'    │ 'arbitrum:0x346c574c56e1a4aaa8dc88cda8f7eb12b39947ab' │ '18'     │
└─────────┴───────────────────┴───────────────┴─────────┴───────────────────────────────────────────────────────┴──────────┘
Balance table for [btr] Unrecognized tokens
┌─────────┬──────────────────────────┬─────────────┬─────────┬──────────────────────────────────────────────────┬──────────┐
│ (index) │ name                     │ symbol      │ balance │ label                                            │ decimals │
├─────────┼──────────────────────────┼─────────────┼─────────┼──────────────────────────────────────────────────┼──────────┤
│ 0       │ 'Macaron StableSwap LPs' │ 'Stable-LP' │ '0'     │ 'btr:0xb750f79cf4768597f4d05d8009fcc7cee2704824' │ '18'     │
└─────────┴──────────────────────────┴─────────────┴─────────┴──────────────────────────────────────────────────┴──────────┘
Balance table for [ethereum] Unrecognized tokens
┌─────────┬────────────┬───────────┬─────────┬───────────────────────────────────────────────────────┬──────────┐
│ (index) │ name       │ symbol    │ balance │ label                                                 │ decimals │
├─────────┼────────────┼───────────┼─────────┼───────────────────────────────────────────────────────┼──────────┤
│ 0       │ 'Solv BTC' │ 'SolvBTC' │ '0'     │ 'ethereum:0x7a56e1c57c7475ccf742a1832b028f0456652f97' │ '18'     │
└─────────┴────────────┴───────────┴─────────┴───────────────────────────────────────────────────────┴──────────┘
Balance table for [merlin] Unrecognized tokens
┌─────────┬───────────────────┬───────────────┬─────────┬─────────────────────────────────────────────────────┬──────────┐
│ (index) │ name              │ symbol        │ balance │ label                                               │ decimals │
├─────────┼───────────────────┼───────────────┼─────────┼─────────────────────────────────────────────────────┼──────────┤
│ 0       │ 'SolvBTC Babylon' │ 'SolvBTC.BBN' │ '61'    │ 'merlin:0x1760900aca15b90fa2eca70ce4b4ec441c2cf6c5' │ '18'     │
└─────────┴───────────────────┴───────────────┴─────────┴─────────────────────────────────────────────────────┴──────────┘
Balance table for [arbitrum] Unrecognized tokens
┌─────────┬───────────────────┬───────────────┬─────────┬───────────────────────────────────────────────────────┬──────────┐
│ (index) │ name              │ symbol        │ balance │ label                                                 │ decimals │
├─────────┼───────────────────┼───────────────┼─────────┼───────────────────────────────────────────────────────┼──────────┤
│ 0       │ 'SolvBTC Babylon' │ 'SolvBTC.BBN' │ '5'     │ 'arbitrum:0x346c574c56e1a4aaa8dc88cda8f7eb12b39947ab' │ '18'     │
└─────────┴───────────────────┴───────────────┴─────────┴───────────────────────────────────────────────────────┴──────────┘

@g1nt0ki Please help, thanks!