From 3d5843180c75806a32910eb19c9532287668c848 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:26:24 +0200 Subject: [PATCH 001/787] dojoswap: bugfix --- projects/helper/portedTokens.js | 1 + projects/terraswap/factoryTvl.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/helper/portedTokens.js b/projects/helper/portedTokens.js index 1db3a4f770c1..01eb946f4a27 100644 --- a/projects/helper/portedTokens.js +++ b/projects/helper/portedTokens.js @@ -16,6 +16,7 @@ async function transformInjectiveAddress() { addr = addr.replace(/\//g, ':') if (addr.startsWith('peggy0x')) return `ethereum:${addr.replace('peggy', '')}` + if (addr.startsWith('injective:') || addr.startsWith('ethereum:')) return addr return `injective:${addr}`; }; } diff --git a/projects/terraswap/factoryTvl.js b/projects/terraswap/factoryTvl.js index e6c929eaa0e1..a038c565b73c 100644 --- a/projects/terraswap/factoryTvl.js +++ b/projects/terraswap/factoryTvl.js @@ -49,14 +49,14 @@ async function getAllPairs(factory, chain, { blacklistedPairs = [] } = {}) { return dtos } -const isNotXYK = (pair) => pair.pair_type && (pair.pair_type.xyk || pair.pair_type.custom === 'concentrated') +const isNotXYK = (pair) => pair.pair_type && pair.pair_type.custom === 'concentrated' function getFactoryTvl(factory, { blacklistedPairs = [] } = {}) { return async (api) => { const pairs = (await getAllPairs(factory, api.chain, { blacklistedPairs })).filter(pair => (pair.assets[0].balance && pair.assets[1].balance)) - const xykPairs = pairs.filter(isNotXYK) - const otherPairs = pairs.filter(pair => !isNotXYK(pair)) + const otherPairs = pairs.filter(isNotXYK) + const xykPairs = pairs.filter(pair => !isNotXYK(pair)) otherPairs.forEach(({ assets }) => { api.add(assets[0].addr, assets[0].balance) api.add(assets[1].addr, assets[1].balance) From 199d5db8c428573a6a786f8ebadc488454b7cbe5 Mon Sep 17 00:00:00 2001 From: Barak Uri <140400738+dev-uri@users.noreply.github.com> Date: Fri, 18 Oct 2024 09:39:08 +0300 Subject: [PATCH 002/787] feat: Update Rollspace contracts (#11949) --- projects/rollspace/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/rollspace/index.js b/projects/rollspace/index.js index 82f3cb7aa0b0..5a38b0cdf827 100644 --- a/projects/rollspace/index.js +++ b/projects/rollspace/index.js @@ -1,9 +1,9 @@ const { nullAddress } = require("../helper/tokenMapping"); const { sumTokensExport } = require("../helper/unwrapLPs"); -const BSC_POOL_CONTRACT = '0xB1FcDb8Ed3c2Bc572440b08a5A93984f366BBf3C'; -const BLAST_POOL_CONTRACT = '0x4E927c4bc1432dc7608d2199a77e630cc1676eD7'; -const BASE_POOL_CONTRACT = '0x35a7E7f5A8ECe30585364c28EE5974E3ECe375DC'; +const BSC_POOL_CONTRACT = '0x011b1b59Dac73AA584546dD05bbF300c9D4ecdA0'; +const BLAST_POOL_CONTRACT = '0x7b0DDc2BD91Cf1a7d4e026ebdEcd575Ef760D9B8'; +const BASE_POOL_CONTRACT = '0x0994c10372BB1d994a6EcCcF81E1225da589A010'; const MODE_POOL_CONTRACT = '0xbADaC8BDFdC6Ef7be408e94AbE3ddC6bec783E59'; module.exports = { From f1d66fd065f0abf41fce6d52bdb42c9992a11b42 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 18 Oct 2024 08:50:04 +0200 Subject: [PATCH 003/787] track https://truemarkets.org --- projects/truemarkets/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/truemarkets/index.js diff --git a/projects/truemarkets/index.js b/projects/truemarkets/index.js new file mode 100644 index 000000000000..2df572e6cc62 --- /dev/null +++ b/projects/truemarkets/index.js @@ -0,0 +1,18 @@ +const { getLogs2 } = require('../helper/cache/getLogs') +const { base } = require('../radiant-v2') + +const config = { + base: { factory: '0x288025b60330e01d793B6e83c1a0dE22bb943459', fromBlock: 21180486 }, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: 'event MarketCreatedWithDescription (address marketAddress, string marketQuestion, string marketSource, string additionalInfo, uint256 endOfTrading, uint256 yesNoTokenCap, address marketOwner)', fromBlock, }) + const markets = logs.map(log => log.marketAddress) + const tokens = await api.multiCall({ abi: 'address:paymentToken', calls: markets}) + return api.sumTokens({ tokensAndOwners2: [tokens, markets]}) + } + } +}) \ No newline at end of file From a5fed0a7575a697ce99d4780260817dd7b151d18 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:41:37 +0200 Subject: [PATCH 004/787] track mira.ly --- projects/helper/chain/fuel.js | 34 +++++++++++++++++++++++++++++++++ projects/helper/chains.json | 1 + projects/helper/tokenMapping.js | 10 ++++++++++ projects/mira-ly/index.js | 20 +++++++++++++++++++ 4 files changed, 65 insertions(+) create mode 100644 projects/helper/chain/fuel.js create mode 100644 projects/mira-ly/index.js diff --git a/projects/helper/chain/fuel.js b/projects/helper/chain/fuel.js new file mode 100644 index 000000000000..240224438a50 --- /dev/null +++ b/projects/helper/chain/fuel.js @@ -0,0 +1,34 @@ + +const { GraphQLClient, } = require('graphql-request') +const { transformBalances } = require('../portedTokens') +const client = new GraphQLClient('https://mainnet.fuel.network/v1/graphql') + +async function sumTokens({ api, owner, owners, token, tokens = [], tokensAndOwners = [] }) { + if (token) + tokens = [token] + if (owner) + owners = [owner] + if (owners) + tokensAndOwners = tokens.map(token => owners.map(owner => [token, owner])).flat() + + tokensAndOwners = getUniqueToA(tokensAndOwners) + + const query = tokensAndOwners.map(([token, owner], i) => `q${i}: contractBalance( + contract: "${owner}" asset: "${token}" +) { contract assetId amount}`).join('\n'); + + const results = await client.request(`{${query}}`) + Object.values(results).forEach(i => api.add(i.assetId, i.amount)) + return transformBalances('fuel', api.getBalances()) + + function getUniqueToA(toa) { + toa = toa.map(i => i.join('-').toLowerCase()) + toa = new Set(toa) + return [...toa].map(i => i.split('-')) + } +} + + +module.exports = { + sumTokens, +} \ No newline at end of file diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 9aeaca4ff394..e8ff4674017f 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -126,6 +126,7 @@ "fsc", "ftn", "functionx", + "fuel", "fuse", "fusion", "genesys", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index d6fdd26c8f9a..22200f0a54b1 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -95,6 +95,16 @@ const fixBalancesTokens = { bitkub: { [ADDRESSES.bitkub.KKUB]: { coingeckoId: 'bitkub-coin', decimals: 18 }, }, + fuel: { + // https://docs.fuel.network/docs/verified-addresses/assets/ + '0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b': { coingeckoId: 'usd-coin', decimals: 6 }, + '0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07': { coingeckoId: 'ethereum', decimals: 9 }, + '0xa0265fb5c32f6e8db3197af3c7eb05c48ae373605b8165b6f4a51c5b0ba4812e': { coingeckoId: 'tether', decimals: 6 }, + '0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958': { coingeckoId: 'savings-dai', decimals: 9 }, + '0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b': { coingeckoId: 'manta-mbtc', decimals: 9 }, + '0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4': { coingeckoId: 'manta-meth', decimals: 9 }, + '0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0': { coingeckoId: 'renzo-restaked-eth', decimals: 9 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/mira-ly/index.js b/projects/mira-ly/index.js new file mode 100644 index 000000000000..74812e583f4f --- /dev/null +++ b/projects/mira-ly/index.js @@ -0,0 +1,20 @@ +const { sumTokens } = require("../helper/chain/fuel") +const { configPost } = require('../helper/cache') + +async function tvl(api) { + const contractId = '0x2e40f2b244b98ed6b8204b3de0156c6961f98525c8162f80162fcf53eebd90e7' + const { pools } = await configPost('mira-ly', 'https://prod.api.mira.ly/pools', { "volume_hours": 24, "apr_days": 1 }) + const tokens = pools.map(i => i.id.split('_').slice(0, 2)).flat() + // const provider = await fuels.Provider.create('https://mainnet.fuel.network/v1/graphql') + // const contract = new fuels.Contract(contractId, abi, provider) + // const { value } = await contract.functions.total_assets().get() + // console.log(contract.functions, +value) + return sumTokens({ api, owner: contractId, tokens }) +} + +module.exports = { + fuel: { tvl }, + timetravel: false, +} + +// https://github.com/mira-amm/mira-v1-ts/blob/main/sway_abis/contracts/mira_amm_contract/release/mira_amm_contract-abi.json From 2768cb5dc684fc32b912483757624c9d43aa0002 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 18 Oct 2024 12:53:41 +0100 Subject: [PATCH 005/787] use addresses instead --- projects/helper/karpatkey.js | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/projects/helper/karpatkey.js b/projects/helper/karpatkey.js index d412e0fe79a4..9484f6ce62d2 100644 --- a/projects/helper/karpatkey.js +++ b/projects/helper/karpatkey.js @@ -1,29 +1,14 @@ const { sumSingleBalance } = require("@defillama/sdk/build/generalUtil") const { fetchURL } = require("./utils") -const symbolToId = { - "BAL":"balancer", - "DAI":"dai", - "ETH":"ethereum", - "USDC":"usd-coin", - "USDT":"tether", - "WBTC":"bitcoin", - "WETH":"ethereum", - "rETH2":"reth2", - "stETH":"staked-ether", - "sETH2":"seth2", - "rETH": "rocket-pool-eth", - "ankrETH":"ankreth", - "cbETH":"coinbase-wrapped-staked-eth", - "ETHx": "stader-ethx", - "GNO": "gnosis", - wstETH: "wrapped-steth", - WXDAI: "dai", - XDAI: "dai" -} - const MONTH = 30*24*3600e3 +const chainMapping = { + "Gnosis": "xdai", + "Avalanche": "avax", + "Binance": "bsc" +} + async function karpatKeyTvl({timestamp}, daoName, tokenToExclude) { const {data} = await fetchURL("https://aumapi.karpatkey.dev/our_daos_token_details") let date = new Date(timestamp*1e3) @@ -37,8 +22,9 @@ async function karpatKeyTvl({timestamp}, daoName, tokenToExclude) { } const balances = {} monthlyData.forEach(bal=>{ - if(symbolToId[bal.token_symbol] && tokenToExclude !== bal.token_symbol){ - sumSingleBalance(balances, symbolToId[bal.token_symbol], bal.token_balance) + if(tokenToExclude !== bal.token_symbol){ + const chain = chainMapping[bal.blockchain] ?? bal.blockchain.toLowerCase() + sumSingleBalance(balances, chain +':' + bal.token_address, bal.value) } else { console.log(`Skipping ${bal.token_symbol}`) } From 839a88c53cf6b2b56b127df380c9b36e2b279776 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 18 Oct 2024 19:04:28 +0100 Subject: [PATCH 006/787] add taiko --- projects/logx-v2/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/logx-v2/index.js b/projects/logx-v2/index.js index 1553c15ad024..297e0ff3cf19 100644 --- a/projects/logx-v2/index.js +++ b/projects/logx-v2/index.js @@ -12,7 +12,8 @@ const config = { bob: ['0xaca5146bc74230e77DAB543d3a14F26c8c63939e','0x1e7c3B771b27A29116E4Df5a2DCC54FDaAC902db'], sei: ['0xc010f83ae18dC5f40e888898F6605F075686432e','0x0B3b4FAFDe8baFde82C3BfD38538B7aEe4407498'], scroll: ['0x1C70cc9F8236C4Ae2ce3d34d4Da4696Aea611f90','0xcfFe53CEd05A750Fa58304c11997a0335dE731b6'], - kroma: ['0xaca5146bc74230e77DAB543d3a14F26c8c63939e','0x1e7c3B771b27A29116E4Df5a2DCC54FDaAC902db'] + kroma: ['0xaca5146bc74230e77DAB543d3a14F26c8c63939e','0x1e7c3B771b27A29116E4Df5a2DCC54FDaAC902db'], + taiko: ['0x650e8941E4d90b70576fDF1b05dbDc962DA2cab8','0x1d9B044393804CCFa2da3127470C9F65D4E0E5E6'] } Object.keys(config).forEach(chain => { From 2f22408c5a6be989d5c7822ff0364def34d6aafe Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:49:02 +0100 Subject: [PATCH 007/787] add btc echo lending (#11966) --- projects/echo-lending/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/echo-lending/index.js b/projects/echo-lending/index.js index bbdb7b9563b3..4fef0c664684 100644 --- a/projects/echo-lending/index.js +++ b/projects/echo-lending/index.js @@ -29,7 +29,7 @@ async function getData() { item.debt = item.reserve[3] item.balance = +item.reserve[2] - +item.debt } - return resources.filter(i => i.uToken && i.uToken !== '0x4e1854f6d332c9525e258fb6e66f84b6af8aba687bbcb832a24768c4e175feec::abtc::ABTC') + return resources.filter(i => i.uToken); } } From 32e63a596797e494b06846d0b4006d5db7f9067d Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:32:55 +0100 Subject: [PATCH 008/787] add world chain (#11967) --- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 7 +++++++ projects/uniswap/index.js | 1 + 4 files changed, 10 insertions(+) diff --git a/projects/helper/chains.json b/projects/helper/chains.json index e8ff4674017f..7f9d68aaf8ec 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -334,6 +334,7 @@ "wan", "waves", "wax", + "wc", "wemix", "xai", "xdai", diff --git a/projects/helper/env.js b/projects/helper/env.js index ecc98b4ae121..ea4b276e45c5 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -20,6 +20,7 @@ const DEFAULTS = { MATCHAIN_RPC_MULTICALL: "0xDa91510Bd8c50bfa54FC2BE2dD6dAbE03eA8496c", SHAPE_RPC:'https://mainnet.shape.network', SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", + WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public" } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 22200f0a54b1..7589bfb91cf6 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -104,6 +104,13 @@ const fixBalancesTokens = { '0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b': { coingeckoId: 'manta-mbtc', decimals: 9 }, '0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4': { coingeckoId: 'manta-meth', decimals: 9 }, '0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0': { coingeckoId: 'renzo-restaked-eth', decimals: 9 }, + }, + wc: { + + '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1': { coingeckoId: 'usd-coin', decimals: 6 }, + '0x2cFc85d8E48F8EAB294be644d9E25C3030863003': { coingeckoId: 'worldcoin-wld', decimals: 18 }, + '0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3': { coingeckoId: 'bitcoin', decimals: 8 }, + '0x4200000000000000000000000000000000000006': { coingeckoId: 'weth', decimals: 18 } } } diff --git a/projects/uniswap/index.js b/projects/uniswap/index.js index 734655327cc0..cc57513de302 100644 --- a/projects/uniswap/index.js +++ b/projects/uniswap/index.js @@ -91,6 +91,7 @@ module.exports = { xdai: { factory: "0xe32F7dD7e3f098D518ff19A22d5f028e076489B1", fromBlock: 27416614 }, bob: { factory: "0xcb2436774C3e191c85056d248EF4260ce5f27A9D", fromBlock: 5188280 }, lisk: { factory: "0x0d922Fb1Bc191F64970ac40376643808b4B74Df9", fromBlock: 577168 }, + wc: { factory: "0x7a5028BDa40e7B173C278C5342087826455ea25a", fromBlock: 1603366 }, }), filecoin: { tvl: filecoinTvl }, } From 382cf76f214876adf0a1dac1a53bd2858c6be706 Mon Sep 17 00:00:00 2001 From: CardanoTokenIO <163329108+CardanoTokenIO@users.noreply.github.com> Date: Mon, 21 Oct 2024 15:10:12 +0200 Subject: [PATCH 009/787] Updating one script address on protocol DANZO APP (new wallet) (#11962) --- projects/danzo-arena/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/danzo-arena/index.js b/projects/danzo-arena/index.js index d3fc32f1e405..95b91240b0d8 100644 --- a/projects/danzo-arena/index.js +++ b/projects/danzo-arena/index.js @@ -1,8 +1,8 @@ const { sumTokensExport } = require("../helper/chain/cardano"); const scriptAdresses = [ - "addr1vx4caaf06swdn7cdfc7pu3sw235zvuhd02tw2np4uac9mwcp2vt4y", //Danzo Tokens locked inside the address for the DeFi game DANZO ARENA: https://cardanzoada.com/arena/ - "addr1v858vfzl7hdqduqqa4vsj58nfy9njtw5q98q8tzzds58uncqjezd7", //Danzo Tokens locked inside the address for the DeFi game DANZO Game: https://cardanzoada.com/app/#/games + "addr1vx4caaf06swdn7cdfc7pu3sw235zvuhd02tw2np4uac9mwcp2vt4y", //Danzo Tokens locked inside the address for the DeFi game DANZO ARENA: https://danzo.gg/arena/ + "addr1q8wu9v2wn8hkzq2g7q3ez8a99thw0gwmlhgpc2crmfk982xr2rqrszevgfwunrxu8ajh7pfhmaf6ppj60nj8rnhqhl4srgnekp", //Danzo Tokens locked inside the address for the DeFi game DANZO Game: https://danzo.gg ]; module.exports = { From ddf653c80f9688c530b090614a0e0389d72f8329 Mon Sep 17 00:00:00 2001 From: Strategic Reserve Date: Tue, 22 Oct 2024 01:48:21 -0700 Subject: [PATCH 010/787] Add Worldchain and Sushi OP (#11978) --- projects/visor/config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/visor/config.js b/projects/visor/config.js index 8aa4ca67f1f0..6f8b860e4fde 100644 --- a/projects/visor/config.js +++ b/projects/visor/config.js @@ -34,6 +34,7 @@ const HYPE_REGISTRY = { ], optimism: [ ["0xF5BFA20F4A77933fEE0C7bB7F39E7642A070d599", 6538026], // Uniswap + ["0x617BA5fcB4e74758795DceBecA420116e50bD289", 126667774], // Sushiswap ["0xF802D5c44dC4E3bB0eCcf680a6bA82Cbd24B9F33", 125319599], // Velodrome ], arbitrum: [ @@ -150,6 +151,9 @@ const HYPE_REGISTRY = { ["0xC27DDd78FC49875Fe6F844B72bbf31DFBB099881", 1216191], // Gmeow ["0x683292172E2175bd08e3927a5e72FC301b161300", 1216165], // Circuit ], + wc: [ + ["0xC27DDd78FC49875Fe6F844B72bbf31DFBB099881", 4799965], // Uniswap + ], }; Object.keys(HYPE_REGISTRY).forEach(chain => { From de2fe46c2480880899857baeccdba6b941255b7e Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 22 Oct 2024 10:57:09 +0200 Subject: [PATCH 011/787] Fix: Eigenlayer skipCache (#11963) --- projects/eigenlayer/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/eigenlayer/index.js b/projects/eigenlayer/index.js index ffd6c185c7eb..6f34f2bb3778 100644 --- a/projects/eigenlayer/index.js +++ b/projects/eigenlayer/index.js @@ -48,6 +48,7 @@ const fetchLogs = async (api, eventAbi) => getLogs2({ target: "0x858646372cc42e1a627fce94aa7a7033e7cf075a", eventAbi, fromBlock: 17445564, + skipCacheRead: true }); const tvl = async ({ timestamp }, _b, _cb, { api }) => { From 09093dbd7ead34c79df8e28fa7d451a4a0790349 Mon Sep 17 00:00:00 2001 From: charq <73696209+buchaoqun@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:05:25 +0800 Subject: [PATCH 012/787] Add the base chain of the SolvBTC project. (#11954) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: qwen-solv Co-authored-by: hja <740055963@qq.com> --- projects/solvbtc/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/solvbtc/index.js b/projects/solvbtc/index.js index bc9a7ef53c5b..405202021c83 100644 --- a/projects/solvbtc/index.js +++ b/projects/solvbtc/index.js @@ -36,7 +36,7 @@ async function otherDeposit(api, solvbtc) { } // node test.js projects/solvbtc -['bitcoin', 'ethereum', 'bsc', 'polygon', 'arbitrum', 'mantle', 'merlin', 'avax', 'bob'].forEach(chain => { +['bitcoin', 'ethereum', 'bsc', 'polygon', 'arbitrum', 'mantle', 'merlin', 'avax', 'bob', 'base'].forEach(chain => { if (chain == 'bitcoin') { module.exports[chain] = { tvl: bitcoinTvl, From a1cbe4d29d99aa3198537955dea499391ce1f413 Mon Sep 17 00:00:00 2001 From: 0xajing <163371347+0xajing@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:09:00 +0800 Subject: [PATCH 013/787] Feat/lorenzo bsc tvl (#11965) Co-authored-by: Leven Co-authored-by: lorenzo Co-authored-by: LevenR <156494841+LevenR@users.noreply.github.com> --- projects/lorenzo-bsc-lst/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/lorenzo-bsc-lst/index.js diff --git a/projects/lorenzo-bsc-lst/index.js b/projects/lorenzo-bsc-lst/index.js new file mode 100644 index 000000000000..09fedff989cf --- /dev/null +++ b/projects/lorenzo-bsc-lst/index.js @@ -0,0 +1,20 @@ +const sdk = require('@defillama/sdk'); + +async function bscTvl(api) { + const stBTCTokenAddress = '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3'; + const totalSupply = await api.call({ + abi: 'erc20:totalSupply', + target: stBTCTokenAddress, + }); + + const balances = {}; + sdk.util.sumSingleBalance(balances, 'coingecko:bitcoin', totalSupply / (1e18)); + return balances; +} + +module.exports = { + methodology: "Lorenzo, As the Bitcoin Liquidity Finance Layer", + bsc: { + tvl: bscTvl, + } +}; \ No newline at end of file From face47334fbc9d553d724400fc56b3400a1e2528 Mon Sep 17 00:00:00 2001 From: Samster91 <37342443+samster91@users.noreply.github.com> Date: Tue, 22 Oct 2024 11:49:05 +0200 Subject: [PATCH 014/787] Idle Dao - Fasanara Yield Vault (#11955) Co-authored-by: Samster91 Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/idle/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/projects/idle/index.js b/projects/idle/index.js index 6cd4367607f8..e15ae60c793e 100644 --- a/projects/idle/index.js +++ b/projects/idle/index.js @@ -41,8 +41,7 @@ const contracts = { // "0xd0DbcD556cA22d3f3c142e9a3220053FD7a247BC", // "0x1f5A97fB665e295303D2F7215bA2160cc5313c8E", // "0x8E0A8A5c1e5B3ac0670Ea5a613bB15724D51Fc37", // Instadapp stETH - "0x9e0c5ee5e4B187Cf18B23745FCF2b6aE66a9B52f", // Amphor wstETH - "0x1EB1b47D0d8BCD9D761f52D26FCD90bBa225344C" // Ethena USDe + "0xf6223C567F21E33e859ED7A045773526E9E3c2D5" // Fasanara Yield vault ] }, polygon: { From 365630c0ccc56592e0ce91d72948c7300b0f9cd2 Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 22 Oct 2024 13:15:03 +0300 Subject: [PATCH 015/787] Exmo adapter (#11986) Co-authored-by: Andre Kidd --- projects/exmo/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/exmo/index.js diff --git a/projects/exmo/index.js b/projects/exmo/index.js new file mode 100644 index 000000000000..f830a3acedf5 --- /dev/null +++ b/projects/exmo/index.js @@ -0,0 +1,21 @@ +const { cexExports } = require('../helper/cex') + +const config = { + ethereum: { + owners: [ + '0x7029B8aaE2399a9f4B82d4516D6D16A35A52ff2e', + ], + }, + doge: { + owners: [ + 'DC1GBAsLTJMvShigDk4UR3oVnkmiH4xaoE', + ] + }, + ripple: { + owners: [ + 'rDfvwaonnG198FJKiugQDn96kVW4Ej6bUX', + ] + }, +} + +module.exports = cexExports(config) \ No newline at end of file From 484cb3d3abb50637c3f3c36228b6476c272f622c Mon Sep 17 00:00:00 2001 From: "Bagful.io" Date: Tue, 22 Oct 2024 18:18:49 +0800 Subject: [PATCH 016/787] add bagful (#11980) Co-authored-by: Define101 <93603962+Define101@users.noreply.github.com> --- projects/bagful/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/bagful/index.js diff --git a/projects/bagful/index.js b/projects/bagful/index.js new file mode 100644 index 000000000000..f9543aa99fdc --- /dev/null +++ b/projects/bagful/index.js @@ -0,0 +1,25 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const AGGREGATOR = "0x6bD057Dae9aA5aE05c782F2eB988CBdE53Be9620"; + + +async function tvl(api) { + let pools = await api.call({ abi: abiInfo.poolTvls, target: AGGREGATOR }); + pools.forEach(pool=>{ + api.add(pool.poolAssets,pool.tvl) + }) + return await sumTokens2({api,resolveLP:true}) +} + + +module.exports = { +doublecounted: true, + linea: { + tvl, + }, +}; + +const abiInfo = { + poolTvls: + "function getPoolTotalTvl() view returns (tuple(uint256 pid, address poolAddress,address poolAssets, uint256 tvl)[])", +}; From defbc4e598bbd1fcf64faef0bb43d837a3d94cfa Mon Sep 17 00:00:00 2001 From: tstemko <57684389+tstemko@users.noreply.github.com> Date: Tue, 22 Oct 2024 06:21:37 -0400 Subject: [PATCH 017/787] Add Flare, Mode and Re.al to tvl calcs (#11972) Co-authored-by: Tatyana Stemkovski --- projects/ichifarm/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/projects/ichifarm/index.js b/projects/ichifarm/index.js index 15462f20832c..89cff51d3574 100644 --- a/projects/ichifarm/index.js +++ b/projects/ichifarm/index.js @@ -95,6 +95,11 @@ const config = { { factory: '0x89FFdaa18b296d9F0CF02fBD88e5c633FEFA5f34', fromBlock: 79156621, isAlgebra: true, }, // Spiritswap ] }, + flare: { + vaultConfigs: [ + { factory: '0x85a4dd4ed356A7976a8302b1b690202d58583c55', fromBlock: 30879155, isAlgebra: false, }, // SparkDex + ] + }, fuse: { vaultConfigs: [ { factory: '0xfBf38920cCbCFF7268Ad714ae5F9Fad6dF607065', fromBlock: 30026180, isAlgebra: false, }, // Voltage @@ -124,6 +129,11 @@ const config = { { factory: '0xbBB97d634460DACCA0d41E249510Bb741ef46ad3', fromBlock: 39366721, isAlgebra: false, }, // Cleo ] }, + mode: { + vaultConfigs: [ + { factory: '0x9FAb4bdD4E05f5C023CCC85D2071b49791D7418F', fromBlock: 12395812, isAlgebra: true, }, // Kim + ] + }, op_bnb: { vaultConfigs: [ { factory: '0xADDA3A15EA71c223a82Af86d4578EF2B076035F1', fromBlock: 13911597, isAlgebra: true, }, // Thena @@ -143,6 +153,11 @@ const config = { { factory: '0x1721cB3ff3cAF70a79bDE9d771B27646ed8115b1', fromBlock: 11102475, isAlgebra: true, }, // QuickSwap ] }, + real: { + vaultConfigs: [ + { factory: '0x860F3881aCBbF05D48a324C5b8ca9004D31A146C', fromBlock: 599247, isAlgebra: false, }, // Pearl + ] + }, scroll: { vaultConfigs: [ { factory: '0xb42D5956cDe4386B65C087CfCD16910aB6114F15', fromBlock: 5264782, isAlgebra: false, }, // Metavault From a58d53780fcf98242b527603496716a226b20d14 Mon Sep 17 00:00:00 2001 From: yanfeizuo <69463394+yanfeizuo@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:21:56 +0800 Subject: [PATCH 018/787] Add bsquared for sumer (#11979) --- projects/sumer/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/sumer/index.js b/projects/sumer/index.js index 797a3d92bd1f..9170858fb42b 100644 --- a/projects/sumer/index.js +++ b/projects/sumer/index.js @@ -5,5 +5,6 @@ module.exports = { base: compoundExports2({ comptroller: '0x611375907733D9576907E125Fb29704712F0BAfA' }), arbitrum: compoundExports2({ comptroller: '0xBfb69860C91A22A2287df1Ff3Cdf0476c5aab24A' }), ethereum: compoundExports2({ comptroller: '0x60A4570bE892fb41280eDFE9DB75e1a62C70456F' }), - zklink: compoundExports2({ comptroller: '0xe6099D924efEf37845867D45E3362731EaF8A98D' }) + zklink: compoundExports2({ comptroller: '0xe6099D924efEf37845867D45E3362731EaF8A98D' }), + bsquared: compoundExports2({ comptroller: '0xdD9C863197df28f47721107f94eb031b548B5e48' }), } \ No newline at end of file From dfc818716a0711d60a8e5a397c5ed497da13ba84 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 22 Oct 2024 12:24:07 +0200 Subject: [PATCH 019/787] Feat: Adapter, lisUSD: add pool2 (#11969) --- projects/helio-money/index.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/projects/helio-money/index.js b/projects/helio-money/index.js index 6dcb3134de87..94e1253e48de 100644 --- a/projects/helio-money/index.js +++ b/projects/helio-money/index.js @@ -2,6 +2,31 @@ const ADDRESSES = require("../helper/coreAssets.json"); const { staking } = require("../helper/staking"); const { sumTokensExport } = require("../helper/unknownTokens"); +const lisLPs = [ + "0xe8f4644637f127aFf11F9492F41269eB5e8b8dD2", // Lista LP Stable-LP + "0xFf5ed1E64aCA62c822B178FFa5C36B40c112Eb00", // Lista LP aSnBNB-WBNB + "0x4b2D67Bf25245783Fc4C33a48962775437F9159c", // Lista LP aUSDT-LISTA + "0xC23d348f9cC86dDB059ec798e87E7F76FBC077C1", // Lista LP aHAY-USDT + "0xF6aB5cfdB46357f37b0190b793fB199D62Dcf504", // Lista LP UV-17-THE + "0x1Cf9c6D475CdcA67942d41B0a34BD9cB9D336C4d", // Lista LP sAMM-HAY/FRAX + ]; + +const abi = { + lpToken: "address:lpToken", + lpTotalSupply: "uint256:lpTotalSupply", +}; + +const pool2 = async (api) => { + const [lisLpTokens, lisLpBalances] = await Promise.all([ + api.multiCall({calls: lisLPs.map((lis) => ({ target: lis })), abi: abi.lpToken }), + api.multiCall({calls: lisLPs.map((lis) => ({ target: lis })), abi: abi.lpTotalSupply }), + ]); + + lisLPs.forEach((_lp, i) => { + api.add(lisLpTokens[i], lisLpBalances[i]) + }) +} + module.exports = { methodology: "The TVL is calculated by summing the values of tokens held in the specified vault addresses", hallmarks: [ @@ -66,6 +91,7 @@ module.exports = { ], ], }), + pool2, staking: staking('0xd0C380D31DB43CD291E2bbE2Da2fD6dc877b87b3','0xFceB31A79F71AC9CBDCF853519c1b12D379EdC46') }, }; From 68632a69ba72c8b3fe3ea28971eba649d88b9738 Mon Sep 17 00:00:00 2001 From: 0x77 <42128352+0x0077@users.noreply.github.com> Date: Tue, 22 Oct 2024 19:28:15 +0800 Subject: [PATCH 020/787] Add Oxiswap adapter (#11960) --- projects/helper/chain/fuel.js | 15 +++++++++++++++ projects/oxiswap/index.js | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 projects/oxiswap/index.js diff --git a/projects/helper/chain/fuel.js b/projects/helper/chain/fuel.js index 240224438a50..fd1dd1e07727 100644 --- a/projects/helper/chain/fuel.js +++ b/projects/helper/chain/fuel.js @@ -28,7 +28,22 @@ async function sumTokens({ api, owner, owners, token, tokens = [], tokensAndOwne } } +async function sumAllTokens({ api, owners = [] }) { + const query = owners.map((owner, i) => `q${i}: contractBalances( + filter: { contract: "${owner}" }, first: 100 + ) { nodes { assetId amount } }`).join('\n'); + + const results = await client.request(`{${query}}`); + Object.values(results).forEach(res => { + res.nodes.forEach(node => { + api.add(node.assetId, node.amount); + }); + }); + + return transformBalances('fuel', api.getBalances()); +} module.exports = { sumTokens, + sumAllTokens } \ No newline at end of file diff --git a/projects/oxiswap/index.js b/projects/oxiswap/index.js new file mode 100644 index 000000000000..884a12beef1b --- /dev/null +++ b/projects/oxiswap/index.js @@ -0,0 +1,12 @@ +const { sumAllTokens } = require("../helper/chain/fuel") + +async function tvl(_, _1, _2, { api }) { + const pairContract = '0x0da1be8528c8f546521ba9507d334cdb06cbc8b8842b3c0a871b1b4195635363'; + return sumAllTokens({ api, owners: [pairContract] }); +} + +module.exports = { + methodology: "TVL is calculated by summing the value of all tokens held in the pair contract.", + fuel: { tvl }, + timetravel: false, +}; \ No newline at end of file From 02a1b87ee1b4b03ad968f42ecc2821cc857ad2a7 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Tue, 22 Oct 2024 13:38:19 +0100 Subject: [PATCH 021/787] add historical to test.js --- README.md | 4 +++- test.js | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a5021fe70224..c78ecdb136f8 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,10 @@ This is a work in progress. The goal is to eventually handle historical data. De If you have any suggestions, want to contribute or want to chat, please join [our discord](https://discord.defillama.com/) and drop a message. ## Testing adapters -``` +```bash node test.js projects/pangolin/index.js +# Add a timestamp at the end to run the adapter at a historical timestamp +node test.js projects/aave/v3.js 1729080692 ``` ## Changing RPC providers diff --git a/test.js b/test.js index 1518dd2ae7da..2533a52f6d33 100644 --- a/test.js +++ b/test.js @@ -10,7 +10,7 @@ const path = require("path"); require("dotenv").config(); const { ENV_KEYS } = require("./projects/helper/env"); const { util: { - blocks: { getCurrentBlocks }, + blocks: { getBlocks }, humanizeNumber: { humanizeNumber }, } } = require("@defillama/sdk"); const { util } = require("@defillama/sdk"); @@ -142,9 +142,15 @@ function validateHallmarks(hallmark) { // await initCache() const chains = Object.keys(module).filter(item => typeof module[item] === 'object' && !Array.isArray(module[item])); checkExportKeys(module, passedFile, chains) - const unixTimestamp = Math.round(Date.now() / 1000) - 60; - // const { chainBlocks } = await getCurrentBlocks([]); // fetch only ethereum block for local test - const chainBlocks = {} + + let unixTimestamp = Math.round(Date.now() / 1000) - 60; + let chainBlocks = {} + const passedTimestamp = process.argv[3] + if(passedTimestamp !== undefined){ + unixTimestamp = Number(passedTimestamp) + const res = await getBlocks(unixTimestamp, chains) + chainBlocks = res.chainBlocks + } const ethBlock = chainBlocks.ethereum; const usdTvls = {}; const tokensBalances = {}; From ae2709fbeeecb1994c2ad621260155e8ae96552d Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:42:55 +0100 Subject: [PATCH 022/787] add wallet obelisk (#11988) --- projects/obelisk/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/obelisk/index.js b/projects/obelisk/index.js index 46abeb6122b2..67023bb3ca38 100644 --- a/projects/obelisk/index.js +++ b/projects/obelisk/index.js @@ -4,7 +4,8 @@ const sdk = require('@defillama/sdk') const staticAddresses = [ 'bc1p0tr3dgulgpx43dkktjxy8z2azz6yvx4j7s0lelj67tlwct0wnqtqeakfer', '14ejzLtUSMsjZE8Pp2LUhX3Pf7BbXPeZyP', - 'bc1q0hapsvdtqfeyw9fjacey9350k8zu552p0khyhj' + 'bc1q0hapsvdtqfeyw9fjacey9350k8zu552p0khyhj', + 'bc1pr6pga0d44xm3t8z36qnya6sfznsm8fwkn507x6gqt86xtnvm4h4sj2zqus' ] const abi = { From d21e0132feae6d28c8d1359b8bdb4e592521d567 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:34:57 -0600 Subject: [PATCH 023/787] Create index.js --- projects/babylon/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 projects/babylon/index.js diff --git a/projects/babylon/index.js b/projects/babylon/index.js new file mode 100644 index 000000000000..fd074ef2673a --- /dev/null +++ b/projects/babylon/index.js @@ -0,0 +1,22 @@ +// Babylon Chain TVL Adapter + +const axios = require('axios'); + +async function tvl(api) { + // Call the Babylon staking API to get the TVL data + const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); + const activeTvl = response.data.data.active_tvl; + + // Add the active TVL to the balances + api.add('bitcoin', activeTvl); +} + +module.exports = { + methodology: 'The TVL is calculated by taking the total Bitcoin (in satoshis) locked in the Babylon Chain staking protocol.', + start: 1729000000, + timetravel: false, // Disallow backfill as the API doesn't support timestamps + misrepresentedTokens: false, + bitcoin: { + tvl, + }, +}; \ No newline at end of file From 1b65b6718dda74953bdcfd1a4d8c5685f9a2ad69 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:42:19 -0600 Subject: [PATCH 024/787] Update index.js --- projects/babylon/index.js | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index fd074ef2673a..97d05c5c3481 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -1,20 +1,28 @@ -// Babylon Chain TVL Adapter - const axios = require('axios'); async function tvl(api) { - // Call the Babylon staking API to get the TVL data - const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); - const activeTvl = response.data.data.active_tvl; + try { + const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); + const activeTvl = response.data.data.active_tvl; + + + console.log('Active TVL (in satoshis):', activeTvl); - // Add the active TVL to the balances - api.add('bitcoin', activeTvl); + + if (activeTvl) { + api.add('bitcoin', activeTvl); + } else { + console.error('No active TVL returned from API.'); + } + } catch (error) { + console.error('Error fetching TVL:', error); + } } module.exports = { methodology: 'The TVL is calculated by taking the total Bitcoin (in satoshis) locked in the Babylon Chain staking protocol.', start: 1729000000, - timetravel: false, // Disallow backfill as the API doesn't support timestamps + timetravel: false, misrepresentedTokens: false, bitcoin: { tvl, From 8d1e05deb7a0e3ac459f9d40796c5657a25ac781 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 11:52:17 -0600 Subject: [PATCH 025/787] Update index.js --- projects/babylon/index.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index 97d05c5c3481..fb6f748a2821 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -3,16 +3,17 @@ const axios = require('axios'); async function tvl(api) { try { const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); - const activeTvl = response.data.data.active_tvl; + const activeTvlSatoshis = response.data.data.active_tvl; - console.log('Active TVL (in satoshis):', activeTvl); + const activeTvlBitcoin = activeTvlSatoshis / 100000000; - - if (activeTvl) { - api.add('bitcoin', activeTvl); + console.log('Active TVL (in Bitcoin):', activeTvlBitcoin); + + if (activeTvlBitcoin && activeTvlBitcoin > 0) { + api.add('bitcoin', activeTvlBitcoin); } else { - console.error('No active TVL returned from API.'); + console.error('No valid active TVL returned from API.'); } } catch (error) { console.error('Error fetching TVL:', error); @@ -20,9 +21,9 @@ async function tvl(api) { } module.exports = { - methodology: 'The TVL is calculated by taking the total Bitcoin (in satoshis) locked in the Babylon Chain staking protocol.', - start: 1729000000, - timetravel: false, + methodology: 'The TVL is calculated by taking the total Bitcoin locked in the Babylon Chain staking protocol.', + start: 1729000000, + timetravel: false, misrepresentedTokens: false, bitcoin: { tvl, From 58bad21591cc04b152b180c59b5f1acda4d35045 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:00:02 -0600 Subject: [PATCH 026/787] Update index.js --- projects/babylon/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index fb6f748a2821..32e5b518b3c7 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -8,10 +8,14 @@ async function tvl(api) { const activeTvlBitcoin = activeTvlSatoshis / 100000000; + console.log('Active TVL (in Bitcoin):', activeTvlBitcoin); + if (activeTvlBitcoin && activeTvlBitcoin > 0) { + console.log('Attempting to add TVL to API...'); api.add('bitcoin', activeTvlBitcoin); + console.log('TVL added:', activeTvlBitcoin); } else { console.error('No valid active TVL returned from API.'); } @@ -21,9 +25,9 @@ async function tvl(api) { } module.exports = { - methodology: 'The TVL is calculated by taking the total Bitcoin locked in the Babylon Chain staking protocol.', + methodology: 'The TVL is calculated by taking the total Bitcoin locked in the Babylon Chain staking protocol, fetched from the Babylon API.', start: 1729000000, - timetravel: false, + timetravel: false, misrepresentedTokens: false, bitcoin: { tvl, From 50661ceb7dbb4b83b9b9f5931613c9d40af19340 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:38:01 -0600 Subject: [PATCH 027/787] Update index.js --- projects/babylon/index.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index 32e5b518b3c7..b21bff1aa3c0 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -4,30 +4,26 @@ async function tvl(api) { try { const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); const activeTvlSatoshis = response.data.data.active_tvl; - - const activeTvlBitcoin = activeTvlSatoshis / 100000000; - console.log('Active TVL (in Bitcoin):', activeTvlBitcoin); - if (activeTvlBitcoin && activeTvlBitcoin > 0) { console.log('Attempting to add TVL to API...'); - api.add('bitcoin', activeTvlBitcoin); - console.log('TVL added:', activeTvlBitcoin); + api.add('bitcoin', activeTvlBitcoin.toString()); + console.log('TVL added successfully:', activeTvlBitcoin); } else { console.error('No valid active TVL returned from API.'); } } catch (error) { - console.error('Error fetching TVL:', error); + console.error('Error fetching or adding TVL:', error); } } module.exports = { methodology: 'The TVL is calculated by taking the total Bitcoin locked in the Babylon Chain staking protocol, fetched from the Babylon API.', - start: 1729000000, - timetravel: false, + start: 1729000000, + timetravel: false, misrepresentedTokens: false, bitcoin: { tvl, From 8ca04e619f248c58b12b5d33dfca97c0ee239bb5 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:36:21 -0600 Subject: [PATCH 028/787] Update index.js --- projects/babylon/index.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index b21bff1aa3c0..00a63908d929 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -1,27 +1,34 @@ const axios = require('axios'); -async function tvl(api) { +async function tvl() { try { + console.log('Fetching TVL from Babylon API...'); const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); + console.log('Full API Response:', response.data); + const activeTvlSatoshis = response.data.data.active_tvl; - const activeTvlBitcoin = activeTvlSatoshis / 100000000; - - console.log('Active TVL (in Bitcoin):', activeTvlBitcoin); + const activeTvlBitcoin = activeTvlSatoshis / 1e8; + + console.log('TVL in Bitcoin being added:', activeTvlBitcoin); if (activeTvlBitcoin && activeTvlBitcoin > 0) { - console.log('Attempting to add TVL to API...'); - api.add('bitcoin', activeTvlBitcoin.toString()); - console.log('TVL added successfully:', activeTvlBitcoin); + const balances = { + 'bitcoin': activeTvlBitcoin, + }; + console.log('TVL added successfully:', balances); + return balances; } else { console.error('No valid active TVL returned from API.'); + return {}; } } catch (error) { console.error('Error fetching or adding TVL:', error); + return {}; } } module.exports = { - methodology: 'The TVL is calculated by taking the total Bitcoin locked in the Babylon Chain staking protocol, fetched from the Babylon API.', + methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', start: 1729000000, timetravel: false, misrepresentedTokens: false, From a970932faf9b06ed1aec0b12bf459e777468b3d5 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:50:35 -0600 Subject: [PATCH 029/787] Update index.js --- projects/babylon/index.js | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index 00a63908d929..63d124567edd 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -2,34 +2,25 @@ const axios = require('axios'); async function tvl() { try { - console.log('Fetching TVL from Babylon API...'); const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); - console.log('Full API Response:', response.data); - const activeTvlSatoshis = response.data.data.active_tvl; const activeTvlBitcoin = activeTvlSatoshis / 1e8; - console.log('TVL in Bitcoin being added:', activeTvlBitcoin); - if (activeTvlBitcoin && activeTvlBitcoin > 0) { - const balances = { - 'bitcoin': activeTvlBitcoin, + return { + bitcoin: activeTvlBitcoin, }; - console.log('TVL added successfully:', balances); - return balances; } else { - console.error('No valid active TVL returned from API.'); return {}; } } catch (error) { - console.error('Error fetching or adding TVL:', error); return {}; } } module.exports = { methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', - start: 1729000000, + start: 1729000000, timetravel: false, misrepresentedTokens: false, bitcoin: { From 30969faec6573951ebc2b212b4b0c03b62b989d0 Mon Sep 17 00:00:00 2001 From: domodata <137194840+domodata@users.noreply.github.com> Date: Thu, 17 Oct 2024 10:59:00 -0600 Subject: [PATCH 030/787] Update index.js --- projects/babylon/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index 63d124567edd..19d40e19cb54 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -20,7 +20,7 @@ async function tvl() { module.exports = { methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', - start: 1729000000, + start: 1724351485, timetravel: false, misrepresentedTokens: false, bitcoin: { From 03661f6156a4e233f533067739fef9959c2e0d2d Mon Sep 17 00:00:00 2001 From: 0xpeluche <0xpeluche@proton.me> Date: Tue, 22 Oct 2024 15:42:10 +0200 Subject: [PATCH 031/787] add doublecounted:true --- projects/babylon/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index 19d40e19cb54..c43236e464f5 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -19,6 +19,7 @@ async function tvl() { } module.exports = { + doublecounted:true, methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', start: 1724351485, timetravel: false, From b5ee65d971efd068473609d398f827a892e0a4db Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:05:24 +0100 Subject: [PATCH 032/787] Add apechain camelot (#11989) Co-authored-by: domodata <137194840+domodata@users.noreply.github.com> Co-authored-by: 0xpeluche <0xpeluche@proton.me> --- projects/babylon/index.js | 30 ++++++++++++++++++++++++++++++ projects/camelot-v2/index.js | 2 +- projects/camelot/index.js | 3 +++ projects/helper/chains.json | 1 + projects/helper/env.js | 3 ++- projects/helper/tokenMapping.js | 6 +++++- 6 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 projects/babylon/index.js diff --git a/projects/babylon/index.js b/projects/babylon/index.js new file mode 100644 index 000000000000..c43236e464f5 --- /dev/null +++ b/projects/babylon/index.js @@ -0,0 +1,30 @@ +const axios = require('axios'); + +async function tvl() { + try { + const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); + const activeTvlSatoshis = response.data.data.active_tvl; + const activeTvlBitcoin = activeTvlSatoshis / 1e8; + + if (activeTvlBitcoin && activeTvlBitcoin > 0) { + return { + bitcoin: activeTvlBitcoin, + }; + } else { + return {}; + } + } catch (error) { + return {}; + } +} + +module.exports = { + doublecounted:true, + methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', + start: 1724351485, + timetravel: false, + misrepresentedTokens: false, + bitcoin: { + tvl, + }, +}; \ No newline at end of file diff --git a/projects/camelot-v2/index.js b/projects/camelot-v2/index.js index 4531ce7b67bf..ec282cb3732b 100644 --- a/projects/camelot-v2/index.js +++ b/projects/camelot-v2/index.js @@ -1,4 +1,3 @@ - const { uniV3Export } = require('../helper/uniswapV3') const { mergeExports } = require('../helper/utils'); @@ -13,6 +12,7 @@ const export2 = uniV3Export({ arbitrum: { factory: '0xd490f2f6990c0291597fd1247651b4e0dcf684dd', fromBlock: 75633510, isAlgebra: true, }, reya: { factory: '0x10aA510d94E094Bd643677bd2964c3EE085Daffc', fromBlock: 2932166, isAlgebra: true, }, gravity: { factory: '0x10aA510d94E094Bd643677bd2964c3EE085Daffc', fromBlock: 11988, isAlgebra: true, }, + apechain: { factory: '0x10aA510d94E094Bd643677bd2964c3EE085Daffc', fromBlock: 60224, isAlgebra: true, }, }) module.exports = mergeExports([export1, export2 ]) \ No newline at end of file diff --git a/projects/camelot/index.js b/projects/camelot/index.js index 60c30208cada..195068af3fc5 100644 --- a/projects/camelot/index.js +++ b/projects/camelot/index.js @@ -20,5 +20,8 @@ module.exports = { }, gravity: { tvl: getUniTVL({factory: '0x7d8c6B58BA2d40FC6E34C25f9A488067Fe0D2dB4', useDefaultCoreAssets: true}) + }, + apechain: { + tvl: getUniTVL({factory: '0x7d8c6B58BA2d40FC6E34C25f9A488067Fe0D2dB4', useDefaultCoreAssets: true}) } }; \ No newline at end of file diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 7f9d68aaf8ec..29abe24e0f71 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -14,6 +14,7 @@ "ancient8", "archway", "area", + "apechain", "astar", "astrzk", "aura", diff --git a/projects/helper/env.js b/projects/helper/env.js index ea4b276e45c5..30372bc4a008 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -20,7 +20,8 @@ const DEFAULTS = { MATCHAIN_RPC_MULTICALL: "0xDa91510Bd8c50bfa54FC2BE2dD6dAbE03eA8496c", SHAPE_RPC:'https://mainnet.shape.network', SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", - WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public" + WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", + APECHAIN_RPC: "https://rpc.apechain.com" } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 7589bfb91cf6..2dc87687ef58 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -106,11 +106,15 @@ const fixBalancesTokens = { '0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0': { coingeckoId: 'renzo-restaked-eth', decimals: 9 }, }, wc: { - '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1': { coingeckoId: 'usd-coin', decimals: 6 }, '0x2cFc85d8E48F8EAB294be644d9E25C3030863003': { coingeckoId: 'worldcoin-wld', decimals: 18 }, '0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3': { coingeckoId: 'bitcoin', decimals: 8 }, '0x4200000000000000000000000000000000000006': { coingeckoId: 'weth', decimals: 18 } + }, + apechain: { + '0x48b62137EdfA95a428D35C09E44256a739F6B557': { coingeckoId: 'wrapped-apecoin', decimals: 18 }, + '0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4': { coingeckoId: 'savings-dai', decimals: 18 }, + '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, } } From 27922a9893310ae7ac6027f71690a7e1e96d30e1 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:41:52 +0100 Subject: [PATCH 033/787] doublecounted Babylon projects (#11992) --- projects/allo/index.js | 1 + projects/babylon/index.js | 1 - projects/lombard/index.js | 1 + projects/lorenzo/index.js | 1 + projects/pstake-btc/index.js | 1 + projects/solv-btc-lst/index.js | 1 + projects/xlink-btc-lst/index.js | 1 + 7 files changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/allo/index.js b/projects/allo/index.js index 3cd9652cc9db..7e35687d2459 100644 --- a/projects/allo/index.js +++ b/projects/allo/index.js @@ -12,6 +12,7 @@ const owner = [ module.exports = { methodology: `Total amount of BTC in restaked on babylon`, + doublecounted:true, bitcoin: { tvl: sumTokensExport({ owner }), }, diff --git a/projects/babylon/index.js b/projects/babylon/index.js index c43236e464f5..19d40e19cb54 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -19,7 +19,6 @@ async function tvl() { } module.exports = { - doublecounted:true, methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', start: 1724351485, timetravel: false, diff --git a/projects/lombard/index.js b/projects/lombard/index.js index 4ca0729ebd87..a301f706dd09 100644 --- a/projects/lombard/index.js +++ b/projects/lombard/index.js @@ -35,6 +35,7 @@ async function tvl() { } module.exports = { + doublecounted:true, timetravel: false, isHeavyProtocol: true, bitcoin: { diff --git a/projects/lorenzo/index.js b/projects/lorenzo/index.js index 0c442499f958..fe745f0aa1ad 100644 --- a/projects/lorenzo/index.js +++ b/projects/lorenzo/index.js @@ -35,6 +35,7 @@ const LorenzoOwners = [ module.exports = { methodology: "Lorenzo, As the Bitcoin Liquidity Finance Layer", + doublecounted:true, bitcoin: { tvl: sumTokensExport({ owners : LorenzoOwners }), } diff --git a/projects/pstake-btc/index.js b/projects/pstake-btc/index.js index 19248616fa4d..64adca0a4e1e 100644 --- a/projects/pstake-btc/index.js +++ b/projects/pstake-btc/index.js @@ -5,6 +5,7 @@ const owner = ["bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d", "bc1pzq0ve6e7j6jt4c module.exports = { methodology: `Total amount of BTC in ${owner.join(", ")}. Restaked on babylon`, + doublecounted:true, bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owner })]), }, diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index 611daf93476e..1bde1c82f956 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -13,6 +13,7 @@ async function tvl() { module.exports = { methodology: 'Staked tokens via Babylon and Core are counted towards TVL, as they represent the underlying BTC assets securing their respective networks.', + doublecounted:true, bitcoin: { tvl } diff --git a/projects/xlink-btc-lst/index.js b/projects/xlink-btc-lst/index.js index 6dd544cfcf2d..2e08d588ed66 100644 --- a/projects/xlink-btc-lst/index.js +++ b/projects/xlink-btc-lst/index.js @@ -7,6 +7,7 @@ const owners = [ module.exports = { methodology: "Staking tokens via Babylon counts as TVL", + doublecounted:true, bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners })]), }} \ No newline at end of file From 6a831b01e8e5b2fbc3f68e5a61a181dd245c2077 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:20:35 +0100 Subject: [PATCH 034/787] add more wallets HTX/huobi (#11995) --- projects/huobi/index.js | 325 ++++++++++++++++++++++------------------ 1 file changed, 183 insertions(+), 142 deletions(-) diff --git a/projects/huobi/index.js b/projects/huobi/index.js index b26b1f88d3e7..25b5c5e65aa2 100644 --- a/projects/huobi/index.js +++ b/projects/huobi/index.js @@ -1,205 +1,246 @@ -const { cexExports } = require('../helper/cex') -const { mergeExports, sliceIntoChunks, sleep } = require('../helper/utils') -const { post, get } = require('../helper/http') -const sdk = require('@defillama/sdk') +const { cexExports } = require("../helper/cex"); +const { mergeExports, sliceIntoChunks, sleep } = require("../helper/utils"); +const { post, get } = require("../helper/http"); +const sdk = require("@defillama/sdk"); const config = { bitcoin: { owners: [ - '12qTdZHx6f77aQ74CPCZGSY47VaRwYjVD8', - '143gLvWYUojXaWZRrxquRKpVNTkhmr415B', - // '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', this wallet is backing USDD acording here https://prnt.sc/i3cFaak7H9Y8. For that reason, it should not included as HTX. + "12qTdZHx6f77aQ74CPCZGSY47VaRwYjVD8", + "143gLvWYUojXaWZRrxquRKpVNTkhmr415B", + // '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', this wallet is backing USDD acording here https://prnt.sc/i3cFaak7H9Y8. For that reason, it should not included as HTX. //These 3 addresses has 48,555 #Bitcoin. This is only less than 3% of the total high value assets we have, including btc, usd, stablecoins, T-bills.. According to Justin Sun https://twitter.com/justinsuntron/status/1590311559242612743 - '14XKsv8tT6tt8P8mfDQZgNF8wtN5erNu5D', - '1LXzGrDQqKqVBqxfGDUyhC6rTRBN5s8Sbj', - '1HckjUpRGcrrRAtFaaCAUaGjsPx9oYmLaZ', // add on 08/08/2023 (we defillama) - '1L15W6b9vkxV81xW5HDtmMBycrdiettHEL', // add on 08/08/2023 (we defillama) - '14o5ywJJmLPJe8egNo7a5fSdtEgarkus33', // add on 08/08/2023 (we defillama) - '1BuiWj9wPbQwNY97xU53LRPhzqNQccSquM', // add on 08/08/2023 (we defillama) - '1AQLXAB6aXSVbRMjbhSBudLf1kcsbWSEjg', // add on 23/02/2024 (we defillama) - '1ENWYLQZJRAZGtwBmoWrhmTtDUtJ5LseVj' + "14XKsv8tT6tt8P8mfDQZgNF8wtN5erNu5D", + "1LXzGrDQqKqVBqxfGDUyhC6rTRBN5s8Sbj", + "1HckjUpRGcrrRAtFaaCAUaGjsPx9oYmLaZ", // add on 08/08/2023 (we defillama) + "1L15W6b9vkxV81xW5HDtmMBycrdiettHEL", // add on 08/08/2023 (we defillama) + "14o5ywJJmLPJe8egNo7a5fSdtEgarkus33", // add on 08/08/2023 (we defillama) + "1BuiWj9wPbQwNY97xU53LRPhzqNQccSquM", // add on 08/08/2023 (we defillama) + "1AQLXAB6aXSVbRMjbhSBudLf1kcsbWSEjg", // add on 23/02/2024 (we defillama) + "1ENWYLQZJRAZGtwBmoWrhmTtDUtJ5LseVj", ], }, ethereum: { owners: [ - '0xa929022c9107643515f5c777ce9a910f0d1e490c', - '0x18709e89bd403f470088abdacebe86cc60dda12e', - '0xcac725bef4f114f728cbcfd744a731c2a463c3fc', - '0x0511509A39377F1C6c78DB4330FBfcC16D8A602f', - '0x1205E4f0D2f02262E667fd72f95a68913b4F7462', - '0xE4818f8fDe0C977A01DA4Fa467365B8bF22b071E', - '0x5C985E89DDe482eFE97ea9f1950aD149Eb73829B', - '0xc589b275e60dda57ad7e117c6dd837ab524a5666', - '0x6b2286fc3a9265bab3f064808022aca54de4b6ce', // add on 08/08/2023 (we defillama) - '0x3d655889d197125fb90dcb72e4a287a8410ed1b9', // add on 08/08/2023 (we defillama) - '0x2abc22eb9a09ebbe7b41737ccde147f586efeb6a', // add on 08/08/2023 (we defillama) - '0xa5d7f0f7027fa8f4d1be8042e1e43bbdec36951e', // add on 08/08/2023 (we defillama) - '0xeee28d484628d41a82d01e21d12e2e78d69920da', // add on 08/08/2023 (we defillama) - '0x6748f50f686bfbca6fe8ad62b22228b87f31ff2b', // add on 08/08/2023 (we defillama) - '0x34189c75cbb13bdb4f5953cda6c3045cfca84a9e', // add on 08/08/2023 (we defillama) - '0x1062a747393198f70f71ec65a582423dba7e5ab3', // add on 08/08/2023 (we defillama) - '0xab5c66752a9e8167967685f1450532fb96d5d24f', // add on 08/08/2023 (we defillama) - '0xdb0e89a9b003a28a4055ef772e345e8089987bfd', // add on 08/08/2023 (we defillama) - '0xfdb16996831753d5331ff813c29a93c76834a0ad', // add on 08/08/2023 (we defillama) - '0x46705dfff24256421a05d056c29e81bdc09723b8', // add on 08/08/2023 (we defillama) - '0xfd54078badd5653571726c3370afb127351a6f26', // add on 08/08/2023 (we defillama) - '0x07ef60deca209ea0f3f3f08c1ad21a6db5ef9d33', // add on 08/08/2023 (we defillama) - '0x18916e1a2933cb349145a280473a5de8eb6630cb', // add on 08/08/2023 (we defillama) - '0xfa4b5be3f2f84f56703c42eb22142744e95a2c58', // add on 08/08/2023 (we defillama) - '0x0a98fb70939162725ae66e626fe4b52cff62c2e5', // add on 08/08/2023 (we defillama) - '0x918800e018a0eeea672740f88a60091c7d327a79', // add on 08/08/2023 (we defillama) - '0xadb2b42f6bd96f5c65920b9ac88619dce4166f94', // add on 08/08/2023 (we defillama) - '0x42dc966b7ecc3c6cc73e7bc04862859d5bddce65', // add on 08/08/2023 (we defillama) - '0xe8d8a02601f54acb6fb69537be1f1d7cc76ccd8c', // add on 08/08/2023 (we defillama) - '0xf881bcb3705926cea9c598ab05a837cf41a833a9', // add on 08/08/2023 (we defillama) - '0xa03400e098f4421b34a3a44a1b4e571419517687', - '0x598273ea2cabd9f798564877851788c5e0d5b7b9', // start add on 23/02/2024 (we defillama) - '0x4fb312915b779b1339388e14b6d079741ca83128', - '0x30741289523c2e4d2a62c7d6722686d14e723851', - '0xe93381fb4c4f14bda253907b18fad305d799241a', // end add on 23/02/2024 (we defillama) - '0x6663613FbD927cE78abBF7F5Ca7e2c3FE0d96d18', // add on 22/07/2024 + "0xa929022c9107643515f5c777ce9a910f0d1e490c", + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0xcac725bef4f114f728cbcfd744a731c2a463c3fc", + "0x0511509A39377F1C6c78DB4330FBfcC16D8A602f", + "0x1205E4f0D2f02262E667fd72f95a68913b4F7462", + "0xE4818f8fDe0C977A01DA4Fa467365B8bF22b071E", + "0x5C985E89DDe482eFE97ea9f1950aD149Eb73829B", + "0xc589b275e60dda57ad7e117c6dd837ab524a5666", + "0x6b2286fc3a9265bab3f064808022aca54de4b6ce", // add on 08/08/2023 (we defillama) + "0x3d655889d197125fb90dcb72e4a287a8410ed1b9", // add on 08/08/2023 (we defillama) + "0x2abc22eb9a09ebbe7b41737ccde147f586efeb6a", // add on 08/08/2023 (we defillama) + "0xa5d7f0f7027fa8f4d1be8042e1e43bbdec36951e", // add on 08/08/2023 (we defillama) + "0xeee28d484628d41a82d01e21d12e2e78d69920da", // add on 08/08/2023 (we defillama) + "0x6748f50f686bfbca6fe8ad62b22228b87f31ff2b", // add on 08/08/2023 (we defillama) + "0x34189c75cbb13bdb4f5953cda6c3045cfca84a9e", // add on 08/08/2023 (we defillama) + "0x1062a747393198f70f71ec65a582423dba7e5ab3", // add on 08/08/2023 (we defillama) + "0xab5c66752a9e8167967685f1450532fb96d5d24f", // add on 08/08/2023 (we defillama) + "0xdb0e89a9b003a28a4055ef772e345e8089987bfd", // add on 08/08/2023 (we defillama) + "0xfdb16996831753d5331ff813c29a93c76834a0ad", // add on 08/08/2023 (we defillama) + "0x46705dfff24256421a05d056c29e81bdc09723b8", // add on 08/08/2023 (we defillama) + "0xfd54078badd5653571726c3370afb127351a6f26", // add on 08/08/2023 (we defillama) + "0x07ef60deca209ea0f3f3f08c1ad21a6db5ef9d33", // add on 08/08/2023 (we defillama) + "0x18916e1a2933cb349145a280473a5de8eb6630cb", // add on 08/08/2023 (we defillama) + "0xfa4b5be3f2f84f56703c42eb22142744e95a2c58", // add on 08/08/2023 (we defillama) + "0x0a98fb70939162725ae66e626fe4b52cff62c2e5", // add on 08/08/2023 (we defillama) + "0x918800e018a0eeea672740f88a60091c7d327a79", // add on 08/08/2023 (we defillama) + "0xadb2b42f6bd96f5c65920b9ac88619dce4166f94", // add on 08/08/2023 (we defillama) + "0x42dc966b7ecc3c6cc73e7bc04862859d5bddce65", // add on 08/08/2023 (we defillama) + "0xe8d8a02601f54acb6fb69537be1f1d7cc76ccd8c", // add on 08/08/2023 (we defillama) + "0xf881bcb3705926cea9c598ab05a837cf41a833a9", // add on 08/08/2023 (we defillama) + "0xa03400e098f4421b34a3a44a1b4e571419517687", + "0x598273ea2cabd9f798564877851788c5e0d5b7b9", // start add on 23/02/2024 (we defillama) + "0x4fb312915b779b1339388e14b6d079741ca83128", + "0x30741289523c2e4d2a62c7d6722686d14e723851", + "0xe93381fb4c4f14bda253907b18fad305d799241a", // end add on 23/02/2024 (we defillama) + "0x6663613FbD927cE78abBF7F5Ca7e2c3FE0d96d18", // add on 22/07/2024 ], blacklistedTokens: [ - '0x0316eb71485b0ab14103307bf65a021042c6d380', // HBTC , we already track their backed BTC (1btc wallet on the list) - ] + "0x0316eb71485b0ab14103307bf65a021042c6d380", // HBTC , we already track their backed BTC (1btc wallet on the list) + ], }, polygon: { owners: [ - '0xd70250731a72c33bfb93016e3d1f0ca160df7e42', - '0x9a7ffd7f6c42ab805e0edf16c25101964c6326b6', // add on 23/02/2024 - '0x18709e89bd403f470088abdacebe86cc60dda12e', - '0x2177c77a1f3c4900de7668662706633db4688726', - ] + "0xd70250731a72c33bfb93016e3d1f0ca160df7e42", + "0x9a7ffd7f6c42ab805e0edf16c25101964c6326b6", // add on 23/02/2024 + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0x2177c77a1f3c4900de7668662706633db4688726", + ], }, litecoin: { owners: [ - 'MNky8PL58UjL14mcZm3ESvEkYQkzMY9kfu', - 'LYmdXiH1u6UN2bFetfTGnNuFgEG64FWVLU', - 'MGZv8pEkrsmpa2YAXRVXTtdCPBMnnR28fY', - 'MCRXTQ5uuBh6Qt8t4LuqZNvruZ5SmWXjrY' - ] + "MNky8PL58UjL14mcZm3ESvEkYQkzMY9kfu", + "LYmdXiH1u6UN2bFetfTGnNuFgEG64FWVLU", + "MGZv8pEkrsmpa2YAXRVXTtdCPBMnnR28fY", + "MCRXTQ5uuBh6Qt8t4LuqZNvruZ5SmWXjrY", + ], }, solana: { owners: [ - '88xTWZMeKfiTgbfEmPLdsUCQcZinwUfk25EBQZ21XMAZ', - 'BY4StcU9Y2BpgH8quZzorg31EGE4L1rjomN8FNsCBEcx', // add on 23/02/2024 - '8NBEbxLknGv5aRYefFrW2qFXoDZyi9fSHJNiJRvEcMBE', - '5bJcc9eb2XE7mqcET2xDuAdMGuXWybb4YPmAHLjKLhQG', - ] + "88xTWZMeKfiTgbfEmPLdsUCQcZinwUfk25EBQZ21XMAZ", + "BY4StcU9Y2BpgH8quZzorg31EGE4L1rjomN8FNsCBEcx", // add on 23/02/2024 + "8NBEbxLknGv5aRYefFrW2qFXoDZyi9fSHJNiJRvEcMBE", + "5bJcc9eb2XE7mqcET2xDuAdMGuXWybb4YPmAHLjKLhQG", + ], }, tron: { owners: [ - 'TYh6mgoMNZTCsgpYHBz7gttEfrQmDMABub', - 'TKgD8Qnx9Zw3DNvG6o83PkufnMbtEXis4T', - 'TCQQjfccKdMi4CnPAzmZW5TALH4HbwceVb', - 'TNaRAoLUyYEV2uF7GUrzSjRQTU8v5ZJ5VR', - 'TDToUxX8sH4z6moQpK3ZLAN24eupu2ivA4', - 'TCiRCBNFrL6bFKWL94yWQi5hNMGNp1Nu27', - 'TGn1uvntAVntT1pG8o7qoKkbViiYfeg6Gj', - 'TAuUCiH4JVNBZmDnEDZkXEUXDARdGpXTmX', - 'TF2fmSbg5HAD34KPUH7WtWCxxvgXHohzYM', - 'THZovMcKoZaV9zzFTWteQYd2f3NEvnzxAM', - // 'TZ1SsapyhKNWaVLca6P2qgVzkHTdk6nkXa', // this wallet is backing USDD acording here https://prnt.sc/lvIQUtCNbk2X. For that reason, it should not included as HTX. - 'TDvf1dSBhR7dEskJs17HxGHheJrjXhiFyM', - 'TUJGLHo3rq4EAUY1LHRhNkHPX8qmrv9WFs', // add on 08/08/2023 (we defillama) - 'TRSXRWudzfzY4jH7AaMowdMNUXDkHisbcd', // add on 08/08/2023 (we defillama) - 'TU1ZA8T2g8PvLK8BfM7N94xpmSSpyfxZoK', - 'TFTWNgDBkQ5wQoP8RXpRznnHvAVV8x5jLu', // add on 23/02/2024 - 'TK86Qm97uM848dMk8G7xNbJB7zG1uW3h1n', - 'TT5iK8oqGEyRKJAnRwrLSZ4fM5y77F2LNT', - ] + "TYh6mgoMNZTCsgpYHBz7gttEfrQmDMABub", + "TKgD8Qnx9Zw3DNvG6o83PkufnMbtEXis4T", + "TCQQjfccKdMi4CnPAzmZW5TALH4HbwceVb", + "TNaRAoLUyYEV2uF7GUrzSjRQTU8v5ZJ5VR", + "TDToUxX8sH4z6moQpK3ZLAN24eupu2ivA4", + "TCiRCBNFrL6bFKWL94yWQi5hNMGNp1Nu27", + "TGn1uvntAVntT1pG8o7qoKkbViiYfeg6Gj", + "TAuUCiH4JVNBZmDnEDZkXEUXDARdGpXTmX", + "TF2fmSbg5HAD34KPUH7WtWCxxvgXHohzYM", + "THZovMcKoZaV9zzFTWteQYd2f3NEvnzxAM", + // 'TZ1SsapyhKNWaVLca6P2qgVzkHTdk6nkXa', // this wallet is backing USDD acording here https://prnt.sc/lvIQUtCNbk2X. For that reason, it should not included as HTX. + "TDvf1dSBhR7dEskJs17HxGHheJrjXhiFyM", + "TUJGLHo3rq4EAUY1LHRhNkHPX8qmrv9WFs", // add on 08/08/2023 (we defillama) + "TRSXRWudzfzY4jH7AaMowdMNUXDkHisbcd", // add on 08/08/2023 (we defillama) + "TU1ZA8T2g8PvLK8BfM7N94xpmSSpyfxZoK", + "TFTWNgDBkQ5wQoP8RXpRznnHvAVV8x5jLu", // add on 23/02/2024 + "TK86Qm97uM848dMk8G7xNbJB7zG1uW3h1n", + "TT5iK8oqGEyRKJAnRwrLSZ4fM5y77F2LNT", + ], }, algorand: { - owners: ['J4AEINCSSLDA7LNBNWM4ZXFCTLTOZT5LG3F5BLMFPJYGFWVCMU37EZI2AM'] + owners: ["J4AEINCSSLDA7LNBNWM4ZXFCTLTOZT5LG3F5BLMFPJYGFWVCMU37EZI2AM"], }, avax: { owners: [ - '0xe195b82df6a797551eb1acd506e892531824af27', - '0xa77ff0e1c52f58363a53282624c7baa5fa91687d', //start add on 23/02/2024 - '0x18709e89bd403f470088abdacebe86cc60dda12e', - '0x8b6a3587676719a4fecbb24b503a3634c44a44d5', - ] + "0xe195b82df6a797551eb1acd506e892531824af27", + "0xa77ff0e1c52f58363a53282624c7baa5fa91687d", //start add on 23/02/2024 + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0x8b6a3587676719a4fecbb24b503a3634c44a44d5", + ], }, eos: { - owners: ['vuniyuoxoeub'], + owners: ["vuniyuoxoeub"], }, ripple: { owners: [ - 'rKUDvXFJMFu65LqPTH3Yfpii4rbKT9bSQT', - 'raC4udvEeeni6aLPHbz9RKjHTQiWxKPfom', - 'ra4haepf6fehiCfVvB33j1D7vmv7JJD8M5', // add on 23/02/2024 - 'rNPuS242i9ufMPEMusnjYPxyyu4STqSDGq', - 'rPzT7GA6vWU3PvYSXBpdP5fQPnzwVLwL24', + "rKUDvXFJMFu65LqPTH3Yfpii4rbKT9bSQT", + "raC4udvEeeni6aLPHbz9RKjHTQiWxKPfom", + "ra4haepf6fehiCfVvB33j1D7vmv7JJD8M5", // add on 23/02/2024 + "rNPuS242i9ufMPEMusnjYPxyyu4STqSDGq", + "rPzT7GA6vWU3PvYSXBpdP5fQPnzwVLwL24", ], }, arbitrum: { owners: [ - '0xf2dbc42875e7764edbd89732a15214a9a0deb085', - '0xce7ec11a5f306c6b896526149db1a86c7d1531e2', // add on 23/02/2024 - '0x18709e89bd403f470088abdacebe86cc60dda12e', - '0x82d015d74670d8645b56c3f453398a3e799ee582', - ], + "0xf2dbc42875e7764edbd89732a15214a9a0deb085", + "0xce7ec11a5f306c6b896526149db1a86c7d1531e2", // add on 23/02/2024 + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0x82d015d74670d8645b56c3f453398a3e799ee582", + ], }, optimism: { owners: [ - '0x9ef21be1c270aa1c3c3d750f458442397fbffcb6', - '0xe0b7a39fef902c21bad124b144c62e7f85f5f5fa', // add on 23/02/2024 - '0x18709e89bd403f470088abdacebe86cc60dda12e', - '0xd3cc0c7d40366a061397274eae7c387d840e6ff8' - ], + "0x9ef21be1c270aa1c3c3d750f458442397fbffcb6", + "0xe0b7a39fef902c21bad124b144c62e7f85f5f5fa", // add on 23/02/2024 + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0xd3cc0c7d40366a061397274eae7c387d840e6ff8", + ], }, bsc: { owners: [ - '0xdd3cb5c974601bc3974d908ea4a86020f9999e0c', // add on 23/02/2024 - '0x18709e89bd403f470088abdacebe86cc60dda12e', - '0xafdfd157d9361e621e476036fee62f688450692b', - ], + "0xdd3cb5c974601bc3974d908ea4a86020f9999e0c", // add on 23/02/2024 + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0xafdfd157d9361e621e476036fee62f688450692b", + ], }, starknet: { owners: [ - '0x03fd14213a96e9d90563ebe1b224f357c6481a755ee6f046c8ce9acd9b8654a7' - ], + "0x03fd14213a96e9d90563ebe1b224f357c6481a755ee6f046c8ce9acd9b8654a7", + ], }, -} + doge: { + owners: [ + "DRRU8L7fF4k9w7SF3Z6ei8onPCsh9hjGX1", + "9ztZpRN3v9xv5JhAT7MTtmy4DfyMEAG8YU", + "DLzCvKskasu4Adj3XgbyNitKBukBSa5JPP", + ], + }, + cardano: { + owners: [ + "addr1q8wk8rw6xeqzerhahlhweuukkxme0fjsy4xqsqze3m4r8lxavwxa5djq9j80m0lwaneedvdhj7n9qf2vpqq9nrh2x07qfmr8sf", + "addr1q9n8v7e76pt4mmvxqprc4k7nk5nqz4x2flplfr0azq9dtnz5wckfyaph0sj98f7nc5g98q9dv2v8ece9jm8w30upgfvq4zhpjy", + "DdzFFzCqrhsuQV5ohP1EBh9d4UjmmWDb2Vui2s2SACSBDeEW74kHhp3zj9hvLFDb9mK7hRr7fbctu1UYatPaF1omXiXPwf12bn7DQvbT" + ], + }, + core: { + owners: [ + "0x18709e89bd403f470088abdacebe86cc60dda12e", + "0x6635dbb3d78671be495a6d876940752a0c4e7743", + "0x27387a41fd7c6cf86b4c96a54a4a1d8bd0b926bf" + ], + }, + sui: { + owners: [ + "0d9948b61478ec1609b4c00cd0162131109e7fd60d7d2ebb539cb414f3ec7b9d", + "0x1f7b27844f2c4a0262b2c481f7ab956d10ace524c5a7b06c3742cfb8701db714", + ], + }, + ton: { + owners: [ + "EQBf6sUcCkUrRCMzmpOW22P3BOD4XgL_solOp3M4n6Vb8_1c", + "EQC2bRkktc-ZATV_VK8B1dmN3KXZRKiblMiyvFW_aUzNTwxS", + "EQA9Q1P4Wtm5orpfWgV_DTbqoeRUx7h8LCqdx38x5RwIkuS3", + "EQCFr3jo0DXpIBF82mVGFc3zcdRkSAtinhENPFMQ2FqzYqDB" + ], + }, +}; module.exports = mergeExports([ cexExports(config), - { ethereum: { tvl: stakingTVL, } } -]) -module.exports.methodology = 'We added the wallets from here https://github.com/huobiapi/Tool-Node.js-VerifyAddress/blob/main/snapshot/huobi_por_20230701.csv . We are not tracking 3 wallets, 2 on Heco Chain, 1 on BTTC chain. We also count stUSDT.' -module.exports.hallmarks = [ - [1723066836,"remove usdd collateral"] -] - + { ethereum: { tvl: stakingTVL } }, +]); +module.exports.methodology = + "We added the wallets from here https://github.com/huobiapi/Tool-Node.js-VerifyAddress/blob/main/snapshot/huobi_por_20230701.csv . We are not tracking 3 wallets, 2 on Heco Chain, 1 on BTTC chain. We also count stUSDT."; +module.exports.hallmarks = [[1723066836, "remove usdd collateral"]]; async function stakingTVL() { - const withdrawalAddress = '0x08DeB6278D671E2a1aDc7b00839b402B9cF3375d' - let fetchedValidators = 2400 - let size = 200 - let ethBalance = (await sdk.api2.eth.getBalance({ target: '0x08DeB6278D671E2a1aDc7b00839b402B9cF3375d'})).output/1e18 + const withdrawalAddress = "0x08DeB6278D671E2a1aDc7b00839b402B9cF3375d"; + let fetchedValidators = 2400; + let size = 200; + let ethBalance = + ( + await sdk.api2.eth.getBalance({ + target: "0x08DeB6278D671E2a1aDc7b00839b402B9cF3375d", + }) + ).output / 1e18; do { - const validators = (await get(`https://beaconcha.in/api/v1/validator/withdrawalCredentials/${withdrawalAddress}?limit=${size}&offset=${fetchedValidators}`)).data.map(i => i.publickey) - fetchedValidators += validators.length - await addValidatorBalance(validators) - await sleep(10000) - } while (fetchedValidators % size === 0) + const validators = ( + await get( + `https://beaconcha.in/api/v1/validator/withdrawalCredentials/${withdrawalAddress}?limit=${size}&offset=${fetchedValidators}` + ) + ).data.map((i) => i.publickey); + fetchedValidators += validators.length; + await addValidatorBalance(validators); + await sleep(10000); + } while (fetchedValidators % size === 0); return { - ethereum: ethBalance - } + ethereum: ethBalance, + }; async function addValidatorBalance(validators) { if (validators.length > 100) { - const chunks = sliceIntoChunks(validators, 100) - for (const chunk of chunks) await addValidatorBalance(chunk) + const chunks = sliceIntoChunks(validators, 100); + for (const chunk of chunks) await addValidatorBalance(chunk); return; } - const { data } = await post('https://beaconcha.in/api/v1/validator', { - indicesOrPubkey: validators.join(',') - }) - + const { data } = await post("https://beaconcha.in/api/v1/validator", { + indicesOrPubkey: validators.join(","), + }); - data.forEach((i) => ethBalance += i.balance/1e9) + data.forEach((i) => (ethBalance += i.balance / 1e9)); } -} \ No newline at end of file +} From dd9f6376aa50673d566d425c69754ff78c084779 Mon Sep 17 00:00:00 2001 From: Antoine <67124021+antoineborg@users.noreply.github.com> Date: Tue, 22 Oct 2024 20:31:15 +0200 Subject: [PATCH 035/787] SwissBorg: Add new SOL wallet (#11990) --- projects/swissborg/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index 28c2ba62c466..c990800bf0bb 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -52,6 +52,7 @@ const config = { 'Cet3t77x2BBVSmiEFm8ZPoDSngbpso2RuWPL79Ky7SpA', '9qoUcyhKSWMbk6tqGUYQUpeosPcdUnJszG4eQKwfe4gL', 'Fe7SEekiKygziaEGKxsDsgLVzrCfNvVBvAYsaJBwFA8s', + 'AR2ecEWY2vfsXmd4fUxc196LhbX5p8TnhvJg8t3fgYUN', ], }, polkadot: { From 141d2de43c63d436434e989237a6c1425eb5b874 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 02:17:22 +0200 Subject: [PATCH 036/787] minor fix --- projects/truemarkets/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/truemarkets/index.js b/projects/truemarkets/index.js index 2df572e6cc62..9d1d7047ee1b 100644 --- a/projects/truemarkets/index.js +++ b/projects/truemarkets/index.js @@ -1,5 +1,4 @@ const { getLogs2 } = require('../helper/cache/getLogs') -const { base } = require('../radiant-v2') const config = { base: { factory: '0x288025b60330e01d793B6e83c1a0dE22bb943459', fromBlock: 21180486 }, From ac2721b509acb41165e0db5c8c4ed5019895b3a1 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 02:29:29 +0200 Subject: [PATCH 037/787] Gravita (#12002) Co-authored-by: gbirckan --- projects/gravita-protocol/index.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/projects/gravita-protocol/index.js b/projects/gravita-protocol/index.js index e8ad230f8197..05686b9570d2 100644 --- a/projects/gravita-protocol/index.js +++ b/projects/gravita-protocol/index.js @@ -1,4 +1,5 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); +const { sumERC4626Vaults } = require("../helper/erc4626"); const ADMIN_ADDRESSES = { arbitrum: "0x4928c8F8c20A1E3C295DddBe05095A9aBBdB3d14", @@ -10,18 +11,20 @@ const ADMIN_ADDRESSES = { mantle: "0x4F39F12064D83F6Dd7A2BDb0D53aF8be560356A6", }; +const erc4626Vaults = { + ethereum: [ + "0xBB22d59B73D7a6F3A8a83A214BECc67Eb3b511fE", // WETH Vault - constellation + "0x1DB1Afd9552eeB28e2e36597082440598B7F1320", // RPL Vault - constellation + ] +} + async function tvl(api) { const adminContract = ADMIN_ADDRESSES[api.chain]; - const collAddresses = await api.call({ - abi: "address[]:getValidCollateral", - target: adminContract, - }); - const activePool = await api.call({ - abi: "address:activePool", - target: adminContract, - }); - const balances = await sumTokens2({ api, tokens: collAddresses, owner: activePool }); - return balances + const vaults = erc4626Vaults[api.chain] ?? [] + const collAddresses = await api.call({ abi: "address[]:getValidCollateral", target: adminContract, }); + const activePool = await api.call({ abi: "address:activePool", target: adminContract, }); + await sumTokens2({ api, tokens: collAddresses, owner: activePool, }); + await sumERC4626Vaults({ api, calls: vaults, isOG4626: true,}); } module.exports = { From a2584d9e485350193d8d375e0b7ba4ca52a8843f Mon Sep 17 00:00:00 2001 From: Strategic Reserve Date: Tue, 22 Oct 2024 17:40:29 -0700 Subject: [PATCH 038/787] Add apechain/camelot and zircuit/ocelex (#11999) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/tokenMapping.js | 5 ++++- projects/visor/config.js | 4 ++++ projects/visor/index.js | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 2dc87687ef58..8ba04f3f4c9a 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -115,7 +115,10 @@ const fixBalancesTokens = { '0x48b62137EdfA95a428D35C09E44256a739F6B557': { coingeckoId: 'wrapped-apecoin', decimals: 18 }, '0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4': { coingeckoId: 'savings-dai', decimals: 18 }, '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, - } + }, + zircuit: { + '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/visor/config.js b/projects/visor/config.js index 6f8b860e4fde..4b8d6af40f6e 100644 --- a/projects/visor/config.js +++ b/projects/visor/config.js @@ -150,10 +150,14 @@ const HYPE_REGISTRY = { zircuit: [ ["0xC27DDd78FC49875Fe6F844B72bbf31DFBB099881", 1216191], // Gmeow ["0x683292172E2175bd08e3927a5e72FC301b161300", 1216165], // Circuit + ["0x17307DaC1384719d263556aAcC3e62c0053FE25D", 4826564], // Ocelex ], wc: [ ["0xC27DDd78FC49875Fe6F844B72bbf31DFBB099881", 4799965], // Uniswap ], + apechain: [ + ["0xC27DDd78FC49875Fe6F844B72bbf31DFBB099881", 476343], // Camelot + ], }; Object.keys(HYPE_REGISTRY).forEach(chain => { diff --git a/projects/visor/index.js b/projects/visor/index.js index 595add42c602..e2e8bfe84638 100644 --- a/projects/visor/index.js +++ b/projects/visor/index.js @@ -5,6 +5,7 @@ const getTotalAmounts = "function getTotalAmounts() view returns (uint256 total0, uint256 total1)"; const { getUniqueAddresses } = require("../helper/utils"); const config = require("./config"); +const { sumTokens2 } = require('../helper/unwrapLPs') module.exports = { doublecounted: true, @@ -53,7 +54,7 @@ Object.keys(config).forEach(chain => { api.add(token0s[i], total0); api.add(token1s[i], total1); }); - return api.getBalances() + return sumTokens2({ api }) } } }) From 6bb031e9e5ea3623702e18a9569250bd21668f82 Mon Sep 17 00:00:00 2001 From: zak Date: Tue, 22 Oct 2024 19:54:07 -0500 Subject: [PATCH 039/787] Adds Contract For Beta Silo (#11994) --- projects/corn-l2/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/corn-l2/index.js b/projects/corn-l2/index.js index 99289b89f935..1b170f485123 100644 --- a/projects/corn-l2/index.js +++ b/projects/corn-l2/index.js @@ -5,6 +5,7 @@ module.exports = { tvl: sumTokensExport({ owners: [ "0x8bc93498b861fd98277c3b51d240e7e56e48f23c", + "0x6d85d1c7f58fd5d05b1b633e8b0ce2e57fca9d80", ], fetchCoValentTokens: true, permitFailure: true From c69e6ae945cf328483c423d5a630526cd08be88a Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 23 Oct 2024 03:00:40 +0200 Subject: [PATCH 040/787] Feat: adapter, Swell-earnEth (#11987) Co-authored-by: darvin --- projects/swell-earn-eth/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/swell-earn-eth/index.js diff --git a/projects/swell-earn-eth/index.js b/projects/swell-earn-eth/index.js new file mode 100644 index 000000000000..eb00e8e51de8 --- /dev/null +++ b/projects/swell-earn-eth/index.js @@ -0,0 +1,20 @@ +const { sumTokens2 } = require('../helper/unwrapLPs') + +const earnETHVault = '0x9Ed15383940CC380fAEF0a75edacE507cC775f22'; + +const tokens = [ + '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', // rswETH + '0xf951E335afb289353dc249e82926178EaC7DEd78', // swETH + '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', // wstETH + '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH +] + +const tvl = async (api) => { + return sumTokens2({ api, tokens, owner: earnETHVault }) +} + +module.exports = { + methodology: 'TVL represents the sum of tokens deposited in the vault', + doublecounted: true, + ethereum : { tvl } +} \ No newline at end of file From c96297b7f0c4e8094feff1803dff03ed2b2c4173 Mon Sep 17 00:00:00 2001 From: Thanh Nguyen <139751487+thanh-wombat@users.noreply.github.com> Date: Wed, 23 Oct 2024 08:10:12 +0700 Subject: [PATCH 041/787] Update TVL logic of Capybara Exchange (#11985) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/capybara-exchange/config.js | 7 +------ projects/capybara-exchange/index.js | 25 +++++++++++-------------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/projects/capybara-exchange/config.js b/projects/capybara-exchange/config.js index f563c219ab44..9d552c09fc0c 100644 --- a/projects/capybara-exchange/config.js +++ b/projects/capybara-exchange/config.js @@ -1,10 +1,5 @@ module.exports = { klaytn: { - pools: { - mainPool: "0x540cce8ed7d210f71eeabb9e7ed7698ac745e077", - volatilePool: "0x6389dbfa1427a3b0a89cddc7ea9bbda6e73dece7", - lstPool: "0x5CDE63386D78362267d9A3edC8DA204bB64D07D3", - stargatePool: "0x1dE1578476d9B4237F963eca5D37500Fc33DF3D1", - }, + master: "0x3CA30C862769b5de7987D2E2db4c1A72800A1Da1", }, }; diff --git a/projects/capybara-exchange/index.js b/projects/capybara-exchange/index.js index 9810ad1be6ae..4f34cd275cee 100644 --- a/projects/capybara-exchange/index.js +++ b/projects/capybara-exchange/index.js @@ -2,23 +2,20 @@ const config = require("./config"); const { sumTokens2 } = require("../helper/unwrapLPs"); Object.keys(config).forEach((chain) => { - const arg = config[chain]; + const { master } = config[chain]; module.exports[chain] = { tvl: async (api) => { - const pools = Object.values(arg["pools"]); - - let allUnderlying = await api.multiCall({ abi: "address[]:getTokens", calls: pools, }); - - const tokens = []; - const calls = []; - pools.forEach((v, i) => { - allUnderlying[i].forEach((t) => { - tokens.push(t); - calls.push({ target: v, params: t }); - }); + const poolInfos = await api.fetchList({ + // Reference: https://github.com/wombat-exchange/v1-core/blob/5887ec5e1f1cbd067eaee8aee49fcb857fb867c5/contracts/wombat-governance/MasterWombatV3.sol#L587 + lengthAbi: 'poolLength', + itemAbi: "function poolInfo(uint256) external view returns (address asset, uint96, address, uint256, uint104, uint104, uint40)", + target: master, }); - const wTokens = await api.multiCall({ abi: "function addressOfAsset(address) view returns (address)", calls, }); - return sumTokens2({ api, tokensAndOwners2: [tokens, wTokens], }); + // Reference: https://github.com/wombat-exchange/v1-core/blob/5887ec5e1f1cbd067eaee8aee49fcb857fb867c5/contracts/wombat-core/asset/Asset.sol#L4 + const assets = poolInfos.map(i => i.asset); + const uTokens = await api.multiCall({ abi: 'address:underlyingToken', calls: assets }) + + return sumTokens2({ api, tokensAndOwners2: [uTokens, assets], }); }, }; }); From 37d15d8ab536947dcb9270f70b672eced399a463 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 03:40:10 +0200 Subject: [PATCH 042/787] Goldstation (#12004) Co-authored-by: Booyoun --- projects/goldstation-dex/index.js | 13 +++++++++++++ projects/goldstation-rwa/index.js | 19 +++++++++++++++++++ projects/goldstation-staking/index.js | 11 +++++++++++ projects/helper/coreAssets.json | 1 + 4 files changed, 44 insertions(+) create mode 100644 projects/goldstation-dex/index.js create mode 100644 projects/goldstation-rwa/index.js create mode 100644 projects/goldstation-staking/index.js diff --git a/projects/goldstation-dex/index.js b/projects/goldstation-dex/index.js new file mode 100644 index 000000000000..7a965859b339 --- /dev/null +++ b/projects/goldstation-dex/index.js @@ -0,0 +1,13 @@ +const { getUniTVL } = require('../helper/unknownTokens'); +const { sumTokensExport } = require('../helper/unwrapLPs'); + +module.exports = { + misrepresentedTokens: true, + klaytn: { + tvl: getUniTVL({ factory: '0x347E5ce6764DF9DF85487BEA523D3e242762aE88', useDefaultCoreAssets: true }), + staking: sumTokensExport({ tokensAndOwners: [ + ['0x4836cc1f355bb2a61c210eaa0cd3f729160cd95e', '0x4d55B04AC52b2CA41ad04337FF13CbAefbdC8954'], + ]}) + } +} + diff --git a/projects/goldstation-rwa/index.js b/projects/goldstation-rwa/index.js new file mode 100644 index 000000000000..ba828d7a0344 --- /dev/null +++ b/projects/goldstation-rwa/index.js @@ -0,0 +1,19 @@ +const { sumUnknownTokens } = require('../helper/unknownTokens'); + +const GPC = '0x27397bfbefd58a437f2636f80a8e70cfc363d4ff'; + +async function tvl(api) { + const supply = await api.call({ abi: 'erc20:totalSupply', target: GPC }) + api.add(GPC, supply) + + const lps = ['0xCd13CD31fb61345Abe7B7376A4664784622817EE'] + return sumUnknownTokens({ api, lps, useDefaultCoreAssets: true }) +} + +module.exports = { + misrepresentedTokens: true, + klaytn: { + tvl, + } +} + diff --git a/projects/goldstation-staking/index.js b/projects/goldstation-staking/index.js new file mode 100644 index 000000000000..8a2dba4ab12d --- /dev/null +++ b/projects/goldstation-staking/index.js @@ -0,0 +1,11 @@ +const klayStakingContract = '0x6569B14043c03537B5B125F5Ac5De3605a47dC76'; + +async function tvl(api) { + const totalStaked = await api.call({ target: klayStakingContract, abi: "uint256:totalStaked", }); + api.addGasToken(totalStaked); +} + +module.exports = { + klaytn: { tvl } +} + diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 58311321aa34..1e162d640a69 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -439,6 +439,7 @@ }, "klaytn": { "WKLAY": "0x57d1a61e4fd09fbf16e35b04959e94dcf2032974", + "WKLAY_1": "0x19aac5f612f524b754ca7e7c41cbfa2e981a4432", "BORA": "0x02cbe46fb8a1f579254a9b485788f2d86cad51aa", "DAI": "0xcb2c7998696ef7a582dfd0aafadcd008d03e791a", "USDC": "0x608792deb376cce1c9fa4d0e6b7b44f507cffa6a", From 8a5d31de4f48b55876104332422022807aa794b6 Mon Sep 17 00:00:00 2001 From: mememan-anon Date: Tue, 22 Oct 2024 21:43:23 -0400 Subject: [PATCH 043/787] zenolend adapter (#12003) --- projects/zenolend/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/zenolend/index.js diff --git a/projects/zenolend/index.js b/projects/zenolend/index.js new file mode 100644 index 000000000000..995ab153320f --- /dev/null +++ b/projects/zenolend/index.js @@ -0,0 +1,10 @@ + +const { compoundExports2 } = require('../helper/compound') + +const config = { + apechain: '0xc2C583093Af9241E17B2Ec51844154468D21bF6F', +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = compoundExports2({ comptroller: config[chain] }) +}); \ No newline at end of file From 830eb0da4f5a02693315f524a4c349aabf68456f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 03:48:39 +0200 Subject: [PATCH 044/787] track https://star-fleet.io/harbor/liquid-staking/ --- projects/airdao-harbor/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/airdao-harbor/index.js diff --git a/projects/airdao-harbor/index.js b/projects/airdao-harbor/index.js new file mode 100644 index 000000000000..c129cf5ee5c8 --- /dev/null +++ b/projects/airdao-harbor/index.js @@ -0,0 +1,11 @@ +async function tvl(api) { + const totalStake = await api.call({ abi: 'uint256:getTotalStAmb', target: '0xBda7cf631Db4535A500ED16Dd98099C04e66F1d5' }) + api.addGasToken(totalStake) +} + +module.exports = { + methodology: `TVL counts deposits made to Harbor liquid staking on AirDAO.`, + airdao: { + tvl + } +} \ No newline at end of file From b2030c86206557c101367e53f9631e095875670d Mon Sep 17 00:00:00 2001 From: sandy-wombat <142200506+sandy-wombat@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:52:05 +0800 Subject: [PATCH 045/787] feat: add capybara perp (#11982) --- projects/capybara-perp/index.js | 8 ++++++++ projects/helper/coreAssets.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 projects/capybara-perp/index.js diff --git a/projects/capybara-perp/index.js b/projects/capybara-perp/index.js new file mode 100644 index 000000000000..27ea0a80f523 --- /dev/null +++ b/projects/capybara-perp/index.js @@ -0,0 +1,8 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') +const ADDRESSES = require('../helper/coreAssets.json') + +module.exports = { + klaytn: { + tvl: sumTokensExport({ owners: ['0xeB23e0a5065D96FCa71DE240C6b302B9Da14Ac0e', '0x94b231dD60E64ba8bCC72892cE4B4B9A5004730d'], tokens: [ADDRESSES.klaytn.stKaia] }), + } +} diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 1e162d640a69..328881d828d6 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -468,7 +468,8 @@ "aDAI": "0x2ff5371dad5c6ef76d55213b7c5a519f6654ba17", "aDAI_Wormhole_": "0xe9a88c33abf71c902f7581321d05e6516cbca761", "USDK": "0xd2137fdf10bd9e4e850c17539eb24cfe28777753", - "NPT": "0xe06597d02a2c3aa7a9708de2cfa587b128bd3815" + "NPT": "0xe06597d02a2c3aa7a9708de2cfa587b128bd3815", + "stKaia": "0x42952B873ed6f7f0A7E4992E2a9818E3A9001995" }, "nova": { "NUSD": "0x1f5396f254ee25377a5c1b9c6bff5f44e9294fff" From a9b0e312a639128dc866cc914c2d4247b155e57a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 04:04:04 +0200 Subject: [PATCH 046/787] update perfect pool #11974 --- projects/perfect-pool/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/perfect-pool/index.js b/projects/perfect-pool/index.js index dd2fe8827cc9..3eabd8a9c758 100644 --- a/projects/perfect-pool/index.js +++ b/projects/perfect-pool/index.js @@ -2,10 +2,13 @@ const { sumTokensExport } = require("../helper/unwrapLPs") const ADDRESSES = require('../helper/coreAssets.json') const NFT_ACE8 = '0x21F3ea812734b6492D88D268622CF068e9E6D596' +const NFT_ACE16 = '0x70A254c8201adbD88d88D17937d5e8aBb8B8095F' module.exports = { start: 1725311445, base: { - tvl: sumTokensExport({ owner: NFT_ACE8, token: ADDRESSES.base.USDC }), + tvl: sumTokensExport( + { owners: [NFT_ACE8, NFT_ACE16], token: ADDRESSES.base.USDC }, + ), } } \ No newline at end of file From a179ec0046ed8b3358a4652440e10fe1962058f0 Mon Sep 17 00:00:00 2001 From: Daniel Contreras Salinas Date: Wed, 23 Oct 2024 04:13:17 +0200 Subject: [PATCH 047/787] feat: update Arrakis Finance to add Arrakis Modular TVL (#11973) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/arrakis-modular/index.js | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 projects/arrakis-modular/index.js diff --git a/projects/arrakis-modular/index.js b/projects/arrakis-modular/index.js new file mode 100644 index 000000000000..a9a7ed4b1388 --- /dev/null +++ b/projects/arrakis-modular/index.js @@ -0,0 +1,41 @@ +const config = { + ethereum: { + factory: '0x820FB8127a689327C863de8433278d6181123982', + fromBlock: 20540819, + }, + arbitrum: { + factory: '0x820FB8127a689327C863de8433278d6181123982', + fromBlock: 243467827, + }, + base: { + factory: '0x820FB8127a689327C863de8433278d6181123982', + fromBlock: 18512550, + }, +} + +module.exports = { + doublecounted: true, +}; + +Object.keys(config).forEach(chain => { + const { factory } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const numPublicVaults = await api.call({ abi: 'uint256:numOfPublicVaults', target: factory }) + const numPrivateVaults = await api.call({ abi: 'uint256:numOfPrivateVaults', target: factory }) + const publicVaults = numPublicVaults > 0 ? await api.call({ abi: 'function publicVaults(uint256 startIndex_, uint256 endIndex_) returns (address[] memory)', target: factory, params: [0, numPublicVaults] }) : [] + const privateVaults = numPrivateVaults > 0 ? await api.call({ abi: 'function privateVaults(uint256 startIndex_, uint256 endIndex_) returns (address[] memory)', target: factory, params: [0, numPrivateVaults] }) : [] + const vaults = [...publicVaults, ...privateVaults] + const [token0s, token1s, bals] = await Promise.all([ + api.multiCall({ abi: 'address:token0', calls: vaults }), + api.multiCall({ abi: 'address:token1', calls: vaults }), + api.multiCall({ abi: 'function totalUnderlying() view returns (uint256, uint256)', calls: vaults }), + ]) + + bals.forEach(([v0, v1], i) => { + api.add(token0s[i], v0) + api.add(token1s[i], v1) + }) + } + } +}) \ No newline at end of file From 4eadabe69d1ab049277c201b75597afd373e82a3 Mon Sep 17 00:00:00 2001 From: ratex-tony Date: Wed, 23 Oct 2024 10:13:54 +0800 Subject: [PATCH 048/787] add rate-x adapter (#11971) --- projects/rate-x/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/rate-x/index.js diff --git a/projects/rate-x/index.js b/projects/rate-x/index.js new file mode 100644 index 000000000000..f5ee1e516321 --- /dev/null +++ b/projects/rate-x/index.js @@ -0,0 +1,23 @@ +const { sumTokens2 } = require("../helper/solana"); + +async function tvl(api) { + return sumTokens2({ + tokenAccounts: [ + 'EmLhAPj7J6LTAnomsLfZUKDtb4t2A8e6eofDSfTwMgkY', + 'DY3Rw6BZwf6epvWnVo8DSV6kYptEdCh7HbYmFRpdPxuH', + '3CppdkMFxuz7ASS27pB35EDbwgfUhwrarFYuWDBWWwHB', + 'Grk7mshVug1TafphUvuYBrzwRqadtmCcf7GGPoPKkgs6', + '5mB83ye3jdjneDJDx15HAvYxT7SCsGZF5urpVMzuLr1t', + '4nyfJ4JBsRJLij7VGCVUeHwKSLAAku66ptJamoodY29L', + '6opMSfkHgWsvG5KmZo8y2DuShaDHwXfB6VUuTx6W4Age', + '4Ejjk5w7HAWvmXYT57s5uwn8rs7i61nbpcTRQ9ABB11M' + ], + balances: api.getBalances() + }) +} + +module.exports = { + timetravel: false, + methodology: "TVL is calculated by summing the value of the traders' vault, LP vault, and earn vault.", + solana: { tvl }, +}; From 6770ee33a8ae74a43b9a33b3b498304899fbf0a4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 04:38:45 +0200 Subject: [PATCH 049/787] track apETH #11968 --- projects/aqua-patina/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/aqua-patina/index.js diff --git a/projects/aqua-patina/index.js b/projects/aqua-patina/index.js new file mode 100644 index 000000000000..14053941fad0 --- /dev/null +++ b/projects/aqua-patina/index.js @@ -0,0 +1,16 @@ +const apETH = '0xAaAaAAaBC6CBc3A1FD3a0fe0FDec43251C6562F5' + +async function tvl(api) { + const supply = await api.call({ target: apETH, abi: 'uint256:totalSupply' }) + const multiplier = await api.call({ target: apETH, abi: 'uint256:ethPerAPEth' }) + api.addGasToken(supply * multiplier / 1e18) +} + +module.exports = { + doublecounted: true, + methodology: 'Returns the ETH equivalent value of the total supply of apETH tokens on Ethereum. This is calculated by the multiplier used in the contract to determine the ETH value of each token when minting apETH.', + start: 20937454, + ethereum: { + tvl, + } +} \ No newline at end of file From b577f568f99510a32dbf2a3459beb1559f04e457 Mon Sep 17 00:00:00 2001 From: inumune Date: Wed, 23 Oct 2024 09:39:25 +0700 Subject: [PATCH 050/787] Create panko tvl (#11970) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/panko/index.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/panko/index.js diff --git a/projects/panko/index.js b/projects/panko/index.js new file mode 100644 index 000000000000..a6cdfbbe5073 --- /dev/null +++ b/projects/panko/index.js @@ -0,0 +1,31 @@ +const { uniV3Export } = require("../helper/uniswapV3") +const { getLogs2 } = require('../helper/cache/getLogs') +const { mergeExports } = require("../helper/utils") +const { nullAddress } = require("../helper/unwrapLPs") + +const uniTvl = uniV3Export({ + taiko: { factory: '0x99960D7076297a1E0C86f3cc60FfA5d6f2B507B5', fromBlock: 433329 } +}) + +const stableswapConfig = { + taiko: { factory: '0x542E849ff47da056c127F35710b01242A59705d2', fromBlock: 433341 } +} +const stableTvl = {} + +Object.keys(stableswapConfig).forEach(chain => { + const { factory, fromBlock, } = stableswapConfig[chain] + stableTvl[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ + api, + factory, + eventAbi: 'event NewStableSwapPair(address indexed swapContract, address tokenA, address tokenB, address tokenC, address LP)', + fromBlock, + }) + const ownerTokens = logs.map(i => [[i.tokenA, i.tokenB, i.tokenC].filter(i => i !== nullAddress), i.swapContract]) + return api.sumTokens({ ownerTokens }) + } + } +}) + +module.exports = mergeExports([uniTvl, stableTvl]) \ No newline at end of file From 6c81fd83b7db1161850b6fe95e0b1edab080fb72 Mon Sep 17 00:00:00 2001 From: 0xR <99395193+0xrmvdao@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:42:50 +0300 Subject: [PATCH 051/787] Update Kinetix AMM V3 adapter to use uniV3GraphExport helper. (uniV3Export missed cache) (#11964) --- projects/kinetix-v3/index.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/projects/kinetix-v3/index.js b/projects/kinetix-v3/index.js index 4f26b6b52c7c..8361c26f38dc 100644 --- a/projects/kinetix-v3/index.js +++ b/projects/kinetix-v3/index.js @@ -1,12 +1,16 @@ -const { uniV3Export } = require("../helper/uniswapV3"); +const { uniV3GraphExport } = require('../helper/uniswapV3') -module.exports = uniV3Export({ +module.exports = { kava: { - factory: "0x2dBB6254231C5569B6A4313c6C1F5Fe1340b35C2", - fromBlock: 6069472, + tvl: uniV3GraphExport({ + graphURL: 'https://kava-graph-node.metavault.trade/subgraphs/name/kinetixfi/v3-subgraph', + name: 'kinetixfi/kava-v3', + }) }, base: { - factory: "0xdDF5a3259a88Ab79D5530eB3eB14c1C92CD97FCf", - fromBlock: 14195510, - }, -}); + tvl: uniV3GraphExport({ + graphURL: 'https://api.studio.thegraph.com/query/55804/kinetixfi-base-v3/version/latest', + name: 'kinetixfi/base-v3', + }) + } +} From 9f6e65563ab9992a03354ce24b6fe476b7751387 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 04:53:51 +0200 Subject: [PATCH 052/787] track stake ease #11953 --- projects/stakeease/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/stakeease/index.js diff --git a/projects/stakeease/index.js b/projects/stakeease/index.js new file mode 100644 index 000000000000..9c914a3e6e97 --- /dev/null +++ b/projects/stakeease/index.js @@ -0,0 +1,16 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require("../helper/unwrapLPs") + +const SX_ETH_VAULT = "0x466B447D68112090ea46a98E15f22da44f87AF7F" + +module.exports = { + ethereum: { + tvl: sumTokensExport({ owner: SX_ETH_VAULT, tokens: [ + ADDRESSES.ethereum.WETH, + ADDRESSES.ethereum.EETH, + '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110', + '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', + '0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7', + ]}), + } +}; From 4be9e7f79cdf0c8d1d291029226d03aa0c6c5bf2 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 04:55:45 +0200 Subject: [PATCH 053/787] minor fix --- projects/moneta/index.js | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/projects/moneta/index.js b/projects/moneta/index.js index 5fdbda80497e..5b8585093376 100644 --- a/projects/moneta/index.js +++ b/projects/moneta/index.js @@ -1,23 +1,21 @@ -const { addressesUtxosAssetAll, getScriptsDatum} = require('../helper/chain/cardano/blockfrost') +const { addressesUtxosAssetAll, getScriptsDatum } = require('../helper/chain/cardano/blockfrost') const usdm_count_nft_asset = "e319d8e6629ff7991c8ae4f8aec2e0f10463ebdf29b57d26d34914f65553444d5f434f554e54" const count_address = "addr1wyl82v9qy06hsz50hqqdy0u6xw9hdewy7twjahgek2tpp7c0qajez" -async function tvl() { - const utxo = (await addressesUtxosAssetAll(count_address, usdm_count_nft_asset))[0] - const datum_hash = utxo.data_hash - const datum = await getScriptsDatum(datum_hash) - const total_value_locked = datum.json_value.fields[0].int/1_000_000 - return { - usd: total_value_locked - } - +async function tvl(api) { + const utxo = (await addressesUtxosAssetAll(count_address, usdm_count_nft_asset))[0] + const datum_hash = utxo.data_hash + const datum = await getScriptsDatum(datum_hash) + const total_value_locked = datum.json_value.fields[0].int / 1_000_000 + api.addUSDValue(total_value_locked) } -module.exports={ - timetravel: false, - methodology: "Gets the total circulating supply of USDM from the datum of the USDM counter UTxO.", - cardano:{ - tvl - } +module.exports = { + timetravel: false, + misrepresentedTokens: true, + methodology: "Gets the total circulating supply of USDM from the datum of the USDM counter UTxO.", + cardano: { + tvl + } } \ No newline at end of file From 3f21309e3c692b5a2035def10496e0d897c504c3 Mon Sep 17 00:00:00 2001 From: Jarekkkkk <86938582+Jarekkkkk@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:32:12 +0800 Subject: [PATCH 054/787] [Bucket - TVL update] add new supported collaterals (#12005) --- projects/bucket-protocol/index.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/projects/bucket-protocol/index.js b/projects/bucket-protocol/index.js index 9628e67f09c3..e804a4a7b553 100644 --- a/projects/bucket-protocol/index.js +++ b/projects/bucket-protocol/index.js @@ -3,11 +3,14 @@ const sui = require("../helper/chain/sui"); const MAINNET_PROTOCOL_ID = "0x9e3dab13212b27f5434416939db5dec6a319d15b89a84fd074d03ece6350d3df"; - const SUI = ADDRESSES.sui.SUI; +// Token +const SUI = ADDRESSES.sui.SUI; const BUCK = ADDRESSES.sui.BUCK; const USDC = ADDRESSES.sui.USDC; const USDT = ADDRESSES.sui.USDT; const USDC_CIRCLE= ADDRESSES.sui.USDC_CIRCLE +const SCALLOP_swUSDC = "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC" +const SCALLOP_sUSDC = "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC" const AF_LP_IDs = [ "0xe2569ee20149c2909f0f6527c210bc9d97047fe948d34737de5420fab2db7062", @@ -141,7 +144,11 @@ async function tvl(api) { for (const bucket of bucketList) { //AF_LP doesn't have price, need to split the tokens if (bucket.type.includes("AF_LP")) continue; - const coin = bucket.type.split("<").pop()?.replace(">", "") ?? ""; + let coin = bucket.type.split("<").pop()?.replace(">", "") ?? ""; + + /// Since we're unable to fetch the price of Scallop's sCOIN, we'll regard sCOIN as underlying assets + if(coin === SCALLOP_swUSDC) coin = ADDRESSES.sui.USDC + if(coin === SCALLOP_sUSDC) coin = ADDRESSES.sui.USDC_CIRCLE api.add(coin, bucket.fields.collateral_vault); } From 5e2878a434ceb598aa95e6b3a8dc7154cc4932cf Mon Sep 17 00:00:00 2001 From: will2024 Date: Wed, 23 Oct 2024 13:44:11 +0800 Subject: [PATCH 055/787] WORLDES is a RWA Liquidity Yield Protocol (#11952) Co-authored-by: zhaowei Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/worldes/index.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 projects/worldes/index.js diff --git a/projects/worldes/index.js b/projects/worldes/index.js new file mode 100644 index 000000000000..0a55a0699c2e --- /dev/null +++ b/projects/worldes/index.js @@ -0,0 +1,32 @@ +const { getLogs2 } = require('../helper/cache/getLogs') + +const config = { + arbitrum: { dvmFactory: '0x3bA0388E64900e274f2C6fCfaE34Eed65c01282A', fromBlock: 228710000, dspFactory: '0xf3AadDd00C2E263d760BE52BB7142276B74E8b47', WorldesRWATokenFactory: '0x4Ef31B45919aE1874840B9563D46FCD57E2Ae0b7', WorldesDvmProxy: '0x7e93ED796aFD3D9a6e9a24c668153fBb981bE60E', WorldesDspProxy: '0xE6933Fb2dc110a43fdeC6bB83d6ae99aC557c452', WorldesMineProxy: '0x2eFda50249176e3ee1A26964Ad6496DC5aA2aCE7' }, +} + +Object.keys(config).forEach(chain => { + const { dvmFactory, fromBlock, dspFactory, blacklistedTokens, } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const ownerTokens = [] + + await builder(dvmFactory, 'event NewDVM(address baseToken, address quoteToken, address creator, address pool)'); + await builder(dspFactory, 'event NewDSP(address baseToken, address quoteToken, address creator, address pool)'); + + return api.sumTokens({ ownerTokens, blacklistedTokens, permitFailure: true, }) + + async function builder(factorys, event) { + if (!Array.isArray(factorys)) + factorys = [factorys]; + const res = factorys.map(factory => addLogs(factory, event)); + await Promise.all(res) + } + + async function addLogs(target, eventAbi) { + const convert = i => [[i.baseToken, i.quoteToken], i.pool] + let logs = await getLogs2({ api, target, eventAbi, fromBlock }) + ownerTokens.push(...logs.map(convert)) + } + } + } +}) \ No newline at end of file From 2236039bc95d2e7b3356053235eb564634de3090 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 07:58:58 +0200 Subject: [PATCH 056/787] update babylon --- projects/babylon/index.js | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/projects/babylon/index.js b/projects/babylon/index.js index 19d40e19cb54..ad038db97ed5 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -1,28 +1,20 @@ const axios = require('axios'); -async function tvl() { - try { - const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); - const activeTvlSatoshis = response.data.data.active_tvl; - const activeTvlBitcoin = activeTvlSatoshis / 1e8; +async function tvl(api) { + const response = await axios.get('https://staking-api.babylonlabs.io/v1/stats'); + const activeTvlSatoshis = response.data.data.active_tvl; + const activeTvlBitcoin = activeTvlSatoshis / 1e8; - if (activeTvlBitcoin && activeTvlBitcoin > 0) { - return { - bitcoin: activeTvlBitcoin, - }; - } else { - return {}; - } - } catch (error) { - return {}; - } + if (activeTvlBitcoin > 0) + api.addCGToken('bitcoin', activeTvlBitcoin) + else + throw new Error('Babylon: Invalid TVL value'); } module.exports = { methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', - start: 1724351485, + start: 1724351485, timetravel: false, - misrepresentedTokens: false, bitcoin: { tvl, }, From 6e12b299beeee8064b9bb00bc11ecbbfc728b706 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 08:31:54 +0200 Subject: [PATCH 057/787] track swaylend --- projects/helper/chain/fuel.js | 40 +++++++++++++++++++---------------- projects/helper/utils.js | 2 +- projects/mira-ly/index.js | 8 +++---- projects/oxiswap/index.js | 6 +++--- projects/swaylend/index.js | 12 +++++++++++ 5 files changed, 42 insertions(+), 26 deletions(-) create mode 100644 projects/swaylend/index.js diff --git a/projects/helper/chain/fuel.js b/projects/helper/chain/fuel.js index fd1dd1e07727..615e5e003fe8 100644 --- a/projects/helper/chain/fuel.js +++ b/projects/helper/chain/fuel.js @@ -8,17 +8,23 @@ async function sumTokens({ api, owner, owners, token, tokens = [], tokensAndOwne tokens = [token] if (owner) owners = [owner] - if (owners) + + if (owners.length && !tokens.length) { + await addAllTokenBalances({ api, owners }) + } else if (owners.length) tokensAndOwners = tokens.map(token => owners.map(owner => [token, owner])).flat() tokensAndOwners = getUniqueToA(tokensAndOwners) - const query = tokensAndOwners.map(([token, owner], i) => `q${i}: contractBalance( - contract: "${owner}" asset: "${token}" -) { contract assetId amount}`).join('\n'); + if (tokensAndOwners.length) { + const query = tokensAndOwners.map(([token, owner], i) => `q${i}: contractBalance( + contract: "${owner}" asset: "${token}" + ) { contract assetId amount}`).join('\n'); + + const results = await client.request(`{${query}}`) + Object.values(results).forEach(i => api.add(i.assetId, i.amount)) + } - const results = await client.request(`{${query}}`) - Object.values(results).forEach(i => api.add(i.assetId, i.amount)) return transformBalances('fuel', api.getBalances()) function getUniqueToA(toa) { @@ -28,22 +34,20 @@ async function sumTokens({ api, owner, owners, token, tokens = [], tokensAndOwne } } -async function sumAllTokens({ api, owners = [] }) { - const query = owners.map((owner, i) => `q${i}: contractBalances( - filter: { contract: "${owner}" }, first: 100 - ) { nodes { assetId amount } }`).join('\n'); +async function addAllTokenBalances({ api, owners = [] }) { - const results = await client.request(`{${query}}`); - Object.values(results).forEach(res => { - res.nodes.forEach(node => { - api.add(node.assetId, node.amount); - }); - }); + for (const owner of owners) { + const query = `contractBalances( + filter: { contract: "${owner}" }, first: 1000 + ) { nodes { assetId amount } }` - return transformBalances('fuel', api.getBalances()); + const results = await client.request(`{${query}}`) + results.contractBalances.nodes.forEach(node => { + api.add(node.assetId, node.amount); + }) + } } module.exports = { sumTokens, - sumAllTokens } \ No newline at end of file diff --git a/projects/helper/utils.js b/projects/helper/utils.js index 15e958316a1e..17c49bb6a067 100644 --- a/projects/helper/utils.js +++ b/projects/helper/utils.js @@ -257,7 +257,7 @@ async function debugBalances({ balances = {}, chain, log = false, tableLabel = ' labelMapping[label] = token return } - const blacklistedChains = ['starknet', 'solana', 'sui', 'aptos'] + const blacklistedChains = ['starknet', 'solana', 'sui', 'aptos', 'fuel'] if (!token.startsWith('0x') || blacklistedChains.includes(chain)) return; if (!label.startsWith(chain)) ethTokens.push(token) diff --git a/projects/mira-ly/index.js b/projects/mira-ly/index.js index 74812e583f4f..83252fe01dd2 100644 --- a/projects/mira-ly/index.js +++ b/projects/mira-ly/index.js @@ -1,15 +1,15 @@ const { sumTokens } = require("../helper/chain/fuel") -const { configPost } = require('../helper/cache') +// const { configPost } = require('../helper/cache') async function tvl(api) { const contractId = '0x2e40f2b244b98ed6b8204b3de0156c6961f98525c8162f80162fcf53eebd90e7' - const { pools } = await configPost('mira-ly', 'https://prod.api.mira.ly/pools', { "volume_hours": 24, "apr_days": 1 }) - const tokens = pools.map(i => i.id.split('_').slice(0, 2)).flat() + // const { pools } = await configPost('mira-ly', 'https://prod.api.mira.ly/pools', { "volume_hours": 24, "apr_days": 1 }) + // const tokens = pools.map(i => i.id.split('_').slice(0, 2)).flat() // const provider = await fuels.Provider.create('https://mainnet.fuel.network/v1/graphql') // const contract = new fuels.Contract(contractId, abi, provider) // const { value } = await contract.functions.total_assets().get() // console.log(contract.functions, +value) - return sumTokens({ api, owner: contractId, tokens }) + return sumTokens({ api, owner: contractId, }) } module.exports = { diff --git a/projects/oxiswap/index.js b/projects/oxiswap/index.js index 884a12beef1b..86eb48f42d3b 100644 --- a/projects/oxiswap/index.js +++ b/projects/oxiswap/index.js @@ -1,8 +1,8 @@ -const { sumAllTokens } = require("../helper/chain/fuel") +const { sumTokens } = require("../helper/chain/fuel") -async function tvl(_, _1, _2, { api }) { +async function tvl(api) { const pairContract = '0x0da1be8528c8f546521ba9507d334cdb06cbc8b8842b3c0a871b1b4195635363'; - return sumAllTokens({ api, owners: [pairContract] }); + return sumTokens({ api, owners: [pairContract] }); } module.exports = { diff --git a/projects/swaylend/index.js b/projects/swaylend/index.js new file mode 100644 index 000000000000..03d992009e58 --- /dev/null +++ b/projects/swaylend/index.js @@ -0,0 +1,12 @@ +const { sumTokens } = require("../helper/chain/fuel") + +async function tvl(api) { + const usdcMarket = '0x657ab45a6eb98a4893a99fd104347179151e8b3828fd8f2a108cc09770d1ebae' + return sumTokens({ api, owner: usdcMarket, }) +} + +module.exports = { + fuel: { tvl }, + timetravel: false, +} + From b9d5114868081ea4d22c6985c612a90935d63a6c Mon Sep 17 00:00:00 2001 From: 0xALUCARD <95947347+0xALUCARD@users.noreply.github.com> Date: Wed, 23 Oct 2024 19:38:13 +0900 Subject: [PATCH 058/787] Add SpookySwap V3 DEX (#12007) --- projects/spookyswap-v3/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/spookyswap-v3/index.js diff --git a/projects/spookyswap-v3/index.js b/projects/spookyswap-v3/index.js new file mode 100644 index 000000000000..ea06e35f49af --- /dev/null +++ b/projects/spookyswap-v3/index.js @@ -0,0 +1,10 @@ +const { uniV3Export } = require("../helper/uniswapV3"); + +const factory = "0x7928a2c48754501f3a8064765ECaE541daE5c3E6"; +const factory_bttc = "0xE12b00681dD2e90f51d9Edf55CE1A7D171338165"; + +module.exports = uniV3Export({ + fantom: { factory, fromBlock: 70992836, blacklistedTokens:['0x6e5e3ce13e2c7d4de000f93c4909164d0aa59f0b'] }, + //eon: { factory, fromBlock: 679684 }, + bittorrent: { factory: factory_bttc, fromBlock: 26441276 }, +}) From ff9f674d2d2ee1ea852f663e2afc4dadae4721df Mon Sep 17 00:00:00 2001 From: Defx Engineering <142865223+defx-engg@users.noreply.github.com> Date: Wed, 23 Oct 2024 16:10:09 +0530 Subject: [PATCH 059/787] Added TVL adapter for Defx. (#12009) --- projects/defx/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/defx/index.js diff --git a/projects/defx/index.js b/projects/defx/index.js new file mode 100644 index 000000000000..98626e678f71 --- /dev/null +++ b/projects/defx/index.js @@ -0,0 +1,13 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require("../helper/unwrapLPs"); + +module.exports = { + arbitrum: { + tvl: sumTokensExport({ tokensAndOwners: [ + [ + ADDRESSES.arbitrum.USDC_CIRCLE, + '0x091486F9427cf07942fa17Ad7194BE3feaDfa46d' + ] + ]}) + } +} \ No newline at end of file From d084759eacbf0c36888a92d15ee1758d2f1401c4 Mon Sep 17 00:00:00 2001 From: Crumbs <97379465+0xCrumb@users.noreply.github.com> Date: Wed, 23 Oct 2024 11:41:09 +0100 Subject: [PATCH 060/787] [Gains Network | gTrade] Add missing gTokens + Base deployment (#12008) --- projects/gainsNetwork.js | 45 ++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/projects/gainsNetwork.js b/projects/gainsNetwork.js index 7e99fc19dff3..46b86f0da03e 100644 --- a/projects/gainsNetwork.js +++ b/projects/gainsNetwork.js @@ -6,35 +6,54 @@ const { sumTokens2 } = require("./helper/unwrapLPs"); const tokens = { polygon: { DAI: ADDRESSES.polygon.DAI, - dQUICK: "0xf28164a485b0b2c90639e47b0f377b4a438a16b1", + USDC: ADDRESSES.polygon.USDC_CIRCLE, + WETH: ADDRESSES.polygon.WETH_1 }, arbitrum: { - DAI: ADDRESSES.optimism.DAI, + DAI: ADDRESSES.arbitrum.DAI, + USDC: ADDRESSES.arbitrum.USDC_CIRCLE, + WETH: ADDRESSES.arbitrum.WETH + }, + base: { + USDC: ADDRESSES.base.USDC, }, }; async function polyTvl(api) { const tokensAndOwners = [ - [tokens.polygon.dQUICK, "0x151757c2E830C467B28Fe6C09c3174b6c76aA0c5"], - [tokens.polygon.dQUICK, "0x203F5c9567d533038d2da70Cbc20e6E8B3f309F9"], - [tokens.polygon.DAI, "0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD"], - [tokens.polygon.DAI, "0xd7052EC0Fe1fe25b20B7D65F6f3d490fCE58804f"], - [tokens.polygon.DAI, "0x91993f2101cc758D0dEB7279d41e880F7dEFe827"], - [tokens.polygon.DAI, "0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD"], + [tokens.polygon.DAI, "0x91993f2101cc758D0dEB7279d41e880F7dEFe827"], // gDAI + [tokens.polygon.USDC, "0x29019Fe2e72E8d4D2118E8D0318BeF389ffe2C81"], // gUSDC + [tokens.polygon.WETH, "0x1544E1fF1a6f6Bdbfb901622C12bb352a43464Fb"], // gETH + [tokens.polygon.DAI, "0x209A9A01980377916851af2cA075C2b170452018"], // Diamond + [tokens.polygon.WETH, "0x209A9A01980377916851af2cA075C2b170452018"], // Diamond + [tokens.polygon.USDC, "0x209A9A01980377916851af2cA075C2b170452018"], // Diamond ]; return sumTokens2({ api, tokensAndOwners }); } async function arbiTvl(api) { const tokensAndOwners = [ - [tokens.arbitrum.DAI, "0xd85E038593d7A098614721EaE955EC2022B9B91B"], - [tokens.arbitrum.DAI, "0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c"], + [tokens.arbitrum.DAI, "0xd85E038593d7A098614721EaE955EC2022B9B91B"], // gDAI + [tokens.arbitrum.USDC, "0xd3443ee1e91aF28e5FB858Fbd0D72A63bA8046E0"], // gUSDC + [tokens.arbitrum.WETH, "0x5977A9682D7AF81D347CFc338c61692163a2784C"], // gETH + [tokens.arbitrum.DAI, "0xFF162c694eAA571f685030649814282eA457f169"], // Diamond + [tokens.arbitrum.USDC, "0xFF162c694eAA571f685030649814282eA457f169"], // Diamond + [tokens.arbitrum.WETH, "0xFF162c694eAA571f685030649814282eA457f169"], // Diamond + ]; + return sumTokens2({ api, tokensAndOwners }); +} +async function baseTvl(api) { + const tokensAndOwners = [ + [tokens.base.USDC, "0xad20523A7dC37bAbc1CC74897E4977232b3D02e5"], // gUSDC + [tokens.base.USDC, "0x6cD5aC19a07518A8092eEFfDA4f1174C72704eeb"], // Diamond ]; return sumTokens2({ api, tokensAndOwners }); } // node test.js projects/gainsNetwork.js module.exports = { hallmarks: [ - [1672531200,"Launch on Arbitrum"] + [1672531200,"Launch on Arbitrum"], + [1705553229,"Launched gETH and gUSDC"], + [1727650801,"Launch on Base"], ], polygon: { tvl: polyTvl, @@ -49,4 +68,8 @@ module.exports = { tvl: arbiTvl, staking: staking(['0x6b8d3c08072a020ac065c467ce922e3a36d3f9d6', '0x7edDE7e5900633F698EaB0Dbc97DE640fC5dC015'], '0x18c11fd286c5ec11c3b683caa813b77f5163a122'), }, + base: { + tvl: baseTvl, + staking: staking(['0x28efAa11199DAF45AA8fBf95f920e5bc090DCbF3'], '0xFB1Aaba03c31EA98A3eEC7591808AcB1947ee7Ac'), + }, }; From 856c2c5f120e2ec782310b5f4e2b716257b71fb3 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:08:49 +0200 Subject: [PATCH 061/787] Update: Openeden-tBill, add solana chain (#12010) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chain/fuel.js | 2 ++ projects/helper/chain/rpcProxy.js | 23 +++++++++++++++++++++ projects/helper/env.js | 3 ++- projects/openeden-tbill/index.js | 34 ++++++++++++++++--------------- projects/swaylend/index.js | 28 +++++++++++++++++++++---- projects/xrpl-dex/app.js | 2 +- 6 files changed, 70 insertions(+), 22 deletions(-) create mode 100644 projects/helper/chain/rpcProxy.js diff --git a/projects/helper/chain/fuel.js b/projects/helper/chain/fuel.js index 615e5e003fe8..43ead7d6cc41 100644 --- a/projects/helper/chain/fuel.js +++ b/projects/helper/chain/fuel.js @@ -1,6 +1,7 @@ const { GraphQLClient, } = require('graphql-request') const { transformBalances } = require('../portedTokens') +const { fuel: { query }} = require('./rpcProxy') const client = new GraphQLClient('https://mainnet.fuel.network/v1/graphql') async function sumTokens({ api, owner, owners, token, tokens = [], tokensAndOwners = [] }) { @@ -50,4 +51,5 @@ async function addAllTokenBalances({ api, owners = [] }) { module.exports = { sumTokens, + query, } \ No newline at end of file diff --git a/projects/helper/chain/rpcProxy.js b/projects/helper/chain/rpcProxy.js new file mode 100644 index 000000000000..9851d9658bc4 --- /dev/null +++ b/projects/helper/chain/rpcProxy.js @@ -0,0 +1,23 @@ +const axios = require('axios') +const { getEnv } = require('../env') + +const client = axios.create({ + baseURL: getEnv('RPC_PROXY_URL'), + timeout: 30000, +}) + + +module.exports = { + fuel: { + query: async ({ contractId, abi, method }) => { + const { data } = await client.post('/fuel/query', { contractId, abi, method }) + return data + } + }, + ripple: { + gatewayBalances: async ({ account, hotwallet }) => { + const { data } = await client.post('/ripple/gateway_balances', { account, hotwallet }) + return data + } + }, +} \ No newline at end of file diff --git a/projects/helper/env.js b/projects/helper/env.js index 30372bc4a008..27dbfdf4e3ed 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -21,7 +21,8 @@ const DEFAULTS = { SHAPE_RPC:'https://mainnet.shape.network', SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", - APECHAIN_RPC: "https://rpc.apechain.com" + APECHAIN_RPC: "https://rpc.apechain.com", + RPC_PROXY_URL: "https://rpc-proxy.llama.fi", } const ENV_KEYS = [ diff --git a/projects/openeden-tbill/index.js b/projects/openeden-tbill/index.js index 888ba0787c7e..6b102e529d53 100644 --- a/projects/openeden-tbill/index.js +++ b/projects/openeden-tbill/index.js @@ -1,13 +1,12 @@ const { getCache, } = require("../helper/cache"); +const { getTokenSupply } = require('../helper/solana') +const { ripple } = require('../helper/chain/rpcProxy') const ADDRESSES = require('../helper/coreAssets.json') const tbill = "0xdd50C053C096CB04A3e3362E2b622529EC5f2e8a" +const solTbill = '4MmJVdwYN8LwvbGeCowYjSx7KoEi6BJWg8XXnW4fDDp6' -function getTimeNow() { - return Math.floor(Date.now() / 1000); -} - -async function tvl(api) { +async function evmTvl(api) { let contract = tbill if (api.chain === 'arbitrum') contract = '0xF84D28A8D28292842dD73D1c5F99476A80b6666A' const [bal, token] = await api.batchCall([ @@ -17,19 +16,22 @@ async function tvl(api) { api.add(token, bal) } +async function solTvl (api) { + const tvl = (await getTokenSupply(solTbill) * 10 ** 6) + api.add(solTbill, tvl) +} + async function ripplTvl (api) { - const timeNow = getTimeNow() - const aDayInSeconds = 60 * 60 * 24; - const projectKey = 'openeden-tbill' - const cacheKey = 'cache' - let { lastDataUpdate, tvl } = await getCache(projectKey, cacheKey) - if (!lastDataUpdate || timeNow - lastDataUpdate > aDayInSeconds || !tvl) - throw new Error("stale/missing tvl data"); - api.add(tbill, tvl * 10 ** 6, { skipChain: true }) + const issuerAddress = "rJNE2NNz83GJYtWVLwMvchDWEon3huWnFn"; + const subscriptionOperatorAddress = "rB56JZWRKvpWNeyqM3QYfZwW4fS9YEyPWM"; + + const data = await ripple.gatewayBalances({ account: issuerAddress, hotwallet: subscriptionOperatorAddress }) + api.add(tbill, Number(data.obligations?.TBL) * 1e6, { skipChain: true }) } module.exports = { - ethereum: { tvl }, - arbitrum: { tvl }, - ripple: { tvl: ripplTvl } + ethereum: { tvl: evmTvl }, + arbitrum: { tvl: evmTvl }, + ripple: { tvl: ripplTvl }, + solana: { tvl: solTvl } } \ No newline at end of file diff --git a/projects/swaylend/index.js b/projects/swaylend/index.js index 03d992009e58..e4e233576090 100644 --- a/projects/swaylend/index.js +++ b/projects/swaylend/index.js @@ -1,12 +1,32 @@ -const { sumTokens } = require("../helper/chain/fuel") +const { sumTokens, query } = require("../helper/chain/fuel") +const { getConfig } = require('../helper/cache') +const { get } = require('../helper/http') +const markets = [ + '0x657ab45a6eb98a4893a99fd104347179151e8b3828fd8f2a108cc09770d1ebae', // USDC market +] async function tvl(api) { - const usdcMarket = '0x657ab45a6eb98a4893a99fd104347179151e8b3828fd8f2a108cc09770d1ebae' - return sumTokens({ api, owner: usdcMarket, }) + return sumTokens({ api, owners: markets, }) +} + +async function borrowed(api) { + const abi = await getConfig('swaylend/abi', undefined,{ + fetcher: async () => { + let data = await get('https://raw.githubusercontent.com/Swaylend/swaylend-monorepo/refs/heads/develop/apps/frontend/src/contract-types/Market.ts') + data = data.split('const abi =')[1].split(';')[0] + return JSON.parse(data) // ensure that this doesnt fail + // return data + } + }) + for (const market of markets) { + const { base_token } = await query({ contractId: market, abi, method: 'get_market_configuration' }) + const { total_borrow_base }= await query({ contractId: market, abi, method: 'get_market_basics' }) + api.add(base_token.bits, +total_borrow_base ) + } } module.exports = { - fuel: { tvl }, + fuel: { tvl, borrowed, }, timetravel: false, } diff --git a/projects/xrpl-dex/app.js b/projects/xrpl-dex/app.js index b895078a6086..c802dd38fb2f 100644 --- a/projects/xrpl-dex/app.js +++ b/projects/xrpl-dex/app.js @@ -197,7 +197,7 @@ async function openedenRippleTvl() { async function main() { return Promise.allSettled([ - openedenRippleTvl(), + // openedenRippleTvl(), xrplDex() ]) } \ No newline at end of file From 1d79d340118ecc12eeb06e8102d4306fcbb06df7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:35:09 +0200 Subject: [PATCH 062/787] track Thorn #12011 --- projects/thorn-protocol/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/thorn-protocol/index.js diff --git a/projects/thorn-protocol/index.js b/projects/thorn-protocol/index.js new file mode 100644 index 000000000000..7778a25348a3 --- /dev/null +++ b/projects/thorn-protocol/index.js @@ -0,0 +1,18 @@ +const { sumTokens2 } = require('../helper/unwrapLPs') + +async function tvl(api) { + let target = "0x888099De8EA8068D92bB04b47A743B82195c4aD2" + const pairs = await api.fetchList({ lengthAbi: 'pairLength', itemAbi: 'swapPairContract', target }) + const res = await api.fetchList({ lengthAbi: 'N_COINS', itemAbi: 'coins', targets: pairs, groupedByInput: true, }) + const ownerTokens = res.map((tokens, i) => [tokens, pairs[i]]) + return sumTokens2({ api, ownerTokens, permitFailure: true, }) +} + +module.exports = { + methodology: + "Uses factory(0x888099De8EA8068D92bB04b47A743B82195c4aD2) address and whitelisted tokens address to find and price Liquidity Pool pairs", + start: 1729159200, + sapphire: { + tvl, + }, +}; From 4c72e535cc71cad8a339e244f942258e81632846 Mon Sep 17 00:00:00 2001 From: Masayoshi <82962873+0xMasayoshi@users.noreply.github.com> Date: Wed, 23 Oct 2024 23:53:02 +0800 Subject: [PATCH 063/787] create saru adapter (#12012) --- projects/saru/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 projects/saru/index.js diff --git a/projects/saru/index.js b/projects/saru/index.js new file mode 100644 index 000000000000..c334269529ea --- /dev/null +++ b/projects/saru/index.js @@ -0,0 +1,8 @@ +const { getUniTVL } = require("../helper/unknownTokens") + +module.exports = { + misrepresentedTokens: true, + apechain: { + tvl: getUniTVL({ factory: '0x57bfFa72db682f7eb6C132DAE03FF36bBEB0c459', useDefaultCoreAssets: true }) + } +}; \ No newline at end of file From 1d797ebecd69a1c9b26ab9d19f6a3a3b395cd405 Mon Sep 17 00:00:00 2001 From: Kacper Bak <290936+kbak@users.noreply.github.com> Date: Wed, 23 Oct 2024 09:02:52 -0700 Subject: [PATCH 064/787] Added Zircuit Staking L2 TVL (#11941) --- projects/zircuit/index.js | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/projects/zircuit/index.js b/projects/zircuit/index.js index 3c16d0795242..8cd2852393e1 100644 --- a/projects/zircuit/index.js +++ b/projects/zircuit/index.js @@ -1,9 +1,10 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/unwrapLPs"); -const ZIRCUIT_STAKING_CONTRACT = '0xf047ab4c75cebf0eb9ed34ae2c186f3611aeafa6'; +const ZIRCUIT_STAKING_CONTRACT_ETHEREUM = '0xf047ab4c75cebf0eb9ed34ae2c186f3611aeafa6'; +const ZIRCUIT_STAKING_CONTRACT_ZIRCUIT = '0x7d8311839eB44Dd5194abd2dd3998722455A24E0'; -const TOKEN_CONTRACTS = [ +const TOKEN_CONTRACTS_ETHEREUM = [ '0xa1290d69c65a6fe4df752f95823fae25cb99e5a7', // rsETH '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110', // ezETH '0x8c1BEd5b9a0928467c9B1341Da1D7BD5e10b6549', // lsETH @@ -32,11 +33,35 @@ const TOKEN_CONTRACTS = [ ADDRESSES.ethereum.FDUSD // FDUSD ]; +const TOKEN_CONTRACTS_ZIRCUIT = [ + '0x4200000000000000000000000000000000000006', // wETH + '0x91a0F6EBdCa0B4945FbF63ED4a95189d2b57163D', // mETH + '0xD8b29106d4ceBad087C30B10c0E41BAa3A9ea703', // rswETH + '0x850CDF416668210ED0c36bfFF5d21921C7adA3b8', // swETH + '0xF469fBD2abcd6B9de8E169d128226C0Fc90a012e', // pumpBTC + '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7', // pzETH + '0x80137510979822322193FC997d400D5A6C747bf7', // STONE + '0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34', // USDe + '0xF97c7A9bECe498FD6e31e344643589aACC96206A', // LsETH + '0x4186BFC76E2E237523CBC30FD220FE055156b41F', // rsETH + '0xf0e673Bc224A8Ca3ff67a61605814666b1234833', // wstETH + '0x2416092f143378750bb29b79eD961ab195CcEea5', // ezETH + '0x3535DF6e1d776631D0cBA53FE9efD34bCbDcEeD4', // weETH + '0x4b03831043082E3e5191218ad5331E99AaaC4A81', // weETHs + '0x5661cE45EE081CbE1f81BF23E46f4E01E11795D4' // FBTC +]; + module.exports = { ethereum: { tvl: sumTokensExport({ - owner: ZIRCUIT_STAKING_CONTRACT, - tokens: TOKEN_CONTRACTS, + owner: ZIRCUIT_STAKING_CONTRACT_ETHEREUM, + tokens: TOKEN_CONTRACTS_ETHEREUM, + }), + }, + zircuit: { + tvl: sumTokensExport({ + owner: ZIRCUIT_STAKING_CONTRACT_ZIRCUIT, + tokens: TOKEN_CONTRACTS_ZIRCUIT, }), } }; \ No newline at end of file From c7bc55f6322a9097bf70b58713348800434ec5e6 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:16:21 +0200 Subject: [PATCH 065/787] Fix aave (#11997) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/aave-v3/index.js | 58 +++++++++++++++++++++++++++++++++++++++ projects/aave/v3.js | 43 ----------------------------- 2 files changed, 58 insertions(+), 43 deletions(-) create mode 100644 projects/aave-v3/index.js delete mode 100644 projects/aave/v3.js diff --git a/projects/aave-v3/index.js b/projects/aave-v3/index.js new file mode 100644 index 000000000000..2bb6fcc0406e --- /dev/null +++ b/projects/aave-v3/index.js @@ -0,0 +1,58 @@ +const abi = { + getReserveTokensAddresses: "function getReserveTokensAddresses(address asset) view returns (address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress)", + getAllReservesTokens: "function getAllReservesTokens() view returns ((string symbol, address tokenAddress)[])", + getReserveData: "function getReserveData(address asset) view returns (uint256 unbacked, uint256 accruedToTreasuryScaled, uint256 totalAToken, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 liquidityIndex, uint256 variableBorrowIndex, uint40 lastUpdateTimestamp)", +}; + +const CONFIG = { + ethereum: ['0x41393e5e337606dc3821075Af65AeE84D7688CBD', '0x08795CFE08C7a81dCDFf482BbAAF474B240f31cD', '0xE7d490885A68f00d9886508DF281D67263ed5758'], + polygon: ['0x7F23D86Ee20D869112572136221e173428DD740B'], + avax: ['0x7F23D86Ee20D869112572136221e173428DD740B'], + arbitrum: ['0x7F23D86Ee20D869112572136221e173428DD740B'], + optimism: ['0x7F23D86Ee20D869112572136221e173428DD740B'], + harmony: ['0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654'], + fantom: ['0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654'], + metis: ['0xC01372469A17b6716A38F00c277533917B6859c0'], + base: ['0xd82a47fdebB5bf5329b09441C3DaB4b5df2153Ad'], + xdai: ['0x57038C3e3Fe0a170BB72DE2fD56E98e4d1a69717'], + scroll: ['0xe2108b60623C6Dcf7bBd535bD15a451fd0811f7b'], + bsc: ['0x23dF2a19384231aFD114b036C14b6b03324D79BC'], + era: ['0x5F2A704cE47B373c908fE8A29514249469b52b99'] +}; + +const fetchReserveData = async (api, poolDatas, isBorrowed) => { + const reserveTokens = await api.multiCall({ calls: poolDatas, abi: abi.getAllReservesTokens }); + const calls = [] + + poolDatas.map((pool, i) => { + reserveTokens[i].forEach(({ tokenAddress }) => calls.push({ target: pool, params: tokenAddress })); + }); + const reserveData = await api.multiCall({ abi: isBorrowed ? abi.getReserveData : abi.getReserveTokensAddresses, calls, }) + const tokensAndOwners = [] + reserveData.forEach((data, i) => { + const token = calls[i].params + if (isBorrowed) { + api.add(token, data.totalVariableDebt) + api.add(token, data.totalStableDebt) + } else + tokensAndOwners.push([token, data.aTokenAddress]) + }) + + if (isBorrowed) return api.getBalances() + return api.sumTokens({ tokensAndOwners }) +} + +module.exports.methodology = "Counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield. Borrowed coins are not counted towards the TVL, so only the coins actually locked in the contracts are counted. There's multiple reasons behind this but one of the main ones is to avoid inflating the TVL through cycled lending." + +Object.keys(CONFIG).forEach((chain) => { + const poolDatas = CONFIG[chain]; + module.exports[chain] = { + tvl: (api) => fetchReserveData(api, poolDatas), + borrowed: (api) => fetchReserveData(api, poolDatas, true), + }; +}); + +module.exports.hallmarks = [ + [1659630089, "Start OP Rewards"], + [1650471689, "Start AVAX Rewards"] +] diff --git a/projects/aave/v3.js b/projects/aave/v3.js deleted file mode 100644 index 02f47848d7cd..000000000000 --- a/projects/aave/v3.js +++ /dev/null @@ -1,43 +0,0 @@ -const { aaveChainTvl, aaveExports } = require('../helper/aave'); -const methodologies = require('../helper/methodologies'); -const { mergeExports } = require('../helper/utils'); - -const v3params = ["0x770ef9f4fe897e59daCc474EF11238303F9552b6", undefined, ["0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654"]] - -function v3(chain) { - let params = v3params - if (chain === 'ethereum') - params = ['0xbaA999AC55EAce41CcAE355c77809e68Bb345170', undefined, ['0x7B4EB56E7CD4b454BA8ff71E4518426369a138a3']] - else if (chain === 'metis') - params = ['0x9E7B73ffD9D2026F3ff4212c29E209E09C8A91F5', undefined, ['0x99411FC17Ad1B56f49719E3850B2CDcc0f9bBFd8']] - else if (chain === 'base') - params = ['0x2f6571d3Eb9a4e350C68C36bCD2afe39530078E2', undefined, ['0x2d8A3C5677189723C4cB8873CfC9C8976FDF38Ac']] - else if (chain === 'xdai') - params = ['0x36616cf17557639614c1cdDb356b1B83fc0B2132', undefined, ['0x501B4c19dd9C2e06E94dA7b6D5Ed4ddA013EC741']] - else if (chain === 'scroll') - params = ['0xFBedc64AeE24921cb43004312B9eF367a4162b57', undefined, ['0xa99F4E69acF23C6838DE90dD1B5c02EA928A53ee']] - else if (chain === 'bsc') - params = ['0x117684358D990E42Eb1649E7e8C4691951dc1E71', undefined, ['0x41585C50524fb8c3899B43D7D797d9486AAc94DB']] - else if (chain === 'era') - params = ['0x0753E3637ddC6efc40759D9c347251046644F25F', undefined, ['0x48B96565291d1B23a014bb9f68E07F4B2bb3Cd6D']] - const section = borrowed => aaveChainTvl(chain, ...params, borrowed, true); - return { - tvl: section(false), - borrowed: section(true) - } -} - -module.exports = mergeExports({ - methodology: methodologies.lendingMarket, - avax: v3("avax"), - ...["optimism", "fantom", "harmony", "arbitrum", "polygon", "ethereum", "metis", "base", "xdai", "scroll", "bsc", "era"].reduce((t, c) => ({ ...t, [c]: v3(c) }), {}), -}, { - // Lido pool - ethereum: aaveExports(undefined, "0x770ef9f4fe897e59daCc474EF11238303F9552b6", undefined, ["0xa3206d66cF94AA1e93B21a9D8d409d6375309F4A"], { v3: true, }), -}); - -module.exports.hallmarks = [ - [1659630089, "Start OP Rewards"], - [1650471689, "Start AVAX Rewards"] -] -// node test.js projects/aave/index.js From 4e004b6e71d66bae6e3ca58bcbce16d8463c73d5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 23 Oct 2024 21:12:55 +0200 Subject: [PATCH 066/787] track hydro farm tvl #11883 --- projects/helper/chain/rpcProxy.js | 6 ++ projects/hydro-farm/index.js | 94 +++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 projects/hydro-farm/index.js diff --git a/projects/helper/chain/rpcProxy.js b/projects/helper/chain/rpcProxy.js index 9851d9658bc4..0c7d94807449 100644 --- a/projects/helper/chain/rpcProxy.js +++ b/projects/helper/chain/rpcProxy.js @@ -20,4 +20,10 @@ module.exports = { return data } }, + injective: { + mitoVaultQuery: async ({ address }) => { + const { data } = await client.get('/injective/mito-vault/' + address) + return data + } + }, } \ No newline at end of file diff --git a/projects/hydro-farm/index.js b/projects/hydro-farm/index.js new file mode 100644 index 000000000000..8260dc4d3e91 --- /dev/null +++ b/projects/hydro-farm/index.js @@ -0,0 +1,94 @@ +const { queryContract, endPoints, } = require("../helper/chain/cosmos"); +const { get } = require("../helper/http"); +const { injective: { mitoVaultQuery } } = require("../helper/chain/rpcProxy") + +// Contract +const lrpManager = "inj1rv7ztpa8nkywc89a05eys52fzgezlnzjq3grkz" +const vaultMaster = "inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3" + +async function getAllRegisteredVaults(api) { + let startAfterSubaccount + let results = [] + let loop = true + + while (loop) { + const { registered_vaults } = await queryContract({ + chain: api.chain, + contract: vaultMaster, + data: { + get_registered_vaults: { + start_after_subaccount: startAfterSubaccount, + limit: 30, + } + } + }) + + if (registered_vaults.length === 0) { + loop = false + return results + } + + results.push(...registered_vaults) + const lastOne = results[results.length - 1] + startAfterSubaccount = lastOne.vault.master_subaccount_id + } +} + +async function getMitoLpPrice(api, lrp, vaults) { + const { vault_subaccount_id } = await queryContract({ chain: api.chain, contract: lrp.yield_proxy_address, data: { config: {} } }) + const { vault: { address } } = vaults.find((vault) => vault.vault.master_subaccount_id === vault_subaccount_id) + const res = await mitoVaultQuery({ address }) + return res.lpTokenPrice +} + +async function tvl(api) { + const { lrps } = await queryContract({ chain: api.chain, contract: lrpManager, data: { lrps: { limit: 100 } } }) + const vaults = await getAllRegisteredVaults(api) + + for (const lrp of lrps) { + const { total_supply: lrpTotalSupply } = await queryContract({ chain: api.chain, contract: lrp.lrp_address, data: { token_info: {} } }) + if (+lrpTotalSupply === 0) continue; + + const { contract_info } = await get(`${endPoints[api.chain]}/cosmwasm/wasm/v1/contract/${lrp.yield_proxy_address}`, undefined, api.chain) + const isDojo = contract_info.label.includes("dojo") + const isMito = contract_info.label.includes("mito") + + if (isDojo) { + const asset_infos = lrp.bond_tokens.map((i) => { + if (i.native) return { native_token: { denom: i.native } } + console.error({ lrp, i, contract_info, lrpTotalSupply }) + throw new Error("Unknown asset_infos") + }) + + // get LP contract address + const { contract_addr } = await queryContract({ + chain: api.chain, contract: 'inj1pc2vxcmnyzawnwkf03n2ggvt997avtuwagqngk', data: { + pair: { asset_infos } + } + }) + const { assets, total_share } = await queryContract({ chain: api.chain, contract: contract_addr, data: { pool: {} } }) + const ratio = lrpTotalSupply / total_share + assets.forEach((asset) => { + api.add(getToken(asset), asset.amount * ratio) + }) + + } else if (isMito) { + const lpPrice = await getMitoLpPrice(api, lrp, vaults) + api.addUSDValue(lpPrice * lrpTotalSupply) + } else { + console.error("Unknown lrp type", { lrp, contract_info }) + } + } +} + +module.exports = { + methodology: "Liquidity on hydro-protocol", + misrepresentedTokens: true, + injective: { + tvl, + }, +}; + +function getToken(asset) { + return asset.info.native_token?.denom ?? asset.info.token?.contract_addr +} \ No newline at end of file From 44534fa9a103885ec0f1f2ea489153da91628de8 Mon Sep 17 00:00:00 2001 From: lyfmantle <161433628+lyfmantle@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:44:28 +0800 Subject: [PATCH 067/787] update fbtc addresses (#11882) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/fbtc/index.js | 40 +++++++++++++++------------------------- projects/helper/env.js | 1 + 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/projects/fbtc/index.js b/projects/fbtc/index.js index 6d656a7ca98b..df7d51d347c1 100644 --- a/projects/fbtc/index.js +++ b/projects/fbtc/index.js @@ -1,34 +1,24 @@ +const { getConfig } = require('../helper/cache') const { sumTokens } = require('../helper/chain/bitcoin') const sdk = require('@defillama/sdk') +const { get } = require('../helper/http') +const { getEnv } = require('../helper/env') -const staticAddresses = [ - // https://docs.fbtc.com/security/bitcoin-reserve-address - 'bc1q7jgulg69frc8zuzy0ng8d5208kae7t0twyfjwm', - 'bc1q6c3c0t3zvnphce37ufr4yz9veaqvew2wg0shwr', - '3HjNJWcn2ayFLikzmKRaFtcbLufYChQo3T', - '374vhN24WryvNWUUZR2uDAnL4oNP5EW4qR', - - 'bc1qr5nz7n8ulcdz0w3s6fska80fawxhvqlh273qypm3rkjequ9wpmhs65ppw7', - 'bc1qhu98nf6ddz6ja73rn72encdr8ezsyhexwpdzap0vcs7lg2wpmrnq5ygfsl', - 'bc1qg6asmzjr7nr5f5upg3xqyrdxl2tq8ef58hha7t0s82mzzx6zjxesyccp4h', - 'bc1qxe3md4lehg8gmrlx3e8xqju5mytt266l4hcy8khl6tm5mahghmeqtxlgqq', - 'bc1qy48h0kuv0r3e330wjfs6r74sk49pkzumnm907t5mhqjxml22r3ss2ucuxc', - - '32DgQPVHSV6FSxLnw68nggvchp3ZNKquxA', - 'bc1qj9w5ee2kf4akvtzrj59p77yc6x02nqqg9m0tcd', - 'bc1q6w7dn3fkky587a2qwxp6swyhlwgueh2ew26zem', - - '3Pg6HJJPhm3X7eWrdHbPFQeHU723a9GSJ7', - '35cUDQg2EBuc3wadWmcEFW2YG7Uj2yfNRq', - 'bc1qwgnhe6vn5zzu7csukavhfatzdasvmkavktqe4udzx96dk602ghsqaz8vt6', - 'bc1qf2lqvumkq2l2d3qej7u6w9u84djfnmy7kfcqdulfpcm7zqxl330smc0mkj', - 'bc1qyzsetzfrwzxs7zzqtsmyaz39mumhrh58mu04kyjcy8pynn9zhk5q2dc2r3', - 'bc1qxsuy93rr0mat8sdlzjuk86z6ajpr04634wfx04lcuerw7dj52k5q8k6qaq' -] const abi = { - getQualifiedUserInfo: "function getQualifiedUserInfo(address _user) view returns ((bool locked, string depositAddress, string withdrawalAddress) info)", + getQualifiedUserInfo: 'function getQualifiedUserInfo(address _user) view returns ((bool locked, string depositAddress, string withdrawalAddress) info)', } async function tvl() { + const staticAddresses = await getConfig('fbtc', undefined, { + fetcher: async () => { + const token = getEnv('FBTC_ACCESS_TOKEN') + const { result } = await get('https://fbtc.phalcon.blocksec.com/api/v1/extension/fbtc-reserved-addr', { + headers: { + 'access-token': token + } + }) + return result.map(r => r.address) + } + }) const api = new sdk.ChainApi({ chain: 'ethereum' }) const users = await api.call({ abi: 'address[]:getQualifiedUsers', target: '0xbee335BB44e75C4794a0b9B54E8027b111395943' }) const userInfos = await api.multiCall({ abi: abi.getQualifiedUserInfo, target: '0xbee335BB44e75C4794a0b9B54E8027b111395943', calls: users }) diff --git a/projects/helper/env.js b/projects/helper/env.js index 27dbfdf4e3ed..90b0c9b53172 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -36,6 +36,7 @@ const ENV_KEYS = [ 'SUMMER_AJNA_ENDPOINT', 'SUMMER_CONFIRMED_VAULTS_ENDPOINT', 'ETHEREUM_TOKENS_ENDPOINT', + 'FBTC_ACCESS_TOKEN', 'UNISAT_AUTH' ] From 3888f19bdd10010013ae33d53b57bf20bd98dfa5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 04:59:28 +0200 Subject: [PATCH 068/787] track root #12013 --- projects/root-finance/index.js | 55 ++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 projects/root-finance/index.js diff --git a/projects/root-finance/index.js b/projects/root-finance/index.js new file mode 100644 index 000000000000..701d7b7b4087 --- /dev/null +++ b/projects/root-finance/index.js @@ -0,0 +1,55 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +const { queryAddresses, sumTokens } = require('../helper/chain/radixdlt'); + +const pools = [ + { + pool: 'component_rdx1cqasw720453g8pr2jc3nxq2h9rrv9cvfjy35q6jhskukqqs0t7qcky', + resource: ADDRESSES.radixdlt.XRD, + }, + { + pool: 'component_rdx1cqz0f5znwhyy2d4q2rhncetm5tfpvu2c73kvfertktkw33drxcawk8', + resource: 'resource_rdx1thrvr3xfs2tarm2dl9emvs26vjqxu6mqvfgvqjne940jv0lnrrg7rw', + }, + { + pool: 'component_rdx1cp5hd3a2daw4vuzx0hywn56ur2pmat7nnytl5v3pv36xky5hkpr84y', + resource: 'resource_rdx1t580qxc7upat7lww4l2c4jckacafjeudxj5wpjrrct0p3e82sq4y75', + }, + { + pool: 'component_rdx1cr87dx5laxnffdkyv4fsrwms3m62vexgye9x9xpxyrv63gzpgwt97d', + resource: 'resource_rdx1th88qcj5syl9ghka2g9l7tw497vy5x6zaatyvgfkwcfe8n9jt2npww', + }, + { + pool: 'component_rdx1czuk76y4vhgd44sxly0un2tqegws670dqp0usl2tlsgfkhmdl8dad3', + resource: 'resource_rdx1t5kmyj54jt85malva7fxdrnpvgfgs623yt7ywdaval25vrdlmnwe97', + }, + { + pool: 'component_rdx1cqlfmwmhdmp0ln4gaera4skn3yz30p4k5ssv7lqflgh0rjeakwzs9f', + resource: 'resource_rdx1t4upr78guuapv5ept7d7ptekk9mqhy605zgms33mcszen8l9fac8vf', + } +] + +async function fetchData(addresses) { + return await queryAddresses({ addresses }); +} + +async function tvl(api) { + return sumTokens({ api, owners: pools.map((item) => item.pool) }); +} + +async function borrowed(api) { + const [poolData,] = await Promise.all([ + fetchData(pools.map((item) => item.pool)), + ]); + + + pools.forEach((pool, i) => { + const { details } = poolData.find((item) => item.address === pool.pool); + api.add(pools[i].resource, Number(details.state.fields[1].value)); + }); +} + +module.exports = { + radixdlt: { tvl, borrowed }, + timetravel: false, +}; From 1b00db7a60a450b4a1258e9858caf9d83255eba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=85=BE=E5=AE=87?= <992899491@qq.com> Date: Thu, 24 Oct 2024 11:00:49 +0800 Subject: [PATCH 069/787] ModeMax V2 TVL (#12016) Co-authored-by: gengbingbing --- projects/modemax-perp-v2/index.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 projects/modemax-perp-v2/index.js diff --git a/projects/modemax-perp-v2/index.js b/projects/modemax-perp-v2/index.js new file mode 100644 index 000000000000..c9aadc03ce04 --- /dev/null +++ b/projects/modemax-perp-v2/index.js @@ -0,0 +1,7 @@ +const { gmxExports } = require('../helper/gmx') + +module.exports = { + mode: { + tvl: gmxExports({ vault: '0x6824AbeA9D564e469B8FAaA0300b04cAFdD78341' }) + }, +}; From 1bfcb161fbfb488e9986b50fb3990547cad8e80c Mon Sep 17 00:00:00 2001 From: noah-wasd3r Date: Thu, 24 Oct 2024 12:01:28 +0900 Subject: [PATCH 070/787] add astar (#12015) --- projects/synstation/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/synstation/index.js b/projects/synstation/index.js index 666e1c35bc1a..d7c9dac062ae 100644 --- a/projects/synstation/index.js +++ b/projects/synstation/index.js @@ -1,7 +1,8 @@ const { sumUnknownTokens } = require("../helper/unknownTokens") const config = { - ethereum: "0x3BaC111A6F5ED6A554616373d5c7D858d7c10d88" + ethereum: "0x3BaC111A6F5ED6A554616373d5c7D858d7c10d88", + astar: "0xe9B85D6A1727d4B22595bab40018bf9B7407c677" } Object.keys(config).forEach(chain => { From 3434f234d0c366bca50466d10bebd73d47e7750d Mon Sep 17 00:00:00 2001 From: 0xLight <109751758+0xLightt@users.noreply.github.com> Date: Thu, 24 Oct 2024 04:02:08 +0100 Subject: [PATCH 071/787] Update Ulysses adapter - update branch port addresses (#12014) --- projects/ulysses/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ulysses/index.js b/projects/ulysses/index.js index 3c3422ad773a..9e9bf5b14d63 100644 --- a/projects/ulysses/index.js +++ b/projects/ulysses/index.js @@ -1,9 +1,9 @@ const { sumTokensExport } = require("../helper/unwrapLPs") const ADDRESSES = require('../helper/coreAssets.json') -const defaultPort = '0x6C6d3FB0289039b0FCa2E7244A06Cf9403464646' +const defaultPort = '0x0000151d008235A6cC00004F00FA2bDF9dF95400' const ports = { - arbitrum: '0x0c453ef35986E1d8dA22043fF00BF03cEB42e1f7', + arbitrum: '0x79f4b04FFCa54BC946aa0ef8E33eE723467f0192', ethereum: undefined, optimism: undefined, base: undefined, From e5f9518ebd569b45d7f3c8a13b764e80d17b9c5a Mon Sep 17 00:00:00 2001 From: Shoebill Finance <118880028+ShoebillFinance@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:41:04 +0900 Subject: [PATCH 072/787] Add ZetaChain (#12017) --- projects/shoebillFinance-v2/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/shoebillFinance-v2/index.js b/projects/shoebillFinance-v2/index.js index 720f27cd0e8f..61421cb7fe53 100644 --- a/projects/shoebillFinance-v2/index.js +++ b/projects/shoebillFinance-v2/index.js @@ -1,5 +1,6 @@ const { compoundExports2 } = require("../helper/compound"); const { mergeExports } = require("../helper/utils"); +const { aaveExports } = require("../helper/aave"); module.exports = mergeExports([ { @@ -87,4 +88,8 @@ module.exports = mergeExports([ cether: "0x4dA697a89ea1D166881362b56E6863294820eC97", }), }, + { + zeta: aaveExports(undefined, undefined, undefined, ['0x2B6647f63f6Fab5c73e96FBf974f4ed2AB8a4308'], { v3: true }) + } + ]); From 59b09c95d61aeb607f7d529e2510f740c15dd007 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 05:51:00 +0200 Subject: [PATCH 073/787] Chainge (#12019) Co-authored-by: thomga --- projects/chainge.js | 30 ++++++++++++++++++++++-------- projects/helper/coreAssets.json | 9 ++++++++- projects/helper/tokenMapping.js | 2 ++ 3 files changed, 32 insertions(+), 9 deletions(-) diff --git a/projects/chainge.js b/projects/chainge.js index e438c9fd9379..687a4272536f 100644 --- a/projects/chainge.js +++ b/projects/chainge.js @@ -1,13 +1,27 @@ -const utils = require('./helper/utils'); +const ADDRESSES = require('./helper/coreAssets.json') +const { sumTokensExport } = require('./helper/unwrapLPs') -// fusion -async function fetch() { - let tvl = await utils.fetchURL('https://info.chainge.finance/api/v1/info/getInfoOuterTvl') - - return tvl.data.data.totalTvl +const config = { + rollux: { + chaingeAddress: "0x66ff2f0AC3214758D1e61B16b41e3d5e62CAEcF1", + tokens: [ + ADDRESSES.rollux.USDC, + ADDRESSES.rollux.USDT, + ADDRESSES.rollux.WBTC, + ADDRESSES.rollux.WETH, + ADDRESSES.rollux.WSYS, + ADDRESSES.null, // for native SYS + ] + } } module.exports = { - methodology: "assets in liquidity are counted as TVL", - fetch + methodology: "assets in liquidity are counted as TVL + balances of all tokens (USDC, USDT, WBTC, WETH, WSYS, and native SYS) held in the Chainge treasury address on the Rollux network. These tokens are used to provide liquidity for cross-chain swaps.", } + +Object.keys(config).forEach(chain => { + const { chaingeAddress, tokens } = config[chain] + module.exports[chain] = { + tvl: sumTokensExport({ owner: chaingeAddress, tokens }) + } +}) \ No newline at end of file diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 328881d828d6..30ce87b73578 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1039,6 +1039,13 @@ "ETH": "0x7c598c96d02398d89fbcb9d41eab3df0c16f227d", "USDT": "0x922d641a426dcffaef11680e5358f34d97d112e1" }, + "rollux": { + "WSYS": "0x4200000000000000000000000000000000000006", + "USDC": "0x368433cac2a0b8d76e64681a9835502a1f2a8a30", + "WETH": "0xaa1c53afd099e415208f47fcfa2c880f659e6904", + "USDT": "0x28c9c7fb3fe3104d2116af26cc8ef7905547349c", + "WBTC": "0x2a4dc2e946b92ab4a1f7d62844eb237788f9056c" + }, "vision": { "USDT": "0x1db6cdc620388a0b6046b20cd59503a0839adcff", "VBTC": "0x4dE4B92C12dD4584873e72447573382C41da5597", @@ -1949,4 +1956,4 @@ "bitkub": { "KKUB": "0x67ebd850304c70d983b2d1b93ea79c7cd6c3f6b5" } -} +} \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 8ba04f3f4c9a..89a0f6c23cac 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -88,6 +88,8 @@ const fixBalancesTokens = { }, rollux: { '0x570baA32dB74279a50491E88D712C957F4C9E409': { coingeckoId: 'uno-re', decimals: 18 }, + '0xaa1c53afd099e415208f47fcfa2c880f659e6904': { coingeckoId: 'weth', decimals: 18 }, + '0x2a4dc2e946b92ab4a1f7d62844eb237788f9056c': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, }, taiko: { '0xd347949f8c85d9f3d6b06bfc4f8c2e07c161f064': { coingeckoId: "loopring", decimals: 18 }, From 45cb1e7cc3129fed2bb336586b97bcfa38f34aea Mon Sep 17 00:00:00 2001 From: morkie-stack Date: Thu, 24 Oct 2024 08:42:37 +0300 Subject: [PATCH 074/787] add morkie adapter (#12021) Co-authored-by: morkie-stack --- projects/morkie/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/morkie/index.js diff --git a/projects/morkie/index.js b/projects/morkie/index.js new file mode 100644 index 000000000000..de3b74d8b4cd --- /dev/null +++ b/projects/morkie/index.js @@ -0,0 +1,11 @@ +const { staking } = require('../helper/staking'); + +module.exports = { + polygon: { + tvl: () => ({}), + staking: staking( + '0xee1198CF7575dfb2D5D666964322B6569B23E56b', + '0xAFb755c5f2ea2aadBaE693d3BF2Dc2C35158dC04' + ) + } +}; From 9d1dab3bff7f04b04a64d84080b0cc8897b2a1d6 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:58:51 +0200 Subject: [PATCH 075/787] Metavault (#12022) Co-authored-by: 0xR <0xr@metavault.trade> --- projects/kinetix/index.js | 7 ++- projects/metavault.trade/index.js | 3 +- projects/metavault/index.js | 75 ++++++++++--------------------- 3 files changed, 32 insertions(+), 53 deletions(-) diff --git a/projects/kinetix/index.js b/projects/kinetix/index.js index d6e0c167622d..062d667e7cb5 100644 --- a/projects/kinetix/index.js +++ b/projects/kinetix/index.js @@ -1,7 +1,12 @@ const { gmxExports } = require('../helper/gmx') +const { staking } = require('../helper/staking'); + +const KAI_ADDRESS_KAVA = "0x52369B1539EA8F4e1eadEEF18D85462Dcf9a3658" +const veKAI_ADDRESS_KAVA = "0x2A0A26D08E2F7A8E86431Ddf6910Fe7cD59b9908" module.exports = { kava: { - tvl: gmxExports({ vault: "0xa721f9f61CECf902B2BCBDDbd83E71c191dEcd8b", }) + tvl: gmxExports({ vault: "0xa721f9f61CECf902B2BCBDDbd83E71c191dEcd8b", }), + staking: staking(veKAI_ADDRESS_KAVA, KAI_ADDRESS_KAVA), }, }; \ No newline at end of file diff --git a/projects/metavault.trade/index.js b/projects/metavault.trade/index.js index 63f80c08e2e8..9fc38e23755e 100644 --- a/projects/metavault.trade/index.js +++ b/projects/metavault.trade/index.js @@ -4,6 +4,7 @@ const { staking } = require("../helper/staking"); const polygonVault = "0x32848E2d3aeCFA7364595609FB050A301050A6B4"; const polygonStaking = "0xE8e2E78D8cA52f238CAf69f020fA961f8A7632e9"; // Staked MVX, sMVX const polygonMVX = "0x2760e46d9bb43dafcbecaad1f64b93207f9f0ed7"; +const polygonMvxVester = "0x543e07eb4a260e10310fbcf2403e97c762a8db0b" // New Vester const polygonTVL = async (api) => { const tokens = await api.fetchList({ lengthAbi: abi.allWhitelistedTokensLength, itemAbi: abi.allWhitelistedTokens, target: polygonVault}) @@ -12,7 +13,7 @@ const polygonTVL = async (api) => { module.exports = { polygon: { - staking: staking(polygonStaking, polygonMVX), + staking: staking([polygonStaking, polygonMvxVester], polygonMVX, ), tvl: polygonTVL, }, }; \ No newline at end of file diff --git a/projects/metavault/index.js b/projects/metavault/index.js index d4f00986cab3..49b59edd4125 100644 --- a/projects/metavault/index.js +++ b/projects/metavault/index.js @@ -1,16 +1,13 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk"); const readerAbi = require("./reader.json"); const mvlpManagerAbi = require("./mvlpManager.json"); const { staking } = require("../helper/staking"); -const { sumTokens2 } = require('../helper/unwrapLPs'); -const { default: BigNumber } = require("bignumber.js"); +const { sumTokensExport } = require('../helper/unwrapLPs'); const DAI_ADDRESS = ADDRESSES.ethereum.DAI; const USDC_ADDRESS = ADDRESSES.ethereum.USDC; const MVLP_ADDRESS = "0x9F4f8bc00F48663B7C204c96b932C29ccc43A2E8"; -const MVLP_DECIMALS = 18; const REDEEM_CONTRACT = "0xd15C4677A81Ac9d744a01ecaAad684E6d296b8f3"; const GOV_CLUB_CONTRACT = "0x12fc8b560925166c39E85c70E9fD4058Ca9e11c9"; @@ -23,65 +20,41 @@ const READER_CONTRACT = "0x01dd8B434A83cbdDFa24f2ef1fe2D6920ca03734"; // getToke const stakingAddress = "0x42162457006DB4DA3a7af5B53DFee5A891243b4D"; // Governance Staking const stakingTokenAddress = "0x788B6D2B37Aa51D916F2837Ae25b05f0e61339d1"; // MVD -const ADDRESS_ZERO = ADDRESSES.null; -async function getTvl(timestamp, block) { - const toa = [ - [DAI_ADDRESS, REDEEM_CONTRACT,], - [USDC_ADDRESS, GOV_CLUB_CONTRACT,], - ] +const mvdStakingAddressArbitrum = "0xFA69292726A53d62111c9485C03ac551Ba05679b"; // gMVD Staking +const mvdTokenAddressArbitrum = "0x15a808ed3846D25e88AE868DE79F1bcB1Ac382B5"; // MVD - return sumTokens2({ tokensAndOwners: toa, block }) -} +const ADDRESS_ZERO = ADDRESSES.null; -async function polygon(_, _b, { polygon: block }) { - const chain = 'polygon' +async function polygon(api) { // Metavault DAO MVLP Holdings - const aums = ( - await sdk.api.abi.call({ - target: MVLP_MANAGER_CONTRACT, - abi: mvlpManagerAbi.getAums, - chain, block, - }) - ).output; - - const averageAums = (+aums[0] + +aums[1]) / 2 - - const supplies = ( - await sdk.api.abi.call({ - target: READER_CONTRACT, - params: [ADDRESS_ZERO, [MVLP_ADDRESS]], - chain, block, - abi: readerAbi.getTokenBalancesWithSupplies, - }) - ).output; - + const aums = await api.call({ target: MVLP_MANAGER_CONTRACT, abi: mvlpManagerAbi.getAums, }) + const supplies = await api.call({ target: READER_CONTRACT, params: [ADDRESS_ZERO, [MVLP_ADDRESS]], abi: readerAbi.getTokenBalancesWithSupplies, }) + const metavaultDaoMvlpHoldings = await api.call({ abi: 'erc20:balanceOf', target: MVLP_TRACKER_CONTRACT, params: MVD_DAO_MULTI_SIG_WALLET, }) + const mvlpSupply = supplies[1]; - + const averageAums = (+aums[0] + +aums[1]) / 2 const mvlpPrice = averageAums / mvlpSupply - - const metavaultDaoMvlpHoldings = ( - await sdk.api.erc20.balanceOf({ - chain, block, - target: MVLP_TRACKER_CONTRACT, - owner: MVD_DAO_MULTI_SIG_WALLET, - }) - ).output; - - const daoMvlpHoldingsValue = metavaultDaoMvlpHoldings * mvlpPrice; - - const sum = BigNumber(daoMvlpHoldingsValue / 1e24).toFixed(0); - - return { - [USDC_ADDRESS]: sum, - }; + const daoMvlpHoldingsValue = metavaultDaoMvlpHoldings * mvlpPrice / 1e30 + api.addUSDValue(daoMvlpHoldingsValue) } module.exports = { + hallmarks: [ + [1676592000, "Launch on Arbitrum"] + ], misrepresentedTokens: true, + arbitrum: { + staking: staking(mvdStakingAddressArbitrum, mvdTokenAddressArbitrum,), + }, ethereum: { - tvl: getTvl, + tvl: sumTokensExport({ + tokensAndOwners: [ + [DAI_ADDRESS, REDEEM_CONTRACT,], + [USDC_ADDRESS, GOV_CLUB_CONTRACT,], + ] + }), staking: staking(stakingAddress, stakingTokenAddress,), }, polygon: { From 675ccfc0c7c53ee29eb1a7224f3ebe155f51230b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 08:01:21 +0200 Subject: [PATCH 076/787] minor fix --- projects/chainge.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/chainge.js b/projects/chainge.js index 687a4272536f..790526fcadd6 100644 --- a/projects/chainge.js +++ b/projects/chainge.js @@ -17,6 +17,7 @@ const config = { module.exports = { methodology: "assets in liquidity are counted as TVL + balances of all tokens (USDC, USDT, WBTC, WETH, WSYS, and native SYS) held in the Chainge treasury address on the Rollux network. These tokens are used to provide liquidity for cross-chain swaps.", + fusion: { tvl: () => ({})} } Object.keys(config).forEach(chain => { From 15ee624d5497999c07e9bbc2c93d4a370ef38992 Mon Sep 17 00:00:00 2001 From: leeamijo <154820412+leeamijo@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:17:17 +0800 Subject: [PATCH 077/787] feat: add rootstock chain (#12023) --- projects/helper/tokenMapping.js | 3 +++ projects/pell/index.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 89a0f6c23cac..ca032bb39c63 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -121,6 +121,9 @@ const fixBalancesTokens = { zircuit: { '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, }, + bsquared: { + '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3': { coingeckoId: 'lorenzo-stbtc', decimals: 18 } + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/pell/index.js b/projects/pell/index.js index f2be7456b2f0..5ec2b569094b 100644 --- a/projects/pell/index.js +++ b/projects/pell/index.js @@ -1,7 +1,7 @@ const { sumTokens2 } = require('../helper/unwrapLPs') const { getConfig } = require('../helper/cache') -const chains = ['ethereum', 'arbitrum', 'merlin', 'bouncebit', 'btr', 'bsc', 'base', 'bsquared', 'core', 'bevm', 'mantle', 'scroll', 'bob', 'ailayer', 'iotex'] +const chains = ['ethereum', 'arbitrum', 'merlin', 'bouncebit', 'btr', 'bsc', 'base', 'bsquared', 'core', 'bevm', 'mantle', 'scroll', 'bob', 'ailayer', 'iotex', 'rsk'] chains.forEach(chain => { module.exports[chain] = { From 6d8fd14917963a201bc56d50560a2bb5cacd8a6c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:21:51 +0200 Subject: [PATCH 078/787] add token mapping #12027 --- projects/helper/tokenMapping.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index ca032bb39c63..9719fe45a902 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -118,6 +118,10 @@ const fixBalancesTokens = { '0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4': { coingeckoId: 'savings-dai', decimals: 18 }, '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, }, + lac: { + '0x7dc8b9e3b083c26c68f0b124ca923aaec7fbee39': { coingeckoId: 'tether', decimals: 6 }, + '0x51115241c7b8361eee88d8610f71d0a92cee5323': { coingeckoId: 'usd-coin', decimals: 6 }, + }, zircuit: { '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, }, From 4cb0e1ac0a08e83b1b5718bfcdd4bf474f143a48 Mon Sep 17 00:00:00 2001 From: ouchifinance <169087314+ouchifinance@users.noreply.github.com> Date: Thu, 24 Oct 2024 12:36:43 +0300 Subject: [PATCH 079/787] track swapos tvl (#12025) Co-authored-by: ouchifinance --- projects/swapos/index.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 projects/swapos/index.js diff --git a/projects/swapos/index.js b/projects/swapos/index.js new file mode 100644 index 000000000000..710642fa8e27 --- /dev/null +++ b/projects/swapos/index.js @@ -0,0 +1,6 @@ +const { uniTvlExport } = require('../helper/unknownTokens'); + +module.exports = uniTvlExport( + 'ethereum', + '0xfB1Eb9a45Feb7269f3277233AF513482Bc04Ea63' +); From 650ba1ef07f0e5ff91b963c3b4bd20ff3c853d2e Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Thu, 24 Oct 2024 10:55:22 +0100 Subject: [PATCH 080/787] tron btc + btc wallets (#12030) --- projects/obelisk/index.js | 3 +- projects/tron-btc/index.js | 75 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 projects/tron-btc/index.js diff --git a/projects/obelisk/index.js b/projects/obelisk/index.js index 67023bb3ca38..8d6d2f2a7c66 100644 --- a/projects/obelisk/index.js +++ b/projects/obelisk/index.js @@ -5,7 +5,8 @@ const staticAddresses = [ 'bc1p0tr3dgulgpx43dkktjxy8z2azz6yvx4j7s0lelj67tlwct0wnqtqeakfer', '14ejzLtUSMsjZE8Pp2LUhX3Pf7BbXPeZyP', 'bc1q0hapsvdtqfeyw9fjacey9350k8zu552p0khyhj', - 'bc1pr6pga0d44xm3t8z36qnya6sfznsm8fwkn507x6gqt86xtnvm4h4sj2zqus' + 'bc1pr6pga0d44xm3t8z36qnya6sfznsm8fwkn507x6gqt86xtnvm4h4sj2zqus', + 'bc1qy4pkldj4dqxtqypz6awwj7y8vahkht8uqhdlw3' ] const abi = { diff --git a/projects/tron-btc/index.js b/projects/tron-btc/index.js new file mode 100644 index 000000000000..e253ef5202f9 --- /dev/null +++ b/projects/tron-btc/index.js @@ -0,0 +1,75 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const sdk = require('@defillama/sdk'); +const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); +const { sumTokensExport } = require('../helper/sumTokens'); + +// On the 23/10/2024 , defillma receive a PoR from Tron/HTX team with the respective BTC collateral backing BTC on tron chain +const owners = [ + "1NBX1UZE3EFPTnYNkDfVhRADvVc8v6pRYu", + "14NEbSYdjumn9h4spMjbp3PdUpeXuM5PBZ" +] + +module.exports = { + methodology: "Collateral for BTC on tron chain", + bitcoin: { + tvl: sdk.util.sumChainTvls([ + sumTokensExport({ owners }), + ]), + }, + ethereum: { + tvl: sumTokensExport({ + ownerTokens: [ + [[ADDRESSES.ethereum.WBTC], "0xbe6d2444a717767544a8b0ba77833aa6519d81cd",], //WBTC + [["0xc96de26018a54d51c097160568752c4e3bd6c364"], "0x38d516a43f9bab90455c16f9299866217062467e",],//FBTC +] + }), + }, + merlin: { + tvl: sumTokensExport({ + owners: ["0x06fe862f2eefe9a5e9a2cf9799941706665e833a"], + tokens: ["0xb880fd278198bd590252621d4cd071b1842e9bcd", "0x93919784c523f39cacaa98ee0a9d96c3f32b593e"] // M-BTC AND UNIBTC + }), + }, + zklink: { + tvl: sumTokensExport({ + owners: ["0x3aa95613091a3a9512956c3a2a2b724dce375a2d"], + tokens: ["0xbeaf16cfd8efe0fc97c2a07e349b9411f5dc272c"] // SolvBTC.m + }), + }, + linea: { + tvl: sumTokensExport({ + owners: ["0x399c4e524cff47d9e670f9d1ca0381bbe746e97a", "0x533806b821ec94091228d7d34e697b93bb79f8f6"], + tokens: ["0xe4d584ae9b753e549cae66200a6475d2f00705f7", "0x5ffce65a40f6d3de5332766fff6a28bf491c868c", "0x96155858a02c410c3c814bb32fdc413b3241b62e"] // m-btc, SolvBTC.m , solvBTC.B + }), + }, + mode: { + tvl: sumTokensExport({ + owners: ["0x399c4e524cff47d9e670f9d1ca0381bbe746e97a", "0x533806b821ec94091228d7d34e697b93bb79f8f6"], + tokens: ["0x59889b7021243db5b1e065385f918316cd90d46c", ] // m-btc + }), + }, + core: { + tvl: sumTokensExport({ + owners: ["0x533806b821ec94091228d7d34e697b93bb79f8f6"], + tokens: ["0xe04d21d999faedf1e72ade6629e20a11a1ed14fa", ] // solvBTC.M + }), + }, + kroma: { + tvl: sumTokensExport({ + owners: ["0x533806b821ec94091228d7d34e697b93bb79f8f6"], + tokens: ["0x0f921c39efd98809fe6d20a88a4357454578987a", ] // m-BTC + }), + }, + kava: { + tvl: sumTokensExport({ + owners: ["0x533806b821ec94091228d7d34e697b93bb79f8f6"], + tokens: ["0x59889b7021243db5b1e065385f918316cd90d46c", ] // m-BTC + }), + }, + bsc: { + tvl: sumTokensExport({ + owners: ["0x533806b821ec94091228d7d34e697b93bb79f8f6"], + tokens: ["0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", ] // BTCB + }), + }, +}; \ No newline at end of file From 4b3cb2beb703dc9e2643154a44a67b5f20dce3e7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:57:22 +0200 Subject: [PATCH 081/787] update zetaearn #12026 --- projects/zetaEarn/index.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/zetaEarn/index.js b/projects/zetaEarn/index.js index 4411f0b53d2d..937c715b1829 100644 --- a/projects/zetaEarn/index.js +++ b/projects/zetaEarn/index.js @@ -1,6 +1,18 @@ -async function tvl(api) { +async function zetaTvl(api) { api.addGasToken(await api.call({target: '0x45334a5b0a01ce6c260f2b570ec941c680ea62c0', abi: 'uint256:getTotalPooledZETA'})) - } -module.exports = { zeta: { tvl } } \ No newline at end of file +const btrZTokens = [ + '0xd53E6f1d37f430d84eFad8060F9Fec558B36F6fa', // zbtc + '0xdc842A54dB9E6136c7972eA863Efd6CE0d45602c', // zordi + '0xb86e3Cc68d9C56E1b87DEddF49c4A6fdaaF04A82' // zsats +]; + +async function btrTvl(api) { + for (const token of btrZTokens) { + const supply = await api.call({ abi: 'uint256:totalSupply', target: token }); + api.add(token, supply); + } +} + +module.exports = { zeta: { tvl: zetaTvl }, btr: { tvl: btrTvl } } From 6f566c43329c6e3ff6fd78900f41eda94f67c005 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 24 Oct 2024 11:59:00 +0200 Subject: [PATCH 082/787] fix lac issue #12028 --- projects/helper/tokenMapping.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 9719fe45a902..d2a3ba9db2cc 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -63,6 +63,8 @@ const fixBalancesTokens = { lac: { [ADDRESSES.null]: { coingeckoId: "la-coin", decimals: 18 }, [ADDRESSES.lac.LAC]: { coingeckoId: "la-coin", decimals: 18 }, + '0x7dc8b9e3b083c26c68f0b124ca923aaec7fbee39': { coingeckoId: 'tether', decimals: 6 }, + '0x51115241c7b8361eee88d8610f71d0a92cee5323': { coingeckoId: 'usd-coin', decimals: 6 }, }, lisk: { '0x05d032ac25d322df992303dca074ee7392c117b9': { coingeckoId: 'tether', decimals: 6 }, @@ -118,10 +120,6 @@ const fixBalancesTokens = { '0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4': { coingeckoId: 'savings-dai', decimals: 18 }, '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, }, - lac: { - '0x7dc8b9e3b083c26c68f0b124ca923aaec7fbee39': { coingeckoId: 'tether', decimals: 6 }, - '0x51115241c7b8361eee88d8610f71d0a92cee5323': { coingeckoId: 'usd-coin', decimals: 6 }, - }, zircuit: { '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, }, From 3c19210b406ebd29afacc531c59d350b69806299 Mon Sep 17 00:00:00 2001 From: chainupk <121842069+chainupk@users.noreply.github.com> Date: Thu, 24 Oct 2024 18:01:02 +0800 Subject: [PATCH 083/787] Added new address for obelisk protocol (#12029) Co-authored-by: zhenhao goh Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> From 72e40e9a6d02d3e8a8d0ba2c950b989cc31922bd Mon Sep 17 00:00:00 2001 From: Danil Cherevashko Date: Fri, 25 Oct 2024 08:07:43 +0300 Subject: [PATCH 084/787] Add swap.coffee staking and pool2 adapter (#12031) --- projects/helper/chain/ton.js | 12 +++++++++ projects/swap-coffee/index.js | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 projects/swap-coffee/index.js diff --git a/projects/helper/chain/ton.js b/projects/helper/chain/ton.js index d0345dcc6578..e9f9e10cfd51 100644 --- a/projects/helper/chain/ton.js +++ b/projects/helper/chain/ton.js @@ -11,6 +11,17 @@ async function getTonBalance(addr) { return res.balance } +async function getJettonBalances(addr) { + const response = await get(`https://tonapi.io/v2/accounts/${addr}/jettons?currencies=usd`) + + const res = { } + response.balances.forEach(val => { + res[val.jetton.address] = { balance: val.balance, price: val.price.prices.USD, decimals: val.jetton.decimals } + }) + + return res +} + async function _sumTokensAccount({ api, addr, tokens = [], onlyWhitelistedTokens = false }) { if (tokens.includes(ADDRESSES.null)) { const balance = await getTonBalance(addr) @@ -91,4 +102,5 @@ module.exports = { sumTokens, sumTokensExport, call, + getJettonBalances, } \ No newline at end of file diff --git a/projects/swap-coffee/index.js b/projects/swap-coffee/index.js new file mode 100644 index 000000000000..add69ba5f36d --- /dev/null +++ b/projects/swap-coffee/index.js @@ -0,0 +1,46 @@ +const { call, sumTokensExport, getTokenRates, getJettonBalances } = require('../helper/chain/ton') +const {sleep} = require("../helper/utils"); + +const CES_MASTER = "0:a5d12e31be87867851a28d3ce271203c8fa1a28ae826256e73c506d94d49edad" +const STAKING_CONTRACT = "0:29f90533937d696105883b981e9427d1ae411eef5b08eab83f4af89c495d27df" +const DEDUST_TON_CES_POOL = "0:123e245683bd5e93ae787764ebf22291306f4a3fcbb2dcfcf9e337186af92c83" +const STONFI_CES_TON_POOL = "0:6a839f7a9d6e5303d71f51e3c41469f2c35574179eb4bfb420dca624bb989753" + +async function getTokenSupply(addr) { + return (await call({ target: addr, abi: "get_jetton_data"}))[0] / 1e9 +} + +function calcVolume(reserve, supply, rate) { + return ((reserve / 1e9) / supply) * rate +} + +module.exports = { + methodology: "Counts swap.coffee smartcontract balance as TVL.", + timetravel: false, + ton: { + tvl: () => { }, + staking: sumTokensExport({ owners: [STAKING_CONTRACT], tokens: [CES_MASTER]}), + pool2: async (api) => { + const dedustPoolReserves = await call({ target: DEDUST_TON_CES_POOL, abi: "get_reserves" }) + const dedustLpSupply = await getTokenSupply(DEDUST_TON_CES_POOL) + + // toncenter api is rate limited + await sleep(3000) + + const stonfiPoolReserves = await call({ target: STONFI_CES_TON_POOL, abi: "get_pool_data" }) + const stonfiLpSupply = await getTokenSupply(STONFI_CES_TON_POOL) + + const rates = await getTokenRates({ tokens: ["TON", CES_MASTER] }) + + const stonLpPrice = calcVolume(stonfiPoolReserves[0], stonfiLpSupply, rates[CES_MASTER]) + + calcVolume(stonfiPoolReserves[1], stonfiLpSupply, rates["TON"]) + const dedustLpPrice = calcVolume(dedustPoolReserves[0], dedustLpSupply, rates["TON"]) + + calcVolume(dedustPoolReserves[1], dedustLpSupply, rates[CES_MASTER]) + + const balances = await getJettonBalances(STAKING_CONTRACT) + + return api.addUSDValue((stonLpPrice * balances[STONFI_CES_TON_POOL].balance / 1e9) + + (dedustLpPrice * balances[DEDUST_TON_CES_POOL].balance / 1e9)) + } + } +} \ No newline at end of file From f5ef3239c079f8a79e549737b0c81cc951423898 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 25 Oct 2024 07:38:45 +0200 Subject: [PATCH 085/787] update solv btc lst #12032 --- projects/solv-btc-lst/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index 1bde1c82f956..16a1efdceb13 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -6,7 +6,7 @@ const bitcoinOwnersUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slo async function tvl() { let bitcoinOwners = (await getConfig('solv-protocol/solv-btc-lst', bitcoinOwnersUrl)); - const owners = [].concat(bitcoinOwners.core, bitcoinOwners.bbn); + const owners = Object.values(bitcoinOwners).flat(); return sumTokens({ owners }) } From d2ebaed83e14fd5cac15c583dc4065ba175f3edf Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 24 Oct 2024 22:47:07 -0700 Subject: [PATCH 086/787] Origin ARM: Add TVL Adapter (#12037) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/originarm/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/originarm/index.js diff --git a/projects/originarm/index.js b/projects/originarm/index.js new file mode 100644 index 000000000000..87afd109f1cc --- /dev/null +++ b/projects/originarm/index.js @@ -0,0 +1,12 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +module.exports = { + ethereum: { + tvl: async (api) => { + const originLidoArm = "0x85b78aca6deae198fbf201c82daf6ca21942acc6"; + const outstandingSteth = await api.call({abi: 'uint256:lidoWithdrawalQueueAmount', target: originLidoArm }) + api.add(ADDRESSES.ethereum.STETH, outstandingSteth) + return api.sumTokens({ owner: originLidoArm, tokens: [ADDRESSES.ethereum.WETH, ADDRESSES.ethereum.STETH] }) + }, + }, +}; From db486c2d609dceba5497af25a838f6076620e36e Mon Sep 17 00:00:00 2001 From: Henrique Date: Fri, 25 Oct 2024 06:47:21 +0100 Subject: [PATCH 087/787] feat: add ethereum vault on bakerfi (#12036) --- projects/bakerfi/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/bakerfi/index.js b/projects/bakerfi/index.js index ef0652ad0b72..4452fe8612ee 100644 --- a/projects/bakerfi/index.js +++ b/projects/bakerfi/index.js @@ -5,6 +5,9 @@ const config = { base: { vaults: ["0x37327c99bBc522e677a97d01021dB20227faF60A"] }, + ethereum: { + vaults: ["0x01280b3683fE20Dc9cCF4D9526418F252871E4F7"] + }, } async function getVaultTVL(api, vaults) { From f6660d7352d7f5285e27c5d22e7102066984d30f Mon Sep 17 00:00:00 2001 From: 0x33 <166445471+0x33dm@users.noreply.github.com> Date: Fri, 25 Oct 2024 07:48:56 +0200 Subject: [PATCH 088/787] adding base to defi-money adapter (#12035) --- projects/defi-money/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/defi-money/index.js b/projects/defi-money/index.js index ed6010732ea8..984d9f37889a 100644 --- a/projects/defi-money/index.js +++ b/projects/defi-money/index.js @@ -25,6 +25,17 @@ const config = { "0x07aDF588508b923B8eA0389d27b61b9CB8a197Cb", // FRAX/MONEY ], }, + base: { + controller: "0x1337F001E280420EcCe9E7B934Fa07D67fdb62CD", + MONEY: "0xEbE54BEE7A397919C53850bA68E126b0A6b295ed", + stakeLPs: [ + // "0x9F04112af02CE57C10d946481Ea06373719c1E7E", // MONEY - already included in tvl + "0xe0f7c023763d782970ab45e9232255a64290cd6a", // crvUSD/MONEY + "0xb7698c690752ae034e914a29a0de67339a94982b", // USDC/MONEY + "0x45acdee3c9f7e1c7ad6cc10c9cb9f74eb52d0e70", // USDbC/MONEY + "0xac786337dde86b768ea3cc90afa03250bccfff28", // DAI/MONEY + ], + }, } const tvl = async (api) => { From 939a39ad6e05a43c6f8f2e0290bd7247b0466540 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:26:14 +0200 Subject: [PATCH 089/787] Fix: Uni-v1 (Subgraph was Outdated) (#12034) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/uniswap-v1/index.js | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/projects/uniswap-v1/index.js b/projects/uniswap-v1/index.js index 305756f2744e..2cabc673fe60 100644 --- a/projects/uniswap-v1/index.js +++ b/projects/uniswap-v1/index.js @@ -1,13 +1,23 @@ -const { getChainTvl } = require('../helper/getUniSubgraphTvl'); +const { nullAddress } = require('../helper/unwrapLPs') -const v1graph = getChainTvl({ - ethereum: 'ESnjgAG9NjfmHypk4Huu4PVvz55fUwpyrRqHF21thoLJ' -}, "uniswaps", "totalLiquidityUSD") +const uniFactory = '0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95' + +const abi = { + getExchange: "function getExchange(address token) view returns (address)", + getTokenWithId: "function getTokenWithId(uint256 token_id) view returns (address)", + tokenCount: "function tokenCount() view returns (uint256)", +} + +const tvl = async (api) => { + let pools = await api.fetchList({ lengthAbi: abi.tokenCount, itemAbi: abi.getTokenWithId, target: uniFactory, itemAbi2: abi.getExchange, }) + pools = pools.filter(i => i !== nullAddress) + await api.sumTokens({ owners: pools, tokens: [nullAddress] }) + const balancesV2 = api.getBalancesV2() + return balancesV2.clone(2).getBalances() // // Since Uniswap V1 only allowed swaps against ETH, it's enough to know the amount of ETH and multiply it by two to determine the pool's value without needing to know the price of the collateral in question +} module.exports = { misrepresentedTokens: true, - methodology: `Counts the tokens locked on AMM pools, pulling the data from the 'ianlapham/uniswapv2' subgraph`, - ethereum: { - tvl: v1graph("ethereum"), - } -} + methodology: `Counts the tokens in ETH value locked in AMM pools`, + ethereum: { tvl } +} \ No newline at end of file From dbff19c71822b3d7898c4cb2ddb8ce0bd1d4a3ee Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:40:35 +0200 Subject: [PATCH 090/787] track adrastea LRT --- projects/adrastea-lrt/index.js | 6 ++++++ projects/helper/chain/sui.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 projects/adrastea-lrt/index.js diff --git a/projects/adrastea-lrt/index.js b/projects/adrastea-lrt/index.js new file mode 100644 index 000000000000..f75e94027aa7 --- /dev/null +++ b/projects/adrastea-lrt/index.js @@ -0,0 +1,6 @@ +const { sumTokensExport } = require('../helper/solana') +module.exports = { + solana: { + tvl: sumTokensExport({ owners: ['wYPqKV6XuRBSBU1zYiYB1ZTPhkR8PsDRz5kKgmSyum1'] }) + } +} diff --git a/projects/helper/chain/sui.js b/projects/helper/chain/sui.js index dcdfdf459e92..650205208eb4 100644 --- a/projects/helper/chain/sui.js +++ b/projects/helper/chain/sui.js @@ -73,8 +73,9 @@ async function getDynamicFieldObjects({ parent, cursor = null, limit = 48, items async function call(method, params, { withMetadata = false } = {}) { if (!Array.isArray(params)) params = [params] const { - result + result, error } = await http.post(endpoint(), { jsonrpc: "2.0", id: 1, method, params, }) + if (!result && error) throw new Error(`[sui] ${error.message}`) if (['suix_getAllBalances'].includes(method)) return result return withMetadata ? result : result.data } From ce2f424dcef51360257c02ce86d871337f7ffcf0 Mon Sep 17 00:00:00 2001 From: alex-hourglass <141623230+alex-hourglass@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:56:23 +0300 Subject: [PATCH 091/787] Hourglass adaptor (#11956) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/hourglass/index.js | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 projects/hourglass/index.js diff --git a/projects/hourglass/index.js b/projects/hourglass/index.js new file mode 100644 index 000000000000..f0ac27afab9f --- /dev/null +++ b/projects/hourglass/index.js @@ -0,0 +1,44 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { getLogs2 } = require('../helper/cache/getLogs') + +const ethereum_pitchfxs = '0x11ebe21e9d7bf541a18e1e3ac94939018ce88f0b'; + +const config = { + ethereum: { factory: '0x679619FA685a18782a86dD5850124A75E83daD8F', fromBlock: 19877998 }, + mantle: { factory: '0x624bd5ba06A856C4D5f60c8Ba29eeE1f684Ddf05', fromBlock: 65870976 }, +} + +module.exports = { + methodology: 'TVL accounts for all assets deposited into our boosted vaults. It also includes the amount of FXS time-locked and minted as pitchFXS.', +}; + + +Object.keys(config).forEach(chain => { + const { factory, fromBlock, } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + if (chain === 'ethereum') + await computePitchfxsTvl(api) + const logs = await getLogs2({ + api, + factory, + eventAbi: 'event NewMaturityCreated (uint256 deploymentIndex, address depositor, address[] receipts)', + fromBlock, + }) + + const vaults = logs.map(log => log.depositor) + const tokens = await api.multiCall({ abi: 'address:getUnderlying', calls: vaults }) + return api.sumTokens({ tokensAndOwners2: [tokens, vaults] }) + } + } +}) + +const computePitchfxsTvl = async (api) => { + const balance = await api.call({ + target: ethereum_pitchfxs, + params: [], + abi: 'erc20:totalSupply', + }); + + api.addToken(ADDRESSES.ethereum.FXS, balance); +} From 694bc5f51cced4fb54c1881fc031454a49606f3a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:00:24 +0200 Subject: [PATCH 092/787] update cygnus #12057 --- projects/cygnus-fi-restake/index.js | 30 ++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/projects/cygnus-fi-restake/index.js b/projects/cygnus-fi-restake/index.js index 8ef5e2683e17..af16c2f48bee 100644 --- a/projects/cygnus-fi-restake/index.js +++ b/projects/cygnus-fi-restake/index.js @@ -3,13 +3,29 @@ const ADDRESSES = require('../helper/coreAssets.json') // Cygnus is extending the restaking protocol to more chains. // Bsquared is one of the first chains we are supporting. -const CYGNUS_RESTAKE_VAULT = { - bsquared: '0x7551aEa51588AaCe99B89c3FaC3CFc4108DB8094' + +const CYGNUS_POOL_CONFIG = { + bsquared: { + UBTC: { + depositToken: ADDRESSES.bsquared.UBTC, + vault: '0x7551aEa51588AaCe99B89c3FaC3CFc4108DB8094' + }, + STBTC: { + depositToken: '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3', + vault: '0x0Ce45dd53affbb011884EF1866E0738f58AB7969' + }, + UNIBTC: { + depositToken: '0x93919784C523f39CACaa98Ee0a9d96c3F32b593e', + vault: '0xBc323bA4bbf2559417C3Ca47A75e2Ea341Cf8320' + } + } } module.exports = { - methodology: "Calculates assets locked in cygnus restaking vault", - bsquared: { - tvl: sumTokensExport({ owner: CYGNUS_RESTAKE_VAULT.bsquared, tokens: [ADDRESSES.bsquared.UBTC] }) - } -} \ No newline at end of file + methodology: "Calculates assets locked in cygnus restaking vault", +} + +Object.keys(CYGNUS_POOL_CONFIG).forEach(chain => { + const tokensAndOwners = Object.values(CYGNUS_POOL_CONFIG[chain]).map(i => [i.depositToken, i.vault]) + module.exports[chain] = { tvl: sumTokensExport({ tokensAndOwners }) } +}) \ No newline at end of file From 1c8be0efd70647706a7a81583a14fe2139e7bcba Mon Sep 17 00:00:00 2001 From: fiftyeightandeight Date: Sat, 26 Oct 2024 03:08:11 +0800 Subject: [PATCH 093/787] feat: add bsquared to xlink (#12054) --- projects/xlink/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/xlink/index.js b/projects/xlink/index.js index 60d365746ac2..3be86a15ccda 100644 --- a/projects/xlink/index.js +++ b/projects/xlink/index.js @@ -60,4 +60,14 @@ module.exports = { ], }), }, + bsquared: { + tvl: sumTokensExport({ + owners: [ + '0x10eeCCc43172458F0ff9Cc3E9730aB256fAEE32e' + ], + tokens: [ + ADDRESSES.bsquared.UBTC + ] + }), + } }; From 432367f0be7f9d9703f5ccc51f91060ec6e7e34e Mon Sep 17 00:00:00 2001 From: Merlin <39942523+0xmer1in@users.noreply.github.com> Date: Sat, 26 Oct 2024 03:12:36 +0800 Subject: [PATCH 094/787] Add WOOFi pool token and update WOOFi earn adapter (#12048) --- projects/woofi-earn/index.js | 2 +- projects/woofi.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/woofi-earn/index.js b/projects/woofi-earn/index.js index fdb802a815d1..5eed025498ee 100644 --- a/projects/woofi-earn/index.js +++ b/projects/woofi-earn/index.js @@ -6,7 +6,7 @@ module.exports = { misrepresentedTokens: true, }; -(['fantom', 'bsc', 'avax', 'polygon', 'arbitrum', 'optimism', ]).forEach(chain => { +(['fantom', 'bsc', 'avax', 'polygon', 'arbitrum', 'optimism', 'zksync', 'base', 'mantle']).forEach(chain => { module.exports[chain] = { tvl: async () => { let data = await get('https://fi-api.woo.org/yield?network=' + chain) diff --git a/projects/woofi.js b/projects/woofi.js index 1dcba24a856b..1293b021b856 100644 --- a/projects/woofi.js +++ b/projects/woofi.js @@ -57,6 +57,7 @@ const wooPPConfig = { ethereum: [], era: [ ADDRESSES.era.WETH, // WETH + ADDRESSES.era.ZK, // ZK ADDRESSES.era.USDC, // USDC.e '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4', // native USDC ], @@ -66,16 +67,20 @@ const wooPPConfig = { ], linea: [ ADDRESSES.linea.WETH, // WETH + '0x3aAB2285ddcDdaD8edf438C1bAB47e1a9D05a9b4', // WBTC ADDRESSES.linea.USDC, // native USDC + ADDRESSES.linea.USDT, // USDT ], base: [ ADDRESSES.base.WETH, // WETH + '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf', // cbBTC ADDRESSES.base.USDbC, // USDbC ADDRESSES.base.USDC, // native USDC ], mantle: [ ADDRESSES.mantle.WMNT, // WMNT ADDRESSES.mantle.WETH, // WETH + '0xcDA86A272531e8640cD7F1a92c01839911B90bb0', // mETH ADDRESSES.mantle.USDT, // USDT ADDRESSES.mantle.USDC, // USDC ], From dee690c50ce8a44b8cebc36752ebf3fd07fd7b25 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 25 Oct 2024 21:39:38 +0200 Subject: [PATCH 095/787] add @coral-xyz/anchor #11519 --- package-lock.json | 61 ++++++++++++++++++++++++++++++++++++++--------- package.json | 1 + 2 files changed, 51 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 006772e55102..f1eed9d6e60b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "ISC", "dependencies": { + "@coral-xyz/anchor": "^0.30.1", "@defillama/sdk": "latest", "@project-serum/anchor": "^0.26.0", "@solana/web3.js": "^1.87.6", @@ -930,14 +931,15 @@ } }, "node_modules/@coral-xyz/anchor": { - "version": "0.28.1-beta.2", - "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.28.1-beta.2.tgz", - "integrity": "sha512-xreUcOFF8+IQKWOBUrDKJbIw2ftpRVybFlEPVrbSlOBCbreCWrQ5754Gt9cHIcuBDAzearCDiBqzsGQdNgPJiw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.30.1.tgz", + "integrity": "sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ==", + "license": "(MIT OR Apache-2.0)", "dependencies": { - "@coral-xyz/borsh": "^0.28.0", + "@coral-xyz/anchor-errors": "^0.30.1", + "@coral-xyz/borsh": "^0.30.1", "@noble/hashes": "^1.3.1", "@solana/web3.js": "^1.68.0", - "base64-js": "^1.5.1", "bn.js": "^5.1.2", "bs58": "^4.0.1", "buffer-layout": "^1.2.2", @@ -954,10 +956,20 @@ "node": ">=11" } }, + "node_modules/@coral-xyz/anchor-errors": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor-errors/-/anchor-errors-0.30.1.tgz", + "integrity": "sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=10" + } + }, "node_modules/@coral-xyz/anchor/node_modules/@coral-xyz/borsh": { - "version": "0.28.0", - "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.28.0.tgz", - "integrity": "sha512-/u1VTzw7XooK7rqeD7JLUSwOyRSesPUk0U37BV9zK0axJc1q0nRbKFGFLYCQ16OtdOJTTwGfGp11Lx9B45bRCQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.30.1.tgz", + "integrity": "sha512-aaxswpPrCFKl8vZTbxLssA2RvwX2zmKLlRCIktJOwW+VpVwYtXRtlWiIP+c2pPRKneiTiWCN2GEMSH9j1zTlWQ==", + "license": "Apache-2.0", "dependencies": { "bn.js": "^5.1.2", "buffer-layout": "^1.2.0" @@ -997,9 +1009,10 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.94", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.94.tgz", - "integrity": "sha512-XlR5Gawx/uQXvkWZN962DBGXz2+6W4L8NaDIJ3b04vkD2QRhBYAftTKZfHgsYqBh/dFCOGQxh5P0jM49sf8dFw==", + "version": "5.0.96", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.96.tgz", + "integrity": "sha512-xaQUecL8V2fWT1Z6LEg/3iV3DCsW32VItRZ5oRqeDzvyeYnFS22GntkJiyxBRMFdCKHRpr1zNAn+IKOKGfpHUg==", + "license": "ISC", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@elastic/elasticsearch": "^8.13.1", @@ -1260,6 +1273,32 @@ "@solana/web3.js": "^1.30.2" } }, + "node_modules/@pythnetwork/client/node_modules/@coral-xyz/anchor": { + "version": "0.28.1-beta.2", + "resolved": "https://registry.npmjs.org/@coral-xyz/anchor/-/anchor-0.28.1-beta.2.tgz", + "integrity": "sha512-xreUcOFF8+IQKWOBUrDKJbIw2ftpRVybFlEPVrbSlOBCbreCWrQ5754Gt9cHIcuBDAzearCDiBqzsGQdNgPJiw==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@coral-xyz/borsh": "^0.28.0", + "@noble/hashes": "^1.3.1", + "@solana/web3.js": "^1.68.0", + "base64-js": "^1.5.1", + "bn.js": "^5.1.2", + "bs58": "^4.0.1", + "buffer-layout": "^1.2.2", + "camelcase": "^6.3.0", + "cross-fetch": "^3.1.5", + "crypto-hash": "^1.3.0", + "eventemitter3": "^4.0.7", + "pako": "^2.0.3", + "snake-case": "^3.0.4", + "superstruct": "^0.15.4", + "toml": "^3.0.0" + }, + "engines": { + "node": ">=11" + } + }, "node_modules/@pythnetwork/client/node_modules/@coral-xyz/borsh": { "version": "0.28.0", "resolved": "https://registry.npmjs.org/@coral-xyz/borsh/-/borsh-0.28.0.tgz", diff --git a/package.json b/package.json index 5f2df394d3d6..9889a037ec9e 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "author": "", "license": "ISC", "dependencies": { + "@coral-xyz/anchor": "^0.30.1", "@defillama/sdk": "latest", "@project-serum/anchor": "^0.26.0", "@solana/web3.js": "^1.87.6", From 91696d369f29148dda08561a18c3dabd63d05804 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 26 Oct 2024 12:57:03 +0200 Subject: [PATCH 096/787] track nest credit #12058 --- projects/nest-staking/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/nest-staking/index.js diff --git a/projects/nest-staking/index.js b/projects/nest-staking/index.js new file mode 100644 index 000000000000..9c9bec13c468 --- /dev/null +++ b/projects/nest-staking/index.js @@ -0,0 +1,17 @@ + +const RWA_STAKING = "0xdbd03d676e1cf3c3b656972f88ed21784372acab" +const RESERVE_STAKING = "0xba0ae7069f94643853fce3b8af7f55acbc11e397" +const SBTC = "0x094c0e36210634c3CfA25DC11B96b562E0b07624" +const STONE = "0x7122985656e38bdc0302db86685bb972b145bd3c" + +async function tvl(api) { + // Get allowed stablecoins from RWA Staking + const stablecoins = await api.call({ target: RWA_STAKING, abi: 'address[]:getAllowedStablecoins', }) + const ownerTokens = [[stablecoins, RWA_STAKING], [[SBTC, STONE], RESERVE_STAKING]] + return api.sumTokens({ ownerTokens}) +} + +module.exports = { + methodology: "Counts total value locked in both RWA Staking (stablecoins) and Reserve Staking (SBTC and STONE) contracts", + ethereum: { tvl } +} \ No newline at end of file From c0176aa074724d63aeec7cd68251bcdfa9eec950 Mon Sep 17 00:00:00 2001 From: deep-path <54880778+deep-path@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:59:31 +0800 Subject: [PATCH 097/787] remove anchor for add solana tvl (#12053) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/deltatrade.js | 44 ++++++++++++++++++++++++++++++++++- projects/helper/chain/near.js | 1 + 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/projects/deltatrade.js b/projects/deltatrade.js index bea7ad2566ef..37af707c019d 100644 --- a/projects/deltatrade.js +++ b/projects/deltatrade.js @@ -1,5 +1,14 @@ const ADDRESSES = require('./helper/coreAssets.json') -const { sumTokens } = require('./helper/chain/near'); +const { sumTokens } = require('./helper/chain/near') +const { getConfig } = require('./helper/cache') +const { get } = require('./helper/http') + +const { PublicKey } = require('@solana/web3.js'); +const { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, } = require("@solana/spl-token"); +const { sumTokens2 } = require('./helper/solana') + +const state = new PublicKey('FRcbUFpGHQppvXAyJrNYLKME1BQfowh4xKZB2vt9j6yn'); +const programId = new PublicKey('CNLGhYQgNwjyDfHZTEjHfk1MPkqwP96qZahWN82UfcLM'); const GRID_CONTRACT_ID = 'grid.deltatrade.near'; const DCA_CONTRACT_ID = 'dca.deltatrade.near'; @@ -23,4 +32,37 @@ module.exports = { near: { tvl: () => sumTokens({ tokens, owners: [GRID_CONTRACT_ID, DCA_CONTRACT_ID] }), }, + solana: { + tvl: solanaTvl, + } +} + +async function getTokens() { + return getConfig('deltatrade/sol-pairs', undefined, { + fetcher: async () => { + const { data } = await get('https://solapi.deltatrade.ai/api/bot/grid/pairs'); + const tokenSet = new Set() + data.forEach(pair => { + tokenSet.add(pair.base_token.code) + tokenSet.add(pair.quote_token.code) + }) + const arry = Array.from(tokenSet) + arry.sort() + return arry + } + }) +} + +function getGlobalBalanceUser(token) { + const [globalBalPda] = PublicKey.findProgramAddressSync([Buffer.from("global_balance_user"), state.toBuffer(), new PublicKey(token).toBuffer()], programId); + + // const globalBalTokenAccount = await Token.getAssociatedTokenAddress(ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, new PublicKey(token), new PublicKey(globalBalPda.toString()), true); + const [tokenAccount] = PublicKey.findProgramAddressSync([new PublicKey(globalBalPda.toString()), TOKEN_PROGRAM_ID, new PublicKey(token)].map(i => i.toBuffer()), ASSOCIATED_TOKEN_PROGRAM_ID) + return tokenAccount.toString(); +} + +async function solanaTvl() { + const tokens = await getTokens(); + const tokenAccounts = tokens.map(getGlobalBalanceUser) + return sumTokens2({ tokenAccounts }) } diff --git a/projects/helper/chain/near.js b/projects/helper/chain/near.js index a1540a0d476d..c79feedea24d 100644 --- a/projects/helper/chain/near.js +++ b/projects/helper/chain/near.js @@ -13,6 +13,7 @@ function transformAddress(addr) { } const endpoint = "https://rpc.mainnet.near.org" +// const endpoint = "https://near.lava.build" const tokenMapping = { 'wrap.near': { name: 'near', decimals: 24, }, From a6e1c2b443b90d397fa4dd80c520c642f9b2a8da Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 26 Oct 2024 15:34:25 +0200 Subject: [PATCH 098/787] update raydium --- projects/helper/utils.js | 6 +++++- projects/raydium/api.js | 3 +++ projects/raydium/index.js | 2 ++ test.js | 11 ++++++++--- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/projects/helper/utils.js b/projects/helper/utils.js index 17c49bb6a067..86edb86dbb7c 100644 --- a/projects/helper/utils.js +++ b/projects/helper/utils.js @@ -306,12 +306,16 @@ async function debugBalances({ balances = {}, chain, log = false, tableLabel = ' }) sdk.log('Balance table for [%s] %s', chain, tableLabel) - const filtered = logObj.filter(i => { + let filtered = logObj.filter(i => { const symbol = i.symbol?.toLowerCase() ?? '' if (/\.(com|net|org|xyz|site|io)/.test(symbol)) return false if (/claim|access|airdrop/.test(symbol)) return false return true }) + if (filtered.length > 300) { + sdk.log('Too many unknowns to display #'+filtered.length, 'displaying first 100') + filtered = filtered.slice(0, 100) + } if (filtered.length) console.table(filtered) } diff --git a/projects/raydium/api.js b/projects/raydium/api.js index 01ea1e8f65fb..08fd7e18a6a9 100644 --- a/projects/raydium/api.js +++ b/projects/raydium/api.js @@ -3,6 +3,7 @@ const { sumTokens2 } = require('../helper/solana') module.exports = { timetravel: false, + isHeavyProtocol: true, } const { solana: { tvl } } = getExports("raydium", ['solana']) @@ -14,6 +15,8 @@ module.exports.solana = { async function tvlWithCheck(api) { const balances = await tvl(api) api.addBalances(balances) + api.removeTokenBalance('DS4QiZfkp39PsHXYCRV3NkyDUKV9SpTczp2qnAUg6Nt6') // ZMB + // api.removeTokenBalance('HDa3zJc12ahykSsBRvgiWzr6WLEByf36yzKKbVvy4gnF') // SOS const usdValue = await api.getUSDValue() // for some godforsaken reason, the TVL is sometimes reported as 60M, we fail in that case rather than report a wrong number if (usdValue < 2e8) throw new Error('TVL is too low :' + usdValue / 1e6 + 'M') diff --git a/projects/raydium/index.js b/projects/raydium/index.js index 816005d17ff4..ce47ced0ffd7 100644 --- a/projects/raydium/index.js +++ b/projects/raydium/index.js @@ -154,8 +154,10 @@ async function combinedTvl(api) { module.exports = { timetravel: false, + isHeavyProtocol: true, misrepresentedTokens: true, hallmarks: [[1667865600, "FTX collapse"]], + solana: { tvl: combinedTvl, staking: () => sumTokens2({ tokenAccounts: ['8tnpAECxAT9nHBqR1Ba494Ar5dQMPGhL31MmPJz1zZvY'] }) diff --git a/test.js b/test.js index 2533a52f6d33..790967699cea 100644 --- a/test.js +++ b/test.js @@ -236,9 +236,14 @@ function validateHallmarks(hallmark) { Object.entries(usdTokenBalances).forEach(([chain, balances]) => { console.log(`--- ${chain} ---`); - Object.entries(balances) - .sort((a, b) => b[1] - a[1]) - .forEach(([symbol, balance]) => { + let entries = Object.entries(balances) + entries.sort((a, b) => b[1] - a[1]) + + if (entries.length > 30) { + console.log("Showing top 30 tokens, total tokens:", entries.length) + entries = entries.slice(0, 30) + } + entries.forEach(([symbol, balance]) => { console.log(symbol.padEnd(25, " "), humanizeNumber(balance)); }); console.log("Total:", humanizeNumber(usdTvls[chain]), "\n"); From d5aa1fa2b52b3588aa01afa0805cff181e5c7b6a Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sat, 26 Oct 2024 18:47:37 +0100 Subject: [PATCH 099/787] fix --- projects/velvet-capital-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/velvet-capital-v3/index.js b/projects/velvet-capital-v3/index.js index aae6f8a29652..9b320f7ddcd3 100644 --- a/projects/velvet-capital-v3/index.js +++ b/projects/velvet-capital-v3/index.js @@ -8,7 +8,7 @@ async function tvl(api) { ]) const ownerTokens = tokens.map((tokens, i) => [tokens, vaults[i]]); - return sumTokens2({ api, ownerTokens, resolveLP: true }); + return sumTokens2({ api, ownerTokens, resolveLP: true, blacklistedTokens: ['0x55d398326f99059ff775485246999027b3197955'] }); } module.exports = { From 702785a3753d4d6d82c775c80365b5e0da50d3a3 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 27 Oct 2024 06:52:40 +0100 Subject: [PATCH 100/787] exclude SOS from raydium --- projects/raydium/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/raydium/api.js b/projects/raydium/api.js index 08fd7e18a6a9..f03307d7d0fb 100644 --- a/projects/raydium/api.js +++ b/projects/raydium/api.js @@ -16,7 +16,7 @@ async function tvlWithCheck(api) { const balances = await tvl(api) api.addBalances(balances) api.removeTokenBalance('DS4QiZfkp39PsHXYCRV3NkyDUKV9SpTczp2qnAUg6Nt6') // ZMB - // api.removeTokenBalance('HDa3zJc12ahykSsBRvgiWzr6WLEByf36yzKKbVvy4gnF') // SOS + api.removeTokenBalance('HDa3zJc12ahykSsBRvgiWzr6WLEByf36yzKKbVvy4gnF') // SOS const usdValue = await api.getUSDValue() // for some godforsaken reason, the TVL is sometimes reported as 60M, we fail in that case rather than report a wrong number if (usdValue < 2e8) throw new Error('TVL is too low :' + usdValue / 1e6 + 'M') From 32b1ba837e9fc0a0d1b28110c5ef6a65220f6e1c Mon Sep 17 00:00:00 2001 From: SaarWu Date: Sun, 27 Oct 2024 13:34:48 +0700 Subject: [PATCH 101/787] Add SuiMarket tvl (#12056) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chain/sui.js | 24 ++++++++++++++++++++++++ projects/helper/env.js | 1 + projects/suimarket/index.js | 20 ++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 projects/suimarket/index.js diff --git a/projects/helper/chain/sui.js b/projects/helper/chain/sui.js index 650205208eb4..aa832b2077f9 100644 --- a/projects/helper/chain/sui.js +++ b/projects/helper/chain/sui.js @@ -9,6 +9,7 @@ const { sliceIntoChunks, getUniqueAddresses } = require('../utils') //https://docs.sui.io/sui-jsonrpc const endpoint = () => getEnv('SUI_RPC') +const graphEndpoint = () => getEnv('SUI_GRAPH_RPC') async function getObject(objectId) { return (await call('sui_getObject', [objectId, { @@ -140,6 +141,28 @@ async function sumTokens({ balances = {}, owners = [], blacklistedTokens = [], t return api.getBalances() } +async function queryEventsByType({ eventType, transform = i => i }) { + const query = `query GetEvents($after: String, $eventType: String!) { + events(first: 50, after: $after, filter: { eventType: $eventType }) { + pageInfo { + endCursor + hasNextPage + } + nodes { + json + } + } +}` + const items = [] + let after = null + do { + const { events: { pageInfo: { endCursor, hasNextPage}, nodes } } = await sdk.graph.request(graphEndpoint(), query, {variables: { after, eventType}}) + after = hasNextPage ? endCursor : null + items.push(...nodes.map(i => i.json).map(transform)) + } while (after) + return items +} + module.exports = { endpoint: endpoint(), call, @@ -151,4 +174,5 @@ module.exports = { getDynamicFieldObjects, dexExport, sumTokens, + queryEventsByType, }; diff --git a/projects/helper/env.js b/projects/helper/env.js index 90b0c9b53172..a118b42cb743 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -9,6 +9,7 @@ const DEFAULTS = { SOLANA_RPC: 'https://mainnet.helius-rpc.com/?api-key=0109717a-77b4-498a-bc3c-a0b31aa1b3bf', APTOS_RPC: 'https://aptos-mainnet.pontem.network', SUI_RPC: 'https://fullnode.mainnet.sui.io/', + SUI_GRAPH_RPC: 'https://sui-mainnet.mystenlabs.com/graphql', FLOW_RPC: 'https://rest-mainnet.onflow.org', FLOW_EVM_RPC: 'https://mainnet.evm.nodes.onflow.org', MULTIVERSX_RPC: 'https://api.multiversx.com', diff --git a/projects/suimarket/index.js b/projects/suimarket/index.js new file mode 100644 index 000000000000..23879551e91b --- /dev/null +++ b/projects/suimarket/index.js @@ -0,0 +1,20 @@ +const { queryEventsByType, getObjects, } = require('../helper/chain/sui') + +async function tvl(api) { + const eventType = '0xb61e324fa43746f5c24b2db3362afb382b644b32bce39a53f1f796a0109828e0::suimarket::EventCreated' + let events = await queryEventsByType({ eventType, transform: i => i.event_id }) + events = await getObjects(events) + + events.forEach(object => { + const coin = object.type.split('<')[1].replace('>', '') + const amount = object.fields.total_base_coin + api.add(coin, amount) + }) +} + +module.exports = { + timetravel: false, + sui: { + tvl + }, +} From cd3267d7ba114266f59a55236fe89c7f73bbf613 Mon Sep 17 00:00:00 2001 From: Zorag44 <75122924+Zorag44@users.noreply.github.com> Date: Sun, 27 Oct 2024 12:05:28 +0530 Subject: [PATCH 102/787] updated pools (#12062) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/alphafi/index.js | 57 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index fd943ee7c80a..2b5535ffd9c2 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -91,6 +91,30 @@ const ALPHAFI_CETUS_TVL_IDS = [ token0Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" }, + // usdc eth + { + poolID: "0xc04f71f32a65ddf9ebf6fb69f39261457da28918bfda5d3760013f3ea782a594", + cetusPoolID: "0x9e59de50d9e5979fc03ac5bcacdb581c823dbd27d63a036131e17b391f2fac88", + investorID: "0xb0bff60783536f9dc0b38e43150a73b73b8a4f1969446f7721e187821915bd00", + token0Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + token1Type: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH" + }, + // deep sui + { + poolID: "0xff496f73a1f9bf7461882fbdad0c6c6c73d301d3137932f7fce2428244359eaa", + cetusPoolID: "0xe01243f37f712ef87e556afb9b1d03d0fae13f96d324ec912daffc339dfdcbd2", + investorID: "0x5e195363175e4b5139749d901ddd5ef1ffc751777a7051b558c45fa12f24abc3", + token0Type: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP", + token1Type: ADDRESSES.sui.SUI + }, + // buck sui + { + poolID: "0xeb44ecef39cc7873de0c418311557c6b8a60a0af4f1fe1fecece85d5fbe02ab5", + cetusPoolID: "0x59cf0d333464ad29443d92bfd2ddfd1f794c5830141a5ee4a815d1ef3395bf6c", + investorID: "0x9b7c9b6086d3baf413bccdfbb6f60f04dedd5f5387dee531eef5b811afdfaedc", + token0Type: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK", + token1Type: ADDRESSES.sui.SUI + }, ] const ALPHAFI_NAVI_TVL_IDS = [ @@ -124,6 +148,21 @@ const ALPHAFI_NAVI_TVL_IDS = [ tokenType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", expo: 6 }, + { + poolID: "0xea3c2a2d29144bf8f22e412ca5e2954c5d3021d3259ff276e3b62424a624ad1f", + tokenType: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY", + expo: 6 + }, + { + poolID: "0x8ebe04b51e8a272d4db107ad19cfbc184d1dafeeaab0b61c26e613b804e7777a", + tokenType: "0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD", + expo: 6 + }, + { + poolID: "0xc37ec956fdef6c217505e62444ab93f833c20923755d67d1c8588c9b093ae00e", + tokenType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH", + expo: 8 + }, ] const ALPHAFI_NAVI_LOOP_TVL_IDS = [ { @@ -133,6 +172,13 @@ const ALPHAFI_NAVI_LOOP_TVL_IDS = [ expo: 9 }, ] +const ALPHAFI_BUCKET_TVL_IDS = [ + { + poolID: "0x2c5c14b9fb21f93f36cac0f363acf59ecb21f34c4c9b1a1b383f635ecdc7b507", + tokenType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK", + }, + +] const ALPHAFI_POOL2_IDS = [{ poolID: "0x594f13b8f287003fd48e4264e7056e274b84709ada31e3657f00eeedc1547e37", cetusPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720", @@ -213,9 +259,18 @@ async function addPoolTVL3(api, alphafiNaviLoopPools){ } } +async function addPoolTVL4(api, alphafiBucketPools){ + + for (const { poolID, tokenType } of alphafiBucketPools){ + let poolObject = await sui.getObject(poolID); + let tokensInvested = poolObject.fields.tokensInvested; + api.add(tokenType, tokensInvested); + } +} + async function tvl(api) { - await Promise.all([addPoolTVL(api, ALPHAFI_CETUS_TVL_IDS), addPoolTVL2(api, ALPHAFI_NAVI_TVL_IDS), addPoolTVL3(api, ALPHAFI_NAVI_LOOP_TVL_IDS)]) + await Promise.all([addPoolTVL(api, ALPHAFI_CETUS_TVL_IDS), addPoolTVL2(api, ALPHAFI_NAVI_TVL_IDS), addPoolTVL3(api, ALPHAFI_NAVI_LOOP_TVL_IDS), addPoolTVL4(api, ALPHAFI_BUCKET_TVL_IDS)]) } async function pool2(api) { From 807bc7880a102a3f972bfc9057d790afa776cf4e Mon Sep 17 00:00:00 2001 From: DackieSwap <132213730+DackieSwap@users.noreply.github.com> Date: Sun, 27 Oct 2024 13:35:55 +0700 Subject: [PATCH 103/787] Update DackieSwap V2 V3 on World Chain (#12060) Co-authored-by: andreapn.eth --- projects/dackieswap-v2/index.js | 1 + projects/dackieswap/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/dackieswap-v2/index.js b/projects/dackieswap-v2/index.js index d4f3c037f0ea..2fce6ef05040 100644 --- a/projects/dackieswap-v2/index.js +++ b/projects/dackieswap-v2/index.js @@ -16,6 +16,7 @@ const config = { mode: '0x757cd583004400ee67e5cc3c7a60c6a62e3f6d30', base: '0x591f122D1df761E616c13d265006fcbf4c6d6551', linea: '0x9790713770039CeFcf4FAaf076E2846c9B7a4630', + wc: '0x757cD583004400ee67e5cC3c7A60C6a62E3F6d30', } module.exports = { diff --git a/projects/dackieswap/index.js b/projects/dackieswap/index.js index 4ae6f2900355..d7b1425e6f79 100644 --- a/projects/dackieswap/index.js +++ b/projects/dackieswap/index.js @@ -9,4 +9,5 @@ module.exports = uniV3Export({ mode: { factory: "0xc6f3966E5D08Ced98aC30f8B65BeAB5882Be54C7", fromBlock: 6102035 }, xlayer: { factory: "0xc6f3966e5d08ced98ac30f8b65beab5882be54c7", fromBlock: 278971 }, linea: { factory: "0xc6255ec7CDb11C890d02EBfE77825976457B2470", fromBlock: 8488016 }, + wc: { factory: "0xB9010964301326160173da694c0697a2FcE82F39", fromBlock: 4523073 }, }); \ No newline at end of file From 2b72a955069bb49511d4a197ecd06ed26ecf18bb Mon Sep 17 00:00:00 2001 From: degen-pool <114661125+dead-pool-aka-wilson@users.noreply.github.com> Date: Sun, 27 Oct 2024 16:00:08 +0900 Subject: [PATCH 104/787] add fragmetric adapter (#11605) Co-authored-by: Kangji --- projects/fragmetric/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/fragmetric/index.js diff --git a/projects/fragmetric/index.js b/projects/fragmetric/index.js new file mode 100644 index 000000000000..39b5de390837 --- /dev/null +++ b/projects/fragmetric/index.js @@ -0,0 +1,20 @@ +const { sumTokens2 } = require("../helper/solana"); + +async function tvl() { + return sumTokens2({ + tokenAccounts: [ + "EVUJsmfM3cqh48eTrwmLe552F3pzmhRMJGVpmweg2fBt", + "7HPaAWDuzsSEm4JZnRudJF11pNanPNfP5mqHUCkXh5kD", + "BaoCDUcKbYSaxA5scygSeMNZV1GPsNeKqLwg92f9pi5v", + ], + solOwners: [ + "3TK9fNePM4qdKC4dwvDe8Bamv14prDqdVfuANxPeiryb", + ] + }) +} + +module.exports = { + timetravel: false, + solana: { tvl }, + methodology: 'TVL is calculated by summing all restaked assets.', +}; From eb38119b9d28c363bdc9dec51ef4fb02356227e7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 27 Oct 2024 10:28:26 +0100 Subject: [PATCH 105/787] Bonzo (#12064) Co-authored-by: Jason Fabritz Co-authored-by: Jason Fabritz --- projects/bonzo/index.js | 7 +++++++ projects/helper/tokenMapping.js | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 projects/bonzo/index.js diff --git a/projects/bonzo/index.js b/projects/bonzo/index.js new file mode 100644 index 000000000000..a0262ffd9426 --- /dev/null +++ b/projects/bonzo/index.js @@ -0,0 +1,7 @@ +const { aaveV2Export, methodology } = require("../helper/aave") + +module.exports = { + timetravel: false, + methodology, + hedera: aaveV2Export('0x236897c518996163E7b313aD21D1C9fCC7BA1afc'), +} \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index d2a3ba9db2cc..bd685eb3a7a9 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -126,6 +126,18 @@ const fixBalancesTokens = { bsquared: { '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3': { coingeckoId: 'lorenzo-stbtc', decimals: 18 } }, + hedera: { + '0x00000000000000000000000000000000001647e8': { coingeckoId: 'xsauce', decimals: 6 }, + '0x000000000000000000000000000000000006f89a': { coingeckoId: 'usd-coin', decimals: 6 }, + '0x000000000000000000000000000000000022d6de': { coingeckoId: 'karate-combat', decimals: 8}, + '0x00000000000000000000000000000000000cba44': { coingeckoId: 'hbarx', decimals: 8 }, + '0x00000000000000000000000000000000000b2ad5': { coingeckoId: 'saucerswap', decimals: 6 }, + '0x0000000000000000000000000000000000163b5a': { coingeckoId: 'hedera-hashgraph', decimals: 8 }, + '0x000000000000000000000000000000000038b3db': { coingeckoId: 'dovu-2', decimals: 8 }, + '0x00000000000000000000000000000000000ec585': { coingeckoId: 'headstarter', decimals: 8 }, + '0x0000000000000000000000000000000000492a28': { coingeckoId: 'hashpack', decimals: 6 }, + '0x000000000000000000000000000000000030fb8b': { coingeckoId: 'steam', decimals: 2 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From ccc8e1637e024b4280e7b3d9aa84665628e36864 Mon Sep 17 00:00:00 2001 From: Merlin <39942523+0xmer1in@users.noreply.github.com> Date: Sun, 27 Oct 2024 17:30:32 +0800 Subject: [PATCH 106/787] Update WOOFi Earn ZKsync Era config (#12063) --- projects/woofi-earn/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/woofi-earn/index.js b/projects/woofi-earn/index.js index 5eed025498ee..76132e08a6a3 100644 --- a/projects/woofi-earn/index.js +++ b/projects/woofi-earn/index.js @@ -6,10 +6,14 @@ module.exports = { misrepresentedTokens: true, }; -(['fantom', 'bsc', 'avax', 'polygon', 'arbitrum', 'optimism', 'zksync', 'base', 'mantle']).forEach(chain => { +(['fantom', 'bsc', 'avax', 'polygon', 'arbitrum', 'optimism', 'era', 'base', 'mantle']).forEach(chain => { module.exports[chain] = { tvl: async () => { - let data = await get('https://fi-api.woo.org/yield?network=' + chain) + let network = chain + if (chain == 'era') { + network = 'zksync' + } + let data = await get('https://fi-api.woo.org/yield?network=' + network) const tvl = data.data.total_deposit / 1e18 return toUSDTBalances(tvl) } From 448dc28f220de9d222b24320843d77a9b3174dcd Mon Sep 17 00:00:00 2001 From: Akarsh Maurya <57176420+Havoc19@users.noreply.github.com> Date: Sun, 27 Oct 2024 21:20:16 +0530 Subject: [PATCH 107/787] Added tvl logic for bsc + added chain specific token fix (#12065) --- projects/velvet-capital-v3/index.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/projects/velvet-capital-v3/index.js b/projects/velvet-capital-v3/index.js index 9b320f7ddcd3..978856c9a193 100644 --- a/projects/velvet-capital-v3/index.js +++ b/projects/velvet-capital-v3/index.js @@ -7,8 +7,20 @@ async function tvl(api) { api.multiCall({ abi: 'address:vault', calls: indexes }), ]) + const blacklistsByChain = { + base: [ + "0x55d398326f99059ff775485246999027b3197955" + ], + bsc: [ + "0x4200000000000000000000000000000000000006" + ] + } + + const blacklistedTokens = blacklistsByChain[api.chain] || [] + + const ownerTokens = tokens.map((tokens, i) => [tokens, vaults[i]]); - return sumTokens2({ api, ownerTokens, resolveLP: true, blacklistedTokens: ['0x55d398326f99059ff775485246999027b3197955'] }); + return sumTokens2({ api, ownerTokens, resolveLP: true, blacklistedTokens}); } module.exports = { @@ -16,7 +28,8 @@ module.exports = { } const config = { - base : '0xf93659fb357899e092813bc3a2959ceDb3282a7f' + base : '0xf93659fb357899e092813bc3a2959ceDb3282a7f', + bsc: '0xA1fe1C37Bf899C7F7521082C002dFA4fEbAaA8dd' } Object.keys(config).forEach(chain => { From 78daf518818e146c67e3330dafb87a1c0b2273c5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:28:07 +0100 Subject: [PATCH 108/787] mark bubbleswap as dead --- projects/bubbleswap-v2/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/bubbleswap-v2/index.js b/projects/bubbleswap-v2/index.js index 2ec1923a3e81..3bd32bcbc81e 100644 --- a/projects/bubbleswap-v2/index.js +++ b/projects/bubbleswap-v2/index.js @@ -3,6 +3,7 @@ module.exports = { hedera: { tvl: () => ({}), }, + deadFrom: '2023-07-01', timetravel: false, methodology: "Data is retrieved from the api at https://api.bubbleswap.io/", hallmarks: [ From 90e099c371f98600866330db0b9cae0ac6cb37a3 Mon Sep 17 00:00:00 2001 From: DLHTX <35157091+DLHTX@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:34:44 +0800 Subject: [PATCH 109/787] Add mimoswap V3 DEX (#12067) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/mimoswap-v3/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/mimoswap-v3/index.js diff --git a/projects/mimoswap-v3/index.js b/projects/mimoswap-v3/index.js new file mode 100644 index 000000000000..59d78a216c66 --- /dev/null +++ b/projects/mimoswap-v3/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require("../helper/uniswapV3"); + +module.exports = uniV3Export({ + iotex: { factory: "0xF36788bF206f75F29f99Aa9d418fD8164b3B8198", fromBlock: 27707694, blacklistedTokens: ['0x95cb18889b968ababb9104f30af5b310bd007fd8'] } +}) \ No newline at end of file From a654ff036d47622b7bde9226c3b2acb4d79bded1 Mon Sep 17 00:00:00 2001 From: MishaShWoof Date: Mon, 28 Oct 2024 15:05:23 +0200 Subject: [PATCH 110/787] Add Mainnet cWstETHv3 and cUSDSv3 and Base cAEROv3 Compound markets (#12076) --- projects/compound-v3/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/compound-v3/index.js b/projects/compound-v3/index.js index b31c05960604..0d4ca453e27a 100644 --- a/projects/compound-v3/index.js +++ b/projects/compound-v3/index.js @@ -6,6 +6,8 @@ module.exports = compoundV3Exports({ '0xc3d688B66703497DAA19211EEdff47f25384cdc3', // USDC Market '0xa17581a9e3356d9a858b789d68b4d866e593ae94', // ETH Market '0x3Afdc9BCA9213A35503b077a6072F3D0d5AB0840', // USDT Market + '0x3D0bb1ccaB520A66e607822fC55BC921738fAFE3', // wstETH Market + '0x5D409e56D886231aDAf00c8775665AD0f9897b56', // USDS Market ], }, arbitrum: { @@ -27,6 +29,7 @@ module.exports = compoundV3Exports({ '0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf', // USDbC Market '0x46e6b214b524310239732D51387075E0e70970bf', // ETH Market '0xb125E6687d4313864e53df431d5425969c15Eb2F', // USDC Market + '0x784efeB622244d2348d4F2522f8860B96fbEcE89', // AERO Market ], }, scroll: { From 23dea7d6f6e576e2ccc1569eac017159f59ce6ea Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:06:48 +0100 Subject: [PATCH 111/787] Fix: Jones-dao (#12074) --- projects/jones-dao/aura-locker-abi.json | 48 ----------- projects/jones-dao/index.js | 106 ++++++++++-------------- 2 files changed, 44 insertions(+), 110 deletions(-) delete mode 100644 projects/jones-dao/aura-locker-abi.json diff --git a/projects/jones-dao/aura-locker-abi.json b/projects/jones-dao/aura-locker-abi.json deleted file mode 100644 index 32a964f6ed10..000000000000 --- a/projects/jones-dao/aura-locker-abi.json +++ /dev/null @@ -1,48 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "lockedBalances", - "outputs": [ - { - "internalType": "uint256", - "name": "total", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "unlockable", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "locked", - "type": "uint256" - }, - { - "components": [ - { - "internalType": "uint112", - "name": "amount", - "type": "uint112" - }, - { - "internalType": "uint32", - "name": "unlockTime", - "type": "uint32" - } - ], - "internalType": "struct AuraLocker.LockedBalance[]", - "name": "lockData", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file diff --git a/projects/jones-dao/index.js b/projects/jones-dao/index.js index fa378a17fef1..5b1e2dfd97bb 100644 --- a/projects/jones-dao/index.js +++ b/projects/jones-dao/index.js @@ -4,7 +4,6 @@ const { pool2s } = require("../helper/pool2"); const { stakings } = require("../helper/staking"); const { sumTokens2 } = require("../helper/unwrapLPs"); -const lockerABI = require("./aura-locker-abi.json"); const addresses = require("./addresses"); const jAssetToAsset = { @@ -14,94 +13,77 @@ const jAssetToAsset = { "0x1f6fa7a58701b3773b08a1a16d06b656b0eccb23": addresses.tokens.rdpx, // jrdpx }; -async function tvl(api) { +const tokensAndOwners = [ + [addresses.tokens.uvrt, addresses.glp.stableRewardTracker], + [addresses.tokens.uvrt, addresses.glp.router], + [addresses.tokens.glp, addresses.glp.leverageStrategy], +]; + +const abi = { + locker: "function lockedBalances(address _user) view returns (uint256 total, uint256 unlockable, uint256 locked, (uint112 amount, uint32 unlockTime)[] lockData)", + glpManager: "function getLPManagerContracts(uint256 _nonce) view returns (address lp,address viewer,address swapper,address receiver,address priceHelper,address lpManager,address doubleTracker,address singleTrackerZero,address singleTrackerOne,address compounder,address router)" +} + +async function tvl_arbitrum (api) { const [metavaultTokens, metavaultBalances, optionVaultTokens, optionVaultBalances, jusdcTvl] = await Promise.all([ - api.multiCall({ - abi: "address:depositToken", - calls: addresses.metaVaultsAddresses, - }), - api.multiCall({ - abi: "uint256:workingBalance", - calls: addresses.metaVaultsAddresses, - }), - api.multiCall({ - abi: "address:asset", - calls: addresses.optionVaultAddresses, - }), - api.multiCall({ - abi: "uint256:totalAssets", - calls: addresses.optionVaultAddresses, - }), - sdk.api.abi.call({ - abi: "uint256:totalAssets", - target: addresses.jusdc.underlyingVault, - chain: "arbitrum", - }), + api.multiCall({ abi: "address:depositToken", calls: addresses.metaVaultsAddresses }), + api.multiCall({ abi: "uint256:workingBalance", calls: addresses.metaVaultsAddresses }), + api.multiCall({ abi: "address:asset", calls: addresses.optionVaultAddresses }), + api.multiCall({ abi: "uint256:totalAssets", calls: addresses.optionVaultAddresses }), + api.call({ abi: "uint256:totalAssets", target: addresses.jusdc.underlyingVault }), ]); api.addTokens(metavaultTokens, metavaultBalances); api.addTokens(optionVaultTokens, optionVaultBalances); - api.addTokens(addresses.tokens.usdc, jusdcTvl.output); - const getLPManagerContractsABI = "function getLPManagerContracts(uint256 _nonce) view returns (address lp,address viewer,address swapper,address receiver,address priceHelper,address lpManager,address doubleTracker,address singleTrackerZero,address singleTrackerOne,address compounder,address router)" - + api.addTokens(addresses.tokens.usdc, jusdcTvl); for (const factoryAddress of addresses.smartLpArbFactories) { - const contracts = await api.fetchList({ lengthAbi: 'nonce', itemAbi: getLPManagerContractsABI, target: factoryAddress, startFromOne: true }) + const contracts = await api.fetchList({ lengthAbi: 'nonce', itemAbi: abi.glpManager, target: factoryAddress, startFromOne: true }) const lpManagers = contracts.map(c => c.lpManager) - const token0s = await api.multiCall({ abi: "address:token0", calls: lpManagers }) - const token1s = await api.multiCall({ abi: "address:token1", calls: lpManagers }) - const aums = await api.multiCall({ abi: "function aum() returns (uint256 amount0, uint256 amount1)", calls: lpManagers }) - - api.add(token0s, aums.map(a => a.amount0)) - api.add(token1s, aums.map(a => a.amount1)) + const [token0s, token1s, aums] = await Promise.all([ + api.multiCall({ abi: "address:token0", calls: lpManagers, permitFailure: true }), + api.multiCall({ abi: "address:token1", calls: lpManagers, permitFailure: true }), + api.multiCall({ abi: "function aum() returns (uint256 amount0, uint256 amount1)", calls: lpManagers, permitFailure: true }) + ]) + + lpManagers.forEach((_lp, i) => { + const token0 = token0s[i] + const token1 = token1s[i] + const aum = aums[i] + if (!token0 || !token1 || !aum) return + api.add(token0, aum.amount0) + api.add(token1, aum.amount1) + }) } - const tokensAndOwners = [ - [addresses.tokens.uvrt, addresses.glp.stableRewardTracker], - [addresses.tokens.uvrt, addresses.glp.router], - [addresses.tokens.glp, addresses.glp.leverageStrategy], - ]; - return sumTokens2({ api, tokensAndOwners }); } async function tvl_ethereum(api) { - const balances = {}; - - const leftoverStrategy = await sdk.api.erc20 - .balanceOf({ - target: addresses.tokens.aura, - owner: addresses.aura.strategy, - }) - .then((result) => result.output); - sdk.util.sumSingleBalance(balances, addresses.tokens.aura, leftoverStrategy); - - const lockedBalance = await sdk.api.abi - .call({ - abi: lockerABI.at(0), - target: addresses.aura.locker, - params: addresses.aura.strategy, - }) - .then((result) => result.output[0]); - sdk.util.sumSingleBalance(balances, addresses.tokens.aura, lockedBalance); - - return balances; + const [leftoverStrategy, total] = await Promise.all([ + api.call({ target: addresses.tokens.aura, params: [addresses.aura.strategy], abi: 'erc20:balanceOf' }), + api.call({ target: addresses.aura.locker, params: [addresses.aura.strategy], abi: abi.locker }).then(res => res.total) + ]); + + [leftoverStrategy, total].forEach((bals) => { + api.add(addresses.tokens.aura, bals) + }); } + module.exports = { arbitrum: { - tvl, + tvl: tvl_arbitrum, + staking: stakings(addresses.stakingContracts, addresses.tokens.jones, "arbitrum"), pool2: pool2s(addresses.lpStaking, addresses.lps, "arbitrum", (addr) => { addr = addr.toLowerCase(); return `arbitrum:${jAssetToAsset[addr] ?? addr}`; }), - staking: stakings(addresses.stakingContracts, addresses.tokens.jones, "arbitrum"), }, ethereum: { tvl: tvl_ethereum, }, }; -// node test.js projects/jones-dao/index.js From fb1f81abd53df5d10ddbfaa6b817da3663a2a233 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:10:25 +0100 Subject: [PATCH 112/787] Fix: Oh-finance (#12073) --- projects/oh-finance/abi.json | 4 -- projects/oh-finance/index.js | 80 ++++++++++++++++++++---------------- 2 files changed, 44 insertions(+), 40 deletions(-) delete mode 100644 projects/oh-finance/abi.json diff --git a/projects/oh-finance/abi.json b/projects/oh-finance/abi.json deleted file mode 100644 index 81c99ed36ffd..000000000000 --- a/projects/oh-finance/abi.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "virtualBalance": "uint256:virtualBalance", - "underlying": "address:underlying" -} \ No newline at end of file diff --git a/projects/oh-finance/index.js b/projects/oh-finance/index.js index 5f3915a3d8c0..260b5ee73730 100644 --- a/projects/oh-finance/index.js +++ b/projects/oh-finance/index.js @@ -1,39 +1,47 @@ -const sdk = require('@defillama/sdk'); -const abi = require('./abi.json') +const CONFIG = { + ethereum: [ + "0xa528639aae2e765351dcd1e0c2dd299d6279db52", // usdc + ], + avax: [ + "0x8B1Be96dc17875ee01cC1984e389507Bb227CaAB", // usdc.e + "0xd96AbEcf6AA022735CFa9CB512d63645b0834720", // usdt.e + "0xF74303DD14E511CCD90219594e8069d36Da01DCD", // dai.e + "0xe001DeCc1763F8BadBbc1b10c2D6db0900f9B928", // usdc + "0xB3ce618F43b53Cdc12077FB937f9fF465BcE1f60", // usdt + ], + moonriver: [ + "0x4C211F45876d8EC7bAb54CAc0e32AAD15095358A", // usdc + "0xdeA7Ff1D84B7E54587b434C1A585718857CF61d1", // usdt + ], + metis: [ + "0x4C211F45876d8EC7bAb54CAc0e32AAD15095358A", // m.usdc + "0xc53bC2517Fceff56308b492AFad4A53d96d16ed8", // m.usdt + ], +}; + +const abi = { + virtualBalance: "uint256:virtualBalance", + underlying: "address:underlying", +}; + +async function getBankTvl(api, vaults) { + const [investeds, underlyings] = await Promise.all([ + api.multiCall({ calls: vaults, abi: abi.virtualBalance, permitFailure: true }), + api.multiCall({ calls: vaults, abi: abi.underlying, permitFailure: true }), + ]); + + vaults.forEach((_vault, i) => { + const invested = investeds[i] + const underlying = underlyings[i] + if (!invested || !underlying ) return + api.add(underlying, invested) + }) -function getBankTvl(bankAddress, chain){ - return async (time, ethBlock, {[chain]: block})=>{ - const invested = await sdk.api.abi.call({target: bankAddress, block, chain, abi:abi.virtualBalance}) - const underlying = await sdk.api.abi.call({target: bankAddress, block, chain, abi:abi.underlying}) - return { - [chain+":"+underlying.output]: invested.output - } - } } -module.exports={ - ethereum:{ - tvl: getBankTvl("0xa528639aae2e765351dcd1e0c2dd299d6279db52", "ethereum"), // usdc - }, - avax:{ - tvl: sdk.util.sumChainTvls([ - getBankTvl("0x8B1Be96dc17875ee01cC1984e389507Bb227CaAB", "avax"), // usdc.e - getBankTvl("0xd96AbEcf6AA022735CFa9CB512d63645b0834720", "avax"), // usdt.e - getBankTvl("0xF74303DD14E511CCD90219594e8069d36Da01DCD", "avax"), // dai.e - getBankTvl("0xe001DeCc1763F8BadBbc1b10c2D6db0900f9B928", "avax"), // usdc - getBankTvl("0xB3ce618F43b53Cdc12077FB937f9fF465BcE1f60", "avax"), // usdt - ]) - }, - moonriver: { - tvl: sdk.util.sumChainTvls([ - getBankTvl("0x4C211F45876d8EC7bAb54CAc0e32AAD15095358A","moonriver"), // usdc - getBankTvl("0xdeA7Ff1D84B7E54587b434C1A585718857CF61d1","moonriver"), // usdt - ]) - }, - metis: { - tvl: sdk.util.sumChainTvls([ - getBankTvl("0x4C211F45876d8EC7bAb54CAc0e32AAD15095358A", "metis"), // m.usdc - getBankTvl("0xc53bC2517Fceff56308b492AFad4A53d96d16ed8", "metis"), // m.usdt - ]) - } -} \ No newline at end of file +Object.keys(CONFIG).forEach((chain) => { + const vaults = CONFIG[chain]; + module.exports[chain] = { + tvl: (api) => getBankTvl(api, vaults), + }; +}); From 12e4e5046568c45e127d5cc8fb7aac1e849a6ffc Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:11:18 +0100 Subject: [PATCH 113/787] Fix: Kogefarm logic (#12072) --- projects/kogefarm/abi.json | 4 --- projects/kogefarm/index.js | 61 ++++++++++++++++++++++++++------------ 2 files changed, 42 insertions(+), 23 deletions(-) delete mode 100644 projects/kogefarm/abi.json diff --git a/projects/kogefarm/abi.json b/projects/kogefarm/abi.json deleted file mode 100644 index 710604369642..000000000000 --- a/projects/kogefarm/abi.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "balance": "uint256:balance", - "token": "address:token" -} \ No newline at end of file diff --git a/projects/kogefarm/index.js b/projects/kogefarm/index.js index 0ca96c5eac3f..6708969d4518 100644 --- a/projects/kogefarm/index.js +++ b/projects/kogefarm/index.js @@ -1,5 +1,4 @@ const { sumUnknownTokens } = require('../helper/unknownTokens') -const abi = require('./abi.json') const { getConfig } = require('../helper/cache') const kogeMasterChefAddr = '0x6275518a63e891b1bC54FEEBBb5333776E32fAbD' @@ -27,32 +26,56 @@ const _kogePool2 = [ ] const config = { - kava: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/kava_vault_addresses.json', }, - moonriver: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/movr_vault_addresses.json', }, - fantom: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/ftm_vault_addresses.json', }, - polygon: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/vaultaddresses', }, + kava: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/kava_vault_addresses.json' }, + moonriver: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/movr_vault_addresses.json' }, + fantom: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/ftm_vault_addresses.json' }, + polygon: { endpoint: 'https://raw.githubusercontent.com/kogecoin/vault-contracts/main/vaultaddresses' }, +} + +const abi = { + strategy: "function strategy() view returns (address)", + balance: "uint256:balance", + token: "address:token", + balanceOfPool: "function balanceOf() view returns (uint256)" } Object.keys(config).forEach(chain => { - const { endpoint } = config[chain] + const { endpoint } = config[chain]; module.exports[chain] = { tvl: async (api) => { - let info = (await getConfig('kogefarm/' + chain, endpoint)) - if (typeof info === 'string') info = JSON.parse(vaults.replace(/,(\s*[}\]])/g, '$1')) - let vaults = chain === 'polygon' ? info : info.map(v => v.vault) - if (chain === 'polygon') - vaults = vaults.filter(v => !_kogePool2.includes(v)) - const tokens = await api.multiCall({ abi: abi.token, calls: vaults }) - const bals = await api.multiCall({ abi: abi.balance, calls: vaults }) - api.addTokens(tokens, bals) - return sumUnknownTokens({ api, resolveLP: true, }) + let info = await getConfig('kogefarm/' + chain, endpoint); + if (typeof info === 'string') info = JSON.parse(info.replace(/,(\s*[}\]])/g, '$1')); + + let vaults = chain === 'polygon' ? info : info.map(v => v.vault); + if (chain === 'polygon') { + vaults = vaults.filter(v => !_kogePool2.includes(v)); + const [tokens, bals] = await Promise.all([ + api.multiCall({ abi: abi.token, calls: vaults }), + api.multiCall({ abi: abi.balance, calls: vaults }) + ]); + api.addTokens(tokens, bals); + + } else { + const [tokens, strategies] = await Promise.all([ + api.multiCall({ abi: abi.token, calls: vaults }), + api.multiCall({ abi: abi.strategy, calls: vaults }) + ]); + + const balanceOfPools = await api.multiCall({ calls: strategies, abi: abi.balanceOfPool }); + api.addTokens(tokens, balanceOfPools); + } + return sumUnknownTokens({ api, resolveLP: true }); } - } -}) + }; +}); + + module.exports.polygon.pool2 = async (api) => { - const tokens = await api.multiCall({ abi: abi.token, calls: _kogePool2 }) - const bals = await api.multiCall({ abi: abi.balance, calls: _kogePool2 }) + const [tokens, bals] = await Promise.all([ + api.multiCall({ abi: abi.token, calls: _kogePool2 }), + api.multiCall({ abi: abi.balance, calls: _kogePool2 }) + ]) api.addTokens(tokens, bals) return sumUnknownTokens({ api, resolveLP: true, tokens: ['0x3885503aef5e929fcb7035fbdca87239651c8154'], owner: kogeMasterChefAddr, }) } From 23a17dd0847381e4c892ef37f1b777306da51ae1 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:14:47 +0100 Subject: [PATCH 114/787] Fix: BSX-exchange, blacklist (#12071) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/bsx-exchange/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/bsx-exchange/index.js b/projects/bsx-exchange/index.js index ce2bab3c6be7..b7cb8e6afddc 100644 --- a/projects/bsx-exchange/index.js +++ b/projects/bsx-exchange/index.js @@ -1,3 +1,5 @@ +const { nullAddress } = require("../helper/tokenMapping") + const config = { base: '0x26a54955a5fb9472d3edfeac9b8e4c0ab5779ed3', } @@ -7,7 +9,8 @@ Object.keys(config).forEach(chain => { module.exports[chain] = { tvl: async (api) => { const tokens = await api.call({ abi: 'address[]:getSupportedTokenList', target: exchange }) - return api.sumTokens({ owner: exchange, tokens }) + tokens.push(nullAddress) + return api.sumTokens({ owner: exchange, tokens, blacklistedTokens: ['0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'] }) } } }) From 43108dee5119aba65781498b4718f20f9d087f3e Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:15:10 +0100 Subject: [PATCH 115/787] Fix: AlienBase-v3 (#12070) --- projects/alienbase-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/alienbase-v3/index.js b/projects/alienbase-v3/index.js index 8240ecdc52e7..84e9b10caa55 100644 --- a/projects/alienbase-v3/index.js +++ b/projects/alienbase-v3/index.js @@ -2,5 +2,5 @@ const { uniV3Export } = require('../helper/uniswapV3') const factory = '0x0Fd83557b2be93617c9C1C1B6fd549401C74558C' module.exports = uniV3Export({ - base: { factory, fromBlock: 7150708, }, + base: { factory, fromBlock: 7150708, permitFailure: true }, }) From 5569f86cfa92f2d836407d50a932610d5eb5cf8a Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Mon, 28 Oct 2024 13:41:43 +0000 Subject: [PATCH 116/787] add optimism and linea --- projects/logx-v2/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/logx-v2/index.js b/projects/logx-v2/index.js index 297e0ff3cf19..adc4a2f6c0a7 100644 --- a/projects/logx-v2/index.js +++ b/projects/logx-v2/index.js @@ -13,7 +13,9 @@ const config = { sei: ['0xc010f83ae18dC5f40e888898F6605F075686432e','0x0B3b4FAFDe8baFde82C3BfD38538B7aEe4407498'], scroll: ['0x1C70cc9F8236C4Ae2ce3d34d4Da4696Aea611f90','0xcfFe53CEd05A750Fa58304c11997a0335dE731b6'], kroma: ['0xaca5146bc74230e77DAB543d3a14F26c8c63939e','0x1e7c3B771b27A29116E4Df5a2DCC54FDaAC902db'], - taiko: ['0x650e8941E4d90b70576fDF1b05dbDc962DA2cab8','0x1d9B044393804CCFa2da3127470C9F65D4E0E5E6'] + taiko: ['0x650e8941E4d90b70576fDF1b05dbDc962DA2cab8','0x1d9B044393804CCFa2da3127470C9F65D4E0E5E6'], + optimism: ['0x650e8941E4d90b70576fDF1b05dbDc962DA2cab8','0x4417613C0fe034f7D333BF8a6247EaAAF1d51965'], + linea: ['0xaca5146bc74230e77DAB543d3a14F26c8c63939e','0x1e7c3B771b27A29116E4Df5a2DCC54FDaAC902db'] } Object.keys(config).forEach(chain => { From 1a00106b63d677d7158ec3a7032e6317f45e1d2a Mon Sep 17 00:00:00 2001 From: santino <83203265+santinoYoung@users.noreply.github.com> Date: Mon, 28 Oct 2024 22:20:50 +0800 Subject: [PATCH 117/787] update desyn core chain strategy pool (#12050) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/desyn-farm/index.js | 18 +++++++++++++++++- projects/desyn-farm1/index.js | 34 ++++++++++++++++++++++++++-------- projects/desyn/index.js | 5 +++-- 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/projects/desyn-farm/index.js b/projects/desyn-farm/index.js index 9e773382f8de..b87569fa867f 100644 --- a/projects/desyn-farm/index.js +++ b/projects/desyn-farm/index.js @@ -9,6 +9,10 @@ const config = { merlin: { factory: '0x790b4ee7998A93702f29e56f8b615eF35BE5af43', fromBlock: 11260440}, } +const abi = { + getBalance: "function getBalance(address) view returns (uint256)" +} + Object.keys(config).forEach(chain => { const {factory, fromBlock, } = config[chain] module.exports[chain] = { @@ -20,9 +24,21 @@ Object.keys(config).forEach(chain => { onlyArgs: true, fromBlock, }) + const pools = logs.map(i=>i.pool) const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools}) - return api.sumTokens({ ownerTokens: tokens.map((tokens, i) => [tokens, pools[i]])}) + const calls = [] + const allTokens = [] + let i = 0 + for (const pool of pools) { + for (const token of tokens[i]) { + calls.push({ target: pool, params: token }) + allTokens.push(token) + } + i++ + } + const allBals = await api.multiCall({ abi: abi.getBalance, calls }) + api.add(allTokens, allBals) } } }) \ No newline at end of file diff --git a/projects/desyn-farm1/index.js b/projects/desyn-farm1/index.js index 98c47f0894ad..ace2e44e8938 100644 --- a/projects/desyn-farm1/index.js +++ b/projects/desyn-farm1/index.js @@ -2,17 +2,23 @@ const { getLogs } = require('../helper/cache/getLogs') module.exports = { methodology: 'On-chain restaking', + doublecounted: true } const config = { - btr: { factory: '0x09eFC8C8F08B810F1F76B0c926D6dCeb37409665', fromBlock: 2393247}, - mode: { factory: '0x09Dfee598d5217da799bEAd56206beC0fDB0D17B', fromBlock: 9912410}, - zklink: { factory: '0xCCA610644f19d7d8f96b90a896B160f54cBE3204', fromBlock: 4734230}, - core: { factory: '0x5C3027D8Cb28A712413553206A094213337E88c5', fromBlock: 17552799} + btr: { factory: '0x09eFC8C8F08B810F1F76B0c926D6dCeb37409665', fromBlock: 2393247 }, + mode: { factory: '0x09Dfee598d5217da799bEAd56206beC0fDB0D17B', fromBlock: 9912410 }, + zklink: { factory: '0xCCA610644f19d7d8f96b90a896B160f54cBE3204', fromBlock: 4734230 }, + core: { factory: '0x5C3027D8Cb28A712413553206A094213337E88c5', fromBlock: 17552799 } + +} + +const abi = { + getBalance: "function getBalance(address) view returns (uint256)" } Object.keys(config).forEach(chain => { - const {factory, fromBlock, } = config[chain] + const { factory, fromBlock, } = config[chain] module.exports[chain] = { tvl: async (api) => { const logs = await getLogs({ @@ -22,9 +28,21 @@ Object.keys(config).forEach(chain => { onlyArgs: true, fromBlock, }) - const pools = logs.map(i=>i.pool) - const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools}) - return api.sumTokens({ ownerTokens: tokens.map((tokens, i) => [tokens, pools[i]])}) + + const pools = logs.map(i => i.pool) + const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools }) + const calls = [] + const allTokens = [] + let i = 0 + for (const pool of pools) { + for (const token of tokens[i]) { + calls.push({ target: pool, params: token }) + allTokens.push(token) + } + i++ + } + const allBals = await api.multiCall({ abi: abi.getBalance, calls }) + api.add(allTokens, allBals) } } }) \ No newline at end of file diff --git a/projects/desyn/index.js b/projects/desyn/index.js index 75f12cba8437..a2fbc83e3e4a 100644 --- a/projects/desyn/index.js +++ b/projects/desyn/index.js @@ -1,11 +1,10 @@ +const sdk = require('@defillama/sdk') const { getLogs } = require('../helper/cache/getLogs') module.exports = { doublecounted: true, hallmarks: [ [1719734400, "Launched on Merlin Chain"], - [1718092800, "DeSyn KelpDAO Restaking Fund Launched"], - [1713340800, "Restaking Fund Series Launched"], ], methodology: 'Liquid restaking strategy', } @@ -21,6 +20,7 @@ const config = { Object.keys(config).forEach(chain => { const {factory, fromBlock, } = config[chain] + module.exports[chain] = { tvl: async (api) => { const logs = await getLogs({ @@ -30,6 +30,7 @@ Object.keys(config).forEach(chain => { onlyArgs: true, fromBlock, }) + const pools = logs.map(i=>i.pool) const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools}) return api.sumTokens({ ownerTokens: tokens.map((tokens, i) => [tokens, pools[i]])}) From d55e1a376f4e10b0f345c2f6814d08f018a9a0a9 Mon Sep 17 00:00:00 2001 From: Fisclend Date: Mon, 28 Oct 2024 22:23:47 +0800 Subject: [PATCH 118/787] create FiscLend adapter (#12077) --- projects/fisclend/index.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 projects/fisclend/index.js diff --git a/projects/fisclend/index.js b/projects/fisclend/index.js new file mode 100644 index 000000000000..4730fc90a45f --- /dev/null +++ b/projects/fisclend/index.js @@ -0,0 +1,6 @@ +const { compoundExports2 } = require('../helper/compound') + +module.exports = { + apechain: compoundExports2({comptroller: '0xd11443B079D62700061F7311fC48C40B30BCEA91', cether: '0xB1974B31b60C7134978e5574F5f1fC8A16535b5D'}), + wc: compoundExports2({comptroller: '0xE3de48DCF4968B419BB55421D6B5bF2c049DaFB2', cether: '0xCD04992D1D8d42BB432AD794103c3B498016Da88'}), +} From 7bc43eba032cf6d0dda9ff76ce4cc59bfc4079ec Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Mon, 28 Oct 2024 14:46:08 +0000 Subject: [PATCH 119/787] zkl staking --- projects/zkLink/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/zkLink/index.js b/projects/zkLink/index.js index 3c3ec06b6055..b567f98bf22a 100644 --- a/projects/zkLink/index.js +++ b/projects/zkLink/index.js @@ -1,5 +1,6 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); const ADDRESSES = require("../helper/coreAssets.json"); +const { staking } = require("../helper/staking.js"); const config = { ethereum: { @@ -134,3 +135,7 @@ async function tvl(api) { Object.keys(config).forEach(async chain => { module.exports[chain] = { tvl } }) +module.exports.ethereum.staking = staking( + '0xAd16eDCF7DEB7e90096A259c81269d811544B6B6', + '0xfC385A1dF85660a7e041423DB512f779070FCede' +); \ No newline at end of file From fa7467627c1d6116e772e9a666c2515b2b9f8d22 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:59:58 +0100 Subject: [PATCH 120/787] split helix --- projects/helper/chain/rpcProxy.js | 10 ++++- .../injective-orderbook-derivatives/index.js | 8 ++++ projects/injective-orderbook/index.js | 8 ++-- projects/injective-orderbook/util.js | 39 +++++++++++++++++++ 4 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 projects/injective-orderbook-derivatives/index.js create mode 100644 projects/injective-orderbook/util.js diff --git a/projects/helper/chain/rpcProxy.js b/projects/helper/chain/rpcProxy.js index 0c7d94807449..203d0308cb6f 100644 --- a/projects/helper/chain/rpcProxy.js +++ b/projects/helper/chain/rpcProxy.js @@ -24,6 +24,14 @@ module.exports = { mitoVaultQuery: async ({ address }) => { const { data } = await client.get('/injective/mito-vault/' + address) return data - } + }, + getMarkets: async (body) => { + const { data } = await client.post('/injective/orderbook/markets', body) + return data + }, + getOrders: async (body) => { + const { data } = await client.post('/injective/orderbook/orders', body) + return data + }, }, } \ No newline at end of file diff --git a/projects/injective-orderbook-derivatives/index.js b/projects/injective-orderbook-derivatives/index.js new file mode 100644 index 000000000000..0cb6ae2e8d8c --- /dev/null +++ b/projects/injective-orderbook-derivatives/index.js @@ -0,0 +1,8 @@ +const { getOrderBookTvl, TYPES } = require('../injective-orderbook/util') + +module.exports = { + timetravel: false, + injective: { + tvl: getOrderBookTvl(TYPES.DERIVATIVES), + } +} \ No newline at end of file diff --git a/projects/injective-orderbook/index.js b/projects/injective-orderbook/index.js index 4be227fa2a05..0eef6ddc69a4 100644 --- a/projects/injective-orderbook/index.js +++ b/projects/injective-orderbook/index.js @@ -1,6 +1,8 @@ -const { getExports } = require('../helper/heroku-api') +const { getOrderBookTvl, TYPES } = require('./util') module.exports = { timetravel: false, - ...getExports("injective-orderbook", ['injective']), -} + injective: { + tvl: getOrderBookTvl(TYPES.SPOT), + } +} \ No newline at end of file diff --git a/projects/injective-orderbook/util.js b/projects/injective-orderbook/util.js new file mode 100644 index 000000000000..8a0d89ff562c --- /dev/null +++ b/projects/injective-orderbook/util.js @@ -0,0 +1,39 @@ +const { injective: { getMarkets, getOrders } } = require('../helper/chain/rpcProxy') + +const TYPES = { + BANK: 'BANK', + SPOT: 'SPOT', + DERIVATIVES: 'DERIVATIVES', +} + +function getOrderBookTvl(typeStr) { + return async (api) => { + const markets = await getMarkets({ type: typeStr }) + const orders = await getOrders({ type: typeStr, marketIds: markets.map(i => i.marketId) }) + const marketObj = {} + for (const market of markets) + marketObj[market.marketId] = market + + for (const order of orders) marketObj[order.marketId].orderbook = order.orderbook + for (const { quoteDenom, baseDenom, orderbook: { buys, sells, } } of markets) { + for (const { price, quantity } of buys) + api.add(quoteDenom, Math.floor(quantity * price)) + + for (const { quantity } of sells) { + + if (typeStr === TYPES.SPOT) { + api.add(baseDenom, Math.floor(quantity)) + } else if (typeStr === TYPES.DERIVATIVES) { + const price = buys.length ? buys[0].price : 0 + api.add(quoteDenom, Math.floor(quantity * price)) + } + } + } + return api.getBalances() + } +} + +module.exports = { + TYPES, + getOrderBookTvl +} \ No newline at end of file From 578c0e1da3eafabc047fefb538d9bc0fe0d680fb Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:17:33 +0100 Subject: [PATCH 121/787] minor fix #12066 --- .../index.js | 2 +- projects/injective-orderbook/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename projects/{injective-orderbook-derivatives => injective-orderbook-spot}/index.js (75%) diff --git a/projects/injective-orderbook-derivatives/index.js b/projects/injective-orderbook-spot/index.js similarity index 75% rename from projects/injective-orderbook-derivatives/index.js rename to projects/injective-orderbook-spot/index.js index 0cb6ae2e8d8c..75da5bb07c98 100644 --- a/projects/injective-orderbook-derivatives/index.js +++ b/projects/injective-orderbook-spot/index.js @@ -3,6 +3,6 @@ const { getOrderBookTvl, TYPES } = require('../injective-orderbook/util') module.exports = { timetravel: false, injective: { - tvl: getOrderBookTvl(TYPES.DERIVATIVES), + tvl: getOrderBookTvl(TYPES.SPOT), } } \ No newline at end of file diff --git a/projects/injective-orderbook/index.js b/projects/injective-orderbook/index.js index 0eef6ddc69a4..7a7a4304fd2e 100644 --- a/projects/injective-orderbook/index.js +++ b/projects/injective-orderbook/index.js @@ -3,6 +3,6 @@ const { getOrderBookTvl, TYPES } = require('./util') module.exports = { timetravel: false, injective: { - tvl: getOrderBookTvl(TYPES.SPOT), + tvl: getOrderBookTvl(TYPES.DERIVATIVES), } } \ No newline at end of file From 97c51d620e6def061768effb38f038cd1a52ced3 Mon Sep 17 00:00:00 2001 From: nuhbye Date: Mon, 28 Oct 2024 22:31:48 +0530 Subject: [PATCH 122/787] Added another pool to tonpools (#12079) --- projects/tonpools/index.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/projects/tonpools/index.js b/projects/tonpools/index.js index 3b616676e773..65889d5c44f9 100644 --- a/projects/tonpools/index.js +++ b/projects/tonpools/index.js @@ -1,11 +1,19 @@ -const { sumTokensExport } = require('../helper/chain/ton') +const { sumTokensExport } = require("../helper/chain/ton"); const ADDRESSES = require("../helper/coreAssets.json"); -const tonpoolsContractAddress = "EQA7y9QkiP4xtX_BhOpY4xgVlLM7LPcYUA4QhBHhFZeL4fTa"; +const tonpoolsContractAddress = + "EQA7y9QkiP4xtX_BhOpY4xgVlLM7LPcYUA4QhBHhFZeL4fTa"; + +const tonpoolUSDTContractAddress = + "EQDrSz9W4tjwnqy1F4z-O4Vkdp8g2YP94cmh12X5RbYpejCw"; module.exports = { methodology: "Ton Pools's TVL includes all deposited supported assets", ton: { - tvl: sumTokensExport({ owner: tonpoolsContractAddress, tokens: [ADDRESSES.null] }), + tvl: sumTokensExport({ + owners: [tonpoolsContractAddress, tonpoolUSDTContractAddress], + tokens: [ADDRESSES.null], + }), }, -} +}; + From ee692a1120c8c404193b02a811fea690a5d0d753 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:05:04 +0100 Subject: [PATCH 123/787] Fix: Rebalance (#12083) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/rebalance/index.js | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/projects/rebalance/index.js b/projects/rebalance/index.js index e3a1da99e30f..1ba5accb8104 100644 --- a/projects/rebalance/index.js +++ b/projects/rebalance/index.js @@ -1,24 +1,32 @@ -const { sumERC4626VaultsExport } = require('../helper/erc4626'); const config = { arbitrum: [ - '0xCF86c768E5b8bcc823aC1D825F56f37c533d32F9', // rUSDT - '0x6eAFd6Ae0B766BAd90e9226627285685b2d702aB', // rUSDC - '0xa8aae282ab2e57B8E39ad2e70DA3566d315348A9', // rUSDC.e - '0xcd5357A4F48823ebC86D17205C12B0B268d292a7', // rWETH - '0x5A0F7b7Ea13eDee7AD76744c5A6b92163e51a99a', // rDAI - '0x3BCa6513BF284026b4237880b4e4D60cC94F686c', // rFRAX + "0xCF86c768E5b8bcc823aC1D825F56f37c533d32F9", // rUSDT + "0x6eAFd6Ae0B766BAd90e9226627285685b2d702aB", // rUSDC + "0xa8aae282ab2e57B8E39ad2e70DA3566d315348A9", // rUSDC.e + "0xcd5357A4F48823ebC86D17205C12B0B268d292a7", // rWETH + "0x5A0F7b7Ea13eDee7AD76744c5A6b92163e51a99a", // rDAI + "0x3BCa6513BF284026b4237880b4e4D60cC94F686c", // rFRAX ], }; +const abi = "function getDepositBalance(address user, address vault) view returns (uint256 balance)"; + module.exports = { - methodology: - 'TVL displays the total amount of assets stored in the REBALANCE vault contracts.', + methodology: "TVL displays the total amount of assets stored in the REBALANCE vault contracts.", start: 1712143874, - hallmarks: [[1712143874, 'Profitable vaults deployment']], + hallmarks: [[1712143874, "Profitable vaults deployment"]], }; Object.keys(config).forEach((chain) => { - module.exports[chain] = { - tvl: sumERC4626VaultsExport({ vaults: config[chain], isOG4626: true }), - }; -}); \ No newline at end of file + module.exports[chain] = { tvl: (api) => tvl(api, config[chain]) }; +}); + +const tvl = async (api, vaults) => { + const [providers, assets] = await Promise.all([ + api.multiCall({ calls: vaults, abi: "address:activeProvider" }), + api.multiCall({ calls: vaults, abi: "address:asset" }), + ]); + + const balances = await api.multiCall({ calls: vaults.map((vault, i) => ({ target: providers[i], params: [vault, vault] })), abi }) + api.add(assets, balances) +}; From f1cd749d62aaa8bb4a495309316664521e8237bd Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:06:32 +0100 Subject: [PATCH 124/787] Fix: Lila-Finance (#12082) --- projects/lila-finance/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/lila-finance/index.js b/projects/lila-finance/index.js index 5a0817457045..dbc86ded8a52 100644 --- a/projects/lila-finance/index.js +++ b/projects/lila-finance/index.js @@ -10,7 +10,7 @@ async function tvl(api) { data = data.filter(i => i.strategy !== ADDRESSES.null) const aTokens = await api.multiCall({ abi: 'address:aToken', calls: data.map(i => i.strategy)}) const ownerTokens = data.map((i, idx) => [[i.asset, aTokens[idx]], i.strategy]) - return api.sumTokens({ ownerTokens }) + return api.sumTokens({ ownerTokens, blacklistedTokens: ['0x42c248d137512907048021b30d9da17f48b5b7b2'] }) } module.exports = { From de47364ec6cbdc3dea059a9e68bb2b5fc9d12f86 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:11:41 +0100 Subject: [PATCH 125/787] add cables RFQ #12081 --- projects/cables/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/cables/index.js diff --git a/projects/cables/index.js b/projects/cables/index.js new file mode 100644 index 000000000000..748416239de5 --- /dev/null +++ b/projects/cables/index.js @@ -0,0 +1,19 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') +const config = { + avax: { + owners: [ + '0xfA12DCB2e1FD72bD92E8255Db6A781b2c76adC20', + ], + }, + arbitrum: { + owners: [ + '0xfA12DCB2e1FD72bD92E8255Db6A781b2c76adC20', + ], + } +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: sumTokensExport({ ...config[chain], fetchCoValentTokens: true, }) + } +}) \ No newline at end of file From 841d411b22b098b302d51fb0cf3047e31ab563ee Mon Sep 17 00:00:00 2001 From: Sam Bugs <101145325+0xsambugs@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:43:32 -0300 Subject: [PATCH 126/787] feat: add support for base to balmy/mean finance (#12084) --- projects/meanfinance/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/meanfinance/index.js b/projects/meanfinance/index.js index 3be9d2b6e73b..0fa35f6c9d6d 100644 --- a/projects/meanfinance/index.js +++ b/projects/meanfinance/index.js @@ -67,6 +67,7 @@ module.exports = { moonbeam: getV2TvlObject('moonbeam'), avax: getV2TvlObject('avax'), rsk: getV2TvlObject('rsk'), + base: getV2TvlObject('base'), hallmarks: [ [1650082958, "Protocol is paused due to non-critical vulnerability"], [1654057358, "Deployment on Optimism"], From 8c67506decf7a08fbba07a2ccf85e5418012eb59 Mon Sep 17 00:00:00 2001 From: LeeRyanj <138840879+LeeRyanj@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:50:35 +0800 Subject: [PATCH 127/787] add base configs (#12090) --- projects/kiloex/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index 5aeb75e0c656..c6dc47d6a15a 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -8,6 +8,7 @@ const manta_stone_token = "0xEc901DA9c68E90798BbBb74c11406A32A70652C3"; const manat_manta_token = "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5"; const taiko_owners = ["0x735D00A9368164B9dcB2e008d5Cd15b367649aD5", "0x235C5C450952C12C8b815086943A7bBCF96bc619","0x2646E743A8F47b8d2427dBcc10f89e911f2dBBaa"]; const bsquared_owners = ["0xA2E2F3726DF754C1848C8fd1CbeA6aAFF84FC5B2", "0x1EbEd4024308afcb05E6938eF8Ebd1ec5d6E8C46","0xB20Faa4BA0DdEbDe49299557f4F1ebB5532745e3"]; +const base_owners = ["0x43E3E6FFb2E363E64cD480Cbb7cd0CF47bc6b477", "0x7BC8D56cC78cF467C7230B77De0fcBDea9ac44cE","0xdf5ACC616cD3ea9556EC340a11B54859a393ebBB"]; module.exports = { start: 1690971144, @@ -51,4 +52,11 @@ module.exports = { ADDRESSES.bsquared.UBTC,//uBTC ] }) }, + base: { + tvl: sumTokensExport({ owners: base_owners, tokens: [ + ADDRESSES.base.USDC, //USDC + '0x3b86ad95859b6ab773f55f8d94b4b9d443ee931f', //SolvBTC + '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf',//cbBTC + ] }) + }, }; From 0b4ef92856d012c1d3abade98e21f9498092889e Mon Sep 17 00:00:00 2001 From: MD Date: Tue, 29 Oct 2024 05:51:39 +0100 Subject: [PATCH 128/787] add volatile factory on real (#12089) --- projects/impermax/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/impermax/index.js b/projects/impermax/index.js index c48c0a9d644f..46a56594132d 100644 --- a/projects/impermax/index.js +++ b/projects/impermax/index.js @@ -74,7 +74,8 @@ const config = { }, real: { factories: [ - '0x3b1f3a48a70e372144307a4b126a5cda46e169ad' + '0x3b1f3a48a70e372144307a4b126a5cda46e169ad', + '0x2944e1544cE201ae19e6385490bBA13DaA5f44e4' ] } } From f32d981c3effc8426c7a39752edb9f909d9c54bd Mon Sep 17 00:00:00 2001 From: irlpotato <166589843+irlpotato@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:02:34 +0800 Subject: [PATCH 129/787] feat: update treehouse adapter to reflect mantle tvl (#12087) --- projects/treehouse/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/treehouse/index.js b/projects/treehouse/index.js index 138d9d45a824..449f13ba0b60 100644 --- a/projects/treehouse/index.js +++ b/projects/treehouse/index.js @@ -43,11 +43,18 @@ async function tvl(api) { }) } +async function tvlMantle(api) { + return api.sumTokens({ owner: '0x5E4ACCa7a9989007cD74aE4ed1b096c000779DCC', tokens: ['0xE6829d9a7eE3040e1276Fa75293Bde931859e8fA'] }) +} + module.exports = { methodology: 'Token balance in vault and strategy contracts', start: 1725926400, // Tuesday, September 10, 2024 12:00:00 AM, hallmarks: [[1727218691, "TVL Cap Raise 1"],[1729045223, "TVL Cap Raise 2"]], ethereum: { tvl, + }, + mantle: { + tvl: tvlMantle } } \ No newline at end of file From 78bc7ad01018d07764a075a1909765500cf91ce7 Mon Sep 17 00:00:00 2001 From: Ncookie Date: Tue, 29 Oct 2024 01:04:21 -0400 Subject: [PATCH 130/787] PoolTogether V5 Update (#12086) --- projects/pooltogether-v5/index.js | 2 +- projects/pooltogether/index.js | 6 +++--- projects/pooltogether/v5.js | 19 ++++++++++++++++--- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/projects/pooltogether-v5/index.js b/projects/pooltogether-v5/index.js index 879280fd6d63..914ca37adf2e 100644 --- a/projects/pooltogether-v5/index.js +++ b/projects/pooltogether-v5/index.js @@ -1,6 +1,6 @@ const { tvl } = require('../pooltogether/v5.js') -const chains = ['optimism', 'base', 'arbitrum'] +const chains = ['optimism', 'base', 'arbitrum', 'ethereum', 'scroll', 'xdai'] module.exports = { doublecounted: true, diff --git a/projects/pooltogether/index.js b/projects/pooltogether/index.js index a85f11886843..8762e66ea9b4 100644 --- a/projects/pooltogether/index.js +++ b/projects/pooltogether/index.js @@ -6,9 +6,9 @@ module.exports = { doublecounted: true, hallmarks: [ [1_634_320_800, 'V4 Launch'], - [1_658_872_800, 'V4 OP Rewards Begin'], - [1_669_615_200, 'V4 OP Rewards Extended'], - [1_697_738_400, 'V5 Launch'] + [1_693_453_300, 'V5 Beta Launch'], + [1_697_738_400, 'V5 Canary Launch'], + [1_713_399_300, 'V5 Launch'] ], methodology: `TVL is the total tokens deposited in PoolTogether` } diff --git a/projects/pooltogether/v5.js b/projects/pooltogether/v5.js index b69a502a81ab..514d2c3765b6 100644 --- a/projects/pooltogether/v5.js +++ b/projects/pooltogether/v5.js @@ -2,9 +2,21 @@ const abi = require('./abi.json') const { sumTokens2 } = require('../helper/unwrapLPs') const V5_VAULT_FACTORIES = { - optimism: ['0xF65FA202907D6046D1eF33C521889B54BdE08081', '0x6B17EE3a95BcCd605340454c5919e693Ef8EfF0E', '0xF0F151494658baE060034c8f4f199F74910ea806', '0x0C379e9b71ba7079084aDa0D1c1Aeb85d24dFD39'], - base: ['0xE32F6344875494ca3643198d87524519Dc396DDf'], - arbitrum: ['0x44Be003E55e7cE8a2e0ECC3266f8a9A9de2c07BC'] + optimism: ['0xF65FA202907D6046D1eF33C521889B54BdE08081', '0x6B17EE3a95BcCd605340454c5919e693Ef8EfF0E', '0xF0F151494658baE060034c8f4f199F74910ea806', '0x0C379e9b71ba7079084aDa0D1c1Aeb85d24dFD39', '0xec9f59bd06465b105e719c0b0483a4ed6a656775'], + base: ['0xE32F6344875494ca3643198d87524519Dc396DDf', '0xa55a74A457D8a24D68DdA0b5d1E0341746d444Bf'], + arbitrum: ['0x44Be003E55e7cE8a2e0ECC3266f8a9A9de2c07BC', '0x8020Fb37b21E0eF1707aDa7A914baf44F9045E52'], + ethereum: ['0x29c102109D6cb2D866CFEc380E0E10E9a287A75f', '0xd499CcF3e93F4cfb335Ac388E3C896D59cdDe7c3'], + scroll: ['0x3fdd8bFdF2F589c10C58457CDAE989C7943A30A5'], + xdai: ['0xc3aE3FE36A2645a93b2Fe350D81E80A14831e2A6'] +} + +const V5_NON_FACTORY_VAULTS = { + optimism: ['0xa52e38a9147f5ea9e0c5547376c21c9e3f3e5e1f'], + base: [], + arbitrum: [], + ethereum: [], + scroll: [], + xdai: [] } async function tvl(api) { @@ -15,6 +27,7 @@ async function tvl(api) { const _vaults = await api.fetchList({ lengthAbi: abi.totalVaults, itemAbi: abi.allVaults, target: factory }) vaults.push(..._vaults) } + vaults.push(...V5_NON_FACTORY_VAULTS[api.chain]) const tokens = await api.multiCall({ abi: abi.asset, calls: vaults }) const bals = await api.multiCall({ abi: abi.totalAssets, calls: vaults }) api.addTokens(tokens, bals) From b9db2c8e733ee19105f438ebff15c09d21460afe Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:43:32 +0100 Subject: [PATCH 131/787] track https://www.surge.trade --- projects/surge-trade/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/surge-trade/index.js diff --git a/projects/surge-trade/index.js b/projects/surge-trade/index.js new file mode 100644 index 000000000000..122506f68426 --- /dev/null +++ b/projects/surge-trade/index.js @@ -0,0 +1,5 @@ +const { sumTokensExport } = require('../helper/chain/radixdlt') + +module.exports = { + radixdlt: { tvl: sumTokensExport({ owner: 'component_rdx1crqujzfeukp9d565sh8usdnjsd8k30saa00h540vnwja7se8qqp8g7'}) }, +} \ No newline at end of file From 9a78eb7b3488e0535747ac9db81975381d3b33b9 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 29 Oct 2024 08:59:00 +0100 Subject: [PATCH 132/787] update surge trade --- projects/helper/chain/radixdlt.js | 3 ++- projects/surge-trade/index.js | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/projects/helper/chain/radixdlt.js b/projects/helper/chain/radixdlt.js index 84bd13960866..eaafd8f80c89 100644 --- a/projects/helper/chain/radixdlt.js +++ b/projects/helper/chain/radixdlt.js @@ -30,11 +30,12 @@ async function sumTokens({ owner, owners = [], api, transformLSU = false, }) { return fixBalances(api.getBalances()) } -async function queryAddresses({ addresses = [], }) { +async function queryAddresses({ addresses = [], miscQuery = {}}) { let items = [] const chunks = sliceIntoChunks(addresses, 20) for (const chunk of chunks) { const body = { + ...miscQuery, "addresses": chunk, "opt_ins": { "explicit_metadata": ["name"] } } diff --git a/projects/surge-trade/index.js b/projects/surge-trade/index.js index 122506f68426..9257be46e313 100644 --- a/projects/surge-trade/index.js +++ b/projects/surge-trade/index.js @@ -1,5 +1,14 @@ -const { sumTokensExport } = require('../helper/chain/radixdlt') +const { queryAddresses } = require('../helper/chain/radixdlt') module.exports = { - radixdlt: { tvl: sumTokensExport({ owner: 'component_rdx1crqujzfeukp9d565sh8usdnjsd8k30saa00h540vnwja7se8qqp8g7'}) }, -} \ No newline at end of file + radixdlt: { tvl }, +} + +async function tvl(api) { + const [{ details: { state }, fungible_resources }] = await queryAddresses({ addresses: ['component_rdx1crezrpxw9ypg6v2panqjqwevnwplg94yeej0rhqq9k7p4kgnltrc9g'], miscQuery: { "aggregation_level": "Vault" } }) + const stateObj = {} + state.fields.map(i => stateObj[i.field_name] = +i.value) + const poolAmount = parseFloat(fungible_resources.items[0].vaults.items[0].amount) + const tvl_usd = poolAmount + stateObj.virtual_balance + stateObj.unrealized_pool_funding + stateObj.pnl_snap + api.add('resource_rdx1t4upr78guuapv5ept7d7ptekk9mqhy605zgms33mcszen8l9fac8vf', tvl_usd) +} From 3e8169a69b84fb333e65b0d13f89039224e24049 Mon Sep 17 00:00:00 2001 From: calvin-bedrock <142883013+calvin-bedrock@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:24:35 +0800 Subject: [PATCH 133/787] Add Bedrock uniBTC (#12095) Co-authored-by: Calvin Crypto --- projects/bedrock/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/bedrock/index.js diff --git a/projects/bedrock/index.js b/projects/bedrock/index.js new file mode 100644 index 000000000000..9e9b9bb885af --- /dev/null +++ b/projects/bedrock/index.js @@ -0,0 +1,18 @@ +const { getConfig } = require('../helper/cache') +const { sumTokens } = require('../helper/chain/bitcoin') +const sdk = require('@defillama/sdk') + +const API_URL = 'https://bedrock-datacenter.rockx.com/uniBTC/reserve/address' + +async function tvl() { + const response = await getConfig('bedrock.btc_address', API_URL) + sdk.log(`API load completed: ${response.btc.length} addresses`) + return sumTokens({ owners: response.btc }) +} + +module.exports = { + timetravel: false, + bitcoin: { + tvl + } +} From 4c9bf7ce5f2a5fd2f598281e2f3c2f45c4fef09b Mon Sep 17 00:00:00 2001 From: 0xajing <163371347+0xajing@users.noreply.github.com> Date: Tue, 29 Oct 2024 19:30:36 +0800 Subject: [PATCH 134/787] Feat/lorenzo enzoBTC tvl (#12069) Co-authored-by: Leven Co-authored-by: lorenzo Co-authored-by: LevenR <156494841+LevenR@users.noreply.github.com> --- projects/lorenzo-enzoBTC/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/lorenzo-enzoBTC/index.js diff --git a/projects/lorenzo-enzoBTC/index.js b/projects/lorenzo-enzoBTC/index.js new file mode 100644 index 000000000000..b659942289ff --- /dev/null +++ b/projects/lorenzo-enzoBTC/index.js @@ -0,0 +1,16 @@ +const { sumTokens } = require('../helper/chain/bitcoin') + +const staticAddresses = [ + 'bc1qnvgmve5gs89ugf4n94jzqgan202dve5dtrj220', + '19wFRSr3GYHmVQtnmbkx7Wkjw3jZdyYB9a' +] +async function tvl() { + return sumTokens({ owners: staticAddresses }) +} + +module.exports = { + methodology: "enzoBTC, Lorenzo Wrapped Bitcoin", + bitcoin: { + tvl: tvl + } +}; \ No newline at end of file From 93d00b4f196fda4ec269b4b399dbc552383a8b55 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:42:36 +0100 Subject: [PATCH 135/787] solana: replace getTokenSupply --- projects/fluidity-money/index.js | 6 ++-- projects/helper/solana.js | 29 +++++++++++++------ projects/helper/utils/solana/layout.js | 3 +- .../utils/solana/layouts/mixed-layout.js | 12 +++++++- projects/ondofinance/index.js | 12 ++------ projects/openeden-tbill/index.js | 11 +++---- projects/ren/index.js | 11 ++++--- projects/vnx-rwa/index.js | 7 ++--- 8 files changed, 53 insertions(+), 38 deletions(-) diff --git a/projects/fluidity-money/index.js b/projects/fluidity-money/index.js index 530a1a9920a2..8acb56eb3c4a 100644 --- a/projects/fluidity-money/index.js +++ b/projects/fluidity-money/index.js @@ -1,5 +1,5 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); -const { getTokenSupply } = require("../helper/solana") +const { getTokenSupplies } = require("../helper/solana") const ATOKENS_ETHEREUM = ['0x028171bCA77440897B824Ca71D1c56caC55b68A3', '0x101cc05f4A51C0319f570d5E146a8C625198e636', '0xd4937682df3C8aEF4FE912A96A74121C0829E664']; const APOOL_ETHEREUM = ['0xFC66c25dbDb0606e7F9cA1d2754Eb0A0f8306dA9', '0x5E88f6dc0aa126FA28A137B24d0B4d7231352a0B', '0xB7a2930e66D84Da74CdcFE4f97FaE9fC8f1114e8']; const ATOKENS_ARBITRUM = ['0x6ab707Aca953eDAeFBc4fD23bA73294241490620', '0x625E7708f30cA75bfd92586e17077590C60eb4cD', '0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE', '0x724dc807b04555b71ed48a6896b6f41593b8c637']; @@ -19,8 +19,8 @@ async function tvl_arb(api) { async function tvl_sol(api) { const fUSDC = 'Ez2zVjw85tZan1ycnJ5PywNNxR6Gm4jbXQtZKyQNu3Lv' - const supply = await getTokenSupply(fUSDC) - api.add(fUSDC, supply * 1e6) + const res = await getTokenSupplies([fUSDC]) + api.add(fUSDC, res[fUSDC]) } module.exports = { diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 05f88094cb64..f138b63aaedb 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -50,14 +50,25 @@ function getProvider(chain = 'solana') { return provider; } -async function getTokenSupply(token) { - const tokenSupply = await http.post(endpoint(), { - jsonrpc: "2.0", - id: 1, - method: "getTokenSupply", - params: [token], - }); - return tokenSupply.result.value.uiAmount; +async function getTokenSupplies(tokens) { + const sleepTime = tokens.length > 2000 ? 2000 : 200 + const connection = getConnection() + tokens = tokens.map(i => typeof i === 'string' ? new PublicKey(i) : i) + const res = await runInChunks(tokens, chunk => connection.getMultipleAccountsInfo(chunk), { sleepTime }) + const response = {} + res.forEach((data, idx) => { + if (!data) { + sdk.log(`Invalid account: ${tokens[idx]}`) + return; + } + try { + data = decodeAccount('mint', data) + response[tokens[idx].toString()] = data.supply.toString() + } catch (e) { + sdk.log(`Error decoding account: ${tokens[idx]}`) + } + }) + return response } async function getTokenAccountBalances(tokenAccounts, { individual = false, allowError = false, chain = 'solana' } = {}) { @@ -355,7 +366,6 @@ async function runInChunks(inputs, fn, { chunkSize = 99, sleepTime } = {}) { module.exports = { endpoint: endpoint(), - getTokenSupply, getMultipleAccounts, exportDexTVL, getProvider, @@ -368,4 +378,5 @@ module.exports = { blacklistedTokens_default, getStakedSol, getSolBalanceFromStakePool, + getTokenSupplies, }; diff --git a/projects/helper/utils/solana/layout.js b/projects/helper/utils/solana/layout.js index 42e27acd27d9..e1cdfc402808 100644 --- a/projects/helper/utils/solana/layout.js +++ b/projects/helper/utils/solana/layout.js @@ -5,7 +5,7 @@ const { parsePhoenix } = require('./layouts/phoenix-dex') const { RAYDIUM_LIQUIDITY_STATE_LAYOUT_CLMM, RAYDIUM_STABLE_STATE_LAYOUT_V1, } = require('./layouts/raydium-layout') const { INVESTIN_FUND_DATA, } = require('./layouts/investin-layout') const { MARKET_STATE_LAYOUT_V3, OPEN_ORDERS_LAYOUT_V2, MARKET_STATE_LAYOUT_V3_MINIMAL } = require('./layouts/openbook-layout') -const { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, } = require('./layouts/mixed-layout'); +const { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, TOKEN_MINT_LAYOUT, } = require('./layouts/mixed-layout'); const { SCN_STAKE_POOL, TOKEN_LAYOUT, } = require("./layouts/scnSOL"); const { SANCTUM_INFINITY } = require("./layouts/sanctum-infinity-layout"); const { parseSanctumLstStateList } = require("./layouts/sanctum-validators-lsts-layout"); @@ -65,6 +65,7 @@ const customDecoders = { stakePool: defaultParseLayout(STAKE_POOL_LAYOUT), hhParlay: defaultParseLayout(PARLAY_LAYOUT_PARTIAL), hhPari: defaultParseLayout(HH_PARI_LAYOUT_PARTIAL), + tokenMint: defaultParseLayout(TOKEN_MINT_LAYOUT), } function decodeAccount(layout, accountInfo) { diff --git a/projects/helper/utils/solana/layouts/mixed-layout.js b/projects/helper/utils/solana/layouts/mixed-layout.js index 53962af37c5f..37047f0271ae 100644 --- a/projects/helper/utils/solana/layouts/mixed-layout.js +++ b/projects/helper/utils/solana/layouts/mixed-layout.js @@ -269,8 +269,18 @@ const HH_PARI_LAYOUT_PARTIAL = BufferLayout.struct([ BufferLayout.seq(u64(), u8().span, 'amounts'), ]); +const TOKEN_MINT_LAYOUT = struct([ + u8('mintAuthorityOption'), + u8('mintAuthority'), + u64('supply'), + u8('decimals'), + u8('isInitialized'), + u8('freezeAuthorityOption'), + u8('freezeAuthority'), +]); + module.exports = { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, - PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, + PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, TOKEN_MINT_LAYOUT, } diff --git a/projects/ondofinance/index.js b/projects/ondofinance/index.js index 62f1c3ce369a..4618e1e782ef 100644 --- a/projects/ondofinance/index.js +++ b/projects/ondofinance/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { getTokenSupply } = require("../helper/solana"); +const { getTokenSupplies } = require("../helper/solana"); const sui = require("../helper/chain/sui"); const { aQuery } = require("../helper/chain/aptos"); const { get } = require("../helper/http"); @@ -53,14 +53,8 @@ Object.keys(config).forEach((chain) => { tvl: async (api) => { let supplies; if (chain === "solana") { - supplies = await Promise.all(fundAddresses.map(getTokenSupply)).catch( - (error) => { - throw error; - } - ); - - const scaledSupplies = supplies.map((supply) => supply * 1_000_000); - api.addTokens(fundAddresses, scaledSupplies); + supplies = await getTokenSupplies(fundAddresses) + api.addTokens(Object.keys(supplies), Object.values(supplies)); } else if (chain === "sui") { let usdySupply = await getUSDYTotalSupplySUI(); api.addTokens(fundAddresses, [usdySupply]); diff --git a/projects/openeden-tbill/index.js b/projects/openeden-tbill/index.js index 6b102e529d53..b917bf45ccc1 100644 --- a/projects/openeden-tbill/index.js +++ b/projects/openeden-tbill/index.js @@ -1,7 +1,5 @@ -const { getCache, } = require("../helper/cache"); -const { getTokenSupply } = require('../helper/solana') +const { getTokenSupplies } = require('../helper/solana') const { ripple } = require('../helper/chain/rpcProxy') -const ADDRESSES = require('../helper/coreAssets.json') const tbill = "0xdd50C053C096CB04A3e3362E2b622529EC5f2e8a" const solTbill = '4MmJVdwYN8LwvbGeCowYjSx7KoEi6BJWg8XXnW4fDDp6' @@ -17,8 +15,11 @@ async function evmTvl(api) { } async function solTvl (api) { - const tvl = (await getTokenSupply(solTbill) * 10 ** 6) - api.add(solTbill, tvl) + const res = await getTokenSupplies([solTbill]) + console.log(res) + Object.entries(res).forEach(([token, balance]) => { + api.add(token, balance) + }) } async function ripplTvl (api) { diff --git a/projects/ren/index.js b/projects/ren/index.js index e52debcd52bb..a7aa4ac429df 100644 --- a/projects/ren/index.js +++ b/projects/ren/index.js @@ -1,7 +1,6 @@ const ADDRESSES = require('../helper/coreAssets.json') const { request, gql } = require("graphql-request"); const sdk = require("@defillama/sdk"); -const { getTokenSupply } = require('../helper/solana') const ethGraphUrl = sdk.graph.modifyEndpoint('AJaQdD8DUunuwHCbAsZk5h62AfyNG1etRtK9EcDH7gwH'); const bscGraphUrl = @@ -152,20 +151,17 @@ async function solana() { ["renLUNA", "8wv2KAykQstNAj2oW6AHANGBiFKVFhvMiyyzzjhkmGvE"], ] const balances = {} - await Promise.all(tokens.map(async token => { - balances[symbol(token[0])] = await getTokenSupply(token[1]) - })) return balances } module.exports = { - solana: { + solana: { tvl: solana }, ethereum: { tvl: eth, }, - avax:{ + avax: { tvl: avax, }, bsc: { @@ -187,3 +183,6 @@ module.exports = { tvl: optimism }, }; + + +Object.values(module.exports).forEach(chainExports => chainExports.tvl = () => ({})) diff --git a/projects/vnx-rwa/index.js b/projects/vnx-rwa/index.js index 11f015f84518..5dc8b3d7620f 100644 --- a/projects/vnx-rwa/index.js +++ b/projects/vnx-rwa/index.js @@ -1,4 +1,4 @@ -const { getTokenSupply } = require("../helper/solana"); +const { getTokenSupplies } = require("../helper/solana"); const fetch = require('node-fetch'); const ASSETS = { @@ -58,9 +58,8 @@ const fetchStellarSupply = async (asset) => { }; const solanaTvl = async (api, assets) => { - const supplies = await Promise.all(assets.map(getTokenSupply)); - const scaledSupplies = supplies.map((supply) => supply * 1e9); - api.add(assets, scaledSupplies); + const supplies = await getTokenSupplies(assets) + api.addTokens(Object.keys(supplies), Object.values(supplies)); }; const stellarTvl = async (api, assets) => { From 377375db51dbfd1d4bc31609247f15bc52186ae5 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:46:51 +0000 Subject: [PATCH 136/787] deribit PoR (#12099) --- projects/deribit/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/deribit/index.js b/projects/deribit/index.js index 20910881e941..ba368589db61 100644 --- a/projects/deribit/index.js +++ b/projects/deribit/index.js @@ -66,4 +66,4 @@ const config = { } module.exports = cexExports(config) -module.exports.methodology = 'This wallets where collect from here https://insights.deribit.com/exchange-updates/deribit-wallet-holdings/' +module.exports.methodology = 'This wallets where collect from here https://insights.deribit.com/exchange-updates/proof-of-reserves-deribit/' From 9ac9a21ae2523334eaa995b3fd3a39a106c98107 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:15:45 +0100 Subject: [PATCH 137/787] merge rabbitx and blastfutures --- projects/blastfutures/index.js | 5 +++-- projects/helper/solana.js | 13 +++++++------ projects/helper/utils/solana/layout.js | 3 +-- .../helper/utils/solana/layouts/mixed-layout.js | 12 +----------- projects/rabbitx/index.js | 4 ++++ 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/projects/blastfutures/index.js b/projects/blastfutures/index.js index 291de1720549..08bda7642f66 100644 --- a/projects/blastfutures/index.js +++ b/projects/blastfutures/index.js @@ -4,7 +4,8 @@ const { staking } = require('../helper/staking') module.exports = { blast: { - tvl: sumTokensExport({ owner: '0x3Ba925fdeAe6B46d0BB4d424D829982Cb2F7309e', tokens: [ADDRESSES.blast.USDB, ADDRESSES.blast.WETH]}), - staking: staking('0x67dBA61709D78806395acDBa3EF9Df686aF5dc24', '0x236bb48fcF61ce996B2C8C196a9258c176100c7d'), + // tvl: sumTokensExport({ owner: '0x3Ba925fdeAe6B46d0BB4d424D829982Cb2F7309e', tokens: [ADDRESSES.blast.USDB, ADDRESSES.blast.WETH]}), + // staking: staking('0x67dBA61709D78806395acDBa3EF9Df686aF5dc24', '0x236bb48fcF61ce996B2C8C196a9258c176100c7d'), + tvl: () => ({}) // moved to rabbitx }, } diff --git a/projects/helper/solana.js b/projects/helper/solana.js index f138b63aaedb..1566b784c738 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -22,7 +22,8 @@ const blacklistedTokens_default = [ '5fTwKZP2AK39LtFN9Ayppu6hdCVKfMGVm79F2EgHCtsi', //WHEY ] -let connection, provider +let connection = {} +let provider = {} const endpoint = (isClient) => { if (isClient) return getEnv('SOLANA_RPC_CLIENT') ?? getEnv('SOLANA_RPC') @@ -36,18 +37,18 @@ const endpointMap = { } function getConnection(chain = 'solana') { - if (!connection) connection = new Connection(endpointMap[chain](true)) - return connection + if (!connection[chain]) connection[chain] = new Connection(endpointMap[chain](true)) + return connection[chain] } function getProvider(chain = 'solana') { - if (!provider) { + if (!provider[chain]) { const dummy_keypair = Keypair.generate(); const wallet = new Wallet(dummy_keypair); - provider = new Provider(getConnection(chain), wallet) + provider[chain] = new Provider(getConnection(chain), wallet) } - return provider; + return provider[chain] } async function getTokenSupplies(tokens) { diff --git a/projects/helper/utils/solana/layout.js b/projects/helper/utils/solana/layout.js index e1cdfc402808..42e27acd27d9 100644 --- a/projects/helper/utils/solana/layout.js +++ b/projects/helper/utils/solana/layout.js @@ -5,7 +5,7 @@ const { parsePhoenix } = require('./layouts/phoenix-dex') const { RAYDIUM_LIQUIDITY_STATE_LAYOUT_CLMM, RAYDIUM_STABLE_STATE_LAYOUT_V1, } = require('./layouts/raydium-layout') const { INVESTIN_FUND_DATA, } = require('./layouts/investin-layout') const { MARKET_STATE_LAYOUT_V3, OPEN_ORDERS_LAYOUT_V2, MARKET_STATE_LAYOUT_V3_MINIMAL } = require('./layouts/openbook-layout') -const { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, TOKEN_MINT_LAYOUT, } = require('./layouts/mixed-layout'); +const { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, } = require('./layouts/mixed-layout'); const { SCN_STAKE_POOL, TOKEN_LAYOUT, } = require("./layouts/scnSOL"); const { SANCTUM_INFINITY } = require("./layouts/sanctum-infinity-layout"); const { parseSanctumLstStateList } = require("./layouts/sanctum-validators-lsts-layout"); @@ -65,7 +65,6 @@ const customDecoders = { stakePool: defaultParseLayout(STAKE_POOL_LAYOUT), hhParlay: defaultParseLayout(PARLAY_LAYOUT_PARTIAL), hhPari: defaultParseLayout(HH_PARI_LAYOUT_PARTIAL), - tokenMint: defaultParseLayout(TOKEN_MINT_LAYOUT), } function decodeAccount(layout, accountInfo) { diff --git a/projects/helper/utils/solana/layouts/mixed-layout.js b/projects/helper/utils/solana/layouts/mixed-layout.js index 37047f0271ae..53962af37c5f 100644 --- a/projects/helper/utils/solana/layouts/mixed-layout.js +++ b/projects/helper/utils/solana/layouts/mixed-layout.js @@ -269,18 +269,8 @@ const HH_PARI_LAYOUT_PARTIAL = BufferLayout.struct([ BufferLayout.seq(u64(), u8().span, 'amounts'), ]); -const TOKEN_MINT_LAYOUT = struct([ - u8('mintAuthorityOption'), - u8('mintAuthority'), - u64('supply'), - u8('decimals'), - u8('isInitialized'), - u8('freezeAuthorityOption'), - u8('freezeAuthority'), -]); - module.exports = { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, - PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, TOKEN_MINT_LAYOUT, + PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, } diff --git a/projects/rabbitx/index.js b/projects/rabbitx/index.js index 85f877326d74..80f40d495ce1 100644 --- a/projects/rabbitx/index.js +++ b/projects/rabbitx/index.js @@ -7,4 +7,8 @@ module.exports = { tvl: sumTokensExport({ owners: ['0xFc7f884DE22a59c0009C91733196b012Aecb8F41', '0x3b8F6D6970a24A58b52374C539297ae02A3c4Ae4', '0x7fAb440A0251dA67B316d2c0431E3Ccf4520Cd42',], tokens: [ADDRESSES.ethereum.USDT]}), staking: staking('0x0c378FB17E87B180256a87e3f671cd83Bf3236DB', '0x3Ba925fdeAe6B46d0BB4d424D829982Cb2F7309e'), }, + blast: { + tvl: sumTokensExport({ owner: '0x3Ba925fdeAe6B46d0BB4d424D829982Cb2F7309e', tokens: [ADDRESSES.blast.USDB, ADDRESSES.blast.WETH]}), + staking: staking('0x67dBA61709D78806395acDBa3EF9Df686aF5dc24', '0x236bb48fcF61ce996B2C8C196a9258c176100c7d'), + }, } From 191c6a0dcd162932a13ae7f700afb50e86e2065b Mon Sep 17 00:00:00 2001 From: Arthur <166661318+goneural@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:54:21 +0300 Subject: [PATCH 138/787] add Neural TVL (#12098) Co-authored-by: goneural --- projects/neuralai/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/neuralai/index.js diff --git a/projects/neuralai/index.js b/projects/neuralai/index.js new file mode 100644 index 000000000000..50b710982462 --- /dev/null +++ b/projects/neuralai/index.js @@ -0,0 +1,14 @@ +const { staking } = require('../helper/staking'); + +const CONTRACT_ADDRESS = "0xbe2cf8DA9887e2AB997Ed53cC49263eBD09B20C3"; +const TOKENS = [ + "0x32B053F2CBA79F80ada5078cb6b305da92BDe6e1", // neural + "0x77E06c9eCCf2E797fd462A92B6D7642EF85b0A44" // wtao +]; + +module.exports = { + ethereum: { + tvl: () => ({}), + staking: staking(CONTRACT_ADDRESS, TOKENS), + }, +}; From e72e9f1b5fc9d5b63c60812a2c281139c9f5f3ae Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 29 Oct 2024 13:58:25 +0100 Subject: [PATCH 139/787] Update: Karak (add v2 factories) (#12096) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/karak/index.js | 46 +++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/projects/karak/index.js b/projects/karak/index.js index 3cd0de8cf00b..ba5290c9c386 100644 --- a/projects/karak/index.js +++ b/projects/karak/index.js @@ -1,22 +1,38 @@ +const { getLogs2 } = require('../helper/cache/getLogs') const { sumTokens2 } = require("../helper/unwrapLPs") const config = { - ethereum: { factory: '0x54e44dbb92dba848ace27f44c0cb4268981ef1cc', }, - arbitrum: { factory: '0x399f22ae52a18382a67542b3de9bed52b7b9a4ad', }, - karak: { factory: '0xB308474350D75447cA8731B7Ce87c9ee9DA03B1C', }, - mantle: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD', }, - bsc: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD', }, - blast: { factory: '0x58b5dc145ca2BE84fe087614CFe36055be609BB3', }, - fraxtal: { factory: '0xdF922c74CC0dc394022ea002Af5aFaa32348670e', }, + ethereum: { v1: { factory: '0x54e44dbb92dba848ace27f44c0cb4268981ef1cc' } }, + arbitrum: { v1: { factory: '0x399f22ae52a18382a67542b3de9bed52b7b9a4ad' }, v2: { factory: '0xc4B3D494c166eBbFF9C716Da4cec39B579795A0d', block: 261874079 }}, + karak: { v1: { factory:'0xB308474350D75447cA8731B7Ce87c9ee9DA03B1C' } }, + mantle: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'} }, + bsc: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'} }, + blast: { v1: { factory: '0x58b5dc145ca2BE84fe087614CFe36055be609BB3'} }, + fraxtal: { v1: { factory: '0xdF922c74CC0dc394022ea002Af5aFaa32348670e'}, v2: { factory: '0x04962047B6a9E8c99C8Da874D34c4285a87d541E', block: 11669871 } }, +} + +const eventAbi = 'event DeployedVault(address operator, address vault, address asset)' + +const karak_v1_tvl = async (api, { factory }) => { + const vaults = await api.call({ abi: 'address[]:getVaults', target: factory }) + const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults }) + return sumTokens2({ api, tokensAndOwners2: [tokens, vaults] }) +} + +const karak_v2_tvl = async (api, { factory, block }) => { + const logs = await getLogs2({ api, target: factory, fromBlock: block, eventAbi }) + const vaults = logs.map(log => log[1]) + const tokens = logs.map(log => log[2]) + return sumTokens2({ api, tokensAndOwners2: [tokens, vaults] }) +} + +const tvl = async (api, factories) => { + const { v1, v2 } = factories + if (v1) await karak_v1_tvl(api, v1) + if (v2) await karak_v2_tvl(api, v2) } Object.keys(config).forEach(chain => { - const { factory, } = config[chain] - module.exports[chain] = { - tvl: async (api) => { - const vaults = await api.call({ abi: 'address[]:getVaults', target: factory }) - const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults }) - return sumTokens2({ api, tokensAndOwners2: [tokens, vaults] }) - } - } + const factories = config[chain] + module.exports[chain] = { tvl: (api) => tvl(api, factories) } }) From 906eb31305440e58b7dbfcd695c1c510b82aed7e Mon Sep 17 00:00:00 2001 From: vokkantthakkar <51082769+vokkantthakkar@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:29:31 +0530 Subject: [PATCH 140/787] Update Renzo TVL (#12094) --- projects/renzo/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/renzo/index.js b/projects/renzo/index.js index 94b80e7611f8..0cfc8323661a 100644 --- a/projects/renzo/index.js +++ b/projects/renzo/index.js @@ -3,11 +3,12 @@ const L1_EZ_ETH_ADDRESS = "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110"; const L2_EZ_ETH_ADDRESS = ADDRESSES.blast.ezETH; const L1_LOCKBOX_ADDRESS = "0xC8140dA31E6bCa19b287cC35531c2212763C2059"; const L1_PZ_ETH_ADDRESS = "0x8c9532a60E0E7C6BbD2B2c1303F63aCE1c3E9811"; +const SEI_EZ_ETH_ADDRESS = "0x6DCfbF4729890043DFd34A93A2694E5303BA2703"; async function L2Tvl(api) { - return { - [L1_EZ_ETH_ADDRESS]: await api.call({ target: L2_EZ_ETH_ADDRESS, abi: "erc20:totalSupply" }) - } + const targetAddress = api.chain === "sei" ? SEI_EZ_ETH_ADDRESS : L2_EZ_ETH_ADDRESS; + const supply = await api.call({ target: targetAddress, abi: "erc20:totalSupply" }); + return { [L1_EZ_ETH_ADDRESS]: supply }; } async function ethTvl(api) { @@ -18,7 +19,7 @@ async function ethTvl(api) { api.add(L1_PZ_ETH_ADDRESS, pzEthBalance); } -const chains = ["mode", "blast", "bsc", "linea", "arbitrum", "base"] +const chains = ["mode", "blast", "bsc", "linea", "arbitrum", "base", "optimism", "fraxtal","zircuit","sei" ] module.exports = { doublecounted: true, @@ -29,4 +30,4 @@ module.exports = { chains.forEach(chain => { module.exports[chain] = { tvl: L2Tvl } -}) \ No newline at end of file +}) From 99f2f2afa43c35900207af58e494c0056ff546f6 Mon Sep 17 00:00:00 2001 From: murmky <184486394+murmky@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:18:52 +0100 Subject: [PATCH 141/787] Add Kyros (#12102) --- projects/kyros/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/kyros/index.js diff --git a/projects/kyros/index.js b/projects/kyros/index.js new file mode 100644 index 000000000000..7015c61d162e --- /dev/null +++ b/projects/kyros/index.js @@ -0,0 +1,15 @@ +const { sumTokens2 } = require("../helper/solana"); + +async function tvl() { + return sumTokens2({ + tokenAccounts: [ + "CRFtzwkekKorgdTRSdvsYeqL1vEuVvwGRvweuWCyaRt3", // jitoSOL token account in kySOL Vault address + ] + }) +} + +module.exports = { + timetravel: false, + solana: { tvl }, + methodology: 'The TVL is calculated by summing all restaked assets.', +}; From ae071c671a0a1178985295761b6375f1472c0958 Mon Sep 17 00:00:00 2001 From: 0xYFLOW <139814596+0xYFLOW@users.noreply.github.com> Date: Tue, 29 Oct 2024 18:20:30 +0400 Subject: [PATCH 142/787] Add XBG (#12101) --- projects/yieldflow/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/yieldflow/index.js b/projects/yieldflow/index.js index dfee5c3bd9a2..65872ca4fcb0 100644 --- a/projects/yieldflow/index.js +++ b/projects/yieldflow/index.js @@ -74,6 +74,10 @@ const managers = [ '0x590905F3adC1a16Af6A144Eaca57ba65760e93Cf', '0x4568936B2846debb1Ed65122841A500B639f49A7', '0x17263600ABccf294C6D0Ec02bCc23A240e883c7D', + + '0x1F73AbC7e254980AB26974C9A13c8493143F97Bc', + '0x599Dd6b1205E51fbcb2879105051C0EBbfa76b03', + '0xcC125F83BFe2A30F1BEfdf6E06043dB5a7a02A61', ] async function tvl(api) { From eedbb29ca363ae7fe2400a030e35bb21ae2381e2 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:15:19 +0000 Subject: [PATCH 143/787] doublecount on bedrock (#12103) --- projects/bedrock/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/bedrock/index.js b/projects/bedrock/index.js index 9e9b9bb885af..358a8d71642c 100644 --- a/projects/bedrock/index.js +++ b/projects/bedrock/index.js @@ -12,6 +12,7 @@ async function tvl() { module.exports = { timetravel: false, + doublecounted:true, bitcoin: { tvl } From 0e31e528d3d7ce2cc571594e84f0384e5c3fcd0a Mon Sep 17 00:00:00 2001 From: 0xaslan <161349919+0xaslan@users.noreply.github.com> Date: Wed, 30 Oct 2024 00:09:29 -0400 Subject: [PATCH 144/787] DeepBook V3 Adapter (#11993) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/deepbook-v3/index.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 projects/deepbook-v3/index.js diff --git a/projects/deepbook-v3/index.js b/projects/deepbook-v3/index.js new file mode 100644 index 000000000000..3d1582401743 --- /dev/null +++ b/projects/deepbook-v3/index.js @@ -0,0 +1,29 @@ +const { get } = require("../helper/http"); + +const coins = { + deepType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP", + suiType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI", + usdcType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + bethType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH", + wusdtType: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN", + wusdcType: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", +} + +const endpointUrl = "https://deepbook-indexer.mainnet.mystenlabs.com" +const endpointName = "get_net_deposits" + +const tvl = async (api) => { + const url = `${endpointUrl}/${endpointName}/${Object.values(coins).join(',')}/${api.timestamp}` + const data = await get(url) + Object.keys(data).forEach(coin => { + api.add(coin, data[coin]) + }) +} + +module.exports = { + methodology: "All deposits into all BalanceManagers minutes all withdrawals from all BalanceManagers", + start: 1728858752, + sui: { + tvl, + } +} \ No newline at end of file From 52e4c6e94f62d0c3b3b1214ec8f429f99acad08b Mon Sep 17 00:00:00 2001 From: Chase Brown <54334583+chasebrownn@users.noreply.github.com> Date: Tue, 29 Oct 2024 21:15:15 -0700 Subject: [PATCH 145/787] Removing blacklisted tokens (#12104) --- projects/pearl-v2/index.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/projects/pearl-v2/index.js b/projects/pearl-v2/index.js index 5119a191f77c..dac961beb7fc 100644 --- a/projects/pearl-v2/index.js +++ b/projects/pearl-v2/index.js @@ -1,12 +1,6 @@ const ADDRESSES = require('../helper/coreAssets.json') const { uniV3Export } = require('../helper/uniswapV3') -const ownTokens = [ - '0xaec9e50e3397f9ddc635c6c429c8c7eca418a143', - ADDRESSES.real.RWA, - '0x25ea98ac87a38142561ea70143fd44c4772a16b6', -] - module.exports = uniV3Export({ - 'real': { factory: '0xeF0b0a33815146b599A8D4d3215B18447F2A8101', fromBlock: 33062, blacklistedTokens: ownTokens,} + 'real': { factory: '0xeF0b0a33815146b599A8D4d3215B18447F2A8101', fromBlock: 33062,} }) \ No newline at end of file From f24ef8f709d403c4d40e0d9c945f8f418b2d8366 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:48:42 +0100 Subject: [PATCH 146/787] track liquidity slicing #12093 --- projects/liquidity-slicing/index.js | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 projects/liquidity-slicing/index.js diff --git a/projects/liquidity-slicing/index.js b/projects/liquidity-slicing/index.js new file mode 100644 index 000000000000..e5ec5a0d6ab8 --- /dev/null +++ b/projects/liquidity-slicing/index.js @@ -0,0 +1,55 @@ +const { ethers } = require('ethers'); + +const abi = { + "checkContract": "function checkContract(uint16,bytes32) view returns (uint256)", + "nodeStates": "function nodeStates(uint256,bytes32) view returns (uint256 totalStaked,uint256,uint256)" +} + + +const MANAGER_CONTRACT_ADDRESS = "0x1F0ea3b63F3Fca05719E54E7469Ef897754eF666"; + +const config = { + manta: { + transformToken: "manta-network", + chainId: 2, + decimals: 18, + delegator: { + "0x89060B31DB21C6cB4e946EaCB28EFefF085C275a": ["0x2847e7f2823a5048f4ae2cd808a5e978aa6ce41fcbb6e7e7bbbb1b64446b0639"] + }, + validator: { + "0xaB21907461313127Ce944F6f168888d93C091363": ["0x8e8103383262ff2256490767e2338ffc452bf602b0addede203da3218cc9d241"] + } + }, + aleo: { + transformToken: "aleo", + chainId: 5, + decimals: 6, + delegator: { + "0x52ade9c48599d71603cf661f98c9b7bd21cfb8ba448efd6204e89096b969c30c": ["0xbb57045a8a9c39dfb06baaf5ed6cb02343a17feecbf63aba9b15a6694476140f"] + }, + validator: { + "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff": ["0x0000000000000000000000000000000000000000000000000000000000000005"] + } + } +}; + +async function tvl(api) { + for (const chain of Object.keys(config)) { + const { transformToken: tokenId, chainId, decimals, delegator, validator, } = config[chain]; + const allConfig = { ...delegator, ...validator }; + + for (const [hostAddr, nodes] of Object.entries(allConfig)) { + const i = await api.call({ abi: abi.checkContract, target: MANAGER_CONTRACT_ADDRESS, params: [chainId, ethers.zeroPadValue(hostAddr, 32)] }); + const calls = nodes.map(v => ({ params: [i, v] })) + const stakes = (await api.multiCall({ abi: abi.nodeStates, calls, target: MANAGER_CONTRACT_ADDRESS })).map(i => i.totalStaked) + stakes.forEach(val => api.addCGToken(tokenId, val / (10 ** decimals))) + } + } +} + +module.exports = { + arbitrum: { + start: 224198345, + tvl, + } +} From cf08b1c866be35650831a82fe0189bb0353bfc8e Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 30 Oct 2024 07:23:39 +0100 Subject: [PATCH 147/787] Fix: Contango-v2 (#12080) --- projects/contango-v2/index.js | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/projects/contango-v2/index.js b/projects/contango-v2/index.js index f3d69ee3f285..00a537adc471 100644 --- a/projects/contango-v2/index.js +++ b/projects/contango-v2/index.js @@ -3,14 +3,24 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); const CONTANGO_PROXY = "0x6Cae28b3D09D8f8Fc74ccD496AC986FC84C0C24E"; const CONTANGO_LENS_PROXY = "0xe03835Dfae2644F37049c1feF13E8ceD6b1Bb72a"; -const alchemyGraphUrl = (chain) => - `https://subgraph.satsuma-prod.com/773bd6dfe1c6/egills-team/v2-${chain}/api` +const alchemyGraphUrl = (chain) => `https://subgraph.satsuma-prod.com/773bd6dfe1c6/egills-team/v2-${chain}/api` + +const excludedIds_arb = [ + "0x415242555344540000000000000000000bffffffff0000000000000000000623", + "0x555344435745544800000000000000000bffffffff000000000000000000030a", + "0x574554485553444300000000000000000bffffffff00000000000000000001df", + "0x574554485553444300000000000000000bffffffff00000000000000000001e8", + "0x574554485553444300000000000000000bffffffff0000000000000000000309", + "0x776545544857455448000000000000000bffffffff0000000000000000003099", + "0x777374455448574554480000000000000bffffffff00000000000000000010a7" +]; const config = { arbitrum: { contango: CONTANGO_PROXY, contango_lens: CONTANGO_LENS_PROXY, graphUrl: alchemyGraphUrl('arbitrum'), + excludedIds: excludedIds_arb }, optimism: { contango: CONTANGO_PROXY, @@ -61,23 +71,24 @@ const config = { }; module.exports = { + hallmarks: [[1729036800, "Affected by the Radiant hack"]], doublecounted: true, methodology: `Counts the tokens locked in the positions to be used as margin + user's tokens locked in the protocol's vault. Borrowed coins are discounted from the TVL, so only the position margins are counted. The reason behind this is that the protocol only added the user's margin to the underlying money market. Adding the borrowed coins to the TVL can be used as a proxy for the protocol's open interest.`, }; Object.keys(config).forEach((chain) => { - const { contango, contango_lens, graphUrl } = config[chain]; + const { contango, contango_lens, graphUrl, excludedIds = [] } = config[chain]; module.exports[chain] = { tvl: async (api) => { await Promise.all([ - positionsTvl(api, contango_lens, graphUrl, false), + positionsTvl(api, contango_lens, graphUrl, false, excludedIds), vaultTvl(api, contango, graphUrl), ]); return sumTokens2({ api }) }, borrowed: async (api) => { - await positionsTvl(api, contango_lens, graphUrl, true) + await positionsTvl(api, contango_lens, graphUrl, true, excludedIds) return sumTokens2({ api }) } }; @@ -88,6 +99,7 @@ async function positionsTvl( contangoLens, graphUrl, borrowed, + excludedIds ) { const cacheKey = `contango-positions-${api.chain}`; const positions = await cachedGraphQuery(cacheKey, graphUrl, graphQueries.position, { @@ -96,10 +108,10 @@ async function positionsTvl( fetchById: true, safeBlockLimit: 3000, }) - const parts = positions.map(({ id, instrument: { base, quote } }) => [ - id, - [base.id, quote.id], - ]); + + const parts = positions + .filter(({ id }) => !excludedIds.includes(id)) + .map(({ id, instrument: { base, quote } }) => [id, [base.id, quote.id]]); const balances = await api.multiCall({ target: contangoLens, From a5213fb4f43962debdcfb81b0987caf5207ab8b1 Mon Sep 17 00:00:00 2001 From: 0xchimz <5950717+0xchimz@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:37:56 +0700 Subject: [PATCH 148/787] Add RabbitSwap (#12108) Co-authored-by: 0xchimz --- projects/rabbitswap-v3/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/rabbitswap-v3/index.js diff --git a/projects/rabbitswap-v3/index.js b/projects/rabbitswap-v3/index.js new file mode 100644 index 000000000000..ce3b106f8091 --- /dev/null +++ b/projects/rabbitswap-v3/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + tomochain: { factory: '0x8Ab5815E0A6a059d203F53496fAAb3045d01A25A', fromBlock: 86168117, isAlgebra: false }, +}) From 74ff539ec92bbc4b83cb5bc69d6a9369f92c5f70 Mon Sep 17 00:00:00 2001 From: PinSwap-IoteX Date: Wed, 30 Oct 2024 20:39:03 +0800 Subject: [PATCH 149/787] add PinSwap (#12106) Co-authored-by: deployer --- projects/PinSwap/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/PinSwap/index.js diff --git a/projects/PinSwap/index.js b/projects/PinSwap/index.js new file mode 100644 index 000000000000..10fc1049a5ff --- /dev/null +++ b/projects/PinSwap/index.js @@ -0,0 +1,10 @@ +const { getUniTVL } = require("../helper/unknownTokens"); +module.exports = { + misrepresentedTokens: true, + iotex: { + tvl: getUniTVL({ + factory: "0x0A753dD1AFDE272a2d4bf55dF616568744201577", + useDefaultCoreAssets: true, + }), + }, +}; From 7d49c2208bc4a35730193c87a25b9d9cfe63b5b7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:47:21 +0100 Subject: [PATCH 150/787] track loxodrome perp #12107 --- projects/loxodrome-perp/index.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 projects/loxodrome-perp/index.js diff --git a/projects/loxodrome-perp/index.js b/projects/loxodrome-perp/index.js new file mode 100644 index 000000000000..e716fec84027 --- /dev/null +++ b/projects/loxodrome-perp/index.js @@ -0,0 +1,7 @@ +const { gmxExports } = require('../helper/gmx') + +module.exports = { + iotex: { + tvl: gmxExports({ vault: '0x22e239513f03C5cc890DAad846Bb279C4837d242' }) + }, +} \ No newline at end of file From 64dbe0992ef6b0bac486d73839e87a778993ea26 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:09:28 +0100 Subject: [PATCH 151/787] track bulbaswap on morph --- projects/bulbaswap-v2/index.js | 4 ++++ projects/bulbaswap-v3/index.js | 3 +++ projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 7 ++++++- 5 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 projects/bulbaswap-v2/index.js create mode 100644 projects/bulbaswap-v3/index.js diff --git a/projects/bulbaswap-v2/index.js b/projects/bulbaswap-v2/index.js new file mode 100644 index 000000000000..c7df338a40f6 --- /dev/null +++ b/projects/bulbaswap-v2/index.js @@ -0,0 +1,4 @@ +const { uniTvlExports } = require('../helper/unknownTokens') +module.exports = uniTvlExports({ + 'morph': '0x8D2A8b8F7d200d75Bf5F9E84e01F9272f90EFB8b' +}) \ No newline at end of file diff --git a/projects/bulbaswap-v3/index.js b/projects/bulbaswap-v3/index.js new file mode 100644 index 000000000000..c7ac10b8b7ea --- /dev/null +++ b/projects/bulbaswap-v3/index.js @@ -0,0 +1,3 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ morph: { factory: '0xFf8578C2949148A6F19b7958aE86CAAb2779CDDD', fromBlock: 25159, } }) \ No newline at end of file diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 29abe24e0f71..df9c3b56d5a4 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -209,6 +209,7 @@ "mode", "moonbeam", "moonriver", + "morph", "multivac", "muuchain", "mvc", diff --git a/projects/helper/env.js b/projects/helper/env.js index a118b42cb743..81f9102f84cd 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -21,6 +21,7 @@ const DEFAULTS = { MATCHAIN_RPC_MULTICALL: "0xDa91510Bd8c50bfa54FC2BE2dD6dAbE03eA8496c", SHAPE_RPC:'https://mainnet.shape.network', SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", + MORPH_RPC_MULTICALL: "0x33A213b1049D5AD2eeE6e61dAe040955e60383D4", WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", APECHAIN_RPC: "https://rpc.apechain.com", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index bd685eb3a7a9..0c1a05eed32c 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -137,7 +137,12 @@ const fixBalancesTokens = { '0x00000000000000000000000000000000000ec585': { coingeckoId: 'headstarter', decimals: 8 }, '0x0000000000000000000000000000000000492a28': { coingeckoId: 'hashpack', decimals: 6 }, '0x000000000000000000000000000000000030fb8b': { coingeckoId: 'steam', decimals: 2 }, - } + }, + morph: { + '0x5300000000000000000000000000000000000011': { coingeckoId: 'ethereum', decimals: 18 }, + '0xc7d67a9cbb121b3b0b9c053dd9f469523243379a': { coingeckoId: 'tether', decimals: 6 }, + '0x803dce4d3f4ae2e17af6c51343040dee320c149d': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From eac20476452739dac25a4e3275cb95c95a912121 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:18:19 +0100 Subject: [PATCH 152/787] add morph bridge --- projects/morph/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/morph/index.js diff --git a/projects/morph/index.js b/projects/morph/index.js new file mode 100644 index 000000000000..2426de75e028 --- /dev/null +++ b/projects/morph/index.js @@ -0,0 +1,13 @@ +const { getConfig } = require('../helper/cache') +const { nullAddress } = require('../helper/tokenMapping') + +async function tvl(api) { + const { tokens } = await getConfig('morph/bridge', 'https://raw.githubusercontent.com/morph-l2/morph-list/main/src/mainnet/tokenList.json') + const tokensAndOwners = tokens.filter(i => i.chainId === '1').map(i => [i.address, i.gatewayAddress]) + tokensAndOwners.push([nullAddress, '0xDc71366EFFA760804DCFC3EDF87fa2A6f1623304']) + return api.sumTokens({ tokensAndOwners }) +} + +module.exports = { + ethereum: { tvl }, +} \ No newline at end of file From 5d396b458c7d090ff8536e982f69d22e0e39cdf1 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:09:21 +0100 Subject: [PATCH 153/787] fix deepbook --- projects/deepbook-sui/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/deepbook-sui/index.js b/projects/deepbook-sui/index.js index f09f1fb55a96..48e9623c26d3 100644 --- a/projects/deepbook-sui/index.js +++ b/projects/deepbook-sui/index.js @@ -34,6 +34,7 @@ function findClosestTvl(data, ts) { // Sum all unique values together let totalTvl = Object.values(aggregatedTvl).reduce((acc, current) => acc + current, 0); + if (+totalTvl<0) return 0 return totalTvl; } From f4c43202d24d8b10aa35b61059e37f1573b4a829 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:42:52 +0100 Subject: [PATCH 154/787] track yamfore #12117 --- projects/treasury/yamfore.js | 40 ++++++++++++++++++++++++++++++++++++ projects/yamfore/index.js | 24 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 projects/treasury/yamfore.js create mode 100644 projects/yamfore/index.js diff --git a/projects/treasury/yamfore.js b/projects/treasury/yamfore.js new file mode 100644 index 000000000000..72c8be11ae71 --- /dev/null +++ b/projects/treasury/yamfore.js @@ -0,0 +1,40 @@ +const { sumTokens2 } = require("../helper/chain/cardano"); +const { assetsAddresses } = require('../helper/chain/cardano/blockfrost'); +const { nullAddress } = require("../helper/tokenMapping"); + +async function adaHandleToAddress(handle) { + // https://docs.adahandle.com/reference/api-reference/cardano-node + const policyID = 'f0ff48bbb7bbe9d59a40f1ce90e9e9d0ff5002ec48f232b49ca0fb9a'; + const assetName = Buffer.from(handle).toString('hex'); + const [holder] = await assetsAddresses(`${policyID}000de140${assetName}`) + return holder.address +} + +async function tvl() { + // const TREASURY_ADDRESS = await adaHandleToAddress('bigblymp') + const TREASURY_ADDRESS = 'addr1qx2m86m788l8zrcc6ecfg0yq698s2ryqpz3c52z2ratw5jh8yqevyugcr8w4ezlj3sry6798h9ynqjgce3mqfwxfma9qts79w0' + + return sumTokens2({ + owners: [TREASURY_ADDRESS,], tokens: [ + nullAddress, + 'c48cbb3d5e57ed56e276bc45f99ab39abe94e6cd7ac39fb402da47ad0014df105553444d' + ], + }) +} + +async function ownTokens() { + // const TREASURY_ADDRESS = await adaHandleToAddress('bigblymp') + const TREASURY_ADDRESS = 'addr1qx2m86m788l8zrcc6ecfg0yq698s2ryqpz3c52z2ratw5jh8yqevyugcr8w4ezlj3sry6798h9ynqjgce3mqfwxfma9qts79w0' + + return sumTokens2({ + owners: [TREASURY_ADDRESS,], tokens: [ + 'ee0633e757fdd1423220f43688c74678abde1cead7ce265ba8a24fcd43424c50', + ], + }) +} + +module.exports = { + cardano: { + tvl, ownTokens, + }, +}; diff --git a/projects/yamfore/index.js b/projects/yamfore/index.js new file mode 100644 index 000000000000..9a5e32faa3c1 --- /dev/null +++ b/projects/yamfore/index.js @@ -0,0 +1,24 @@ +const { sumTokens2 } = require("../helper/chain/cardano"); +const { nullAddress } = require("../helper/tokenMapping"); + +const V1_PROTOCOL_SCRIPT_ADDRESS = "addr1xywgm3cqq35eh8p83x7gymkgqs8r9zzeg9sgq74d59apepgu3hrsqprfnwwz0zdusfhvspqwx2y9jstqspa2mgt6rjzs2v0fp9" + +async function tvl() { + return sumTokens2({ + owners: [ + V1_PROTOCOL_SCRIPT_ADDRESS, + ], + tokens: [ + nullAddress, + 'c48cbb3d5e57ed56e276bc45f99ab39abe94e6cd7ac39fb402da47ad0014df105553444d' + ], + }) +} + +module.exports = { + cardano: { + tvl + }, + start: 1728878400, + methodology: "TVL is equal to all ADA, CBLP and USDM (USDM by Moneta) held in the treasury and unlent funds, collected fees and loan collateral held by the V1 script.", +}; From d81ecd2841089120b0d0a1b2c08114e3dc653762 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 31 Oct 2024 13:46:45 +0800 Subject: [PATCH 155/787] feat: update pumpbtc adapter (add some addresses on base chain) (#12120) --- projects/pumpbtc/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index b5c00f0d19d4..000fbaaf7bca 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -11,6 +11,7 @@ const config = { bsc: { owners: ['0x2Ee808F769AB697C477E0aF8357315069b66bCBb', '0x80922aD2771c5Ea9C14bA5FF4a903EC6B0f7e7C9', '0x2b4B9047C9fEA54705218388bFC7Aa7bADA4BB5E', '0x8A0727B87fa1027c419c3aa2caf56C799d5Bd8c5'], tokens: [ADDRESSES.bsc.BTCB, '0xC96dE26018A54D51c097160568752c4E3BD6C364'], }, mantle: { owners: ['0xd6Ab15B2458B6EC3E94cE210174d860FdBdd6b96'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364'], }, bitcoin: {}, + base: { owners: ['0x1fCca65fb6Ae3b2758b9b2B394CB227eAE404e1E', '0x4913D495cBA3e1380218d2258126F22Ea5dE5f8B', '0xC7DA129335F8815d62fBd3ca7183A3b2791CdB5e', '0xca873913BBf124441857d32Bb23f723b68433465', '0xF1D06Be8dF2F7Ed4Cdc9ac05915EA2b618FFA3Fb'], tokens: ['0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'], }, } Object.keys(config).forEach(chain => { From 2a392639e7ddb067e35fa363fdda910462fd3e6a Mon Sep 17 00:00:00 2001 From: Jiho Kang Date: Thu, 31 Oct 2024 14:47:09 +0900 Subject: [PATCH 156/787] adding jito restaking tvl tracker for fragmetric (#12119) --- projects/fragmetric/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/fragmetric/index.js b/projects/fragmetric/index.js index 39b5de390837..3f0a6532d2a8 100644 --- a/projects/fragmetric/index.js +++ b/projects/fragmetric/index.js @@ -6,6 +6,9 @@ async function tvl() { "EVUJsmfM3cqh48eTrwmLe552F3pzmhRMJGVpmweg2fBt", "7HPaAWDuzsSEm4JZnRudJF11pNanPNfP5mqHUCkXh5kD", "BaoCDUcKbYSaxA5scygSeMNZV1GPsNeKqLwg92f9pi5v", + "96h95Nkfy5SPu8ddb3V4b44CTNaZoWsKCCUXY8MKzn6Y", + "DYyfr8fTAchSMZPm6nUu6MHARYVuCuvzwBQrroSW6mQm", + "HakiuyCy3STaWaPtPUFyyHwEjzrRDGaLfqwV8kV6j1pn", ], solOwners: [ "3TK9fNePM4qdKC4dwvDe8Bamv14prDqdVfuANxPeiryb", From 9d7a763f89d7cd05220420dc3b16441fb2f6cbb6 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:51:25 +0100 Subject: [PATCH 157/787] update predx #12118 --- projects/predx/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/predx/index.js b/projects/predx/index.js index 7965c70c8c4a..3233e6c110b3 100644 --- a/projects/predx/index.js +++ b/projects/predx/index.js @@ -4,13 +4,13 @@ const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { zklink: { tvl: sumTokensExport({ - owners: ["0x986Ca3A4F05AA7EA5733d81Da6649043f43cB9A8"], + owners: ["0x21855483F45ab1801CbE4248b9a2F178320c444B"], tokens: [ADDRESSES.zklink.USDT] }), }, base: { tvl: sumTokensExport({ - owners: ["0xa6368fd44e699f6bca2ab3a02C44beFCA7257cF4"], + owners: ["0x10dE7F398C76341B5a5C33693C930609863F692C"], tokens: [ADDRESSES.base.USDC] }), }, @@ -22,26 +22,26 @@ module.exports = { }, linea: { tvl: sumTokensExport({ - owners: ["0xF9AD26Bb325f4C82F26bF2549b65e6f9a4a04a78"], + owners: ["0x3F8D22db689A9c6F0560baCE255cdD854Ab84Ca5"], tokens: [ADDRESSES.linea.USDC] }), }, bsc: { tvl: sumTokensExport({ - owners: ["0x38Db024F8EA400A57c15C25D1DC46aE868C08a2F"], + owners: ["0x2e8c67E73883e787A164cD9FeA592d0AcDbC61D4"], tokens: [ADDRESSES.bsc.USDT] }), }, mantle: { tvl: sumTokensExport({ - owners: ["0x38Db024F8EA400A57c15C25D1DC46aE868C08a2F"], + owners: ["0x8D2DB5B86b7C079FF8F7190D788766EeB789F104"], tokens: [ADDRESSES.mantle.USDC] }), }, btr: { tvl: sumTokensExport({ - owners: ["0x92CdC3a149A6bc3f39136eF4A94292cDC2Cc4b9b"], - tokens: ["0xf8c374ce88a3be3d374e8888349c7768b607c755"] + owners: ["0x8E4fb0169aECB4768220d97aA1D0106322716678"], + tokens: ["0xf8C374CE88A3BE3d374e8888349C7768B607c755"] }), }, } From 11e311ffeb5d426359d90552ef703e1d527be216 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 06:54:05 +0100 Subject: [PATCH 158/787] use token label --- projects/alphafi/index.js | 20 ++++++++-------- projects/bean/index.js | 15 ++++++------ projects/bouncebit-premium/index.js | 3 ++- projects/crackandstack/index.js | 2 +- projects/crosscurve/index.js | 22 ++++++++--------- projects/deepbook-v3/index.js | 7 +++--- projects/folks-xchain/constants.js | 23 +++++++++--------- projects/helper/tokenMapping.js | 22 ++++++++--------- projects/infinite/index.js | 7 +++--- projects/liquidity-slicing/index.js | 1 + projects/lorenzo/index.js | 1 + projects/microcreditproject/index.js | 5 ++-- projects/navi/index.js | 2 +- projects/primex-finance/index.js | 36 ++++++++++++++-------------- projects/radiant-v2/index.js | 31 ++++++++++++------------ projects/root-finance/index.js | 2 +- projects/seer/index.js | 9 +++---- projects/swell-earn-eth/index.js | 5 ++-- projects/taidog/index.js | 2 +- projects/taikodrips/index.js | 3 ++- projects/trado/index.js | 2 +- projects/tron-btc/index.js | 4 ++-- projects/unore/index.js | 2 +- projects/velvet-capital-v3/index.js | 5 ++-- projects/yel/index.js | 8 +++---- projects/zircuit/index.js | 8 +++---- 26 files changed, 130 insertions(+), 117 deletions(-) diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index 2b5535ffd9c2..11557856f8a5 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -72,7 +72,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ poolID: "0x727882553d1ab69b0cabad2984331e7e39445f91cb4046bf7113c36980685528", cetusPoolID: "0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105", investorID: "0xba6acd0350eab1c6bc433b6c869e5592fe0667ae96a3115f89d5c79dd78396ef", - token0Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + token0Type: ADDRESSES.sui.USDC_CIRCLE, token1Type: ADDRESSES.sui.SUI }, // usdc usdt @@ -80,23 +80,23 @@ const ALPHAFI_CETUS_TVL_IDS = [ poolID: "0xa213f04c6049f842a7ffe7d39e0c6138a863dc6e25416df950d23ddb27d75661", cetusPoolID: "0x6bd72983b0b5a77774af8c77567bb593b418ae3cd750a5926814fcd236409aaa", investorID: "0xe553be450b7290025d5810da45102abdbaa211c5735e47f6740b4dd880edc0bd", - token0Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", - token1Type: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN" + token0Type: ADDRESSES.sui.USDC_CIRCLE, + token1Type: ADDRESSES.sui.USDT }, // usdc wusdc { poolID: "0x568a47adf2b10219f0973a5600096822b38b4a460c699431afb6dad385614d66", cetusPoolID: "0x1efc96c99c9d91ac0f54f0ca78d2d9a6ba11377d29354c0a192c86f0495ddec7", investorID: "0x6cc5e671a2a6e9b8c8635ff1fb16ae62abd7834558c3a632d97f393c0f022972", - token0Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token0Type: ADDRESSES.sui.USDC_CIRCLE, + token1Type: ADDRESSES.sui.USDC }, // usdc eth { poolID: "0xc04f71f32a65ddf9ebf6fb69f39261457da28918bfda5d3760013f3ea782a594", cetusPoolID: "0x9e59de50d9e5979fc03ac5bcacdb581c823dbd27d63a036131e17b391f2fac88", investorID: "0xb0bff60783536f9dc0b38e43150a73b73b8a4f1969446f7721e187821915bd00", - token0Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + token0Type: ADDRESSES.sui.USDC_CIRCLE, token1Type: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH" }, // deep sui @@ -112,7 +112,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ poolID: "0xeb44ecef39cc7873de0c418311557c6b8a60a0af4f1fe1fecece85d5fbe02ab5", cetusPoolID: "0x59cf0d333464ad29443d92bfd2ddfd1f794c5830141a5ee4a815d1ef3395bf6c", investorID: "0x9b7c9b6086d3baf413bccdfbb6f60f04dedd5f5387dee531eef5b811afdfaedc", - token0Type: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK", + token0Type: ADDRESSES.sui.BUCK, token1Type: ADDRESSES.sui.SUI }, ] @@ -145,7 +145,7 @@ const ALPHAFI_NAVI_TVL_IDS = [ }, { poolID: "0x04378cf67d21b41399dc0b6653a5f73f8d3a03cc7643463e47e8d378f8b0bdfa", - tokenType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + tokenType: ADDRESSES.sui.USDC_CIRCLE, expo: 6 }, { @@ -175,7 +175,7 @@ const ALPHAFI_NAVI_LOOP_TVL_IDS = [ const ALPHAFI_BUCKET_TVL_IDS = [ { poolID: "0x2c5c14b9fb21f93f36cac0f363acf59ecb21f34c4c9b1a1b383f635ecdc7b507", - tokenType: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK", + tokenType: ADDRESSES.sui.BUCK, }, ] @@ -198,7 +198,7 @@ const ALPHAFI_POOL2_IDS = [{ cetusPoolID: "0x29e218b46e35b4cf8eedc7478b8795d2a9bcce9c61e11101b3a039ec93305126", investorID: "0xb43d1defd5f76ef084d68d6b56e903b54d0a3b01be8bb920ed1fa84b42c32ee1", token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA", - token1Type: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC" + token1Type: ADDRESSES.sui.USDC_CIRCLE }, ] diff --git a/projects/bean/index.js b/projects/bean/index.js index 79d259946cbe..b30c77d6a725 100644 --- a/projects/bean/index.js +++ b/projects/bean/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const ADDR = { ethereum: { BEANSTALK: "0xc1e088fc1323b20bcbee9bd1b9fc9546db5624c5", @@ -11,9 +12,9 @@ const ADDR = { BEAN3CRV_V2: "0xc9c32cd16bf7efb85ff14e0c8603cc90f6f2ee49", BEANETH_V2: "0xbea0e11282e2bb5893bece110cf199501e872bad", // Underlying non-bean tokens - WETH: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", + WETH: ADDRESSES.ethereum.WETH, CRV3: "0x6c3f90f043a72fa612cbac8115ee7e52bde6e490", - LUSD: "0x5f98805a4e8be255a32880fdec7f6728c6568ba0" + LUSD: ADDRESSES.ethereum.LUSD }, arbitrum: { BEANSTALK: "0xd1a0060ba708bc4bcd3da6c37efa8dedf015fb70", @@ -27,12 +28,12 @@ const ADDR = { UNRIPE_BEAN_ERC20: "0x1bea054dddbca12889e07b3e076f511bf1d27543", UNRIPE_LP_ERC20: "0x1bea059c3ea15f6c10be1c53d70c75fd1266d788", // Underlying non-bean tokens - WETH: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", - WSTETH: "0x5979d7b546e38e414f7e9822514be443a4800529", + WETH: ADDRESSES.arbitrum.WETH, + WSTETH: ADDRESSES.arbitrum.WSTETH, WEETH: "0x35751007a407ca6feffe80b3cb397736d2cf4dbe", - WBTC: "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f", - USDC: "0xaf88d065e77c8cc2239327c5edb3a432268e5831", - USDT: "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9" + WBTC: ADDRESSES.arbitrum.WBTC, + USDC: ADDRESSES.arbitrum.USDC_CIRCLE, + USDT: ADDRESSES.arbitrum.USDT } }; diff --git a/projects/bouncebit-premium/index.js b/projects/bouncebit-premium/index.js index fde3876f9dca..afee6eefcb11 100644 --- a/projects/bouncebit-premium/index.js +++ b/projects/bouncebit-premium/index.js @@ -1,7 +1,8 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens, sumTokensExport } = require('../helper/sumTokens'); const BBTC = '0xF5e11df1ebCf78b6b6D26E04FF19cD786a1e81dC' -const BBUSD = '0x77776b40C3d75cb07ce54dEA4b2Fd1D07F865222' +const BBUSD = ADDRESSES.bouncebit.BBUSD // const stBBTC = '0x7F150c293c97172C75983BD8ac084c187107eA19' const stBBTC_STAKE_ABI = diff --git a/projects/crackandstack/index.js b/projects/crackandstack/index.js index 5207ad3835b0..8bbecfa14fbc 100644 --- a/projects/crackandstack/index.js +++ b/projects/crackandstack/index.js @@ -1,7 +1,7 @@ const { sumTokensExport } = require("../helper/unwrapLPs"); const coreAssets = require("../helper/coreAssets.json"); -const TAIKO_TOKEN = "0xA9d23408b9bA935c230493c40C73824Df71A0975"; +const TAIKO_TOKEN = ADDRESSES.taiko.TAIKO; const CONTRACTS = ["0x2c301eBfB0bb42Af519377578099b63E921515B7", "0xD8F7cd7d919c5266777FB83542F956dD30E80187", "0x12689b6ddE632E69fBAA70d066f86aC9fDd33dd1"]; diff --git a/projects/crosscurve/index.js b/projects/crosscurve/index.js index be9a056b48e2..1cd9439331ac 100644 --- a/projects/crosscurve/index.js +++ b/projects/crosscurve/index.js @@ -14,7 +14,7 @@ module.exports = { "0x390f3595bCa2Df7d23783dFd126427CCeb997BF4", // crvUSDT "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", // 3Crv "0xc4AD29ba4B3c580e6D59105FFf484999997675Ff", // crv3crypto - "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // WETH + ADDRESSES.ethereum.WETH, // WETH "0xb7ecb2aa52aa64a717180e030241bc75cd946726", // tBTC/WBTC ], }), @@ -31,7 +31,7 @@ module.exports = { "0x82670f35306253222F8a165869B28c64739ac62e", // 3c-crvUSD "0x73aF1150F265419Ef8a5DB41908B700C32D49135", // crvUSDT "0x7f90122BF0700F9E7e1F688fe926940E8839F353", // 2CRV - "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", // WETH + ADDRESSES.arbitrum.WETH, // WETH "0x186cf879186986a20aadfb7ead50e3c20cb26cec", // 2BTC-ng ], }), @@ -48,7 +48,7 @@ module.exports = { "0xe7a24ef0c5e95ffb0f6684b813a78f2a3ad7d171", // aave "0xa70af99bff6b168327f9d1480e29173e757c7904", // crvUSDT "0xdad97f7713ae9437fa9249920ec8507e5fbb23d3", // crv3crypto - "0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6", // WBTC + ADDRESSES.polygon.WBTC, // WBTC ], }), }, @@ -63,7 +63,7 @@ module.exports = { "0xc4ec3ab41182e70ca45a764ffc5c45b9a82ccc97", // crvUSDC "0xA5E0E46462970C9Ee8C2ECadcde254c483748Ec4", // b3pool "0xae87e5fa20f335ce14aa3b9e0616308d9ac7d4ce", // crvUSDT - "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", // BTCB + ADDRESSES.bsc.BTCB, // BTCB ], }), }, @@ -78,7 +78,7 @@ module.exports = { "0x03771e24b7c9172d163bf447490b142a15be3485", // crvUSDC "0x1337bedc9d22ecbe766df105c9623922a27963ec", // 3pool "0xd1b30ba128573fcd7d141c8a987961b40e047bb6", // crvUSDT - "0x4200000000000000000000000000000000000006", // WETH + ADDRESSES.optimism.WETH_1, // WETH "0x1dc5c0f8668a9f54ed922171d578011850ca0341", // 2BTC ], }), @@ -93,7 +93,7 @@ module.exports = { ADDRESSES.avax.DAI, // DAI "0x1337BedC9D22ecbe766dF105c9623922A27963EC", // av3crv "0x1daB6560494B04473A0BE3E7D83CF3Fdf3a51828", // crv3crypto - "0x152b9d0FdC40C096757F570A51E494bd4b943E50", // BTC.b + ADDRESSES.avax.BTC_b, // BTC.b ], }), }, @@ -102,7 +102,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ "0xf6C5F01C7F3148891ad0e19DF78743D31E390D1f", // 4pool - "0x4200000000000000000000000000000000000006", // WETH + ADDRESSES.optimism.WETH_1, // WETH "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf", // cbBTC ], }), @@ -119,7 +119,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0x4300000000000000000000000000000000000004", // WETH + ADDRESSES.blast.WETH, // WETH ], }), }, @@ -127,7 +127,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111", // WETH + ADDRESSES.mantle.WETH, // WETH ], }), }, @@ -135,7 +135,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", // WETH + ADDRESSES.linea.WETH, // WETH "0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4", // WBTC ], }), @@ -144,7 +144,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0xa51894664a773981c6c112c43ce576f315d5b1b6", // WETH + ADDRESSES.taiko.WETH, // WETH ], }), }, diff --git a/projects/deepbook-v3/index.js b/projects/deepbook-v3/index.js index 3d1582401743..6f8d51f4c5d5 100644 --- a/projects/deepbook-v3/index.js +++ b/projects/deepbook-v3/index.js @@ -1,12 +1,13 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { get } = require("../helper/http"); const coins = { deepType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP", suiType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI", - usdcType: "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + usdcType: ADDRESSES.sui.USDC_CIRCLE, bethType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH", - wusdtType: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN", - wusdcType: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", + wusdtType: ADDRESSES.sui.USDT, + wusdcType: ADDRESSES.sui.USDC, } const endpointUrl = "https://deepbook-indexer.mainnet.mystenlabs.com" diff --git a/projects/folks-xchain/constants.js b/projects/folks-xchain/constants.js index b55eca2b3e8e..8efed9a4abd0 100644 --- a/projects/folks-xchain/constants.js +++ b/projects/folks-xchain/constants.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const HubPoolAbi = { getDepositData: "function getDepositData() view returns (uint16 optimalUtilisationRatio, uint256 totalAmount, uint256 interestRate, uint256 interestIndex)", getVariableBorrowData: "function getVariableBorrowData() view returns (uint32 vr0, uint32 vr1, uint32 vr2, uint256 totalAmount, uint256 interestRate, uint256 interestIndex)", @@ -7,26 +8,26 @@ const HubPools = { 'avax': [ { // USDC poolAddress: "0x88f15e36308ED060d8543DA8E2a5dA0810Efded2", - tokenAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E", + tokenAddress: ADDRESSES.avax.USDC, }, { // AVAX poolAddress: "0x0259617bE41aDA4D97deD60dAf848Caa6db3F228", - tokenAddress: "0x0000000000000000000000000000000000000000", + tokenAddress: ADDRESSES.null, chainPoolAddress: '0xe69e068539Ee627bAb1Ce878843a6C76484CBd2c', }, { // sAVAX poolAddress: "0x7033105d1a527d342bE618ab1F222BB310C8d70b", - tokenAddress: "0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE", + tokenAddress: ADDRESSES.avax.SAVAX, chainPoolAddress: '0x23a96D92C80E8b926dA40E574d615d9e806A87F6', }, { // wETH_ava poolAddress: "0x795CcF6f7601edb41E4b3123c778C56F0F19389A", - tokenAddress: "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", + tokenAddress: ADDRESSES.avax.WETH_e, chainPoolAddress: '0x0e563B9fe6D9EF642bDbA20D53ac5137EB0d78DC', }, { // BTCb_ava poolAddress: "0x1C51AA1516e1156d98075F2F64e259906051ABa9", - tokenAddress: "0x152b9d0FdC40C096757F570A51E494bd4b943E50", + tokenAddress: ADDRESSES.avax.BTC_b, chainPoolAddress: '0xef7a6EBEDe2ad558DB8c36Df65365b209E5d57dC', }, ], @@ -34,20 +35,20 @@ const HubPools = { // excluding USDC cause bridged { // ETH_eth poolAddress: "0xB6DF8914C084242A19A4C7fb15368be244Da3c75", - tokenAddress: "0x0000000000000000000000000000000000000000", + tokenAddress: ADDRESSES.null, chainPoolAddress: '0xe3B0e4Db870aA58A24f87d895c62D3dc5CD05883', }, { // wBTC_eth poolAddress: "0x9936812835476504D6Cf495F4F0C718Ec19B3Aff", chainPoolAddress: "0xb39c03297E87032fF69f4D42A6698e4c4A934449", - tokenAddress: "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", + tokenAddress: ADDRESSES.ethereum.WBTC, }, ], 'base': [ // excluding USDC cause bridged { // ETH_base poolAddress: "0x51958ed7B96F57142CE63BB223bbd9ce23DA7125", - tokenAddress: "0x0000000000000000000000000000000000000000", + tokenAddress: ADDRESSES.null, chainPoolAddress: '0xe3B0e4Db870aA58A24f87d895c62D3dc5CD05883', }, { // cbBTC_base @@ -59,17 +60,17 @@ const HubPools = { 'bsc': [ { // BNB poolAddress: "0x89970d3662614a5A4C9857Fcc9D9C3FA03824fe3", - tokenAddress: "0x0000000000000000000000000000000000000000", + tokenAddress: ADDRESSES.null, chainPoolAddress: '0x5f2F4771B7dc7e2F7E9c1308B154E1e8957ecAB0', }, { // ETHB_bsc poolAddress: "0x18031B374a571F9e060de41De58Abb5957cD5258", - tokenAddress: "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", + tokenAddress: ADDRESSES.bsc.ETH, chainPoolAddress: '0x4Db12F554623E4B0b3F5bAcF1c8490D4493380A5', }, { // BTCB_bsc poolAddress: "0xC2FD40D9Ec4Ae7e71068652209EB75258809e131", - tokenAddress: "0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c", + tokenAddress: ADDRESSES.bsc.BTCB, chainPoolAddress: '0x12Db9758c4D9902334C523b94e436258EB54156f', }, ] diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 0c1a05eed32c..62dd00a4403f 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -41,7 +41,7 @@ const fixBalancesTokens = { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, shape: { - '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, + [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, '0x48A9B22b80F566E88f0f1DcC90Ea15A8A3bAE8a4': { coingeckoId: 'ethereum', decimals: 18 }, }, hela: { @@ -67,8 +67,8 @@ const fixBalancesTokens = { '0x51115241c7b8361eee88d8610f71d0a92cee5323': { coingeckoId: 'usd-coin', decimals: 6 }, }, lisk: { - '0x05d032ac25d322df992303dca074ee7392c117b9': { coingeckoId: 'tether', decimals: 6 }, - '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, + [ADDRESSES.bob.USDT]: { coingeckoId: 'tether', decimals: 6 }, + [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, '0xac485391eb2d7d88253a7f1ef18c37f4242d1a24': { coingeckoId: 'lisk', decimals: 18 }, }, bob: { @@ -79,22 +79,22 @@ const fixBalancesTokens = { flow: { '0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e': { coingeckoId: 'flow', decimals: 18 }, '0x1b97100ea1d7126c4d60027e231ea4cb25314bdb': { coingeckoId: 'ankr-staked-flow', decimals: 18 }, - '0x7f27352d5f83db87a5a3e00f4b07cc2138d8ee52': { coingeckoId: 'usd-coin', decimals: 6 }, + [ADDRESSES.milkomeda.BNB]: { coingeckoId: 'usd-coin', decimals: 6 }, }, core: { '0x782e2b85fda9a8224c17b191fc5de1e085a962b2': { coingeckoId: "wrapped-bitcoin-universal", decimals: 18 }, }, matchain: { [ADDRESSES.null]: { coingeckoId: 'binancecoin', decimals: 18 }, - '0x4200000000000000000000000000000000000006': { coingeckoId: 'binancecoin', decimals: 18 }, + [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'binancecoin', decimals: 18 }, }, rollux: { '0x570baA32dB74279a50491E88D712C957F4C9E409': { coingeckoId: 'uno-re', decimals: 18 }, - '0xaa1c53afd099e415208f47fcfa2c880f659e6904': { coingeckoId: 'weth', decimals: 18 }, - '0x2a4dc2e946b92ab4a1f7d62844eb237788f9056c': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, + [ADDRESSES.rollux.WETH]: { coingeckoId: 'weth', decimals: 18 }, + [ADDRESSES.rollux.WBTC]: { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, }, taiko: { - '0xd347949f8c85d9f3d6b06bfc4f8c2e07c161f064': { coingeckoId: "loopring", decimals: 18 }, + [ADDRESSES.taiko.LRC]: { coingeckoId: "loopring", decimals: 18 }, }, bitkub: { [ADDRESSES.bitkub.KKUB]: { coingeckoId: 'bitkub-coin', decimals: 18 }, @@ -112,8 +112,8 @@ const fixBalancesTokens = { wc: { '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1': { coingeckoId: 'usd-coin', decimals: 6 }, '0x2cFc85d8E48F8EAB294be644d9E25C3030863003': { coingeckoId: 'worldcoin-wld', decimals: 18 }, - '0x03C7054BCB39f7b2e5B2c7AcB37583e32D70Cfa3': { coingeckoId: 'bitcoin', decimals: 8 }, - '0x4200000000000000000000000000000000000006': { coingeckoId: 'weth', decimals: 18 } + [ADDRESSES.bob.WBTC]: { coingeckoId: 'bitcoin', decimals: 8 }, + [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'weth', decimals: 18 } }, apechain: { '0x48b62137EdfA95a428D35C09E44256a739F6B557': { coingeckoId: 'wrapped-apecoin', decimals: 18 }, @@ -121,7 +121,7 @@ const fixBalancesTokens = { '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, }, zircuit: { - '0x4200000000000000000000000000000000000006': { coingeckoId: 'ethereum', decimals: 18 }, + [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, }, bsquared: { '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3': { coingeckoId: 'lorenzo-stbtc', decimals: 18 } diff --git a/projects/infinite/index.js b/projects/infinite/index.js index d1428ff44ba1..5b7c53d3aa01 100644 --- a/projects/infinite/index.js +++ b/projects/infinite/index.js @@ -1,11 +1,12 @@ +const ADDRESSES = require('../helper/coreAssets.json') const ITP_VAULT_ADDRRESS= '0x23371aEEaF8718955C93aEC726b3CAFC772B9E37' const ITP_ON_OPTIMISM = "0x0a7B751FcDBBAA8BB988B9217ad5Fb5cfe7bf7A0"; const VELO_PRICE_ORACLE = "0x395942C2049604a314d39F370Dfb8D87AAC89e16"; -const WETH_TOKEN_ADDRESS = "0x4200000000000000000000000000000000000006"; +const WETH_TOKEN_ADDRESS = ADDRESSES.optimism.WETH_1; const VELO_TOKEN_ADDRESS = "0x3c8b650257cfb5f272f799f5e2b4e65093a11a05"; -const OP_TOKEN_ADDRESS = "0x4200000000000000000000000000000000000042"; -const USDC_OP_TOKEN_ADDRESS = "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"; +const OP_TOKEN_ADDRESS = ADDRESSES.optimism.OP; +const USDC_OP_TOKEN_ADDRESS = ADDRESSES.optimism.USDC_CIRCLE; const ITP_STAKED_ABI = "function getVaultInfo() view returns (uint256, uint256, uint256, uint256, uint256, uint256[], uint256)"; const getStakedTVL = async (api) => { diff --git a/projects/liquidity-slicing/index.js b/projects/liquidity-slicing/index.js index e5ec5a0d6ab8..4737eeb06712 100644 --- a/projects/liquidity-slicing/index.js +++ b/projects/liquidity-slicing/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { ethers } = require('ethers'); const abi = { diff --git a/projects/lorenzo/index.js b/projects/lorenzo/index.js index fe745f0aa1ad..b8a69bd003ad 100644 --- a/projects/lorenzo/index.js +++ b/projects/lorenzo/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/sumTokens"); const LorenzoOwners = [ diff --git a/projects/microcreditproject/index.js b/projects/microcreditproject/index.js index 17f5e34e55d7..6399d79c0afe 100644 --- a/projects/microcreditproject/index.js +++ b/projects/microcreditproject/index.js @@ -1,8 +1,9 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') const TOKENS = [ - '0x80b5a32E4F032B2a058b4F29EC95EEfEEB87aDcd', - '0x0CE35b0D42608Ca54Eb7bcc8044f7087C18E7717', + ADDRESSES.functionx.WFX, + ADDRESSES.islm.USDC, ] const INVESTMENT_CONTRACT = '0x951d1571C75C519Cc3D09b6B71595C6aCe1c06dB' diff --git a/projects/navi/index.js b/projects/navi/index.js index d84d474699ff..28a92dffd476 100644 --- a/projects/navi/index.js +++ b/projects/navi/index.js @@ -6,7 +6,7 @@ const decimalShift = { [ADDRESSES.sui.USDT]: -3, // USDT [ADDRESSES.sui.WETH]: -1, // WETH ["0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD"]: -3, // AUSD - ['0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN']: -1, // WBTC + [ADDRESSES.sui.WBTC]: -1, // WBTC [ADDRESSES.sui.USDC_CIRCLE]: -3, // native USDC ['0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH']: -1, // native ETH ['0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY']: -3, // USDY diff --git a/projects/primex-finance/index.js b/projects/primex-finance/index.js index d8e2ae856888..2065b18db1a1 100644 --- a/projects/primex-finance/index.js +++ b/projects/primex-finance/index.js @@ -22,7 +22,7 @@ const config = { EPMX: "0xDc6D1bd104E1efa4A1bf0BBCf6E0BD093614E31A", OM: "0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", SAND: "0xbbba073c31bf03b8acf7c28ef0738decf3695683", - QUICK: "0xb5c064f955d8e7f38fe0460c556a72987494ee17", + QUICK: ADDRESSES.polygon.QUICK, UNI: "0xb33eaad8d922b1083446dc23f610c2567fb5180f", MANA: "0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4", BAL: "0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3", @@ -34,9 +34,9 @@ const config = { SUSHI: "0x0b3f868e0be5597d5db7feb59e1cadbb0fdda50a", SOL: "0x7dff46370e9ea5f0bad3c4e29711ad50062ea7a4", PAXG: "0x553d3d295e0f695b9228246232edf400ed3560b5", - WSTETH: "0x03b54a6e9a984069379fae1a4fc4dbae93b3bccd", + WSTETH: ADDRESSES.polygon.WSTETH, LDO: "0xC3C7d422809852031b44ab29EEC9F1EfF2A58756", - FRAX: "0x45c32fa6df82ead1e2ef74d17b76547eddfaff89", + FRAX: ADDRESSES.polygon.FRAX, FXS: "0x1a3acf6d19267e2d3e7f898f42803e90c9219062" }, aaveTokens: { @@ -81,17 +81,17 @@ const config = { TIA: "0xD56734d7f9979dD94FAE3d67C7e928234e71cD4C", RPL: "0xB766039cc6DB368759C1E56B79AFfE831d0Cc507", AAVE: "0xba5DdD1f9d7F570dc94a51479a000E3BCE967196", - WSTETH: "0x5979D7b546E38E414F7E9822514be443A4800529", + WSTETH: ADDRESSES.arbitrum.WSTETH, RETH: "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", WEETH: "0x35751007a407ca6feffe80b3cb397736d2cf4dbe", ETHFI: "0x7189fb5B6504bbfF6a852B13B7B82a3c118fDc27", - EZETH: "0x2416092f143378750bb29b79eD961ab195CcEea5", + EZETH: ADDRESSES.optimism.ezETH, RSETH: "0x4186bfc76e2e237523cbc30fd220fe055156b41f", - USDE: "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34", + USDE: ADDRESSES.arbitrum.USDe, CBETH: "0x1debd73e752beaf79865fd6446b0c970eae7732f", USDY: "0x35e050d3C0eC2d29D269a8EcEa763a183bDF9A9D", TBTC: "0x6c84a8f1c29108f47a79964b5fe888d4f4d0de40", - FRAX: "0x17fc002b466eec40dae837fc4be5c67993ddbd6f", + FRAX: ADDRESSES.arbitrum.FRAX, FRXETH: "0x178412e79c25968a32e89b11f63b33f733770c2a", SFRXETH: "0x95ab45875cffdba1e5f451b950bc2e42c0053f39" }, @@ -129,27 +129,27 @@ const config = { EPMX: "0xA533f744B179F2431f5395978e391107DC76e103", POL: "0x455e53cbb86018ac2b8092fdcd39d8444affc3f6", PAXG: "0x45804880de22913dafe09f4980848ece6ecbaf78", - WSTETH: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0", - RETH: "0xae78736cd615f374d3085123a210448e74fc6393", - SDAI: "0x83F20F44975D03b1b09e64809B757c47f942BEeA", + WSTETH: ADDRESSES.ethereum.WSTETH, + RETH: ADDRESSES.ethereum.RETH, + SDAI: ADDRESSES.ethereum.SDAI, WEETH: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee", ETHFI: "0xfe0c30065b384f05761f15d0cc899d4f9f9cc0eb", - LDO: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32", + LDO: ADDRESSES.ethereum.LIDO, EZETH: "0xbf5495efe5db9ce00f80364c8b423567e58d2110", RSETH: "0xa1290d69c65a6fe4df752f95823fae25cb99e5a7", RSWETH: "0xfae103dc9cf190ed75350761e95403b7b8afa6c0", - USDE: "0x4c9edd5852cd905f086c759e8383e09bff1e68b3", - SUSDE: "0x9d39a5de30e57443bff2a8307a4256c8797a3497", + USDE: ADDRESSES.ethereum.USDe, + SUSDE: ADDRESSES.ethereum.sUSDe, PUFETH: "0xd9a442856c234a39a81a089c06451ebaa4306a72", - CDETH: "0xbe9895146f7af43049ca1c1ae358b0541ea49704", + CDETH: ADDRESSES.ethereum.cbETH, USDP: "0x8e870d67f660d95d5be530380d0ec0bd388289e1", PYUSD: "0x6c3ea9036406852006290770bedfcaba0e23a0e8", ONDO: "0xfaba6f8e4a5e8ab82f62fe7c39859fa577269be3", - TBTC: "0x18084fba666a33d37592fa2633fd49a74dd93a88", - FRAX: "0x853d955acef822db058eb8505911ed77f175b99e", - FXS: "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0", + TBTC: ADDRESSES.ethereum.tBTC, + FRAX: ADDRESSES.ethereum.FRAX, + FXS: ADDRESSES.ethereum.FXS, FRXETH: "0x5e8422345238f34275888049021821e8e08caa1f", - SFRXETH: "0xac3e018457b222d93114458476f3e3416abbe38f" + SFRXETH: ADDRESSES.ethereum.sfrxETH }, aaveTokens: { [ADDRESSES.ethereum.WETH]: "0x4d5F47FA6A74757f35C14fD3a6Ef8E3C9BC514E8", diff --git a/projects/radiant-v2/index.js b/projects/radiant-v2/index.js index 9dddd86c3998..a02299a4b66b 100644 --- a/projects/radiant-v2/index.js +++ b/projects/radiant-v2/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { staking } = require("../helper/staking"); const { sumTokensExport } = require("../helper/unwrapLPs"); const { aaveExports, methodology, } = require("../helper/aave"); @@ -41,12 +42,12 @@ const config = { '0x58b0BB56CFDfc5192989461dD43568bcfB2797Db', '0x6350e53461c7C95964D699cfa4e84cec993eebb1' ] , tokens: [ - '0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c', - '0x55d398326f99059fF775485246999027B3197955', - '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56', - '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d', - '0x2170Ed0880ac9A755fd29B2688956BD959F933F8', - '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', + ADDRESSES.bsc.BTCB, + ADDRESSES.bsc.USDT, + ADDRESSES.bsc.BUSD, + ADDRESSES.bsc.USDC, + ADDRESSES.bsc.ETH, + ADDRESSES.bsc.WBNB, '0xa2E3356610840701BDf5611a53974510Ae27E2e1' ]}, arbitrum: {aTokens: [ @@ -63,18 +64,18 @@ const config = { '0xd15a6568Dc891Fd04Aa2f64aF56C66C2bede59d6', '0x19f0bE6a603967c72bE32a30915a38d52cA31Ae2' ] , tokens: [ - '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f', - '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9', - '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8', - '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1', - '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', - '0x5979D7b546E38E414F7E9822514be443A4800529', - '0x912CE59144191C1204E64559FE8253a0e49E6548', - '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', + ADDRESSES.arbitrum.WBTC, + ADDRESSES.arbitrum.USDT, + ADDRESSES.arbitrum.USDC, + ADDRESSES.optimism.DAI, + ADDRESSES.arbitrum.WETH, + ADDRESSES.arbitrum.WSTETH, + ADDRESSES.arbitrum.ARB, + ADDRESSES.arbitrum.USDC_CIRCLE, '0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe', '0x47c031236e19d024b42f8AE6780E44A573170703', '0x70d95587d40A2caf56bd97485aB3Eec10Bee6336', - '0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34' + ADDRESSES.arbitrum.USDe ]}, } diff --git a/projects/root-finance/index.js b/projects/root-finance/index.js index 701d7b7b4087..b731b4f68c30 100644 --- a/projects/root-finance/index.js +++ b/projects/root-finance/index.js @@ -17,7 +17,7 @@ const pools = [ }, { pool: 'component_rdx1cr87dx5laxnffdkyv4fsrwms3m62vexgye9x9xpxyrv63gzpgwt97d', - resource: 'resource_rdx1th88qcj5syl9ghka2g9l7tw497vy5x6zaatyvgfkwcfe8n9jt2npww', + resource: ADDRESSES.radixdlt.WETH, }, { pool: 'component_rdx1czuk76y4vhgd44sxly0un2tqegws670dqp0usl2tlsgfkhmdl8dad3', diff --git a/projects/seer/index.js b/projects/seer/index.js index eef13ffa86aa..e5fc7b982ca4 100644 --- a/projects/seer/index.js +++ b/projects/seer/index.js @@ -1,13 +1,14 @@ +const ADDRESSES = require('../helper/coreAssets.json') const config = { 'ethereum': { marketFactory: ['0x1F728c2fD6a3008935c1446a965a313E657b7904'], marketView: '0xAb797C4C6022A401c31543E316D3cd04c67a87fC', - collateralToken: '0x83F20F44975D03b1b09e64809B757c47f942BEeA' + collateralToken: ADDRESSES.ethereum.SDAI }, 'xdai': { marketFactory: ['0x83183DA839Ce8228E31Ae41222EaD9EDBb5cDcf1'], marketView: '0x995dC9c89B6605a1E8cc028B37cb8e568e27626f', - collateralToken: '0xaf204776c7245bf4147c2612bf6e5972ee483701' + collateralToken: ADDRESSES.xdai.SDAI }, } @@ -84,7 +85,7 @@ function calculateTotalSupply(marketsData) { // Merge child market supplies into parent markets marketsData.forEach((market) => { - if (market.parentMarket !== '0x0000000000000000000000000000000000000000') { + if (market.parentMarket !== ADDRESSES.null) { const parentSupply = marketSupplies.get(market.parentMarket); const childSupply = marketSupplies.get(market.id); @@ -99,7 +100,7 @@ function calculateTotalSupply(marketsData) { // Calculate total supply of parent markets (parent markets are backed by sDAI) let totalSupply = 0; marketsData.forEach((market) => { - if (market.parentMarket === '0x0000000000000000000000000000000000000000') { + if (market.parentMarket === ADDRESSES.null) { const marketSupply = marketSupplies.get(market.id); if (marketSupply) { totalSupply += marketSupply.reduce((a, b) => a > b ? a : b, 0); diff --git a/projects/swell-earn-eth/index.js b/projects/swell-earn-eth/index.js index eb00e8e51de8..873acfa41c78 100644 --- a/projects/swell-earn-eth/index.js +++ b/projects/swell-earn-eth/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require('../helper/unwrapLPs') const earnETHVault = '0x9Ed15383940CC380fAEF0a75edacE507cC775f22'; @@ -5,8 +6,8 @@ const earnETHVault = '0x9Ed15383940CC380fAEF0a75edacE507cC775f22'; const tokens = [ '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', // rswETH '0xf951E335afb289353dc249e82926178EaC7DEd78', // swETH - '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0', // wstETH - '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH + ADDRESSES.ethereum.WSTETH, // wstETH + ADDRESSES.ethereum.WETH, // WETH ] const tvl = async (api) => { diff --git a/projects/taidog/index.js b/projects/taidog/index.js index 8e56a5ad2de3..b7a89476a5fd 100644 --- a/projects/taidog/index.js +++ b/projects/taidog/index.js @@ -7,7 +7,7 @@ const TAIDOG_STAKING_CONTRACT = "0x9b4484D5A2665930702d09f74086CAD86d96b25E"; const TAIDOG_WETH_LP = "0x28Be5f9caBd48B712a031a901590b71f5509526D"; const LP_STAKING_CONTRACT = "0xD664c3b22c60b4927ab1e0035b99F157bc2d8F1B"; -const TAIKO_TOKEN = "0xA9d23408b9bA935c230493c40C73824Df71A0975"; +const TAIKO_TOKEN = ADDRESSES.taiko.TAIKO; const TAIKO_STAKING_CONTRACT = "0x89a95021E45AcAB4B89eb20C18691E3E0D1d2170"; async function poolsTvl(api) { diff --git a/projects/taikodrips/index.js b/projects/taikodrips/index.js index 31d1ce46e13b..6a13030c3be8 100644 --- a/projects/taikodrips/index.js +++ b/projects/taikodrips/index.js @@ -1,6 +1,7 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { staking } = require("../helper/staking") -const TaikoToken = "0xA9d23408b9bA935c230493c40C73824Df71A0975" +const TaikoToken = ADDRESSES.taiko.TAIKO const FarmingContract = '0xf90209C44dBf5Fa3d40ac85a008206b5A8c24899' module.exports = { diff --git a/projects/trado/index.js b/projects/trado/index.js index 5923a87d7f53..ddc132d3f802 100644 --- a/projects/trado/index.js +++ b/projects/trado/index.js @@ -1,7 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/unwrapLPs"); // perp -const USDCe = '0x7f27352D5F83Db87a5A3E00f4B07Cc2138D8ee52' +const USDCe = ADDRESSES.milkomeda.BNB const USDX = '0xAeBE92ebc1a67F810Cb35fdcdA6398f6136DCD50' module.exports = { diff --git a/projects/tron-btc/index.js b/projects/tron-btc/index.js index e253ef5202f9..b12cff75602f 100644 --- a/projects/tron-btc/index.js +++ b/projects/tron-btc/index.js @@ -27,7 +27,7 @@ module.exports = { merlin: { tvl: sumTokensExport({ owners: ["0x06fe862f2eefe9a5e9a2cf9799941706665e833a"], - tokens: ["0xb880fd278198bd590252621d4cd071b1842e9bcd", "0x93919784c523f39cacaa98ee0a9d96c3f32b593e"] // M-BTC AND UNIBTC + tokens: [ADDRESSES.merlin.WBTC_1, "0x93919784c523f39cacaa98ee0a9d96c3f32b593e"] // M-BTC AND UNIBTC }), }, zklink: { @@ -69,7 +69,7 @@ module.exports = { bsc: { tvl: sumTokensExport({ owners: ["0x533806b821ec94091228d7d34e697b93bb79f8f6"], - tokens: ["0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", ] // BTCB + tokens: [ADDRESSES.bsc.BTCB, ] // BTCB }), }, }; \ No newline at end of file diff --git a/projects/unore/index.js b/projects/unore/index.js index c3ab008095a1..2e173218aacd 100644 --- a/projects/unore/index.js +++ b/projects/unore/index.js @@ -33,7 +33,7 @@ const config = { rollux: { uToken: uno_rollux, // UNO Rollux token for staking only tokensAndOwners: [ - ['0x4200000000000000000000000000000000000006', '0x7393310FdC8ed40B35D2afD79848BC7166Ae0474'], // Plutus + [ADDRESSES.optimism.WETH_1, '0x7393310FdC8ed40B35D2afD79848BC7166Ae0474'], // Plutus ], pools: [ '0x8685C2b4D2024805a1FF6831Bc4cc8569457811D', // Athena diff --git a/projects/velvet-capital-v3/index.js b/projects/velvet-capital-v3/index.js index 978856c9a193..e5d4f0f52c03 100644 --- a/projects/velvet-capital-v3/index.js +++ b/projects/velvet-capital-v3/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require('../helper/unwrapLPs') async function tvl(api) { @@ -9,10 +10,10 @@ async function tvl(api) { const blacklistsByChain = { base: [ - "0x55d398326f99059ff775485246999027b3197955" + ADDRESSES.bsc.USDT ], bsc: [ - "0x4200000000000000000000000000000000000006" + ADDRESSES.optimism.WETH_1 ] } diff --git a/projects/yel/index.js b/projects/yel/index.js index e1b1a5a91187..0087bc801a10 100644 --- a/projects/yel/index.js +++ b/projects/yel/index.js @@ -26,8 +26,8 @@ const config = { ], tokensAndOwners: [ // Token Potion(lToken) slToken - ['0x4300000000000000000000000000000000000004', '0x795a85CD543D0E2d29F7e11e33a20a38A4b5121e', '0x7D8490333315EaAa5e93F3C6983d1e8128D7f50f' ], - ['0xb1a5700fa2358173fe465e6ea4ff52e36e88e2ad', '0x07BF0Bc908Ef4badF8ec0fB1f77A8dBFe33c33c0', '0x73681f24a4a099E71e0Ddd084f2310bA1E0b3a36' ], + [ADDRESSES.blast.WETH, '0x795a85CD543D0E2d29F7e11e33a20a38A4b5121e', '0x7D8490333315EaAa5e93F3C6983d1e8128D7f50f' ], + [ADDRESSES.blast.BLAST, '0x07BF0Bc908Ef4badF8ec0fB1f77A8dBFe33c33c0', '0x73681f24a4a099E71e0Ddd084f2310bA1E0b3a36' ], ], }, base: { @@ -37,8 +37,8 @@ const config = { ], tokensAndOwners: [ // Token Potion(lToken) slToken - ['0x4200000000000000000000000000000000000006', '0x0540f15374eCF13aAB3c0a76b643333CE0D00579', '0x0E7De1d6A1aA4178CBfce3dE4EAaD0427034f924'], - ['0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', '0xE7349C94BDE0D13599Ed496342857bb231FeF02B', '0xabb4D7866e1059bD21581FC5FC6D49388D30a323'], + [ADDRESSES.optimism.WETH_1, '0x0540f15374eCF13aAB3c0a76b643333CE0D00579', '0x0E7De1d6A1aA4178CBfce3dE4EAaD0427034f924'], + [ADDRESSES.base.USDC, '0xE7349C94BDE0D13599Ed496342857bb231FeF02B', '0xabb4D7866e1059bD21581FC5FC6D49388D30a323'], ['0x1509706a6c66CA549ff0cB464de88231DDBe213B', '0x8a27CE3A836C8A9D962D86C099f229f3baF3EB4a', '0xFfeC8bAAa8cf32Bc7F85ea6a7C44Ad541309FD1F'] ], } diff --git a/projects/zircuit/index.js b/projects/zircuit/index.js index 8cd2852393e1..7aa750582cf6 100644 --- a/projects/zircuit/index.js +++ b/projects/zircuit/index.js @@ -34,18 +34,18 @@ const TOKEN_CONTRACTS_ETHEREUM = [ ]; const TOKEN_CONTRACTS_ZIRCUIT = [ - '0x4200000000000000000000000000000000000006', // wETH + ADDRESSES.optimism.WETH_1, // wETH '0x91a0F6EBdCa0B4945FbF63ED4a95189d2b57163D', // mETH '0xD8b29106d4ceBad087C30B10c0E41BAa3A9ea703', // rswETH '0x850CDF416668210ED0c36bfFF5d21921C7adA3b8', // swETH '0xF469fBD2abcd6B9de8E169d128226C0Fc90a012e', // pumpBTC '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7', // pzETH - '0x80137510979822322193FC997d400D5A6C747bf7', // STONE - '0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34', // USDe + ADDRESSES.scroll.STONE, // STONE + ADDRESSES.arbitrum.USDe, // USDe '0xF97c7A9bECe498FD6e31e344643589aACC96206A', // LsETH '0x4186BFC76E2E237523CBC30FD220FE055156b41F', // rsETH '0xf0e673Bc224A8Ca3ff67a61605814666b1234833', // wstETH - '0x2416092f143378750bb29b79eD961ab195CcEea5', // ezETH + ADDRESSES.optimism.ezETH, // ezETH '0x3535DF6e1d776631D0cBA53FE9efD34bCbDcEeD4', // weETH '0x4b03831043082E3e5191218ad5331E99AaaC4A81', // weETHs '0x5661cE45EE081CbE1f81BF23E46f4E01E11795D4' // FBTC From 8ffa74db8bbb16a4202d8f125a2c719fafad2f92 Mon Sep 17 00:00:00 2001 From: fico23 Date: Thu, 31 Oct 2024 06:56:39 +0100 Subject: [PATCH 159/787] AERA Finance - add gearbox, arrakis and llamapay integrations (#12116) --- projects/aera/index.js | 227 ++++++++++++++++++++++++++++------------- 1 file changed, 157 insertions(+), 70 deletions(-) diff --git a/projects/aera/index.js b/projects/aera/index.js index 68c73fe61f54..4e6dadc4f727 100644 --- a/projects/aera/index.js +++ b/projects/aera/index.js @@ -4,6 +4,9 @@ const { getLogs } = require('../helper/cache/getLogs') const COMPOUND_ORACLE_NAME = 'CompoundV3PositionOracle' const AAVE_ORACLE_NAME = 'AaveV3PositionOracle' +const LLAMAPAY_ROUTER_ORACLE_NAME = 'LlamaPayRouterOracle' +const GEARBOX_TOKEN_PREFIX = 'Farming of' +const ARRAKIS_TOKEN_PREFIX = 'Arrakis Vault V2' const config = { polygon: { @@ -16,6 +19,7 @@ const config = { } ], cometReward: '0x45939657d1CA34A8FA39A924B71D28Fe8431e581', + arrakisHelper: '0x89E4bE1F999E3a58D16096FBe405Fc2a1d7F07D6', vaultFactories: [ { address: "0xfa6295a04f99815e8fa65240ed2cf9ad383c50ba", @@ -49,6 +53,7 @@ const config = { } ], cometReward: '0x1B0e765F6224C21223AeA2af16c1C46E38885a40', + arrakisHelper: '0x89E4bE1F999E3a58D16096FBe405Fc2a1d7F07D6', vaultFactories: [ { address: "0x8a7c03e9f037ba096f1fa8b48bfd65c7578327c9", @@ -86,6 +91,7 @@ const config = { }, ], cometReward: '0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae', + arrakisHelper: '0x89E4bE1F999E3a58D16096FBe405Fc2a1d7F07D6', vaultFactories: [ { address: "0xaF2762E1F75DeCdb8d240576e7A2CEc1A365cD46", @@ -111,6 +117,7 @@ const config = { }, ], cometReward: '0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1', + arrakisHelper: '0x89E4bE1F999E3a58D16096FBe405Fc2a1d7F07D6', vaultFactories: [ { address: "0x5CD0Cb0DcDEF98a8d07a8D44054a13F2c35C53E1", @@ -130,6 +137,7 @@ Object.keys(config).forEach(chain => { const AAVE_POOL_DATA_PROVIDER = config[chain].aavePoolDataProvider const COMETS = config[chain].comets const COMET_REWARD = config[chain].cometReward + const ARRAKIS_HELPER = config[chain].arrakisHelper const vaultFactories = config[chain].vaultFactories const vaultCreateds = [] @@ -153,24 +161,44 @@ Object.keys(config).forEach(chain => { }) const assets = await api.multiCall({ abi: abi.assets, calls: assetRegistries }) + const uniqueAssets = [...new Set(assets.flatMap(x => x.map(y => y.asset)))] + const assetNames = await api.multiCall({ abi: 'string:name', calls: uniqueAssets, permitFailure: true }) const erc4626sAndOwners = [] const tokensAndOwners = [] const erc4626UnderylingMap = {} - const positions = [] + const aaveVaults = [] + const compoundVaults = [] + const llamapayRouters = [] + const gearboxFarmingPools = [] + const arrakisVaults = [] for (let i = 0; i < vaults.length; ++i) { const vault = vaults[i] for (let j = 0; j < assets[i].length; ++j) { const assetInfo = assets[i][j] - // position assets - if (assetInfo.asset === assetInfo.oracle) { - positions.push([assetInfo.asset, vault]) - continue + const assetName = assetNames[uniqueAssets.findIndex(x => x === assetInfo.asset)] + if (assetName) { + if (assetName === COMPOUND_ORACLE_NAME) { + compoundVaults.push(vault) + } + if (assetName === AAVE_ORACLE_NAME) { + aaveVaults.push(vault) + } + if (assetName === LLAMAPAY_ROUTER_ORACLE_NAME) { + llamapayRouters.push(assetInfo.asset) + } + if (assetName.startsWith(GEARBOX_TOKEN_PREFIX)) { + gearboxFarmingPools.push([vault, assetInfo.asset]) + } + if (assetName.startsWith(ARRAKIS_TOKEN_PREFIX)) { + arrakisVaults.push(assetInfo.asset) + } } + if (assetInfo.isERC4626) { if (!erc4626UnderylingMap[assetInfo.asset]) erc4626UnderylingMap[assetInfo.asset] = null erc4626sAndOwners.push([assetInfo.asset, vault]) @@ -180,12 +208,17 @@ Object.keys(config).forEach(chain => { } } - const [underlyingTokens, vaultErc4626Balances, tokenNames,] = await Promise.all([ + const [underlyingTokens, vaultErc4626Balances] = await Promise.all([ api.multiCall({ abi: 'address:asset', calls: Object.keys(erc4626UnderylingMap) }), api.multiCall({ abi: 'erc20:balanceOf', calls: erc4626sAndOwners.map(x => ({ target: x[0], params: x[1] })) }), - api.multiCall({ abi: 'string:name', calls: positions.map(x => x[0]), permitFailure: true }), ]) - await processLendingTvls(positions, tokenNames, api, AAVE_POOL, AAVE_POOL_DATA_PROVIDER, COMETS, vaults, COMET_REWARD) + await Promise.all([ + processAaveTvl(aaveVaults, api, AAVE_POOL, AAVE_POOL_DATA_PROVIDER), + processCompoundTvl(compoundVaults, api, COMETS, vaults, COMET_REWARD), + processLlamaPayTvl(llamapayRouters, api), + processGearboxTvl(gearboxFarmingPools, api), + processArrakisTvl(arrakisVaults, api, ARRAKIS_HELPER) + ]) Object.keys(erc4626UnderylingMap).forEach((erc4626Asset, i) => erc4626UnderylingMap[erc4626Asset] = underlyingTokens[i]) @@ -201,80 +234,118 @@ Object.keys(config).forEach(chain => { } }) -async function processLendingTvls(positions, tokenNames, api, AAVE_POOL, AAVE_POOL_DATA_PROVIDER, COMETS, vaults, COMET_REWARD) { - const compoundVaults = []; - const aaveVaults = []; - for (let i = 0; i < positions.length; ++i) { - if (tokenNames[i] === COMPOUND_ORACLE_NAME) { - compoundVaults.push(positions[i][1]); - } else if (tokenNames[i] === AAVE_ORACLE_NAME) { - aaveVaults.push(positions[i][1]); - } - } +async function processArrakisTvl(arrakisVaults, api, arrakisHelper) { + if (arrakisVaults.length === 0) return + + const [tokens0, tokens1, totalUnderlyings] = await Promise.all([ + api.multiCall({ abi: abi.token0, calls: arrakisVaults}), + api.multiCall({ abi: abi.token1, calls: arrakisVaults}), + api.multiCall({ abi: abi.totalUnderlying, calls: arrakisVaults.map(x => ({target: arrakisHelper, params: [x]}))}) + ]) + + totalUnderlyings.forEach((v, i) => { + api.addToken(tokens0[i], v.totalAmount0) + api.addToken(tokens1[i], v.totalAmount1) + }) +} + +async function processGearboxTvl(farmingPools, api) { + if (farmingPools.length === 0) return + + const [stakingTokens, stakingTokenBalances, rewardTokens, farmed] = await Promise.all([ + api.multiCall({ abi: abi.stakingToken, calls: farmingPools.map(x => x[1])}), + api.multiCall({ abi: 'erc20:balanceOf', calls: farmingPools.map(x => ({target: x[1], params:[x[0]]}))}), + api.multiCall({ abi: abi.rewardsToken, calls: farmingPools.map(x => x[1])}), + api.multiCall({ abi: abi.farmed, calls: farmingPools.map(x => ({target: x[1], params: [x[0]]}))}) + ]) + + const [underlyingTokens, underlyingBalances] = await Promise.all([ + api.multiCall({ abi: 'address:asset', calls: stakingTokens}), + api.multiCall({ abi: abi.convertToAssets, calls: stakingTokens.map((x, i) => ({target: x, params: [stakingTokenBalances[i]]}))}) + ]) + + rewardTokens.forEach((rewardToken, i) => { + api.addToken(rewardToken, farmed[i]) + }) + underlyingTokens.forEach((underlyingToken, i) => { + api.addToken(underlyingToken, underlyingBalances[i]) + }) +} - await Promise.all([ - processAaveTvl(aaveVaults, api, AAVE_POOL, AAVE_POOL_DATA_PROVIDER), - processCompoundTvl(compoundVaults, api, COMETS, vaults, COMET_REWARD) +async function processLlamaPayTvl(llamaPayRouters, api) { + if (llamaPayRouters.length === 0) return + + const llamaPayInfos = await api.multiCall({ abi: abi.llamaPayInfoList, calls: llamaPayRouters.map(x => ({target: x})) }) + + const [llamaPayTokens, decimalDivisors, llamaPayBalances] = await Promise.all([ + api.multiCall({abi: abi.token, calls: llamaPayInfos.flatMap(x => x.map(y => y[0]))}), + api.multiCall({abi: abi.DECIMALS_DIVISOR, calls: llamaPayInfos.flatMap(x => x.map(y => y[0]))}), + api.multiCall({abi: abi.balances, calls: llamaPayInfos.flatMap((v, i) => v.map(y => ({target: y[0], params:[llamaPayRouters[i]]})))}) ]) + + llamaPayTokens.forEach((token, i) => { + api.addToken(token, BigInt(llamaPayBalances[i]) / BigInt(decimalDivisors[i])) + }) } async function processCompoundTvl(compoundVaults, api, COMETS, vaults, COMET_REWARD) { - if (compoundVaults.length) { - const numAssets = await api.multiCall({ abi: 'uint8:numAssets', calls: COMETS.map(x => x.address) }); - - - const collateralCalls = []; - COMETS.forEach((comet, i) => [...Array(parseInt(numAssets[i])).keys()].forEach(assetIndex => collateralCalls.push({ target: comet.address, params: assetIndex }))); - const balanceOfCalls = []; - vaults.forEach(vault => COMETS.forEach(comet => balanceOfCalls.push({ target: comet.address, params: vault, baseToken: comet.baseToken }))); - const rewardOwedCalls = []; - vaults.forEach(vault => COMETS.forEach(comet => rewardOwedCalls.push({ target: COMET_REWARD, params: [comet.address, vault] }))); - - const [collateralInfos, balanceOfs, borrowBalanceOfs, rewardOwed] = await Promise.all([ - api.multiCall({ abi: abi.getAssetInfo, calls: collateralCalls }), - api.multiCall({ abi: 'erc20:balanceOf', calls: balanceOfCalls }), - api.multiCall({ abi: abi.borrowBalanceOf, calls: balanceOfCalls }), - api.multiCall({ abi: abi.getRewardOwed, calls: rewardOwedCalls }) - ]); - - balanceOfs.forEach((balance, i) => { - const sum = (BigInt(balance) - BigInt(borrowBalanceOfs[i])).toString(); - api.addToken(balanceOfCalls[i].baseToken, sum); - }); - - rewardOwed.forEach(reward => { - api.addToken(reward.token, reward.owed); - }); - - const collateralBalanceOfCalls = []; - vaults.forEach(vault => collateralInfos.forEach((collateral, i) => collateralBalanceOfCalls.push({ target: collateralCalls[i].target, params: [vault, collateral.asset] }))); - const collateralBalanceOfs = await api.multiCall({ abi: abi.collateralBalanceOf, calls: collateralBalanceOfCalls }); - - collateralBalanceOfs.forEach((balance, i) => { - api.addToken(collateralBalanceOfCalls[i].params[1], balance); - }); - } + if (compoundVaults.length === 0 || !COMETS || !COMET_REWARD) return + + const numAssets = await api.multiCall({ abi: 'uint8:numAssets', calls: COMETS.map(x => x.address) }); + + + const collateralCalls = []; + COMETS.forEach((comet, i) => [...Array(parseInt(numAssets[i])).keys()].forEach(assetIndex => collateralCalls.push({ target: comet.address, params: assetIndex }))); + const balanceOfCalls = []; + vaults.forEach(vault => COMETS.forEach(comet => balanceOfCalls.push({ target: comet.address, params: vault, baseToken: comet.baseToken }))); + const rewardOwedCalls = []; + vaults.forEach(vault => COMETS.forEach(comet => rewardOwedCalls.push({ target: COMET_REWARD, params: [comet.address, vault] }))); + + const [collateralInfos, balanceOfs, borrowBalanceOfs, rewardOwed] = await Promise.all([ + api.multiCall({ abi: abi.getAssetInfo, calls: collateralCalls }), + api.multiCall({ abi: 'erc20:balanceOf', calls: balanceOfCalls }), + api.multiCall({ abi: abi.borrowBalanceOf, calls: balanceOfCalls }), + api.multiCall({ abi: abi.getRewardOwed, calls: rewardOwedCalls }) + ]); + + balanceOfs.forEach((balance, i) => { + const sum = (BigInt(balance) - BigInt(borrowBalanceOfs[i])).toString(); + api.addToken(balanceOfCalls[i].baseToken, sum); + }); + + rewardOwed.forEach(reward => { + api.addToken(reward.token, reward.owed); + }); + + const collateralBalanceOfCalls = []; + vaults.forEach(vault => collateralInfos.forEach((collateral, i) => collateralBalanceOfCalls.push({ target: collateralCalls[i].target, params: [vault, collateral.asset] }))); + const collateralBalanceOfs = await api.multiCall({ abi: abi.collateralBalanceOf, calls: collateralBalanceOfCalls }); + + collateralBalanceOfs.forEach((balance, i) => { + api.addToken(collateralBalanceOfCalls[i].params[1], balance); + }); } async function processAaveTvl(aaveVaults, api, AAVE_POOL, AAVE_POOL_DATA_PROVIDER) { - if (aaveVaults.length) { - const aaveReservesList = await api.call({ abi: abi.getReservesList, target: AAVE_POOL }); + if (aaveVaults.length === 0 || !AAVE_POOL || !AAVE_POOL_DATA_PROVIDER) return - const aaveReserveDetails = await api.multiCall({ abi: abi.getReserveData, target: AAVE_POOL, calls: aaveReservesList }); + const aaveReservesList = await api.call({ abi: abi.getReservesList, target: AAVE_POOL }); - const aaveQueryParams = []; - aaveReservesList.forEach(asset => aaveVaults.forEach(vault => aaveQueryParams.push({ params: [asset, vault], }))); - const aavePositions = await api.multiCall({ abi: abi.getUserReserveData, target: AAVE_POOL_DATA_PROVIDER, calls: aaveQueryParams }); + const aaveReserveDetails = await api.multiCall({ abi: abi.getReserveData, target: AAVE_POOL, calls: aaveReservesList }); - for (const i in aavePositions) { - const aavePosition = aavePositions[i]; - const reserveIdx = aaveReservesList.findIndex(x => x === aaveQueryParams[i].params[0]); + const aaveQueryParams = []; + aaveReservesList.forEach(asset => aaveVaults.forEach(vault => aaveQueryParams.push({ params: [asset, vault], }))); + const aavePositions = await api.multiCall({ abi: abi.getUserReserveData, target: AAVE_POOL_DATA_PROVIDER, calls: aaveQueryParams }); - api.addToken(aaveReserveDetails[reserveIdx].aTokenAddress, aavePosition.currentATokenBalance); - api.addToken(aaveReserveDetails[reserveIdx].stableDebtTokenAddress, aavePosition.currentStableDebt); - api.addToken(aaveReserveDetails[reserveIdx].variableDebtTokenAddress, aavePosition.currentVariableDebt); - } + for (const i in aavePositions) { + const aavePosition = aavePositions[i]; + const reserveIdx = aaveReservesList.findIndex(x => x === aaveQueryParams[i].params[0]); + + api.addToken(aaveReserveDetails[reserveIdx].aTokenAddress, aavePosition.currentATokenBalance); + api.addToken(aaveReserveDetails[reserveIdx].stableDebtTokenAddress, aavePosition.currentStableDebt); + api.addToken(aaveReserveDetails[reserveIdx].variableDebtTokenAddress, aavePosition.currentVariableDebt); } + } const abi = { @@ -286,5 +357,21 @@ const abi = { "getReservesList": "address[]:getReservesList", "getAssetInfo": "function getAssetInfo(uint8 i) view returns ((uint8 offset, address asset, address priceFeed, uint64 scale, uint64 borrowCollateralFactor, uint64 liquidateCollateralFactor, uint64 liquidationFactor, uint128 supplyCap))", "borrowBalanceOf": "function borrowBalanceOf(address account) view returns (uint256)", - "getRewardOwed": "function getRewardOwed(address comet, address account) returns ((address token, uint256 owed))" + "getRewardOwed": "function getRewardOwed(address comet, address account) returns ((address token, uint256 owed))", + "llamaPayCount": "function llamaPayCount() returns (uint256 count)", + "llamaPayInfoList": "function llamaPayInfoList() returns ((address llamapay, address priceFeed, bool invertPrice)[])", + "token": "function token() returns (address token)", + "balances": "function balances(address) returns (uint256)", + "DECIMALS_DIVISOR": "function DECIMALS_DIVISOR() returns (uint256)", + "stakingToken": "function stakingToken() returns (address)", + "rewardsToken": "function rewardsToken() returns (address)", + "farmed": "function farmed(address) returns (uint256)", + "totalUnderlying": "function totalUnderlying(address) returns (uint256 totalAmount0, uint256 totalAmount1)", + "token0": "function token0() returns (address)", + "token1": "function token1() returns (address)", + "stakerStrategyShares": "function stakerStrategyShares(address,address) returns (uint256)", + "strategy": "function stakerStrategyShares() returns (address)", + "underlyingToken": "function underlyingToken() returns (address)", + "sharesToUnderlyingView": "function sharesToUnderlyingView(uint256) returns (uint256)", + "queuedWithdrawals": "function queuedWithdrawals(uint256) returns (bytes32 root, uint256 shares)" } \ No newline at end of file From 113d8a16d3c757df298327b88a326e7dbce60ec2 Mon Sep 17 00:00:00 2001 From: Lawson Graham <45542987+LawsonGraham@users.noreply.github.com> Date: Wed, 30 Oct 2024 22:58:36 -0700 Subject: [PATCH 160/787] fix vethl tvl api endpoint (#12114) --- projects/thala-vethl/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/thala-vethl/index.js b/projects/thala-vethl/index.js index d00714ddb588..8c9c0fa07770 100644 --- a/projects/thala-vethl/index.js +++ b/projects/thala-vethl/index.js @@ -2,19 +2,19 @@ const utils = require("../helper/utils"); const sdk = require("@defillama/sdk"); const { transformBalances } = require("../helper/portedTokens"); -const THALA_API = "https://app.thala.fi/api"; +const THALA_API_VETHL = "https://app.thala.fi/api/vethl-tvl"; const thlAddress = "0x7fd500c11216f0fe3095d0c4b8aa4d64a4e2e04f83758462f2b127255643615::thl_coin::THL"; const thlDecimals = 8; module.exports = { - timetravel: true, + timetravel: false, start: 1692598825, methodology: `TVL data is pulled from the Thala's API "https://app.thala.fi/api/vethl-tvl".`, aptos: { tvl: () => ({}), - staking: async ({ timestamp }) => { - const response = await utils.fetchURL(`${THALA_API}/vethl-tvl?timestamp=${ timestamp }`); + staking: async () => { + const response = await utils.fetchURL(THALA_API_VETHL); const thlAmount = response.data.data * 10**thlDecimals; const balances = {}; @@ -24,4 +24,3 @@ module.exports = { }, }, }; - From 642cef540f340e4d196ff7cd62a3f22426b0158b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:08:05 +0100 Subject: [PATCH 161/787] track synatra #12112 --- projects/helper/solana.js | 3 ++- projects/synatra/index.js | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 projects/synatra/index.js diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 1566b784c738..58a3d11e2457 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -51,7 +51,7 @@ function getProvider(chain = 'solana') { return provider[chain] } -async function getTokenSupplies(tokens) { +async function getTokenSupplies(tokens, { api } = {}) { const sleepTime = tokens.length > 2000 ? 2000 : 200 const connection = getConnection() tokens = tokens.map(i => typeof i === 'string' ? new PublicKey(i) : i) @@ -65,6 +65,7 @@ async function getTokenSupplies(tokens) { try { data = decodeAccount('mint', data) response[tokens[idx].toString()] = data.supply.toString() + if (api) api.add(tokens[idx].toString(), data.supply.toString()) } catch (e) { sdk.log(`Error decoding account: ${tokens[idx]}`) } diff --git a/projects/synatra/index.js b/projects/synatra/index.js new file mode 100644 index 000000000000..8acc14204a04 --- /dev/null +++ b/projects/synatra/index.js @@ -0,0 +1,15 @@ +const { getTokenSupplies,} = require("../helper/solana"); + +const ySOL_MINT = 'yso11zxLbHA3wBJ9HAtVu6wnesqz9A2qxnhxanasZ4N'; +const yUSD_MINT = 'yUSDX7W89jXWn4zzDPLnhykDymSjQSmpaJ8e4fjC1fg'; +const TOKEN_MINTS = [ySOL_MINT, yUSD_MINT] + +async function tvl(api) { + await getTokenSupplies(TOKEN_MINTS, {api }) +} + +module.exports = { + doublecounted: true, + methodology: 'Tracks tvl via number of tokens currently minted for each pool.', + solana: { tvl, }, +} From 22cb3e60c6f7aa70c2a006d0a0f50b4904f8b4d5 Mon Sep 17 00:00:00 2001 From: xwaynec Date: Thu, 31 Oct 2024 15:27:00 +0800 Subject: [PATCH 162/787] add aave aArbGHO for zomma arbitrum tvl (#12122) --- projects/zomma/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/zomma/index.js b/projects/zomma/index.js index 506c406cb117..949b4741d296 100644 --- a/projects/zomma/index.js +++ b/projects/zomma/index.js @@ -13,6 +13,7 @@ const ZOMMA_ARB_CONTRACT_ETH = "0xa9DEb981b735EC0525c8D4C959267429FdD82347"; const ZOMMA_ARB_CONTRACT_BTC = "0x275376e25e068c894d0df5cc9a3d1893d94e9f4a"; const ARB_USDC_CONTRACT = ADDRESSES.arbitrum.USDC_CIRCLE; const ARB_AAVE_USDC_CONTRACT = "0x724dc807b04555b71ed48a6896b6F41593b8C637"; +const ARB_AAVE_GHO_CONTRACT = "0xeBe517846d0F36eCEd99C735cbF6131e1fEB775D"; module.exports = { methodology: @@ -20,7 +21,7 @@ module.exports = { arbitrum: { tvl: sumTokensExport({ owners: [ZOMMA_ARB_VAULT, ZOMMA_ARB_VAULT2, ZOMMA_ARB_CONTRACT_ETH, ZOMMA_ARB_CONTRACT_BTC], - tokens: [ARB_USDC_CONTRACT, ARB_AAVE_USDC_CONTRACT], + tokens: [ARB_USDC_CONTRACT, ARB_AAVE_USDC_CONTRACT, ARB_AAVE_GHO_CONTRACT], }), }, era: { From c58355caf2ea1c3c383d59d7e22ff7b4ed744d80 Mon Sep 17 00:00:00 2001 From: maybeyonas Date: Thu, 31 Oct 2024 12:59:06 +0530 Subject: [PATCH 163/787] adding pendle pools and vault to earnETH (#12115) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/unwrapLPs.js | 4 +--- projects/swell-earn-eth/index.js | 40 +++++++++++++++++++++++++------- test.js | 16 +++++-------- 3 files changed, 38 insertions(+), 22 deletions(-) diff --git a/projects/helper/unwrapLPs.js b/projects/helper/unwrapLPs.js index 6995cc4cab69..18edbcb2e1de 100644 --- a/projects/helper/unwrapLPs.js +++ b/projects/helper/unwrapLPs.js @@ -4,7 +4,6 @@ const BigNumber = require("bignumber.js"); const token0 = 'address:token0' const symbol = 'string:symbol' const { getPoolTokens, getPoolId, bPool, getCurrentTokens, } = require('./abis/balancer.json') -const { requery } = require('./requery') const { getChainTransform, getFixBalances } = require('./portedTokens') const { getUniqueAddresses, normalizeAddress } = require('./tokenMapping') const creamAbi = require('./abis/cream.json') @@ -192,7 +191,7 @@ async function unwrapUniswapV3NFT({ balances, owner, owners, nftAddress, block, let positionIds = uniV3ExtraConfig.positionIds if (!positionIds) { - if (!owners && owner) owners = [owner] + if (!owners?.length && owner) owners = [owner] owners = getUniqueAddresses(owners, chain) const { output: lengths } = await sdk.api.abi.multiCall({ block, chain, abi: wildCreditABI.balanceOf, @@ -214,7 +213,6 @@ async function unwrapUniswapV3NFT({ balances, owner, owners, nftAddress, block, block, chain, abi: wildCreditABI.positions, target: nftAddress, calls: positionIds.map((position) => ({ params: [position] })), })).output.map(positionsCall => positionsCall.output) - const lpInfo = {} positions.forEach(position => lpInfo[getKey(position)] = position) const lpInfoArray = Object.values(lpInfo) diff --git a/projects/swell-earn-eth/index.js b/projects/swell-earn-eth/index.js index 873acfa41c78..6eb2e6e2684b 100644 --- a/projects/swell-earn-eth/index.js +++ b/projects/swell-earn-eth/index.js @@ -1,21 +1,43 @@ +const { sumTokens2, PANCAKE_NFT_ADDRESS } = require('../helper/unwrapLPs') const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens2 } = require('../helper/unwrapLPs') const earnETHVault = '0x9Ed15383940CC380fAEF0a75edacE507cC775f22'; +const pancakeswapMasterChef = '0x556B9306565093C855AEA9AE92A594704c2Cd59e' + +const ethTokens = [ + '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', // rswETH + '0xf951E335afb289353dc249e82926178EaC7DEd78', // swETH + ADDRESSES.ethereum.WSTETH, // wstETH + ADDRESSES.ethereum.WETH, // WETH +] + +const pendleLPTokens = [ + "0x7C7FbB2d11803C35Aa3e283985237aD27f64406B", //rswETH 26Dec2024 + "0x0e1C5509B503358eA1Dac119C1D413e28Cc4b303", //swETH 26December2024 +] + +const vaultTokens = [ + "0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0", // Re7 WETH +] const tokens = [ - '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', // rswETH - '0xf951E335afb289353dc249e82926178EaC7DEd78', // swETH - ADDRESSES.ethereum.WSTETH, // wstETH - ADDRESSES.ethereum.WETH, // WETH + ...ethTokens, + ...pendleLPTokens, + ...vaultTokens, ] + const tvl = async (api) => { - return sumTokens2({ api, tokens, owner: earnETHVault }) + return sumTokens2({ + api, + owner: earnETHVault, tokens, + uniV3nftsAndOwners: [[PANCAKE_NFT_ADDRESS, earnETHVault]], + uniV3ExtraConfig: { nftIdFetcher: pancakeswapMasterChef } + }) } module.exports = { - methodology: 'TVL represents the sum of tokens deposited in the vault', - doublecounted: true, - ethereum : { tvl } + methodology: 'TVL represents the sum of tokens deposited in the vault + LP positions', + doublecounted: true, + ethereum: { tvl } } \ No newline at end of file diff --git a/test.js b/test.js index 790967699cea..686d68c1fd9d 100644 --- a/test.js +++ b/test.js @@ -114,7 +114,7 @@ function validateHallmarks(hallmark) { const year = new Date(timestamp * 1000).getFullYear() const currentYear = new Date().getFullYear() if (year < 2010 || year > currentYear) { - throw new Error("Hallmark timestamp should be between 2010 and "+ currentYear + " but got " + year) + throw new Error("Hallmark timestamp should be between 2010 and " + currentYear + " but got " + year) } if (typeof text !== 'string') { @@ -124,16 +124,12 @@ function validateHallmarks(hallmark) { (async () => { let module = {}; - try { - module = require(passedFile) - } catch (e) { - console.log(e) - } + module = require(passedFile) if (module.hallmarks) { if (!Array.isArray(module.hallmarks)) { throw new Error("Hallmarks should be an array of arrays") } - if(module.hallmarks.length > 6){ + if (module.hallmarks.length > 6) { console.error("WARNING: Hallmarks should only be set for events that led to a big change in TVL, please reduce hallmarks to only those that meet this condition") } @@ -146,7 +142,7 @@ function validateHallmarks(hallmark) { let unixTimestamp = Math.round(Date.now() / 1000) - 60; let chainBlocks = {} const passedTimestamp = process.argv[3] - if(passedTimestamp !== undefined){ + if (passedTimestamp !== undefined) { unixTimestamp = Number(passedTimestamp) const res = await getBlocks(unixTimestamp, chains) chainBlocks = res.chainBlocks @@ -244,8 +240,8 @@ function validateHallmarks(hallmark) { entries = entries.slice(0, 30) } entries.forEach(([symbol, balance]) => { - console.log(symbol.padEnd(25, " "), humanizeNumber(balance)); - }); + console.log(symbol.padEnd(25, " "), humanizeNumber(balance)); + }); console.log("Total:", humanizeNumber(usdTvls[chain]), "\n"); }); console.log(`------ TVL ------`); From b10f14d6c0bab0404e8cb2e41b133e43a0c63bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=85=BE=E5=AE=87?= <992899491@qq.com> Date: Thu, 31 Oct 2024 15:29:21 +0800 Subject: [PATCH 164/787] Update ModeMax Perp V2 TVL Address (#12121) --- projects/modemax-perp-v2/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/modemax-perp-v2/index.js b/projects/modemax-perp-v2/index.js index c9aadc03ce04..90d38037169e 100644 --- a/projects/modemax-perp-v2/index.js +++ b/projects/modemax-perp-v2/index.js @@ -2,6 +2,6 @@ const { gmxExports } = require('../helper/gmx') module.exports = { mode: { - tvl: gmxExports({ vault: '0x6824AbeA9D564e469B8FAaA0300b04cAFdD78341' }) + tvl: gmxExports({ vault: '0xc3d266Af004B2556f2f900e88e9C73Ac42978AE6' }) }, }; From 8d9f7fe45c7d744a7b01d731824b946a8d000c7a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:30:52 +0100 Subject: [PATCH 165/787] code refactor --- projects/crackandstack/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/crackandstack/index.js b/projects/crackandstack/index.js index 8bbecfa14fbc..39d351216e3a 100644 --- a/projects/crackandstack/index.js +++ b/projects/crackandstack/index.js @@ -1,7 +1,6 @@ -const { sumTokensExport } = require("../helper/unwrapLPs"); -const coreAssets = require("../helper/coreAssets.json"); -const TAIKO_TOKEN = ADDRESSES.taiko.TAIKO; +const { sumTokensExport } = require("../helper/unwrapLPs"); +const ADDRESSES = require("../helper/coreAssets.json"); const CONTRACTS = ["0x2c301eBfB0bb42Af519377578099b63E921515B7", "0xD8F7cd7d919c5266777FB83542F956dD30E80187", "0x12689b6ddE632E69fBAA70d066f86aC9fDd33dd1"]; @@ -12,7 +11,7 @@ module.exports = { taiko: { tvl: sumTokensExport({ owners: CONTRACTS, - tokens: [coreAssets.null, coreAssets.taiko.USDT, coreAssets.taiko.USDC_e, coreAssets.taiko.USDC, TAIKO_TOKEN] + tokens: [ADDRESSES.null, ADDRESSES.taiko.USDT, ADDRESSES.taiko.USDC_e, ADDRESSES.taiko.USDC, ADDRESSES.taiko.TAIKO] }), }, } From c9d661b82997a9e04b5f8dbdf96e0a3a9c2c6b67 Mon Sep 17 00:00:00 2001 From: Chase Brown <54334583+chasebrownn@users.noreply.github.com> Date: Thu, 31 Oct 2024 00:32:53 -0700 Subject: [PATCH 166/787] New adapter for Pearl's UniV2 style pools on re.al to capture TVL (#12109) --- projects/pearl-v1.5/index.js | 9 +++++++++ projects/pearl-v2/index.js | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 projects/pearl-v1.5/index.js diff --git a/projects/pearl-v1.5/index.js b/projects/pearl-v1.5/index.js new file mode 100644 index 000000000000..4252916e5cb3 --- /dev/null +++ b/projects/pearl-v1.5/index.js @@ -0,0 +1,9 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +module.exports = { + 'real': { + tvl: getUniTVL({ + factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', + }) + } +}; \ No newline at end of file diff --git a/projects/pearl-v2/index.js b/projects/pearl-v2/index.js index dac961beb7fc..5e12421acd6f 100644 --- a/projects/pearl-v2/index.js +++ b/projects/pearl-v2/index.js @@ -1,4 +1,3 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { uniV3Export } = require('../helper/uniswapV3') module.exports = uniV3Export({ From 87d615b4f89a829b5729319889485a0c905bfefd Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:34:46 +0100 Subject: [PATCH 167/787] rename folder --- projects/{pearl-v1.5 => pearl-v1-5}/index.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename projects/{pearl-v1.5 => pearl-v1-5}/index.js (100%) diff --git a/projects/pearl-v1.5/index.js b/projects/pearl-v1-5/index.js similarity index 100% rename from projects/pearl-v1.5/index.js rename to projects/pearl-v1-5/index.js From cf70fb4cd824b9f37e1355b511ca3562e3ff99e8 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:35:46 +0100 Subject: [PATCH 168/787] minor fix --- projects/pearl-v1-5/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pearl-v1-5/index.js b/projects/pearl-v1-5/index.js index 4252916e5cb3..1d631c1d3e53 100644 --- a/projects/pearl-v1-5/index.js +++ b/projects/pearl-v1-5/index.js @@ -3,7 +3,7 @@ const { getUniTVL } = require('../helper/unknownTokens') module.exports = { 'real': { tvl: getUniTVL({ - factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', + factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true, }) } }; \ No newline at end of file From 4670cacbc9ef5ed093cf7b1af2725c2333209b82 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:36:04 +0100 Subject: [PATCH 169/787] minor fix --- projects/pearl-v1-5/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/pearl-v1-5/index.js b/projects/pearl-v1-5/index.js index 1d631c1d3e53..0f2b532b7d8b 100644 --- a/projects/pearl-v1-5/index.js +++ b/projects/pearl-v1-5/index.js @@ -1,6 +1,7 @@ const { getUniTVL } = require('../helper/unknownTokens') module.exports = { + misrepresentedTokens: true, 'real': { tvl: getUniTVL({ factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true, From d2bff74837bf6c7fdb3d77bbffd47301a4c1de7d Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Thu, 31 Oct 2024 03:36:31 -0400 Subject: [PATCH 170/787] Feat: add IoTex and B^2 Network market for Avalon Finance (#12110) --- projects/avalon-finance/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index ef941e7aebfd..97a6c59e8fbd 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -8,6 +8,8 @@ const mainMarket = { merlin: aaveExports('', '0x6aB5d5E96aC59f66baB57450275cc16961219796', undefined, ['0x5F314b36412765f3E1016632fD1Ad528929536CA'], {v3: true}), btr: aaveExports('', '0x6aB5d5E96aC59f66baB57450275cc16961219796', undefined, ['0x5F314b36412765f3E1016632fD1Ad528929536CA'], {v3: true}), scroll: aaveExports('', '0xFBb77A68ee35e7902F1ABE0Bd34B263023e90c70', undefined, ['0x18cbe70602Ee17f79D56971F685E9EaF49DA53F2'], { v3: true }), + iotex: aaveExports('', '', undefined, ['0xBa77520d38953BF6a8395D118CfF714Ed672533f'], { v3: true }), + bsquared: aaveExports('', '', undefined, ['0x4Ea93E846b8C6E7b3D5a5BEDF4fe6B8AED58FCEe'], { v3: true }), } const innovativeMarket = { From 4240dd968eafff1fb12ef8ec732b8755d584285a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 08:59:23 +0100 Subject: [PATCH 171/787] track maxapy #12111 --- projects/maxapy/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/maxapy/index.js diff --git a/projects/maxapy/index.js b/projects/maxapy/index.js new file mode 100644 index 000000000000..72b46a70518d --- /dev/null +++ b/projects/maxapy/index.js @@ -0,0 +1,23 @@ +const { sumERC4626VaultsExport } = require('../helper/erc4626') + +module.exports = { + doublecounted: true, + methodology: "Counts total value locked in ERC4626 vaults", +} + +const config = { + ethereum: [ + "0x9847c14fca377305c8e2d10a760349c667c367d4", + "0x349c996c4a53208b6eb09c103782d86a3f1bb57e", + ], + polygon: [ + "0xe7fe898a1ec421f991b807288851241f91c7e376", + "0xa02aa8774e8c95f5105e33c2f73bdc87ea45bd29", + ] +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: sumERC4626VaultsExport({ vaults: config[chain], isOG4626: true, }) + } +}) From 07eda541ee6f070d7299be89c3730332e79a8385 Mon Sep 17 00:00:00 2001 From: gWhy <73211553+gWhy-j@users.noreply.github.com> Date: Thu, 31 Oct 2024 17:51:25 +0900 Subject: [PATCH 172/787] Added adapter for Morfi (#12124) --- projects/MorFi/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/MorFi/index.js diff --git a/projects/MorFi/index.js b/projects/MorFi/index.js new file mode 100644 index 000000000000..c0ab9c3f66f2 --- /dev/null +++ b/projects/MorFi/index.js @@ -0,0 +1,9 @@ +const { uniV3Export } = require("../helper/uniswapV3"); + +module.exports = uniV3Export({ + morph: { + factory: "0x1be404c921ef85537233ef2be251a27583072861", + fromBlock: 166014, + isAlgebra: true, + }, +}); \ No newline at end of file From 9935f910f022950d725f488ce0f636ef0f2635a1 Mon Sep 17 00:00:00 2001 From: Jonathan Lodge Date: Thu, 31 Oct 2024 21:15:39 +0800 Subject: [PATCH 173/787] Add staking of CBL in the Raging Bull Staking Vault to Credbull SDK Adapter. (#12126) --- projects/credbull/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/credbull/index.js b/projects/credbull/index.js index aeeb7c6c6b40..fc22664beac7 100644 --- a/projects/credbull/index.js +++ b/projects/credbull/index.js @@ -1,5 +1,8 @@ const { getConfig } = require('../helper/cache'); +const STAKING_VAULT_CONTRACT = "0xe4a4d891f02DF7bFFc5ff9e691313DE8a9E76b91"; +const CBL_TOKEN = "0xD6b3d81868770083307840F513A3491960b95cb6"; + async function tvl(api) { let vaults = await getConfig('credbull', "https://incredbull.io/api/vaults") vaults = vaults[api.chain] @@ -13,12 +16,17 @@ async function borrowed(api) { const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults }) const bals = await api.multiCall({ abi: 'address:totalAssets', calls: vaults }) api.add(tokens, bals) - const tBals = (await api.multiCall({ abi: 'erc20:balanceOf', calls: tokens.map((t,i) => ({ target: t, params: vaults[i] })) })).map(i => i * -1) + const tBals = (await api.multiCall({ abi: 'erc20:balanceOf', calls: tokens.map((t, i) => ({ target: t, params: vaults[i] })) })).map(i => i * -1) api.add(tokens, tBals) } +async function stakedCbl(api) { + const bals = await api.multiCall({ abi: 'address:totalAssets', calls: [STAKING_VAULT_CONTRACT,] }) + api.add(CBL_TOKEN, bals) +} + module.exports = { methodology: 'TVL consist of the sum of every deposit of all vaults for a given asset.', btr: { tvl, borrowed, }, - arbitrum: { tvl, borrowed }, + arbitrum: { tvl, borrowed, staking: stakedCbl }, }; From 437221bade2f5bee6941ae878fd054a1a6d2150c Mon Sep 17 00:00:00 2001 From: AbstraDexXYZ <155727634+AbstraDexXYZ@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:16:09 +0700 Subject: [PATCH 174/787] add morph config (#12125) --- projects/abstraDex/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/abstraDex/index.js b/projects/abstraDex/index.js index 823febf75e6f..75dcb1d9baaa 100644 --- a/projects/abstraDex/index.js +++ b/projects/abstraDex/index.js @@ -10,6 +10,7 @@ const config = { blast: '0xA7afB6163c331DDb0845843889D6f9544328846F', cyeth: '0x174c4c03dfea09682728a5959a253bf1f7c7766f', cronos_zkevm: '0x76D1fC018676f8A973474C24F40A2e14e401b770', + morph: '0x174c4C03DfeA09682728A5959A253bf1F7C7766F', } module.exports = { From d73d802cb9189c2e5f827b8bdb84f50113c05ff7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:02:28 +0100 Subject: [PATCH 175/787] solayer: track sUSD #12123 --- projects/solayer/index.js | 40 ++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/projects/solayer/index.js b/projects/solayer/index.js index 6e4b7d6a45c7..589a239dfb6c 100644 --- a/projects/solayer/index.js +++ b/projects/solayer/index.js @@ -1,17 +1,35 @@ -const { sumTokens2, getSolBalanceFromStakePool } = require("../helper/solana"); +const { sumTokens2, getConnection, } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); +const ADDRESSES = require('../helper/coreAssets.json') async function tvl(api) { - await getSolBalanceFromStakePool('po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2', api) + const connection = getConnection(); + + // add SOL staking + const stakeAccount = await connection.getAccountInfo(new PublicKey('po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2')) + api.add(ADDRESSES.solana.SOL, Number(stakeAccount.data.readBigUint64LE(258))) + + // get LST details + const data = await connection.getProgramAccounts(new PublicKey('sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn'), { + filters: [{ dataSize: 74, },], + }) + const tokensAndOwners = data.map((i) => { + const offset = 8 + const lstMint = new PublicKey(i.account.data.slice(offset + 0, offset + 32)); + return [lstMint.toString(), i.pubkey.toString()] + }) + + // add SUSD Backing + tokensAndOwners.push( + ['4MmJVdwYN8LwvbGeCowYjSx7KoEi6BJWg8XXnW4fDDp6', 'FhVcYNEe58SMtxpZGnTu2kpYJrTu2vwCZDGpPLqbd2yG'], + [ADDRESSES.solana.USDC, 'FhVcYNEe58SMtxpZGnTu2kpYJrTu2vwCZDGpPLqbd2yG'], + ) + return sumTokens2({ - tokenAccounts: [ - 'AGuwBAj91dgz1fhaK4qgYcH7SohyZEMK1VXTizFsWjq7', - 'Q75n2KgZp7insTKkavJWftWWuGDDUuHMquosQ5hbn7G', - 'HBjQ1jF2ynYFpwx46qiZsKE3rmvgEcxnkhvKeGP6omUd', - '6eLZQKhbiBNmR4PiDFJgE6TZAoH3BwR6ceVwc3K1YjBZ', - 'HNw9tA7sWvjDH4cDCykj23Q4ifkKZerr6MbMfFXgyp62', - 'Gwa3a4VJbAyorLhn6TEeWLbQ4tWyup4E6oL3WjAga7tx', - ], - balances: api.getBalances() + balances: api.getBalances(), tokensAndOwners, blacklistedTokens: [ + 'sSo1wxKKr6zW2hqf5hZrp2CawLibcwi1pMBqk5bg2G4', + 'testqcAoCvfFpuFNtdmrBnBMSfFoXKkSTJ3ky6cPKjx', + ] }) } From 6f93b5db66c7180b4baa3b3eed02435631d9f45f Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 31 Oct 2024 15:13:34 +0000 Subject: [PATCH 176/787] include hasStablePools: true --- projects/pearl-v1-5/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pearl-v1-5/index.js b/projects/pearl-v1-5/index.js index 0f2b532b7d8b..081aea6645a0 100644 --- a/projects/pearl-v1-5/index.js +++ b/projects/pearl-v1-5/index.js @@ -4,7 +4,7 @@ module.exports = { misrepresentedTokens: true, 'real': { tvl: getUniTVL({ - factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true, + factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true, hasStablePools: true }) } }; \ No newline at end of file From 417697a4915dc728874ed972344bb99d0325d5aa Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 31 Oct 2024 15:18:24 +0000 Subject: [PATCH 177/787] revert --- projects/pearl-v1-5/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pearl-v1-5/index.js b/projects/pearl-v1-5/index.js index 081aea6645a0..09fb9b4ea535 100644 --- a/projects/pearl-v1-5/index.js +++ b/projects/pearl-v1-5/index.js @@ -4,7 +4,7 @@ module.exports = { misrepresentedTokens: true, 'real': { tvl: getUniTVL({ - factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true, hasStablePools: true + factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true }) } }; \ No newline at end of file From 1e921c7ab6684500cfd73b6890713f495ba28f2a Mon Sep 17 00:00:00 2001 From: yellow <8539006+yellowBirdy@users.noreply.github.com> Date: Thu, 31 Oct 2024 18:30:44 +0100 Subject: [PATCH 178/787] Nabla Finance (#12127) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/nabla/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/nabla/index.js diff --git a/projects/nabla/index.js b/projects/nabla/index.js new file mode 100644 index 000000000000..e1fc5d84811c --- /dev/null +++ b/projects/nabla/index.js @@ -0,0 +1,23 @@ + +const { getLogs2 } = require('../helper/cache/getLogs') + +const config = { + base: { factory: '0x791Fee7b66ABeF59630943194aF17B029c6F487B', fromBlock: 19980311 }, + arbitrum: { factory: '0x7bcFc8b8ff61456ad7C5E2be8517D01df006d18d', fromBlock: 240797440 }, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: "event SwapPoolRegistered(address indexed sender, address pool, address asset)", fromBlock, }) + const pools = logs.map(log => log.pool) + const tokensAndOwners = logs.map(i => [i.asset, i.pool]) + let backstops = await api.multiCall({ abi: 'address:backstop', calls: pools }) + backstops = [...new Set(backstops)] + const bTokens = await api.multiCall({ abi: 'address:asset', calls: backstops }) + backstops.forEach((backstop, i) => tokensAndOwners.push([bTokens[i], backstop])) + return api.sumTokens({ tokensAndOwners }) + } + } +}) From ef2290465c2e1b89afc381f37304532b08fd3a74 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 1 Nov 2024 01:33:39 +0000 Subject: [PATCH 179/787] hasStablePools: true --- projects/pearl-v1-5/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pearl-v1-5/index.js b/projects/pearl-v1-5/index.js index 09fb9b4ea535..081aea6645a0 100644 --- a/projects/pearl-v1-5/index.js +++ b/projects/pearl-v1-5/index.js @@ -4,7 +4,7 @@ module.exports = { misrepresentedTokens: true, 'real': { tvl: getUniTVL({ - factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true + factory: '0xAed0A784f357BE9C3f8113BB227a7517a3444Efe', useDefaultCoreAssets: true, hasStablePools: true }) } }; \ No newline at end of file From 3c58646dea4c2db519a0626b87267f45893eba9e Mon Sep 17 00:00:00 2001 From: LeeRyanj <138840879+LeeRyanj@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:44:13 +0800 Subject: [PATCH 180/787] add config (#12134) --- projects/kiloex/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index c6dc47d6a15a..2cd96c4275c0 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -20,7 +20,8 @@ module.exports = { '0xb0b84d294e0c75a6abe60171b70edeb2efd14a1b',//slisBNB '0x0782b6d8c4551b9760e74c0545a9bcd90bdc41e5',//lisUSD ADDRESSES.bsc.USDC, //usdc - + '0xf6718b2701d4a6498ef77d7c152b2137ab28b8a3', //stBTC + '0x4aae823a6a0b376de6a78e74ecc5b079d38cbcf7', //SolvBTC ], }) }, op_bnb: { tvl: sumTokensExport({ owners: opbnb_owners, tokens: [ @@ -29,6 +30,7 @@ module.exports = { ADDRESSES.optimism.WETH_1, //WBNB ADDRESSES.defiverse.USDC, //BTCB ADDRESSES.defiverse.ETH, //ETH + ] }) }, manta: { From c31ef32a8ac7baeef1519cc7a7e7f4c4d96ae858 Mon Sep 17 00:00:00 2001 From: 0xajing <163371347+0xajing@users.noreply.github.com> Date: Fri, 1 Nov 2024 11:45:33 +0800 Subject: [PATCH 181/787] feat/lorenzo enzoBTC:update btc address (#12132) Co-authored-by: Leven Co-authored-by: lorenzo Co-authored-by: LevenR <156494841+LevenR@users.noreply.github.com> --- projects/lorenzo-enzoBTC/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/lorenzo-enzoBTC/index.js b/projects/lorenzo-enzoBTC/index.js index b659942289ff..af81c984e967 100644 --- a/projects/lorenzo-enzoBTC/index.js +++ b/projects/lorenzo-enzoBTC/index.js @@ -1,7 +1,7 @@ const { sumTokens } = require('../helper/chain/bitcoin') const staticAddresses = [ - 'bc1qnvgmve5gs89ugf4n94jzqgan202dve5dtrj220', + 'bc1qndzgrwj3y2lhcklme4t72jxq3df2h05vjdgzpp', '19wFRSr3GYHmVQtnmbkx7Wkjw3jZdyYB9a' ] async function tvl() { From e2880e5472fae9448181d5918fc6709062b3bf33 Mon Sep 17 00:00:00 2001 From: kexley <87971154+kexleyBeefy@users.noreply.github.com> Date: Fri, 1 Nov 2024 03:46:46 +0000 Subject: [PATCH 182/787] Add Scroll to Beefy (#12129) --- projects/beefy/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/beefy/index.js b/projects/beefy/index.js index 42a2fb03242e..58dba0060099 100644 --- a/projects/beefy/index.js +++ b/projects/beefy/index.js @@ -60,6 +60,7 @@ const chains = { avax: 43114, linea: 59144, real: 111188, + scroll: 534352, aurora: 1313161554, harmony: 1666600000 } From f61e988782280d2286f76b18995564166a8618a7 Mon Sep 17 00:00:00 2001 From: Da Sichuan <86024678+DaSichuan@users.noreply.github.com> Date: Thu, 31 Oct 2024 20:47:11 -0700 Subject: [PATCH 183/787] Add spring sui (#12130) --- projects/spring-sui/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/spring-sui/index.js diff --git a/projects/spring-sui/index.js b/projects/spring-sui/index.js new file mode 100644 index 000000000000..9b31771faad0 --- /dev/null +++ b/projects/spring-sui/index.js @@ -0,0 +1,16 @@ +const sui = require('../helper/chain/sui') + +async function tvl() { + const pool = await sui.getObject('0x15eda7330c8f99c30e430b4d82fd7ab2af3ead4ae17046fcb224aa9bad394f6b'); + const suiAmount = pool.fields.storage.fields.total_sui_supply / 10 ** 9 + return { + sui: suiAmount, + } +} + +module.exports = { + methodology: "Calculates the amount of SUI staked in Spring Sui liquid staking contracts.", + sui: { + tvl, + } +} From 0f63527731360941d6dbf23518f1efe17c690762 Mon Sep 17 00:00:00 2001 From: xieqiancaosissi Date: Fri, 1 Nov 2024 11:50:51 +0800 Subject: [PATCH 184/787] feat: update ref finance tvl logic (#12133) Co-authored-by: naturexie <786281870@qq.com> --- projects/reffinance.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/reffinance.js b/projects/reffinance.js index 3142d1bf1e13..4e41da809ca3 100644 --- a/projects/reffinance.js +++ b/projects/reffinance.js @@ -21,7 +21,7 @@ async function tvl() { pools .filter(({ shares_total_supply }) => +shares_total_supply > 0) // Token pair must have some liquidity .map(({ token_account_ids, pool_kind, amounts }) => { - if (!['SIMPLE_POOL', 'STABLE_SWAP', "RATED_SWAP"].includes(pool_kind)) throw new Error('Unknown pool kind.') + // if (!['SIMPLE_POOL', 'STABLE_SWAP', "RATED_SWAP"].includes(pool_kind)) throw new Error('Unknown pool kind.') token_account_ids.forEach((token, index) => { sumSingleBalance(balances, token, amounts[index]) }) From e8bff2429add3ab965e0fa061956f47fdf642b2e Mon Sep 17 00:00:00 2001 From: Ryang-21 <104600435+Ryang-21@users.noreply.github.com> Date: Thu, 31 Oct 2024 22:05:42 -0600 Subject: [PATCH 185/787] Fix blend supply and borrow calculations (#12128) Co-authored-by: llama --- projects/blend-pools/api.js | 16 ++++++++-------- projects/helper/coreAssets.json | 3 ++- projects/helper/tokenMapping.js | 5 +++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/projects/blend-pools/api.js b/projects/blend-pools/api.js index fa85d3cb59fa..bac0cd1ba0bb 100644 --- a/projects/blend-pools/api.js +++ b/projects/blend-pools/api.js @@ -15,12 +15,12 @@ const network = { async function getReserveDeposits(poolId, reserveId, isBorrowed = false) { const data = await ReserveData.load(network, poolId, reserveId) - const rate = Number(data.bRate) / 1e9 - const supply = Number(data.bSupply) - const borrowed = Number(data.dSupply) - if (isBorrowed) - return borrowed * rate - return (supply - borrowed) * rate + // bRate and dRate have 9 decimals + const supply = Number(data.bSupply) * Number(data.bRate) / 1e9; + const borrowed = Number(data.dSupply) * Number(data.dRate) / 1e9 + if (isBorrowed) + return borrowed + return supply - borrowed } @@ -39,9 +39,9 @@ async function addPoolTVL(poolId, api, isBorrowed = false) { async function tvl(api) { let backstop = await BackstopConfig.load(network, BACKSTOP_ID); - for (const pool of backstop.rewardZone) + for (const pool of backstop.rewardZone){ await addPoolTVL(pool, api); - +} return sumTokens2({ api }) } diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 30ce87b73578..a87d0f20647e 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1860,7 +1860,8 @@ }, "stellar": { "XLM": "CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA", - "USDC": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75" + "USDC": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75", + "EURC": "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV" }, "lukso": { "WLYX": "0x2db41674f2b882889e5e1bd09a3f3613952bc472" diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 62dd00a4403f..c8dde620db92 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -40,6 +40,11 @@ const fixBalancesTokens = { ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, + stellar: { + "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV": { coingeckoId: "euro-coin", decimals: 7}, + "CAUIKL3IYGMERDRUN6YSCLWVAKIFG5Q4YJHUKM4S4NJZQIA3BAS6OJPK": { coingeckoId: "aquarius", decimals: 7}, + + }, shape: { [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, '0x48A9B22b80F566E88f0f1DcC90Ea15A8A3bAE8a4': { coingeckoId: 'ethereum', decimals: 18 }, From 1f70900834586ea0e7a3298ce1d28601520fb3f1 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Fri, 1 Nov 2024 00:19:24 -0400 Subject: [PATCH 186/787] Add: Avalon USDa (#12088) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/avalon-finance-usda/index.js | 33 +++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 projects/avalon-finance-usda/index.js diff --git a/projects/avalon-finance-usda/index.js b/projects/avalon-finance-usda/index.js new file mode 100644 index 000000000000..5de4e4c95086 --- /dev/null +++ b/projects/avalon-finance-usda/index.js @@ -0,0 +1,33 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); + +const config = { + ethereum: { + poolAddress: '0x3f390dD6EF69f68f9877aACC086856a200808693', + fbtcAddress: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + lfbtcAddress: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', + usdaAddress: '0x0b4D6DA52dF60D44Ce7140F1044F2aD5fabd6316', + }, + bsc: { + poolAddress: '0xC757E47d6bC20FEab54e16F2939F51Aa4826deF7', + fbtcAddress: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + lfbtcAddress: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', + usdaAddress: '0x8a4bA6C340894B7B1De0F6A03F25Aa6afb7f0224', + }, + mantle: { + poolAddress: '0x8f778806CBea29F0f64BA6A4B7724BCD5EEd543E', + fbtcAddress: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + lfbtcAddress: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', + usdaAddress: '0x2BDC204b6d192921605c66B7260cFEF7bE34Eb2E', + }, +} + +module.exports = { + methodology: `FBTC and LFFBTC as collateral`, +} + +Object.keys(config).forEach(chain => { + const {poolAddress, lfbtcAddress, fbtcAddress,} = config[chain] + module.exports[chain] = { + tvl: sumTokensExport({ owner: poolAddress, tokens: [lfbtcAddress, fbtcAddress], }), + } +}) \ No newline at end of file From 7be476d35a7c63f5ab80b6e2a5f01c1d3977e214 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 1 Nov 2024 11:12:09 +0000 Subject: [PATCH 187/787] fix mapping (coingecko for WAPE broke --- projects/helper/tokenMapping.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index c8dde620db92..19b74251ea18 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -121,7 +121,7 @@ const fixBalancesTokens = { [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'weth', decimals: 18 } }, apechain: { - '0x48b62137EdfA95a428D35C09E44256a739F6B557': { coingeckoId: 'wrapped-apecoin', decimals: 18 }, + '0x48b62137EdfA95a428D35C09E44256a739F6B557': { coingeckoId: 'apecoin', decimals: 18 }, '0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4': { coingeckoId: 'savings-dai', decimals: 18 }, '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, }, From 4411c85073e6b82796f746366a49c2ddf0295e75 Mon Sep 17 00:00:00 2001 From: 0xchimz <5950717+0xchimz@users.noreply.github.com> Date: Fri, 1 Nov 2024 20:00:17 +0700 Subject: [PATCH 188/787] Fix the factory contract address (#12140) Co-authored-by: 0xchimz --- projects/rabbitswap-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rabbitswap-v3/index.js b/projects/rabbitswap-v3/index.js index ce3b106f8091..96c15aa065a3 100644 --- a/projects/rabbitswap-v3/index.js +++ b/projects/rabbitswap-v3/index.js @@ -1,5 +1,5 @@ const { uniV3Export } = require('../helper/uniswapV3') module.exports = uniV3Export({ - tomochain: { factory: '0x8Ab5815E0A6a059d203F53496fAAb3045d01A25A', fromBlock: 86168117, isAlgebra: false }, + tomochain: { factory: '0xe615c973e92bDcB584Bf9085c4612E342164e12A', fromBlock: 86210948, isAlgebra: false }, }) From 3559520efca40325591e12c0173b7e09ceae0275 Mon Sep 17 00:00:00 2001 From: basicdavid <144406528+basicdavid@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:52:39 +0800 Subject: [PATCH 189/787] configured for Basic (#12137) --- projects/basic/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/basic/index.js diff --git a/projects/basic/index.js b/projects/basic/index.js new file mode 100644 index 000000000000..b542170fe782 --- /dev/null +++ b/projects/basic/index.js @@ -0,0 +1,10 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { compoundExports2 } = require("../helper/compound"); + +module.exports = { + iotex: compoundExports2({ + cether: '0x83C51de03f03C5E23f02F674dbD2032e164112Fc', + comptroller: '0x47D7B83947Aa12fEb95f5f55527Dc9B32E4ec009', + cetheEquivalent: ADDRESSES.iotex.WIOTX + }) +}; \ No newline at end of file From 38367fcc7c6c586161f0899ad6dcb64deff09993 Mon Sep 17 00:00:00 2001 From: quenta2024 <161811915+quenta2024@users.noreply.github.com> Date: Fri, 1 Nov 2024 21:52:53 +0800 Subject: [PATCH 190/787] ADD Quenta tvl (#12135) --- projects/quenta/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/quenta/index.js diff --git a/projects/quenta/index.js b/projects/quenta/index.js new file mode 100644 index 000000000000..cda0b9e9dd7e --- /dev/null +++ b/projects/quenta/index.js @@ -0,0 +1,11 @@ + +const { sumTokensExport } = require("../helper/unwrapLPs"); + +const ioUSDC = '0x3b2bf2b523f54c4e454f08aa286d03115aff326c' +const ioUSDT = '0x6fbcdc1169b5130c59e72e51ed68a84841c98cd1' +const USDQ = '0xEE43369197F78CFDF0D8fc48D296964C50AC7B57' + +module.exports = { + iotex: { tvl: sumTokensExport({ owner: USDQ, tokens: [ioUSDC, ioUSDT], })}, + methodology: `The calculation method for Quenta's TVL is the total value of all stablecoins (ioUSDC, ioUSDT) staked in the USDQ contract.`, +}; From b0e090f6b9a701b97d7975896b555451314a6240 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 1 Nov 2024 14:55:29 +0100 Subject: [PATCH 191/787] Clober (#12142) Co-authored-by: Xavier Co-authored-by: Tae Hwan Jung --- projects/clober-liquidity-vault/index.js | 32 ++++++++++++++++++++++++ projects/clober-v2/index.js | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 projects/clober-liquidity-vault/index.js diff --git a/projects/clober-liquidity-vault/index.js b/projects/clober-liquidity-vault/index.js new file mode 100644 index 000000000000..0ceb589677d9 --- /dev/null +++ b/projects/clober-liquidity-vault/index.js @@ -0,0 +1,32 @@ +const { getLogs2 } = require('../helper/cache/getLogs') + +const abi = { + openEvent: 'event Open(bytes32 indexed key, uint192 indexed bookIdA, uint192 indexed bookIdB, bytes32 salt, address strategy)', + getBookKey: "function getBookKey(uint192 id) view returns ((address base, uint64 unitSize, address quote, uint24 makerPolicy, address hooks, uint24 takerPolicy))", + getLiquidity: "function getLiquidity(bytes32 key) view returns ((uint256 reserve, uint256 claimable, uint256 cancelable) liquidityA, (uint256 reserve, uint256 claimable, uint256 cancelable) liquidityB)", +} + +const config = { + base: { + rebalancer: '0x13f2Ff6Cc952f4181D6c316426e9CbdA957c6482', + bookManager: '0x382CCccbD3b142D7DA063bF68cd0c89634767F76', + fromBlock: 21715410, + }, +} + +async function tvl(api) { + const { rebalancer, bookManager, fromBlock } = config[api.chain] + const logs = await getLogs2({ api, factory: rebalancer, eventAbi: abi.openEvent, fromBlock, extraKey: 'open-bookid' }) + const bookIds = logs.map(i => [i.bookIdA, i.bookIdB]).flat() + const res = await api.multiCall({ abi: abi.getBookKey, calls: bookIds, target: bookManager }) + const tokens = res.map(i => [i.base, i.quote]).flat() + return api.sumTokens({ owners: [rebalancer,], tokens }) +} + +module.exports = { + methodology: "TVL includes all assets deposited into the Clober Liquidity Vault contract, specifically allocated for liquidity provision and market-making within the Clober ecosystem", +}; + +Object.keys(config).forEach(chain => { + module.exports[chain] = { tvl } +}) diff --git a/projects/clober-v2/index.js b/projects/clober-v2/index.js index 84fd0a858615..d704c67ef2ff 100644 --- a/projects/clober-v2/index.js +++ b/projects/clober-v2/index.js @@ -11,7 +11,7 @@ const config = { async function tvl(api) { const { factory, fromBlock } = config[api.chain] - const logs = await getLogs2({ api, factory, eventAbi: abi.openEvent, fromBlock, }) + const logs = await getLogs2({ api, factory, eventAbi: abi.openEvent, fromBlock, extraKey: 'open-address', }) const tokens = logs.map(({ base, quote }) => [base, quote]).flat() return api.sumTokens({ owner: factory, tokens, }) } From 5ac4e44c0dd745738e330adef77a5535a4f8ffbb Mon Sep 17 00:00:00 2001 From: ratex-tony Date: Fri, 1 Nov 2024 21:56:51 +0800 Subject: [PATCH 192/787] fix: update bbsol earn margin market vault address (#12141) --- projects/rate-x/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rate-x/index.js b/projects/rate-x/index.js index f5ee1e516321..760fbb795c7e 100644 --- a/projects/rate-x/index.js +++ b/projects/rate-x/index.js @@ -7,7 +7,7 @@ async function tvl(api) { 'DY3Rw6BZwf6epvWnVo8DSV6kYptEdCh7HbYmFRpdPxuH', '3CppdkMFxuz7ASS27pB35EDbwgfUhwrarFYuWDBWWwHB', 'Grk7mshVug1TafphUvuYBrzwRqadtmCcf7GGPoPKkgs6', - '5mB83ye3jdjneDJDx15HAvYxT7SCsGZF5urpVMzuLr1t', + 'BpYbhwDZGpPvcKw3cSh5f9UqRaHfuxgz3avW9g324LUz', '4nyfJ4JBsRJLij7VGCVUeHwKSLAAku66ptJamoodY29L', '6opMSfkHgWsvG5KmZo8y2DuShaDHwXfB6VUuTx6W4Age', '4Ejjk5w7HAWvmXYT57s5uwn8rs7i61nbpcTRQ9ABB11M' From 19d728105f52a917eb7b7db73029811fa0eecd16 Mon Sep 17 00:00:00 2001 From: jan-magpie <155635960+jan-magpie@users.noreply.github.com> Date: Fri, 1 Nov 2024 19:31:20 +0530 Subject: [PATCH 193/787] added zircuit chain (#12138) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/eigenpie/config.js | 17 ++++++++++++----- projects/eigenpie/index.js | 27 ++++++++++++++++++--------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/projects/eigenpie/config.js b/projects/eigenpie/config.js index 544eaf261943..d45891839f5e 100644 --- a/projects/eigenpie/config.js +++ b/projects/eigenpie/config.js @@ -1,6 +1,13 @@ module.exports = { - ethereum: { - eigenConfig: "0x20b70E4A1883b81429533FeD944d7957121c7CAB", - eigenStaking: "0x24db6717dB1C75B9Db6eA47164D8730B63875dB7", - } - }; \ No newline at end of file + ethereum: { + eigenConfig: "0x20b70E4A1883b81429533FeD944d7957121c7CAB", + eigenStaking: "0x24db6717dB1C75B9Db6eA47164D8730B63875dB7", + }, + zircuit:{ + msteth: "0x1C1Fb35334290b5ff1bF7B4c09130885b10Fc0f4", + egeth: "0x4bcc7c793534246BC18acD3737aA4897FF23B458", + wsteth: "0xf0e673Bc224A8Ca3ff67a61605814666b1234833", + weth: "0x4200000000000000000000000000000000000006", + } + +}; \ No newline at end of file diff --git a/projects/eigenpie/index.js b/projects/eigenpie/index.js index a19b6d398d70..849fd8c5a2c3 100644 --- a/projects/eigenpie/index.js +++ b/projects/eigenpie/index.js @@ -1,20 +1,29 @@ const config = require("./config"); -const ADDRESSES = require('../helper/coreAssets.json') async function tvl(api) { - const { eigenConfig, eigenStaking } = config[api.chain]; + const { eigenConfig, } = config[api.chain]; let tokens = await api.call({ abi: 'address[]:getSupportedAssetList', target: eigenConfig, }); const mlrttokens = await api.multiCall({ abi: 'function mLRTReceiptByAsset(address) view returns (address)', calls: tokens, target: eigenConfig }) - const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens}) - tokens = tokens.map(token => token.toLowerCase() === '0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf'.toLowerCase() ? ADDRESSES.null : token) + const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens }) api.add(tokens, tokenSupplies) } -Object.keys(config).forEach((chain) => { - module.exports[chain] = { - tvl, - }; -}); +async function tvl_zircuit(api) { + const { msteth, egeth, wsteth, weth } = config[api.chain]; + const mlrttokens = [msteth, egeth] + const tokens = [wsteth, weth] + const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens }) + api.add(tokens, tokenSupplies) +} + +module.exports = { + ethereum: { + tvl: tvl, + }, + zircuit: { + tvl: tvl_zircuit, + } +} module.exports.doublecounted = true \ No newline at end of file From 41c4d1928f9c8b88acf02a39d2968ba03f2d27bd Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 2 Nov 2024 08:22:18 +0100 Subject: [PATCH 194/787] update loxodrome perp #12145 --- projects/loxodrome-perp/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/loxodrome-perp/index.js b/projects/loxodrome-perp/index.js index e716fec84027..8aded92dff57 100644 --- a/projects/loxodrome-perp/index.js +++ b/projects/loxodrome-perp/index.js @@ -2,6 +2,6 @@ const { gmxExports } = require('../helper/gmx') module.exports = { iotex: { - tvl: gmxExports({ vault: '0x22e239513f03C5cc890DAad846Bb279C4837d242' }) + tvl: gmxExports({ vault: '0x13904291B7d3e87d23070d22Bc34FA514F99Db18' }) }, } \ No newline at end of file From ef44d2607989be7f8136afb182cbb6477d5a6bed Mon Sep 17 00:00:00 2001 From: MD Date: Sun, 3 Nov 2024 01:44:53 +0100 Subject: [PATCH 195/787] feat: update blacklist (#12146) --- projects/impermax/index.js | 66 ++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 13 deletions(-) diff --git a/projects/impermax/index.js b/projects/impermax/index.js index 46a56594132d..1d78ec640be2 100644 --- a/projects/impermax/index.js +++ b/projects/impermax/index.js @@ -89,14 +89,29 @@ const blacklistedPools = { '0xdf5096804705d135656b50b62f9ee13041253d97', // YPIE-ETH ], polygon: [ - '0x76483d4ba1177f69fa1448db58d2f1dbe0fb65fa', // IMX-WETH - '0x8ce3bf56767dd87e87487f3fae63e557b821ea32', // IMX-WETH - '0xd4f5f9643a4368324ac920414781b1c5655baed1', // IMX-WETH - '0x5f819f510ca9b1469e6a3ffe4ecd7f0c1126f8f5', // IMX-WETH - '0x23312fceadb118381c33b34343a61c7812f7a6a3', // IMX-WETH - '0x5ed3147f07708a269f744b43c489e6cf3b60aec4', // USDT-DAI - '0xb957d5a232eebd7c4c4b0a1af9f2043430304e65', // USDC-rUSD - '0x87B94444d0f2c1e4610A2De8504D5d7b81898221', // QUICK-POLYDOGE + // QuickSwap + "0x5ed3147F07708A269f744B43c489e6Cf3B60aEC4", //DAI-USDT + "0x87B94444d0f2c1e4610A2De8504D5d7b81898221", //QUICK-POLYDOGE + "0x5f819f510ca9b1469e6a3ffe4ecd7f0c1126f8f5", //IMX-ETH [OLD] + "0xb957D5a232EEbD7C4c4B0A1af9F2043430304E65", //rUSD-USDC + "0x23312FCEADb118381C33B34343A61c7812f7a6a3", //IMX-ETH + "0x76483D4Ba1177F69FA1448dB58d2f1dBE0Fb65fa", //IMX-QUICK + "0xD4f5F9643A4368324aC920414781B1c5655BaeD1", //IMX-QUICK + "0x8ce3bf56767dD87E87487f3fae63e557B821Ea32", //IMX-WETH + "0x8ce3bf56767dd87e87487f3fae63e557b821ea32", //IMX-ETH + // Pearl + "0x2712fbb291d8784b7bf75e50f472968d0bd43fc1", //USDR-ETH + "0x7c91c66f7df3d23858937b0d419fd10b72bdc6d3", //USDR-BTC + "0xbde0990EeB2509931a0f73f78010F00191D746BA", //USDR-MATIC + "0x281Db118b0CB2865d9370c98AaC6e42523582AED", //USDR-PEARL + "0x822363B6dFaa8C41c1ADa904F1829143375EA6Da", //USDR-TNGBL + "0x6467FeF60a061f541967415fcBcDFb6Dc964f711", //USDR-IBEX + // Satin + "0x7166f0509bd1deedf90e42046025d929078089b4", //MATIC-LIBERA + "0x06D3AE1Cfe7D3D27B8b9f541E2d76e5f33778923", //SATIN-CASH + "0x3E626179241585235FF7B002cc4dC5439338990e", //IBEX-WETH + "0xCB091859dd1d994d513721fB9722Ca9f8839A825", //ETH-CASH + "0x7b750A5C4c0c7b36D206383353AB3c54DeE74deF", //MATIC-CASH ], arbitrum: [ '0xb7e5e74b52b9ada1042594cfd8abbdee506cc6c5', // IMX-WETH @@ -105,10 +120,30 @@ const blacklistedPools = { '0x4062f4775bc001595838fbaae38908b250ee07cf', // SWPR-ETH ], avax: [ - '0xde0037afbe805c00d3cec67093a40882880779b7', // IMX-WETH - '0xe9439f67201894c30f1c1c6b362f0e9195fb8e2c', // IMX-WETH - '0xa34862a7de51a0e1aee6d3912c3767594390586d', // IMX-WETH - '0x69c1c44e8742b66d892294a7eeb9aac51891b0eb', // USDC-UST + // Traderjoe + "0x21249FC0Ad45fB3e33C12BE0fA2B81000A290C5f", //SPELL-AVAX + "0xa34862a7de51a0e1aee6d3912c3767594390586d", //IMX-AVAX OLD + // Pangolin V1 + "0xE9439f67201894C30F1C1c6b362F0e9195FB8e2C", //IMX-AVAX + // Pangolin V2 + "0xde0037aFbE805C00d3CEc67093A40882880779b7", //IMX-AVAX + "0x69c1C44e8742b66D892294a7EEB9aac51891B0EB", //USDC-UST + "0xc6E68d77d0f4FA925A1cF2611dAB6b10900Eaf2B", //UST-AVAX + // Thorus + "0xd60709441b483453e84aD8E1C30F2e9EE116851D", //USDC-THO + // Pangolin + "0xE429Fbdc3275e29cA4c11F9c1EB4C8Cee1fCAda3", //WBTC-USDC + "0xc532a2885027677c4BE61F710F7D41941dBaD1B1", //ETH-AVAX + "0x677dCE0683e6Db30325cD97e8d04D138F34821A6", //PNG-AVAX + "0x65A9a0b25A2397e67Fe688361Bf4113cf4Fa5313", //USDT-AVAX + // Glacier + "0x96f1F13865f11E2EC0E15051415f420dAC440EC1", //WETH-USDT.e + "0x674A38dE6dC83FBde29784C9A974D38a11EbFB37", //BTC.b-AVAX + "0x4ab56108FD36F5da28b56a43b17909f745d560e4", //AVAX-USDT + "0x29327d37Ee0395a22dd419E2E81F3Bf2da066cfe", //GMX-USDC + "0x0d4E0EaFA9002957371a0cadbD3BF168d6D0741A", //fBOMB-AVAX + "0x7AEDD611c361cfc53d14953A6CbDC2d4Cd48AC94", //AVAX-WMEMO + "0x8dc6fae7fedd7a60ecbb27c17af830f5811d773e", //MMTH-BTC.b ], moonriver: [ '0x6ed3bc66dfcc5ac05daec840a75836da935fac97', // IMX-WETH @@ -119,7 +154,12 @@ const blacklistedPools = { '0x877a330af63094d88792b9ca28ac36c71673eb1c', // IMX-FTM '0xb97b6ed451480fe6466a558e9c54eaac32e6c696', // OXD-FTM ], - scroll: [], + scroll: [ + "0x94d81405985A4c34EaC4945d2b98c74258EdD07F", // tkn/chi - stakedlp + "0xE8f4895DF06a0c69A9BA87509EfdBBFBAFe86c2d", // weth/tkn - stakedlp + "0x7c80Be56a6f23A3E598822648baaFD7524fe1239", // chi/wUKRE stakedlp + "0xDD14d0c651C63e1EeA5bd8b250cf99757425D68F", // chi/usdc stakedlp + ], base: [], mantle: [], optimism: [], From 67a073da8d1d9a0d7854ddcccc39aea728e92058 Mon Sep 17 00:00:00 2001 From: Maxime Desalle <70470326+maxdesalle@users.noreply.github.com> Date: Sat, 2 Nov 2024 20:45:21 -0400 Subject: [PATCH 196/787] refactor: support mode & linea for sablier (#12148) --- projects/sablier-v2/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/sablier-v2/index.js b/projects/sablier-v2/index.js index 5f9969312844..25f8db886fc0 100644 --- a/projects/sablier-v2/index.js +++ b/projects/sablier-v2/index.js @@ -41,6 +41,8 @@ const config = { blast: { endpoints: ['BXoC2ToMZXnTmCjWftQRPh9zMyM7ysijMN54Nxzb2CEY'], }, scroll: { endpoints: ['HVcngokCByfveLwguuafrBC34xB65Ne6tpGrXHmqDSrh'], }, era: { endpoints: ['GY2fGozmfZiZ3xF2MfevohLR4YGnyxGxAyxzi9zmU5bY'], }, + mode: { endpoints: ['5ezGnVwNucVTW45WCb91VBiKBEdiqT4ceHDhh1KGigYG'], }, + linea: { endpoints: ['FoJnatzCZKyp9XjZyUBaw1juTb5ydnFvJvWUxS3oRCHZ'], }, } Object.keys(config).forEach(chain => { From 12f0b4697cb8eb782531754472d5b600b76c4f71 Mon Sep 17 00:00:00 2001 From: SeanTuring Date: Mon, 4 Nov 2024 14:51:11 +0800 Subject: [PATCH 197/787] add exsat credit staking adapter (#12152) --- projects/exsat-credit-staking/index.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 projects/exsat-credit-staking/index.js diff --git a/projects/exsat-credit-staking/index.js b/projects/exsat-credit-staking/index.js new file mode 100644 index 000000000000..c9280c46e89f --- /dev/null +++ b/projects/exsat-credit-staking/index.js @@ -0,0 +1,24 @@ +const axios = require('axios'); +const { sumTokens } = require("../helper/chain/bitcoin"); + +async function tvl(api) { + const { data: response } = await axios.post('https://rpc-us.exsat.network/v1/chain/get_table_rows', { + json: true, + code: "custody.xsat", + scope: "custody.xsat", + table: "custodies", + limit: "100", + show_payer: true + }); + + const owners = response.rows.map(row => row.data.btc_address); + return sumTokens({ owners }); +} + +module.exports = { + methodology: 'TVL is based on Bitcoin addresses in the exSat credit staking contract, summing their associated Bitcoin balances.', + start: 1729684800, + bitcoin: { + tvl, + }, +}; From 5c01f4f6775f2ad9da8d51bd7891b54ce99b830e Mon Sep 17 00:00:00 2001 From: bitcoincashautist <80100588+A60AB5450353F40E@users.noreply.github.com> Date: Mon, 4 Nov 2024 07:54:30 +0100 Subject: [PATCH 198/787] AnyHedge - fix data cut-off and update hallmarks (#12143) --- projects/anyhedge/index.js | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/projects/anyhedge/index.js b/projects/anyhedge/index.js index a53a8e2d9cdd..4b03fd90e83c 100644 --- a/projects/anyhedge/index.js +++ b/projects/anyhedge/index.js @@ -23,15 +23,15 @@ async function tvl({timestamp}) { // tvl data lags by contract duration since contracts are secret until settled // so tvl at current time will always be 0, and only later when contracts are revealed // can it be calculated in retrospect and stats back-filled - // for this reason, we cut-off the data at (today-31d) - const lastTimestamp = Math.floor(new Date().getTime() / 1000 - 31*86400); + // for this reason, we cut-off the data at (today-91d) + const lastTimestamp = Math.floor(new Date().getTime() / 1000 - 91*86400); if (timestamp > lastTimestamp) throw "Data for the date is incomplete, awaiting contract reveals." tvlAnyHedge = await getTVLAnyHedge(timestamp) - testDataSource = await getTVLAnyHedge(timestamp + 31*86400) + testDataSource = await getTVLAnyHedge(timestamp + 91*86400) - // if we're querying data for `timestamp`, a row for `timestamp+31d` should exist + // if we're querying data for `timestamp`, a row for `timestamp+91d` should exist if (testDataSource == null) throw "Data source hasn't been updated yet." @@ -47,20 +47,13 @@ async function tvl({timestamp}) { } module.exports = { - methodology: "Scrape the blockchain and filter for spent transaction outputs that match the contract's input script template. Aggregate them to compute TVL. The TVL data lags by contract duration since contracts are secret until settled. So, TVL at the current time will always be 0 and can only be calculated in retrospect and stats back-filled when contracts are revealed. For this reason, the code cuts-off the data at 31 days ago. See here for more details: https://gitlab.com/0353F40E/anyhedge-stats/-/blob/master/readme.md", + methodology: "Scrape the blockchain and filter for spent transaction outputs that match the contract's input script template. Aggregate them to compute TVL. The TVL data lags by contract duration since contracts are secret until settled. So, TVL at the current time will always be 0 and can only be calculated in retrospect and stats back-filled when contracts are revealed. For this reason, the code cuts-off the data at 91 days ago. See here for more details: https://gitlab.com/0353F40E/anyhedge-stats/-/blob/master/readme.md", start: 1654787405, bitcoincash: { tvl }, hallmarks: [ - [1654787405, "First AnyHedge v0.11 Contract"], - [1663106400, "AnyHedge Alpha is live and available"], - [1666585080, "The BCH Bull (Beta) goes live"], - [1666785960, "Paytaca wallet's product live"], - [1680356040, "BCH Bull trials P2P contracts"], - [1681725240, "BCH Bull is released"], - [1683634380, "BCH Bull adds Achievements"], - [1686651480, "BCH Bull raise max contract to $100k"], - [1687330080, "BCH Bull raise max leverage to 7.77x"], - [1703054100, "BCH Bull enables Early Settlements"], + [1681725240, "BCH Bull public release (AnyHedge v0.11 contract)"], + [1703054100, "BCH Bull enables early settlement feture"], + [1720612800, "BCH Bull enables leveraged shorting feature (AnyHedge v0.12 contract)"] ] }; From a216132fc68f1ce89588ba777c9ee6c9051bdce4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 5 Nov 2024 06:57:40 +0100 Subject: [PATCH 199/787] track g8keep.xyz --- projects/g8keep/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/g8keep/index.js diff --git a/projects/g8keep/index.js b/projects/g8keep/index.js new file mode 100644 index 000000000000..c41239e85838 --- /dev/null +++ b/projects/g8keep/index.js @@ -0,0 +1,20 @@ +const { getLogs2 } = require('../helper/cache/getLogs') +const { sumUnknownTokens } = require('../helper/unknownTokens') + +const config = { + base: { factory: '0x3C0B43867Cd04fEdfD6a95497e5ea7e3aFF8cCaE', fromBlock: 21977940 }, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: 'event TokenDeployed (address indexed token, address indexed pair, address indexed deployer, string symbol)', fromBlock, }) + const tokens = logs.map(log => log.pair) + return sumUnknownTokens({api, owner: factory, tokens, useDefaultCoreAssets: true, lps: tokens}) + } + } +}) + +module.exports.doublecounted = true +module.exports.misrepresentedTokens = true \ No newline at end of file From 87f50881f8202cad67025be0f8c61189be2441e4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 5 Nov 2024 07:16:57 +0100 Subject: [PATCH 200/787] track pearl staking #12163 --- projects/pearl-v2/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/pearl-v2/index.js b/projects/pearl-v2/index.js index 5e12421acd6f..d1a1ed5c33d6 100644 --- a/projects/pearl-v2/index.js +++ b/projects/pearl-v2/index.js @@ -1,5 +1,8 @@ const { uniV3Export } = require('../helper/uniswapV3') +const { staking } = require('../helper/staking') module.exports = uniV3Export({ - 'real': { factory: '0xeF0b0a33815146b599A8D4d3215B18447F2A8101', fromBlock: 33062,} -}) \ No newline at end of file + 'real': { factory: '0xeF0b0a33815146b599A8D4d3215B18447F2A8101', fromBlock: 33062, }, +}) + +module.exports.real.staking = staking('0x7f8F92C2446E044af45DCf15476Bc931Fd1d0020', '0xB08F026f8a096E6d92eb5BcbE102c273A7a2d51C') \ No newline at end of file From bf66aa6e72eaf24eef4be666d570939762716579 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kre=C5=A1imir=20Klas?= Date: Tue, 5 Nov 2024 07:18:08 +0100 Subject: [PATCH 201/787] kai: track native usdc vault (#12162) --- projects/kai/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/kai/index.js b/projects/kai/index.js index 6cccb37455eb..cd9c63b41dd9 100644 --- a/projects/kai/index.js +++ b/projects/kai/index.js @@ -1,11 +1,11 @@ const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui"); -const UsdcVault = { +const wUsdcVault = { id: '0x7a2f75a3e50fd5f72dfc2f8c9910da5eaa3a1486e4eb1e54a825c09d82214526', tType: ADDRESSES.sui.USDC } -const UsdtVault = { +const wUsdtVault = { id: '0x0fce8baed43faadf6831cd27e5b3a32a11d2a05b3cd1ed36c7c09c5f7bcb4ef4', tType: ADDRESSES.sui.USDT } @@ -13,9 +13,13 @@ const SuiVault = { id: '0x16272b75d880ab944c308d47e91d46b2027f55136ee61b3db99098a926b3973c', tType: ADDRESSES.sui.SUI } +const UsdcVault = { + id: '0x5663035df5f403ad5a015cc2a3264de30370650bc043c4dab4d0012ea5cb7671', + tType: ADDRESSES.sui.USDC_CIRCLE +} async function tvl(api) { - const vaults = [UsdcVault, UsdtVault, SuiVault] + const vaults = [wUsdcVault, wUsdtVault, SuiVault, UsdcVault] const vaultObjs = await sui.getObjects(vaults.map(v => v.id)) for (let i = 0; i < vaults.length; i++) { From 4b35b3b11d2a3e2acb35f2b93d021132b9112a82 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Mon, 4 Nov 2024 23:18:25 -0700 Subject: [PATCH 202/787] Feat: new markets: Taiko, BSC-WBTC (#12161) --- projects/avalon-finance/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index 97a6c59e8fbd..f7a293d4fc26 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -10,6 +10,7 @@ const mainMarket = { scroll: aaveExports('', '0xFBb77A68ee35e7902F1ABE0Bd34B263023e90c70', undefined, ['0x18cbe70602Ee17f79D56971F685E9EaF49DA53F2'], { v3: true }), iotex: aaveExports('', '', undefined, ['0xBa77520d38953BF6a8395D118CfF714Ed672533f'], { v3: true }), bsquared: aaveExports('', '', undefined, ['0x4Ea93E846b8C6E7b3D5a5BEDF4fe6B8AED58FCEe'], { v3: true }), + taiko: aaveExports('', '', undefined, ['0xF6Aa54a5b60c324602C9359E8221423793e5205d'], { v3: true }), } const innovativeMarket = { @@ -45,6 +46,8 @@ const stbtcMarkets = { const otherProtocolTokenMarkets = { // ETH - Swell BTC ethereum: aaveExports('', '0x3975BE5E668b189b8Ac9049B96A9D9561c4F5273', undefined, ['0x87Ed94868f6fbaA834Db81a1C5854c445caCaB67'], { v3: true }), + // BSC - WBTC + bsc: aaveExports('', '', undefined, ['0xA34F1a928024E3609C8968fEA90C747e8D1fA20f'], { v3: true }), } module.exports = mergeExports( From 929901d621da42cc24aeed5b597f7ad95a6699d9 Mon Sep 17 00:00:00 2001 From: Cryptonomy Date: Tue, 5 Nov 2024 01:26:33 -0500 Subject: [PATCH 203/787] Create index.js for Hliquity Protocol (#12159) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/tokenMapping.js | 1 + projects/hliquity/index.js | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 projects/hliquity/index.js diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 19b74251ea18..61c4584a4a08 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -137,6 +137,7 @@ const fixBalancesTokens = { '0x000000000000000000000000000000000022d6de': { coingeckoId: 'karate-combat', decimals: 8}, '0x00000000000000000000000000000000000cba44': { coingeckoId: 'hbarx', decimals: 8 }, '0x00000000000000000000000000000000000b2ad5': { coingeckoId: 'saucerswap', decimals: 6 }, + '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, '0x0000000000000000000000000000000000163b5a': { coingeckoId: 'hedera-hashgraph', decimals: 8 }, '0x000000000000000000000000000000000038b3db': { coingeckoId: 'dovu-2', decimals: 8 }, '0x00000000000000000000000000000000000ec585': { coingeckoId: 'headstarter', decimals: 8 }, diff --git a/projects/hliquity/index.js b/projects/hliquity/index.js new file mode 100644 index 000000000000..737f36cdf7a1 --- /dev/null +++ b/projects/hliquity/index.js @@ -0,0 +1,13 @@ +const { nullAddress, sumTokens2 } = require("../helper/unwrapLPs"); + +const ACTIVE_POOL_CONTRACT = '0x00000000000000000000000000000000005c9f0b'; +async function tvl(api) { + await sumTokens2({ api, owner: ACTIVE_POOL_CONTRACT, token: nullAddress }) +} + +module.exports = { + methodology: 'the amount of locked hbar in the HLiquity protocol', + hedera: { + tvl, + } +}; From 601612897e8707b131926fcfff6e23b13f41679e Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 5 Nov 2024 07:27:06 +0100 Subject: [PATCH 204/787] Fix: Jarvis (#12158) --- projects/jarvis/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/jarvis/index.js b/projects/jarvis/index.js index e246481a1471..4bdd6b4dd4bd 100644 --- a/projects/jarvis/index.js +++ b/projects/jarvis/index.js @@ -75,9 +75,11 @@ async function tvl(api) { ].map(i => i.toLowerCase()) const calls = liquidityPools.filter(i => !blacklistedPools.includes(i.toLowerCase())) const collateralTokens = await api.multiCall({ abi: abi.collateralToken, calls }) - const totalCollateralAmounts = await api.multiCall({ abi: abi.totalCollateralAmount, calls }) + const totalCollateralAmounts = await api.multiCall({ abi: abi.totalCollateralAmount, calls, permitFailure: true }) collateralTokens.forEach((data, i) => { - api.add(data, totalCollateralAmounts[i].totalCollateral) + const totalCollateralAmount = totalCollateralAmounts[i] + if (!totalCollateralAmount) return + api.add(data, totalCollateralAmount.totalCollateral) }) } else if (version === 5) { // Get balances of every LiquidityPool and SynthToken Contracts From 894fefccedabce0ca730c703696bff89d91e7d16 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 5 Nov 2024 07:27:59 +0100 Subject: [PATCH 205/787] Fix: Origami (#12157) --- projects/origami/index.js | 52 ++++++++++++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/projects/origami/index.js b/projects/origami/index.js index e136642cc24c..2401bcb86ae2 100644 --- a/projects/origami/index.js +++ b/projects/origami/index.js @@ -6,6 +6,8 @@ const GRAPH_URLS = { arbitrum: sdk.graph.modifyEndpoint('https://subgraph.satsuma-prod.com/a912521dd162/templedao/origami-arbitrum/api'), // arbitrum } +const osUSDS = '0x0f90a6962e86b5587b4c11ba2b9697dc3ba84800' + module.exports = { doublecounted: true, } @@ -21,16 +23,42 @@ async function tvl(api) { const levVaults = investmentVaults.filter(isLeveraged).map(v => v.id) const nonLevVaults = investmentVaults.filter(v => !isLeveraged(v)).map(v => v.id) - let nonLevTokens = await api.multiCall({ abi: 'address:reserveToken', calls: nonLevVaults }) - nonLevTokens = await api.multiCall({ abi: 'address:baseToken', calls: nonLevTokens }) - const decimals = await api.multiCall({ abi: 'uint8:decimals', calls: nonLevVaults }) - const supplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: nonLevVaults }) - const reserves = await api.multiCall({ abi: 'uint256:reservesPerShare', calls: nonLevVaults }) - const bals = supplies.map((supply, idx) => reserves[idx] * supply / 10 ** decimals[idx]) - api.add(nonLevTokens, bals) - - const levReserveTokens = await api.multiCall({ calls: levVaults, abi: 'address:reserveToken' }) - const assetsAndLiabilities = await api.multiCall({ abi: 'function assetsAndLiabilities() external view returns (uint256 assets,uint256 liabilities,uint256 ratio)', calls: levVaults }) - const levBals = assetsAndLiabilities.map(({ assets, liabilities }) => assets - liabilities) - api.add(levReserveTokens, levBals) + const [decimals, supplies, reserves, rawNonLevTokens] = await Promise.all([ + api.multiCall({ abi: 'uint8:decimals', calls: nonLevVaults, permitFailure: true }), + api.multiCall({ abi: 'uint256:totalSupply', calls: nonLevVaults, permitFailure: true }), + api.multiCall({ abi: 'uint256:reservesPerShare', calls: nonLevVaults, permitFailure: true }), + api.multiCall({ abi: 'address:reserveToken', calls: nonLevVaults, permitFailure: true }) + ]) + + await Promise.all(nonLevVaults.map(async (_vault, i) => { + const decimal = decimals[i] + const supply = supplies[i] + const reserve = reserves[i] + const rawNonLevToken = rawNonLevTokens[i] + if (!decimals || !supply || !reserve || !rawNonLevToken) return + const nonLevToken = await api.call({ abi: 'address:baseToken', target: rawNonLevToken }) + const bal = reserve * supply / 10 ** decimal + api.add(nonLevToken, bal) + })) + + const [levReserveTokens, assetsAndLiabilities] = await Promise.all([ + api.multiCall({ calls: levVaults, abi: 'address:reserveToken', permitFailure: true }), + api.multiCall({ abi: 'function assetsAndLiabilities() external view returns (uint256 assets,uint256 liabilities,uint256 ratio)', calls: levVaults, permitFailure: true }) + ]) + + levVaults.forEach((_vault, i) => { + const levReserveToken = levReserveTokens[i] + const assetsAndLiability = assetsAndLiabilities[i] + if(!levReserveToken || !assetsAndLiability) return + const levBal = assetsAndLiability.assets - assetsAndLiability.liabilities + api.add(levReserveToken, levBal) + }) + + if (api.chain ==='ethereum') { + const [asset, totalAssets] = await Promise.all([ + api.call({ target: osUSDS, abi: 'address:asset' }), + api.call({ target: osUSDS, abi: 'uint256:totalAssets' }) + ]) + api.add(asset, totalAssets) + } } From ade55ba3bc824ee04733f6e3e690c4c1c1cfac03 Mon Sep 17 00:00:00 2001 From: Zorag44 <75122924+Zorag44@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:04:02 +0530 Subject: [PATCH 206/787] added new pool (#12155) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/alphafi/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index 11557856f8a5..fa3f7404d659 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -115,6 +115,14 @@ const ALPHAFI_CETUS_TVL_IDS = [ token0Type: ADDRESSES.sui.BUCK, token1Type: ADDRESSES.sui.SUI }, + // fud sui + { + poolID: "0x005a2ebeb982a1e569a54795bce1eeb4d88900b674440f8487c2846da1706182", + cetusPoolID: "0xfc6a11998f1acf1dd55acb58acd7716564049cfd5fd95e754b0b4fe9444f4c9d", + investorID: "0xaa17ff01024678a94381fee24d0021a96d4f3a11855b0745facbb5d2eb9df730", + token0Type: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD", + token1Type: ADDRESSES.sui.SUI + }, ] const ALPHAFI_NAVI_TVL_IDS = [ From 39f6c605c2b5ce10cec079655d5ccd291543b3b4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 5 Nov 2024 07:45:00 +0100 Subject: [PATCH 207/787] fix strudel --- projects/strudel.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/projects/strudel.js b/projects/strudel.js index 5a2896b567dc..98b70a04e914 100644 --- a/projects/strudel.js +++ b/projects/strudel.js @@ -1,9 +1,4 @@ -async function tvl(api) { - const BTC = '0xe1406825186D63980fd6e2eC61888f7B91C4bAe4' - const supply = await api.call({ abi: 'erc20:totalSupply', target: BTC }) - api.addCGToken('bitcoin', supply/1e18) -} - module.exports = { - ethereum: { tvl }, + ethereum: { tvl: () => ({}) }, + // deadFrom: "2022-02-31", } From 289d7a09e97a03b44b432a1c056984d87e55dc16 Mon Sep 17 00:00:00 2001 From: LeeRyanj <138840879+LeeRyanj@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:13:10 +0800 Subject: [PATCH 208/787] add config (#12165) --- projects/kiloex/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index 2cd96c4275c0..057ded5fa8fa 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -59,6 +59,8 @@ module.exports = { ADDRESSES.base.USDC, //USDC '0x3b86ad95859b6ab773f55f8d94b4b9d443ee931f', //SolvBTC '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf',//cbBTC + '0x04c0599ae5a44757c0af6f9ec3b93da8976c150a',//weETH + '0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452',//wstETH ] }) }, }; From 762595106ab814efc6f74dab1d630a5d3437b314 Mon Sep 17 00:00:00 2001 From: peroxy Date: Tue, 5 Nov 2024 12:03:58 +0100 Subject: [PATCH 209/787] Update kamino-sdk package (#12168) --- projects/kamino/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/kamino/api.js b/projects/kamino/api.js index 29a30ff91268..c0c58e761c91 100644 --- a/projects/kamino/api.js +++ b/projects/kamino/api.js @@ -1,4 +1,4 @@ -const { Kamino } = require('@hubbleprotocol/kamino-sdk') +const { Kamino } = require('@kamino-finance/kliquidity-sdk') const { getConnection, } = require('../helper/solana') async function tvl() { From f58250d81fe8bacbd8bec13ee7dee134e77f130e Mon Sep 17 00:00:00 2001 From: Rozalenok Mikhail <32734898+deathwing00000@users.noreply.github.com> Date: Tue, 5 Nov 2024 18:38:14 +0700 Subject: [PATCH 210/787] MORE Markets adapter added (#12167) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/tokenMapping.js | 2 +- projects/more-markets/index.js | 51 +++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 projects/more-markets/index.js diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 61c4584a4a08..be9aca5dcc24 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -83,7 +83,7 @@ const fixBalancesTokens = { }, flow: { '0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e': { coingeckoId: 'flow', decimals: 18 }, - '0x1b97100ea1d7126c4d60027e231ea4cb25314bdb': { coingeckoId: 'ankr-staked-flow', decimals: 18 }, + '0x1b97100eA1D7126C4d60027e231EA4CB25314bdb': { coingeckoId: 'ankr-staked-flow', decimals: 18 }, [ADDRESSES.milkomeda.BNB]: { coingeckoId: 'usd-coin', decimals: 6 }, }, core: { diff --git a/projects/more-markets/index.js b/projects/more-markets/index.js new file mode 100644 index 000000000000..8fe40b7574a1 --- /dev/null +++ b/projects/more-markets/index.js @@ -0,0 +1,51 @@ +const { getLogs2 } = require("../helper/cache/getLogs") +const { sumTokens2 } = require('../helper/unwrapLPs') + +const abi = { + "idToMarketParams": "function idToMarketParams(bytes32 Id) returns (bool isPremiumMarket, address loanToken, address collateralToken, address oracle, address irm, uint256 lltv, address creditAttestationService, uint96 irxMaxLltv, uint256[] categoryLltv)", + "market": "function market(bytes32 input) returns (uint128 totalSupplyAssets, uint128 totalSupplyShares, uint128 totalBorrowAssets, uint128 totalBorrowShares, uint128 lastUpdate, uint128 fee, uint256 premiumFee)" +} + +module.exports = { + methodology: `Collateral (supply minus borrows) in the balance of the MORE Markets contracts`, +}; + +const config = { + flow: { + moreMarkets: "0x94A2a9202EFf6422ab80B6338d41c89014E5DD72", + fromBlock: 2871764, + }, +}; + +Object.keys(config).forEach((chain) => { + const { moreMarkets, fromBlock, } = config[chain]; + module.exports[chain] = { + tvl: async (api) => { + const marketIds = await getMarkets(api); + const tokens = (await api.multiCall({ target: moreMarkets, calls: marketIds, abi: abi.idToMarketParams, })) + .map((i) => [i.collateralToken, i.loanToken]) + .flat(); + return sumTokens2({ api, owner: moreMarkets, tokens, }); + }, + borrowed: async (api) => { + const marketIds = await getMarkets(api); + const marketInfo = await api.multiCall({ target: moreMarkets, calls: marketIds, abi: abi.idToMarketParams, }); + const marketData = await api.multiCall({ target: moreMarkets, calls: marketIds, abi: abi.market, }); + marketData.forEach((i, idx) => { + api.add(marketInfo[idx].loanToken, i.totalBorrowAssets); + }); + return sumTokens2({ api }) + }, + }; + + async function getMarkets(api) { + const logs = await getLogs2({ + api, + target: moreMarkets, + eventAbi: "event CreateMarket(bytes32 indexed id, (bool,address,address,address,address,uint256,address,uint96,uint256[]) marketParams)", + fromBlock, + }); + return logs.map((i) => i.id); + } + +}) \ No newline at end of file From c816c18b725c883976242b246f750670e02dfe8b Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:32:32 +0100 Subject: [PATCH 211/787] Fix: Xswap-v3 (#12170) --- projects/xspswap-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/xspswap-v3/index.js b/projects/xspswap-v3/index.js index 9b74be6cddd8..b1d5865bf13f 100644 --- a/projects/xspswap-v3/index.js +++ b/projects/xspswap-v3/index.js @@ -2,5 +2,5 @@ const { uniV3Export } = require('../helper/uniswapV3') const factory = '0x30F317A9EC0f0D06d5de0f8D248Ec3506b7E4a8A' module.exports = uniV3Export({ - xdc: { factory, fromBlock: 59782067, methodology: 'TVL accounts for the liquidity on all AMM pools taken from the factory contract', }, + xdc: { factory, fromBlock: 59782067, methodology: 'TVL accounts for the liquidity on all AMM pools taken from the factory contract', permitFailure: true }, }) \ No newline at end of file From 0bdd1c3131ba44e370564fe2b6bb9fd305e0b5ab Mon Sep 17 00:00:00 2001 From: 0xngmi <80541789+0xngmi@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:52:40 +0000 Subject: [PATCH 212/787] use eslint version from package.json --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6509cb7efa8e..69b6f38f3481 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,4 +56,6 @@ jobs: done - name: Run ESLint - uses: eslint/github-action@v0 + run: | + npm ci + npm run lint From e1811ab7ea532aa5bf9b3e0f45c838f8cf1c6b6b Mon Sep 17 00:00:00 2001 From: Da Sichuan <86024678+DaSichuan@users.noreply.github.com> Date: Tue, 5 Nov 2024 14:55:56 -0800 Subject: [PATCH 213/787] Change name of spring sui to springsui (#12175) --- projects/{spring-sui => springsui}/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename projects/{spring-sui => springsui}/index.js (91%) diff --git a/projects/spring-sui/index.js b/projects/springsui/index.js similarity index 91% rename from projects/spring-sui/index.js rename to projects/springsui/index.js index 9b31771faad0..72797930af9d 100644 --- a/projects/spring-sui/index.js +++ b/projects/springsui/index.js @@ -9,7 +9,7 @@ async function tvl() { } module.exports = { - methodology: "Calculates the amount of SUI staked in Spring Sui liquid staking contracts.", + methodology: "Calculates the amount of SUI staked in SpringSui liquid staking contracts.", sui: { tvl, } From c9ca10f26b58a32a343b1af555ef0be797fefaa6 Mon Sep 17 00:00:00 2001 From: ratex-tony Date: Wed, 6 Nov 2024 14:55:30 +0800 Subject: [PATCH 214/787] feat: add bnsol vaults (#12177) --- projects/rate-x/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/rate-x/index.js b/projects/rate-x/index.js index 760fbb795c7e..f4c264872edd 100644 --- a/projects/rate-x/index.js +++ b/projects/rate-x/index.js @@ -10,7 +10,9 @@ async function tvl(api) { 'BpYbhwDZGpPvcKw3cSh5f9UqRaHfuxgz3avW9g324LUz', '4nyfJ4JBsRJLij7VGCVUeHwKSLAAku66ptJamoodY29L', '6opMSfkHgWsvG5KmZo8y2DuShaDHwXfB6VUuTx6W4Age', - '4Ejjk5w7HAWvmXYT57s5uwn8rs7i61nbpcTRQ9ABB11M' + '4Ejjk5w7HAWvmXYT57s5uwn8rs7i61nbpcTRQ9ABB11M', + '4xq7VjrJCU2Smk5JcJToik5hiEJ8RCvECReePP8Jg6q8', + 'B2YeVM6Kf3SKYLuH2nfucCmZwy8KJcQpd9e9JEuwv9mt' ], balances: api.getBalances() }) From c14dc7bd5ca51be9facaaea9983d637ceb019bfb Mon Sep 17 00:00:00 2001 From: Aqualoan Date: Wed, 6 Nov 2024 15:59:33 +0900 Subject: [PATCH 215/787] Added Aqualoan (#12171) Co-authored-by: techaqualoan --- projects/aqualoan/index.js | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 projects/aqualoan/index.js diff --git a/projects/aqualoan/index.js b/projects/aqualoan/index.js new file mode 100644 index 000000000000..9ffc6fb2511a --- /dev/null +++ b/projects/aqualoan/index.js @@ -0,0 +1,44 @@ +const abi = { + getReserveTokensAddresses: "function getReserveTokensAddresses(address asset) view returns (address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress)", + getAllReservesTokens: "function getAllReservesTokens() view returns ((string symbol, address tokenAddress)[])", + getReserveData: "function getReserveData(address asset) view returns (uint256 unbacked, uint256 accruedToTreasuryScaled, uint256 totalAToken, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 liquidityIndex, uint256 variableBorrowIndex, uint40 lastUpdateTimestamp)", +}; + +const CONFIG = { + bsc: ['0xDc33eAA50B8707f791478Cec324e451E20FDa7ed'] +}; + +const fetchReserveData = async (api, poolDatas, isBorrowed) => { + const reserveTokens = await api.multiCall({ calls: poolDatas, abi: abi.getAllReservesTokens }); + const calls = [] + + poolDatas.map((pool, i) => { + reserveTokens[i].forEach(({ tokenAddress }) => calls.push({ target: pool, params: tokenAddress })); + }); + const reserveData = await api.multiCall({ abi: isBorrowed ? abi.getReserveData : abi.getReserveTokensAddresses, calls, }) + const tokensAndOwners = [] + reserveData.forEach((data, i) => { + const token = calls[i].params + if (isBorrowed) { + api.add(token, data.totalVariableDebt) + api.add(token, data.totalStableDebt) + } else + tokensAndOwners.push([token, data.aTokenAddress]) + }) + + if (isBorrowed) return api.getBalances() + return api.sumTokens({ tokensAndOwners }) +} + +module.exports.methodology = "Counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield. Borrowed coins are not counted towards the TVL, so only the coins actually locked in the contracts are counted. There's multiple reasons behind this but one of the main ones is to avoid inflating the TVL through cycled lending." + +Object.keys(CONFIG).forEach((chain) => { + const poolDatas = CONFIG[chain]; + module.exports[chain] = { + tvl: (api) => fetchReserveData(api, poolDatas), + borrowed: (api) => fetchReserveData(api, poolDatas, true), + }; +}); + +module.exports.hallmarks = [ +] From ed9e9811e4cc221d1d64b25ad91c6c9504d48ec5 Mon Sep 17 00:00:00 2001 From: Kylix Afonso <59728053+kylixafonso@users.noreply.github.com> Date: Wed, 6 Nov 2024 06:59:56 +0000 Subject: [PATCH 216/787] fix: add USDM token mapping (#12176) --- projects/liqwid/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/liqwid/index.js b/projects/liqwid/index.js index 9a251c1e7137..020298cf5e77 100644 --- a/projects/liqwid/index.js +++ b/projects/liqwid/index.js @@ -62,7 +62,7 @@ const tokenMapping = { Ada: 'lovelace', DJED: '8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344', DAI: 'dai', - + USDM: 'c48cbb3d5e57ed56e276bc45f99ab39abe94e6cd7ac39fb402da47ad0014df105553444d' } const getToken = (market) => tokenMapping[market.id] ?? market.asset.currencySymbol + toHex(market.asset.name) From d33ca5b305a95d44f4ce3cbb74b8a257f17fb944 Mon Sep 17 00:00:00 2001 From: Evgeny Date: Wed, 6 Nov 2024 11:00:37 +0400 Subject: [PATCH 217/787] add stETH restaking (#12172) Co-authored-by: Evgeny Rozanov --- projects/accumulated-finance/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/accumulated-finance/index.js b/projects/accumulated-finance/index.js index 8779d0c22f53..f844b04379f7 100644 --- a/projects/accumulated-finance/index.js +++ b/projects/accumulated-finance/index.js @@ -67,7 +67,16 @@ const config = { { "sapphire": { "LST": "0xed57966f1566de1a90042d07403021ea52ad4724" - }} + } + } + ], + "stETH": [ + { + "ethereum": { + "baseToken": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", + "LST": "0x684d7fd1067ed8e9686e6fd764d048b9bf92dfa9" + } + }, ] } From c64f1848473de0d01769373e60c1a6ccfd867c92 Mon Sep 17 00:00:00 2001 From: monprotocol <163447238+monprotocol@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:19:25 +0300 Subject: [PATCH 218/787] added monprotocol adapter (#12183) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/monprotocol/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/monprotocol/index.js diff --git a/projects/monprotocol/index.js b/projects/monprotocol/index.js new file mode 100644 index 000000000000..a0aa6bdbcac3 --- /dev/null +++ b/projects/monprotocol/index.js @@ -0,0 +1,15 @@ +const { staking } = require('../helper/staking') +const tokenAddress = '0xc555D625828c4527d477e595fF1Dd5801B4a600e'; +const stakingContracts = [ + '0x65A8b32bc4dE5E0156DBa85Ce615d9ef8ea59780', + '0xd0c40b774ecfBc7B0632d23F871Cc0E523aad8F3', + '0xa305A8C63a5305Cc2D4d58c41F1d7C662C95475b', + '0x57136E05e6b1F502bd56B5439fCC1039A8250ED2' +] +module.exports = { + ethereum: { + tvl: () => ({}), + staking: staking(stakingContracts, tokenAddress), + }, + methodology: 'Counts the balance of staked tokens in the staking, claims, and rewards registry.', +}; From 77cba4675765a196092e5e63329a5f2907c6d73a Mon Sep 17 00:00:00 2001 From: Giuseppe Palazzolo <38705839+palace22@users.noreply.github.com> Date: Wed, 6 Nov 2024 11:19:49 +0100 Subject: [PATCH 219/787] Add ARB, ETH Arb and SolvBTC assets on Folks Finance xChain (#12182) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/folks-xchain/constants.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/projects/folks-xchain/constants.js b/projects/folks-xchain/constants.js index 8efed9a4abd0..efaf73e65d5e 100644 --- a/projects/folks-xchain/constants.js +++ b/projects/folks-xchain/constants.js @@ -30,9 +30,14 @@ const HubPools = { tokenAddress: ADDRESSES.avax.BTC_b, chainPoolAddress: '0xef7a6EBEDe2ad558DB8c36Df65365b209E5d57dC', }, + { // SolvBTC + poolAddress: "0x307bCEC89624660Ed06C97033EDb7eF49Ab0EB2D", + tokenAddress: '0xbc78D84Ba0c46dFe32cf2895a19939c86b81a777', + }, ], 'ethereum': [ // excluding USDC cause bridged + // excluding SolvBTC cause bridged { // ETH_eth poolAddress: "0xB6DF8914C084242A19A4C7fb15368be244Da3c75", tokenAddress: ADDRESSES.null, @@ -46,7 +51,8 @@ const HubPools = { ], 'base': [ // excluding USDC cause bridged - { // ETH_base + // excluding SolvBTC cause bridged + { // ETH_base poolAddress: "0x51958ed7B96F57142CE63BB223bbd9ce23DA7125", tokenAddress: ADDRESSES.null, chainPoolAddress: '0xe3B0e4Db870aA58A24f87d895c62D3dc5CD05883', @@ -58,7 +64,8 @@ const HubPools = { }, ], 'bsc': [ - { // BNB + // excluding SolvBTC cause bridged + { // BNB poolAddress: "0x89970d3662614a5A4C9857Fcc9D9C3FA03824fe3", tokenAddress: ADDRESSES.null, chainPoolAddress: '0x5f2F4771B7dc7e2F7E9c1308B154E1e8957ecAB0', @@ -73,6 +80,20 @@ const HubPools = { tokenAddress: ADDRESSES.bsc.BTCB, chainPoolAddress: '0x12Db9758c4D9902334C523b94e436258EB54156f', }, + ], + 'arbitrum': [ + // excluding USDC cause bridged + // excluding SolvBTC cause bridged + { // ETH_arb + poolAddress: "0x44E0d0809AF8Ee37BFb1A4e75D5EF5B96F6346A3", + tokenAddress: ADDRESSES.null, + chainPoolAddress: '0x37d761883a01e9F0B0d7fe59EEC8c21D94393CDD', + }, + { // ARB + poolAddress: "0x1177A3c2CccDb9c50D52Fc2D30a13b2c3C40BCF4", + tokenAddress: ADDRESSES.arbitrum.ARB, + chainPoolAddress: '0x1b2a8d56967d00700DD5C94E27B1a116a1deF8Df', + }, ] } From 2c39e55487cf6478f7f5aa1e02607f7e94d2df5b Mon Sep 17 00:00:00 2001 From: SeanTuring Date: Wed, 6 Nov 2024 18:20:33 +0800 Subject: [PATCH 220/787] add exsat bridge adapter (#12179) --- projects/exsat/index.js | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 projects/exsat/index.js diff --git a/projects/exsat/index.js b/projects/exsat/index.js new file mode 100644 index 000000000000..200768838d4c --- /dev/null +++ b/projects/exsat/index.js @@ -0,0 +1,46 @@ +const axios = require('axios'); +const { sumTokens } = require("../helper/chain/bitcoin"); +const { getConfig } = require('../helper/cache'); + +async function tvl(api) { + const config = await getConfig('exsat', 'https://raw.githubusercontent.com/exsat-network/exsat-defillama/refs/heads/main/bridge-bitcoin.json'); + const custody_addresses = config['custody_addresses']; + const custody_ids = config['custody_ids']; + const owners = [...custody_addresses]; + + for (let custody_id of custody_ids) { + let lower_bound = null; + let hasMore = true; + + while (hasMore) { + const { data: response } = await axios.post('https://rpc-us.exsat.network/v1/chain/get_table_rows', { + "json": true, + "code": "brdgmng.xsat", + "scope": custody_id, + "table": "addrmappings", + "lower_bound": lower_bound, + "upper_bound": null, + "index_position": 1, + "key_type": "", + "limit": "100", + "reverse": false, + "show_payer": true + }); + + const addrs = response.rows.map(row => row.data.btc_address); + owners.push(...addrs); + + hasMore = response.more; + lower_bound = response.next_key; + } + } + + return sumTokens({ owners }); +} + +module.exports = { + methodology: 'TVL for the exSat Bridge represents the total balance in custody BTC addresses, reflecting BTC assets bridged to the exSat network.', + bitcoin: { + tvl, + }, +}; From 2bac27d971c27210a101446a2f155b11e3438adc Mon Sep 17 00:00:00 2001 From: sofa-org <161308389+sofa-org@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:34:45 +0800 Subject: [PATCH 221/787] add okx earn vaults (#12181) --- projects/sofa-org/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/sofa-org/index.js b/projects/sofa-org/index.js index 0fb00932e99a..9f38c147d126 100644 --- a/projects/sofa-org/index.js +++ b/projects/sofa-org/index.js @@ -39,6 +39,11 @@ const config = { '0x8F9259a355933737F8F11f95d32460eCd5ED0706', '0x3AbC7053ec29e26c1429195fd971F280422ecA80', '0x071E0C2BE2b16c8B00173c6535eF8331b8e1feeD', + // okx + '0xe483d580664cd72B0A8cae0D65EFfA6587bd2263', + '0x21f759Bcb31739032A00b37e3560a216AE52eFDC', + '0x3191a0008415dEB5c5161C4B394Ec46C8C703f8c', + '0xC9Aa266e2E50EC2474cD881566845480F8daE931', ], }, arbitrum: { From f5da14efd3a0be075302fd740c5ab5307ec2d49c Mon Sep 17 00:00:00 2001 From: MethLab <167086493+MethLabxyz@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:15:57 +0530 Subject: [PATCH 222/787] Added new Methlab contracts (#12180) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/methlab-xyz/index.js | 60 +++++++++++++++-------------------- 1 file changed, 25 insertions(+), 35 deletions(-) diff --git a/projects/methlab-xyz/index.js b/projects/methlab-xyz/index.js index 4867d111643b..12dffbc60e61 100644 --- a/projects/methlab-xyz/index.js +++ b/projects/methlab-xyz/index.js @@ -1,48 +1,38 @@ -const { getLogs } = require('../helper/cache/getLogs') +const { getLogs2 } = require('../helper/cache/getLogs') const { mergeExports } = require('../helper/utils') const { uniV3Export } = require('../helper/uniswapV3') + + +const abi = { + evt_Strategy: 'event StrategyStatusChange (address indexed strategy, bool status)', + evt_VaultAdded: 'event VaultAdded (address indexed vault)', + evt_LoanAdded: 'event LoanAdded (address indexed vault, address indexed loan, address loanImplUsed)', + strategy_collToken: 'address:collToken', + strategy_borrowToken: 'address:borrowToken' +} + const config = { - mantle: { - factories: [{ target: '0x6Cc0c2D8F9533dFd2276337DdEaBBCEE9dd0747F', fromBlock: 51253051 },], - } + mantle: { factory: '0xB375DfF90F8dafeA50E2EA7a0666B426Ed786C5D', fromBlock: 69177970 } } Object.keys(config).forEach(chain => { - const { factories } = config[chain] + const { factory, fromBlock } = config[chain]; + module.exports[chain] = { tvl: async (api) => { - const vaults = [] - for (const { target, fromBlock, } of factories) { - const logs = await getLogs({ api, target, fromBlock, onlyArgs: true, eventAbi: 'event VaultAdded (address indexed vault)' }) - vaults.push(...logs.map(log => log.vault)) - } - const counters = await api.multiCall({ abi: abi.collectionCounter, calls: vaults }) - const callOwners = [] - const calls = [] - for (let i = 0; i < vaults.length; i++) { - const counter = counters[i] - for (let j = 0; j < +counter; j++) { - calls.push({ target: vaults[i], params: j }) - callOwners.push(vaults[i]) - } - } - const results = await api.multiCall({ abi: abi.collection, calls }) - const tokenSet = new Set() - results.forEach((result, i) => { - tokenSet.add(result.collToken) - tokenSet.add(result.borrowToken) - // tokensAndOwners.push([result.collToken, callOwners[i]]) - // tokensAndOwners.push([result.borrowToken, callOwners[i]]) - }) - return api.sumTokens({ owners: vaults, tokens: Array.from(tokenSet), blacklistedTokens: ['0x401307732d732dd3b05ac1138b8661c0f55830ea'] }) + const logArgs = { api, target: factory, fromBlock }; + + const strategies = (await getLogs2({ ...logArgs, eventAbi: abi.evt_Strategy, extraKey: 'strategy' })).map(log => log.strategy); + const vaults = (await getLogs2({ ...logArgs, eventAbi: abi.evt_VaultAdded, extraKey: 'vault' })).map(log => log.vault); + const loans = (await getLogs2({ ...logArgs, eventAbi: abi.evt_LoanAdded, extraKey: 'loan' })).map(log => log.loan); + + const collTokens = await api.multiCall({ abi: abi.strategy_collToken, calls: strategies }); + const borrowTokens = await api.multiCall({ abi: abi.strategy_borrowToken, calls: strategies }); + const tokens = collTokens.concat(borrowTokens) + return api.sumTokens({ tokens, owners: loans.concat(vaults), blacklistedTokens: ['0x401307732d732dd3b05ac1138b8661c0f55830ea'] }); } } -}) - -const abi = { - "collection": "function collection(uint256 collectionId) view returns ((address collToken, address borrowToken, uint256 minSingleLoanAmt, uint256 maxSingleLoanAmt, uint256 expiresAt, bool isEnabled, (uint256 strikePrice, uint256 interestRate, uint256 duration)[] intents))", - "collectionCounter": "uint256:collectionCounter", -} +}); module.exports = mergeExports([ module.exports, From 193f20f2b0f49b86a47f710c960a71de6c5fe574 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:59:31 +0100 Subject: [PATCH 223/787] Feat: Bitcoin book (populate) (#12169) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/21-co/index.js | 7 +- projects/ainn-layer2/index.js | 24 +- projects/allo/index.js | 12 +- projects/avalance-btc/index.js | 9 +- projects/avalon-finance-cedefi/index.js | 10 +- projects/bedrock/index.js | 9 +- projects/bevm/index.js | 9 +- projects/biconomy-cex/index.js | 5 +- projects/bigone/index.js | 6 +- projects/binance-btc/index.js | 7 +- projects/bing-cex/index.js | 7 +- projects/bitfinex/index.js | 7 +- projects/bitget/index.js | 16 +- projects/bitmake/index.js | 11 +- projects/bitmark/index.js | 3 +- projects/bitmex/index.js | 6 +- projects/bitstable-finance/index.js | 8 +- projects/bitunix-cex/index.js | 7 +- projects/bitvenus/index.js | 10 +- projects/blofin-cex/index.js | 3 +- projects/boringdao/index.js | 4 +- projects/bsquared/index.js | 30 +- projects/btse/index.js | 8 +- projects/bybit/index.js | 12 +- projects/cake-defi/index.js | 3 +- projects/coindcx/index.js | 28 +- projects/coinex/index.js | 21 +- projects/coinsquare/index.js | 14 +- projects/coinw/index.js | 6 +- projects/crypto-com/index.js | 12 +- projects/deribit/index.js | 20 +- projects/entities/el-salvador.js | 3 +- projects/entities/fbi-dprk.js | 15 +- projects/entities/mt-gox.js | 13 +- projects/entities/silkroad-fbifunds.js | 13 +- projects/exsat-credit-staking/index.js | 22 +- projects/exsat/index.js | 41 +-- projects/fastex/index.js | 5 +- projects/fbtc/index.js | 29 +- projects/fire/index.js | 8 +- projects/flipster/index.js | 5 +- projects/garden/index.js | 5 +- projects/gate-io/index.js | 10 +- projects/hashkey-exchange/index.js | 8 +- projects/hashkey/index.js | 6 +- projects/helper/bitcoin-book/21Co.js | 4 + projects/helper/bitcoin-book/ainn-layer2.js | 20 + projects/helper/bitcoin-book/allo.js | 9 + projects/helper/bitcoin-book/avalanche-btc.js | 3 + projects/helper/bitcoin-book/avalon-cedefi.js | 8 + projects/helper/bitcoin-book/bevm.js | 4 + projects/helper/bitcoin-book/biconomy-cex.js | 3 + projects/helper/bitcoin-book/bigone.js | 4 + projects/helper/bitcoin-book/binance-btc.js | 3 + projects/helper/bitcoin-book/binance.js | 40 ++ projects/helper/bitcoin-book/bing-cex.js | 4 + projects/helper/bitcoin-book/bitfinex.js | 5 + projects/helper/bitcoin-book/bitget.js | 14 + projects/helper/bitcoin-book/bitmake.js | 4 + projects/helper/bitcoin-book/bitmark.js | 3 + .../bitcoin-book/bitmex.js} | 2 +- .../helper/bitcoin-book/bitstable-finance.js | 5 + projects/helper/bitcoin-book/bitunix-cex.js | 5 + projects/helper/bitcoin-book/bitvenus.js | 7 + projects/helper/bitcoin-book/blofin-cex.js | 5 + projects/helper/bitcoin-book/boringdao.js | 3 + projects/helper/bitcoin-book/bsquaredBRC20.js | 3 + projects/helper/bitcoin-book/bsquaredBTC.js | 20 + projects/helper/bitcoin-book/btse.js | 3 + projects/helper/bitcoin-book/bybit.js | 10 + projects/helper/bitcoin-book/cake-defi.js | 3 + projects/helper/bitcoin-book/coindcx.js | 26 ++ projects/helper/bitcoin-book/coinex.js | 19 + projects/helper/bitcoin-book/coinsquare.js | 12 + projects/helper/bitcoin-book/coinw.js | 4 + projects/helper/bitcoin-book/crypto-com.js | 10 + projects/helper/bitcoin-book/deribit.js | 16 + projects/helper/bitcoin-book/elSalvador.js | 3 + projects/helper/bitcoin-book/fastex.js | 3 + projects/helper/bitcoin-book/fbi-dprk.js | 9 + projects/helper/bitcoin-book/fetchers.js | 127 +++++++ projects/helper/bitcoin-book/fire.js | 6 + projects/helper/bitcoin-book/flipster.js | 3 + projects/helper/bitcoin-book/garden.js | 3 + projects/helper/bitcoin-book/gate-io.js | 8 + .../helper/bitcoin-book/hashkey-exchange.js | 6 + projects/helper/bitcoin-book/hashkey.js | 4 + projects/helper/bitcoin-book/hibt.js | 3 + projects/helper/bitcoin-book/hope-money.js | 7 + projects/helper/bitcoin-book/hotbit.js | 3 + projects/helper/bitcoin-book/huobi.js | 14 + projects/helper/bitcoin-book/imbtc.js | 3 + projects/helper/bitcoin-book/index.js | 173 +++++++++ projects/helper/bitcoin-book/india-covid.js | 3 + .../helper/bitcoin-book/klever-exchange.js | 5 + projects/helper/bitcoin-book/korbit.js | 23 ++ projects/helper/bitcoin-book/kraken-btc.js | 3 + projects/helper/bitcoin-book/kraken.js | 16 + projects/helper/bitcoin-book/kucoin.js | 114 ++++++ projects/helper/bitcoin-book/latoken.js | 5 + .../helper/bitcoin-book/lorenzo-enzoBTC.js | 4 + projects/helper/bitcoin-book/lorenzo.js | 32 ++ projects/helper/bitcoin-book/maskex.js | 4 + projects/helper/bitcoin-book/mento.js | 4 + projects/helper/bitcoin-book/merlin.js | 28 ++ projects/helper/bitcoin-book/mexc-cex.js | 3 + .../helper/bitcoin-book/mt-gox-entities.js | 7 + projects/helper/bitcoin-book/mt-gox.js | 81 ++++ projects/helper/bitcoin-book/multibit.js | 5 + projects/helper/bitcoin-book/nbx.js | 4 + projects/helper/bitcoin-book/nonkyc.js | 3 + projects/helper/bitcoin-book/obelisk.js | 7 + projects/helper/bitcoin-book/okcoin.js | 4 + projects/helper/bitcoin-book/okex.js | 186 ++++++++++ projects/helper/bitcoin-book/phemex.js | 3 + projects/helper/bitcoin-book/pionex-cex.js | 19 + projects/helper/bitcoin-book/probit.js | 5 + projects/helper/bitcoin-book/pstake-btc.js | 3 + projects/helper/bitcoin-book/robinhood.js | 5 + projects/helper/bitcoin-book/rosen-bridge.js | 3 + projects/helper/bitcoin-book/roup.js | 6 + .../silkroad-fbifunds-entities.js | 7 + projects/helper/bitcoin-book/silkroad.js | 7 + projects/helper/bitcoin-book/swissborg.js | 8 + projects/helper/bitcoin-book/toobit.js | 3 + projects/helper/bitcoin-book/tron-btc.js | 5 + projects/helper/bitcoin-book/wbtc.js | 341 +++++++++++++++++ projects/helper/bitcoin-book/woo-cex.js | 4 + projects/helper/bitcoin-book/xlink.js | 17 + projects/helper/bitcoin-book/xlinkLST.js | 3 + projects/helper/bitcoin-book/xrgb.js | 3 + projects/hibt/index.js | 5 +- projects/hope-money/index.js | 11 +- projects/hotbit/index.js | 3 +- projects/huobi/index.js | 17 +- projects/imbtc.js | 3 +- projects/klever-exchange/index.js | 7 +- projects/korbit/index.js | 25 +- projects/kraken-btc/index.js | 3 +- projects/kraken/index.js | 18 +- projects/kucoin/index.js | 116 +----- projects/latoken/index.js | 7 +- projects/lombard/index.js | 37 +- projects/lorenzo-enzoBTC/index.js | 15 +- projects/lorenzo/index.js | 39 +- projects/maskex/index.js | 5 +- projects/mento/index.js | 3 +- projects/merlin-l2/index.js | 34 +- projects/mexc-cex/index.js | 5 +- projects/mt-gox/index.js | 88 +---- projects/multibit/index.js | 7 +- projects/nbx/index.js | 6 +- projects/nonkyc/index.js | 5 +- projects/obelisk/index.js | 26 +- projects/okcoin/index.js | 6 +- projects/okex/index.js | 190 +--------- projects/phemex/index.js | 5 +- projects/pionex-cex/index.js | 21 +- projects/probit/index.js | 7 +- projects/pstake-btc/index.js | 9 +- projects/pumpbtc/index.js | 17 +- projects/robinhood/index.js | 7 +- projects/rosen-bridge/index.js | 3 +- projects/roup/index.js | 8 +- projects/silkroad-fbifunds/index.js | 13 +- projects/solv-btc-lst/index.js | 14 +- projects/swissborg/index.js | 10 +- projects/tbtc/index.js | 12 +- projects/toobit/index.js | 5 +- projects/treasury/india-covid-relief-fund.js | 7 +- projects/tron-btc/index.js | 10 +- projects/wbtc.js | 348 +----------------- projects/woo-cex/index.js | 8 +- projects/xlink-btc-lst/index.js | 10 +- projects/xlink/index.js | 23 +- projects/xrgb/index.js | 6 +- 176 files changed, 1844 insertions(+), 1536 deletions(-) create mode 100644 projects/helper/bitcoin-book/21Co.js create mode 100644 projects/helper/bitcoin-book/ainn-layer2.js create mode 100644 projects/helper/bitcoin-book/allo.js create mode 100644 projects/helper/bitcoin-book/avalanche-btc.js create mode 100644 projects/helper/bitcoin-book/avalon-cedefi.js create mode 100644 projects/helper/bitcoin-book/bevm.js create mode 100644 projects/helper/bitcoin-book/biconomy-cex.js create mode 100644 projects/helper/bitcoin-book/bigone.js create mode 100644 projects/helper/bitcoin-book/binance-btc.js create mode 100644 projects/helper/bitcoin-book/binance.js create mode 100644 projects/helper/bitcoin-book/bing-cex.js create mode 100644 projects/helper/bitcoin-book/bitfinex.js create mode 100644 projects/helper/bitcoin-book/bitget.js create mode 100644 projects/helper/bitcoin-book/bitmake.js create mode 100644 projects/helper/bitcoin-book/bitmark.js rename projects/{bitmex/bitcoin.json => helper/bitcoin-book/bitmex.js} (99%) create mode 100644 projects/helper/bitcoin-book/bitstable-finance.js create mode 100644 projects/helper/bitcoin-book/bitunix-cex.js create mode 100644 projects/helper/bitcoin-book/bitvenus.js create mode 100644 projects/helper/bitcoin-book/blofin-cex.js create mode 100644 projects/helper/bitcoin-book/boringdao.js create mode 100644 projects/helper/bitcoin-book/bsquaredBRC20.js create mode 100644 projects/helper/bitcoin-book/bsquaredBTC.js create mode 100644 projects/helper/bitcoin-book/btse.js create mode 100644 projects/helper/bitcoin-book/bybit.js create mode 100644 projects/helper/bitcoin-book/cake-defi.js create mode 100644 projects/helper/bitcoin-book/coindcx.js create mode 100644 projects/helper/bitcoin-book/coinex.js create mode 100644 projects/helper/bitcoin-book/coinsquare.js create mode 100644 projects/helper/bitcoin-book/coinw.js create mode 100644 projects/helper/bitcoin-book/crypto-com.js create mode 100644 projects/helper/bitcoin-book/deribit.js create mode 100644 projects/helper/bitcoin-book/elSalvador.js create mode 100644 projects/helper/bitcoin-book/fastex.js create mode 100644 projects/helper/bitcoin-book/fbi-dprk.js create mode 100644 projects/helper/bitcoin-book/fetchers.js create mode 100644 projects/helper/bitcoin-book/fire.js create mode 100644 projects/helper/bitcoin-book/flipster.js create mode 100644 projects/helper/bitcoin-book/garden.js create mode 100644 projects/helper/bitcoin-book/gate-io.js create mode 100644 projects/helper/bitcoin-book/hashkey-exchange.js create mode 100644 projects/helper/bitcoin-book/hashkey.js create mode 100644 projects/helper/bitcoin-book/hibt.js create mode 100644 projects/helper/bitcoin-book/hope-money.js create mode 100644 projects/helper/bitcoin-book/hotbit.js create mode 100644 projects/helper/bitcoin-book/huobi.js create mode 100644 projects/helper/bitcoin-book/imbtc.js create mode 100644 projects/helper/bitcoin-book/index.js create mode 100644 projects/helper/bitcoin-book/india-covid.js create mode 100644 projects/helper/bitcoin-book/klever-exchange.js create mode 100644 projects/helper/bitcoin-book/korbit.js create mode 100644 projects/helper/bitcoin-book/kraken-btc.js create mode 100644 projects/helper/bitcoin-book/kraken.js create mode 100644 projects/helper/bitcoin-book/kucoin.js create mode 100644 projects/helper/bitcoin-book/latoken.js create mode 100644 projects/helper/bitcoin-book/lorenzo-enzoBTC.js create mode 100644 projects/helper/bitcoin-book/lorenzo.js create mode 100644 projects/helper/bitcoin-book/maskex.js create mode 100644 projects/helper/bitcoin-book/mento.js create mode 100644 projects/helper/bitcoin-book/merlin.js create mode 100644 projects/helper/bitcoin-book/mexc-cex.js create mode 100644 projects/helper/bitcoin-book/mt-gox-entities.js create mode 100644 projects/helper/bitcoin-book/mt-gox.js create mode 100644 projects/helper/bitcoin-book/multibit.js create mode 100644 projects/helper/bitcoin-book/nbx.js create mode 100644 projects/helper/bitcoin-book/nonkyc.js create mode 100644 projects/helper/bitcoin-book/obelisk.js create mode 100644 projects/helper/bitcoin-book/okcoin.js create mode 100644 projects/helper/bitcoin-book/okex.js create mode 100644 projects/helper/bitcoin-book/phemex.js create mode 100644 projects/helper/bitcoin-book/pionex-cex.js create mode 100644 projects/helper/bitcoin-book/probit.js create mode 100644 projects/helper/bitcoin-book/pstake-btc.js create mode 100644 projects/helper/bitcoin-book/robinhood.js create mode 100644 projects/helper/bitcoin-book/rosen-bridge.js create mode 100644 projects/helper/bitcoin-book/roup.js create mode 100644 projects/helper/bitcoin-book/silkroad-fbifunds-entities.js create mode 100644 projects/helper/bitcoin-book/silkroad.js create mode 100644 projects/helper/bitcoin-book/swissborg.js create mode 100644 projects/helper/bitcoin-book/toobit.js create mode 100644 projects/helper/bitcoin-book/tron-btc.js create mode 100644 projects/helper/bitcoin-book/wbtc.js create mode 100644 projects/helper/bitcoin-book/woo-cex.js create mode 100644 projects/helper/bitcoin-book/xlink.js create mode 100644 projects/helper/bitcoin-book/xlinkLST.js create mode 100644 projects/helper/bitcoin-book/xrgb.js diff --git a/projects/21-co/index.js b/projects/21-co/index.js index 1d5299a08af7..4254a70a3f12 100644 --- a/projects/21-co/index.js +++ b/projects/21-co/index.js @@ -1,11 +1,10 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + const config = { bitcoin: { - owners: [ - '1HTGi4tfXSEtcXD4pk6S3vBs3s64hWY1pW', - '12WZhMFFLHQ4rCMSkeBfbJXRk7aGWyBh1M', - ], + owners: bitcoinAddressBook.twentyOneCo }, solana: { owners: [ diff --git a/projects/ainn-layer2/index.js b/projects/ainn-layer2/index.js index 6768c352a495..e14235bbff3f 100644 --- a/projects/ainn-layer2/index.js +++ b/projects/ainn-layer2/index.js @@ -1,33 +1,13 @@ const sdk = require('@defillama/sdk'); const { sumTokensExport } = require('../helper/sumTokens'); - -const BTCOwners = [ - "bc1q6dtp7ayaj5k2zv0z5ayhkdsvmtvdqgyaa9zs53", - "3H8cmLndtkBs7kiHByhHAddTzy8taUwYPt", - "bc1pepsapf26n8y2f4uftlmhy60ksghx6rqlxdcj4uacfqrkcg6pmncs52rzuu", - "bc1qu4ru2sph5jatscx5xuf0ttka36yvuql7hl5h4c", - "1JA46eiDpfx589wawn5RvtEXgwc518QfhZ", - "bc1qaajdlp5yrj5f77wq2ndtfqnmsamvvxhpy95662zkzykn9qhvdgys580hcs", - "368vZZKUWDFZRLWMFNRJzHo1HnibNeAJir", - "33hE9Wq65kjbiLsGD1NYwwNatP6hbsZv5H", - "32GU8Jux7SbsEbaAaLUnEQmc6JemLF6BUb", - "3CP5WJ2JSLCew7SETWUe5FxpBGrekMBiwk", - "39Fvw2Ho1fEkyDsos5sNTN5iMJZKzTL526", - "3Kptt4TZZRcjuGH8ikoQ8mV1TVxq45dnuS", - "3G4sMXWAAVTvTXTksr8u9zuu7W8RKsicEz", - "335DRGzLLG2tu4H4PnFBHYAwcj5pvV8zei", - "bc1qqg3cdyadq25zn99sdprr4lgpsxg2za998eygy8", - "bc1qw4vp94e9egkaxc04qsu5z9aq5pqpku2p6pzer8", - "bc1q3q7afjarz7l6v49538qs2prffhtawf38ss85k8", - "bc1q3smt9ut40eld6tgn42sdlp9yrx98s90unqw3pl" -]; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Staking tokens via AINN Layer2 Dataset counts as TVL.", bitcoin: { tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners: BTCOwners }), + sumTokensExport({ owners: bitcoinAddressBook.ainn }), ]), }, zklink: { diff --git a/projects/allo/index.js b/projects/allo/index.js index 7e35687d2459..51a9d7ca8408 100644 --- a/projects/allo/index.js +++ b/projects/allo/index.js @@ -1,19 +1,11 @@ const { sumTokensExport } = require("../helper/sumTokens"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const owner = [ - "bc1pn87rjuhzl3sr9tffhgx3nrrq7rhyxg7y58dl0uk5kyhmkfj26ssqz76lfc", - "bc1pu64y7m8hdekc5h4xtdl8ru9g3ct5n6mghmaqs8qtqecznccvy38s8tvdv4", - "bc1pjgn7m39vu02el3xpk2rtgt5kww8g5tkhmc55zevjld4n6cc9tuyq6akrq0", - "bc1pn29hejmt2mrslsa0ttfknp268qrpsmc7wqmw4ddxqytctzjl50ws2yrpmt", - "bc1pkpddzz2px40f803qug3l28c7d99qvvjkccgzj7tc80xx29pkd2vq3lqrg3", - "bc1p23su0d2sxwg95c7ny0p5vn4vf83jmvhyzacw3srjv84hmvynkacqe52r9d", - "bc1pn6rqr5z8yu5z9qphs0ccmcnt2c8ye04e3f2590rdxsd2mga0harq9k4207" -]; module.exports = { methodology: `Total amount of BTC in restaked on babylon`, doublecounted:true, bitcoin: { - tvl: sumTokensExport({ owner }), + tvl: sumTokensExport({ owners: bitcoinAddressBook.allo }), }, }; diff --git a/projects/avalance-btc/index.js b/projects/avalance-btc/index.js index 9ccfdf9a1a76..ce1f9d49544b 100644 --- a/projects/avalance-btc/index.js +++ b/projects/avalance-btc/index.js @@ -1,16 +1,11 @@ -const sdk = require('@defillama/sdk'); const { sumTokensExport } = require('../helper/sumTokens'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') //https://support.avax.network/en/articles/6349640-how-does-the-avalanche-bridge-work -const owners = [ -'bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', // https://prnt.sc/unrBvLvw3z1t -] module.exports = { methodology: 'BTC wallets on bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', bitcoin: { - tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners }), - ]), + tvl: sumTokensExport({ owners: bitcoinAddressBook.avalanche }), }, }; diff --git a/projects/avalon-finance-cedefi/index.js b/projects/avalon-finance-cedefi/index.js index 3ed542d253e4..203e16270fb3 100644 --- a/projects/avalon-finance-cedefi/index.js +++ b/projects/avalon-finance-cedefi/index.js @@ -1,6 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const sdk = require('@defillama/sdk'); const { sumTokensExport } = require('../helper/sumTokens'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const abi = { "getPoolManagerReserveInformation": "function getPoolManagerReserveInformation() view returns (tuple(uint256 userAmount, uint256 collateral, uint256 debt, uint256 claimableUSDT, uint256 claimableBTC) poolManagerReserveInfor)" @@ -11,14 +12,7 @@ const config = { } // @dev btcOwnersOfCedefi: Bitcoin owners of the Avalon CeDefi pool contract. -const btcOwnersOfCedefi = [ -'32DgQPVHSV6FSxLnw68nggvchp3ZNKquxA', -'bc1qr5nz7n8ulcdz0w3s6fska80fawxhvqlh273qypm3rkjequ9wpmhs65ppw7', -'bc1qhu98nf6ddz6ja73rn72encdr8ezsyhexwpdzap0vcs7lg2wpmrnq5ygfsl', -'bc1qg6asmzjr7nr5f5upg3xqyrdxl2tq8ef58hha7t0s82mzzx6zjxesyccp4h', -'bc1qxe3md4lehg8gmrlx3e8xqju5mytt266l4hcy8khl6tm5mahghmeqtxlgqq', -'bc1qy48h0kuv0r3e330wjfs6r74sk49pkzumnm907t5mhqjxml22r3ss2ucuxc', -] +const btcOwnersOfCedefi = bitcoinAddressBook.avalonCedefi // @dev getMetrics: call to get the collateral and debt of the Avalon CeDefi pool contract. const getMetrics = async (api, borrowed) => { diff --git a/projects/bedrock/index.js b/projects/bedrock/index.js index 358a8d71642c..d1327d026fba 100644 --- a/projects/bedrock/index.js +++ b/projects/bedrock/index.js @@ -1,13 +1,8 @@ -const { getConfig } = require('../helper/cache') const { sumTokens } = require('../helper/chain/bitcoin') -const sdk = require('@defillama/sdk') - -const API_URL = 'https://bedrock-datacenter.rockx.com/uniBTC/reserve/address' +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') async function tvl() { - const response = await getConfig('bedrock.btc_address', API_URL) - sdk.log(`API load completed: ${response.btc.length} addresses`) - return sumTokens({ owners: response.btc }) + return sumTokens({ owners: await bitcoinAddressBook.bedrock() }) } module.exports = { diff --git a/projects/bevm/index.js b/projects/bevm/index.js index 342a3d12fb37..d3fe0438889c 100644 --- a/projects/bevm/index.js +++ b/projects/bevm/index.js @@ -1,15 +1,10 @@ const { sumTokensExport } = require("../helper/sumTokens"); -const ADDRESSES = require("../helper/coreAssets.json"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "TVL counts tokens deposited in BEVM", //doublecounted: true, bitcoin: { - tvl: sumTokensExport({ - owners: [ - "bc1p43kqxnf7yxcz5gacmqu98cr2r5gndtauzrwpypdzmsgp7n3lssgs5wruvy", - "bc1p2s98z85m7dwc7agceh58j54le0nedmqwxvuuj4ex4mwpsv52pjxqkczev9", - ], - }), + tvl: sumTokensExport({ owners: bitcoinAddressBook.bevm }), }, }; diff --git a/projects/biconomy-cex/index.js b/projects/biconomy-cex/index.js index 4eb80765fbcb..fff4938b346d 100644 --- a/projects/biconomy-cex/index.js +++ b/projects/biconomy-cex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -7,9 +8,7 @@ const config = { ], }, bitcoin: { - owners: [ - 'bc1qx70fn2550vhjetc748wmg4lzv5gy7t56ns92v8' - ] + owners: bitcoinAddressBook.biconomy }, polygon: { owners: [ diff --git a/projects/bigone/index.js b/projects/bigone/index.js index 08ad8d687432..360b25c9ecd5 100644 --- a/projects/bigone/index.js +++ b/projects/bigone/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -9,10 +10,7 @@ const config = { ], }, bitcoin: { - owners: [ - 'bc1qu02z43yduyjx6saeea4l54qqulvz568qnzgaes', - '1L5D4Eq2RkEKuN717Gc817MH1Sxs5WwMQh' - ] + owners: bitcoinAddressBook.bigone }, solana: { owners: [ diff --git a/projects/binance-btc/index.js b/projects/binance-btc/index.js index d9f2e15961b6..3847560af6bc 100644 --- a/projects/binance-btc/index.js +++ b/projects/binance-btc/index.js @@ -1,15 +1,12 @@ const sdk = require('@defillama/sdk'); const { sumTokensExport } = require('../helper/sumTokens'); - -const owners = [ -'3LYJfcfHPXYJreMsASk2jkn69LWEYKzexb' -] +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "BTC on btc chain", bitcoin: { tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners }), + sumTokensExport({ owners: bitcoinAddressBook.binance2 }), ]), }, }; \ No newline at end of file diff --git a/projects/bing-cex/index.js b/projects/bing-cex/index.js index 103fb69b2ef0..91bec7b4f811 100644 --- a/projects/bing-cex/index.js +++ b/projects/bing-cex/index.js @@ -1,11 +1,10 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + const config = { bitcoin: { - owners: [ - 'bc1qr8e6kmev99jxnk7hpyhex434t59ke5tpvmnyd3', - 'bc1qzzn5tszxn3ha87xfke540k8pr4favsk9cusakq' - ] + owners: bitcoinAddressBook.bingCex }, arbitrum: { owners: [ diff --git a/projects/bitfinex/index.js b/projects/bitfinex/index.js index ae30d0f51c0b..0b0caf02f2e9 100644 --- a/projects/bitfinex/index.js +++ b/projects/bitfinex/index.js @@ -1,12 +1,9 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bitcoin: { - owners: [ - '1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g', //BTC hot wallet - '3JZq4atUahhuA9rLhXLMhhTo133J9rF97j', //BTC cold wallet - 'bc1qgdjqv0av3q56jvd82tkdjpy7gdp9ut8tlqmgrpmv24sq90ecnvqqjwvw97', // BTC cold wallet - ], + owners: bitcoinAddressBook.bitfinex, }, ethereum: { owners: [ diff --git a/projects/bitget/index.js b/projects/bitget/index.js index e328c28be64b..8cc714db9efa 100644 --- a/projects/bitget/index.js +++ b/projects/bitget/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bsc: { @@ -64,20 +65,7 @@ const config = { ] }, bitcoin: { - owners: [ - '1FWQiwK27EnGXb6BiBMRLJvunJQZZPMcGd', - '1GDn5X4R5vjdSvFPrq1MJubXFkMHVcFJZv', - '3GbdoiTnQrJYatcr2nhq7MYASSCWEKmN6L', - '3HcSp9sR23w6MxeRrLqqyDzLqThtSMaypQ', - '3MdofQ2ouxom9MzC9kKazGUShoL5R3cVLG', - '3Jxc4zsvEruEVAFpvwj818TfZXq5y2DLyF', //add on 12/01/2024 - '3KUwtHc5UhWQ76z6WrZRQHHVTZMuUWiZcU', // add on 27/05/2024 - '3H6JnFoz5jcoATKQ83BuQ3cUUCHswqfgtG', // add on 27/05/2024 - '3AZHcgLnJL5C5xKo33mspyHpQX7x4H5bBw', // add on 27/05/2024 - '3DSST4myyyRbiGzgCBE1RVHY7GRjDCh4n9', // add on 27/05/2024 - '3Nu84pbqfcfaFztQ74qc9ni2PH5HGM1bzS', // add on 27/05/2024 - '34hatYbZ27CLLoZWhuJHzBgoTCwXEv8GwT', // add on 27/05/2024 - ] + owners: bitcoinAddressBook.bitget }, arbitrum: { owners: [ diff --git a/projects/bitmake/index.js b/projects/bitmake/index.js index 2a4781423b91..eaa310102c2b 100644 --- a/projects/bitmake/index.js +++ b/projects/bitmake/index.js @@ -1,13 +1,6 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - // wallet provide by a bitmake team - owners: [ - "3F12ncAyx4VkfpvnS7ZxdpggFx4p9RKfVe", - ], - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.bitmake } } module.exports = cexExports(config) module.exports.methodology = 'We are only tracking one BTC wallet. We dont have information regarding other wallets' \ No newline at end of file diff --git a/projects/bitmark/index.js b/projects/bitmark/index.js index 83bd3e816ca5..c2bae74bae15 100644 --- a/projects/bitmark/index.js +++ b/projects/bitmark/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') // https://support.bitmart.com/hc/en-us/articles/18473693031451-Enhancing-Transparency-and-Trust-at-BitMart const owners = [ @@ -18,7 +19,7 @@ const config = { owners: ['CgANddXc7FKSsdLSdFv67X8faZqQaRTeLMXkAVANkZD4'] }, bitcoin: { - owners: ['37RJkdkzPXCMYSTq74berJYj9FmNn7wFP5'] + owners: bitcoinAddressBook.bitmark }, starknet: { owners: ['0x04de639e634c071c3ce8b1c69fac0500aab5ddb25a08fd0f757176243e4c0467'] diff --git a/projects/bitmex/index.js b/projects/bitmex/index.js index 01756dad6cd0..949a8ea55ead 100644 --- a/projects/bitmex/index.js +++ b/projects/bitmex/index.js @@ -1,15 +1,13 @@ const { cexExports } = require('../helper/cex') -const bitcoinOwners = require('./bitcoin.json') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { + bitcoin: { owners: bitcoinAddressBook.bitmex }, ethereum: { owners: [ '0xEEA81C4416d71CeF071224611359F6F99A4c4294', // Etherscan Label (seems cold) '0xfb8131c260749c7835a08ccbdb64728de432858e' // Etherscan Label (seems hot) ], - }, - bitcoin: { - owners: bitcoinOwners, } } diff --git a/projects/bitstable-finance/index.js b/projects/bitstable-finance/index.js index 45ccc16cfdb6..596f5d3d4299 100644 --- a/projects/bitstable-finance/index.js +++ b/projects/bitstable-finance/index.js @@ -2,6 +2,8 @@ const ADDRESS = require("../helper/coreAssets.json"); const { sumTokensExport } = require("../helper/sumTokens"); const sdk = require('@defillama/sdk') const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + const BB_STAKE_CONTRACT = '0x8816353DA8A4D45E81C509A54AdbA8E57908958f' const BB_STAKE_ABI = 'function totalStakedAmount() view returns (uint256)' @@ -23,17 +25,17 @@ module.exports = { bitcoin: { tvl: sdk.util.sumChainTvls([ // Native(BTC) - sumTokensExport({ owners: ["bc1p36wvtxursam9cq8zmc9ppvsqf9ulefm7grvlfc4tzc5j83rcggsqh6nxw5"] }), + sumTokensExport({ owner: bitcoinAddressBook.bitstable[0] }), // BRC20 sumBRC20TokensExport({ // Deposit Address - owners: ["bc1p0uw83vg0h32v7kypyvjn9nextku2h7axjdeefy2ewstevnqffaksjzhrdf"], + owner: bitcoinAddressBook.bitstable[1], blacklistedTokens: ["BSSB", "DAII"], }), ]), staking: sumBRC20TokensExport({ // Farm Address - owners: ["bc1pvngqf24g3hhr5s4ptv472prz576uye8qmagy880ydq5gzpd30pdqtua3rd"], + owner: bitcoinAddressBook.bitstable[2], blacklistedTokens: ["DAII"], }), }, diff --git a/projects/bitunix-cex/index.js b/projects/bitunix-cex/index.js index 672e9cc2109f..e44bc0f87fa5 100644 --- a/projects/bitunix-cex/index.js +++ b/projects/bitunix-cex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -7,11 +8,7 @@ const config = { ], }, bitcoin: { - owners: [ - "bc1qxh9ruwejxz7ztzxejafd74tyxg4sgfeqxun42f", - "bc1qhjfnumgcsqsx6grxa7mfl7rr5g3u8xl4gtt7tr", - "bc1qkvrddql6hh00apslzsxnysl75hhnm5fpqdah37" - ], + owners: bitcoinAddressBook.bitunixCex, }, tron: { owners: [ diff --git a/projects/bitvenus/index.js b/projects/bitvenus/index.js index b4c04f821547..43cc471a90c6 100644 --- a/projects/bitvenus/index.js +++ b/projects/bitvenus/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -15,14 +16,7 @@ const config = { ], }, bitcoin: { - owners: [ - // '3FdoFGYYcD1EU7ekrt2x2u2mFrjmxouMJG', - // '358pjjkYRG8exw2BKZnn7Q9s6SCb7wZEWN', - // '3C1ykoWkHBMZwmY8PUUMVxtJJSBkZBCtN8', - 'bc1qrm2a7u9xyeffvulm6e589qvesmt0v0rjxqfkhv', - 'bc1qvht34dma2uy23l9j862nnqr38a42kjr66e6lec' - - ] + owners: bitcoinAddressBook.bitvenus }, bsc: { owners: [ diff --git a/projects/blofin-cex/index.js b/projects/blofin-cex/index.js index 0a0580fc1b84..cea48485cf27 100644 --- a/projects/blofin-cex/index.js +++ b/projects/blofin-cex/index.js @@ -1,8 +1,9 @@ const { cexExports } = require("../helper/cex"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bitcoin: { - owners: ["1PM8huQVFSirUT7eAwNm3rBBYTsDRzCaf3", "1Jw4meLNYAaDcNxJwQdMTRVw74hGPcuV8W", "bc1q6377fdmkvkhgzpw8drgu76jxulsl5wmmgwtrxu"], + owners: bitcoinAddressBook.blofinCex, }, bsc: { owners: ["0x1cA5aa5b1dd8D948bB0971A5fB1762FE172E0040"], diff --git a/projects/boringdao/index.js b/projects/boringdao/index.js index 8a2556e1d455..4259bd6f1064 100644 --- a/projects/boringdao/index.js +++ b/projects/boringdao/index.js @@ -2,6 +2,8 @@ const { sumTokensExport } = require("../helper/sumTokens") const contracts = require("./contracts.json"); const sdk = require("@defillama/sdk"); const { staking } = require('../helper/staking') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + function chainTvl(chain) { const owners = Object.values(contracts[chain].contracts) @@ -14,7 +16,7 @@ function chainTvl(chain) { module.exports = { timetravel: false, bitcoin: { - tvl: sumTokensExport({ owner: '33ZibwpiZe4bM5pwpAdQNqqs2RthLkpJer'}) + tvl: sumTokensExport({ owners: bitcoinAddressBook.boringdao }) }, litecoin: { tvl: async (_, block) => { diff --git a/projects/bsquared/index.js b/projects/bsquared/index.js index df8c3fc94d87..8ce3f7c70f05 100644 --- a/projects/bsquared/index.js +++ b/projects/bsquared/index.js @@ -2,31 +2,7 @@ const sdk = require('@defillama/sdk'); const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); const { sumTokensExport } = require('../helper/sumTokens'); const ADDRESSES = require('../helper/coreAssets.json') - -const BTCOwners = [ - // pre deposited wallets //Bitcoin Multisig Addresses - "bc1q4fsk5pgnmnu7ngp79xclsw2t0yk46sjqw22ffz", - "bc1qva5m5e7da2zm590z03tdnj42u9q2uye3hgrehwrzgg8j4kxq9seq9rvw0m", //Bitcoin Multisig Addresses - "bc1qjv2lfrv672rqagycs5zdsggmury0cz2vufek46jj86ddqynyp2qsxm3qfs", //Bitcoin Multisig Addresses - //Bitcoin Custodian Addresses - "131fpYjELat58RVzPp2A9Bo8oNuKiP4vxg", - "bc1qr4cpjazz6hhjh44yrshqw4xs4e3eld60wnsq2m", - "14UwPgMLZY6rLZRDxxvmNWQ9rMkg2iraHG", - "bc1quetqhxs809mwgms0rhae4cw98chzqe0er8fryr", - "34ThPcBtz5ayRybbg1MXnQWBGtUzqUDCMa", - "bc1q082azm83lgpln7puvn4egc9dumlaqfqkqmsght", - "bc1qxxgxywxcq0q405849fyrlxa2zu4nxukf4ytg57", - "3LcCJLivWmaomMyhnyt4pqg8iWi2ECU92T", - "bc1qe4xx7eg5c4qjq8838zv05f7uzfmyyyftdpy48t", - "3GPVsXtvbfFNRYbLwJowaL7EXo8hqakfkv", - "bc1q8axfvwqa0fqds5w6vva9g5kej9e4mp4ap3dmff", - "bc1q6crqwsg59s2j4v5gvd94775pjj8l0fmflmv9jd", - "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2" -]; - -const BRC20Owners = [ - "bc1q97ctqygjgj0ljxgge4q735ujxvlad8smass7f0axc6x3ggffr8xqwn69hc", //Bitcoin Multisig Addresses -]; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const ADDRESSES_ETHEREUM_STONE = '0x7122985656e38BDC0302Db86685bb972b145bD3C'; @@ -37,8 +13,8 @@ module.exports = { methodology: "Staking tokens via BSquared Network Buzz counts as TVL", bitcoin: { tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners: BTCOwners }), - sumBRC20TokensExport({ owners: BRC20Owners }), + sumTokensExport({ owners: bitcoinAddressBook.bsquaredBTC }), + sumBRC20TokensExport({ owners: bitcoinAddressBook.bsquaredBRC20 }), ]), }, ethereum: { diff --git a/projects/btse/index.js b/projects/btse/index.js index 08ded778d944..1b1c1a970176 100644 --- a/projects/btse/index.js +++ b/projects/btse/index.js @@ -1,9 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - owners: ['bc1qaxyju6n2x2tednv8e7hgnhnz44vrfcmuhjxpfk'] - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.btse } } module.exports = cexExports(config) diff --git a/projects/bybit/index.js b/projects/bybit/index.js index 07f7f2910376..eb982dcb464a 100644 --- a/projects/bybit/index.js +++ b/projects/bybit/index.js @@ -1,4 +1,5 @@ const { cexExports } = require("../helper/cex"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -15,16 +16,7 @@ const config = { ], }, bitcoin: { - owners: [ - "bc1q2qqqt87kh33s0er58akh7v9cwjgd83z5smh9rp", - "bc1q9w4g79ndel72lygvwtqzem67z6uqv4yncvqjz3yn8my9swnwflxsutg4cx", - "bc1qjysjfd9t9aspttpjqzv68k0ydpe7pvyd5vlyn37868473lell5tqkz456m", - "1GrwDkr33gT6LuumniYjKEGjTLhsL5kmqC", - "bc1qs5vdqkusz4v7qac8ynx0vt9jrekwuupx2fl5udp9jql3sr03z3gsr2mf0f", - // added on the 15th of july 2024. - "bc1qa2eu6p5rl9255e3xz7fcgm6snn4wl5kdfh7zpt05qp5fad9dmsys0qjg0e", - "16jVbMCcqq1deKrMB3esL2HPso7kvqUsec" - ], + owners: bitcoinAddressBook.bybit, }, bsc: { owners: [ diff --git a/projects/cake-defi/index.js b/projects/cake-defi/index.js index 8d2bcba9ddc2..f6e1b0420ced 100644 --- a/projects/cake-defi/index.js +++ b/projects/cake-defi/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -18,7 +19,7 @@ const config = { ] }, bitcoin: { - owners: ['3GcSHxkKY8ADMWRam51T1WYxYSb2vH62VL'] + owners: bitcoinAddressBook.cakeDefi }, litecoin: { owners: ['MLYQxJfnUfVqRwfYXjDJfmLbyA77hqzSXE'] diff --git a/projects/coindcx/index.js b/projects/coindcx/index.js index c690caf2634b..84a9a41485ef 100644 --- a/projects/coindcx/index.js +++ b/projects/coindcx/index.js @@ -1,5 +1,6 @@ const ADDRESSES = require('../helper/coreAssets.json') const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -55,32 +56,7 @@ const config = { ] }, bitcoin: { - owners: [ - '12hGEyxk4zMLquxiMiFrkvYSohsXz2D3uZ', - 'bc1qz22hegkllltcydg3pz3an6h352mjmyp7n2vhd9', - '1MzSJodjNmACPKyj9VUv9X55Pby87osLhc', - 'bc1qucl4n347qc6e48w85xdxcv86sm3an8fr250hhm', - '1F6CrpEnHEZh6gQtJ7cf1MtK7Y8GYKoP4i', - 'bc1qn2xm6agnanuyuwfcfw92el7nvt2lpsqr5s5c0w', - '17mxRZ9WeXigSwg3Cm62HxeATnuUphMxGL', - 'bc1qffg4ya27430vv5ymg2lhf4mj7tvtc3ur5qyyq3', - '1JV3umtGC6H6tFUVoFyV5KwbJDscUwrtX7', - 'bc1qhlyrdhfqry06nj902p9dxdftm4pxkhdqeum8y8', - '1KXxS6QnzpB8mSLm5kmXJXqvZF7wVvQDCw', - 'bc1qedxsgzuj8ga644gwlqw4nw7f3xncq4g2rskmzu', - '12T8i8tpeczk5JGf8ppZf1w6SFBRwEa9y4', - 'bc1qpl5kqjkugyncr72a4fhxvm0360ehfdl27e00ja', - '1PRwacjHVksLNTkSYNkiWkRgTm1yDSgLMG', - 'bc1q7c9ylgjsyc0yaxwm84jjh6avfajzfe7dhk6e0e', - '1477uXZ1NfUaaZZdnztQ7h8ftGRpuWQPfA', - 'bc1qygg2x02cfy0e6r7798v4qrcjjkzm8tl5t0xkwf', - 'bc1qljm7vwdgdy6ca97stsyjyl3zdjtkdsdm8vnh8f', - 'bc1qqhwh3tcg5duwq7hdlnlr5n2tg2uq755cwmkjqn', - 'bc1qqe4g7sjxzk90nsgj0mwufwcdtd7kufg7k32xch', - '1avi3SkWKGLis8dGCP9JUnFfVeheP8wkt', - 'bc1qmulc2ju4kykj24xuw0fu73h9h3usa897xhaucz', // - '3Dm2TL1pt1VzeBCq9jgvQG81QPv19PyReh' - ] + owners: bitcoinAddressBook.coindcx }, tron: { owners: [ diff --git a/projects/coinex/index.js b/projects/coinex/index.js index 5add34adb3c4..cf53e8ec9299 100644 --- a/projects/coinex/index.js +++ b/projects/coinex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -15,25 +16,7 @@ const config = { ], }, bitcoin: { - owners: [ - '189myj1KAbiCWfqWhT6Td4noANKBuag3QN', - '1C2Pxf3ghtKyM4mKC3xSLKrN33YcKnKF2a', - '1JZw5HYSoAEfvGGVQ4U2JihZaQkjcXrr2i', - '16M3n9p6CLATDnpsJNTjCn22AaxzErxg5V', - '15cYMF4jcRwpcbjENMdMizCzAmd7Pc51So', - '18JQXgQ4GjZAuYCy1fNAFGHVEAWUui2q9h', - '1LGbUy11yMaNC9s73q7vEad8JTZyczCima', - '1DGXwH2gzBYM6UrVE57DaaQ3hJJm3s32YK', - '152GodsXfK5kYMdH4spzYD3Ttm1u2oNipN', - '18oxoXCq5mah3GjLjGCS3BRTQxxN7738rL', - '1H21g458T25SnAzvFDJiBrcyhfwHiCH5YF', - '14BhR6aE8Fkt2c8E1m2ydx76fBz5kpt62K', - '1Ef59jZsv87uAcwBZdDhNxiSbCceQ6bFTA', - '14ukjw4r3UFC5A8yvG7yt2GdvLUHEWtskS', - '141TDnaiLEW1vE5xd42Dw8HEhDCA2qrZTr', - '1Ew9SPwBHY8GjHd3uBxhtGcvVmyBN7PHcw', - '1LYrQCjUf54vf9G4qwFpJQ9RCyL2DprPqQ', - ] + owners: bitcoinAddressBook.coinex }, tron: { owners: [ diff --git a/projects/coinsquare/index.js b/projects/coinsquare/index.js index e38efba56dfd..88fcfa8e05d9 100644 --- a/projects/coinsquare/index.js +++ b/projects/coinsquare/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -29,18 +30,7 @@ const config = { ], }, bitcoin: { - owners: [ - '1P7cDFGeWm6ezez6XGXTAjvm8qcsGiMXe7', - 'bc1q0k5rpdwf7wnq3fuk7dfjqd59p3ke7ufqmlkfp4', - 'bc1qdstretw2uvhjen7hvgaya3nsjgr430x9jhqf4a', - 'bc1qez6ezccleuac4dnj5cpexz5mz3j0j3j655j6qn', - 'bc1qg6a9kpmge0fdwtrymjvq3cydfzgpcge7e05e7z', - 'bc1qg8fywv20ztsp0edtf53zpsnxeu5cqxrmdwmtjd', - 'bc1qm5mqpgtt2ufucfdvhu5xcdgs3vzehwu62wsyqy', - 'bc1qmkkejzrq7ayfjpy7w8gmkhd3uwcy7nryr5apch', - 'bc1qsjc50kf72r4q44ac28v3vrukaxjg4w30rh0cmm', - 'bc1qyz9mssutu8xxcgjvsucz38qvxt7hxwtnm5eh8k', - ] + owners: bitcoinAddressBook.coinsquare }, avax: { owners: ['0x14AA1AD09664c33679aE5689d93085B8F7c84bd3'] diff --git a/projects/coinw/index.js b/projects/coinw/index.js index 56de3cda3482..408e75fdde6e 100644 --- a/projects/coinw/index.js +++ b/projects/coinw/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -13,10 +14,7 @@ const config = { ], }, bitcoin: { - owners: [ - '14Z9KSmCo1UjvBiXj2j9er35GmGmaFxsmE', - '1KYBKqRjGbRynSiyoiHndULssXrEeWhvU8', - ] + owners: bitcoinAddressBook.coinw }, tron: { owners: [ diff --git a/projects/crypto-com/index.js b/projects/crypto-com/index.js index 0df01714333f..377bcf63c449 100644 --- a/projects/crypto-com/index.js +++ b/projects/crypto-com/index.js @@ -1,17 +1,9 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bitcoin: { - owners: [ - 'bc1qpy4jwethqenp4r7hqls660wy8287vw0my32lmy', - '3LhhDLBVWBZChNQv8Dn4nDKFnCyojG1FqN', - '3QsGsAXQ4rqRNvh5pEW55hf3F9PEyb7rVq', - 'bc1qr4dl5wa7kl8yu792dceg9z5knl2gkn220lk7a9', - 'bc1q4c8n5t00jmj8temxdgcc3t32nkg2wjwz24lywv', - '14m3sd9HCCFJW4LymahJCKMabAxTK4DAqW', - 'bc1qjqy709gqpse60hdsm2d2v0dzzu7yp5dej7fdrpl2x3taccvujq4s0vzsyd', - 'bc1qcdqj2smprre85c78d942wx5tauw5n7uw92r7wr' - ], + owners: bitcoinAddressBook.cryptoCom, }, ethereum: { owners: [ diff --git a/projects/deribit/index.js b/projects/deribit/index.js index ba368589db61..1a8d8eb5178e 100644 --- a/projects/deribit/index.js +++ b/projects/deribit/index.js @@ -1,24 +1,8 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { - bitcoin: { - // from https://insights.deribit.com/exchange-updates/proof-of-reserves-deribit/ - owners: [ - "bc1qa3phj5uhnuauk6r62cku6r6fl9rawqx4n6d690", - "bc1qtq5zfllw9fs9w6stnfgalf9v59fgrcxxyawuvm", - "1MDq7zyLw6oKichbFiDDZ3aaK59byc6CT8", - "1932eKraQ3Ad9MeNBHb14WFQbNrLaKeEpT", - "13JJ1nxDeX5fMsDeyGHiLoK8rF2ayGq1cX", - "1MdrdcEzfiJdvs6eVSwUx6bWboPX8if5U3", - "35WHp4Hid61peyH4tuhNunwRj2gtNB41Lo", - "34ZHV8dd6uucEUABUydWpKi6F4qKQntEUf", - //added on the 26/06/2024 - "bc1qzwhw94uldd3c8736lsxrda6t6x56030f8zk8nr", - "bc1qrmuxak470z7zch5f3gz05dc6h4ngwqdq4wx80w", - "bc1qf6lm99tp5p27hsmyskve236nsv32lnfwt4h8wk", - "14HeA1YRUiJGb95HVpVTBuavMUBYGk6y7R", - ], - }, + bitcoin: { owners: bitcoinAddressBook.deribit }, ethereum:{ owners: [ "0x77021d475E36b3ab1921a0e3A8380f069d3263de", diff --git a/projects/entities/el-salvador.js b/projects/entities/el-salvador.js index 37e69daa82f8..1bdb7b30d4e8 100644 --- a/projects/entities/el-salvador.js +++ b/projects/entities/el-salvador.js @@ -1,5 +1,6 @@ const { sumTokensExport } = require('../helper/sumTokens') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { - bitcoin: { tvl: sumTokensExport({owner: '32ixEdVJWo3kmvJGMTZq5jAQVZZeuwnqzo'}) } + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.elSalvador }) } } \ No newline at end of file diff --git a/projects/entities/fbi-dprk.js b/projects/entities/fbi-dprk.js index cab5e9377320..93f0017ec889 100644 --- a/projects/entities/fbi-dprk.js +++ b/projects/entities/fbi-dprk.js @@ -1,16 +1,5 @@ const { treasuryExports } = require("../helper/treasury") +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - owners: [ //source https://www.fbi.gov/news/press-releases/fbi-identifies-cryptocurrency-funds-stolen-by-dprk - "3LU8wRu4ZnXP4UM8Yo6kkTiGHM9BubgyiG", - "39idqitN9tYNmq3wYanwg3MitFB5TZCjWu", - "3AAUBbKJorvNhEUFhKnep9YTwmZECxE4Nk", - "3PjNaSeP8GzLjGeu51JR19Q2Lu8W2Te9oc", - "3NbdrezMzAVVfXv5MTQJn4hWqKhYCTCJoB", - "34VXKa5upLWVYMXmgid6bFM4BaQXHxSUoL" - ], - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.fbiDprk } } module.exports = treasuryExports(config) \ No newline at end of file diff --git a/projects/entities/mt-gox.js b/projects/entities/mt-gox.js index df5b55172cd3..9d4a8a99373a 100644 --- a/projects/entities/mt-gox.js +++ b/projects/entities/mt-gox.js @@ -1,14 +1,5 @@ const { treasuryExports } = require("../helper/treasury") +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - owners: [ - "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", //https://www.reddit.com/r/CryptoCurrency/comments/li1fw7/btc_silkroad_stash_seized_nov_2020_by_the_feds/ - 'bc1qmxjefnuy06v345v6vhwpwt05dztztmx4g3y7wp', - 'bc1qf2yvj48mzkj7uf8lc2a9sa7w983qe256l5c8fs', - 'bc1qe7nk2nlnjewghgw4sgm0r89zkjzsurda7z4rdg' - ], - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.mtGoxEntities } } module.exports = treasuryExports(config) \ No newline at end of file diff --git a/projects/entities/silkroad-fbifunds.js b/projects/entities/silkroad-fbifunds.js index df5b55172cd3..0c9c2e09c867 100644 --- a/projects/entities/silkroad-fbifunds.js +++ b/projects/entities/silkroad-fbifunds.js @@ -1,14 +1,5 @@ const { treasuryExports } = require("../helper/treasury") +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - owners: [ - "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", //https://www.reddit.com/r/CryptoCurrency/comments/li1fw7/btc_silkroad_stash_seized_nov_2020_by_the_feds/ - 'bc1qmxjefnuy06v345v6vhwpwt05dztztmx4g3y7wp', - 'bc1qf2yvj48mzkj7uf8lc2a9sa7w983qe256l5c8fs', - 'bc1qe7nk2nlnjewghgw4sgm0r89zkjzsurda7z4rdg' - ], - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.silkroadFBIEntities } } module.exports = treasuryExports(config) \ No newline at end of file diff --git a/projects/exsat-credit-staking/index.js b/projects/exsat-credit-staking/index.js index c9280c46e89f..1c7cd332c757 100644 --- a/projects/exsat-credit-staking/index.js +++ b/projects/exsat-credit-staking/index.js @@ -1,24 +1,12 @@ -const axios = require('axios'); const { sumTokens } = require("../helper/chain/bitcoin"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -async function tvl(api) { - const { data: response } = await axios.post('https://rpc-us.exsat.network/v1/chain/get_table_rows', { - json: true, - code: "custody.xsat", - scope: "custody.xsat", - table: "custodies", - limit: "100", - show_payer: true - }); - - const owners = response.rows.map(row => row.data.btc_address); - return sumTokens({ owners }); -} +async function tvl() { + return sumTokens({ owners: await bitcoinAddressBook.exsatCreditStaking() }) + } module.exports = { methodology: 'TVL is based on Bitcoin addresses in the exSat credit staking contract, summing their associated Bitcoin balances.', start: 1729684800, - bitcoin: { - tvl, - }, + bitcoin: { tvl }, }; diff --git a/projects/exsat/index.js b/projects/exsat/index.js index 200768838d4c..0edca69310df 100644 --- a/projects/exsat/index.js +++ b/projects/exsat/index.js @@ -1,46 +1,11 @@ -const axios = require('axios'); const { sumTokens } = require("../helper/chain/bitcoin"); -const { getConfig } = require('../helper/cache'); +const bitcoinBook = require('../helper/bitcoin-book'); async function tvl(api) { - const config = await getConfig('exsat', 'https://raw.githubusercontent.com/exsat-network/exsat-defillama/refs/heads/main/bridge-bitcoin.json'); - const custody_addresses = config['custody_addresses']; - const custody_ids = config['custody_ids']; - const owners = [...custody_addresses]; - - for (let custody_id of custody_ids) { - let lower_bound = null; - let hasMore = true; - - while (hasMore) { - const { data: response } = await axios.post('https://rpc-us.exsat.network/v1/chain/get_table_rows', { - "json": true, - "code": "brdgmng.xsat", - "scope": custody_id, - "table": "addrmappings", - "lower_bound": lower_bound, - "upper_bound": null, - "index_position": 1, - "key_type": "", - "limit": "100", - "reverse": false, - "show_payer": true - }); - - const addrs = response.rows.map(row => row.data.btc_address); - owners.push(...addrs); - - hasMore = response.more; - lower_bound = response.next_key; - } - } - - return sumTokens({ owners }); + return sumTokens({ owners: await bitcoinBook.exsatBridge() }); } module.exports = { methodology: 'TVL for the exSat Bridge represents the total balance in custody BTC addresses, reflecting BTC assets bridged to the exSat network.', - bitcoin: { - tvl, - }, + bitcoin: { tvl }, }; diff --git a/projects/fastex/index.js b/projects/fastex/index.js index f86b57f05276..34c9d1bfb257 100644 --- a/projects/fastex/index.js +++ b/projects/fastex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -8,9 +9,7 @@ const config = { ], }, bitcoin: { - owners: [ - 'bc1qs7yen7ljpvyw7vn58ql6zfaddqf4rcjalsgmt5' - ] + owners: bitcoinAddressBook.fastex }, tron: { owners: [ diff --git a/projects/fbtc/index.js b/projects/fbtc/index.js index df7d51d347c1..2a2bb3173ea0 100644 --- a/projects/fbtc/index.js +++ b/projects/fbtc/index.js @@ -1,34 +1,11 @@ -const { getConfig } = require('../helper/cache') const { sumTokens } = require('../helper/chain/bitcoin') -const sdk = require('@defillama/sdk') -const { get } = require('../helper/http') -const { getEnv } = require('../helper/env') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const abi = { - getQualifiedUserInfo: 'function getQualifiedUserInfo(address _user) view returns ((bool locked, string depositAddress, string withdrawalAddress) info)', -} async function tvl() { - const staticAddresses = await getConfig('fbtc', undefined, { - fetcher: async () => { - const token = getEnv('FBTC_ACCESS_TOKEN') - const { result } = await get('https://fbtc.phalcon.blocksec.com/api/v1/extension/fbtc-reserved-addr', { - headers: { - 'access-token': token - } - }) - return result.map(r => r.address) - } - }) - const api = new sdk.ChainApi({ chain: 'ethereum' }) - const users = await api.call({ abi: 'address[]:getQualifiedUsers', target: '0xbee335BB44e75C4794a0b9B54E8027b111395943' }) - const userInfos = await api.multiCall({ abi: abi.getQualifiedUserInfo, target: '0xbee335BB44e75C4794a0b9B54E8027b111395943', calls: users }) - userInfos.forEach(i => staticAddresses.push(i.depositAddress)) - return sumTokens({ owners: staticAddresses }) + return sumTokens({ owners: await bitcoinAddressBook.fbtc() }) } module.exports = { timetravel: false, - bitcoin: { - tvl, - } + bitcoin: { tvl } } diff --git a/projects/fire/index.js b/projects/fire/index.js index 9c32a5a1f6ce..9021e42e275f 100644 --- a/projects/fire/index.js +++ b/projects/fire/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -8,12 +9,7 @@ const config = { ], }, bitcoin: { - owners: [ - 'bc1q36c0rp4ydl6uvvguhw9nr7njm49addzkgftqev', - 'bc1q3z0khuld6nd7esv46nxj9ketteqw9qz86peyeh', - 'bc1q4hz59t7v0uxujuyrhp9679uppur7ke9u3vshvd', - 'bc1qdlrh7ycyqxe62vk5m70y353vmep9ullxx5j9ar', - ] + owners: bitcoinAddressBook.fire }, ripple: { owners: [ diff --git a/projects/flipster/index.js b/projects/flipster/index.js index e980af38f1d5..3c9e1e14cb8a 100644 --- a/projects/flipster/index.js +++ b/projects/flipster/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -12,9 +13,7 @@ const config = { ] }, bitcoin: { - owners: [ - '31iAUikiV7yKEYBzbA1iHPcanHNsLBFe8C' - ] + owners: bitcoinAddressBook.flipster }, arbitrum: { owners: [ diff --git a/projects/garden/index.js b/projects/garden/index.js index a5244db1cc39..bb24cd53f2c0 100644 --- a/projects/garden/index.js +++ b/projects/garden/index.js @@ -1,17 +1,16 @@ const ADDRESSES = require("../helper/coreAssets.json"); const { sumTokensExport } = require("../helper/sumTokens"); const sdk = require("@defillama/sdk"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const SEED_TOKEN_ADDRESS = "0x86f65121804D2Cdbef79F9f072D4e0c2eEbABC08"; // SEED TOKEN (Garden's Governance Token) Address const STAKING_CONTRACT_ADDRESS = "0xe2239938Ce088148b3Ab398b2b77Eedfcd9d1AfC"; - -const BTC_LIQUIDITY_ADDRESS = "bc1qhww67feqfdf6xasjat88x5stqa6vzx0c6fgtnj"; const WBTC_LIQUIDITY_ADDRESS = "0x9DD9C2D208B07Bf9A4eF9CA311F36d7185749635"; module.exports = { bitcoin: { tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners: [BTC_LIQUIDITY_ADDRESS] }), + sumTokensExport({ owners: bitcoinAddressBook.garden }), ]), }, ethereum: { diff --git a/projects/gate-io/index.js b/projects/gate-io/index.js index b988eb12b9e9..b91e6d5440eb 100644 --- a/projects/gate-io/index.js +++ b/projects/gate-io/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -72,14 +73,7 @@ const config = { ] }, bitcoin: { - owners: [ - '14kmvhQrWrNEHbrSKBySj4qHGjemDtS3SF', - '162bzZT2hJfv5Gm3ZmWfWfHJjCtMD6rHhw', - '1EkkGXR7dTbZbrKFKoe6YEP4gj4GzMeKvw', - '1G47mSr3oANXMafVrR8UC4pzV7FEAzo3r9', - '1HpED69tpKSaEaWpY3Udt1DtcVcuCUoh2Y', - '3HroDXv8hmzKRtaSfBffRgedKpru8fgy6M', - ] + owners: bitcoinAddressBook.gateIo }, tron: { owners: [ diff --git a/projects/hashkey-exchange/index.js b/projects/hashkey-exchange/index.js index 2786278e13d7..3057fb06a9e8 100644 --- a/projects/hashkey-exchange/index.js +++ b/projects/hashkey-exchange/index.js @@ -1,4 +1,5 @@ const { cexExports } = require("../helper/cex"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { avax: { @@ -8,12 +9,7 @@ const config = { ], }, bitcoin: { - owners: [ - "bc1qqe394jlqq86muq23d4vrnhzzvcv8jnepgt8lx7", - "1NfJSiqBw4fb74KgVQrPsk5W5aqitAD1Xv", - // "bc1qlrawqecuwgpzzwh04pkhtfsqsk33kald22ds3c", // bosera funds https://www.bosera.com/english/index.html - "18oxobhCNKnHjb7nEFDmPdXbCZthFWezrm", - ], + owners: bitcoinAddressBook.hashkeyExchange }, ethereum: { owners: [ diff --git a/projects/hashkey/index.js b/projects/hashkey/index.js index 5694e7c5e023..e47181151c5d 100644 --- a/projects/hashkey/index.js +++ b/projects/hashkey/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -8,10 +9,7 @@ const config = { ], }, bitcoin: { - owners: [ - "bc1qyvppkaa74d9jvtz664a6uxmj09hf0eyg3uhx4h", - "1DywJMqHHMWuP7xyfkRqJZCEe7GdEKFRcp" - ], + owners: bitcoinAddressBook.hashkey, }, litecoin: { owners: [ diff --git a/projects/helper/bitcoin-book/21Co.js b/projects/helper/bitcoin-book/21Co.js new file mode 100644 index 000000000000..f5c4e25efb80 --- /dev/null +++ b/projects/helper/bitcoin-book/21Co.js @@ -0,0 +1,4 @@ +module.exports = [ + '1HTGi4tfXSEtcXD4pk6S3vBs3s64hWY1pW', + '12WZhMFFLHQ4rCMSkeBfbJXRk7aGWyBh1M' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/ainn-layer2.js b/projects/helper/bitcoin-book/ainn-layer2.js new file mode 100644 index 000000000000..adcec5f7ec06 --- /dev/null +++ b/projects/helper/bitcoin-book/ainn-layer2.js @@ -0,0 +1,20 @@ +module.exports = [ + "bc1q6dtp7ayaj5k2zv0z5ayhkdsvmtvdqgyaa9zs53", + "3H8cmLndtkBs7kiHByhHAddTzy8taUwYPt", + "bc1pepsapf26n8y2f4uftlmhy60ksghx6rqlxdcj4uacfqrkcg6pmncs52rzuu", + "bc1qu4ru2sph5jatscx5xuf0ttka36yvuql7hl5h4c", + "1JA46eiDpfx589wawn5RvtEXgwc518QfhZ", + "bc1qaajdlp5yrj5f77wq2ndtfqnmsamvvxhpy95662zkzykn9qhvdgys580hcs", + "368vZZKUWDFZRLWMFNRJzHo1HnibNeAJir", + "33hE9Wq65kjbiLsGD1NYwwNatP6hbsZv5H", + "32GU8Jux7SbsEbaAaLUnEQmc6JemLF6BUb", + "3CP5WJ2JSLCew7SETWUe5FxpBGrekMBiwk", + "39Fvw2Ho1fEkyDsos5sNTN5iMJZKzTL526", + "3Kptt4TZZRcjuGH8ikoQ8mV1TVxq45dnuS", + "3G4sMXWAAVTvTXTksr8u9zuu7W8RKsicEz", + "335DRGzLLG2tu4H4PnFBHYAwcj5pvV8zei", + "bc1qqg3cdyadq25zn99sdprr4lgpsxg2za998eygy8", + "bc1qw4vp94e9egkaxc04qsu5z9aq5pqpku2p6pzer8", + "bc1q3q7afjarz7l6v49538qs2prffhtawf38ss85k8", + "bc1q3smt9ut40eld6tgn42sdlp9yrx98s90unqw3pl" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/allo.js b/projects/helper/bitcoin-book/allo.js new file mode 100644 index 000000000000..b8d3311f0b93 --- /dev/null +++ b/projects/helper/bitcoin-book/allo.js @@ -0,0 +1,9 @@ +module.exports = [ + "bc1pn87rjuhzl3sr9tffhgx3nrrq7rhyxg7y58dl0uk5kyhmkfj26ssqz76lfc", + "bc1pu64y7m8hdekc5h4xtdl8ru9g3ct5n6mghmaqs8qtqecznccvy38s8tvdv4", + "bc1pjgn7m39vu02el3xpk2rtgt5kww8g5tkhmc55zevjld4n6cc9tuyq6akrq0", + "bc1pn29hejmt2mrslsa0ttfknp268qrpsmc7wqmw4ddxqytctzjl50ws2yrpmt", + "bc1pkpddzz2px40f803qug3l28c7d99qvvjkccgzj7tc80xx29pkd2vq3lqrg3", + "bc1p23su0d2sxwg95c7ny0p5vn4vf83jmvhyzacw3srjv84hmvynkacqe52r9d", + "bc1pn6rqr5z8yu5z9qphs0ccmcnt2c8ye04e3f2590rdxsd2mga0harq9k4207" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/avalanche-btc.js b/projects/helper/bitcoin-book/avalanche-btc.js new file mode 100644 index 000000000000..ac1edf073ea0 --- /dev/null +++ b/projects/helper/bitcoin-book/avalanche-btc.js @@ -0,0 +1,3 @@ +module.exports = [ + 'bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', // https://prnt.sc/unrBvLvw3z1t +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/avalon-cedefi.js b/projects/helper/bitcoin-book/avalon-cedefi.js new file mode 100644 index 000000000000..9451bd241a4d --- /dev/null +++ b/projects/helper/bitcoin-book/avalon-cedefi.js @@ -0,0 +1,8 @@ +module.exports = [ + '32DgQPVHSV6FSxLnw68nggvchp3ZNKquxA', + 'bc1qr5nz7n8ulcdz0w3s6fska80fawxhvqlh273qypm3rkjequ9wpmhs65ppw7', + 'bc1qhu98nf6ddz6ja73rn72encdr8ezsyhexwpdzap0vcs7lg2wpmrnq5ygfsl', + 'bc1qg6asmzjr7nr5f5upg3xqyrdxl2tq8ef58hha7t0s82mzzx6zjxesyccp4h', + 'bc1qxe3md4lehg8gmrlx3e8xqju5mytt266l4hcy8khl6tm5mahghmeqtxlgqq', + 'bc1qy48h0kuv0r3e330wjfs6r74sk49pkzumnm907t5mhqjxml22r3ss2ucuxc', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bevm.js b/projects/helper/bitcoin-book/bevm.js new file mode 100644 index 000000000000..35666effefa0 --- /dev/null +++ b/projects/helper/bitcoin-book/bevm.js @@ -0,0 +1,4 @@ +module.exports = [ + "bc1p43kqxnf7yxcz5gacmqu98cr2r5gndtauzrwpypdzmsgp7n3lssgs5wruvy", + "bc1p2s98z85m7dwc7agceh58j54le0nedmqwxvuuj4ex4mwpsv52pjxqkczev9", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/biconomy-cex.js b/projects/helper/bitcoin-book/biconomy-cex.js new file mode 100644 index 000000000000..ac3d3c548cf5 --- /dev/null +++ b/projects/helper/bitcoin-book/biconomy-cex.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qx70fn2550vhjetc748wmg4lzv5gy7t56ns92v8" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bigone.js b/projects/helper/bitcoin-book/bigone.js new file mode 100644 index 000000000000..1c05303a86ba --- /dev/null +++ b/projects/helper/bitcoin-book/bigone.js @@ -0,0 +1,4 @@ +module.exports = [ + 'bc1qu02z43yduyjx6saeea4l54qqulvz568qnzgaes', + '1L5D4Eq2RkEKuN717Gc817MH1Sxs5WwMQh' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/binance-btc.js b/projects/helper/bitcoin-book/binance-btc.js new file mode 100644 index 000000000000..ee46fb4aa6f2 --- /dev/null +++ b/projects/helper/bitcoin-book/binance-btc.js @@ -0,0 +1,3 @@ +module.exports = [ + '3LYJfcfHPXYJreMsASk2jkn69LWEYKzexb' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/binance.js b/projects/helper/bitcoin-book/binance.js new file mode 100644 index 000000000000..d5ea8de294b6 --- /dev/null +++ b/projects/helper/bitcoin-book/binance.js @@ -0,0 +1,40 @@ +module.exports = [ + '1PJiGp2yDLvUgqeBsuZVCBADArNsk6XEiw', + '1Pzaqw98PeRfyHypfqyEgg5yycJRsENrE7', + '32bhzEniykYRFADVaRM5PYswsjC23cxtes', + '34GUzCVLbdkMQ2UdVTaA4nxPwoovVS7y2J', + '34HpHYiyQwg69gFmCq2BGHjF1DZnZnBeBP', + '34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo', + '36zSLdRv1jyewjaC12fqK5fptn7PqewunL', + '38DN2uFMZPiHLHJigfv4kWC9JWJrNnhLcn', + '38Xnrq8MZiKmYmwobbYdZQ5nnCbX1qvQfE', + '395vnFScKQ1ay695C6v7gf89UzoFpx3WuJ', + '39884E3j6KZj82FK4vcCrkUvWYL5MQaS3v', + '3AQ8bAh88TQU7JV1H3ovXrwsuV6s3zYZuN', + '3AeUiDpPPUrUBS377584sFCpx8KLfpX9Ry', + '3CySuFKbBS29M7rE5iJakZRNqb3msMeFoN', + '3E97AjYaCq9QYnfFMtBCYiCEsN956Rvpj2', + '3FHNBLobJnbCTFTVakh5TXmEneyf5PT61B', + '3HdGoUTbcztBnS7UzY4vSPYhwr424CiWAA', + '3JFJPpH8Chwo7CDbyYQ4XcfgcjEP1FGRMJ', + '3JJmF63ifcamPLiAmLgG96RA599yNtY3EQ', + '3JqPhvKkAPcFB3oLELBT7z2tQdjpnxuDi9', + '3Jy7A2rThtU9xm4o8gR3a9pvQuxXnRNuNF', + '3LQUu4v9z6KNch71j7kbj8GPeAGUo1FW6a', + '3LcgLHzTvjLKBixBvkKGiadtiw2GBSKKqH', + '3LtrsjtyLsHoG8WQMe2RFw3de4pLTQZNcY', + '3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6', + '3Me9QACjioepv2L2oKTC9QQ87NH6vFe1Zj', + '3NPL82eaehTFh4r3StpHqVQBTnZJFaGsyy', + '3NXCvmLGz9SxYi6TnjbBQfQMcwiZ1iQETa', + '3NjHh71XgjikBoTNYdWgXiNeZcLaKNThgb', + '3Qxak1CZhLyZ7GVckKphLURdLBCjMfz9bA', + 'bc1qdtmav38lca8yu3rrcknnqx5242cckgxqws7m72', + 'bc1q32lyrhp9zpww22phqjwwmelta0c8a5q990ghs6', + 'bc1q78ufzeu8w8fwvxuphrdlg446xhyptf28fkatu5', + 'bc1q7t9fxfaakmtk8pj7tdxjvwsng6y9x76czuaf5h', + 'bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h', + // added on the 27/08/2024 + '3PXBET2GrTwCamkeDzKCx8DeGDyrbuGKoc', + '3QK5vQ9hucSg8ZC8Vizq83qEWeHFLAWMud', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bing-cex.js b/projects/helper/bitcoin-book/bing-cex.js new file mode 100644 index 000000000000..853a2aafcb7e --- /dev/null +++ b/projects/helper/bitcoin-book/bing-cex.js @@ -0,0 +1,4 @@ +module.exports = [ + 'bc1qr8e6kmev99jxnk7hpyhex434t59ke5tpvmnyd3', + 'bc1qzzn5tszxn3ha87xfke540k8pr4favsk9cusakq' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bitfinex.js b/projects/helper/bitcoin-book/bitfinex.js new file mode 100644 index 000000000000..34cc9d09cbe1 --- /dev/null +++ b/projects/helper/bitcoin-book/bitfinex.js @@ -0,0 +1,5 @@ +module.exports = [ + '1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g', // BTC hot wallet + '3JZq4atUahhuA9rLhXLMhhTo133J9rF97j', // BTC cold wallet + 'bc1qgdjqv0av3q56jvd82tkdjpy7gdp9ut8tlqmgrpmv24sq90ecnvqqjwvw97', // BTC cold wallet +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bitget.js b/projects/helper/bitcoin-book/bitget.js new file mode 100644 index 000000000000..0b7284235f63 --- /dev/null +++ b/projects/helper/bitcoin-book/bitget.js @@ -0,0 +1,14 @@ +module.exports = [ + '1FWQiwK27EnGXb6BiBMRLJvunJQZZPMcGd', + '1GDn5X4R5vjdSvFPrq1MJubXFkMHVcFJZv', + '3GbdoiTnQrJYatcr2nhq7MYASSCWEKmN6L', + '3HcSp9sR23w6MxeRrLqqyDzLqThtSMaypQ', + '3MdofQ2ouxom9MzC9kKazGUShoL5R3cVLG', + '3Jxc4zsvEruEVAFpvwj818TfZXq5y2DLyF', //add on 12/01/2024 + '3KUwtHc5UhWQ76z6WrZRQHHVTZMuUWiZcU', // add on 27/05/2024 + '3H6JnFoz5jcoATKQ83BuQ3cUUCHswqfgtG', // add on 27/05/2024 + '3AZHcgLnJL5C5xKo33mspyHpQX7x4H5bBw', // add on 27/05/2024 + '3DSST4myyyRbiGzgCBE1RVHY7GRjDCh4n9', // add on 27/05/2024 + '3Nu84pbqfcfaFztQ74qc9ni2PH5HGM1bzS', // add on 27/05/2024 + '34hatYbZ27CLLoZWhuJHzBgoTCwXEv8GwT', // add on 27/05/2024 +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bitmake.js b/projects/helper/bitcoin-book/bitmake.js new file mode 100644 index 000000000000..9e7ad5a81fd7 --- /dev/null +++ b/projects/helper/bitcoin-book/bitmake.js @@ -0,0 +1,4 @@ +module.exports = [ + // wallet provide by a bitmake team + "3F12ncAyx4VkfpvnS7ZxdpggFx4p9RKfVe" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bitmark.js b/projects/helper/bitcoin-book/bitmark.js new file mode 100644 index 000000000000..fe27815ffb68 --- /dev/null +++ b/projects/helper/bitcoin-book/bitmark.js @@ -0,0 +1,3 @@ +module.exports = [ + "37RJkdkzPXCMYSTq74berJYj9FmNn7wFP5" +] \ No newline at end of file diff --git a/projects/bitmex/bitcoin.json b/projects/helper/bitcoin-book/bitmex.js similarity index 99% rename from projects/bitmex/bitcoin.json rename to projects/helper/bitcoin-book/bitmex.js index 08beb0831958..373032a01e77 100644 --- a/projects/bitmex/bitcoin.json +++ b/projects/helper/bitcoin-book/bitmex.js @@ -1,4 +1,4 @@ -[ +module.exports = [ "3BMEXqGpG4FxBA1KWhRFufXfSTRgzfDBhJ", "3BMEXxSMT2b2kvsnC4Q35d2kKJZ4u9bSLh", "3BMEXfK7c3STqJjYmy2VQTGtzD3QAXNz3T", diff --git a/projects/helper/bitcoin-book/bitstable-finance.js b/projects/helper/bitcoin-book/bitstable-finance.js new file mode 100644 index 000000000000..4f62f4b7d6d7 --- /dev/null +++ b/projects/helper/bitcoin-book/bitstable-finance.js @@ -0,0 +1,5 @@ +module.exports = [ + "bc1p36wvtxursam9cq8zmc9ppvsqf9ulefm7grvlfc4tzc5j83rcggsqh6nxw5", // Native(BTC) + "bc1p0uw83vg0h32v7kypyvjn9nextku2h7axjdeefy2ewstevnqffaksjzhrdf", // BRC20 deposit + "bc1pvngqf24g3hhr5s4ptv472prz576uye8qmagy880ydq5gzpd30pdqtua3rd" // BRC20 farm +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bitunix-cex.js b/projects/helper/bitcoin-book/bitunix-cex.js new file mode 100644 index 000000000000..f0daa7428e06 --- /dev/null +++ b/projects/helper/bitcoin-book/bitunix-cex.js @@ -0,0 +1,5 @@ +module.exports = [ + "bc1qxh9ruwejxz7ztzxejafd74tyxg4sgfeqxun42f", + "bc1qhjfnumgcsqsx6grxa7mfl7rr5g3u8xl4gtt7tr", + "bc1qkvrddql6hh00apslzsxnysl75hhnm5fpqdah37" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bitvenus.js b/projects/helper/bitcoin-book/bitvenus.js new file mode 100644 index 000000000000..60563624c692 --- /dev/null +++ b/projects/helper/bitcoin-book/bitvenus.js @@ -0,0 +1,7 @@ +module.exports = [ + // '3FdoFGYYcD1EU7ekrt2x2u2mFrjmxouMJG', + // '358pjjkYRG8exw2BKZnn7Q9s6SCb7wZEWN', + // '3C1ykoWkHBMZwmY8PUUMVxtJJSBkZBCtN8', + 'bc1qrm2a7u9xyeffvulm6e589qvesmt0v0rjxqfkhv', + 'bc1qvht34dma2uy23l9j862nnqr38a42kjr66e6lec' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/blofin-cex.js b/projects/helper/bitcoin-book/blofin-cex.js new file mode 100644 index 000000000000..a81fceca5993 --- /dev/null +++ b/projects/helper/bitcoin-book/blofin-cex.js @@ -0,0 +1,5 @@ +module.exports = [ + "1PM8huQVFSirUT7eAwNm3rBBYTsDRzCaf3", + "1Jw4meLNYAaDcNxJwQdMTRVw74hGPcuV8W", + "bc1q6377fdmkvkhgzpw8drgu76jxulsl5wmmgwtrxu" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/boringdao.js b/projects/helper/bitcoin-book/boringdao.js new file mode 100644 index 000000000000..0cd7f4217c42 --- /dev/null +++ b/projects/helper/bitcoin-book/boringdao.js @@ -0,0 +1,3 @@ +module.exports = [ + '33ZibwpiZe4bM5pwpAdQNqqs2RthLkpJer' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bsquaredBRC20.js b/projects/helper/bitcoin-book/bsquaredBRC20.js new file mode 100644 index 000000000000..1398765ff1e7 --- /dev/null +++ b/projects/helper/bitcoin-book/bsquaredBRC20.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1q97ctqygjgj0ljxgge4q735ujxvlad8smass7f0axc6x3ggffr8xqwn69hc" // Bitcoin Multisig Addresses +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bsquaredBTC.js b/projects/helper/bitcoin-book/bsquaredBTC.js new file mode 100644 index 000000000000..6d334b2b184b --- /dev/null +++ b/projects/helper/bitcoin-book/bsquaredBTC.js @@ -0,0 +1,20 @@ +module.exports = [ + "bc1q4fsk5pgnmnu7ngp79xclsw2t0yk46sjqw22ffz", // pre deposited wallets //Bitcoin Multisig Addresses + "bc1qva5m5e7da2zm590z03tdnj42u9q2uye3hgrehwrzgg8j4kxq9seq9rvw0m", // Bitcoin Multisig Addresses + "bc1qjv2lfrv672rqagycs5zdsggmury0cz2vufek46jj86ddqynyp2qsxm3qfs", // Bitcoin Multisig Addresses + + // Bitcoin Custodian Addresses + "131fpYjELat58RVzPp2A9Bo8oNuKiP4vxg", + "bc1qr4cpjazz6hhjh44yrshqw4xs4e3eld60wnsq2m", + "14UwPgMLZY6rLZRDxxvmNWQ9rMkg2iraHG", + "bc1quetqhxs809mwgms0rhae4cw98chzqe0er8fryr", + "34ThPcBtz5ayRybbg1MXnQWBGtUzqUDCMa", + "bc1q082azm83lgpln7puvn4egc9dumlaqfqkqmsght", + "bc1qxxgxywxcq0q405849fyrlxa2zu4nxukf4ytg57", + "3LcCJLivWmaomMyhnyt4pqg8iWi2ECU92T", + "bc1qe4xx7eg5c4qjq8838zv05f7uzfmyyyftdpy48t", + "3GPVsXtvbfFNRYbLwJowaL7EXo8hqakfkv", + "bc1q8axfvwqa0fqds5w6vva9g5kej9e4mp4ap3dmff", + "bc1q6crqwsg59s2j4v5gvd94775pjj8l0fmflmv9jd", + "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/btse.js b/projects/helper/bitcoin-book/btse.js new file mode 100644 index 000000000000..f827da29cc5d --- /dev/null +++ b/projects/helper/bitcoin-book/btse.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qaxyju6n2x2tednv8e7hgnhnz44vrfcmuhjxpfk" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/bybit.js b/projects/helper/bitcoin-book/bybit.js new file mode 100644 index 000000000000..cecc36f59f34 --- /dev/null +++ b/projects/helper/bitcoin-book/bybit.js @@ -0,0 +1,10 @@ +module.exports = [ + "bc1q2qqqt87kh33s0er58akh7v9cwjgd83z5smh9rp", + "bc1q9w4g79ndel72lygvwtqzem67z6uqv4yncvqjz3yn8my9swnwflxsutg4cx", + "bc1qjysjfd9t9aspttpjqzv68k0ydpe7pvyd5vlyn37868473lell5tqkz456m", + "1GrwDkr33gT6LuumniYjKEGjTLhsL5kmqC", + "bc1qs5vdqkusz4v7qac8ynx0vt9jrekwuupx2fl5udp9jql3sr03z3gsr2mf0f", + // added on the 15th of july 2024. + "bc1qa2eu6p5rl9255e3xz7fcgm6snn4wl5kdfh7zpt05qp5fad9dmsys0qjg0e", + "16jVbMCcqq1deKrMB3esL2HPso7kvqUsec" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/cake-defi.js b/projects/helper/bitcoin-book/cake-defi.js new file mode 100644 index 000000000000..624456f3928f --- /dev/null +++ b/projects/helper/bitcoin-book/cake-defi.js @@ -0,0 +1,3 @@ +module.exports = [ + "3GcSHxkKY8ADMWRam51T1WYxYSb2vH62VL" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/coindcx.js b/projects/helper/bitcoin-book/coindcx.js new file mode 100644 index 000000000000..4522d9ea5acb --- /dev/null +++ b/projects/helper/bitcoin-book/coindcx.js @@ -0,0 +1,26 @@ +module.exports = [ + '12hGEyxk4zMLquxiMiFrkvYSohsXz2D3uZ', + 'bc1qz22hegkllltcydg3pz3an6h352mjmyp7n2vhd9', + '1MzSJodjNmACPKyj9VUv9X55Pby87osLhc', + 'bc1qucl4n347qc6e48w85xdxcv86sm3an8fr250hhm', + '1F6CrpEnHEZh6gQtJ7cf1MtK7Y8GYKoP4i', + 'bc1qn2xm6agnanuyuwfcfw92el7nvt2lpsqr5s5c0w', + '17mxRZ9WeXigSwg3Cm62HxeATnuUphMxGL', + 'bc1qffg4ya27430vv5ymg2lhf4mj7tvtc3ur5qyyq3', + '1JV3umtGC6H6tFUVoFyV5KwbJDscUwrtX7', + 'bc1qhlyrdhfqry06nj902p9dxdftm4pxkhdqeum8y8', + '1KXxS6QnzpB8mSLm5kmXJXqvZF7wVvQDCw', + 'bc1qedxsgzuj8ga644gwlqw4nw7f3xncq4g2rskmzu', + '12T8i8tpeczk5JGf8ppZf1w6SFBRwEa9y4', + 'bc1qpl5kqjkugyncr72a4fhxvm0360ehfdl27e00ja', + '1PRwacjHVksLNTkSYNkiWkRgTm1yDSgLMG', + 'bc1q7c9ylgjsyc0yaxwm84jjh6avfajzfe7dhk6e0e', + '1477uXZ1NfUaaZZdnztQ7h8ftGRpuWQPfA', + 'bc1qygg2x02cfy0e6r7798v4qrcjjkzm8tl5t0xkwf', + 'bc1qljm7vwdgdy6ca97stsyjyl3zdjtkdsdm8vnh8f', + 'bc1qqhwh3tcg5duwq7hdlnlr5n2tg2uq755cwmkjqn', + 'bc1qqe4g7sjxzk90nsgj0mwufwcdtd7kufg7k32xch', + '1avi3SkWKGLis8dGCP9JUnFfVeheP8wkt', + 'bc1qmulc2ju4kykj24xuw0fu73h9h3usa897xhaucz', // + '3Dm2TL1pt1VzeBCq9jgvQG81QPv19PyReh' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/coinex.js b/projects/helper/bitcoin-book/coinex.js new file mode 100644 index 000000000000..387e8adfb697 --- /dev/null +++ b/projects/helper/bitcoin-book/coinex.js @@ -0,0 +1,19 @@ +module.exports = [ + '189myj1KAbiCWfqWhT6Td4noANKBuag3QN', + '1C2Pxf3ghtKyM4mKC3xSLKrN33YcKnKF2a', + '1JZw5HYSoAEfvGGVQ4U2JihZaQkjcXrr2i', + '16M3n9p6CLATDnpsJNTjCn22AaxzErxg5V', + '15cYMF4jcRwpcbjENMdMizCzAmd7Pc51So', + '18JQXgQ4GjZAuYCy1fNAFGHVEAWUui2q9h', + '1LGbUy11yMaNC9s73q7vEad8JTZyczCima', + '1DGXwH2gzBYM6UrVE57DaaQ3hJJm3s32YK', + '152GodsXfK5kYMdH4spzYD3Ttm1u2oNipN', + '18oxoXCq5mah3GjLjGCS3BRTQxxN7738rL', + '1H21g458T25SnAzvFDJiBrcyhfwHiCH5YF', + '14BhR6aE8Fkt2c8E1m2ydx76fBz5kpt62K', + '1Ef59jZsv87uAcwBZdDhNxiSbCceQ6bFTA', + '14ukjw4r3UFC5A8yvG7yt2GdvLUHEWtskS', + '141TDnaiLEW1vE5xd42Dw8HEhDCA2qrZTr', + '1Ew9SPwBHY8GjHd3uBxhtGcvVmyBN7PHcw', + '1LYrQCjUf54vf9G4qwFpJQ9RCyL2DprPqQ', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/coinsquare.js b/projects/helper/bitcoin-book/coinsquare.js new file mode 100644 index 000000000000..1452f7562d47 --- /dev/null +++ b/projects/helper/bitcoin-book/coinsquare.js @@ -0,0 +1,12 @@ +module.exports = [ + '1P7cDFGeWm6ezez6XGXTAjvm8qcsGiMXe7', + 'bc1q0k5rpdwf7wnq3fuk7dfjqd59p3ke7ufqmlkfp4', + 'bc1qdstretw2uvhjen7hvgaya3nsjgr430x9jhqf4a', + 'bc1qez6ezccleuac4dnj5cpexz5mz3j0j3j655j6qn', + 'bc1qg6a9kpmge0fdwtrymjvq3cydfzgpcge7e05e7z', + 'bc1qg8fywv20ztsp0edtf53zpsnxeu5cqxrmdwmtjd', + 'bc1qm5mqpgtt2ufucfdvhu5xcdgs3vzehwu62wsyqy', + 'bc1qmkkejzrq7ayfjpy7w8gmkhd3uwcy7nryr5apch', + 'bc1qsjc50kf72r4q44ac28v3vrukaxjg4w30rh0cmm', + 'bc1qyz9mssutu8xxcgjvsucz38qvxt7hxwtnm5eh8k', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/coinw.js b/projects/helper/bitcoin-book/coinw.js new file mode 100644 index 000000000000..c81128c1b947 --- /dev/null +++ b/projects/helper/bitcoin-book/coinw.js @@ -0,0 +1,4 @@ +module.exports = [ + '14Z9KSmCo1UjvBiXj2j9er35GmGmaFxsmE', + '1KYBKqRjGbRynSiyoiHndULssXrEeWhvU8', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/crypto-com.js b/projects/helper/bitcoin-book/crypto-com.js new file mode 100644 index 000000000000..f092053a2a7a --- /dev/null +++ b/projects/helper/bitcoin-book/crypto-com.js @@ -0,0 +1,10 @@ +module.exports = [ + 'bc1qpy4jwethqenp4r7hqls660wy8287vw0my32lmy', + '3LhhDLBVWBZChNQv8Dn4nDKFnCyojG1FqN', + '3QsGsAXQ4rqRNvh5pEW55hf3F9PEyb7rVq', + 'bc1qr4dl5wa7kl8yu792dceg9z5knl2gkn220lk7a9', + 'bc1q4c8n5t00jmj8temxdgcc3t32nkg2wjwz24lywv', + '14m3sd9HCCFJW4LymahJCKMabAxTK4DAqW', + 'bc1qjqy709gqpse60hdsm2d2v0dzzu7yp5dej7fdrpl2x3taccvujq4s0vzsyd', + 'bc1qcdqj2smprre85c78d942wx5tauw5n7uw92r7wr' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/deribit.js b/projects/helper/bitcoin-book/deribit.js new file mode 100644 index 000000000000..d918bf65a1a9 --- /dev/null +++ b/projects/helper/bitcoin-book/deribit.js @@ -0,0 +1,16 @@ +module.exports = [ + // from https://insights.deribit.com/exchange-updates/proof-of-reserves-deribit/ + "bc1qa3phj5uhnuauk6r62cku6r6fl9rawqx4n6d690", + "bc1qtq5zfllw9fs9w6stnfgalf9v59fgrcxxyawuvm", + "1MDq7zyLw6oKichbFiDDZ3aaK59byc6CT8", + "1932eKraQ3Ad9MeNBHb14WFQbNrLaKeEpT", + "13JJ1nxDeX5fMsDeyGHiLoK8rF2ayGq1cX", + "1MdrdcEzfiJdvs6eVSwUx6bWboPX8if5U3", + "35WHp4Hid61peyH4tuhNunwRj2gtNB41Lo", + "34ZHV8dd6uucEUABUydWpKi6F4qKQntEUf", + // added on the 26/06/2024 + "bc1qzwhw94uldd3c8736lsxrda6t6x56030f8zk8nr", + "bc1qrmuxak470z7zch5f3gz05dc6h4ngwqdq4wx80w", + "bc1qf6lm99tp5p27hsmyskve236nsv32lnfwt4h8wk", + "14HeA1YRUiJGb95HVpVTBuavMUBYGk6y7R", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/elSalvador.js b/projects/helper/bitcoin-book/elSalvador.js new file mode 100644 index 000000000000..ba5ef8fda8a3 --- /dev/null +++ b/projects/helper/bitcoin-book/elSalvador.js @@ -0,0 +1,3 @@ +module.exports = [ + '32ixEdVJWo3kmvJGMTZq5jAQVZZeuwnqzo' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/fastex.js b/projects/helper/bitcoin-book/fastex.js new file mode 100644 index 000000000000..bcd87353da3f --- /dev/null +++ b/projects/helper/bitcoin-book/fastex.js @@ -0,0 +1,3 @@ +module.exports = [ + 'bc1qs7yen7ljpvyw7vn58ql6zfaddqf4rcjalsgmt5' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/fbi-dprk.js b/projects/helper/bitcoin-book/fbi-dprk.js new file mode 100644 index 000000000000..f0913effe259 --- /dev/null +++ b/projects/helper/bitcoin-book/fbi-dprk.js @@ -0,0 +1,9 @@ +module.exports = [ + //source https://www.fbi.gov/news/press-releases/fbi-identifies-cryptocurrency-funds-stolen-by-dprk + "3LU8wRu4ZnXP4UM8Yo6kkTiGHM9BubgyiG", + "39idqitN9tYNmq3wYanwg3MitFB5TZCjWu", + "3AAUBbKJorvNhEUFhKnep9YTwmZECxE4Nk", + "3PjNaSeP8GzLjGeu51JR19Q2Lu8W2Te9oc", + "3NbdrezMzAVVfXv5MTQJn4hWqKhYCTCJoB", + "34VXKa5upLWVYMXmgid6bFM4BaQXHxSUoL" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/fetchers.js b/projects/helper/bitcoin-book/fetchers.js new file mode 100644 index 000000000000..c6e7d795d2e5 --- /dev/null +++ b/projects/helper/bitcoin-book/fetchers.js @@ -0,0 +1,127 @@ +const { getConfig } = require('../cache') +const axios = require('axios'); +const { getEnv } = require('../env') +const { get } = require('../http') +const sdk = require('@defillama/sdk') + +const abi = { getQualifiedUserInfo: 'function getQualifiedUserInfo(address _user) view returns ((bool locked, string depositAddress, string withdrawalAddress) info)' } + +module.exports = { + bedrock: async () => { + const API_URL = 'https://bedrock-datacenter.rockx.com/uniBTC/reserve/address' + const { btc } = await getConfig('bedrock.btc_address', API_URL) + return btc + }, + exsatCreditStaking: async () => { + const { data: response } = await axios.post('https://rpc-us.exsat.network/v1/chain/get_table_rows', { + json: true, + code: "custody.xsat", + scope: "custody.xsat", + table: "custodies", + limit: "100", + show_payer: true + }) + return response.rows.map(row => row.data.btc_address); + }, + fbtc: async () => { + const api = new sdk.ChainApi({ chain: 'ethereum' }) + const staticAddresses = await getConfig('fbtc', undefined, { + fetcher: async () => { + const token = getEnv('FBTC_ACCESS_TOKEN') + const { result } = await get('https://fbtc.phalcon.blocksec.com/api/v1/extension/fbtc-reserved-addr', { + headers: { + 'access-token': token + } + }) + return result.map(r => r.address) + } + }) + + const users = await api.call({ abi: 'address[]:getQualifiedUsers', target: '0xbee335BB44e75C4794a0b9B54E8027b111395943' }) + const userInfos = await api.multiCall({ abi: abi.getQualifiedUserInfo, target: '0xbee335BB44e75C4794a0b9B54E8027b111395943', calls: users }) + userInfos.forEach(i => staticAddresses.push(i.depositAddress)) + return staticAddresses + }, + lombard: async () => { + const API_URL = 'https://mainnet.prod.lombard.finance/api/v1/addresses' + const BATCH_SIZE = 1000 + + return getConfig('lombard', undefined, { + fetcher: async () => { + let allAddresses = []; + let offset = 0; + let batchNumber = 1; + let hasMore = true; + + while (hasMore) { + const { addresses: data, has_more } = await get(`${API_URL}?limit=${BATCH_SIZE}&offset=${offset}`); + const newAddresses = data.map(a => a.btc_address); + + allAddresses.push(...newAddresses); + sdk.log(`Batch ${batchNumber} completed: ${newAddresses.length} addresses`); + + hasMore = has_more; + offset += BATCH_SIZE; + batchNumber++; + } + + return allAddresses; + } + }) + }, + solvBTC: async () => { + const API_URL = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/refs/heads/main/bitcoin.json' + return Object.values(await getConfig('solv-protocol/solv-btc-lst', API_URL)).flat(); + }, + pumpBTC: async () => { + const API_URL = 'https://dashboard.pumpbtc.xyz/api/dashboard/btc/addresses' + return getConfig('pumpbtc', undefined, { + fetcher: async () => { + const { data } = await axios.get(API_URL) + return data.data || [] + } + }) + }, + tBTC: async () => { + const API_URL = 'https://api.threshold.network/tbtc/wallets/pof' + const { wallets } = await getConfig('tbtc/wallets', API_URL) + return wallets.filter(i => +i.walletBitcoinBalance > 0).map(wallet => wallet.walletBitcoinAddress) + }, + exsatBridge: async () => { + const API_URL = 'https://raw.githubusercontent.com/exsat-network/exsat-defillama/refs/heads/main/bridge-bitcoin.json' + const API2_URL = 'https://rpc-us.exsat.network/v1/chain/get_table_rows' + + const config = await getConfig('exsat', API_URL) + const custody_addresses = config['custody_addresses']; + const custody_ids = config['custody_ids']; + const owners = [...custody_addresses]; + + for (let custody_id of custody_ids) { + let lower_bound = null; + let hasMore = true; + + while (hasMore) { + const { data: response } = await axios.post(API2_URL, { + "json": true, + "code": "brdgmng.xsat", + "scope": custody_id, + "table": "addrmappings", + "lower_bound": lower_bound, + "upper_bound": null, + "index_position": 1, + "key_type": "", + "limit": "100", + "reverse": false, + "show_payer": true + }); + + const addrs = response.rows.map(row => row.data.btc_address); + owners.push(...addrs); + + hasMore = response.more; + lower_bound = response.next_key; + } + } + return owners + } +} \ No newline at end of file diff --git a/projects/helper/bitcoin-book/fire.js b/projects/helper/bitcoin-book/fire.js new file mode 100644 index 000000000000..bf91f24ca24b --- /dev/null +++ b/projects/helper/bitcoin-book/fire.js @@ -0,0 +1,6 @@ +module.exports = [ + 'bc1q36c0rp4ydl6uvvguhw9nr7njm49addzkgftqev', + 'bc1q3z0khuld6nd7esv46nxj9ketteqw9qz86peyeh', + 'bc1q4hz59t7v0uxujuyrhp9679uppur7ke9u3vshvd', + 'bc1qdlrh7ycyqxe62vk5m70y353vmep9ullxx5j9ar', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/flipster.js b/projects/helper/bitcoin-book/flipster.js new file mode 100644 index 000000000000..7ec436017ad5 --- /dev/null +++ b/projects/helper/bitcoin-book/flipster.js @@ -0,0 +1,3 @@ +module.exports = [ + "31iAUikiV7yKEYBzbA1iHPcanHNsLBFe8C" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/garden.js b/projects/helper/bitcoin-book/garden.js new file mode 100644 index 000000000000..11ad3a29caad --- /dev/null +++ b/projects/helper/bitcoin-book/garden.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qhww67feqfdf6xasjat88x5stqa6vzx0c6fgtnj" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/gate-io.js b/projects/helper/bitcoin-book/gate-io.js new file mode 100644 index 000000000000..2a8cb8f5a9f6 --- /dev/null +++ b/projects/helper/bitcoin-book/gate-io.js @@ -0,0 +1,8 @@ +module.exports = [ + '14kmvhQrWrNEHbrSKBySj4qHGjemDtS3SF', + '162bzZT2hJfv5Gm3ZmWfWfHJjCtMD6rHhw', + '1EkkGXR7dTbZbrKFKoe6YEP4gj4GzMeKvw', + '1G47mSr3oANXMafVrR8UC4pzV7FEAzo3r9', + '1HpED69tpKSaEaWpY3Udt1DtcVcuCUoh2Y', + '3HroDXv8hmzKRtaSfBffRgedKpru8fgy6M', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/hashkey-exchange.js b/projects/helper/bitcoin-book/hashkey-exchange.js new file mode 100644 index 000000000000..978a0da1c224 --- /dev/null +++ b/projects/helper/bitcoin-book/hashkey-exchange.js @@ -0,0 +1,6 @@ +module.exports = [ + "bc1qqe394jlqq86muq23d4vrnhzzvcv8jnepgt8lx7", + "1NfJSiqBw4fb74KgVQrPsk5W5aqitAD1Xv", + // "bc1qlrawqecuwgpzzwh04pkhtfsqsk33kald22ds3c", // bosera funds https://www.bosera.com/english/index.html + "18oxobhCNKnHjb7nEFDmPdXbCZthFWezrm", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/hashkey.js b/projects/helper/bitcoin-book/hashkey.js new file mode 100644 index 000000000000..9dbb016d3bad --- /dev/null +++ b/projects/helper/bitcoin-book/hashkey.js @@ -0,0 +1,4 @@ +module.exports = [ + "bc1qyvppkaa74d9jvtz664a6uxmj09hf0eyg3uhx4h", + "1DywJMqHHMWuP7xyfkRqJZCEe7GdEKFRcp" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/hibt.js b/projects/helper/bitcoin-book/hibt.js new file mode 100644 index 000000000000..24ca126ecd38 --- /dev/null +++ b/projects/helper/bitcoin-book/hibt.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qpxntlx09kqvpwl7vmjw9f28yvytdqkdx8xh63w" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/hope-money.js b/projects/helper/bitcoin-book/hope-money.js new file mode 100644 index 000000000000..3bc94a71f0af --- /dev/null +++ b/projects/helper/bitcoin-book/hope-money.js @@ -0,0 +1,7 @@ +module.exports = [ + '15PYHP5ZW29B3o19jFNKz6RyRdHCtzJj5H', + '16BLcAyJR8unm8RpQT9PGTwh5uPpZEf2ut', + '3JoCB8ifwhL4YKo9rCYMgVGbqxBqnpQpdS', + '179fgM9yyTHj4ZCTfAcGhUFiQMXuPx5xrF', + '1LaC3Xt8RZWYH1pjcvXxrWxLvXe7iR3ybe' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/hotbit.js b/projects/helper/bitcoin-book/hotbit.js new file mode 100644 index 000000000000..2ac17bafc87b --- /dev/null +++ b/projects/helper/bitcoin-book/hotbit.js @@ -0,0 +1,3 @@ +module.exports = [ + "1MiFZMJkFMhMrubjjo6f5oEhh7XgSwXWgp" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/huobi.js b/projects/helper/bitcoin-book/huobi.js new file mode 100644 index 000000000000..ee1188524dcc --- /dev/null +++ b/projects/helper/bitcoin-book/huobi.js @@ -0,0 +1,14 @@ +module.exports = [ + "12qTdZHx6f77aQ74CPCZGSY47VaRwYjVD8", + "143gLvWYUojXaWZRrxquRKpVNTkhmr415B", + // '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', this wallet is backing USDD acording here https://prnt.sc/i3cFaak7H9Y8. For that reason, it should not included as HTX. + //These 3 addresses has 48,555 #Bitcoin. This is only less than 3% of the total high value assets we have, including btc, usd, stablecoins, T-bills.. According to Justin Sun https://twitter.com/justinsuntron/status/1590311559242612743 + "14XKsv8tT6tt8P8mfDQZgNF8wtN5erNu5D", + "1LXzGrDQqKqVBqxfGDUyhC6rTRBN5s8Sbj", + "1HckjUpRGcrrRAtFaaCAUaGjsPx9oYmLaZ", // add on 08/08/2023 (we defillama) + "1L15W6b9vkxV81xW5HDtmMBycrdiettHEL", // add on 08/08/2023 (we defillama) + "14o5ywJJmLPJe8egNo7a5fSdtEgarkus33", // add on 08/08/2023 (we defillama) + "1BuiWj9wPbQwNY97xU53LRPhzqNQccSquM", // add on 08/08/2023 (we defillama) + "1AQLXAB6aXSVbRMjbhSBudLf1kcsbWSEjg", // add on 23/02/2024 (we defillama) + "1ENWYLQZJRAZGtwBmoWrhmTtDUtJ5LseVj", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/imbtc.js b/projects/helper/bitcoin-book/imbtc.js new file mode 100644 index 000000000000..e92993a2c369 --- /dev/null +++ b/projects/helper/bitcoin-book/imbtc.js @@ -0,0 +1,3 @@ +module.exports = [ + '3JMjHDTJjKPnrvS7DycPAgYcA6HrHRk8UG', '3GH4EhMi1MG8rxSiAWqfoiUCMLaWPTCxuy' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js new file mode 100644 index 000000000000..a8c9e3a46184 --- /dev/null +++ b/projects/helper/bitcoin-book/index.js @@ -0,0 +1,173 @@ +const ainn = require('./ainn-layer2.js') +const allo = require('./allo.js') +const avalance = require('./avalanche-btc.js') +const fetchers = require('./fetchers.js') +const bevm = require('./bevm.js') +const binance = require('./binance.js') +const binance2 = require('./binance-btc.js') +const bitstable = require('./bitstable-finance.js') +const boringdao = require('./boringdao.js') +const bsquaredBTC = require('./bsquaredBTC.js') +const bsquaredBRC20 = require('./bsquaredBRC20.js') +const elSalvador = require('./elSalvador.js') +const garden = require('./garden.js') +const hopeMoney = require('./hope-money.js') +const krakenBTC = require('./kraken-btc.js') +const lorenzo = require('./lorenzo.js') +const lorenzo2 = require('./lorenzo-enzoBTC.js') +const merlin = require('./merlin.js') +const multibit = require('./multibit.js') +const obelisk = require('./obelisk.js') +const roup = require('./roup.js') +const tronBTC = require('./tron-btc.js') +const wbtc = require('./wbtc.js') +const xlink = require('./xlink.js') +const xlinkLST = require('./xlinkLST.js') +const xrgb = require('./xrgb.js') +const imbtc = require('./imbtc.js') +const twentyOneCo = require('./21Co.js') +const avalonCedefi = require('./avalon-cedefi.js') +const pstakeBTC = require('./pstake-btc.js') +const biconomy = require('./biconomy-cex.js') +const bigone = require('./bigone.js') +const bingCex = require('./bing-cex.js') +const bitfinex = require('./bitfinex.js') +const bitget = require('./bitget.js') +const bitmake = require('./bitmake.js') +const bitmark = require('./bitmark.js') +const bitmex = require('./bitmex.js') +const bitunixCex = require('./bitunix-cex.js') +const bitvenus = require('./bitvenus.js') +const blofinCex = require('./blofin-cex.js') +const btse = require('./btse.js') +const bybit = require('./bybit.js') +const cakeDefi = require('./cake-defi.js') +const coindcx = require('./coindcx.js') +const coinex = require('./coinex.js') +const coinsquare = require('./coinsquare.js') +const coinw = require('./coinw.js') +const cryptoCom = require('./crypto-com.js') +const deribit = require('./deribit.js') +const fbiDprk = require('./fbi-dprk.js') +const mtGoxEntities = require('./mt-gox-entities.js') +const silkroadFBIEntities = require('./silkroad-fbifunds-entities.js') +const fastex = require('./fastex.js') +const fire = require('./fire.js') +const flipster = require('./flipster.js') +const gateIo = require('./gate-io.js') +const hashkey = require('./hashkey.js') +const hashkeyExchange = require('./hashkey-exchange.js') +const hibt = require('./hibt.js') +const hotbit = require('./hotbit.js') +const huobi = require('./huobi.js') +const kleverExchange = require('./klever-exchange.js') +const korbit = require('./korbit.js') +const kraken = require('./kraken.js') +const kucoin = require('./kucoin.js') +const latoken = require('./latoken.js') +const maskex = require('./maskex.js') +const mento = require('./mento.js') +const mexcCex = require('./mexc-cex.js') +const mtGox = require('./mt-gox.js') +const nbx = require('./nbx.js') +const nonkyc = require('./nonkyc.js') +const okcoin = require('./okcoin.js') +const okex = require('./okex.js') +const phemex = require('./phemex.js') +const pionexCex = require('./pionex-cex.js') +const probit = require('./probit.js') +const robinhood = require('./robinhood.js') +const rosenBridge = require('./rosen-bridge.js') +const silkroad = require('./silkroad.js') +const swissborg = require('./swissborg.js') +const toobit = require('./toobit.js') +const indiaCovid = require('./india-covid.js') +const wooCEX = require('./woo-cex.js') + +module.exports = { + ...fetchers, + ainn, + allo, + avalance, + bevm, + binance, + binance2, + bitstable, + boringdao, + bsquaredBTC, + bsquaredBRC20, + elSalvador, + garden, + hopeMoney, + krakenBTC, + lorenzo, + lorenzo2, + merlin, + multibit, + obelisk, + roup, + tronBTC, + wbtc, + xlink, + xlinkLST, + xrgb, + imbtc, + twentyOneCo, + avalonCedefi, + pstakeBTC, + biconomy, + bigone, + bingCex, + bitfinex, + bitget, + bitmake, + bitmark, + bitmex, + bitunixCex, + bitvenus, + blofinCex, + btse, + bybit, + cakeDefi, + coindcx, + coinex, + coinsquare, + coinw, + cryptoCom, + deribit, + fbiDprk, + mtGoxEntities, + silkroadFBIEntities, + fastex, + fire, + flipster, + gateIo, + hashkey, + hashkeyExchange, + hibt, + hotbit, + huobi, + kleverExchange, + korbit, + kraken, + kucoin, + latoken, + maskex, + mento, + mexcCex, + mtGox, + nbx, + nonkyc, + okcoin, + okex, + phemex, + pionexCex, + probit, + robinhood, + rosenBridge, + silkroad, + swissborg, + toobit, + indiaCovid, + wooCEX +} \ No newline at end of file diff --git a/projects/helper/bitcoin-book/india-covid.js b/projects/helper/bitcoin-book/india-covid.js new file mode 100644 index 000000000000..ec4208aeecc5 --- /dev/null +++ b/projects/helper/bitcoin-book/india-covid.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1q220k2449fau0pxu9hfn28q3w4k99ep9hwsa5fa" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/klever-exchange.js b/projects/helper/bitcoin-book/klever-exchange.js new file mode 100644 index 000000000000..6c2d7acf097b --- /dev/null +++ b/projects/helper/bitcoin-book/klever-exchange.js @@ -0,0 +1,5 @@ +module.exports = [ + 'bc1qze8pn5vywzk8enqdr9ve28lyas23kurzd37027', + 'bc1qgy5zyuvsw5wnt5lrx3m62tt2pmdl69avd5vw6n', + 'bc1qk4l4u3lh7rrufsw0z6vmkln5kesf0a9q0srnkr' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/korbit.js b/projects/helper/bitcoin-book/korbit.js new file mode 100644 index 000000000000..ccdfbe18b486 --- /dev/null +++ b/projects/helper/bitcoin-book/korbit.js @@ -0,0 +1,23 @@ +module.exports = [ + '1JtAupan5MSPXxSsWFiwA79bY9LD2Ga1je', + '3E8BTrBB7jxAemyUqSnN4YFLMC22cShZJZ', + '3GoBetHTvfnaRNQbR4yy5YNUjX4d8mTQKK', + 'bc1q09j44e0xxxusj3zsan20x7tuvtumxfv9smlq27t0nwp57gxf7htqq6m9lj', + 'bc1q0uffd8egas4w87dxq998ttfl6j3jtw6k7cafce9v4mvr5qc9tvfq9czqk9', + 'bc1q33m8td986p3vcnap9zqpx3d8v8zujtkvqacsya5xfvf945vmvxzqth4h4t', + 'bc1q3yn06lfl8ayjukya52ksff0uaveurfc8lm3ftdgu8ywvwanx8lqswj7w9u', + 'bc1q4sv2fxlp6w08wkq8ywmughxkm7n75d2fmrgnmvwun6rhepyknjxqm99v4x', + 'bc1q7fww9657ts2au45wh0ed39rjze6ja93z0498z4j89pqjky266wzs0sz8ka', + 'bc1q9pnwfyd4jtkulyk4w057wsdjhykaw6fftw06k2cn2m3y7jlsfe2qvxvm8e', + 'bc1qa8may4g0yzezjyesqcq0mwggy5wwzl0yhs0a8tk9ucej5qg6ujfqscv2jq', + 'bc1qgkx4ee8ac3as5y4ddhw6uedyk9adsywdzgc0fzxv304lcrh4qs9sn96agt', + 'bc1qku6z53kuyaj9r898kj6esqnwz7wke82mwgw43vhu33ld7sx3200s2u9p9x', + 'bc1ql0p3klhr2d8z07ja3t5d5dnxrenhp4gcjeszxpfflr08zaqqx5zqpkeqnl', + 'bc1qnerwvz93pcj653r5yd4hnd2d7np2drhdhyruj7qdvl3psc5wnf0q6x9me4', + 'bc1qs9ut74nue7vjknz2eqxegmtuzqhjzx9y8tzjymvlg05v8a5ffr5qz402cx', + 'bc1qsk6h7d2l7e7r2a8krlxjn6wdnhhszyrtzcugdsfa5zz4syajzl5spd52h5', + 'bc1qsmqvkwrsy5xw2hm885l5fv7s2hxzauz5fn9jayfmd86305wehrts2lztgs', + 'bc1qtlen0nuvln3aqcn2r3nljshdmzakq7z5z4rexpk23mj8u8lmc8ysc29jct', + 'bc1qzdt5z4f46jak59jku5jmvv3f2ru20htqs7jhy0whazgd5v4626eq4vkxqz', + 'bc1qzu4lnzfpskwsvnyvzud9a7ru4d2ft7whqvl5d3kskxxhgeupnjjquzvt97', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/kraken-btc.js b/projects/helper/bitcoin-book/kraken-btc.js new file mode 100644 index 000000000000..cb54d312afcb --- /dev/null +++ b/projects/helper/bitcoin-book/kraken-btc.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qqwf6hexnnswmj6yuhz5xyj20frtp8exv7mclck" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/kraken.js b/projects/helper/bitcoin-book/kraken.js new file mode 100644 index 000000000000..c08929826050 --- /dev/null +++ b/projects/helper/bitcoin-book/kraken.js @@ -0,0 +1,16 @@ +module.exports = [ + 'bc1qnhmemsqfhycvp6g50v732h7wfwdt68el4ux5ttu8xwsrzngmxv0qr55aga', + 'bc1qa5aux0l2c3l99tpmd9c85770kqpksg3g6dxaw03jj6lphnwy4lqq68xfgc', + 'bc1q3gqqnn9hr0uachfk6rv3qhf3pp9z8a4z63ksc5qu0c2vvtykqd9qj3fyum', + 'bc1qplr053c80nzlqapuatfslyhmns6sfn32qzz3xkdn36jjryw8vsys8y7wlc', + 'bc1qhxv3pg2hsnw3m9jukuc6erjwwd03rzwhd2k6zh5uf6s2lwpuv3rq9zefru', + 'bc1q08n37tm63z3f0myqe6zjx7ymtng8c9qedpwpplq95qkmx0cpke7qyz4y8v', + 'bc1q02cq8du8r7ktuy5l0ltc4cv82xnaw4upaaw8y4rq6uycdp0k5nmquljtzk', + 'bc1qcf9qe8ytx5qlcq0ft4vm2xm3fyfvurrkende46hpmwwnzpctfu3szxpve2', + 'bc1qrj5vg73fxs6h6pmdjld387j5szkswc2y39rfutw8gl93h647wpksukyln9', + 'bc1q9hqaqzyf6zsd330pkvtq5uxcxprzr368zdsxx5srtep7kepx523q2gd0ef', + 'bc1q36l8mssxdlncj7njkqvayv3jumked9jdtjxete66cxnzluf4j0msjm4w80', + 'bc1qs8cyln26t2f5rwu2frnqvtltfxt0qqql0elmhrpsexlzveap82eqtyvsgu', + 'bc1qcds58swh4g6zsdmws9ltcdpqz4l44utu5wv9vfpmemps3whgdacqkakrk0', + 'bc1q75tsfq2c5cqp2ss32qksmnzd9yea2mjsjktdmrz900dcmg43ck4s66sgjx', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/kucoin.js b/projects/helper/bitcoin-book/kucoin.js new file mode 100644 index 000000000000..713bd603fb1b --- /dev/null +++ b/projects/helper/bitcoin-book/kucoin.js @@ -0,0 +1,114 @@ +module.exports = [ + 'bc1q04p5psjsp7j80sq6u4djgqk3c7pk6n93q43ply', + '38fJPq4dYGPoJizEUGCL9yWkqg73cJmC2n', + 'bc1q0243pvcnutwtm3m6t005402yk8utq4kfqqghhu', + 'bc1q080rkmk3kj86pxvf5nkxecdrw6nrx3zzy9xl7q', + 'bc1q07yhcr2qmwkc32z4gfaemtjtx90am6e6rpl9sg', + 'bc1q224fr84g5xqvp2lkwmzvyec9frwk5w5f5v5w38', + 'bc1q204dfzksn4l0rhhajm9fyd5h92dac8tnuur8jp', + '37nA3mMvQwPGVh6BKdLXKBiPjLFVbRLZEp', + 'bc1q0h72mfwgtsnfkcmpsnt3kmrrp4z5x3v469mz0k', + 'bc1q0l84mekaaszjfst7lswaheu7gcymv2h2k8z6fl', + 'bc1q2hpdg7pwghz9um27hqsmv2sg3f8f9fwtjvdenx', + 'bc1q3yy6h7x9wtffu8f7hpkhlyssw3s28xzj0nydye', + 'bc1q3kwpxug0q0w55qjrfrcykxu2yn02xhzn49fnxw', + 'bc1q2wxfd36s204jkpfmez2u0nh7540cctur2v27ht', + 'bc1q3g7sltlncshtqcu9wyhqavzxlfa4tj97whapup', + 'bc1q4jszmgxml90ernkn3l908sn4hr94zk6wynp788', + 'bc1q3sevrnv8khxe6fnl87ad8e4fjefu7rmp39pxl6', + 'bc1q4xt86cp0xf6zsrfsgspnfm8579ksurxppae66a', + 'bc1q4f8uwyargzd8eajj2vrdjz4l0hvhjdlpmchstm', + 'bc1q3fzjrvlvsl6j58x38gzk0c8dgvfudsqcsdqyry', + 'bc1q5h4ucvz7qqnhypekhd8jusc8z8msytxflzfs8s', + 'bc1q5ty9r24qftnx7c0vw0y76d5kneekse7hl878yv', + 'bc1q6z680y2fkmmu49ykm0dm0temp25p034p034fme', + 'bc1q5qsadcuj0at2xk4lfca5zull8mkgwfm06qduq4', + 'bc1q80elat9h0nfhuzvuvn4yl2nh0eqxwfzas5afnv', + 'bc1q6dr8nqmgm5qvuukuf5ux3m0fdthnhx033uv3vr', + 'bc1q6tj4wm295pndmx4dywkg27rj6vqfxl5gn8j7zr', + 'bc1q5w44vqvfpnwzpclwhdmx98uenwdtdfd85qtw34', + 'bc1q82qe6w4afzt2l94wn4d9e0uchj8t2x2dtdf2pu', + 'bc1q5cza73vpzhrsruy4e7gudvq6xv6vfs9hjs5pl3', + 'bc1qa482xwlzz479nyep2ve0z6t9t29dg0zem9wqt2', + 'bc1q8yja3gw33ngd8aunmfr4hj820adc9nlsv0syvz', + 'bc1q9uddlcfqdyh6dlu3pptchazr0va0cshnqss2yk', + 'bc1qa8jaa3pss396sx52hkft5ta2dey69fkrt8mfsc', + 'bc1q9020xphp6ukc4j72hy52gk2nxujwt4kr8dq6eu', + 'bc1q8jjlupqcvxv25usqu8hvlnd8ym0stcpq4jfy9x', + 'bc1q98mvmv9nl4p744tdf2zh3uzv30yea2njy0le9d', + 'bc1q9hrcsckdwrezlw7gspefeyk9nyqmwpy3ea8wwx', + 'bc1qa3h4re6gf6qmmesjqfzn0vu2rmc6e00s4gjjle', + 'bc1q9wvygkq7h9xgcp59mc6ghzczrqlgrj9k3ey9tz', + 'bc1qfyr7tvv0a2dcq6xp4dgr5nemfmnak2e2scn6hg', + 'bc1qdhqxc3h6dnc6x0k8emtcnuyt8aspy83w0g9xht', + 'bc1qfcuvuaam666pv777ad59wwue5l7j36hr95f8gv', + 'bc1qf3wwg8dayutammv2e6lahudyc7j2ef579hyx3m', + 'bc1qamlau4w545vsjsmnhzmztlv3sy4tu6v9cnxtcg', + 'bc1qea6uvmc2kqndhewtlnc9duh5aa30ptvp3mhk9h', + 'bc1qgrxsrmrhsapvh9addyx6sh8j4rw0sn9xtur9uq', + 'bc1qcyjkktrvwatdqyvpm04vs3k2x5r4ystnw7msrk', + 'bc1qggwgcwnjvlma9hr569jhgx2yuncaaq0ace5ywp', + 'bc1qartr66auwm2tlcjp7cqgs8cx4p6q7lydrtwf4p', + 'bc1qkrewa0m37wjmkcgs0w2gh9zhjqclkq74ckt4x4', + 'bc1qk947xflcafthv8k6gx7m2cvwzqzy68kl5npkyw', + 'bc1qh573eaggrqexqx7xzm4e57k6sm9r7zpuxwqxzn', + 'bc1qj5gnrfdmcftzxgrwcdts4plw4kaydjs5kq560l', + 'bc1qlldl5qma9glxwt3j06eef05590uyy2td3ye90c', + 'bc1qhafun32xkhxpec8dq3kpxyq5x9ur437mj4dusy', + 'bc1qh6tqdv9k2pew6vyvrmg76ae55n5rwa2djmyyyk', + 'bc1qjxv6j2sv6za57khvvd5yu9jxkv3g3qvxh6sach', + 'bc1qjefrh2gf28g6x56eeausc30gxewamj7qwtzfpg', + 'bc1qhs4u46ygdskuljadnxn6thqsrjw3nf9r8nfclm', + 'bc1qnl68wnf3d6jz532dl65hj9urw9j2432fjg03nr', + 'bc1qnetky45z2vguazzczuy7x2446vsjn4ku76d5k8', + 'bc1qlw4dv8nt5uc35dkmftlt3nt0rl0cte4he998qt', + 'bc1qnvdx4dt8kn68csvcqvdtnlzw8hadapk9e9k857', + 'bc1qnqhcfntmlh2nnu5rp25szqgxw7v3783xrgcd44', + 'bc1qp22u6u75j2nvvhychyfd9uxr6s2jkf5p985rct', + 'bc1qnxn6352sn9mm6dxgmfrn43fgtu0l2kcx2y3ddh', + 'bc1qm882j3900we3eewa5fdw4hlwlnef35phmsn7x8', + 'bc1qpafgjjmqlv32m6m6qpte2ldlz0wcuj3ajyt8gd', + 'bc1qmtvfu97nlrl8qtujvj5jg47dc0p3w8sun6esaf', + 'bc1qr9hf2v2gf6haq7tsvckel7u6ja46fnqfkt6u5p', + 'bc1qpuhnd3gqhqlezgcuuhc2ywfw2w03uyz0seg802', + 'bc1qr77hw0dek5f8uvmeazd3egym2m3npjf2nvrza5', + 'bc1qpdfchk5j5tvkwf0z4kpftysv88h5szz4ms8try', + 'bc1qprpm6caxcuewnme4at7h2skhv2rury274a0vln', + 'bc1qq9u67zacfe3vz40e36nltn3agt9hf75g7av2xx', + 'bc1qrf9llyljmwy8egcjjsw0z0a8n5sgjlhcemezcl', + 'bc1qqx0udc7ndr77yg4v7rwuugnwk8n8xqaydmakfu', + 'bc1qqg92jrprgh0vdq3pd8wctnzqyuwn5kp20hhfh6', + 'bc1qpnmkhx9ndgnk639wh5gyuex4nsx7s8t8d33pzt', + 'bc1qtcxldruuuhvk8zjmw3a3dpwfvu2d0m9qyctv82', + 'bc1qtlgfyl9yjyluwzyyayp2fs0r4kcjtv2axsmzl8', + 'bc1qs84j4s45nztsx9759vkha0wvvx28dlqk7p2n5y', + 'bc1qteec4z0tcvv40r6py855gg77rwnhe9ege42x0t', + 'bc1qrt7rkpswpgmcag7txzf6ps9mvepwgndshqdx6d', + 'bc1quqy97s6lj3mty7hdp4at7uvmlzssh57jezx85v', + 'bc1qseaaa4hnexjugx26p605getpdnkwy3up64uws9', + 'bc1qudtghe07cfslxyv36zk5ums65c32xcw0nz6zhg', + 'bc1qsfdf47l3ftsqv2muvfftnulcp4qwzypuxm9k30', + 'bc1qul97gsvkpfju6fa53cezzxx5wmv4t8rl6gdt62', + 'bc1qv3v2u78m6vec2jqe7w0esm6rccmysccdvkpr3t', + 'bc1qwjftm2nl65gmevmutfqe8q7k0aaahlxt3a9wam', + 'bc1qvh0zexe6422t85x3kzgvms9fd984606uhf44ug', + 'bc1qvj8a4kjq888c2l22pdgjx3cgaq94vm3hjzyq6l', + 'bc1qwgzyz8xpwdrx54rsm5p74ksc6wkxr8y4ncejwh', + 'bc1qvvqafwsqr2rquyvym4l6rtt7ayukpmw2sfxn7f', + 'bc1qvkzdg9x58zyupept40zcjhmztn3l2flqss2f4x', + 'bc1quyayxjg0r68wsj6c2zcu3f7nnj9um5pwdgr36m', + 'bc1qw83c8j8pf2azegtyeszqqdaafgqj4hl3xcdy95', + 'bc1qwxg6gra5g9tlvztr9qphzpruch30ka40e4tl48', + 'bc1qz0q4hyn5k8plleax2g52jsr0k07vgtqcr634g3', + 'bc1qz0nfyvylrvn9h2rqm7lcegzv79du2p5jezgept', + 'bc1qxfgeqygy229hrjrwmklzgwme70h8mmrjcyueag', + 'bc1qyz4zr7cv2922cjua9xrezsda82gl8z653w6ru4', + 'bc1qxnsr0al2lw7hqg90j05x9s0gxm5g4skmcslrut', + 'bc1qymcn42gst8jvcu4y9c6tf6ngfs38j66hd5zvhs', + 'bc1qzghz50r66hlp4wufyy55m5a3jjl5grkmetygsg', + 'bc1qyatvzh0ndg464ph7txwjw6kgkczw8kw03lcgg7', + 'bc1qy8054ua06akklh6avf06crt4u2hu4skasr5ead', + 'bc1qy7uquly0ha78lmn47hedd7e0swkmwpyft9j7e2', + 'bc1qzy4lg8yg6dsn0dppx3a4kq8tqe2hhrh6af3778', + 'bc1qzkqzmlj47z0ww253xu2egewcw4wagz6qfa6fr8' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/latoken.js b/projects/helper/bitcoin-book/latoken.js new file mode 100644 index 000000000000..220be747b8b8 --- /dev/null +++ b/projects/helper/bitcoin-book/latoken.js @@ -0,0 +1,5 @@ +module.exports = [ + "bc1q48amr6l7dvacdppgucvnswwuyleaqh4dus8z8h", + "bc1q2cgh9nxn7cqmqhk4hc5fu6mju8nzy9a20qqqh8", //cold + "bc1qw5fc9ml9vm4xq5c6xkcdu3vtwyw4gdn8lw0uwq" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/lorenzo-enzoBTC.js b/projects/helper/bitcoin-book/lorenzo-enzoBTC.js new file mode 100644 index 000000000000..bb7e56d6cbc9 --- /dev/null +++ b/projects/helper/bitcoin-book/lorenzo-enzoBTC.js @@ -0,0 +1,4 @@ +module.exports = [ + 'bc1qndzgrwj3y2lhcklme4t72jxq3df2h05vjdgzpp', + '19wFRSr3GYHmVQtnmbkx7Wkjw3jZdyYB9a' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/lorenzo.js b/projects/helper/bitcoin-book/lorenzo.js new file mode 100644 index 000000000000..13ccded61ae1 --- /dev/null +++ b/projects/helper/bitcoin-book/lorenzo.js @@ -0,0 +1,32 @@ +module.exports = [ + "bc1qaf6laj9m7jteztyz4lulrtcjtpusfcfnd7r7xn", + "bc1qf6cj2z2e2mzuvfrl80vgt53k7jc2vf36ckahgy", + "bc1q5hc68n6krnzgzswf7rknha2aqxzrzup4vlhce8", + "bc1qpxpmr3zdjulqnwa3jdvm83tpaek6dv3kc75ms7", + "bc1qaml9d9mqgfhsfuaa2ymutdl4psj8c2undx9n72", + "bc1qutgngqyrflxrfmk9k28ucvq0s2v8a43nwfwv02", + "bc1qrx3fpr5j6sprxett45c2kl9p4pajyxep0mapfd", + "bc1q00t2ntm46c2nfvcer6ukj6npaxjurujthse4qq", + "bc1q3pzhncle68gct6me08kn5kf9awkevt6ettwrmg", + "bc1qw6cvwx8ajprmp2lzkhrsps2qx4k9r2pj4xj98x", + + //btc script-address after lorenzo stake to babylon + //cap 1, Delegate to Lorenzo FP(db9160428e401753dc1a9952ffd4fa3386c7609cf8411d2b6d79c42323ca9923) + "bc1pjy5mq7vlqkq6nldxghauq0sqgh3hjdrp2adl7tcalkavt9ly5g8q3zkymk", + "bc1pck8hnfa76k9gqtddyjvt0syzlxj5atfr5g0dk0ktmdr9u9h2gnesge0f5v", + + //cap2, Delegate to Lorenzo FP(db9160428e401753dc1a9952ffd4fa3386c7609cf8411d2b6d79c42323ca9923) + "bc1pf2x7w0wwutvj5qznrxygpv5wcj3nvzq9dqhpmkyfk84nkg778q0qa605e8", + "bc1pstunan5nv657dqx32tdup3y8uxq6eja6z3d4kukspjpq23gxf4zqdce4hn", + + //cap2, Delegate to BSquaredNetwork FP(2f8ec74d558fe7a97d10be230bf1485db9be675228abfbf957ba050c714b679a) + "bc1py54xje6lxdd8ej9hqxdxnp5dyjwu2eda2rxa2yuaptv3lrw3t2tscly6y7", + "bc1pydkry09hpqqv4hxrrlrgpddky4u39xrpqd0xvsf9smjpd65s49qqnq5zel", + + //cap2, Delegate to ChainUp FP(31287a9728f7b11863b9c56fc4cca103f0473dcgitdc6746ed7f79050d3adff644b) + "bc1p6dltgypr57fc648txjj7zwk6k605ca9x2ul0pycld22x86jcvxmsg7547j", + "bc1pw8za3k5upa565n0kv55e89a8l0hkzpnfenj767j0cwfu7rn83yhqvuehcd", + + //cap2, Delegate to Lombard FP(609b4b8e27e214fd830e69a83a8270a03f7af356f64dde433a7e4b81b2399806) + "bc1pa56692v3hxguvu8vgu5d7dh9twlj7wm87qvzvxdru3rnluv8nmdqk58ewz" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/maskex.js b/projects/helper/bitcoin-book/maskex.js new file mode 100644 index 000000000000..22f1111072f5 --- /dev/null +++ b/projects/helper/bitcoin-book/maskex.js @@ -0,0 +1,4 @@ +module.exports = [ + // this wallet was collected from https://blog.maskex.com/news/announcements/embracing-transparency-maskex-reveals-wallet-addresses + "39DUz1NCkLu25GczWiAjjgZBu4mUjKbdNA" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/mento.js b/projects/helper/bitcoin-book/mento.js new file mode 100644 index 000000000000..2a3f5957985d --- /dev/null +++ b/projects/helper/bitcoin-book/mento.js @@ -0,0 +1,4 @@ +module.exports = [ + '38EPdP4SPshc5CiUCzKcLP9v7Vqo5u1HBL', + '3KWX93e2zPPQ2eWCsUwPAB6VhAKKPLACou' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/merlin.js b/projects/helper/bitcoin-book/merlin.js new file mode 100644 index 000000000000..ce4d8c18511b --- /dev/null +++ b/projects/helper/bitcoin-book/merlin.js @@ -0,0 +1,28 @@ +module.exports = [ + "bc1qtu66zfqxj6pam6e0zunwnggh87f5pjr7vdr5cd", + "15zVuow5e9Zwj4nTrxSH3Rvupk32wiKEsr", + "bc1q4gfsheqz7ll2wdgfwjh2l5hhr45ytc4ekgxaex", + "bc1qua5y9yhknpysslxypd4dahagj9jamf90x4v90x", + "bc1qm64dsdz853ntzwleqsrdt5p53w75zfrtnmyzcx", + "1EEU18ZvWrbMxdXEuqdii6goDKbAbaXiA1", + "bc1qptgujmlkez7e6744yctzjgztu0st372mxs6702", + "16LDby5cWxzQqTFJrA1DDmbwABumCQHteG", + "bc1qq3c6kehun66sdek3q0wmu540n3vg0hgrekkjce", + "124SzTv3bBXZVPz2Li9ADs9oz4zCfT3VmM", + "bc1qyqt9zs42qmyf373k7yvy0t3askxd927v304xlv", + "bc1qgxdqf7837dxe8xkhvctgc499kwh5xw7ap3uwhs", // add on 25/02/2024 + "bc1pruhkl5exjt0z824cafauf750f5g08azuvgcjctv0enz5csayaj7ss3j5wc", // add on 25/02/2024 + "bc1q97vmervc8x9hzr4z4yvzn3x4rk74se6e8x8sgy", // add on 25/02/2024 + "bc1q2lzqzjcq472x8v0kgdcn4m5y8cq95ysnxm6vemu0qsuqgzyge06sqmqdal", // add on 25/02/2024 + "bc1qcmj5lkumeycyn35lxc3yr32k3fzue87yrjrna6", //nft_vault_address; + "bc1qq76dy32nnk5sha36etg6pdj94vl5zrskavux2f", // add on 12/05/2024 + "36n825H7orW1u8yWmvR4zs2CWfmkY2rkpK", // add on 12/05/2024 + "bc1p35l88j3ashhktg75tjctt6pacrgpyr93ldt7yw484dm4expq073qk4n0a0", // add on 12/05/2024 + "bc1pahkqca39mfcfay7nueczyhn9v8wq96x7mp4pjxpsdpsnurxzuwuqnhsdg3", // this wallet was provide by merlin team chain on the 14/08/2024 + "1A7oMBdQir24ESgk8LDccM4MUKJx6d2mCw", // this wallet was provide by merlin team chain on the 14/08/2024 + "bc1q0hgd38zjp2v2rahqverkmdaak4vc8fynyatqet", + "3BN9ECDCAjgxaQUmJCBCM7JtJZaCeB6rL6", + "17z6W1Eq1A7hWcWQiDxUcFTZBVCMsYrLye", + "1McbLy27nLVzJ4ubMnFm3jxnQ3nbq2mpr2", + "17vH7EX655n5L4iPAfVXPn3rVzZbrgKYBC" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/mexc-cex.js b/projects/helper/bitcoin-book/mexc-cex.js new file mode 100644 index 000000000000..0200d05ca56c --- /dev/null +++ b/projects/helper/bitcoin-book/mexc-cex.js @@ -0,0 +1,3 @@ +module.exports = [ + "13uZyaPbt4rTwYQ8xWFySVUzWH3pk2P5c7" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/mt-gox-entities.js b/projects/helper/bitcoin-book/mt-gox-entities.js new file mode 100644 index 000000000000..862186f08086 --- /dev/null +++ b/projects/helper/bitcoin-book/mt-gox-entities.js @@ -0,0 +1,7 @@ +module.exports = [ + // https://www.reddit.com/r/CryptoCurrency/comments/li1fw7/btc_silkroad_stash_seized_nov_2020_by_the_feds/ + "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", + 'bc1qmxjefnuy06v345v6vhwpwt05dztztmx4g3y7wp', + 'bc1qf2yvj48mzkj7uf8lc2a9sa7w983qe256l5c8fs', + 'bc1qe7nk2nlnjewghgw4sgm0r89zkjzsurda7z4rdg' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/mt-gox.js b/projects/helper/bitcoin-book/mt-gox.js new file mode 100644 index 000000000000..a0581b199974 --- /dev/null +++ b/projects/helper/bitcoin-book/mt-gox.js @@ -0,0 +1,81 @@ +module.exports = [ + "17Tf4bVQaCzwWrDWGRPC97RLCHnU4LY8Qr", + "1BzK87zuqidZn489Wb2oLSktrjKrX7TLKe", + "1Drshi4RAuvxk4T6Bkq959ZvLbvy7b1wvD", + "1EiiKCCnFgHjEvPZdu29qqgdBm8zTvpU3U", + "14p4w3TRCd6NMRSnzTmgdvQhNnbrAmzXmy", + "12KkeeRkiNS13GMbg7zos9KRn9ggvZtZgx", + "12T4oSNd4t9ty9fodgNd47TWhK35pAxDYN", + "15kNZcrhxeFZgVVLK2Yjzd69tRidbFdJEZ", + "1LS5EFRRMDgMQusW6zokQUHjzNUfy6HHCQ", + "1FrV9hv1AW34BGJvobJatyzUWYDWB9epRW", + "1HdKXsNQtzDcfB6PGM7DWTgX9vhBWsz1ak", + "1Fu4YgM3Y9CxvioGPqkSzkydAC8MVaPN1D", + "1G23Uzwj55k2A9TRwaTknqGav66oDTkWCu", + "1GkZQcDy8V6pmHFZqUBUBCnN9dc2hoWasD", + "1Hm6XDmhKCHz68wDEYTapN9MEanke8iwUk", + "15SeCwVCFx5cWyrcdD1Zp1D1zxjH2SELPg", + "15U4VsmWG1cdXAtizvQsW4r7iMxzp64Tgu", + "16jZZkMYqjUWUtQ9DfDvHdH5ko5BcnH9XQ", + "16w6sZBDP58yyeyZAcvnxcEGJpwR9amM6g", + "19Cr4zXpKw43xLJhFZW9iv4DDNtQk2TDeB", + "1GyDutntMuYyA2vQGW5HFcKLfx4cbDdbJq", + "17etv2L3nhk6SCcWSNW4eoZkBy84izAm17", + "18ok25NTkdrUzdByFJCNVsqVYkujZ8aP45", + "199Yxz2TJGtND3QKsHTptTJivqSaUZBvku", + "1AZu7TQmKBAes2duNDctYwjAB9nhHczUnA", + "17KcBp8g76Ue8pywgjta4q8Ds6wK4bEKp7", + "1LLc8aA9C9LLULGbYCYSFKXgxKP2DXdCqP", + "1CZsoJfkknbnW5fKrt1oR7N1ALE5WmDGP1", + "1DedUxzgwErg4ipNi988wPgLk5thwciKcc", + "1H4K3dGfNbAN4AUfyUrpkGpjrd83sntDpV", + "13sXfpp2V16nnxYvW9FHHoBdMa3k98uJw8", + "13Wv5hGhubAWgSPWtXYh6s1s7HX2N1psYg", + "14mP6caC5dFhHdVAPCjPKM8Nm36MBDR5pM", + "155FsTtEFq4eGCcBxDseuwLKPbmtWbyHJR", + "156HpsWfgkWYLT63uhTAGUSUF3ZMnB9WWj", + "15QcKCa84ZCHxbsqXDoKhi5XbmQB8jPEAd", + "1EK8vW7UYaYHKiW4TZmYJKtwcZLM14VjvP", + "1Hb8DmmvvtTYv5RBLuGtDxznkZwVpd5Vjy", + "1HuPVqz2xvf1rdNFUqd62vRTyxP3jeX9Ch", + "13xGCc4TPSYY9GYxBGVNox82KxyjkFnxMX", + "13ahgw8sM95EDbugT3tdb8TYoMU46Uw7PX", + "1439q4Na8v88kPBqoyg8F4ueL9SYr8ANWj", + "13dXFMyG22EsUsvaWhCqUo7SXuX7rBPog6", + "14USZ558Rr28AZwdJQyciSQkN4JT1cEoj2", + "1FhRuUkk8Bfx8FJDemtxhKAR4F8GCNKrXG", + "1Mm9brripN4RPTzkGnRrbt5uDWdqbfk2iX", + "1LueUjEuBgc7cQhsWT8zAfTjcWmrNBZXaR", + "1LXi3x7hyt17cxncscGE887WCrC6XDNZ4P", + "19KiFrafXEyJCUDYFEv3B6tBUwyfFo7kNU", + "18YDgRhxsomuBZ1g9d8Y1JuRmxDhF8Bvff", + "18hcZVFPqDNAovJmb9vA6hEJrDz6uWXNGh", + "1BDZBTb4KE5oq6wAgA6EvAe3uCFRrAbPao", + "195HvmjXgoF3M5vFaBC8swZPhwrE7VhxRD", + "18KDS3q6a4YV9Nn8jcyMvNoVPfcrfemeag", + "19c8sUa54yQuRTVDfJa3iDkkCaFkzBJLPB", + "1B6kJM75iu5ty1HAHMMz6tT1HhjoGNTCa9", + "18M1Z337NqLtK9V69bssnQUYsvb7hmfSFS", + "19eihBKk6e5YD2QXAe4SVUsxRLLnTDKsfv", + "1C5aU4Xnpd3txbxehk46UZgiuNB8QdpHCH", + "1BXyJc6BVuTFnHQCcjiWX2xmCPNVfaSZeb", + "1Ar6meJQCkNoC9wnPcyRNNpzX5fBDaGcKd", + "1CRjKZJu8LvTutnSKq4zTJ4yiqrzMAArYW", + "1HweN9p41BY2RBunsPqyVuheEq7gVoxA9u", + "1HX4s3JeFU3x1eQgPNQVAdx6FoCtbb1hr8", + "1HzEPuenagLEWj68igDXBBXrzc293RuR5V", + "1JtgU6Uo1RAt5eiMf34EehyatUezBQP36C", + "1JVmoJT3471FjsX5H4hAeR1RyrDgpkHbpm", + "1JVU43LNKXqa9W5fCh8tppxDDEWgfeNg46", + "1JztCg7eKSkb1vi7NzGJynXpLZmoaFtYud", + "1KFDUSZuapMv7YaDmL6cyrHTQhma1MtFYs", + "1MkyfwJf7uhWTmVGGQXfcT5ip31DoHMxsz", + "1LzwbLgdKd4eFLkpRdeajkH1YJkVCip2zj", + "1MPJJzRaT8vLhowNB4dVyWRxxu79dq7WkB", + "1MvpYtqgBH7CXbTutrSVCTNHPzm9vakuRy", + "1N5X4kcZ56uRh24XrZoztS9Vb8G7j1Joop", + "1Pq7hooZbEAz5y3QMnqFY8C5xqTdrjUwcA", + "1PRXQEoL8vzEzoJJ9hbtAP6NaV2daccAUn", + "1PxGTuJzDx1ceFHx4Z5CHaWuhiPBNovmZD", + "1NA3Tj4b1jtx9eGELe31Jw4DrzTqKP3ayH" //https://www.cryptoground.com/mtgox-cold-wallet-monitor/ +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/multibit.js b/projects/helper/bitcoin-book/multibit.js new file mode 100644 index 000000000000..d9c9bf3c7a26 --- /dev/null +++ b/projects/helper/bitcoin-book/multibit.js @@ -0,0 +1,5 @@ +module.exports = [ + 'bc1p6r6hx759e3ulvggvd9x3df0rqh27jz59nvfjd2fzmh3wqyt6walq82u38z', // hot wallet + 'bc1pyyms2ssr0hagy5j50r5n689e6ye0626v3c98j5fw0jk6tz3vrgts7nt56g', // cold wallet + 'bc1qmcrpqanjnrw58y0fvq08fqchgxv5aylctew7vxlkalfns3rpedxsx4hxpu', // cold wallet +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/nbx.js b/projects/helper/bitcoin-book/nbx.js new file mode 100644 index 000000000000..b8d0715362a7 --- /dev/null +++ b/projects/helper/bitcoin-book/nbx.js @@ -0,0 +1,4 @@ +module.exports = [ + 'bc1qd79ypayqr03lmvcqc40udn6yuq4mve34ychy6a', + 'bc1qgxrcuzn62qjk3e3echysa9srg87la26x0qn2sa', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/nonkyc.js b/projects/helper/bitcoin-book/nonkyc.js new file mode 100644 index 000000000000..efdc101acd18 --- /dev/null +++ b/projects/helper/bitcoin-book/nonkyc.js @@ -0,0 +1,3 @@ +module.exports = [ + // "bc1qy8xx8fcsmdlc447ls4wzw2tn3y6c6cy64wckhz" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/obelisk.js b/projects/helper/bitcoin-book/obelisk.js new file mode 100644 index 000000000000..9931c8410b39 --- /dev/null +++ b/projects/helper/bitcoin-book/obelisk.js @@ -0,0 +1,7 @@ +module.exports = [ + 'bc1p0tr3dgulgpx43dkktjxy8z2azz6yvx4j7s0lelj67tlwct0wnqtqeakfer', + '14ejzLtUSMsjZE8Pp2LUhX3Pf7BbXPeZyP', + 'bc1q0hapsvdtqfeyw9fjacey9350k8zu552p0khyhj', + 'bc1pr6pga0d44xm3t8z36qnya6sfznsm8fwkn507x6gqt86xtnvm4h4sj2zqus', + 'bc1qy4pkldj4dqxtqypz6awwj7y8vahkht8uqhdlw3' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/okcoin.js b/projects/helper/bitcoin-book/okcoin.js new file mode 100644 index 000000000000..41c3c4daa9e6 --- /dev/null +++ b/projects/helper/bitcoin-book/okcoin.js @@ -0,0 +1,4 @@ +module.exports = [ + // we only added wallets with more than 0.1 BTC + "bc1q2s3rjwvam9dt2ftt4sqxqjf3twav0gdx0k0q2etxflx38c3x8tnssdmnjq", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/okex.js b/projects/helper/bitcoin-book/okex.js new file mode 100644 index 000000000000..359fcec6d0e3 --- /dev/null +++ b/projects/helper/bitcoin-book/okex.js @@ -0,0 +1,186 @@ +module.exports = [ + '1LnoZawVFFQihU8d8ntxLMpYheZUfyeVAK', + '1JQULE6yHr9UaitLr4wahTwJN7DaMX7W1Z', + '1DcT5Wij5tfb3oVViF8mA8p4WrG98ahZPT', + '1CY7fykRLWXeSbKB885Kr4KjQxmDdvW923', + 'bc1quhruqrghgcca950rvhtrg7cpd7u8k6svpzgzmrjy8xyukacl5lkq0r8l2d', + '16rF2zwSJ9goQ9fZfYoti5LsUqqegb5RnA', + '1FY6RL8Ju9b6CGsHTK68yYEcnzUasufyCe', + '1MbNM3jwxMjRzeA9xyHbMyePN68MY4Jxb', + '1Lj2mCPJYbbC2X6oYwV6sXnE8CZ4heK5UD', + '178E8tYZ5WJ6PpADdpmmZd67Se7uPhJCLX', + '1BsdDaJtgFZrLfzEXvh6cD4VhtHHSHhMea', + '14kHu26yWkVD8qAnBfcFXHXxgquNoSpKum', + '1AumBaQDRaCC3cKKQVRHeyvoSPWNdDzsKP', + '1DnHx95d2t5URq2SYvVk6kxGryvTEbTnTs', + '13rCGm4Z3PDeYwo5a7GTT4jFYnRFBZbKr1', + '15Exz1BAVan4Eweagy1rcPJnfyc6KJ4GvL', + '18QUDxjDZAqAJorr4jkSEWHUDGLBF9uRCc', + '1M6E6vPaYsuCb34mDNS2aepu2aJyL6xBG4', + '1CE8chGD6Nu8qjcDF2uR1wMKyoWb8Kyxwz', + '1FTgXfXZRxMQcKSNeuFvWYVPsNgurTJ7BZ', + '13jTtHxBPFwZkaCdm6BwJMMJkqvTpBZccw', + '1FfgXrQUjX5nQ4zsiLBWjvFwW61jQHCqn', + '1DVTB9YKi4KNjyEbAHPp17T8R1Pp17nSmA', + '162z6mSSHzfTqb2Sn3NUk5r1Y2oGoCMCoM', + '3KbDzhb8B5pUU7Wk1y26J8D4cxYLmxJsca', + '3A8tCFwWyHQey1npTAWYTtrjLPKLXpSpLd', + '33a278YeJBRvQuemSo6yeugafqdS4x98TM', + 'bc1qc3g2dx3fn9s27v92n555r2tzhkxhad2wc0wm0ahlgpmhsr325mpssz80s6', + '3ABQAsnVgK8gDCBtWeEuoRvG3zdgABrDHQ', + '3AWGaggM87Nnhit5DwYYfXyvzW1NYutCw2', + '3QLVSDvh1r9u28PDWUDyg3nR7HqxrUZ4jA', + '3QFtYbR22en2AizTb7JVFA9bL2rf1fbNJr', + 'bc1qrp6msfnqxrl2gp4phmq6mcz995xc6m8n6fn8nygjfg8p63ncy4gsp3xn0e', + '31qq3eDdNyvyoDGrNYAAN5GU2BagDNANFf', + '3BdEq8vnX1o1J4Zpwj6wkPh5FxrgxLAibr', + '3AVMfb3vJi9CbQEGyoHmpgptgbJioyKykQ', + '3MYUxfT4mx8imVz7R8bVs71NisrYnmjUbT', + '3FS1EFCqZM7KEhsVoiNu7NC8658Kq4oCiY', + '3BiWZUFxpjJN6W93Fz3aCcCPBTrpYWwyoS', + '3NiufwUuJZnUHmgSopESaeLBJkALzJMcgk', + '3JcWcMPtxGaCuhKeucTMe1V865t7UhrNnT', + 'bc1qh0w73elagqvhfkkulrah0s2epdp922d3e6r8w43uz0e8ujafcjeqcz8lwa', + '3MWakirPr7MnizUAtWuDJmt919PZciSBvi', + '3LEV2xDk8D7uy4PVEGFZUm9fcT6XvCvHen', + '3FR7ZCHv26jaWWzv7EBPAXGgBpFuVFUnH3', + '38X48VjATu2AHowPzHefNqVvKyheGzVv8k', + '3AgGgHDcqd9sxYiagskZH3EPswwqza1TXd', + '3CGKuMZrkQQd4zj8FsTmDhineKACFpQBZX', + '32hhwGNtGTZ4J1LLz7p6o55Kxm7mzgREJ4', + '3E9GBso3ipQb2fbT3PNbeqgj8RkgJcR4X5', + '34MdsKf8zE6NeAy98TS1yxUTEoBkDT2ZwZ', + '3J7F1pczapCk1sRef6Hmvh9NfU6QiV3w55', + 'bc1qdk55vq5vrzt44pn93t9e3rwecw2dy4pcwc5gwugdjm3sh9xuqu3qzcwt4h', + '3PDMVx1YRhySaPEtCV2AT1aEq9DwgPU4uq', + '33j5fuJc14aff3Z6vHZBxaHEKMdNmKbRxQ', + 'bc1qvg6drx4rdcv85pteka94eskh740wrtgulg3tp7gcmm43vgund4sss4vzyq', + '3QUyiuBQF46KAMM7wdnDnu8GKVQYieRQ1N', + '35D2tNKFmqiVrvXan6tdxgatZoCBimASmZ', + '35Wvz1krBwzgQ7REXS7iJp3Qz7k3rmFNNF', + '3LMYZ3jPoKW2jscuT8fj8Nh4d66W3uX8us', + 'bc1q37nz0uheu4997ufs84efw7jw248mk9v83sgpmvsr6nawhaadx5lq2hclpt', + '3Mkfqxh6BuYCAiKxuvVWKn64N2xvReB3wM', + '3ANAufFoSaVJefhAZ7h9qViqdfJKoCWvbC', + 'bc1qnw79hhts8r84gykqkctyhu3j4gckll9gqxktzqgx5a54m347zf7qxhcyn8', + '3MYrRpUhNWxB8Ydk9gvMou5yZNtXNynxcT', + '3LFcssbNQRmRCCEUSbpDA5yzhsFH5waDoe', + '3NEwT3x6nrab6Wxddwb7jbWY8KYqJkewGA', + '35uFYLvWLQuEo6GxSGHT8JigaoUyqmNJjE', + '3DWvnsbAJJTLufQ4AhQY7LsVQrKoLjEHXQ', + '3PdNS2nqeE6G7cTcVmGjAVjz6HaPcX2FGj', + 'bc1qwkkedj4nzep7dw05s335x6n23520eq955mpcwypftn5q4n9japmqejkxlp', + '3Qae3YK3eKSoM57jpVYjvWkS7E2KnPFHSU', + '34HVDP9RFA9MpopGQ4TutLLVMFhhJFM9AX', + '39ZEaLMDxWi5EWx9cQ2W3ixDP8rWHhz8GY', + '39XwkmkcMAakYG9E564F6RZcp1RSMhUw8X', + '3QpVtFcEdVPTWqZbo8cSZwRgbHMbSEDoeP', + '3PHu7Z1dtRYbeum2SNWFCA4Fmq8r3UeXdQ', + '39AabFsw5ew4QcAC7zpeNkuk58FoZnJkvy', + '3NXxvFdsXK8DPRuGKbhNsvtP5FoL1s6hzF', + '3Jg623UZuqvvFLYbBsqqYiBCAyWUQUDG8k', + '3DgW9QH2GoVVoqwJd3paooAScy2vusEJDu', + 'bc1q8nne4amt4wjdaa0yxuzyw949xjd7fh2w9whh4uvh6haf6c5n2kvswnxk0e', + '38jFY6wBwBpFHtM4L88jF5o155SRVvr2wT', + '3CtTopUBx6QZomCjQDvbW65RtgsWn8g9LS', + '3KPPCAsWf6dxamkMBTeH2svaTVS7xgeL9q', + '3HoEwvrqYRnrizFN7gTg5ouSbV3Tek9pab', + '33yFzhVfaY9phULdN8kBfz2UfyUVZhFHNH', + '3Akts59LQNb7GU3gtHQcxh2r9zDfyUE2FJ', + '3EdYLLYiYpoLt9sEQ9KQQ3LbF56YRoiFPw', + '3GGLdxjaqvaguzTX9z4UTYaCoeu6sUyvNi', + '3M8Xbr9vobCoxMCWwxsS9doTP6HNQvx3op', + '3LcquVjVeDpFn1oJBs6mu2H5cc3EVCcJ2i', + '34Nr2xntQYxtnBARQmzswbuB1hNhnKvkoV', + '373oyKosqPkcYEsF7ipbw13WwDmvoNGgpG', + '34dhaAMB9sCBidT1LpjpbmZjkecsDpGhxH', + '3NRgSpzcsGA5mkjKinjTgBzfBYc9CBGXwW', + '3FMAKm9fEXfNXYtb6qBGaJvG3DRKtvPy5E', + '365S7mJV4MVqBfutYw65KuURCiohnMhzWh', + '3JJ4LULa6VtcVVxZC9tsNN9JM693mcrCeE', + '3CB7RwASFyWfYNCSWrri8crPhfK6yynMQ9', + '3HzYEwURshSeJZJn1ak5ioHKQV5rfZPXY8', + 'bc1qvusjx72vh3qkvw36jdqvl6sdye8ne8hfdaveejprj6xc24mpd8wsrf6w07', + '36U5xAL6FzFetzebPNT1ZQnANEk1TurVJr', + '3LkDsn4LZgYnMqZF2wAXCVs6kc72xpNLLz', + '3Gmt31zvMb52fJRRvLV3Pr3XTeDvVjGHAr', + '3DdCY3f5Ky92nSen5M2M2bzbBLUhMWafG6', + 'bc1qck2mvm6wp8xqxlk98eyl89kgwtmgw02cgqwsjstkg4uerqpqclxq6se9wu', + '3BexyYLsJQuN96qDRsnrU9yACnUSxxjWXx', + 'bc1qt5t0qhww0w7uaczxn9du7yu2l2hgpnen06r42u98du3cs6tqvezqatj38e', + '36PCQLrcXhNG3BZPeaND3zCW7cHgzDVYp3', + '3KGGtqwaQahxaN4GovThCyNdg6THK17Lrv', + '3FLnTqeKpK8CXiEA39b77pCT85sVWJXzN5', + '3AL5dD3jvpDHu8Qn7yZxGdpztWxieKxF4R', + '3G7e21FgygBmWDRMykauLANpuBK8iKqXpJ', + '3Kg2JcNnBczmHSX3udTfrKdqDy1gkrVZak', + '3QJBNEMY6TezfEBXGoc5PUKoLSCcWUd1Y5', + '3QQ8Cotsxbs9qrAyqLKaPjofzvcy5qipCY', + '34SG5K1QrntsigARCZJxNv8NwfSmQxPsDi', + '37Pd5nJZyXwjoGSwKW3ivWfeaW8VSjCey4', + '39J18vgfymGnJ2EYp6fb13rHNKBASbuMtf', + '3JwZq9s3yBhi8FikgYu2RvhjyBAhnSiLgy', + '3H4T7yRpphtyzpDUEiwBTtBa3fBMvHaKUZ', + 'bc1qrysu5ykl5pdlk7d9j0z5rwak5h9rus6cx2udc0s9tqhf5842nqgsdtgtly', + '3JqwqaLxqnDqXuJuKKp41UFSiFR1CuqznP', + '3JqzTCvFxye7nrVWGTBH2CNqZ7bbFppBww', + '3KWKbaAsf5qmbyBHXnVH6YqBgP4ZcNkUsc', + '3FbmQz3WvASHgCQUz3C2JmGdkd1gQFLdC2', + '3FMrfjg6zD3CTXSHLAiRcn3RFyBR8MMFR9', + '3KeFqqpbJawWvAudsi4q8Zx9Lewponyyht', + '32G39DN4kb9Sd6hk8RKySDf1QVFmQeAwtU', + '3BqZtfY5wZk7qHQaQJ4gBmqGLnakH8ybRy', + '3K1WNLse7M28jbowGsZmNaMV9FsM9yW3fE', + '351qZH3E9rwXg5ZDY3tgvsYhkm9CnYV25N', + '321DUXbk9gEEKG72DU2TcADDyfZXkX3fHP', + '3E5jAXsSi5x7oj6GQuM6WQPuVZaXeYd3sU', + '3HEBzhigBkmhVf7kx1KFXif42AqQWr8KH6', + '39smXTQdqD2W767ipLishHV4diSV4xNFxA', + '3GQ4DGB2tfS6YrwfVg9MF7KBRCLWkugLWR', + '3AEKc9AokfB1nBvsdS8LVFJysZSQBJRrny', + '3G3Sis7s9Jjex2Pcaerh17HvSJ19qHNuMg', + '33YfoFAdobotJkMPUqSh2ms9frvRRfRzpu', + '3G38Zn3mvixfamrKJJtsubiEL5gCQAGnSo', + '3KTFyMGHcjWjWE1UqZRM3T4WnHuQt95iRo', + '3JQmpJYkZrVczaNDCyQoLe6JXV3vGFY8ce', + '36EMwG1FHCrp2MLm474CnE9rTQDWFF1uTF', + '392Bq5jWV8NWUTdV59VCqoYviY5KP9q9Ee', + '3G1no1sZwQuNYd5H3m6seWw9oy4E4Yu1pP', + '3K376tvxysV4XDtTTEUF47Xc8LHdjof6kR', + '39ciFiDp9yj1vLSxHh6c13DiVFhcBab7NT', + '3DUGtYyorAm9vhpo3KbMURMiR2CByP6BoM', + '3DeCWk98Wp6bG9apmqCCqTfRc8uVdQ1vyw', + 'bc1qpkgxexfg8ah0j0ffk3ge3d4para29r8ugx02ch7daja3s8u4247qw2d2jq', + '3BnCzXEqQi7VDMfCaGY9zbSySuy5uQUaRp', + '3GkiKw8DBm3nSqjL1mZLJdp4yq6WEkkyoR', + '3LTvYTkSk2jq4a6mPVMadJ9vzv1V6RMDGq', + '34Fg3q75hcnjyCoL5FLPKaDM1bewFCPKsv', + '357DauGAnsbGpMgAApUqTFHCgyE2kXA9SD', + '3K1sq7TwuVEbvyADV2oNz6DYX2EhWSrVxC', + '3LWHs1HvAF362RHUc6MKL4jUPWcTw382pj', + '35oBhEfzDyCMz4KY6j49iu8xjtbHQ9GL7H', + '3CZTmeG25AXcjYurJ59mcFR3BvS4onF61M', + '3C766rkZjRvmvhGmyGeH2x33ciUrZHarvE', + '3DXZB5fAv4ujHv3dfBPnU6qaDR4HDUEuwY', + '3LnMEFH8kYMeZ8d524cj4RgXMVmniHaBSF', + 'bc1q2gp7s58gf75sg5g8v6ah8z90ghk8dqksa62u27gmz850cnaclshsfjvlr0', + '3Ca537VX1HufiVRfKVogWcD85RV3iuFs53', + '3BxyyKih6788xBQKk8aMg1cD3qP1x7Gqgr', + '3LceSbWiDHYvy59BW2swjiEQZkqvaijcsz', + '3MjPfBpz8oDcEJZphpBuiwRnvCAASFsgT1', + '3DdvsQoGp4wtvCAbyNBEZjCoWoWQL6TssG', + '32ZB86r6jT4DkAtnYYSHP99xtcai8LePLP', + '36yNiwCxiEtubUpzBLGPeSBCbubCy9i3QW', + '3GQUyZH3EPoaHFzjWr5peAKSQFNGxxmVw1', + '37wL3HQgir55T4o2Lv4Ygrsgat5W7iPnnd', + '38qt6S3zQKizRnafitwEdz4dTj1fx72dgY', + '3EqD1B8pMgdRE9iPEgUXAzpcyxihW4tbgA', + '3P7a4wgoTDKn8F2g2VB62pHiV22XzJGGbd', + '3FyaksZvXsZxEShwdpNMK7awgDE4kBuKmN', + '36CVsC2nLzvFejTuBXvCFnt3p5QsKaGzwh', + '3BjsuL5pVVWBFSMtoB9cg2d2hsJzJFpo3B', + '34w5Da4HJ54AWTZVo8JrujhV1v8iRZho3e', + '3DuUe32HgxGg8RQ5sFk9drcKRVmwNCAHhV', + '3MoQyLh75Niz1s573waSP8pc95sqQcdJXd', + '3Bvj92ASRnTnqj9kdABSgXJgrBDy6XEgzq', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/phemex.js b/projects/helper/bitcoin-book/phemex.js new file mode 100644 index 000000000000..662e7ca67138 --- /dev/null +++ b/projects/helper/bitcoin-book/phemex.js @@ -0,0 +1,3 @@ +module.exports = [ + "3PiGxVdpMjWSsH8X8BypdwcsmPW5cmE4Ta" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/pionex-cex.js b/projects/helper/bitcoin-book/pionex-cex.js new file mode 100644 index 000000000000..ef591d3c194f --- /dev/null +++ b/projects/helper/bitcoin-book/pionex-cex.js @@ -0,0 +1,19 @@ +module.exports = [ + "1D2Pds2XyiDe7CknDumKkdSECuepGsBCSR", + "bc1qs0jdyydyd4kv7fwqre4suhz33mcuy3838xdsla", + "1JkmFSbqijbrv6JdyVx2hNwyE8nzEy3Cs5", + "bc1qctq0v0vecjxp4de66znkh0dcczkvuqjwwt0za4", + "1KH7cEFwFvKfnx7KjMaQUescVSigz3FMaJ", + "bc1qeplx7cy5xx37m9mtrh9qefeuswansr0c9mvewa", + "1BgvqcFm2cYRg8HCrd4qWnC7iA6tQqoeme", + "bc1qw5lxcrk7l2xsy2wx5mapdz58g29xde4x56le3s", + "1A4Ag6y473avEbjVm5N4HAqiVCE6NxLRCS", + "bc1qvdf8f85dn69csyka5tzjezsl66hdhmmfgwgfzz", + "1PDgKsiQo8hkA5pxYBwS1ooXv9jFNJCFh5", + "bc1q7wufvquhtmmd7eepjdu76lumj6efmfl2p6sgch", + "1CNEXYtt6WYZuMwJF7AjNYr39nxbrUTRoh", + "bc1q0jkkjr2qr4wl3v399algvsjuk8g7vlm3yaqufu", + "17UcdCaVWpmgpuZsKfKdWRUUViAzoQFY3H", + "bc1qguymjgurnywqac3rrplr2nmkl26cf5jyyq3vkv", + "1D9YPYQevtEsk26exBjCY2pKfhDsXTxJEE" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/probit.js b/projects/helper/bitcoin-book/probit.js new file mode 100644 index 000000000000..a68a94a01ad5 --- /dev/null +++ b/projects/helper/bitcoin-book/probit.js @@ -0,0 +1,5 @@ +module.exports = [ + "19EgVpboqNjortWyhJSDAGRvHDtduqiSfr", + "19AtrEvJv7UY75tvWkXMxLUAYibxpZhFfN", + "17PpCEuQUT7xxP1ocfhvFdwQyrB5dG1dQP" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/pstake-btc.js b/projects/helper/bitcoin-book/pstake-btc.js new file mode 100644 index 000000000000..86a053a920e0 --- /dev/null +++ b/projects/helper/bitcoin-book/pstake-btc.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d", "bc1pzq0ve6e7j6jt4ckx8uzdjyddrfda9ew8dxvrjmkxmfnj9yz68zeqgqh9cl", "bc1pjp9pg0d6wcejlg576st4s8d424zx443mdumdhvjcxx5ehnfk4xcqyru7ay", "bc1px92pntcj0wd5076nnymp787a7qczsaauuefgntxngdwvkd584xgsaagem2", "bc1pxhkczd3jq9nq50p2xll99edhxlx5dj6ztgw5pgtzszjtlvg7tl4s8ttf04" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/robinhood.js b/projects/helper/bitcoin-book/robinhood.js new file mode 100644 index 000000000000..784b2493ee52 --- /dev/null +++ b/projects/helper/bitcoin-book/robinhood.js @@ -0,0 +1,5 @@ +module.exports = [ + "bc1qprdf80adfz7aekh5nejjfrp3jksc8r929svpxk", + "bc1qmxcagqze2n4hr5rwflyfu35q90y22raxdgcp4p", + "bc1ql49ydapnjafl5t2cp9zqpjwe6pdgmxy98859v2" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/rosen-bridge.js b/projects/helper/bitcoin-book/rosen-bridge.js new file mode 100644 index 000000000000..064b7f1c73f9 --- /dev/null +++ b/projects/helper/bitcoin-book/rosen-bridge.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1qs0852en99dfctv0egj2qxnmc79mhjgn9ap975t" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/roup.js b/projects/helper/bitcoin-book/roup.js new file mode 100644 index 000000000000..7ebc03299dc9 --- /dev/null +++ b/projects/helper/bitcoin-book/roup.js @@ -0,0 +1,6 @@ +module.exports = [ + 'bc1pv5lu5aklz64sye9f4zmnjkfg8j6s2tllu3fem4cs9t0hcrnz5e7qy0qw6e', + 'bc1p2tncs8egnj8e6qt46np3qla70mfx4telu92v4c9hp3pg8khqp37s9lvmfx', + 'bc1phnxqw4gfq349wm2xcqgqk77544ssqwa6ycuhjh7hdxks4mtjg33qrfenw5', + 'bc1pfsu3ts4equ7rdy63dgt7shkqlu2n5kw8p0z7p7c8lsrh2yqg40fsvz4ev3' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/silkroad-fbifunds-entities.js b/projects/helper/bitcoin-book/silkroad-fbifunds-entities.js new file mode 100644 index 000000000000..862186f08086 --- /dev/null +++ b/projects/helper/bitcoin-book/silkroad-fbifunds-entities.js @@ -0,0 +1,7 @@ +module.exports = [ + // https://www.reddit.com/r/CryptoCurrency/comments/li1fw7/btc_silkroad_stash_seized_nov_2020_by_the_feds/ + "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", + 'bc1qmxjefnuy06v345v6vhwpwt05dztztmx4g3y7wp', + 'bc1qf2yvj48mzkj7uf8lc2a9sa7w983qe256l5c8fs', + 'bc1qe7nk2nlnjewghgw4sgm0r89zkjzsurda7z4rdg' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/silkroad.js b/projects/helper/bitcoin-book/silkroad.js new file mode 100644 index 000000000000..862186f08086 --- /dev/null +++ b/projects/helper/bitcoin-book/silkroad.js @@ -0,0 +1,7 @@ +module.exports = [ + // https://www.reddit.com/r/CryptoCurrency/comments/li1fw7/btc_silkroad_stash_seized_nov_2020_by_the_feds/ + "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", + 'bc1qmxjefnuy06v345v6vhwpwt05dztztmx4g3y7wp', + 'bc1qf2yvj48mzkj7uf8lc2a9sa7w983qe256l5c8fs', + 'bc1qe7nk2nlnjewghgw4sgm0r89zkjzsurda7z4rdg' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/swissborg.js b/projects/helper/bitcoin-book/swissborg.js new file mode 100644 index 000000000000..d9b9a863f467 --- /dev/null +++ b/projects/helper/bitcoin-book/swissborg.js @@ -0,0 +1,8 @@ +module.exports = [ + '18DowXoMUQT5EU8zPTDTrq4hrwmi8ddCcc', + 'bc1qfu6su3qz4tn0et634mv7p090a0cgameq6rdvuc', + 'bc1qutkfwnuq4v0zdkenqt5vyuxlrmsezldzue5znc', + '1Mgs8zLJ7JyngcNRUscayyPHnnYJpJS5x2', + 'bc1qc8ee9860cdnkyej0ag5hf49pcx7uvz89lkwpr9', + '1JgXCkk3gjmgfgjT2vvnjpvqfvNNTFCRpM', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/toobit.js b/projects/helper/bitcoin-book/toobit.js new file mode 100644 index 000000000000..7156f1b2d45d --- /dev/null +++ b/projects/helper/bitcoin-book/toobit.js @@ -0,0 +1,3 @@ +module.exports = [ + "3926KKKCqcLaWpAau73TMo19sNv23s1wji" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/tron-btc.js b/projects/helper/bitcoin-book/tron-btc.js new file mode 100644 index 000000000000..debb9f64836c --- /dev/null +++ b/projects/helper/bitcoin-book/tron-btc.js @@ -0,0 +1,5 @@ +module.exports = [ + // On the 23/10/2024 , defillma receive a PoR from Tron/HTX team with the respective BTC collateral backing BTC on tron chain + "1NBX1UZE3EFPTnYNkDfVhRADvVc8v6pRYu", + "14NEbSYdjumn9h4spMjbp3PdUpeXuM5PBZ" +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/wbtc.js b/projects/helper/bitcoin-book/wbtc.js new file mode 100644 index 000000000000..3fe67c4ea761 --- /dev/null +++ b/projects/helper/bitcoin-book/wbtc.js @@ -0,0 +1,341 @@ + module.exports = [ + // WALLETS FROM HERE https://wbtc.network/dashboard/audit + "31oMgrBjhbAr1ZZjFUFYfDT1ZYvx3Qp9qL", + "31qyn946XELbPKMaSWhk2SfFN8ikqLJ1GY", + "31rYKY9PysQgRoc6eB9fwJ3e89F5dcvRM4", + "31sADuWnUApAxzXJZTaEziCn9DhZVUajwK", + "31sW8NHLr9MELRdoGPWrEk6wBd1pj2uzkB", + "31x6dwHmXYHqd7YiwvJNPX8ryvDj8Cdht1", + "32Cav9GPxma3wRprn2FtPQ7gxmCZ8ZEmzv", + "32Ks4Rtb1A5NtzexGq6zEeqHta6hoqvCZW", + "32Ver3t9feJgByfNLF8pggtNFPMf22iC3Q", + "32fN3YjNhtAzUjBHfTVFtiPBFPgy1MkBAC", + "32hJnfPp6ZDnmkJ3tosoo6PvEemFr1z1Bd", + "32hPQh4EMBS14BMutrW2WJ4V76yxuXHJdF", + "32iT1QaoQD61rZgCNLccNqAdbnx4HwgvZE", + "32m8wzKabRRF7o6JRXN1srLSA5FzND769o", + '32oLNY3suWAZvYTBeAaFFSk32rJtS8w9i8', + '32okkzumvdoocdjN18SzbnTTNd2omQvvt3', + '337ot6fHGs4NCZwg2cKwShhrYX46g8ACtQ', + '33K5r4QntjmmD4mzSHq3WQJQtf4Dw8jvcZ', + '33PbQFD2eAouKnKVTBvZTFWE2pRzLgJdro', + '33ZA8VjwL2oucQceCP9WLEVunLkLvhaaPb', + '33epzdB4nk3FWHtUpHMQrzTWxiehSti11v', + '33gNdUGQTBT7cUbNx4892keGA2L64ixrfJ', + '33jqiX8NtPd8empn7ibEc2tn25GUx8iUE8', + '33xpP9NhBBmQt3XS1mD2g4pi1FZNuUFVR8', + '343uVxqsriiveWxekC6s3mNaERzsbfke3h', + '34CyVpeNgNNEoBdEoSSH6aTjrUZDavaUtr', + '34MPipmU3suumfX7WxTUTxmLX2uVK1Np8R', + '34MSicAL7qVGkevFPLwyc9KohGzoUSnu3Q', + '34Qg9U75RNPqAmZzF2amJ1XNGQyVek7HkQ', + '34whRPeeSYTPcihybfXmkG2uoShUdT3d2d', + '3573rMHLB3VABY7VaXMWhRoCBVspLGC4xV', + '35AY8sKs3yt3FbZpsmAtgvSXBZtvqqwc8e', + '35HfRwMwqB7sNTwijoG4fGHBmfWMm48aaB', + '35LMppVy98ofPKeUXUk79FUSkVC8yiXHUF', + '35QASqiGmQmHoccRc8pk9EtPVDFZDrFA59', + '35ULMyVnFoYaPaMxwHTRmaGdABpAThM4QR', + '35bXvntqjj5LnEpRVqU9bLcAPtT9crggYj', + '35cv1mcZBJkvkjY2KQSdmbo7Mq7E2yEVZD', + '35dn2Sfsi9qmqZke8SfSVcaggED9uJYQhn', + '35sfxCN1Gz37dq9KkpTfW56W59CK46JMY6', + '36RYMHxKrvNvrFcovZVXEQWC11LLbPE56V', + '36U3VfLRN9kbQQXRGwP5SGUYebSB3MqVnp', + '36ZsF5YgJDW25eZKS6gnZMqW4gr6wv9xp1', + '36h9DtMdqYWTxSg1yys2exZPFQoQXv8QRL', + '36jGhq48YgvjJWtEpqrc57QzXcBJQyCsS7', + '36jYq75ewM9AMTfnKRTwkPBBWwJtGg4CsE', + '36m2gCFRpkikK6AXUQGKLabKmd8PMjwx1Z', + '371SbkDHpTvRuYTwayWsBNsXK93Tj4sDAd', + '37Tgw6PStVEAyfAJT8yEvLAcxkoRYK3hDz', + '37Tob2tV9LRVzJng6Z4YCLyPsmq8n2xMQi', + '37aZoS67WApGWTDsn2rYDsxebhTdZSR1sh', + '37hV1tJYctQLPin7vCSjpDL34PpiiUTyTx', + '37kFT7mcJqgkqKbd66VbgkHSQgnys2V7hp', + '38EovPeRhGniW3cpYLJwptCqJkx9Y1Pg7G', + '38J1ce6tPUgy958VBkGGa2AmFU3LQLJ2Gv', + '38R6URq21qncKbYiiRXPi2MVx8xYRgDtWD', + '38b9cazfu4SxqoahgdiHEMSo1aNDdKquRm', + '38bzm6nhQMFJe71jJw1U7CbgNrVNpkonZF', + '39P2pJ9EmN3qmPAm1TTZPzp6T5LSsJq3eQ', + '39RMkGSQUQjifV2TpgRNYW73JK38xwA3NJ', + '39WQqCosC8ZD4S9XBPHRnnRUeVRvNctnnm', + '39e7mxbeNmRRnjfy1qkphv1TiMcztZ8VuE', + '39mayj82aZdb6UWs9qQAZZrC3VzfxUQP7c', + '39pEDUwFFj28sN5muXrmT5mAbDJSf6qEL2', + '39ydxDT3H6KygeXQn8f1tYXk6BtCTrsutw', + '3A25qkpmhCrYGEZh39wc71u89dSXGCYSvd', + '3A2wJ7LBiR4NhPbJSLNVfzZk6vDeYYPrit', + '3A37hJV9JPWR4UMCXC3QvKSeVGiRwgGtiU', + '3AKea5UYSyMc2oRRdQYhkn57nXWMm5woDz', + '3APCmmVbkpKSmLkTbGUvdPUyfqA4CZ25a4', + '3ARRJS9VNVkMdiESpxq2AGfpZUQRUvdGgd', + '3AdKaaTBFPQgpFen9YERPmrfV7QVvkYQfp', + '3AfJyKGXVBUcaWdyJeWxsasq1dHPw8pRZz', + '3Agd6vor95XcHvf1MPKE69KEpNbZTKD6JF', + '3B9UDWZNPdtL81JLnnPEJoiurcmaGx8DZm', + '3BCWh8prqQDsZDi6Pmvut9HJrhii1Vk7Ak', + '3BCm2gVB29QDFLWt768jjTwKoe1N1QVwSU', + '3BJJ68V6H1CoEx4MWdhqVk2kFpPUNVbs3T', + '3BPbdokvatbZEFJHuVUstG9zeSDLr5RdvL', + '3BTqdvZt5MYYWLAGXt8psAMSAa8Gh2AVPA', + '3CDy1xZavmpd27jV6TZm5teH8U6hrdXRES', + '3CPEGQzA227hHR2jUf66MdgBJ5wPnDdaW9', + '3CQBneh4TJtHGUP4QS3mfJc75NoiGgKwV3', + '3CdzzKFGY7ZahrMCM1tBgoxrgSPUWX4RVY', + '3Cr3vRcZD5q4XbXCVTo8sFCN9Xb7z5isth', + '3CrWGaRncSudU3EZPEhvWqeU2PG1xutr5x', + '3CuoRMhRXvsxdYsNL4kmKDJyAhaDB7SmBn', + '3CxK8MVHuqXW85z4MF7A4FYk8k6jKPFgPW', + '3DDUy5Ze4TaqKFpktAhHcmmffz9KKGtTrb', + '3DJNy9xMcMsNdmdipTgqME3TJCRkv7uS2g', + '3DhbEcm1SuJjTRxZBXxHyceYGm7GdRB2pM', + '3DiJgisVit4pqj4ByKxi5p1qdjGDxpGfR4', + '3ERNo3RAgP8o5jqELPKUEV47ADm4JtvKBd', + '3EedqW1fD4QRFmrPgkZZZvzHRzj9f4xVSX', + '3EmKqHZhXic3TymhuY8NLS7Bdk91erm4V7', + '3Epe1CixppBP9QSQ7DkvsWNKsgifTaxMY2', + '3ErNFK17MbH3GAGfakMwTrKo8uHmBuuVX1', + '3EuEvwodW88xEuwecsLb76x16tLxcUZAxx', + '3FDtvkk7hpZq5GuEJxt3Ps95vjtdDEfJ4T', + '3FFgKaYkEf1M73QtzuY9DGqC7VeM2sAQhT', + '3FHRnMSaGMAaLcoHbA5EVcEuYVxTEZdTyp', + '3FKkCxSZe1c4xZiVyJVBTbvzs9Lj1snqVC', + '3FVsTChmR7WYgfnU3CAmrrD3kqmaRMaJCC', + '3GE2pWumzKXnNMA9PFggsBwyk7NYSJvGGg', + '3GTk9xdRHnPQ61Pm7Jnv2Z8hsXv5FMVyeY', + '3HFrW63zQ58PypYhSYgHB2gij5VirsyRAm', + '3HGSCuXjnfEncUCPQ4GzNrv3BHcmLZFdeT', + '3HHLh4HSK8wj1w3YW9i4Chdnuybgadhpz1', + '3HM8YGKhwwnZKmrUEoGroEgaG3dv8xkVZz', + '3HVCDPPbAqiRwRjXhvu7PSDkLGgEajexuH', + '3HaHcbNmhJKgJ3dtbm2tg8XH87BJkRx7QE', + '3HauLvRoUBueiiLwebk19w6rnUTYJkdwNW', + '3Hdj2n5DEKPGsRd5md85exAXdwnRbomWTy', + '3HpHptRrwK5x9i7uULvk116QhsAnRJfJb8', + '3HziaqLNy8PpyQFLdwr2yxCjwEjRUjN6Eg', + '3J37HnDBzWN1sm65mbD9U5zvKrp2bzhuYJ', + '3JDewabYE785vTmaQe3MuHvUvEZJQTx8HU', + '3JMDjCYxxi5MF3aXRx8Dg13Rign3masTXj', + '3JcNkH5QWYuSfiQYADq4yV2hAYnQ8KC74t', + '3Jj1juATP11jHfBvRiu3BbzdJCNeRskqzJ', + '3JqwUY7pUwEWu2hz6mwzZKSQnvKyRRXCQM', + '3JvmhjuxvLVM8NQzAwwMvzWAK6zDLQ5Aor', + '3K2mpXMDFe7cT1baogitkRGeXqCYeDw6J5', + '3K43ux5cCAxfKgymq5eHnHS1toC9nrERbT', + '3KAGrSyTsKLckBgN7AiAfojbScfjGAHwFz', + '3KT7jvZyvhok3fkZt8Y9w8tcqpyQW5Jg8s', + '3KTeq879YjzhqkAXzZmdapJAVC6qz5qEth', + '3KWe9k7TG2j7xNw8BP9YHXBeHy1knC1xGS', + '3KXKTXR9YxHuhm863nqnSrKznkYtcx7wC7', + '3KeG7RzDwGaTywRfQgPCQaeyMgi7C89eQc', + '3KwPoNu1FxihhyRKjv1VG6C3FPy8vgjyse', + '3Kx4doXvL4UhDrKJqn8FoS5wVU3VeS9ebM', + '3LScoRmRA3kknxF5dLxz6wfw3z4LXRiVyT', + '3LbLR4uiq7RFrWgDKHfdgktAC88qtwY2Li', + '3LrxWneLHwvbNrMKXorkc17wxHqCCpNGkq', + '3MJ4rpTvuiTxYhTppNx7NokNUDZg26ofi1', + '3MLH54DXCtmydRocRZz9pEkfTTGWribBa3', + '3MM2BiaXBACfKUtVsyNr2RDXyNEhunez6v', + "3MPcUSHeWCSxCUsJtTS2L2zZfWLvorNFef", + "3MUJjyx13waUriNPkVnemdoJAiJT6nBmef", + "3MkzCjZjodyaBXz7W8i9NTjduEdykdkd89", + "3MnCLWSq31hetgbVA1Xn1VxVVb31SPeSKa", + '3Muz5dT5EguQgTiXgQ1eqJYNkjjQuSMgsb', + "3MwfxJqsy943oqYhbdKiaBrFSK9xbyiAi9", + "3MzRi499Cbcr4795iRnznfC97EFji23h7n", + "3NW5tDLFceDb1a75QkGampkuuceZ3YPMUX", + "3NfBFZRgKfHVJy7rSTutZyGpa5M2GpRdwu", + "3NmVi1xVYZj5YXU8wcQyoUfcVRCLcYhqqQ", + "3NsC2NXzKum7sVWQLQ3YYB3o9JbTz5FoaV", + "3P4EDeK5fxCLEQzM7iQ7n95DWgG1cXSaqG", + "3PRCCQMdWwjEKy89iVdL8LouknsgygwWpL", + "3PRHbh8ajUXv5wPD11CxFRs1hWBo8vR3zW", + "3PfcB36gDa47YkrbRtzZSwmrKSMsBSrhr6", + "3PkGNCt85M3aNQkBqiT5Psgmz8FjNujEKK", + "3PnoF45bZhJcPKGLf4nQzyQVAEFsxBxQQa", + "3PxV5m54ZwMDheUyFecvRVQHJK7WG1t49V", + "3Py2iN5SEwSCtT5QHkDU1qhbvmdmMZ8cpK", + "3PyK2LYBfYMUXsa8sMhTSHQZ8StQy3Xoz8", + "3QSd3JjJ35VAf5Shv3EPVpGCi5eVMQr6dk", + "3QWaxXXXbobqpWprekwzANeFuNrYXmaNXU", + "3QbVP6bTSXN2tXG66MTKtHtiJ1coKXnrjP", + "3QdyHj1i4y5CywEFWJ5PwoqGzDxGyJGPeb", + "3QjqS6A7uyoCx1vcXQoqtLatubFmsHe1ps", + "3QmVyCw6YnEvt1jXLeF5863uHPLRaKhWs5", + 'bc1q02kjkf8gp628thqdfrm54tay5pjw05w297d6p6ez5andhp9gf0nqjaa2e4', + 'bc1q02py7892mlqafaz9wevclp8ve4dl4z6hy4sqp973sz2u4fvpxnmqnzfc2f', + 'bc1q09z8m23n7w7gtqsxpgwun0zvra9jwzf4z9c48cezq36q3zvmsuyqdmyjkn', + 'bc1q0vac8d7jkyds2ux4jqwu6mu943z8keyxq4twaw8p8md8j8rtj94s9wrrl8', + 'bc1q20yv979atkvtmecs5kj88a0pmf85ht500pmp7p2ztd54tz0u60psj7c702', + 'bc1q26ds9juuyjtsek5czqasrvmptf46xan2hfyx88jqzpz2pzly3p6qrwd6e6', + 'bc1q2az30y4lst2x9wlu77kzzdym8n9qr77n0kqmevs4ahf7dmzw624sck5vm5', + 'bc1q2ssdu5v40zmntqc76kaxw0xf67eathhpg59xczh9vpp2qlf3mdrsgr49s8', + 'bc1q2vlwakkk247pnppptdv3kgxj23yptykyd3ge9vvlk2w8h98v7pysmmknxv', + 'bc1q2wyzh5ex2cr7wcth0zsm7ueycg2rkfw28fy2g6axky6r9su9zcls8qngt2', + 'bc1q32phcv5dhwkw59xljxsz2nw8g4he4ssduw7c6d3d6005skfy9gysa6crgk', + 'bc1q35fxxu53qsmv77cjt6ucdj5wu4r8rae8eakq5j5v8nzgjtcmnpvqp6g3sf', + 'bc1q3aqsr7dsajmslelacclkgmmyhd7t6hkeevpw50f5areathvfmwnq4nwt3y', + 'bc1q3cpmjfcfkh8t47q99y5wgwxzvhsw8lywzgvnvnlrlwe6h8xcqw7qjwf646', + 'bc1q3cpz06gvfatn0rgamwk7lws7c7qyt4napdr6h7fsj54zg2fy9wtsahl7xt', + 'bc1q3eff85qd4rhuu8gvn933fvtzg0ys3y5amchq8wzhhylhqvfh8kxsu4kde7', + 'bc1q3l6qerg2gyzxpuk0mmhswkgedrqcqe3eesyhatwauyv980syulfspttjcs', + 'bc1q3qw5de93m5ukxra5md872kjyl29arplm8c4vrh9jggsxp88kk2zs74u39g', + 'bc1q3uzg46kmqexn04rkhsd74t34225tqv88xp3jglr2hpxxu5ujrwyq9amgrx', + 'bc1q424nhx6tpljt65aren3q5hmsx4dwt22g9574lpjnlvtc309gtkhqdtwcss', + 'bc1q47vlc3v9vfqh2sr8f47ukaws408wcr95r27t26y9qxgc72yzg9hs58yzek', + 'bc1q4agva2hg94cdr7xdeg4e7wekq0vkrqggn4kqruns85e69xtx750s7dc2hy', + 'bc1q4ma898qglhvqsjs725emwtmayr0pwj9nmgguqac44styjpjc04ws8hwp7k', + 'bc1q4nalse7wwqe6sx3slmkyywetlzn3tdud77jesadx02v885qjs74spqtg5w', + 'bc1q4xmshjnx7up2940zld0dls42jnec86drca3ph7cjhtsdlfgq3ycsntpvpw', + 'bc1q5anhs0xpsayee84r5yqazljkfn9k92d6dkjfpyq509sfmsdkhfts2vh8l8', + 'bc1q5d93mqzlntc95687tq2un302rnfa6vnlnche7pdxzuypyl2cewnsqrzxc2', + 'bc1q5nzdfhdjv6dh5r2pgdmtxhvkan8stl2h7zrhth908slszrzu2snqm3ds3q', + 'bc1q5qv0gtcfdumqrf9fjhd82uud7whpsam7j9e2dq3k9jy3mj2rm3aq8yj3u9', + 'bc1q5rxwzkcl9hux2ltuppg5jl4c4ld52l3hk7kq8g6qqnjluk6kq5xqp5dpzd', + 'bc1q68r3tjqwch4q5nyqf03a3n3ugcef75klsmqfa4g72k63npwn59hqj2d6hh', + 'bc1q6aw25ef99245cxc4l9m5nvn5fel6tmrze3nfxtstv08yf5jkdvfs5rrajc', + 'bc1q6xdt8tmlp5p6exvsmuf62yswm4vnk0rmm950sdhlqgyxluahv3qqquz3uh', + 'bc1q6z0cm8gzhxz87e5xdlvkpnldj9zspustx7hedll73zg4n0hqemhsrm4d8l', + 'bc1q7awsmqawsstwlxtt48lt6y2hv2qjsju85jgz07yr4hhdcu5df0sqwxc63z', + 'bc1q7h0eyvjp58p5wz563p04lhjt2nef9q089mcdchr9jzz74lq5wzusqckmj2', + 'bc1q7trechgv0g6kgwdcu3wsxkqn9lrc6edzdgvdvpt9a9rg04l7gtvs26hps3', + 'bc1q866pgqwgxvuqvqmkmcfh8n52dtgz3fv3nh5cq3mufqv0ssz8q93qc2eadh', + 'bc1q86aapgzcr7078499tlhp4aatylujug9d2rxwccaekmjgv8j6f93qljjhx6', + 'bc1q89mxkg0dhr3m6vs2gzr3wqccwpzrmnpsldnjc22ztldhqueawtzsq82ydf', + 'bc1q8nr29r27mlkvj0duseshuw5vueywt4640tyrt9jusrk0c9kz2klqg4n66l', + 'bc1q8qlz3znvuq0mk62j0dld5hj3a5uf2y06tcuvtz2x3gffs6gxejnsx2hfk7', + 'bc1q8sw5c5sx3s0r5tujaq6hahnjq88yvrdhepss7qdfaz5evjux6nls63mnuw', + 'bc1q8xamcp8xc3rdh4vqtexgrqfmwlkw0mkruz3gkwaw027erjsrnd0see34cc', + 'bc1q8znctxhsh6knhp07z7ufw8zusucef9vxq7rjrhgf0wecxl7aqcrqz06gmu', + 'bc1q93hcme2prs7upr9zkdakl85jje3leg8g2qf70kstacjuyzy95xkq7h35ft', + 'bc1q99gvfs8e2fsd8zw74wdg4fmfg46n2uf5pjlpt87h93qar044rspsxwck6k', + 'bc1q9eammdvuqyhswd3wqp84d56ah0hyuus62smarhsdw3l3rycjgrhqsskvuq', + 'bc1q9j8l760q75cep90p9gq6dsj3p9d55ewpwkhcmw8dnzcd7tmfg03sc0vmqh', + 'bc1q9xlm3uydvuu3nn8dan0zqyr7e6p3pjh7gxnw7jyv0tujl44dgt6sedtus3', + 'bc1qagrn5sn73azr85navkf0ukh336qvktfunejkzauu9adsuvfvpklq6qut3m', + 'bc1qasluf865jx838k9nad2r2rnp04w3txqtyu7kapuxrv0m7rv90sxqhvjxuv', + 'bc1qc342v9mt8j354pjyaqkweu9nrztcj6cc8udgyezk7dxhjddjcn8q7w9fuc', + 'bc1qc46r9xy82z23s6q9lglhzf60fdxxq5y26x34kdx7dx8549mdtu4slym95w', + 'bc1qcd7jv45swrxgwlj55gfnlxf3tvsm4ek0yer4xac5a909jtxzrgvqyv5v0p', + 'bc1qd7dd9qc0pehqx5a2arlpmlgh30xpfufx9hpf2kfrnpqz2x7jl0xqpmcru6', + 'bc1qd8wk5eesxtynkrjx42temma0spfy0955tr5e5lp267aqhalvpjwq79l4yh', + 'bc1qdj65qknp4cnvxagp0pqnjl3g7d3s8gzxqzrrlh6gutju0ytdfwmsfeetdt', + 'bc1qdt0gu9n7ykyvyhe4v7cmftugsn5qw59rm4tdxn4f8vxs6s694n8qp9u2az', + 'bc1qe46f05uenszej6hvzmxjw8fxyskc6utv4cueeaa77jjea87vjh7ql8wgd5', + 'bc1qe4we3wxhj4f0wy40ftfxfvawmt4hgkgvtmpnn3lv5wme8yzfrltsckhg9g', + 'bc1qer4qvha5nxz09qn7gt7xntvrz2crnaxrd7ju4nmcjm7r9uerc9xqa9gdxd', + 'bc1qesmtfxs4n4ws86242uqpztseyh7l5tgswd0zce5nggaky44t9c4sfwczj2', + 'bc1qetecvjtaya283z7zk9lftqtv03ajx27ekz6uxjpscpap7crkvgmst355jn', + 'bc1qeuz6l0qusf9pd923v8w086j8umn765a7hqvu4su0dfq90ckym47qhvaux3', + 'bc1qezmmhc5k7ccnc6q7l8dhkg9phcnehysq2y3ahdzzcweph5ang9xs0egasc', + 'bc1qf5p8wp6neu0raugt6t7zhm6vjhy3taf8q7rqwuhgdmdnhvpz2c7s8xtrtx', + 'bc1qfcxzh8ag5pv37qywg8wylherg64k7skz0qm0ghc36x7awrd8xszsfxc4k3', + 'bc1qfenuya7nskcjlyxpg0gttrjap9e5gtncxga0vvl8rekyeup55n0slzlhr8', + 'bc1qfeuww8le80ae7qat3kpzspsh7pa8na3qx9fuc4qpdt3w5q3dkavsc02wk4', + 'bc1qfn70w8peuvvywupd8u667g832necv3w6sqellzvd7aaj8l52nhhsfzs6a4', + 'bc1qfpwewuyg8erj2cejamms0682v7ncgdgufdq8efa0maef3uzunkgsvdwyzm', + 'bc1qfugah0e9fw9ze34dpqf22yxqxnxh49wrcq9d3kuqc9dydfhn4pjsjqfpky', + 'bc1qg0amsvtlglecc6x46rzjprjh7wscjzlgqu6n52zw9nz0cck2r5sqwew946', + 'bc1qg54vzuplejd6ymxlma6q7rfyc9zqqes8wvz4xs09mhpclak9z73sf3x3km', + 'bc1qgs30czhkxhxn5qsunlzac0xeznyaxg267p5t8gjupzg7u97vz4zqyuf60l', + 'bc1qgsgj3dh8dztq05v9dzethjcpjqtptm5tsrruprz4w7awzpfrku8qjjegyc', + 'bc1qgxww03juwr8vfp28tzpmyyku3j6hxrgpl0v6natkk2ucwu4weweskcqvnl', + 'bc1qh4r87gzpcx3lz7faz349yvp8yr6zyr2706m2xzsuwcwlptkqsj6svkaqtf', + 'bc1qhagykgzhhh7yt5knsypklpqsgdelrvw5vz73erujapcgh3x5wxrq8c0y9x', + 'bc1qhgfkccy09hr7hlky0jeyz89afan8qh66wa26t4se4mlqda6298hqrtk5zr', + 'bc1qhkw43w4cvzec3836hqrdmxksm20l35yk7gnvysqprd6gareztfsq4uplfs', + 'bc1qhm46vtwep0awkdphurmc2ku3lfp8l7z9f6wn9va42lc3z24zd2fsvnvzk3', + 'bc1qhpnmnswf8ls2q97vg4qzlr2a6c2xpr46zp59e7q9uh5j59ask2ysld0euq', + 'bc1qj2dz58v8etgq3aud24yrgffk73d9cue80kfswl58d5w4vvhdfsyskxtll5', + 'bc1qj38tl824hkgl7qluy32lklp6qfd9d9zqa9qlyeh28khfh9grxwastu3xnw', + 'bc1qj8vt7h7ufrgqlhhcu22vl3jrvx3kluml57kha352k9fex23jphvsuwme6r', + 'bc1qjgua88vymvkctq9t4mcd4q4mlqnr3r07lylp90f7epc9p6qcv6asteyjec', + 'bc1qjpgs63vqgfkalm8janwmelw4mr4wg50axnmx5ueh4ru2xnl3lg7q80yl32', + 'bc1qk8plwr04uu6mvpcf3wtfmg579ztqn59q7yfx39drl9r97q4wcx2q43rvw3', + 'bc1qk9fhnvv7a0nxzxxj503v7mfy3uwdugymj09ugkrda5895cfxa5vsnzp8l5', + 'bc1qkd53jhtmhwv74x2c8hnnfzspatcjdzk0h3f2czqzrav0yxpd5y4szkslrs', + 'bc1qkn3s4hzjthfmt68sk30m69knjauwphsha2paqzexjjmlfc6h7f3sggfn52', + 'bc1qksptar8mpay2mfwzwep3aqxevnc8jj8d4rd82v3v0hm5p3y93w2q5eufa8', + 'bc1ql26wgacxjhuefzcph2wpsyftqzd07kzkczv60d85hj7280qkrz2qlgrhf7', + 'bc1ql33nnw3ngcf343jtmzpe8ps8809nqe0530rv6neu7cefkz6dtcfqn3wzav', + 'bc1qlg2gcz8hzfdt49jgs0438c7ahg4967nfkflzj3m0r5dz3xz7njrqpxxj2j', + 'bc1qlnz5vejmvv6sdy9k3c7a07nlf6c053g0ren0m8kmmsrx677nyllsg6qr2m', + 'bc1qltg30ayn5wexka07ta2x5dnfjf20rqnemf4sfnsase082yfqetfq0s20hv', + 'bc1qmfjm5hlgjfw3tc6cz77nzjcc5xg5mjhrlm6kqewczapae2yhucrs5c0qvf', + 'bc1qmfwcwfntr2adas7yz5l3wn6pnm8rj55l8fk5vgny34wld6d0vfcsg48tta', + 'bc1qmfwq5cjm55m0kcfemjyv6rj8nfunslfjtuhyqawksw892dhvu6wscem2t5', + 'bc1qmmdfeczme4q99ccpmgfx3zxwwwff9nnjhdux47hucwttrjdpqj9s2x8rds', + 'bc1qmur9p99tzxtrq0232tl6nssyejrmwet3m265xg0cgl7uh2qxsy7q0m8fvu', + 'bc1qn3r3kqf90txgcsdxzu2s0p5avp79axlf98lzrwlmpnmxc3ak0vwsuxrepa', + 'bc1qn8w83eglpp7xdtgyjaysgrve5cjjr2yfhsq2x5xyn6cmvup0uwlsq2t5xl', + 'bc1qnpnpcn4gwssvkjpe27zzfex2t997l7garmc2s8fenmk0fpydek2s6zp9yz', + 'bc1qp24kgu3r5n3q6k03230yj6dzr4styppjlvtr3ptdsd7sxql8pcgqwall05', + 'bc1qp27x9j8damzuxc0x7cqkcaf39q4825aafmx3g6mlvh2wd5tzr8kscsjplw', + 'bc1qp6cmqa7hgdean0z8jl7uf20rzf7wgvstmjlxekft3l2vn22zwl2qhunr3h', + 'bc1qparrejjdyc8hcd7hgljlx53wy7ncrjkaz670w3ef0ade369y22eqkujzy0', + 'bc1qpdthtpfcmju642wq4eqxl4uz5hfgtztvtv7u6wrdepnkdsugueusujpg76', + 'bc1qpp5wu443kdfur2vhzwms8d46gq8c2vgu692sgyn79z56gkq4mkvs07gjkd', + 'bc1qpvvt2md0t7435mc8dmlgd5euyc0636vlw8ew25e8pf83uc68km5qpvqpfx', + 'bc1qpwtgr4rld3wr39r762ngvuk8qgvgkrrxra4jdnmn06z4nfgh4vtsluyd3t', + 'bc1qq3p9mqvegpadextyqzxy46ukf5yxc7ej50ksq3w63f895q0t8rzsfe5jym', + 'bc1qqces3upduq6e0c2w0k6mr9n4tkgvzkggteuatqc4eyxawwkuxzpsfgdxzh', + 'bc1qqjmfwnxrjx0khaxf8qa6ccnz7s94k9wa8lelpdy2fn6jf9ffks8s5r4frd', + 'bc1qqlm6edz9azp0d6y4mjc8j8an4q8du2jajgwj65mmz6nkk53yannqvtnvnn', + 'bc1qqlus6fyt05kewddukpge8u0lszp4ffn49mqnr3pvrh2whptf2fhsy6ynmn', + 'bc1qqvf7qq7wvx6pkp5aqvzdxs0rgqkjgqe7ev63hnppxq05t6v3w5ysskzjs5', + 'bc1qr20qujcyr87y3uk2fgkq93u0jtzl6wa4el90we4txgcwgx6avxzsuj0wcx', + 'bc1qr6cvgewvlts5f9wa8u3cpnlmth0mzn0x96ap34hknpaayuyknrlssqfq3n', + 'bc1qrm7nze8cqyazdlhmw8ffeusxucqtvyw3pvtple0047tdkupdnmustkla3w', + 'bc1qrsayv4jq9uf6rpmwsxan3yqxuqtyelwt7k8298ejl8h9tkrunthspnlm6y', + 'bc1qs0q2svqpeaka6f8jakx74j4rydxdmxq4wz7xfy45m6t8xfxzy0zsckrym5', + 'bc1qs48aaups6tzwcs372yqhakcjakfgf6w6aguj0w7gex75vrnjegmsp5hx8n', + 'bc1qsgthnvghgs9wl87kzhkx9xda4xyu35cxfteupjnvxv3zuvgtdyzs9a23te', + 'bc1qsln2s8xu7sv84wj5sv2pjnfpev8lkcqpzmzukmygcll26vf0kwfs6awzkj', + 'bc1qsp7twu469a8p3enevzwdnjhrcmtmc7ljydqxxp4p69u4ggj9wazqa9gsgw', + 'bc1qsrms3khzhupjxph0u2sy6sz8c9q4g6nqm3dy53nrlagw3lc5zmsstg8pft', + 'bc1qsuzvly8z6kr080at2twdlfs8j87gu08kmwlfstafm2lajdvfclyqtvq00a', + 'bc1qsva32zdzx7cd9996qdlxkpl0dnyk4s44myx53zpetf4u7rfg89fswjzza5', + 'bc1qsw4hj3dvqcvtntvsflx8474f52nt6zer5k9pyem6n6g27p8nc4xsrj5fxc', + 'bc1qszmwz85wktn6k7tg953pugtedmssguaavl8qukv77s5u0g5mx3tsmw6pg4', + 'bc1qt3mw55ccejx97tyjdl9dhe60wvextxddg8udxz9n8q8efwhr37wseag63j', + 'bc1qt4ck5563ra7r3xjqlfqm7au407q2dmc0p6wvgyzy239nyyn4vsesfwwsa2', + 'bc1qteyfers4wvfhp6apw4s720tzvp9xafkvvfh7k0sxmu8vrxvt2m5snw45v8', + 'bc1qu4g30hr7lz3qd9jn68x4f2ycl3s533jdtv96g5n96d40kac5l5tshhkvq5', + 'bc1qu5k2h4y9cynds4j3t5d94xg78zpzhx3elk6w93e28xmxrnn37wuql9xf4t', + 'bc1quljnxvuryumd7c44u7f8dwflas5aghecg8ln029v2s7ffezun86qn0wyng', + 'bc1quryt5u9j5rec96c4h6xxatn74nqcen244q3dtgwtpjkma36vvrmq9mjecg', + 'bc1quxy0mlwssdmzsxgk2ct42p09ef7mc9qwmpdjuzy9f3h3ye2k6jzsvmmrsh', + 'bc1quywrhxx6t7mkqshcll3q99qrqlal73l668wldgrcxpa4yvuj2x3qrhsg9m', + 'bc1quzwyq3wewr74vvgwa6nqfj6n6rsc2tsh046glq0n76x9alcpgmzsf24s6x', + 'bc1qv0u3a7jdaygq680cu52puk4xrrr4ckpjqqgg88x66cmfnrfj5c4sre60e9', + 'bc1qv837fuujjlu50z3l6y48vxkv4vd09vve58t92welmxy9lnu5l2usp6hd0j', + 'bc1qva8lqtdcemj9swc6trk4je45xzckqhs3fthst2hy0k3plywfeq5s639wn0', + 'bc1qvfmnrg59p8a3csj032uyzl3mdtv5y46g3mx33krz5kweyvq78f5swvdmna', + 'bc1qvqaqr0jyxf3nphux7gla78dqa9psfpyy0v8med9t63f0x6n2k40s7knecs', + 'bc1qvtckv82yw4efeu9ez8y37rne5ghzxeqjl3cqnsyxf4gm3zhuhc8swt5u3h', + 'bc1qwdgyle9p2gcvyn22sg2tg6jaqkxewjz5xfj229p989dcteu42adqnau2lw', + 'bc1qwfeq7rehmzm5434vaa485s98788cmyyrac2w65nulvucsg7cueesly7x05', + 'bc1qwfydpavg240d4j87nrg0ayqhfzwrt9revzw7a9dpyxujnlpu2xus07f6ud', + 'bc1qwvrrxxqhc6l9zd8rwj39sl8n39v69tju9sfc59dqxl3fjx8jnfqswzs93f', + 'bc1qwwkwppejx79uszdgfrpaaqc24wepvjy729xhx2zyd3qyf3ftfqrs672m9d', + 'bc1qx8xlxd6qnmqprgjs6yr4nd870tt4d8yuupwq4qhl3hh24ulpmk4qem46px', + 'bc1qxfkxl66ee59xpxr30tcexvh9zgtvf7gwtyauj29n6txj7c7a9e9quhcaaz', + 'bc1qxlj7ls9zptgj779w0gzfvt8chpl29xdcv5qjqdw7g462uf0c90wsvkw74y', + 'bc1qxnxp0qdzx07jw3tskcp79xzs7p6p2wpwx4sn7myrx8vgj42f4prsrlcknw', + 'bc1qxqnj2gdznm37yhdw679nx6rqs44hkd2lddj2gn4uyaa5htmjvmzsyjcu7d', + 'bc1qxtf7mx5scgetaaz30w6ngndq8xctegjacvphz2tgky5r9et0q5uqwyks8t', + 'bc1qxu9s6qy6hld9uvd75em9t550q7ppezsmkheldsyny0pzj9yd7e6sqg3qv6', + 'bc1qy30syv0sqafmkt2m4h6lf9tjeddurh9cypa9p8wras2hfjf4y4uqzdz5sk', + 'bc1qy6tfy7k9cjp40m2lcq2s8wrsn88jdn3ffj5ph7uvwxuamfntaylqk38dwp', + 'bc1qyc4v5dtapyta9mcu5n5t9va72rzd9g75z83qxxm90ne4vzhgleeqf9lcfl', + 'bc1qyd5989kz0jgayxelnz7wlnnk5gyn36v7cecjrkgvph4260aew2rsqzx3ua', + 'bc1qyujyd6q7dtnh76wchgavwgxpklkwm73vqllududlx2uunx28zdhsxnvd47', + 'bc1qyvpmf6uv8xgxrvcwc5w630d4vg2s9ztpd64fe0e9ylxtuy34e4lqnmv3sq', + 'bc1qzck7505r8ahwq9g4xuwr60lpflxv5h75y0jntgasd0t9g7psvmqsr902f8', + 'bc1qzgw25sgrn45909quqlydd9729ksj32mfcvwzl44ekf2kkgctz09qvr779j', + 'bc1qzha6dcp9mq8ne7s3cxgp052qzux3jg25fp7cxpshrz0a0005h3gs30vqpf', + 'bc1qzk7gnzhyqcl9x7f52lckdhlznv94k87gpm3fsafvn487euaymmasz95cwa', + 'bc1qztewvcfe424fxat7s2uautmy5ctnsnurul474e2emexfnlj6upsqem0g8d', +]; \ No newline at end of file diff --git a/projects/helper/bitcoin-book/woo-cex.js b/projects/helper/bitcoin-book/woo-cex.js new file mode 100644 index 000000000000..d633c3db58d2 --- /dev/null +++ b/projects/helper/bitcoin-book/woo-cex.js @@ -0,0 +1,4 @@ +module.exports = [ + 'bc1qh78w4qq9v2dqntjtxne97kp9u2485jdqrfsghh', + 'bc1qm4hycszv0v0qel3swxqyp57nkpnnrda4rc55lm' +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/xlink.js b/projects/helper/bitcoin-book/xlink.js new file mode 100644 index 000000000000..605481c046c3 --- /dev/null +++ b/projects/helper/bitcoin-book/xlink.js @@ -0,0 +1,17 @@ +module.exports = [ + "bc1pylrcm2ym9spaszyrwzhhzc2qf8c3xq65jgmd8udqtd5q73a2fulsztxqyy", + "bc1qh604n2zey83dnlwt4p0m8j4rvetyersm0p6fts", + "31wQsi1uV8h7mL3QvBXQ3gzkH9zXNTp5cF", + "bc1q9hs56nskqsxmgend4w0823lmef33sux6p8rzlp", + "32jbimS6dwSEebMb5RyjGxcmRoZEC5rFrS", + "bc1qlhkfxlzzzcc25z95v7c0v7svlp5exegxn0tf58", + "3MJ8mbu4sNseNeCprG85emwgG9G9SCort7", + "bc1qeph95q50cq6y66elk3zzp48s9eg66g47cptpft", + "bc1qfcwjrdjk3agmg50n4c7t4ew2kjqqxc09qgvu7d", + "1882c4wfo2CzNo4Y4LCqxKGQvz7BsE7nqJ", + "1KGnLjKyqiGSdTNH9s6okFk2t5J7R6CdWt", + "bc1qt2kjf5guf4dvv4mvnswyk8ksaeuh5xyhc5gz64", + "19GTEWTnVgenpDWSdQEAT9LJqMFQ7Yogsu", + "bc1qxmwuugmcnn5k3hz22cxephy2vkevvt2knsd6u4", + "1617Cf4qmjqVyiN5weQRo8sZvQvyDjshKP", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/xlinkLST.js b/projects/helper/bitcoin-book/xlinkLST.js new file mode 100644 index 000000000000..efad41974e45 --- /dev/null +++ b/projects/helper/bitcoin-book/xlinkLST.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1p78mvfa550t7acg6wm9cl9543zf68ulhqkxex5pvhv8wnw4qpl3gqmpjy2s" +]; \ No newline at end of file diff --git a/projects/helper/bitcoin-book/xrgb.js b/projects/helper/bitcoin-book/xrgb.js new file mode 100644 index 000000000000..674626416827 --- /dev/null +++ b/projects/helper/bitcoin-book/xrgb.js @@ -0,0 +1,3 @@ +module.exports = [ + "bc1ptm05s4f6f8j78zhx62lzx0dep07f2597nlgeltmm4sjn5stdu6gq4sxg2w" +] \ No newline at end of file diff --git a/projects/hibt/index.js b/projects/hibt/index.js index d8c8e2d9d7aa..657dae49417f 100644 --- a/projects/hibt/index.js +++ b/projects/hibt/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -7,9 +8,7 @@ const config = { ], }, bitcoin: { - owners: [ - 'bc1qpxntlx09kqvpwl7vmjw9f28yvytdqkdx8xh63w' - ] + owners: bitcoinAddressBook.hibt }, tron: { owners: [ diff --git a/projects/hope-money/index.js b/projects/hope-money/index.js index 19aae3e2e074..4e7fbd7f0a38 100644 --- a/projects/hope-money/index.js +++ b/projects/hope-money/index.js @@ -1,18 +1,11 @@ const { sumTokensExport } = require('../helper/sumTokens') const ADDRESSES = require('../helper/coreAssets.json') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: 'Tokens held in coinbase custody. Reserve info taken from: https://hope.money/gomboc.html', doublecounted: true, - bitcoin: { - tvl: sumTokensExport({ owners: [ - '15PYHP5ZW29B3o19jFNKz6RyRdHCtzJj5H', - '16BLcAyJR8unm8RpQT9PGTwh5uPpZEf2ut', - '3JoCB8ifwhL4YKo9rCYMgVGbqxBqnpQpdS', - '179fgM9yyTHj4ZCTfAcGhUFiQMXuPx5xrF', - '1LaC3Xt8RZWYH1pjcvXxrWxLvXe7iR3ybe' - ]}) - }, + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.hopeMoney }) }, ethereum: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/hotbit/index.js b/projects/hotbit/index.js index 1d37046092c3..a8d828a135fe 100644 --- a/projects/hotbit/index.js +++ b/projects/hotbit/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bsc: { @@ -22,7 +23,7 @@ const config = { ] }, bitcoin: { - owners: ['1MiFZMJkFMhMrubjjo6f5oEhh7XgSwXWgp'] + owners: bitcoinAddressBook.hotbit }, ripple: { owners: ['rJKBidE4Av6ZaFTBcAucZXCpU7QvNXyfpT'] diff --git a/projects/huobi/index.js b/projects/huobi/index.js index 25b5c5e65aa2..5f92f4e4d5a6 100644 --- a/projects/huobi/index.js +++ b/projects/huobi/index.js @@ -2,23 +2,12 @@ const { cexExports } = require("../helper/cex"); const { mergeExports, sliceIntoChunks, sleep } = require("../helper/utils"); const { post, get } = require("../helper/http"); const sdk = require("@defillama/sdk"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + const config = { bitcoin: { - owners: [ - "12qTdZHx6f77aQ74CPCZGSY47VaRwYjVD8", - "143gLvWYUojXaWZRrxquRKpVNTkhmr415B", - // '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', this wallet is backing USDD acording here https://prnt.sc/i3cFaak7H9Y8. For that reason, it should not included as HTX. - //These 3 addresses has 48,555 #Bitcoin. This is only less than 3% of the total high value assets we have, including btc, usd, stablecoins, T-bills.. According to Justin Sun https://twitter.com/justinsuntron/status/1590311559242612743 - "14XKsv8tT6tt8P8mfDQZgNF8wtN5erNu5D", - "1LXzGrDQqKqVBqxfGDUyhC6rTRBN5s8Sbj", - "1HckjUpRGcrrRAtFaaCAUaGjsPx9oYmLaZ", // add on 08/08/2023 (we defillama) - "1L15W6b9vkxV81xW5HDtmMBycrdiettHEL", // add on 08/08/2023 (we defillama) - "14o5ywJJmLPJe8egNo7a5fSdtEgarkus33", // add on 08/08/2023 (we defillama) - "1BuiWj9wPbQwNY97xU53LRPhzqNQccSquM", // add on 08/08/2023 (we defillama) - "1AQLXAB6aXSVbRMjbhSBudLf1kcsbWSEjg", // add on 23/02/2024 (we defillama) - "1ENWYLQZJRAZGtwBmoWrhmTtDUtJ5LseVj", - ], + owners: bitcoinAddressBook.huobi, }, ethereum: { owners: [ diff --git a/projects/imbtc.js b/projects/imbtc.js index 65dbf6ae6dc2..57fffe932e45 100644 --- a/projects/imbtc.js +++ b/projects/imbtc.js @@ -1,10 +1,11 @@ const { sumTokens } = require('./helper/chain/bitcoin') +const { imbtc } = require('./helper/bitcoin-book/index.js') module.exports = { ethereum: { tvl: () => ({}) }, bitcoin: { tvl: () => sumTokens({ - owners: ['3JMjHDTJjKPnrvS7DycPAgYcA6HrHRk8UG', '3GH4EhMi1MG8rxSiAWqfoiUCMLaWPTCxuy'], + owners: imbtc, }) }, methodology: `TVL for imBTC consists of the BTC deposits in custody that were used to mint imBTC`, diff --git a/projects/klever-exchange/index.js b/projects/klever-exchange/index.js index 75626130cf1d..2c6c205e08bd 100644 --- a/projects/klever-exchange/index.js +++ b/projects/klever-exchange/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -18,11 +19,7 @@ const config = { ] }, bitcoin: { - owners: [ - 'bc1qze8pn5vywzk8enqdr9ve28lyas23kurzd37027', - 'bc1qgy5zyuvsw5wnt5lrx3m62tt2pmdl69avd5vw6n', - 'bc1qk4l4u3lh7rrufsw0z6vmkln5kesf0a9q0srnkr' - ] + owners: bitcoinAddressBook.kleverExchange }, } diff --git a/projects/korbit/index.js b/projects/korbit/index.js index ce8fb929e0c1..03fb6da66a2f 100644 --- a/projects/korbit/index.js +++ b/projects/korbit/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -14,29 +15,7 @@ const config = { ], }, bitcoin: { - owners: [ - '1JtAupan5MSPXxSsWFiwA79bY9LD2Ga1je', - '3E8BTrBB7jxAemyUqSnN4YFLMC22cShZJZ', - '3GoBetHTvfnaRNQbR4yy5YNUjX4d8mTQKK', - 'bc1q09j44e0xxxusj3zsan20x7tuvtumxfv9smlq27t0nwp57gxf7htqq6m9lj', - 'bc1q0uffd8egas4w87dxq998ttfl6j3jtw6k7cafce9v4mvr5qc9tvfq9czqk9', - 'bc1q33m8td986p3vcnap9zqpx3d8v8zujtkvqacsya5xfvf945vmvxzqth4h4t', - 'bc1q3yn06lfl8ayjukya52ksff0uaveurfc8lm3ftdgu8ywvwanx8lqswj7w9u', - 'bc1q4sv2fxlp6w08wkq8ywmughxkm7n75d2fmrgnmvwun6rhepyknjxqm99v4x', - 'bc1q7fww9657ts2au45wh0ed39rjze6ja93z0498z4j89pqjky266wzs0sz8ka', - 'bc1q9pnwfyd4jtkulyk4w057wsdjhykaw6fftw06k2cn2m3y7jlsfe2qvxvm8e', - 'bc1qa8may4g0yzezjyesqcq0mwggy5wwzl0yhs0a8tk9ucej5qg6ujfqscv2jq', - 'bc1qgkx4ee8ac3as5y4ddhw6uedyk9adsywdzgc0fzxv304lcrh4qs9sn96agt', - 'bc1qku6z53kuyaj9r898kj6esqnwz7wke82mwgw43vhu33ld7sx3200s2u9p9x', - 'bc1ql0p3klhr2d8z07ja3t5d5dnxrenhp4gcjeszxpfflr08zaqqx5zqpkeqnl', - 'bc1qnerwvz93pcj653r5yd4hnd2d7np2drhdhyruj7qdvl3psc5wnf0q6x9me4', - 'bc1qs9ut74nue7vjknz2eqxegmtuzqhjzx9y8tzjymvlg05v8a5ffr5qz402cx', - 'bc1qsk6h7d2l7e7r2a8krlxjn6wdnhhszyrtzcugdsfa5zz4syajzl5spd52h5', - 'bc1qsmqvkwrsy5xw2hm885l5fv7s2hxzauz5fn9jayfmd86305wehrts2lztgs', - 'bc1qtlen0nuvln3aqcn2r3nljshdmzakq7z5z4rexpk23mj8u8lmc8ysc29jct', - 'bc1qzdt5z4f46jak59jku5jmvv3f2ru20htqs7jhy0whazgd5v4626eq4vkxqz', - 'bc1qzu4lnzfpskwsvnyvzud9a7ru4d2ft7whqvl5d3kskxxhgeupnjjquzvt97', - ] + owners: bitcoinAddressBook.korbit }, ripple: { owners: [ diff --git a/projects/kraken-btc/index.js b/projects/kraken-btc/index.js index 2a28405498ad..fee50c310ceb 100644 --- a/projects/kraken-btc/index.js +++ b/projects/kraken-btc/index.js @@ -1,6 +1,7 @@ const { sumTokensExport } = require('../helper/sumTokens') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') // https://www.kraken.com/kbtc module.exports = { - bitcoin: { tvl: sumTokensExport({ owners: ['bc1qqwf6hexnnswmj6yuhz5xyj20frtp8exv7mclck'] }) } + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.krakenBTC }) } } \ No newline at end of file diff --git a/projects/kraken/index.js b/projects/kraken/index.js index 0379ee4e274f..f690c4eb3087 100644 --- a/projects/kraken/index.js +++ b/projects/kraken/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -21,22 +22,7 @@ const config = { ], }, bitcoin: { - owners: [ - 'bc1qnhmemsqfhycvp6g50v732h7wfwdt68el4ux5ttu8xwsrzngmxv0qr55aga', - 'bc1qa5aux0l2c3l99tpmd9c85770kqpksg3g6dxaw03jj6lphnwy4lqq68xfgc', - 'bc1q3gqqnn9hr0uachfk6rv3qhf3pp9z8a4z63ksc5qu0c2vvtykqd9qj3fyum', - 'bc1qplr053c80nzlqapuatfslyhmns6sfn32qzz3xkdn36jjryw8vsys8y7wlc', - 'bc1qhxv3pg2hsnw3m9jukuc6erjwwd03rzwhd2k6zh5uf6s2lwpuv3rq9zefru', - 'bc1q08n37tm63z3f0myqe6zjx7ymtng8c9qedpwpplq95qkmx0cpke7qyz4y8v', - 'bc1q02cq8du8r7ktuy5l0ltc4cv82xnaw4upaaw8y4rq6uycdp0k5nmquljtzk', - 'bc1qcf9qe8ytx5qlcq0ft4vm2xm3fyfvurrkende46hpmwwnzpctfu3szxpve2', - 'bc1qrj5vg73fxs6h6pmdjld387j5szkswc2y39rfutw8gl93h647wpksukyln9', - 'bc1q9hqaqzyf6zsd330pkvtq5uxcxprzr368zdsxx5srtep7kepx523q2gd0ef', - 'bc1q36l8mssxdlncj7njkqvayv3jumked9jdtjxete66cxnzluf4j0msjm4w80', - 'bc1qs8cyln26t2f5rwu2frnqvtltfxt0qqql0elmhrpsexlzveap82eqtyvsgu', - 'bc1qcds58swh4g6zsdmws9ltcdpqz4l44utu5wv9vfpmemps3whgdacqkakrk0', - 'bc1q75tsfq2c5cqp2ss32qksmnzd9yea2mjsjktdmrz900dcmg43ck4s66sgjx', - ], + owners: bitcoinAddressBook.kraken, }, starknet: { owners: [ diff --git a/projects/kucoin/index.js b/projects/kucoin/index.js index 0b02a707e01b..4f0ecfb981bd 100644 --- a/projects/kucoin/index.js +++ b/projects/kucoin/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -42,120 +43,7 @@ const config = { ] }, bitcoin: { - owners: [ - 'bc1q04p5psjsp7j80sq6u4djgqk3c7pk6n93q43ply', - '38fJPq4dYGPoJizEUGCL9yWkqg73cJmC2n', - 'bc1q0243pvcnutwtm3m6t005402yk8utq4kfqqghhu', - 'bc1q080rkmk3kj86pxvf5nkxecdrw6nrx3zzy9xl7q', - 'bc1q07yhcr2qmwkc32z4gfaemtjtx90am6e6rpl9sg', - 'bc1q224fr84g5xqvp2lkwmzvyec9frwk5w5f5v5w38', - 'bc1q204dfzksn4l0rhhajm9fyd5h92dac8tnuur8jp', - '37nA3mMvQwPGVh6BKdLXKBiPjLFVbRLZEp', - 'bc1q0h72mfwgtsnfkcmpsnt3kmrrp4z5x3v469mz0k', - 'bc1q0l84mekaaszjfst7lswaheu7gcymv2h2k8z6fl', - 'bc1q2hpdg7pwghz9um27hqsmv2sg3f8f9fwtjvdenx', - 'bc1q3yy6h7x9wtffu8f7hpkhlyssw3s28xzj0nydye', - 'bc1q3kwpxug0q0w55qjrfrcykxu2yn02xhzn49fnxw', - 'bc1q2wxfd36s204jkpfmez2u0nh7540cctur2v27ht', - 'bc1q3g7sltlncshtqcu9wyhqavzxlfa4tj97whapup', - 'bc1q4jszmgxml90ernkn3l908sn4hr94zk6wynp788', - 'bc1q3sevrnv8khxe6fnl87ad8e4fjefu7rmp39pxl6', - 'bc1q4xt86cp0xf6zsrfsgspnfm8579ksurxppae66a', - 'bc1q4f8uwyargzd8eajj2vrdjz4l0hvhjdlpmchstm', - 'bc1q3fzjrvlvsl6j58x38gzk0c8dgvfudsqcsdqyry', - 'bc1q5h4ucvz7qqnhypekhd8jusc8z8msytxflzfs8s', - 'bc1q5ty9r24qftnx7c0vw0y76d5kneekse7hl878yv', - 'bc1q6z680y2fkmmu49ykm0dm0temp25p034p034fme', - 'bc1q5qsadcuj0at2xk4lfca5zull8mkgwfm06qduq4', - 'bc1q80elat9h0nfhuzvuvn4yl2nh0eqxwfzas5afnv', - 'bc1q6dr8nqmgm5qvuukuf5ux3m0fdthnhx033uv3vr', - 'bc1q6tj4wm295pndmx4dywkg27rj6vqfxl5gn8j7zr', - 'bc1q5w44vqvfpnwzpclwhdmx98uenwdtdfd85qtw34', - 'bc1q82qe6w4afzt2l94wn4d9e0uchj8t2x2dtdf2pu', - 'bc1q5cza73vpzhrsruy4e7gudvq6xv6vfs9hjs5pl3', - 'bc1qa482xwlzz479nyep2ve0z6t9t29dg0zem9wqt2', - 'bc1q8yja3gw33ngd8aunmfr4hj820adc9nlsv0syvz', - 'bc1q9uddlcfqdyh6dlu3pptchazr0va0cshnqss2yk', - 'bc1qa8jaa3pss396sx52hkft5ta2dey69fkrt8mfsc', - 'bc1q9020xphp6ukc4j72hy52gk2nxujwt4kr8dq6eu', - 'bc1q8jjlupqcvxv25usqu8hvlnd8ym0stcpq4jfy9x', - 'bc1q98mvmv9nl4p744tdf2zh3uzv30yea2njy0le9d', - 'bc1q9hrcsckdwrezlw7gspefeyk9nyqmwpy3ea8wwx', - 'bc1qa3h4re6gf6qmmesjqfzn0vu2rmc6e00s4gjjle', - 'bc1q9wvygkq7h9xgcp59mc6ghzczrqlgrj9k3ey9tz', - 'bc1qfyr7tvv0a2dcq6xp4dgr5nemfmnak2e2scn6hg', - 'bc1qdhqxc3h6dnc6x0k8emtcnuyt8aspy83w0g9xht', - 'bc1qfcuvuaam666pv777ad59wwue5l7j36hr95f8gv', - 'bc1qf3wwg8dayutammv2e6lahudyc7j2ef579hyx3m', - 'bc1qamlau4w545vsjsmnhzmztlv3sy4tu6v9cnxtcg', - 'bc1qea6uvmc2kqndhewtlnc9duh5aa30ptvp3mhk9h', - 'bc1qgrxsrmrhsapvh9addyx6sh8j4rw0sn9xtur9uq', - 'bc1qcyjkktrvwatdqyvpm04vs3k2x5r4ystnw7msrk', - 'bc1qggwgcwnjvlma9hr569jhgx2yuncaaq0ace5ywp', - 'bc1qartr66auwm2tlcjp7cqgs8cx4p6q7lydrtwf4p', - 'bc1qkrewa0m37wjmkcgs0w2gh9zhjqclkq74ckt4x4', - 'bc1qk947xflcafthv8k6gx7m2cvwzqzy68kl5npkyw', - 'bc1qh573eaggrqexqx7xzm4e57k6sm9r7zpuxwqxzn', - 'bc1qj5gnrfdmcftzxgrwcdts4plw4kaydjs5kq560l', - 'bc1qlldl5qma9glxwt3j06eef05590uyy2td3ye90c', - 'bc1qhafun32xkhxpec8dq3kpxyq5x9ur437mj4dusy', - 'bc1qh6tqdv9k2pew6vyvrmg76ae55n5rwa2djmyyyk', - 'bc1qjxv6j2sv6za57khvvd5yu9jxkv3g3qvxh6sach', - 'bc1qjefrh2gf28g6x56eeausc30gxewamj7qwtzfpg', - 'bc1qhs4u46ygdskuljadnxn6thqsrjw3nf9r8nfclm', - 'bc1qnl68wnf3d6jz532dl65hj9urw9j2432fjg03nr', - 'bc1qnetky45z2vguazzczuy7x2446vsjn4ku76d5k8', - 'bc1qlw4dv8nt5uc35dkmftlt3nt0rl0cte4he998qt', - 'bc1qnvdx4dt8kn68csvcqvdtnlzw8hadapk9e9k857', - 'bc1qnqhcfntmlh2nnu5rp25szqgxw7v3783xrgcd44', - 'bc1qp22u6u75j2nvvhychyfd9uxr6s2jkf5p985rct', - 'bc1qnxn6352sn9mm6dxgmfrn43fgtu0l2kcx2y3ddh', - 'bc1qm882j3900we3eewa5fdw4hlwlnef35phmsn7x8', - 'bc1qpafgjjmqlv32m6m6qpte2ldlz0wcuj3ajyt8gd', - 'bc1qmtvfu97nlrl8qtujvj5jg47dc0p3w8sun6esaf', - 'bc1qr9hf2v2gf6haq7tsvckel7u6ja46fnqfkt6u5p', - 'bc1qpuhnd3gqhqlezgcuuhc2ywfw2w03uyz0seg802', - 'bc1qr77hw0dek5f8uvmeazd3egym2m3npjf2nvrza5', - 'bc1qpdfchk5j5tvkwf0z4kpftysv88h5szz4ms8try', - 'bc1qprpm6caxcuewnme4at7h2skhv2rury274a0vln', - 'bc1qq9u67zacfe3vz40e36nltn3agt9hf75g7av2xx', - 'bc1qrf9llyljmwy8egcjjsw0z0a8n5sgjlhcemezcl', - 'bc1qqx0udc7ndr77yg4v7rwuugnwk8n8xqaydmakfu', - 'bc1qqg92jrprgh0vdq3pd8wctnzqyuwn5kp20hhfh6', - 'bc1qpnmkhx9ndgnk639wh5gyuex4nsx7s8t8d33pzt', - 'bc1qtcxldruuuhvk8zjmw3a3dpwfvu2d0m9qyctv82', - 'bc1qtlgfyl9yjyluwzyyayp2fs0r4kcjtv2axsmzl8', - 'bc1qs84j4s45nztsx9759vkha0wvvx28dlqk7p2n5y', - 'bc1qteec4z0tcvv40r6py855gg77rwnhe9ege42x0t', - 'bc1qrt7rkpswpgmcag7txzf6ps9mvepwgndshqdx6d', - 'bc1quqy97s6lj3mty7hdp4at7uvmlzssh57jezx85v', - 'bc1qseaaa4hnexjugx26p605getpdnkwy3up64uws9', - 'bc1qudtghe07cfslxyv36zk5ums65c32xcw0nz6zhg', - 'bc1qsfdf47l3ftsqv2muvfftnulcp4qwzypuxm9k30', - 'bc1qul97gsvkpfju6fa53cezzxx5wmv4t8rl6gdt62', - 'bc1qv3v2u78m6vec2jqe7w0esm6rccmysccdvkpr3t', - 'bc1qwjftm2nl65gmevmutfqe8q7k0aaahlxt3a9wam', - 'bc1qvh0zexe6422t85x3kzgvms9fd984606uhf44ug', - 'bc1qvj8a4kjq888c2l22pdgjx3cgaq94vm3hjzyq6l', - 'bc1qwgzyz8xpwdrx54rsm5p74ksc6wkxr8y4ncejwh', - 'bc1qvvqafwsqr2rquyvym4l6rtt7ayukpmw2sfxn7f', - 'bc1qvkzdg9x58zyupept40zcjhmztn3l2flqss2f4x', - 'bc1quyayxjg0r68wsj6c2zcu3f7nnj9um5pwdgr36m', - 'bc1qw83c8j8pf2azegtyeszqqdaafgqj4hl3xcdy95', - 'bc1qwxg6gra5g9tlvztr9qphzpruch30ka40e4tl48', - 'bc1qz0q4hyn5k8plleax2g52jsr0k07vgtqcr634g3', - 'bc1qz0nfyvylrvn9h2rqm7lcegzv79du2p5jezgept', - 'bc1qxfgeqygy229hrjrwmklzgwme70h8mmrjcyueag', - 'bc1qyz4zr7cv2922cjua9xrezsda82gl8z653w6ru4', - 'bc1qxnsr0al2lw7hqg90j05x9s0gxm5g4skmcslrut', - 'bc1qymcn42gst8jvcu4y9c6tf6ngfs38j66hd5zvhs', - 'bc1qzghz50r66hlp4wufyy55m5a3jjl5grkmetygsg', - 'bc1qyatvzh0ndg464ph7txwjw6kgkczw8kw03lcgg7', - 'bc1qy8054ua06akklh6avf06crt4u2hu4skasr5ead', - 'bc1qy7uquly0ha78lmn47hedd7e0swkmwpyft9j7e2', - 'bc1qzy4lg8yg6dsn0dppx3a4kq8tqe2hhrh6af3778', - 'bc1qzkqzmlj47z0ww253xu2egewcw4wagz6qfa6fr8' - ] + owners: bitcoinAddressBook.kucoin }, arbitrum: { owners: [ diff --git a/projects/latoken/index.js b/projects/latoken/index.js index fe04fb0fe9a1..2042ea7eb8d4 100644 --- a/projects/latoken/index.js +++ b/projects/latoken/index.js @@ -1,12 +1,9 @@ const { cexExports } = require("../helper/cex"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bitcoin: { - owners: [ - "bc1q48amr6l7dvacdppgucvnswwuyleaqh4dus8z8h", - "bc1q2cgh9nxn7cqmqhk4hc5fu6mju8nzy9a20qqqh8", //cold - "bc1qw5fc9ml9vm4xq5c6xkcdu3vtwyw4gdn8lw0uwq" - ] + owners: bitcoinAddressBook.latoken }, ethereum: { owners: [ diff --git a/projects/lombard/index.js b/projects/lombard/index.js index a301f706dd09..8789b8cfd0a3 100644 --- a/projects/lombard/index.js +++ b/projects/lombard/index.js @@ -1,44 +1,13 @@ -const { getConfig } = require('../helper/cache') const { sumTokens } = require('../helper/chain/bitcoin') -const { get } = require('../helper/http') -const sdk = require('@defillama/sdk') - -const API_URL = 'https://mainnet.prod.lombard.finance/api/v1/addresses' -const BATCH_SIZE = 1000 - -async function getAllAddresses() { - let allAddresses = [] - let offset = 0 - let hasMore = true - let batchNumber = 1 - - while (hasMore) { - const response = await get(`${API_URL}?limit=${BATCH_SIZE}&offset=${offset}`) - const data = response.addresses - - const newAddresses = data.map(a => a.btc_address) - allAddresses = allAddresses.concat(newAddresses) - - sdk.log(`Batch ${batchNumber} completed: ${newAddresses.length} addresses`) - - hasMore = response.has_more - offset += BATCH_SIZE - batchNumber++ - } - - return allAddresses -} +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') async function tvl() { - const addresses = await getConfig('lombard', undefined, { fetcher: getAllAddresses}) - return sumTokens({ owners: addresses }) + return sumTokens({ owners: await bitcoinAddressBook.lombard() }) } module.exports = { doublecounted:true, timetravel: false, isHeavyProtocol: true, - bitcoin: { - tvl - } + bitcoin: { tvl } } \ No newline at end of file diff --git a/projects/lorenzo-enzoBTC/index.js b/projects/lorenzo-enzoBTC/index.js index af81c984e967..1f26d167d716 100644 --- a/projects/lorenzo-enzoBTC/index.js +++ b/projects/lorenzo-enzoBTC/index.js @@ -1,16 +1,7 @@ -const { sumTokens } = require('../helper/chain/bitcoin') - -const staticAddresses = [ - 'bc1qndzgrwj3y2lhcklme4t72jxq3df2h05vjdgzpp', - '19wFRSr3GYHmVQtnmbkx7Wkjw3jZdyYB9a' -] -async function tvl() { - return sumTokens({ owners: staticAddresses }) -} +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') +const { sumTokensExport } = require("../helper/sumTokens"); module.exports = { methodology: "enzoBTC, Lorenzo Wrapped Bitcoin", - bitcoin: { - tvl: tvl - } + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.lorenzo2 }) } }; \ No newline at end of file diff --git a/projects/lorenzo/index.js b/projects/lorenzo/index.js index b8a69bd003ad..cf0fbcf01ee0 100644 --- a/projects/lorenzo/index.js +++ b/projects/lorenzo/index.js @@ -1,43 +1,8 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/sumTokens"); - -const LorenzoOwners = [ - "bc1qaf6laj9m7jteztyz4lulrtcjtpusfcfnd7r7xn", - "bc1qf6cj2z2e2mzuvfrl80vgt53k7jc2vf36ckahgy", - "bc1q5hc68n6krnzgzswf7rknha2aqxzrzup4vlhce8", - "bc1qpxpmr3zdjulqnwa3jdvm83tpaek6dv3kc75ms7", - "bc1qaml9d9mqgfhsfuaa2ymutdl4psj8c2undx9n72", - "bc1qutgngqyrflxrfmk9k28ucvq0s2v8a43nwfwv02", - "bc1qrx3fpr5j6sprxett45c2kl9p4pajyxep0mapfd", - "bc1q00t2ntm46c2nfvcer6ukj6npaxjurujthse4qq", - "bc1q3pzhncle68gct6me08kn5kf9awkevt6ettwrmg", - "bc1qw6cvwx8ajprmp2lzkhrsps2qx4k9r2pj4xj98x", - - //btc script-address after lorenzo stake to babylon - //cap 1, Delegate to Lorenzo FP(db9160428e401753dc1a9952ffd4fa3386c7609cf8411d2b6d79c42323ca9923) - "bc1pjy5mq7vlqkq6nldxghauq0sqgh3hjdrp2adl7tcalkavt9ly5g8q3zkymk", - "bc1pck8hnfa76k9gqtddyjvt0syzlxj5atfr5g0dk0ktmdr9u9h2gnesge0f5v", - - //cap2, Delegate to Lorenzo FP(db9160428e401753dc1a9952ffd4fa3386c7609cf8411d2b6d79c42323ca9923) - "bc1pf2x7w0wwutvj5qznrxygpv5wcj3nvzq9dqhpmkyfk84nkg778q0qa605e8", - "bc1pstunan5nv657dqx32tdup3y8uxq6eja6z3d4kukspjpq23gxf4zqdce4hn", - - //cap2, Delegate to BSquaredNetwork FP(2f8ec74d558fe7a97d10be230bf1485db9be675228abfbf957ba050c714b679a) - "bc1py54xje6lxdd8ej9hqxdxnp5dyjwu2eda2rxa2yuaptv3lrw3t2tscly6y7", - "bc1pydkry09hpqqv4hxrrlrgpddky4u39xrpqd0xvsf9smjpd65s49qqnq5zel", - - //cap2, Delegate to ChainUp FP(31287a9728f7b11863b9c56fc4cca103f0473dcgitdc6746ed7f79050d3adff644b) - "bc1p6dltgypr57fc648txjj7zwk6k605ca9x2ul0pycld22x86jcvxmsg7547j", - "bc1pw8za3k5upa565n0kv55e89a8l0hkzpnfenj767j0cwfu7rn83yhqvuehcd", - - //cap2, Delegate to Lombard FP(609b4b8e27e214fd830e69a83a8270a03f7af356f64dde433a7e4b81b2399806) - "bc1pa56692v3hxguvu8vgu5d7dh9twlj7wm87qvzvxdru3rnluv8nmdqk58ewz" -]; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Lorenzo, As the Bitcoin Liquidity Finance Layer", doublecounted:true, - bitcoin: { - tvl: sumTokensExport({ owners : LorenzoOwners }), - } + bitcoin: { tvl: sumTokensExport({ owners : bitcoinAddressBook.lorenzo }) } }; \ No newline at end of file diff --git a/projects/maskex/index.js b/projects/maskex/index.js index c8de7c1a07b3..fe02cb33e7e1 100644 --- a/projects/maskex/index.js +++ b/projects/maskex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -69,9 +70,7 @@ const config = { ] }, bitcoin: { - owners: [ - '39DUz1NCkLu25GczWiAjjgZBu4mUjKbdNA', // this wallet was collected from https://blog.maskex.com/news/announcements/embracing-transparency-maskex-reveals-wallet-addresses - ] + owners: bitcoinAddressBook.maskex } } diff --git a/projects/mento/index.js b/projects/mento/index.js index addb839a4b0b..b9435c49b4df 100644 --- a/projects/mento/index.js +++ b/projects/mento/index.js @@ -1,6 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { nullAddress, } = require('../helper/unwrapLPs') const { sumTokensExport, } = require('../helper/sumTokens') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: 'TVL counts all assets deposited as collateral to mint Mento stablecoins.', @@ -19,6 +20,6 @@ module.exports = { }) }, bitcoin: { - tvl: sumTokensExport({ owners: ['38EPdP4SPshc5CiUCzKcLP9v7Vqo5u1HBL', '3KWX93e2zPPQ2eWCsUwPAB6VhAKKPLACou'], }) + tvl: sumTokensExport({ owners: bitcoinAddressBook.mento }) } } diff --git a/projects/merlin-l2/index.js b/projects/merlin-l2/index.js index d864c9a2793e..8d2762206a13 100644 --- a/projects/merlin-l2/index.js +++ b/projects/merlin-l2/index.js @@ -2,45 +2,17 @@ const ADDRESSES = require('../helper/coreAssets.json') const sdk = require('@defillama/sdk'); const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); const { sumTokensExport } = require('../helper/sumTokens'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') // https://medium.com/@merlinchaincrypto/merlins-seal-the-biggest-fair-launch-of-layer2-5614001b2582 // https://bridge.merlinchain.io/api/v1/token_mapping?after=0&size=100 -const owners = [ - "bc1qtu66zfqxj6pam6e0zunwnggh87f5pjr7vdr5cd", - "15zVuow5e9Zwj4nTrxSH3Rvupk32wiKEsr", - "bc1q4gfsheqz7ll2wdgfwjh2l5hhr45ytc4ekgxaex", - "bc1qua5y9yhknpysslxypd4dahagj9jamf90x4v90x", - "bc1qm64dsdz853ntzwleqsrdt5p53w75zfrtnmyzcx", - "1EEU18ZvWrbMxdXEuqdii6goDKbAbaXiA1", - "bc1qptgujmlkez7e6744yctzjgztu0st372mxs6702", - "16LDby5cWxzQqTFJrA1DDmbwABumCQHteG", - "bc1qq3c6kehun66sdek3q0wmu540n3vg0hgrekkjce", - "124SzTv3bBXZVPz2Li9ADs9oz4zCfT3VmM", - "bc1qyqt9zs42qmyf373k7yvy0t3askxd927v304xlv", - "bc1qgxdqf7837dxe8xkhvctgc499kwh5xw7ap3uwhs", // add on 25/02/2024 - "bc1pruhkl5exjt0z824cafauf750f5g08azuvgcjctv0enz5csayaj7ss3j5wc", // add on 25/02/2024 - "bc1q97vmervc8x9hzr4z4yvzn3x4rk74se6e8x8sgy", // add on 25/02/2024 - "bc1q2lzqzjcq472x8v0kgdcn4m5y8cq95ysnxm6vemu0qsuqgzyge06sqmqdal", // add on 25/02/2024 - "bc1qcmj5lkumeycyn35lxc3yr32k3fzue87yrjrna6", //nft_vault_address; - "bc1qq76dy32nnk5sha36etg6pdj94vl5zrskavux2f", // add on 12/05/2024 - "36n825H7orW1u8yWmvR4zs2CWfmkY2rkpK", // add on 12/05/2024 - "bc1p35l88j3ashhktg75tjctt6pacrgpyr93ldt7yw484dm4expq073qk4n0a0", // add on 12/05/2024 - "bc1pahkqca39mfcfay7nueczyhn9v8wq96x7mp4pjxpsdpsnurxzuwuqnhsdg3", // this wallet was provide by merlin team chain on the 14/08/2024 - "1A7oMBdQir24ESgk8LDccM4MUKJx6d2mCw", // this wallet was provide by merlin team chain on the 14/08/2024 - "bc1q0hgd38zjp2v2rahqverkmdaak4vc8fynyatqet", - "3BN9ECDCAjgxaQUmJCBCM7JtJZaCeB6rL6", - "17z6W1Eq1A7hWcWQiDxUcFTZBVCMsYrLye", - "1McbLy27nLVzJ4ubMnFm3jxnQ3nbq2mpr2", - "17vH7EX655n5L4iPAfVXPn3rVzZbrgKYBC" -] - module.exports = { methodology: "Staking tokens via BitStable counts as TVL", bitcoin: { tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners }), - sumBRC20TokensExport({ owners }), + sumTokensExport({ owners: bitcoinAddressBook.merlin }), + sumBRC20TokensExport({ owners: bitcoinAddressBook.merlin }), ]), }, ethereum: { diff --git a/projects/mexc-cex/index.js b/projects/mexc-cex/index.js index 71d693ac0dbf..88110da6adf3 100644 --- a/projects/mexc-cex/index.js +++ b/projects/mexc-cex/index.js @@ -1,10 +1,9 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bitcoin: { - owners: [ - "13uZyaPbt4rTwYQ8xWFySVUzWH3pk2P5c7" - ], + owners: bitcoinAddressBook.mexcCex, }, ethereum:{ owners: [ diff --git a/projects/mt-gox/index.js b/projects/mt-gox/index.js index 90343648020e..359462a574d8 100644 --- a/projects/mt-gox/index.js +++ b/projects/mt-gox/index.js @@ -1,89 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - owners: [ - "17Tf4bVQaCzwWrDWGRPC97RLCHnU4LY8Qr", - "1BzK87zuqidZn489Wb2oLSktrjKrX7TLKe", - "1Drshi4RAuvxk4T6Bkq959ZvLbvy7b1wvD", - "1EiiKCCnFgHjEvPZdu29qqgdBm8zTvpU3U", - "14p4w3TRCd6NMRSnzTmgdvQhNnbrAmzXmy", - "12KkeeRkiNS13GMbg7zos9KRn9ggvZtZgx", - "12T4oSNd4t9ty9fodgNd47TWhK35pAxDYN", - "15kNZcrhxeFZgVVLK2Yjzd69tRidbFdJEZ", - "1LS5EFRRMDgMQusW6zokQUHjzNUfy6HHCQ", - "1FrV9hv1AW34BGJvobJatyzUWYDWB9epRW", - "1HdKXsNQtzDcfB6PGM7DWTgX9vhBWsz1ak", - "1Fu4YgM3Y9CxvioGPqkSzkydAC8MVaPN1D", - "1G23Uzwj55k2A9TRwaTknqGav66oDTkWCu", - "1GkZQcDy8V6pmHFZqUBUBCnN9dc2hoWasD", - "1Hm6XDmhKCHz68wDEYTapN9MEanke8iwUk", - "15SeCwVCFx5cWyrcdD1Zp1D1zxjH2SELPg", - "15U4VsmWG1cdXAtizvQsW4r7iMxzp64Tgu", - "16jZZkMYqjUWUtQ9DfDvHdH5ko5BcnH9XQ", - "16w6sZBDP58yyeyZAcvnxcEGJpwR9amM6g", - "19Cr4zXpKw43xLJhFZW9iv4DDNtQk2TDeB", - "1GyDutntMuYyA2vQGW5HFcKLfx4cbDdbJq", - "17etv2L3nhk6SCcWSNW4eoZkBy84izAm17", - "18ok25NTkdrUzdByFJCNVsqVYkujZ8aP45", - "199Yxz2TJGtND3QKsHTptTJivqSaUZBvku", - "1AZu7TQmKBAes2duNDctYwjAB9nhHczUnA", - "17KcBp8g76Ue8pywgjta4q8Ds6wK4bEKp7", - "1LLc8aA9C9LLULGbYCYSFKXgxKP2DXdCqP", - "1CZsoJfkknbnW5fKrt1oR7N1ALE5WmDGP1", - "1DedUxzgwErg4ipNi988wPgLk5thwciKcc", - "1H4K3dGfNbAN4AUfyUrpkGpjrd83sntDpV", - "13sXfpp2V16nnxYvW9FHHoBdMa3k98uJw8", - "13Wv5hGhubAWgSPWtXYh6s1s7HX2N1psYg", - "14mP6caC5dFhHdVAPCjPKM8Nm36MBDR5pM", - "155FsTtEFq4eGCcBxDseuwLKPbmtWbyHJR", - "156HpsWfgkWYLT63uhTAGUSUF3ZMnB9WWj", - "15QcKCa84ZCHxbsqXDoKhi5XbmQB8jPEAd", - "1EK8vW7UYaYHKiW4TZmYJKtwcZLM14VjvP", - "1Hb8DmmvvtTYv5RBLuGtDxznkZwVpd5Vjy", - "1HuPVqz2xvf1rdNFUqd62vRTyxP3jeX9Ch", - "13xGCc4TPSYY9GYxBGVNox82KxyjkFnxMX", - "13ahgw8sM95EDbugT3tdb8TYoMU46Uw7PX", - "1439q4Na8v88kPBqoyg8F4ueL9SYr8ANWj", - "13dXFMyG22EsUsvaWhCqUo7SXuX7rBPog6", - "14USZ558Rr28AZwdJQyciSQkN4JT1cEoj2", - "1FhRuUkk8Bfx8FJDemtxhKAR4F8GCNKrXG", - "1Mm9brripN4RPTzkGnRrbt5uDWdqbfk2iX", - "1LueUjEuBgc7cQhsWT8zAfTjcWmrNBZXaR", - "1LXi3x7hyt17cxncscGE887WCrC6XDNZ4P", - "19KiFrafXEyJCUDYFEv3B6tBUwyfFo7kNU", - "18YDgRhxsomuBZ1g9d8Y1JuRmxDhF8Bvff", - "18hcZVFPqDNAovJmb9vA6hEJrDz6uWXNGh", - "1BDZBTb4KE5oq6wAgA6EvAe3uCFRrAbPao", - "195HvmjXgoF3M5vFaBC8swZPhwrE7VhxRD", - "18KDS3q6a4YV9Nn8jcyMvNoVPfcrfemeag", - "19c8sUa54yQuRTVDfJa3iDkkCaFkzBJLPB", - "1B6kJM75iu5ty1HAHMMz6tT1HhjoGNTCa9", - "18M1Z337NqLtK9V69bssnQUYsvb7hmfSFS", - "19eihBKk6e5YD2QXAe4SVUsxRLLnTDKsfv", - "1C5aU4Xnpd3txbxehk46UZgiuNB8QdpHCH", - "1BXyJc6BVuTFnHQCcjiWX2xmCPNVfaSZeb", - "1Ar6meJQCkNoC9wnPcyRNNpzX5fBDaGcKd", - "1CRjKZJu8LvTutnSKq4zTJ4yiqrzMAArYW", - "1HweN9p41BY2RBunsPqyVuheEq7gVoxA9u", - "1HX4s3JeFU3x1eQgPNQVAdx6FoCtbb1hr8", - "1HzEPuenagLEWj68igDXBBXrzc293RuR5V", - "1JtgU6Uo1RAt5eiMf34EehyatUezBQP36C", - "1JVmoJT3471FjsX5H4hAeR1RyrDgpkHbpm", - "1JVU43LNKXqa9W5fCh8tppxDDEWgfeNg46", - "1JztCg7eKSkb1vi7NzGJynXpLZmoaFtYud", - "1KFDUSZuapMv7YaDmL6cyrHTQhma1MtFYs", - "1MkyfwJf7uhWTmVGGQXfcT5ip31DoHMxsz", - "1LzwbLgdKd4eFLkpRdeajkH1YJkVCip2zj", - "1MPJJzRaT8vLhowNB4dVyWRxxu79dq7WkB", - "1MvpYtqgBH7CXbTutrSVCTNHPzm9vakuRy", - "1N5X4kcZ56uRh24XrZoztS9Vb8G7j1Joop", - "1Pq7hooZbEAz5y3QMnqFY8C5xqTdrjUwcA", - "1PRXQEoL8vzEzoJJ9hbtAP6NaV2daccAUn", - "1PxGTuJzDx1ceFHx4Z5CHaWuhiPBNovmZD", - "1NA3Tj4b1jtx9eGELe31Jw4DrzTqKP3ayH" //https://www.cryptoground.com/mtgox-cold-wallet-monitor/ - ], - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.mtGox } } module.exports = cexExports(config) \ No newline at end of file diff --git a/projects/multibit/index.js b/projects/multibit/index.js index 1ccc38fcc2b7..b3529a4d97ac 100644 --- a/projects/multibit/index.js +++ b/projects/multibit/index.js @@ -2,6 +2,7 @@ const abi = require("./abi.json"); const { getConfig } = require('../helper/cache') const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/chain/brc20') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const BRIDGE_TOKENS = "https://api.multibit.exchange/support/token"; @@ -16,11 +17,7 @@ module.exports = { methodology: `Tokens bridged via MultiBit are counted as TVL`, bitcoin: { tvl: sumTokensExport({ - owners: [ - 'bc1p6r6hx759e3ulvggvd9x3df0rqh27jz59nvfjd2fzmh3wqyt6walq82u38z', // hot wallet - 'bc1pyyms2ssr0hagy5j50r5n689e6ye0626v3c98j5fw0jk6tz3vrgts7nt56g', // cold wallet - 'bc1qmcrpqanjnrw58y0fvq08fqchgxv5aylctew7vxlkalfns3rpedxsx4hxpu', // cold wallet - ], + owners: bitcoinAddressBook.multibit, blacklistedTokens: ['MUBI', 'BSSB', 'savm'] // more SAVM is bridged than circulating supply according to coingecko & etherscan }), diff --git a/projects/nbx/index.js b/projects/nbx/index.js index eb0c922834f4..055766e16a38 100644 --- a/projects/nbx/index.js +++ b/projects/nbx/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -15,10 +16,7 @@ const config = { ] }, bitcoin: { - owners: [ - 'bc1qd79ypayqr03lmvcqc40udn6yuq4mve34ychy6a', - 'bc1qgxrcuzn62qjk3e3echysa9srg87la26x0qn2sa', - ] + owners: bitcoinAddressBook.nbx } } diff --git a/projects/nonkyc/index.js b/projects/nonkyc/index.js index 3715eed48065..160c768d6afa 100644 --- a/projects/nonkyc/index.js +++ b/projects/nonkyc/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { /* @@ -30,9 +31,7 @@ const config = { }, /* bitcoin: { - owners: [ - 'bc1qy8xx8fcsmdlc447ls4wzw2tn3y6c6cy64wckhz', - ] + owners: bitcoinAddressBook.nonkyc }, // remove it for now /* bitcoincash: { diff --git a/projects/obelisk/index.js b/projects/obelisk/index.js index 8d6d2f2a7c66..6fdb6eace7be 100644 --- a/projects/obelisk/index.js +++ b/projects/obelisk/index.js @@ -1,13 +1,6 @@ const { sumTokens } = require('../helper/chain/bitcoin') const sdk = require('@defillama/sdk') - -const staticAddresses = [ - 'bc1p0tr3dgulgpx43dkktjxy8z2azz6yvx4j7s0lelj67tlwct0wnqtqeakfer', - '14ejzLtUSMsjZE8Pp2LUhX3Pf7BbXPeZyP', - 'bc1q0hapsvdtqfeyw9fjacey9350k8zu552p0khyhj', - 'bc1pr6pga0d44xm3t8z36qnya6sfznsm8fwkn507x6gqt86xtnvm4h4sj2zqus', - 'bc1qy4pkldj4dqxtqypz6awwj7y8vahkht8uqhdlw3' -] +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const abi = { getCustodyAddrInfo: "function getCustodyAddrInfo() view returns (tuple(string mark, string btcAddr)[])" @@ -15,22 +8,13 @@ const abi = { async function tvl() { const api = new sdk.ChainApi({ chain: 'ethereum' }) - - const addrInfos = await api.call({ - abi: abi.getCustodyAddrInfo, - target: '0x9F836f8A27F1579258388BFab16ab16E278B1a2C' - }) - + const addrInfos = await api.call({abi: abi.getCustodyAddrInfo, target: '0x9F836f8A27F1579258388BFab16ab16E278B1a2C' }) const btcAddresses = addrInfos.map(info => info.btcAddr) - - btcAddresses.forEach(addr => staticAddresses.push(addr)) - - return sumTokens({ owners: staticAddresses }) + btcAddresses.forEach(addr => bitcoinAddressBook.obelisk.push(addr)) + return sumTokens({ owners: bitcoinAddressBook.obelisk }) } module.exports = { timetravel: false, - bitcoin: { - tvl, - } + bitcoin: { tvl } } \ No newline at end of file diff --git a/projects/okcoin/index.js b/projects/okcoin/index.js index c3ec17a84c5e..bc7d9f051bab 100644 --- a/projects/okcoin/index.js +++ b/projects/okcoin/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -13,10 +14,7 @@ const config = { ], }, bitcoin: { - owners: [ - // we only added wallets with more than 0.1 BTC - "bc1q2s3rjwvam9dt2ftt4sqxqjf3twav0gdx0k0q2etxflx38c3x8tnssdmnjq", - ] + owners: bitcoinAddressBook.okcoin }, tron: { owners: [ diff --git a/projects/okex/index.js b/projects/okex/index.js index ca5cac2b2ff6..497d554ac6fb 100644 --- a/projects/okex/index.js +++ b/projects/okex/index.js @@ -1,195 +1,9 @@ const ADDRESSES = require('../helper/coreAssets.json') const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { - bitcoin: { - owners: [ - '1LnoZawVFFQihU8d8ntxLMpYheZUfyeVAK', - '1JQULE6yHr9UaitLr4wahTwJN7DaMX7W1Z', - '1DcT5Wij5tfb3oVViF8mA8p4WrG98ahZPT', - '1CY7fykRLWXeSbKB885Kr4KjQxmDdvW923', - 'bc1quhruqrghgcca950rvhtrg7cpd7u8k6svpzgzmrjy8xyukacl5lkq0r8l2d', - '16rF2zwSJ9goQ9fZfYoti5LsUqqegb5RnA', - '1FY6RL8Ju9b6CGsHTK68yYEcnzUasufyCe', - '1MbNM3jwxMjRzeA9xyHbMyePN68MY4Jxb', - '1Lj2mCPJYbbC2X6oYwV6sXnE8CZ4heK5UD', - '178E8tYZ5WJ6PpADdpmmZd67Se7uPhJCLX', - '1BsdDaJtgFZrLfzEXvh6cD4VhtHHSHhMea', - '14kHu26yWkVD8qAnBfcFXHXxgquNoSpKum', - '1AumBaQDRaCC3cKKQVRHeyvoSPWNdDzsKP', - '1DnHx95d2t5URq2SYvVk6kxGryvTEbTnTs', - '13rCGm4Z3PDeYwo5a7GTT4jFYnRFBZbKr1', - '15Exz1BAVan4Eweagy1rcPJnfyc6KJ4GvL', - '18QUDxjDZAqAJorr4jkSEWHUDGLBF9uRCc', - '1M6E6vPaYsuCb34mDNS2aepu2aJyL6xBG4', - '1CE8chGD6Nu8qjcDF2uR1wMKyoWb8Kyxwz', - '1FTgXfXZRxMQcKSNeuFvWYVPsNgurTJ7BZ', - '13jTtHxBPFwZkaCdm6BwJMMJkqvTpBZccw', - '1FfgXrQUjX5nQ4zsiLBWjvFwW61jQHCqn', - '1DVTB9YKi4KNjyEbAHPp17T8R1Pp17nSmA', - '162z6mSSHzfTqb2Sn3NUk5r1Y2oGoCMCoM', - '3KbDzhb8B5pUU7Wk1y26J8D4cxYLmxJsca', - '3A8tCFwWyHQey1npTAWYTtrjLPKLXpSpLd', - '33a278YeJBRvQuemSo6yeugafqdS4x98TM', - 'bc1qc3g2dx3fn9s27v92n555r2tzhkxhad2wc0wm0ahlgpmhsr325mpssz80s6', - '3ABQAsnVgK8gDCBtWeEuoRvG3zdgABrDHQ', - '3AWGaggM87Nnhit5DwYYfXyvzW1NYutCw2', - '3QLVSDvh1r9u28PDWUDyg3nR7HqxrUZ4jA', - '3QFtYbR22en2AizTb7JVFA9bL2rf1fbNJr', - 'bc1qrp6msfnqxrl2gp4phmq6mcz995xc6m8n6fn8nygjfg8p63ncy4gsp3xn0e', - '31qq3eDdNyvyoDGrNYAAN5GU2BagDNANFf', - '3BdEq8vnX1o1J4Zpwj6wkPh5FxrgxLAibr', - '3AVMfb3vJi9CbQEGyoHmpgptgbJioyKykQ', - '3MYUxfT4mx8imVz7R8bVs71NisrYnmjUbT', - '3FS1EFCqZM7KEhsVoiNu7NC8658Kq4oCiY', - '3BiWZUFxpjJN6W93Fz3aCcCPBTrpYWwyoS', - '3NiufwUuJZnUHmgSopESaeLBJkALzJMcgk', - '3JcWcMPtxGaCuhKeucTMe1V865t7UhrNnT', - 'bc1qh0w73elagqvhfkkulrah0s2epdp922d3e6r8w43uz0e8ujafcjeqcz8lwa', - '3MWakirPr7MnizUAtWuDJmt919PZciSBvi', - '3LEV2xDk8D7uy4PVEGFZUm9fcT6XvCvHen', - '3FR7ZCHv26jaWWzv7EBPAXGgBpFuVFUnH3', - '38X48VjATu2AHowPzHefNqVvKyheGzVv8k', - '3AgGgHDcqd9sxYiagskZH3EPswwqza1TXd', - '3CGKuMZrkQQd4zj8FsTmDhineKACFpQBZX', - '32hhwGNtGTZ4J1LLz7p6o55Kxm7mzgREJ4', - '3E9GBso3ipQb2fbT3PNbeqgj8RkgJcR4X5', - '34MdsKf8zE6NeAy98TS1yxUTEoBkDT2ZwZ', - '3J7F1pczapCk1sRef6Hmvh9NfU6QiV3w55', - 'bc1qdk55vq5vrzt44pn93t9e3rwecw2dy4pcwc5gwugdjm3sh9xuqu3qzcwt4h', - '3PDMVx1YRhySaPEtCV2AT1aEq9DwgPU4uq', - '33j5fuJc14aff3Z6vHZBxaHEKMdNmKbRxQ', - 'bc1qvg6drx4rdcv85pteka94eskh740wrtgulg3tp7gcmm43vgund4sss4vzyq', - '3QUyiuBQF46KAMM7wdnDnu8GKVQYieRQ1N', - '35D2tNKFmqiVrvXan6tdxgatZoCBimASmZ', - '35Wvz1krBwzgQ7REXS7iJp3Qz7k3rmFNNF', - '3LMYZ3jPoKW2jscuT8fj8Nh4d66W3uX8us', - 'bc1q37nz0uheu4997ufs84efw7jw248mk9v83sgpmvsr6nawhaadx5lq2hclpt', - '3Mkfqxh6BuYCAiKxuvVWKn64N2xvReB3wM', - '3ANAufFoSaVJefhAZ7h9qViqdfJKoCWvbC', - 'bc1qnw79hhts8r84gykqkctyhu3j4gckll9gqxktzqgx5a54m347zf7qxhcyn8', - '3MYrRpUhNWxB8Ydk9gvMou5yZNtXNynxcT', - '3LFcssbNQRmRCCEUSbpDA5yzhsFH5waDoe', - '3NEwT3x6nrab6Wxddwb7jbWY8KYqJkewGA', - '35uFYLvWLQuEo6GxSGHT8JigaoUyqmNJjE', - '3DWvnsbAJJTLufQ4AhQY7LsVQrKoLjEHXQ', - '3PdNS2nqeE6G7cTcVmGjAVjz6HaPcX2FGj', - 'bc1qwkkedj4nzep7dw05s335x6n23520eq955mpcwypftn5q4n9japmqejkxlp', - '3Qae3YK3eKSoM57jpVYjvWkS7E2KnPFHSU', - '34HVDP9RFA9MpopGQ4TutLLVMFhhJFM9AX', - '39ZEaLMDxWi5EWx9cQ2W3ixDP8rWHhz8GY', - '39XwkmkcMAakYG9E564F6RZcp1RSMhUw8X', - '3QpVtFcEdVPTWqZbo8cSZwRgbHMbSEDoeP', - '3PHu7Z1dtRYbeum2SNWFCA4Fmq8r3UeXdQ', - '39AabFsw5ew4QcAC7zpeNkuk58FoZnJkvy', - '3NXxvFdsXK8DPRuGKbhNsvtP5FoL1s6hzF', - '3Jg623UZuqvvFLYbBsqqYiBCAyWUQUDG8k', - '3DgW9QH2GoVVoqwJd3paooAScy2vusEJDu', - 'bc1q8nne4amt4wjdaa0yxuzyw949xjd7fh2w9whh4uvh6haf6c5n2kvswnxk0e', - '38jFY6wBwBpFHtM4L88jF5o155SRVvr2wT', - '3CtTopUBx6QZomCjQDvbW65RtgsWn8g9LS', - '3KPPCAsWf6dxamkMBTeH2svaTVS7xgeL9q', - '3HoEwvrqYRnrizFN7gTg5ouSbV3Tek9pab', - '33yFzhVfaY9phULdN8kBfz2UfyUVZhFHNH', - '3Akts59LQNb7GU3gtHQcxh2r9zDfyUE2FJ', - '3EdYLLYiYpoLt9sEQ9KQQ3LbF56YRoiFPw', - '3GGLdxjaqvaguzTX9z4UTYaCoeu6sUyvNi', - '3M8Xbr9vobCoxMCWwxsS9doTP6HNQvx3op', - '3LcquVjVeDpFn1oJBs6mu2H5cc3EVCcJ2i', - '34Nr2xntQYxtnBARQmzswbuB1hNhnKvkoV', - '373oyKosqPkcYEsF7ipbw13WwDmvoNGgpG', - '34dhaAMB9sCBidT1LpjpbmZjkecsDpGhxH', - '3NRgSpzcsGA5mkjKinjTgBzfBYc9CBGXwW', - '3FMAKm9fEXfNXYtb6qBGaJvG3DRKtvPy5E', - '365S7mJV4MVqBfutYw65KuURCiohnMhzWh', - '3JJ4LULa6VtcVVxZC9tsNN9JM693mcrCeE', - '3CB7RwASFyWfYNCSWrri8crPhfK6yynMQ9', - '3HzYEwURshSeJZJn1ak5ioHKQV5rfZPXY8', - 'bc1qvusjx72vh3qkvw36jdqvl6sdye8ne8hfdaveejprj6xc24mpd8wsrf6w07', - '36U5xAL6FzFetzebPNT1ZQnANEk1TurVJr', - '3LkDsn4LZgYnMqZF2wAXCVs6kc72xpNLLz', - '3Gmt31zvMb52fJRRvLV3Pr3XTeDvVjGHAr', - '3DdCY3f5Ky92nSen5M2M2bzbBLUhMWafG6', - 'bc1qck2mvm6wp8xqxlk98eyl89kgwtmgw02cgqwsjstkg4uerqpqclxq6se9wu', - '3BexyYLsJQuN96qDRsnrU9yACnUSxxjWXx', - 'bc1qt5t0qhww0w7uaczxn9du7yu2l2hgpnen06r42u98du3cs6tqvezqatj38e', - '36PCQLrcXhNG3BZPeaND3zCW7cHgzDVYp3', - '3KGGtqwaQahxaN4GovThCyNdg6THK17Lrv', - '3FLnTqeKpK8CXiEA39b77pCT85sVWJXzN5', - '3AL5dD3jvpDHu8Qn7yZxGdpztWxieKxF4R', - '3G7e21FgygBmWDRMykauLANpuBK8iKqXpJ', - '3Kg2JcNnBczmHSX3udTfrKdqDy1gkrVZak', - '3QJBNEMY6TezfEBXGoc5PUKoLSCcWUd1Y5', - '3QQ8Cotsxbs9qrAyqLKaPjofzvcy5qipCY', - '34SG5K1QrntsigARCZJxNv8NwfSmQxPsDi', - '37Pd5nJZyXwjoGSwKW3ivWfeaW8VSjCey4', - '39J18vgfymGnJ2EYp6fb13rHNKBASbuMtf', - '3JwZq9s3yBhi8FikgYu2RvhjyBAhnSiLgy', - '3H4T7yRpphtyzpDUEiwBTtBa3fBMvHaKUZ', - 'bc1qrysu5ykl5pdlk7d9j0z5rwak5h9rus6cx2udc0s9tqhf5842nqgsdtgtly', - '3JqwqaLxqnDqXuJuKKp41UFSiFR1CuqznP', - '3JqzTCvFxye7nrVWGTBH2CNqZ7bbFppBww', - '3KWKbaAsf5qmbyBHXnVH6YqBgP4ZcNkUsc', - '3FbmQz3WvASHgCQUz3C2JmGdkd1gQFLdC2', - '3FMrfjg6zD3CTXSHLAiRcn3RFyBR8MMFR9', - '3KeFqqpbJawWvAudsi4q8Zx9Lewponyyht', - '32G39DN4kb9Sd6hk8RKySDf1QVFmQeAwtU', - '3BqZtfY5wZk7qHQaQJ4gBmqGLnakH8ybRy', - '3K1WNLse7M28jbowGsZmNaMV9FsM9yW3fE', - '351qZH3E9rwXg5ZDY3tgvsYhkm9CnYV25N', - '321DUXbk9gEEKG72DU2TcADDyfZXkX3fHP', - '3E5jAXsSi5x7oj6GQuM6WQPuVZaXeYd3sU', - '3HEBzhigBkmhVf7kx1KFXif42AqQWr8KH6', - '39smXTQdqD2W767ipLishHV4diSV4xNFxA', - '3GQ4DGB2tfS6YrwfVg9MF7KBRCLWkugLWR', - '3AEKc9AokfB1nBvsdS8LVFJysZSQBJRrny', - '3G3Sis7s9Jjex2Pcaerh17HvSJ19qHNuMg', - '33YfoFAdobotJkMPUqSh2ms9frvRRfRzpu', - '3G38Zn3mvixfamrKJJtsubiEL5gCQAGnSo', - '3KTFyMGHcjWjWE1UqZRM3T4WnHuQt95iRo', - '3JQmpJYkZrVczaNDCyQoLe6JXV3vGFY8ce', - '36EMwG1FHCrp2MLm474CnE9rTQDWFF1uTF', - '392Bq5jWV8NWUTdV59VCqoYviY5KP9q9Ee', - '3G1no1sZwQuNYd5H3m6seWw9oy4E4Yu1pP', - '3K376tvxysV4XDtTTEUF47Xc8LHdjof6kR', - '39ciFiDp9yj1vLSxHh6c13DiVFhcBab7NT', - '3DUGtYyorAm9vhpo3KbMURMiR2CByP6BoM', - '3DeCWk98Wp6bG9apmqCCqTfRc8uVdQ1vyw', - 'bc1qpkgxexfg8ah0j0ffk3ge3d4para29r8ugx02ch7daja3s8u4247qw2d2jq', - '3BnCzXEqQi7VDMfCaGY9zbSySuy5uQUaRp', - '3GkiKw8DBm3nSqjL1mZLJdp4yq6WEkkyoR', - '3LTvYTkSk2jq4a6mPVMadJ9vzv1V6RMDGq', - '34Fg3q75hcnjyCoL5FLPKaDM1bewFCPKsv', - '357DauGAnsbGpMgAApUqTFHCgyE2kXA9SD', - '3K1sq7TwuVEbvyADV2oNz6DYX2EhWSrVxC', - '3LWHs1HvAF362RHUc6MKL4jUPWcTw382pj', - '35oBhEfzDyCMz4KY6j49iu8xjtbHQ9GL7H', - '3CZTmeG25AXcjYurJ59mcFR3BvS4onF61M', - '3C766rkZjRvmvhGmyGeH2x33ciUrZHarvE', - '3DXZB5fAv4ujHv3dfBPnU6qaDR4HDUEuwY', - '3LnMEFH8kYMeZ8d524cj4RgXMVmniHaBSF', - 'bc1q2gp7s58gf75sg5g8v6ah8z90ghk8dqksa62u27gmz850cnaclshsfjvlr0', - '3Ca537VX1HufiVRfKVogWcD85RV3iuFs53', - '3BxyyKih6788xBQKk8aMg1cD3qP1x7Gqgr', - '3LceSbWiDHYvy59BW2swjiEQZkqvaijcsz', - '3MjPfBpz8oDcEJZphpBuiwRnvCAASFsgT1', - '3DdvsQoGp4wtvCAbyNBEZjCoWoWQL6TssG', - '32ZB86r6jT4DkAtnYYSHP99xtcai8LePLP', - '36yNiwCxiEtubUpzBLGPeSBCbubCy9i3QW', - '3GQUyZH3EPoaHFzjWr5peAKSQFNGxxmVw1', - '37wL3HQgir55T4o2Lv4Ygrsgat5W7iPnnd', - '38qt6S3zQKizRnafitwEdz4dTj1fx72dgY', - '3EqD1B8pMgdRE9iPEgUXAzpcyxihW4tbgA', - '3P7a4wgoTDKn8F2g2VB62pHiV22XzJGGbd', - '3FyaksZvXsZxEShwdpNMK7awgDE4kBuKmN', - '36CVsC2nLzvFejTuBXvCFnt3p5QsKaGzwh', - '3BjsuL5pVVWBFSMtoB9cg2d2hsJzJFpo3B', - '34w5Da4HJ54AWTZVo8JrujhV1v8iRZho3e', - '3DuUe32HgxGg8RQ5sFk9drcKRVmwNCAHhV', - '3MoQyLh75Niz1s573waSP8pc95sqQcdJXd', - '3Bvj92ASRnTnqj9kdABSgXJgrBDy6XEgzq', - ],//BTC DONE - }, + bitcoin: { owners: bitcoinAddressBook.okex }, ethereum: { owners: [ '0x03ae1a796dfe0400439211133d065bda774b9d3e', diff --git a/projects/phemex/index.js b/projects/phemex/index.js index 8aaad51c9925..3bb13492a33a 100644 --- a/projects/phemex/index.js +++ b/projects/phemex/index.js @@ -1,10 +1,9 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { bitcoin: { - owners: [ - '3PiGxVdpMjWSsH8X8BypdwcsmPW5cmE4Ta', - ] + owners: bitcoinAddressBook.phemex }, ethereum: { owners: [ diff --git a/projects/pionex-cex/index.js b/projects/pionex-cex/index.js index 2c75620788e3..7abac83d7025 100644 --- a/projects/pionex-cex/index.js +++ b/projects/pionex-cex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -15,25 +16,7 @@ const config = { ], }, bitcoin: { - owners: [ - "1D2Pds2XyiDe7CknDumKkdSECuepGsBCSR", - "bc1qs0jdyydyd4kv7fwqre4suhz33mcuy3838xdsla", - "1JkmFSbqijbrv6JdyVx2hNwyE8nzEy3Cs5", - "bc1qctq0v0vecjxp4de66znkh0dcczkvuqjwwt0za4", - "1KH7cEFwFvKfnx7KjMaQUescVSigz3FMaJ", - "bc1qeplx7cy5xx37m9mtrh9qefeuswansr0c9mvewa", - "1BgvqcFm2cYRg8HCrd4qWnC7iA6tQqoeme", - "bc1qw5lxcrk7l2xsy2wx5mapdz58g29xde4x56le3s", - "1A4Ag6y473avEbjVm5N4HAqiVCE6NxLRCS", - "bc1qvdf8f85dn69csyka5tzjezsl66hdhmmfgwgfzz", - "1PDgKsiQo8hkA5pxYBwS1ooXv9jFNJCFh5", - "bc1q7wufvquhtmmd7eepjdu76lumj6efmfl2p6sgch", - "1CNEXYtt6WYZuMwJF7AjNYr39nxbrUTRoh", - "bc1q0jkkjr2qr4wl3v399algvsjuk8g7vlm3yaqufu", - "17UcdCaVWpmgpuZsKfKdWRUUViAzoQFY3H", - "bc1qguymjgurnywqac3rrplr2nmkl26cf5jyyq3vkv", - "1D9YPYQevtEsk26exBjCY2pKfhDsXTxJEE" - ], + owners: bitcoinAddressBook.pionexCex, }, tron: { owners: [ diff --git a/projects/probit/index.js b/projects/probit/index.js index 7777210d33cd..70ae05486391 100644 --- a/projects/probit/index.js +++ b/projects/probit/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -16,11 +17,7 @@ const config = { ], }, bitcoin: { - owners: [ - "19EgVpboqNjortWyhJSDAGRvHDtduqiSfr", - "19AtrEvJv7UY75tvWkXMxLUAYibxpZhFfN", - "17PpCEuQUT7xxP1ocfhvFdwQyrB5dG1dQP" - ], + owners: bitcoinAddressBook.probit, }, fantom: { owners: [ diff --git a/projects/pstake-btc/index.js b/projects/pstake-btc/index.js index 64adca0a4e1e..5d93995322c5 100644 --- a/projects/pstake-btc/index.js +++ b/projects/pstake-btc/index.js @@ -1,12 +1,9 @@ const { sumTokensExport } = require("../helper/sumTokens"); const sdk = require("@defillama/sdk"); - -const owner = ["bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d", "bc1pzq0ve6e7j6jt4ckx8uzdjyddrfda9ew8dxvrjmkxmfnj9yz68zeqgqh9cl", "bc1pjp9pg0d6wcejlg576st4s8d424zx443mdumdhvjcxx5ehnfk4xcqyru7ay", "bc1px92pntcj0wd5076nnymp787a7qczsaauuefgntxngdwvkd584xgsaagem2", "bc1pxhkczd3jq9nq50p2xll99edhxlx5dj6ztgw5pgtzszjtlvg7tl4s8ttf04"]; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { - methodology: `Total amount of BTC in ${owner.join(", ")}. Restaked on babylon`, + methodology: `Total amount of BTC in ${ bitcoinAddressBook.pstakeBTC.join(", ")}. Restaked on babylon`, doublecounted:true, - bitcoin: { - tvl: sdk.util.sumChainTvls([sumTokensExport({ owner })]), - }, + bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: bitcoinAddressBook.pstakeBTC })]) }, }; diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index 000fbaaf7bca..7291dc99056c 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -1,7 +1,6 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens } = require('../helper/sumTokens'); -const utils = require('../helper/utils'); -const { getConfig } = require('../helper/cache') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: 'TVL for pumpBTC is calculated based on the total value of WBTC, FBTC, BTCB held in the contract that were utilized in the minting process of pumpBTC.', @@ -19,11 +18,7 @@ Object.keys(config).forEach(chain => { if (chain === 'bitcoin') { module.exports[chain] = { - tvl: - async (api) => { - const addresses = await getConfig('pumpbtc', undefined, { fetcher: getStakingAddresses }) - return sumTokens({ api, owners: addresses }) - } + tvl: async (api) => { return sumTokens({ api, owners: await bitcoinAddressBook.pumpBTC() }) } } } else { module.exports[chain] = { @@ -32,12 +27,4 @@ Object.keys(config).forEach(chain => { } }) -async function getStakingAddresses() { - let res = await utils.fetchURL('https://dashboard.pumpbtc.xyz/api/dashboard/btc/addresses') - - const btcAddresses = res.data.data || [] - //console.log('>>', btcAddresses.length) - return btcAddresses -} - module.exports.isHeavyProtocol = true diff --git a/projects/robinhood/index.js b/projects/robinhood/index.js index 4f5d002ceb3f..15a591175587 100644 --- a/projects/robinhood/index.js +++ b/projects/robinhood/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -8,11 +9,7 @@ const config = { ], }, bitcoin: { - owners: [ - "bc1qprdf80adfz7aekh5nejjfrp3jksc8r929svpxk", - "bc1qmxcagqze2n4hr5rwflyfu35q90y22raxdgcp4p", - "bc1ql49ydapnjafl5t2cp9zqpjwe6pdgmxy98859v2" - ], + owners: bitcoinAddressBook.robinhood, }, polygon: { owners: [ diff --git a/projects/rosen-bridge/index.js b/projects/rosen-bridge/index.js index 35fbc3262e80..b2805905b47a 100644 --- a/projects/rosen-bridge/index.js +++ b/projects/rosen-bridge/index.js @@ -1,5 +1,6 @@ const { sumTokensExport } = require("../helper/sumTokens"); const ADDRESSES = require('../helper/coreAssets.json'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { timetravel: false, @@ -40,6 +41,6 @@ module.exports = { }), }, bitcoin: { - tvl: sumTokensExport({ owners: ['bc1qs0852en99dfctv0egj2qxnmc79mhjgn9ap975t']}) + tvl: sumTokensExport({ owners: bitcoinAddressBook.rosenBridge }) } }; diff --git a/projects/roup/index.js b/projects/roup/index.js index 0d424ca95900..edb73748678f 100644 --- a/projects/roup/index.js +++ b/projects/roup/index.js @@ -1,16 +1,12 @@ const { sumTokensExport } = require("../helper/sumTokens"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { timetravel: false, methodology: `Tokens bridged via ROUP are counted as TVL`, bitcoin: { tvl: sumTokensExport({ - owners: [ - 'bc1pv5lu5aklz64sye9f4zmnjkfg8j6s2tllu3fem4cs9t0hcrnz5e7qy0qw6e', - 'bc1p2tncs8egnj8e6qt46np3qla70mfx4telu92v4c9hp3pg8khqp37s9lvmfx', - 'bc1phnxqw4gfq349wm2xcqgqk77544ssqwa6ycuhjh7hdxks4mtjg33qrfenw5', - 'bc1pfsu3ts4equ7rdy63dgt7shkqlu2n5kw8p0z7p7c8lsrh2yqg40fsvz4ev3' - ], + owners: bitcoinAddressBook.roup, includeBRC20: true, blacklistedTokens: ['roup'], }), diff --git a/projects/silkroad-fbifunds/index.js b/projects/silkroad-fbifunds/index.js index 3adb8f92247a..8107e70c8472 100644 --- a/projects/silkroad-fbifunds/index.js +++ b/projects/silkroad-fbifunds/index.js @@ -1,14 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -const config = { - bitcoin: { - owners: [ - "bc1qa5wkgaew2dkv56kfvj49j0av5nml45x9ek9hz6", //https://www.reddit.com/r/CryptoCurrency/comments/li1fw7/btc_silkroad_stash_seized_nov_2020_by_the_feds/ - 'bc1qmxjefnuy06v345v6vhwpwt05dztztmx4g3y7wp', - 'bc1qf2yvj48mzkj7uf8lc2a9sa7w983qe256l5c8fs', - 'bc1qe7nk2nlnjewghgw4sgm0r89zkjzsurda7z4rdg' - ], - }, -} - +const config = { bitcoin: { owners: bitcoinAddressBook.silkroad } } module.exports = cexExports(config) \ No newline at end of file diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index 16a1efdceb13..ff13d82b7e7c 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -1,20 +1,12 @@ -const { getConfig } = require('../helper/cache'); const { sumTokens } = require('../helper/chain/bitcoin'); - -const bitcoinOwnersUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/refs/heads/main/bitcoin.json'; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') async function tvl() { - let bitcoinOwners = (await getConfig('solv-protocol/solv-btc-lst', bitcoinOwnersUrl)); - - const owners = Object.values(bitcoinOwners).flat(); - - return sumTokens({ owners }) + return sumTokens({ owners: await bitcoinAddressBook.solvBTC() }) } module.exports = { methodology: 'Staked tokens via Babylon and Core are counted towards TVL, as they represent the underlying BTC assets securing their respective networks.', doublecounted:true, - bitcoin: { - tvl - } + bitcoin: { tvl } } \ No newline at end of file diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index c990800bf0bb..b3a1e43bb308 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -22,14 +23,7 @@ const config = { ], }, bitcoin: { - owners: [ - '18DowXoMUQT5EU8zPTDTrq4hrwmi8ddCcc', - 'bc1qfu6su3qz4tn0et634mv7p090a0cgameq6rdvuc', - 'bc1qutkfwnuq4v0zdkenqt5vyuxlrmsezldzue5znc', - '1Mgs8zLJ7JyngcNRUscayyPHnnYJpJS5x2', - 'bc1qc8ee9860cdnkyej0ag5hf49pcx7uvz89lkwpr9', - '1JgXCkk3gjmgfgjT2vvnjpvqfvNNTFCRpM', - ] + owners: bitcoinAddressBook.swissborg }, ripple: { owners: [ diff --git a/projects/tbtc/index.js b/projects/tbtc/index.js index 37312c2ab084..a749ac298f21 100644 --- a/projects/tbtc/index.js +++ b/projects/tbtc/index.js @@ -1,17 +1,13 @@ const { sumTokens } = require('../helper/chain/bitcoin') -const { getConfig } = require('../helper/cache') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') -async function tvl(api) { - const { wallets } = await getConfig('tbtc/wallets', 'https://api.threshold.network/tbtc/wallets/pof') - const owners = wallets.filter(i => +i.walletBitcoinBalance > 0).map(wallet => wallet.walletBitcoinAddress) - return sumTokens({ owners, }) +async function tvl() { + return sumTokens({ owners: await bitcoinAddressBook.tBTC() }) } module.exports = { timetravel: false, methodology: "BTC on btc chain", ethereum: { tvl: () => ({}) }, - bitcoin: { - tvl, - }, + bitcoin: { tvl }, }; diff --git a/projects/toobit/index.js b/projects/toobit/index.js index 99344e2d86ed..ec14f449703b 100644 --- a/projects/toobit/index.js +++ b/projects/toobit/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const config = { ethereum: { @@ -7,9 +8,7 @@ const config = { ], }, bitcoin: { - owners: [ - '3926KKKCqcLaWpAau73TMo19sNv23s1wji' - ] + owners: bitcoinAddressBook.toobit }, bsc: { owners: [ diff --git a/projects/treasury/india-covid-relief-fund.js b/projects/treasury/india-covid-relief-fund.js index f75c213016cb..8a8c422174a1 100644 --- a/projects/treasury/india-covid-relief-fund.js +++ b/projects/treasury/india-covid-relief-fund.js @@ -1,12 +1,11 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { nullAddress,treasuryExports } = require("../helper/treasury"); +const { nullAddress, treasuryExports } = require("../helper/treasury") +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const Treasury = "0x68A99f89E475a078645f4BAC491360aFe255Dff1"; const Treasury_bsc = "0x5C9E5571B17D91e6ACcD4F0c29bBe199Af1f7B09"; -const Treasury_btc = "bc1q220k2449fau0pxu9hfn28q3w4k99ep9hwsa5fa"; const Treasury_trx = "TSZMcrQzMLdKrgiMPoe2uQMHLeEpkf2j8E" - module.exports = treasuryExports({ ethereum: { tokens: [ @@ -40,7 +39,7 @@ module.exports = treasuryExports({ tokens: [ nullAddress, ], - owners: [Treasury_btc] + owners: bitcoinAddressBook.indiaCovid } //https://cryptorelief.in/transparency }) \ No newline at end of file diff --git a/projects/tron-btc/index.js b/projects/tron-btc/index.js index b12cff75602f..b1f938681e1e 100644 --- a/projects/tron-btc/index.js +++ b/projects/tron-btc/index.js @@ -1,19 +1,13 @@ const ADDRESSES = require('../helper/coreAssets.json') const sdk = require('@defillama/sdk'); -const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); const { sumTokensExport } = require('../helper/sumTokens'); - -// On the 23/10/2024 , defillma receive a PoR from Tron/HTX team with the respective BTC collateral backing BTC on tron chain -const owners = [ - "1NBX1UZE3EFPTnYNkDfVhRADvVc8v6pRYu", - "14NEbSYdjumn9h4spMjbp3PdUpeXuM5PBZ" -] +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Collateral for BTC on tron chain", bitcoin: { tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners }), + sumTokensExport({ owners: bitcoinAddressBook.tronBTC }), ]), }, ethereum: { diff --git a/projects/wbtc.js b/projects/wbtc.js index fabf04576ac9..e823eea80f89 100644 --- a/projects/wbtc.js +++ b/projects/wbtc.js @@ -1,349 +1,9 @@ -const sdk = require("@defillama/sdk"); const { sumTokens } = require("./helper/sumTokens"); const ADDRESSES = require('./helper/coreAssets.json') +const bitcoinAddressBook = require('./helper/bitcoin-book/index.js') // WALLETS FROM HERE https://wbtc.network/dashboard/audit -const owners = [ -"31oMgrBjhbAr1ZZjFUFYfDT1ZYvx3Qp9qL", -"31qyn946XELbPKMaSWhk2SfFN8ikqLJ1GY", -"31rYKY9PysQgRoc6eB9fwJ3e89F5dcvRM4", -"31sADuWnUApAxzXJZTaEziCn9DhZVUajwK", -"31sW8NHLr9MELRdoGPWrEk6wBd1pj2uzkB", -"31x6dwHmXYHqd7YiwvJNPX8ryvDj8Cdht1", -"32Cav9GPxma3wRprn2FtPQ7gxmCZ8ZEmzv", -"32Ks4Rtb1A5NtzexGq6zEeqHta6hoqvCZW", -"32Ver3t9feJgByfNLF8pggtNFPMf22iC3Q", -"32fN3YjNhtAzUjBHfTVFtiPBFPgy1MkBAC", -"32hJnfPp6ZDnmkJ3tosoo6PvEemFr1z1Bd", -"32hPQh4EMBS14BMutrW2WJ4V76yxuXHJdF", -"32iT1QaoQD61rZgCNLccNqAdbnx4HwgvZE", -"32m8wzKabRRF7o6JRXN1srLSA5FzND769o", -'32oLNY3suWAZvYTBeAaFFSk32rJtS8w9i8', -'32okkzumvdoocdjN18SzbnTTNd2omQvvt3', -'337ot6fHGs4NCZwg2cKwShhrYX46g8ACtQ', -'33K5r4QntjmmD4mzSHq3WQJQtf4Dw8jvcZ', -'33PbQFD2eAouKnKVTBvZTFWE2pRzLgJdro', -'33ZA8VjwL2oucQceCP9WLEVunLkLvhaaPb', -'33epzdB4nk3FWHtUpHMQrzTWxiehSti11v', -'33gNdUGQTBT7cUbNx4892keGA2L64ixrfJ', -'33jqiX8NtPd8empn7ibEc2tn25GUx8iUE8', -'33xpP9NhBBmQt3XS1mD2g4pi1FZNuUFVR8', -'343uVxqsriiveWxekC6s3mNaERzsbfke3h', -'34CyVpeNgNNEoBdEoSSH6aTjrUZDavaUtr', -'34MPipmU3suumfX7WxTUTxmLX2uVK1Np8R', -'34MSicAL7qVGkevFPLwyc9KohGzoUSnu3Q', -'34Qg9U75RNPqAmZzF2amJ1XNGQyVek7HkQ', -'34whRPeeSYTPcihybfXmkG2uoShUdT3d2d', -'3573rMHLB3VABY7VaXMWhRoCBVspLGC4xV', -'35AY8sKs3yt3FbZpsmAtgvSXBZtvqqwc8e', -'35HfRwMwqB7sNTwijoG4fGHBmfWMm48aaB', -'35LMppVy98ofPKeUXUk79FUSkVC8yiXHUF', -'35QASqiGmQmHoccRc8pk9EtPVDFZDrFA59', -'35ULMyVnFoYaPaMxwHTRmaGdABpAThM4QR', -'35bXvntqjj5LnEpRVqU9bLcAPtT9crggYj', -'35cv1mcZBJkvkjY2KQSdmbo7Mq7E2yEVZD', -'35dn2Sfsi9qmqZke8SfSVcaggED9uJYQhn', -'35sfxCN1Gz37dq9KkpTfW56W59CK46JMY6', -'36RYMHxKrvNvrFcovZVXEQWC11LLbPE56V', -'36U3VfLRN9kbQQXRGwP5SGUYebSB3MqVnp', -'36ZsF5YgJDW25eZKS6gnZMqW4gr6wv9xp1', -'36h9DtMdqYWTxSg1yys2exZPFQoQXv8QRL', -'36jGhq48YgvjJWtEpqrc57QzXcBJQyCsS7', -'36jYq75ewM9AMTfnKRTwkPBBWwJtGg4CsE', -'36m2gCFRpkikK6AXUQGKLabKmd8PMjwx1Z', -'371SbkDHpTvRuYTwayWsBNsXK93Tj4sDAd', -'37Tgw6PStVEAyfAJT8yEvLAcxkoRYK3hDz', -'37Tob2tV9LRVzJng6Z4YCLyPsmq8n2xMQi', -'37aZoS67WApGWTDsn2rYDsxebhTdZSR1sh', -'37hV1tJYctQLPin7vCSjpDL34PpiiUTyTx', -'37kFT7mcJqgkqKbd66VbgkHSQgnys2V7hp', -'38EovPeRhGniW3cpYLJwptCqJkx9Y1Pg7G', -'38J1ce6tPUgy958VBkGGa2AmFU3LQLJ2Gv', -'38R6URq21qncKbYiiRXPi2MVx8xYRgDtWD', -'38b9cazfu4SxqoahgdiHEMSo1aNDdKquRm', -'38bzm6nhQMFJe71jJw1U7CbgNrVNpkonZF', -'39P2pJ9EmN3qmPAm1TTZPzp6T5LSsJq3eQ', -'39RMkGSQUQjifV2TpgRNYW73JK38xwA3NJ', -'39WQqCosC8ZD4S9XBPHRnnRUeVRvNctnnm', -'39e7mxbeNmRRnjfy1qkphv1TiMcztZ8VuE', -'39mayj82aZdb6UWs9qQAZZrC3VzfxUQP7c', -'39pEDUwFFj28sN5muXrmT5mAbDJSf6qEL2', -'39ydxDT3H6KygeXQn8f1tYXk6BtCTrsutw', -'3A25qkpmhCrYGEZh39wc71u89dSXGCYSvd', -'3A2wJ7LBiR4NhPbJSLNVfzZk6vDeYYPrit', -'3A37hJV9JPWR4UMCXC3QvKSeVGiRwgGtiU', -'3AKea5UYSyMc2oRRdQYhkn57nXWMm5woDz', -'3APCmmVbkpKSmLkTbGUvdPUyfqA4CZ25a4', -'3ARRJS9VNVkMdiESpxq2AGfpZUQRUvdGgd', -'3AdKaaTBFPQgpFen9YERPmrfV7QVvkYQfp', -'3AfJyKGXVBUcaWdyJeWxsasq1dHPw8pRZz', -'3Agd6vor95XcHvf1MPKE69KEpNbZTKD6JF', -'3B9UDWZNPdtL81JLnnPEJoiurcmaGx8DZm', -'3BCWh8prqQDsZDi6Pmvut9HJrhii1Vk7Ak', -'3BCm2gVB29QDFLWt768jjTwKoe1N1QVwSU', -'3BJJ68V6H1CoEx4MWdhqVk2kFpPUNVbs3T', -'3BPbdokvatbZEFJHuVUstG9zeSDLr5RdvL', -'3BTqdvZt5MYYWLAGXt8psAMSAa8Gh2AVPA', -'3CDy1xZavmpd27jV6TZm5teH8U6hrdXRES', -'3CPEGQzA227hHR2jUf66MdgBJ5wPnDdaW9', -'3CQBneh4TJtHGUP4QS3mfJc75NoiGgKwV3', -'3CdzzKFGY7ZahrMCM1tBgoxrgSPUWX4RVY', -'3Cr3vRcZD5q4XbXCVTo8sFCN9Xb7z5isth', -'3CrWGaRncSudU3EZPEhvWqeU2PG1xutr5x', -'3CuoRMhRXvsxdYsNL4kmKDJyAhaDB7SmBn', -'3CxK8MVHuqXW85z4MF7A4FYk8k6jKPFgPW', -'3DDUy5Ze4TaqKFpktAhHcmmffz9KKGtTrb', -'3DJNy9xMcMsNdmdipTgqME3TJCRkv7uS2g', -'3DhbEcm1SuJjTRxZBXxHyceYGm7GdRB2pM', -'3DiJgisVit4pqj4ByKxi5p1qdjGDxpGfR4', -'3ERNo3RAgP8o5jqELPKUEV47ADm4JtvKBd', -'3EedqW1fD4QRFmrPgkZZZvzHRzj9f4xVSX', -'3EmKqHZhXic3TymhuY8NLS7Bdk91erm4V7', -'3Epe1CixppBP9QSQ7DkvsWNKsgifTaxMY2', -'3ErNFK17MbH3GAGfakMwTrKo8uHmBuuVX1', -'3EuEvwodW88xEuwecsLb76x16tLxcUZAxx', -'3FDtvkk7hpZq5GuEJxt3Ps95vjtdDEfJ4T', -'3FFgKaYkEf1M73QtzuY9DGqC7VeM2sAQhT', -'3FHRnMSaGMAaLcoHbA5EVcEuYVxTEZdTyp', -'3FKkCxSZe1c4xZiVyJVBTbvzs9Lj1snqVC', -'3FVsTChmR7WYgfnU3CAmrrD3kqmaRMaJCC', -'3GE2pWumzKXnNMA9PFggsBwyk7NYSJvGGg', -'3GTk9xdRHnPQ61Pm7Jnv2Z8hsXv5FMVyeY', -'3HFrW63zQ58PypYhSYgHB2gij5VirsyRAm', -'3HGSCuXjnfEncUCPQ4GzNrv3BHcmLZFdeT', -'3HHLh4HSK8wj1w3YW9i4Chdnuybgadhpz1', -'3HM8YGKhwwnZKmrUEoGroEgaG3dv8xkVZz', -'3HVCDPPbAqiRwRjXhvu7PSDkLGgEajexuH', -'3HaHcbNmhJKgJ3dtbm2tg8XH87BJkRx7QE', -'3HauLvRoUBueiiLwebk19w6rnUTYJkdwNW', -'3Hdj2n5DEKPGsRd5md85exAXdwnRbomWTy', -'3HpHptRrwK5x9i7uULvk116QhsAnRJfJb8', -'3HziaqLNy8PpyQFLdwr2yxCjwEjRUjN6Eg', -'3J37HnDBzWN1sm65mbD9U5zvKrp2bzhuYJ', -'3JDewabYE785vTmaQe3MuHvUvEZJQTx8HU', -'3JMDjCYxxi5MF3aXRx8Dg13Rign3masTXj', -'3JcNkH5QWYuSfiQYADq4yV2hAYnQ8KC74t', -'3Jj1juATP11jHfBvRiu3BbzdJCNeRskqzJ', -'3JqwUY7pUwEWu2hz6mwzZKSQnvKyRRXCQM', -'3JvmhjuxvLVM8NQzAwwMvzWAK6zDLQ5Aor', -'3K2mpXMDFe7cT1baogitkRGeXqCYeDw6J5', -'3K43ux5cCAxfKgymq5eHnHS1toC9nrERbT', -'3KAGrSyTsKLckBgN7AiAfojbScfjGAHwFz', -'3KT7jvZyvhok3fkZt8Y9w8tcqpyQW5Jg8s', -'3KTeq879YjzhqkAXzZmdapJAVC6qz5qEth', -'3KWe9k7TG2j7xNw8BP9YHXBeHy1knC1xGS', -'3KXKTXR9YxHuhm863nqnSrKznkYtcx7wC7', -'3KeG7RzDwGaTywRfQgPCQaeyMgi7C89eQc', -'3KwPoNu1FxihhyRKjv1VG6C3FPy8vgjyse', -'3Kx4doXvL4UhDrKJqn8FoS5wVU3VeS9ebM', -'3LScoRmRA3kknxF5dLxz6wfw3z4LXRiVyT', -'3LbLR4uiq7RFrWgDKHfdgktAC88qtwY2Li', -'3LrxWneLHwvbNrMKXorkc17wxHqCCpNGkq', -'3MJ4rpTvuiTxYhTppNx7NokNUDZg26ofi1', -'3MLH54DXCtmydRocRZz9pEkfTTGWribBa3', -'3MM2BiaXBACfKUtVsyNr2RDXyNEhunez6v', -"3MPcUSHeWCSxCUsJtTS2L2zZfWLvorNFef", -"3MUJjyx13waUriNPkVnemdoJAiJT6nBmef", -"3MkzCjZjodyaBXz7W8i9NTjduEdykdkd89", -"3MnCLWSq31hetgbVA1Xn1VxVVb31SPeSKa", -'3Muz5dT5EguQgTiXgQ1eqJYNkjjQuSMgsb', -"3MwfxJqsy943oqYhbdKiaBrFSK9xbyiAi9", -"3MzRi499Cbcr4795iRnznfC97EFji23h7n", -"3NW5tDLFceDb1a75QkGampkuuceZ3YPMUX", -"3NfBFZRgKfHVJy7rSTutZyGpa5M2GpRdwu", -"3NmVi1xVYZj5YXU8wcQyoUfcVRCLcYhqqQ", -"3NsC2NXzKum7sVWQLQ3YYB3o9JbTz5FoaV", -"3P4EDeK5fxCLEQzM7iQ7n95DWgG1cXSaqG", -"3PRCCQMdWwjEKy89iVdL8LouknsgygwWpL", -"3PRHbh8ajUXv5wPD11CxFRs1hWBo8vR3zW", -"3PfcB36gDa47YkrbRtzZSwmrKSMsBSrhr6", -"3PkGNCt85M3aNQkBqiT5Psgmz8FjNujEKK", -"3PnoF45bZhJcPKGLf4nQzyQVAEFsxBxQQa", -"3PxV5m54ZwMDheUyFecvRVQHJK7WG1t49V", -"3Py2iN5SEwSCtT5QHkDU1qhbvmdmMZ8cpK", -"3PyK2LYBfYMUXsa8sMhTSHQZ8StQy3Xoz8", -"3QSd3JjJ35VAf5Shv3EPVpGCi5eVMQr6dk", -"3QWaxXXXbobqpWprekwzANeFuNrYXmaNXU", -"3QbVP6bTSXN2tXG66MTKtHtiJ1coKXnrjP", -"3QdyHj1i4y5CywEFWJ5PwoqGzDxGyJGPeb", -"3QjqS6A7uyoCx1vcXQoqtLatubFmsHe1ps", -"3QmVyCw6YnEvt1jXLeF5863uHPLRaKhWs5", -'bc1q02kjkf8gp628thqdfrm54tay5pjw05w297d6p6ez5andhp9gf0nqjaa2e4', -'bc1q02py7892mlqafaz9wevclp8ve4dl4z6hy4sqp973sz2u4fvpxnmqnzfc2f', -'bc1q09z8m23n7w7gtqsxpgwun0zvra9jwzf4z9c48cezq36q3zvmsuyqdmyjkn', -'bc1q0vac8d7jkyds2ux4jqwu6mu943z8keyxq4twaw8p8md8j8rtj94s9wrrl8', -'bc1q20yv979atkvtmecs5kj88a0pmf85ht500pmp7p2ztd54tz0u60psj7c702', -'bc1q26ds9juuyjtsek5czqasrvmptf46xan2hfyx88jqzpz2pzly3p6qrwd6e6', -'bc1q2az30y4lst2x9wlu77kzzdym8n9qr77n0kqmevs4ahf7dmzw624sck5vm5', -'bc1q2ssdu5v40zmntqc76kaxw0xf67eathhpg59xczh9vpp2qlf3mdrsgr49s8', -'bc1q2vlwakkk247pnppptdv3kgxj23yptykyd3ge9vvlk2w8h98v7pysmmknxv', -'bc1q2wyzh5ex2cr7wcth0zsm7ueycg2rkfw28fy2g6axky6r9su9zcls8qngt2', -'bc1q32phcv5dhwkw59xljxsz2nw8g4he4ssduw7c6d3d6005skfy9gysa6crgk', -'bc1q35fxxu53qsmv77cjt6ucdj5wu4r8rae8eakq5j5v8nzgjtcmnpvqp6g3sf', -'bc1q3aqsr7dsajmslelacclkgmmyhd7t6hkeevpw50f5areathvfmwnq4nwt3y', -'bc1q3cpmjfcfkh8t47q99y5wgwxzvhsw8lywzgvnvnlrlwe6h8xcqw7qjwf646', -'bc1q3cpz06gvfatn0rgamwk7lws7c7qyt4napdr6h7fsj54zg2fy9wtsahl7xt', -'bc1q3eff85qd4rhuu8gvn933fvtzg0ys3y5amchq8wzhhylhqvfh8kxsu4kde7', -'bc1q3l6qerg2gyzxpuk0mmhswkgedrqcqe3eesyhatwauyv980syulfspttjcs', -'bc1q3qw5de93m5ukxra5md872kjyl29arplm8c4vrh9jggsxp88kk2zs74u39g', -'bc1q3uzg46kmqexn04rkhsd74t34225tqv88xp3jglr2hpxxu5ujrwyq9amgrx', -'bc1q424nhx6tpljt65aren3q5hmsx4dwt22g9574lpjnlvtc309gtkhqdtwcss', -'bc1q47vlc3v9vfqh2sr8f47ukaws408wcr95r27t26y9qxgc72yzg9hs58yzek', -'bc1q4agva2hg94cdr7xdeg4e7wekq0vkrqggn4kqruns85e69xtx750s7dc2hy', -'bc1q4ma898qglhvqsjs725emwtmayr0pwj9nmgguqac44styjpjc04ws8hwp7k', -'bc1q4nalse7wwqe6sx3slmkyywetlzn3tdud77jesadx02v885qjs74spqtg5w', -'bc1q4xmshjnx7up2940zld0dls42jnec86drca3ph7cjhtsdlfgq3ycsntpvpw', -'bc1q5anhs0xpsayee84r5yqazljkfn9k92d6dkjfpyq509sfmsdkhfts2vh8l8', -'bc1q5d93mqzlntc95687tq2un302rnfa6vnlnche7pdxzuypyl2cewnsqrzxc2', -'bc1q5nzdfhdjv6dh5r2pgdmtxhvkan8stl2h7zrhth908slszrzu2snqm3ds3q', -'bc1q5qv0gtcfdumqrf9fjhd82uud7whpsam7j9e2dq3k9jy3mj2rm3aq8yj3u9', -'bc1q5rxwzkcl9hux2ltuppg5jl4c4ld52l3hk7kq8g6qqnjluk6kq5xqp5dpzd', -'bc1q68r3tjqwch4q5nyqf03a3n3ugcef75klsmqfa4g72k63npwn59hqj2d6hh', -'bc1q6aw25ef99245cxc4l9m5nvn5fel6tmrze3nfxtstv08yf5jkdvfs5rrajc', -'bc1q6xdt8tmlp5p6exvsmuf62yswm4vnk0rmm950sdhlqgyxluahv3qqquz3uh', -'bc1q6z0cm8gzhxz87e5xdlvkpnldj9zspustx7hedll73zg4n0hqemhsrm4d8l', -'bc1q7awsmqawsstwlxtt48lt6y2hv2qjsju85jgz07yr4hhdcu5df0sqwxc63z', -'bc1q7h0eyvjp58p5wz563p04lhjt2nef9q089mcdchr9jzz74lq5wzusqckmj2', -'bc1q7trechgv0g6kgwdcu3wsxkqn9lrc6edzdgvdvpt9a9rg04l7gtvs26hps3', -'bc1q866pgqwgxvuqvqmkmcfh8n52dtgz3fv3nh5cq3mufqv0ssz8q93qc2eadh', -'bc1q86aapgzcr7078499tlhp4aatylujug9d2rxwccaekmjgv8j6f93qljjhx6', -'bc1q89mxkg0dhr3m6vs2gzr3wqccwpzrmnpsldnjc22ztldhqueawtzsq82ydf', -'bc1q8nr29r27mlkvj0duseshuw5vueywt4640tyrt9jusrk0c9kz2klqg4n66l', -'bc1q8qlz3znvuq0mk62j0dld5hj3a5uf2y06tcuvtz2x3gffs6gxejnsx2hfk7', -'bc1q8sw5c5sx3s0r5tujaq6hahnjq88yvrdhepss7qdfaz5evjux6nls63mnuw', -'bc1q8xamcp8xc3rdh4vqtexgrqfmwlkw0mkruz3gkwaw027erjsrnd0see34cc', -'bc1q8znctxhsh6knhp07z7ufw8zusucef9vxq7rjrhgf0wecxl7aqcrqz06gmu', -'bc1q93hcme2prs7upr9zkdakl85jje3leg8g2qf70kstacjuyzy95xkq7h35ft', -'bc1q99gvfs8e2fsd8zw74wdg4fmfg46n2uf5pjlpt87h93qar044rspsxwck6k', -'bc1q9eammdvuqyhswd3wqp84d56ah0hyuus62smarhsdw3l3rycjgrhqsskvuq', -'bc1q9j8l760q75cep90p9gq6dsj3p9d55ewpwkhcmw8dnzcd7tmfg03sc0vmqh', -'bc1q9xlm3uydvuu3nn8dan0zqyr7e6p3pjh7gxnw7jyv0tujl44dgt6sedtus3', -'bc1qagrn5sn73azr85navkf0ukh336qvktfunejkzauu9adsuvfvpklq6qut3m', -'bc1qasluf865jx838k9nad2r2rnp04w3txqtyu7kapuxrv0m7rv90sxqhvjxuv', -'bc1qc342v9mt8j354pjyaqkweu9nrztcj6cc8udgyezk7dxhjddjcn8q7w9fuc', -'bc1qc46r9xy82z23s6q9lglhzf60fdxxq5y26x34kdx7dx8549mdtu4slym95w', -'bc1qcd7jv45swrxgwlj55gfnlxf3tvsm4ek0yer4xac5a909jtxzrgvqyv5v0p', -'bc1qd7dd9qc0pehqx5a2arlpmlgh30xpfufx9hpf2kfrnpqz2x7jl0xqpmcru6', -'bc1qd8wk5eesxtynkrjx42temma0spfy0955tr5e5lp267aqhalvpjwq79l4yh', -'bc1qdj65qknp4cnvxagp0pqnjl3g7d3s8gzxqzrrlh6gutju0ytdfwmsfeetdt', -'bc1qdt0gu9n7ykyvyhe4v7cmftugsn5qw59rm4tdxn4f8vxs6s694n8qp9u2az', -'bc1qe46f05uenszej6hvzmxjw8fxyskc6utv4cueeaa77jjea87vjh7ql8wgd5', -'bc1qe4we3wxhj4f0wy40ftfxfvawmt4hgkgvtmpnn3lv5wme8yzfrltsckhg9g', -'bc1qer4qvha5nxz09qn7gt7xntvrz2crnaxrd7ju4nmcjm7r9uerc9xqa9gdxd', -'bc1qesmtfxs4n4ws86242uqpztseyh7l5tgswd0zce5nggaky44t9c4sfwczj2', -'bc1qetecvjtaya283z7zk9lftqtv03ajx27ekz6uxjpscpap7crkvgmst355jn', -'bc1qeuz6l0qusf9pd923v8w086j8umn765a7hqvu4su0dfq90ckym47qhvaux3', -'bc1qezmmhc5k7ccnc6q7l8dhkg9phcnehysq2y3ahdzzcweph5ang9xs0egasc', -'bc1qf5p8wp6neu0raugt6t7zhm6vjhy3taf8q7rqwuhgdmdnhvpz2c7s8xtrtx', -'bc1qfcxzh8ag5pv37qywg8wylherg64k7skz0qm0ghc36x7awrd8xszsfxc4k3', -'bc1qfenuya7nskcjlyxpg0gttrjap9e5gtncxga0vvl8rekyeup55n0slzlhr8', -'bc1qfeuww8le80ae7qat3kpzspsh7pa8na3qx9fuc4qpdt3w5q3dkavsc02wk4', -'bc1qfn70w8peuvvywupd8u667g832necv3w6sqellzvd7aaj8l52nhhsfzs6a4', -'bc1qfpwewuyg8erj2cejamms0682v7ncgdgufdq8efa0maef3uzunkgsvdwyzm', -'bc1qfugah0e9fw9ze34dpqf22yxqxnxh49wrcq9d3kuqc9dydfhn4pjsjqfpky', -'bc1qg0amsvtlglecc6x46rzjprjh7wscjzlgqu6n52zw9nz0cck2r5sqwew946', -'bc1qg54vzuplejd6ymxlma6q7rfyc9zqqes8wvz4xs09mhpclak9z73sf3x3km', -'bc1qgs30czhkxhxn5qsunlzac0xeznyaxg267p5t8gjupzg7u97vz4zqyuf60l', -'bc1qgsgj3dh8dztq05v9dzethjcpjqtptm5tsrruprz4w7awzpfrku8qjjegyc', -'bc1qgxww03juwr8vfp28tzpmyyku3j6hxrgpl0v6natkk2ucwu4weweskcqvnl', -'bc1qh4r87gzpcx3lz7faz349yvp8yr6zyr2706m2xzsuwcwlptkqsj6svkaqtf', -'bc1qhagykgzhhh7yt5knsypklpqsgdelrvw5vz73erujapcgh3x5wxrq8c0y9x', -'bc1qhgfkccy09hr7hlky0jeyz89afan8qh66wa26t4se4mlqda6298hqrtk5zr', -'bc1qhkw43w4cvzec3836hqrdmxksm20l35yk7gnvysqprd6gareztfsq4uplfs', -'bc1qhm46vtwep0awkdphurmc2ku3lfp8l7z9f6wn9va42lc3z24zd2fsvnvzk3', -'bc1qhpnmnswf8ls2q97vg4qzlr2a6c2xpr46zp59e7q9uh5j59ask2ysld0euq', -'bc1qj2dz58v8etgq3aud24yrgffk73d9cue80kfswl58d5w4vvhdfsyskxtll5', -'bc1qj38tl824hkgl7qluy32lklp6qfd9d9zqa9qlyeh28khfh9grxwastu3xnw', -'bc1qj8vt7h7ufrgqlhhcu22vl3jrvx3kluml57kha352k9fex23jphvsuwme6r', -'bc1qjgua88vymvkctq9t4mcd4q4mlqnr3r07lylp90f7epc9p6qcv6asteyjec', -'bc1qjpgs63vqgfkalm8janwmelw4mr4wg50axnmx5ueh4ru2xnl3lg7q80yl32', -'bc1qk8plwr04uu6mvpcf3wtfmg579ztqn59q7yfx39drl9r97q4wcx2q43rvw3', -'bc1qk9fhnvv7a0nxzxxj503v7mfy3uwdugymj09ugkrda5895cfxa5vsnzp8l5', -'bc1qkd53jhtmhwv74x2c8hnnfzspatcjdzk0h3f2czqzrav0yxpd5y4szkslrs', -'bc1qkn3s4hzjthfmt68sk30m69knjauwphsha2paqzexjjmlfc6h7f3sggfn52', -'bc1qksptar8mpay2mfwzwep3aqxevnc8jj8d4rd82v3v0hm5p3y93w2q5eufa8', -'bc1ql26wgacxjhuefzcph2wpsyftqzd07kzkczv60d85hj7280qkrz2qlgrhf7', -'bc1ql33nnw3ngcf343jtmzpe8ps8809nqe0530rv6neu7cefkz6dtcfqn3wzav', -'bc1qlg2gcz8hzfdt49jgs0438c7ahg4967nfkflzj3m0r5dz3xz7njrqpxxj2j', -'bc1qlnz5vejmvv6sdy9k3c7a07nlf6c053g0ren0m8kmmsrx677nyllsg6qr2m', -'bc1qltg30ayn5wexka07ta2x5dnfjf20rqnemf4sfnsase082yfqetfq0s20hv', -'bc1qmfjm5hlgjfw3tc6cz77nzjcc5xg5mjhrlm6kqewczapae2yhucrs5c0qvf', -'bc1qmfwcwfntr2adas7yz5l3wn6pnm8rj55l8fk5vgny34wld6d0vfcsg48tta', -'bc1qmfwq5cjm55m0kcfemjyv6rj8nfunslfjtuhyqawksw892dhvu6wscem2t5', -'bc1qmmdfeczme4q99ccpmgfx3zxwwwff9nnjhdux47hucwttrjdpqj9s2x8rds', -'bc1qmur9p99tzxtrq0232tl6nssyejrmwet3m265xg0cgl7uh2qxsy7q0m8fvu', -'bc1qn3r3kqf90txgcsdxzu2s0p5avp79axlf98lzrwlmpnmxc3ak0vwsuxrepa', -'bc1qn8w83eglpp7xdtgyjaysgrve5cjjr2yfhsq2x5xyn6cmvup0uwlsq2t5xl', -'bc1qnpnpcn4gwssvkjpe27zzfex2t997l7garmc2s8fenmk0fpydek2s6zp9yz', -'bc1qp24kgu3r5n3q6k03230yj6dzr4styppjlvtr3ptdsd7sxql8pcgqwall05', -'bc1qp27x9j8damzuxc0x7cqkcaf39q4825aafmx3g6mlvh2wd5tzr8kscsjplw', -'bc1qp6cmqa7hgdean0z8jl7uf20rzf7wgvstmjlxekft3l2vn22zwl2qhunr3h', -'bc1qparrejjdyc8hcd7hgljlx53wy7ncrjkaz670w3ef0ade369y22eqkujzy0', -'bc1qpdthtpfcmju642wq4eqxl4uz5hfgtztvtv7u6wrdepnkdsugueusujpg76', -'bc1qpp5wu443kdfur2vhzwms8d46gq8c2vgu692sgyn79z56gkq4mkvs07gjkd', -'bc1qpvvt2md0t7435mc8dmlgd5euyc0636vlw8ew25e8pf83uc68km5qpvqpfx', -'bc1qpwtgr4rld3wr39r762ngvuk8qgvgkrrxra4jdnmn06z4nfgh4vtsluyd3t', -'bc1qq3p9mqvegpadextyqzxy46ukf5yxc7ej50ksq3w63f895q0t8rzsfe5jym', -'bc1qqces3upduq6e0c2w0k6mr9n4tkgvzkggteuatqc4eyxawwkuxzpsfgdxzh', -'bc1qqjmfwnxrjx0khaxf8qa6ccnz7s94k9wa8lelpdy2fn6jf9ffks8s5r4frd', -'bc1qqlm6edz9azp0d6y4mjc8j8an4q8du2jajgwj65mmz6nkk53yannqvtnvnn', -'bc1qqlus6fyt05kewddukpge8u0lszp4ffn49mqnr3pvrh2whptf2fhsy6ynmn', -'bc1qqvf7qq7wvx6pkp5aqvzdxs0rgqkjgqe7ev63hnppxq05t6v3w5ysskzjs5', -'bc1qr20qujcyr87y3uk2fgkq93u0jtzl6wa4el90we4txgcwgx6avxzsuj0wcx', -'bc1qr6cvgewvlts5f9wa8u3cpnlmth0mzn0x96ap34hknpaayuyknrlssqfq3n', -'bc1qrm7nze8cqyazdlhmw8ffeusxucqtvyw3pvtple0047tdkupdnmustkla3w', -'bc1qrsayv4jq9uf6rpmwsxan3yqxuqtyelwt7k8298ejl8h9tkrunthspnlm6y', -'bc1qs0q2svqpeaka6f8jakx74j4rydxdmxq4wz7xfy45m6t8xfxzy0zsckrym5', -'bc1qs48aaups6tzwcs372yqhakcjakfgf6w6aguj0w7gex75vrnjegmsp5hx8n', -'bc1qsgthnvghgs9wl87kzhkx9xda4xyu35cxfteupjnvxv3zuvgtdyzs9a23te', -'bc1qsln2s8xu7sv84wj5sv2pjnfpev8lkcqpzmzukmygcll26vf0kwfs6awzkj', -'bc1qsp7twu469a8p3enevzwdnjhrcmtmc7ljydqxxp4p69u4ggj9wazqa9gsgw', -'bc1qsrms3khzhupjxph0u2sy6sz8c9q4g6nqm3dy53nrlagw3lc5zmsstg8pft', -'bc1qsuzvly8z6kr080at2twdlfs8j87gu08kmwlfstafm2lajdvfclyqtvq00a', -'bc1qsva32zdzx7cd9996qdlxkpl0dnyk4s44myx53zpetf4u7rfg89fswjzza5', -'bc1qsw4hj3dvqcvtntvsflx8474f52nt6zer5k9pyem6n6g27p8nc4xsrj5fxc', -'bc1qszmwz85wktn6k7tg953pugtedmssguaavl8qukv77s5u0g5mx3tsmw6pg4', -'bc1qt3mw55ccejx97tyjdl9dhe60wvextxddg8udxz9n8q8efwhr37wseag63j', -'bc1qt4ck5563ra7r3xjqlfqm7au407q2dmc0p6wvgyzy239nyyn4vsesfwwsa2', -'bc1qteyfers4wvfhp6apw4s720tzvp9xafkvvfh7k0sxmu8vrxvt2m5snw45v8', -'bc1qu4g30hr7lz3qd9jn68x4f2ycl3s533jdtv96g5n96d40kac5l5tshhkvq5', -'bc1qu5k2h4y9cynds4j3t5d94xg78zpzhx3elk6w93e28xmxrnn37wuql9xf4t', -'bc1quljnxvuryumd7c44u7f8dwflas5aghecg8ln029v2s7ffezun86qn0wyng', -'bc1quryt5u9j5rec96c4h6xxatn74nqcen244q3dtgwtpjkma36vvrmq9mjecg', -'bc1quxy0mlwssdmzsxgk2ct42p09ef7mc9qwmpdjuzy9f3h3ye2k6jzsvmmrsh', -'bc1quywrhxx6t7mkqshcll3q99qrqlal73l668wldgrcxpa4yvuj2x3qrhsg9m', -'bc1quzwyq3wewr74vvgwa6nqfj6n6rsc2tsh046glq0n76x9alcpgmzsf24s6x', -'bc1qv0u3a7jdaygq680cu52puk4xrrr4ckpjqqgg88x66cmfnrfj5c4sre60e9', -'bc1qv837fuujjlu50z3l6y48vxkv4vd09vve58t92welmxy9lnu5l2usp6hd0j', -'bc1qva8lqtdcemj9swc6trk4je45xzckqhs3fthst2hy0k3plywfeq5s639wn0', -'bc1qvfmnrg59p8a3csj032uyzl3mdtv5y46g3mx33krz5kweyvq78f5swvdmna', -'bc1qvqaqr0jyxf3nphux7gla78dqa9psfpyy0v8med9t63f0x6n2k40s7knecs', -'bc1qvtckv82yw4efeu9ez8y37rne5ghzxeqjl3cqnsyxf4gm3zhuhc8swt5u3h', -'bc1qwdgyle9p2gcvyn22sg2tg6jaqkxewjz5xfj229p989dcteu42adqnau2lw', -'bc1qwfeq7rehmzm5434vaa485s98788cmyyrac2w65nulvucsg7cueesly7x05', -'bc1qwfydpavg240d4j87nrg0ayqhfzwrt9revzw7a9dpyxujnlpu2xus07f6ud', -'bc1qwvrrxxqhc6l9zd8rwj39sl8n39v69tju9sfc59dqxl3fjx8jnfqswzs93f', -'bc1qwwkwppejx79uszdgfrpaaqc24wepvjy729xhx2zyd3qyf3ftfqrs672m9d', -'bc1qx8xlxd6qnmqprgjs6yr4nd870tt4d8yuupwq4qhl3hh24ulpmk4qem46px', -'bc1qxfkxl66ee59xpxr30tcexvh9zgtvf7gwtyauj29n6txj7c7a9e9quhcaaz', -'bc1qxlj7ls9zptgj779w0gzfvt8chpl29xdcv5qjqdw7g462uf0c90wsvkw74y', -'bc1qxnxp0qdzx07jw3tskcp79xzs7p6p2wpwx4sn7myrx8vgj42f4prsrlcknw', -'bc1qxqnj2gdznm37yhdw679nx6rqs44hkd2lddj2gn4uyaa5htmjvmzsyjcu7d', -'bc1qxtf7mx5scgetaaz30w6ngndq8xctegjacvphz2tgky5r9et0q5uqwyks8t', -'bc1qxu9s6qy6hld9uvd75em9t550q7ppezsmkheldsyny0pzj9yd7e6sqg3qv6', -'bc1qy30syv0sqafmkt2m4h6lf9tjeddurh9cypa9p8wras2hfjf4y4uqzdz5sk', -'bc1qy6tfy7k9cjp40m2lcq2s8wrsn88jdn3ffj5ph7uvwxuamfntaylqk38dwp', -'bc1qyc4v5dtapyta9mcu5n5t9va72rzd9g75z83qxxm90ne4vzhgleeqf9lcfl', -'bc1qyd5989kz0jgayxelnz7wlnnk5gyn36v7cecjrkgvph4260aew2rsqzx3ua', -'bc1qyujyd6q7dtnh76wchgavwgxpklkwm73vqllududlx2uunx28zdhsxnvd47', -'bc1qyvpmf6uv8xgxrvcwc5w630d4vg2s9ztpd64fe0e9ylxtuy34e4lqnmv3sq', -'bc1qzck7505r8ahwq9g4xuwr60lpflxv5h75y0jntgasd0t9g7psvmqsr902f8', -'bc1qzgw25sgrn45909quqlydd9729ksj32mfcvwzl44ekf2kkgctz09qvr779j', -'bc1qzha6dcp9mq8ne7s3cxgp052qzux3jg25fp7cxpshrz0a0005h3gs30vqpf', -'bc1qzk7gnzhyqcl9x7f52lckdhlznv94k87gpm3fsafvn487euaymmasz95cwa', -'bc1qztewvcfe424fxat7s2uautmy5ctnsnurul474e2emexfnlj6upsqem0g8d', - -]; +const owners = bitcoinAddressBook.wbtc async function tvl(api){ if(api.timestamp > Date.now()/1e3 - 3600){ @@ -355,8 +15,6 @@ async function tvl(api){ } module.exports = { - bitcoin: { - tvl, - }, + bitcoin: { tvl }, methodology: `TVL for WBTC consists of the BTC deposits in custody that were used to mint WBTC`, }; diff --git a/projects/woo-cex/index.js b/projects/woo-cex/index.js index d905a62a6049..48edcacf0e4c 100644 --- a/projects/woo-cex/index.js +++ b/projects/woo-cex/index.js @@ -1,4 +1,5 @@ const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const owners = [ '0x0d83f81bc9f1e8252f87a4109bbf0d90171c81df', @@ -8,12 +9,7 @@ const owners = [ ] const config = { - bitcoin: { - owners: [ - 'bc1qh78w4qq9v2dqntjtxne97kp9u2485jdqrfsghh', - 'bc1qm4hycszv0v0qel3swxqyp57nkpnnrda4rc55lm' - ], - }, + bitcoin: { owners: bitcoinAddressBook.wooCEX }, ethereum: { owners }, fantom: { owners }, avax: { owners }, diff --git a/projects/xlink-btc-lst/index.js b/projects/xlink-btc-lst/index.js index 2e08d588ed66..2092d3811a04 100644 --- a/projects/xlink-btc-lst/index.js +++ b/projects/xlink-btc-lst/index.js @@ -1,13 +1,9 @@ const sdk = require("@defillama/sdk"); const { sumTokensExport } = require("../helper/sumTokens"); - -const owners = [ - "bc1p78mvfa550t7acg6wm9cl9543zf68ulhqkxex5pvhv8wnw4qpl3gqmpjy2s" -]; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Staking tokens via Babylon counts as TVL", doublecounted:true, - bitcoin: { - tvl: sdk.util.sumChainTvls([sumTokensExport({ owners })]), - }} \ No newline at end of file + bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: bitcoinAddressBook.xlinkLST })]) } +} \ No newline at end of file diff --git a/projects/xlink/index.js b/projects/xlink/index.js index 3be86a15ccda..e309a6e27223 100644 --- a/projects/xlink/index.js +++ b/projects/xlink/index.js @@ -1,30 +1,11 @@ const ADDRESSES = require("../helper/coreAssets.json"); const sdk = require("@defillama/sdk"); const { sumTokensExport } = require("../helper/sumTokens"); - -const owners = [ - "bc1pylrcm2ym9spaszyrwzhhzc2qf8c3xq65jgmd8udqtd5q73a2fulsztxqyy", - "bc1qh604n2zey83dnlwt4p0m8j4rvetyersm0p6fts", - "31wQsi1uV8h7mL3QvBXQ3gzkH9zXNTp5cF", - "bc1q9hs56nskqsxmgend4w0823lmef33sux6p8rzlp", - "32jbimS6dwSEebMb5RyjGxcmRoZEC5rFrS", - "bc1qlhkfxlzzzcc25z95v7c0v7svlp5exegxn0tf58", - "3MJ8mbu4sNseNeCprG85emwgG9G9SCort7", - "bc1qeph95q50cq6y66elk3zzp48s9eg66g47cptpft", - "bc1qfcwjrdjk3agmg50n4c7t4ew2kjqqxc09qgvu7d", - "1882c4wfo2CzNo4Y4LCqxKGQvz7BsE7nqJ", - "1KGnLjKyqiGSdTNH9s6okFk2t5J7R6CdWt", - "bc1qt2kjf5guf4dvv4mvnswyk8ksaeuh5xyhc5gz64", - "19GTEWTnVgenpDWSdQEAT9LJqMFQ7Yogsu", - "bc1qxmwuugmcnn5k3hz22cxephy2vkevvt2knsd6u4", - "1617Cf4qmjqVyiN5weQRo8sZvQvyDjshKP", -]; +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Staking tokens via AlexLab counts as TVL", - bitcoin: { - tvl: sdk.util.sumChainTvls([sumTokensExport({ owners })]), - }, + bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: bitcoinAddressBook.xlink })]) }, ethereum: { tvl: sumTokensExport({ owners: [ diff --git a/projects/xrgb/index.js b/projects/xrgb/index.js index d1070836a296..91c3e3046d70 100644 --- a/projects/xrgb/index.js +++ b/projects/xrgb/index.js @@ -1,9 +1,7 @@ const { sumTokensExport } = require("../helper/chain/brc20"); -const owner = 'bc1ptm05s4f6f8j78zhx62lzx0dep07f2597nlgeltmm4sjn5stdu6gq4sxg2w' +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "XRGB as bridge,Unlock ERC404 on all chains", - bitcoin: { - tvl: sumTokensExport({ owner, blacklistedTokens: ['XRGB'] }), - } + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.xrgb, blacklistedTokens: ['XRGB'] }) } }; \ No newline at end of file From 8b2d95a353ebd8e50e76dcb88333b5d2d2657aef Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:10:03 +0100 Subject: [PATCH 224/787] update script --- package.json | 2 +- utils/scripts/checkBTCDupsv2.js | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 utils/scripts/checkBTCDupsv2.js diff --git a/package.json b/package.json index 9889a037ec9e..0ad5df52622b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "entities": "cd utils;npm i; cd ..; node utils/testInteractive entities", "useTokenLabels": "node utils/scripts/useTokenLabels.js", "biggest-files": "find ./projects -name '*.js' -not -path './projects/helper/*' -not -path './projects/curve/*' -not -path './projects/sigmao/*' -exec du -sh {} \\; | sort -rh | head -n 100", - "check-bitcoin-duplicates": "node utils/scripts/checkBTCDups.js", + "check-bitcoin-duplicates": "node utils/scripts/checkBTCDupsv2.js", "postinstall": "echo 'run \"npm update @defillama/sdk\" if you want lastest sdk changes' " }, "author": "", diff --git a/utils/scripts/checkBTCDupsv2.js b/utils/scripts/checkBTCDupsv2.js new file mode 100644 index 000000000000..2dcec07b6a30 --- /dev/null +++ b/utils/scripts/checkBTCDupsv2.js @@ -0,0 +1,30 @@ +const addressBook = require('../../projects/helper/bitcoin-book/index'); + +console.log('project count: ', Object.keys(addressBook).length); +const addressProjectMap = {} + +async function run() { + + await Promise.all(Object.keys(addressBook).map(async project => { + let addresses = addressBook[project]; + if (!Array.isArray(addresses)) addresses = await addresses() + for (let address of addresses) { + if (addressProjectMap[address]) { + addressProjectMap[address].push(project); + } else { + addressProjectMap[address] = [project]; + } + } + })) + + const duplicates = {} + for (const [address, projects] of Object.entries(addressProjectMap)) { + if (projects.length > 1) { + duplicates[address] = projects.join(', '); + } + } + + console.table(Object.entries(duplicates)); +} + +run().catch(console.error).then(() => process.exit(0)); \ No newline at end of file From cc644f280dc53842a420ef8f02c8a46e5ee9e869 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:17:02 +0000 Subject: [PATCH 225/787] add assetchain swap (#12186) --- projects/assetchain-swap/index.js | 3 +++ projects/helper/chains.json | 1 + 2 files changed, 4 insertions(+) create mode 100644 projects/assetchain-swap/index.js diff --git a/projects/assetchain-swap/index.js b/projects/assetchain-swap/index.js new file mode 100644 index 000000000000..ec189ab1a567 --- /dev/null +++ b/projects/assetchain-swap/index.js @@ -0,0 +1,3 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ assetchain: { factory: '0xa9d53862D01190e78dDAf924a8F497b4F8bb5163', fromBlock: 17598, } }) \ No newline at end of file diff --git a/projects/helper/chains.json b/projects/helper/chains.json index df9c3b56d5a4..b18ca1574521 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -11,6 +11,7 @@ "aptos", "arbitrum", "arbitrum_nova", + "assetchain", "ancient8", "archway", "area", From b68f166f30a6e5754a6255c6a861accbac1933dc Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:50:41 +0100 Subject: [PATCH 226/787] track marginal --- projects/marginal/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/marginal/index.js diff --git a/projects/marginal/index.js b/projects/marginal/index.js new file mode 100644 index 000000000000..8516807bad88 --- /dev/null +++ b/projects/marginal/index.js @@ -0,0 +1,17 @@ +const { getLogs2 } = require('../helper/cache/getLogs') + +const config = { + base: { factory: '0x407fA8029852A8386a907287018CEAFd7242C621', fromBlock: 17016522 }, + ethereum: { factory: '0x95D95C41436C15b50217Bf1C0f810536AD181C13', fromBlock: 20297876 }, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: 'event PoolCreated (address indexed token0, address indexed token1, uint24 maintenance, address indexed oracle, address pool)', fromBlock, }) + const ownerTokens = logs.map(log => [[log.token0, log.token1], log.pool]) + return api.sumTokens({ ownerTokens }) + } + } +}) \ No newline at end of file From a44b28f6739fee846a9572c073b3cab84326de40 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Thu, 7 Nov 2024 11:33:33 +0000 Subject: [PATCH 227/787] add doge to binance cex (#12196) --- projects/binance/config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/projects/binance/config.js b/projects/binance/config.js index a53e1c95946c..f58740a565ac 100644 --- a/projects/binance/config.js +++ b/projects/binance/config.js @@ -175,7 +175,6 @@ const assetList = [ ['DOGE', 'BEP20', '0xd3a22590f8243f8e83ac230d1842c9af0404c4a1'], ['DOGE', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], ['DOGE', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - /* ['DOGE', 'DOGE', 'D73RQLGWW9TBT2AKspEP24wLiXFrXvnTqX'], ['DOGE', 'DOGE', 'D7BrtudMAdwz2U7vSGumVDuxZsZNibJuzw'], ['DOGE', 'DOGE', 'D7D2f2WuEkwhTWqBkisZ5sM3JagaBcNWBs'], @@ -213,7 +212,6 @@ const assetList = [ ['DOGE', 'DOGE', 'DTSop4ycWkpmDqpncVZ3jwKp3z7B4kW4T3'], ['DOGE', 'DOGE', 'DTbG3RJRejnM99g8MSnhSbJxJVW8X7YXy9'], ['DOGE', 'DOGE', 'DU8gPC5mh4KxWJARQRxoESFark2jAguBr5'], - */ ['DOT', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], ['DOT', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], ['DOT', 'BEP20', '0x0e4158c85ff724526233c1aeb4ff6f0c46827fbe'], @@ -715,9 +713,7 @@ module.exports = { near: { owners: getOwners('NEAR') }, - /* doge: { owners: getOwners('DOGE') }, - */ } \ No newline at end of file From ead9bb2392e81974466ff328c73bf51ff7135bec Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:37:16 +0100 Subject: [PATCH 228/787] workaround for evmos gas limit #12197 --- projects/helper/env.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/helper/env.js b/projects/helper/env.js index 81f9102f84cd..c95eb7eaba8b 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -4,6 +4,7 @@ const BOOL_KEYS = [ ] const DEFAULTS = { + EVMOS_MULTICALL_CHUNK_SIZE: "3", // evmos reduced gas limit, this is a workaround to make multicall work STARKNET_RPC: 'https://starknet-mainnet.public.blastapi.io', COVALENT_KEY: 'ckey_72cd3b74b4a048c9bc671f7c5a6', SOLANA_RPC: 'https://mainnet.helius-rpc.com/?api-key=0109717a-77b4-498a-bc3c-a0b31aa1b3bf', From 44e579cea638e5cbb63e013e55934b0e413ff749 Mon Sep 17 00:00:00 2001 From: "magiodev.eth" <31893902+magiodev@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:43:38 +0100 Subject: [PATCH 229/787] =?UTF-8?q?add=20quasar=20ethereum=20tvl=20from=20?= =?UTF-8?q?mellow=20using=20chainId=201=20to=20filter=20out=20api=E2=80=A6?= =?UTF-8?q?=20(#12198)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/quasar/index.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/quasar/index.js b/projects/quasar/index.js index 2de7391a09fd..9846b1be3332 100644 --- a/projects/quasar/index.js +++ b/projects/quasar/index.js @@ -1,7 +1,7 @@ const { queryContract } = require('../helper/chain/cosmos') const { getConfig } = require('../helper/cache') -async function tvl(api) { +async function tvlOsmosis(api) { const data = await getConfig('quasar-vaults', 'https://api.quasar.fi/vaults') const vaults = data.filter(i => i.chainId === 'osmosis-1').map(i => i.address) for (const vault of vaults) { @@ -11,10 +11,22 @@ async function tvl(api) { return api.getBalances() } +async function tvlEthereum(api) { + const data = await getConfig('quasar-vaults', 'https://api.quasar.fi/vaults') + const vaults = data.filter(i => i.chainId === 1).map(i => i.address) + const tvlRes = await api.multiCall({ abi: 'function underlyingTvl() view returns (address[] tokens, uint256[] bals)', calls: vaults }) + tvlRes.forEach(({ tokens, bals }) => { + api.add(tokens, bals) + }) +} + module.exports = { timetravel: false, methodology: 'Total TVL on vaults', osmosis: { - tvl, + tvl: tvlOsmosis, }, -} \ No newline at end of file + ethereum: { + tvl: tvlEthereum + } +} From f798135965aa88dbe8c45dada4c17cc4d34b7c95 Mon Sep 17 00:00:00 2001 From: miler012 <124125686+miler012@users.noreply.github.com> Date: Thu, 7 Nov 2024 21:04:04 +0800 Subject: [PATCH 230/787] satori add new chain and LSD assets (#12195) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/satori/index.js | 45 +++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/projects/satori/index.js b/projects/satori/index.js index 53f0952302c3..190b1e3c747f 100644 --- a/projects/satori/index.js +++ b/projects/satori/index.js @@ -2,21 +2,21 @@ const ADDRESSES = require("../helper/coreAssets.json"); const { sumTokensExport } = require("../helper/unwrapLPs"); const { sumTokensExport: sumTokensExportOfTon } = require("../helper/chain/ton"); -const USDT_TOKEN_CONTRACT = ADDRESSES.astarzk.USDT; -const EZETH_BASE = ADDRESSES.blast.ezETH; -const EZETH_LINEA = ADDRESSES.blast.ezETH; -const ZK = ADDRESSES.era.ZK; -const WALLET_ADDR = [ - "0x62e724cB4d6C6C7317e2FADe4A03001Fe7856940", - "0xA59a2365D555b24491B19A5093D3c99b119c2aBb", -]; +const ethereum_LBTC = "0x8236a87084f8B84306f72007F36F2618A5634494"; +const ethereum_PumpBTC = "0xF469fBD2abcd6B9de8E169d128226C0Fc90a012e"; +const base_PumpBTC = "0x23dA5F2d509cb43A59d43C108a43eDf34510eff1"; +const stBTC = "0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3"; + module.exports = { methodology: "Counts Satori smartcontract balance as TVL..", polygon_zkevm: { tvl: sumTokensExport({ - owners: WALLET_ADDR, - tokens: [USDT_TOKEN_CONTRACT], + owners: [ + "0x62e724cB4d6C6C7317e2FADe4A03001Fe7856940", + "0xA59a2365D555b24491B19A5093D3c99b119c2aBb", + ], + tokens: [ADDRESSES.astarzk.USDT], }), }, era: { @@ -25,7 +25,7 @@ module.exports = { "0x0842b33529516abe86CA8EA771aC4c84FDd0eeE0", "0x48756b37Fd643bB40F669804730024F02900C476", ], - tokens: [ADDRESSES.era.USDC, ZK], + tokens: [ADDRESSES.era.USDC, ADDRESSES.era.ZK], }), }, linea: { @@ -34,7 +34,7 @@ module.exports = { "0xfb371E70eEB32f4054F40514924e77213ca18425", "0xF96116e124eB3F62Ddc6a9cfbdc58d7F8A37c50A", ], - tokens: [ADDRESSES.linea.USDC, EZETH_LINEA], + tokens: [ADDRESSES.linea.USDC, ADDRESSES.blast.ezETH], }), }, scroll: { @@ -52,7 +52,7 @@ module.exports = { "0x668a9711b8d04362876dc5b6177ed362084d5aed", "0x5f075a6a11B2e25DF664Ce7419c274943017B595", ], - tokens: [ADDRESSES.base.USDC, EZETH_BASE], + tokens: [ADDRESSES.base.USDC, ADDRESSES.blast.ezETH,base_PumpBTC], }), }, xlayer: { @@ -80,6 +80,23 @@ module.exports = { ], tokens: [ADDRESSES.ton.USDT], }), + }, + bsc:{ + tvl: sumTokensExport({ + owners: [ + "0x3b6F3f7F0e3e8cCa7bC11dFA4a8567A6479Ece54", + "0xD2F244164cd09e5cBb6360c4a17aAF976a34562a" + ], + tokens: [ADDRESSES.bsc.USDC,stBTC], + }), + }, + ethereum:{ + tvl: sumTokensExport({ + owners: [ + "0x0857f8a6e41e1c71f4065daebfe7ddb825cbffde", + "0xA394080628F175472Fee9eB316BD104fAB63FE40" + ], + tokens: [ADDRESSES.ethereum.USDC,ethereum_LBTC,stBTC,ethereum_PumpBTC], + }), } - }; From 058e95d01371d1168a37b9fd3141931b97d72404 Mon Sep 17 00:00:00 2001 From: void <162591301+void-restack@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:36:32 +0530 Subject: [PATCH 231/787] Update: Add truAPT pool support for Joule Finance Adapter (#12193) --- projects/joule/index.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/projects/joule/index.js b/projects/joule/index.js index 222310b28511..bdbcff59f96a 100644 --- a/projects/joule/index.js +++ b/projects/joule/index.js @@ -2,13 +2,21 @@ const { getResource } = require("../helper/chain/aptos") const CONTRACT_ADDRESS = "0x2fe576faa841347a9b1b32c869685deb75a15e3f62dfe37cbd6d52cc403a16f6" +function replaceAtWith0x(str) { + if (str.startsWith('@')) { + return '0x' + str.slice(1); + } else { + return str; + } +} + async function getPoolsData() { const res = await getResource("0x7f83b020b8ab60dbdc4208029fa6aa0804bf5a71eeaca63382d24622b9e6f647", `${CONTRACT_ADDRESS}::pool::PoolConfigsMap`) const poolConfigsMap = res.pool_configs_map.data; - + return poolConfigsMap.map(item => ({ - coin: item.key, + coin: replaceAtWith0x(item.key), total_lend: item.value.total_lend, total_borrow: item.value.total_borrow })); @@ -21,15 +29,15 @@ module.exports = { aptos: { tvl: async (api) => { const marketsData = await getPoolsData() - marketsData.forEach(({coin, total_lend}) => { + marketsData.forEach(({ coin, total_lend }) => { api.add(coin, total_lend) }) }, borrowed: async (api) => { const marketsData = await getPoolsData() - marketsData.forEach(({coin, total_borrow}) => { + marketsData.forEach(({ coin, total_borrow }) => { api.add(coin, total_borrow) - }) + }) }, } }; From 7e060e9fc41c933b707546140676b1b79ef2610b Mon Sep 17 00:00:00 2001 From: Tommy Kang Date: Thu, 7 Nov 2024 22:08:32 +0900 Subject: [PATCH 232/787] Fragmetric treasury updates (#12191) --- projects/fragmetric/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/fragmetric/index.js b/projects/fragmetric/index.js index 3f0a6532d2a8..78804daa9e24 100644 --- a/projects/fragmetric/index.js +++ b/projects/fragmetric/index.js @@ -3,15 +3,15 @@ const { sumTokens2 } = require("../helper/solana"); async function tvl() { return sumTokens2({ tokenAccounts: [ - "EVUJsmfM3cqh48eTrwmLe552F3pzmhRMJGVpmweg2fBt", - "7HPaAWDuzsSEm4JZnRudJF11pNanPNfP5mqHUCkXh5kD", - "BaoCDUcKbYSaxA5scygSeMNZV1GPsNeKqLwg92f9pi5v", - "96h95Nkfy5SPu8ddb3V4b44CTNaZoWsKCCUXY8MKzn6Y", - "DYyfr8fTAchSMZPm6nUu6MHARYVuCuvzwBQrroSW6mQm", - "HakiuyCy3STaWaPtPUFyyHwEjzrRDGaLfqwV8kV6j1pn", + "4b3xtGBwmP9FQyQ85HDmyEtQrLdoVzz6NBwBjaRBzJuS", + "BXUyJdESgoyssvATKa3omD7zHtdeztpWnG13mDUQ6fcM", + "B2vjfDaLsaJ32ESoFsVf7NPS2hd5f4QisiPLiXBrS1BK", + "HSKvv9UFCn4c6Jq3j8iiJfFgXFjRE6dr6QhWX2KD8gGU", + "3KdpoeWuwaXLuukf56p8e1FtDKjY8pCmtZdmZejUctwP", + "9grKYUmguSLVC9RHW1xKcLpiAphJrmcDkTVTCg9ebpFz", ], solOwners: [ - "3TK9fNePM4qdKC4dwvDe8Bamv14prDqdVfuANxPeiryb", + "3H22A3T3CMyoGzAURZ4szV5Hmt64Dooo5g9Ns8h1kYy7", ] }) } From fe75ba80124161534a0f3229026058b5c0c0a7b9 Mon Sep 17 00:00:00 2001 From: yongjun925 Date: Thu, 7 Nov 2024 21:23:59 +0800 Subject: [PATCH 233/787] Add unagiswap project (#12190) --- projects/unagiswap/index.js | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 projects/unagiswap/index.js diff --git a/projects/unagiswap/index.js b/projects/unagiswap/index.js new file mode 100644 index 000000000000..3573de6dbe9f --- /dev/null +++ b/projects/unagiswap/index.js @@ -0,0 +1,38 @@ +const { getLogs } = require('../helper/cache/getLogs') +const ADDRESSES = require('../helper/coreAssets.json') + +const config = { + taiko: { dvmFactory: '0x6694eebf40924e04c952EA8F1626d19E7a656Bb7', fromBlock: 452910, dspFactory: '0xd0de7cA3298fff085E2cb82F8a861a0254256BA0', gspFactory: '0x2235bB894b7600F1a370fc595Ee5477999A30441', dppFactory: '0x297A4885a7da4AaeF340FABEd119e7a6E3f2BCe8' }, + } + +Object.keys(config).forEach(chain => { + const { dvmFactory, fromBlock, dspFactory, gspFactory, dppFactory, blacklistedTokens, } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const ownerTokens = [] + const funcs = []; + const builder = (factorys, event) => { + if (Array.isArray(factorys)) { + factorys.forEach(factory => funcs.push(addLogs(factory, event))); + } else { + funcs.push(addLogs(factorys, event)); + } + } + builder(dvmFactory, 'event NewDVM (address baseToken, address quoteToken, address creator, address pool)'); + builder(dspFactory, 'event NewDSP(address baseToken, address quoteToken, address creator, address pool)'); + builder(gspFactory, 'event NewGSP(address baseToken, address quoteToken, address creator, address pool)'); + builder(dppFactory, 'event NewDPP (address baseToken, address quoteToken, address creator, address pool)'); + + await Promise.all(funcs) + + return api.sumTokens({ ownerTokens, blacklistedTokens, permitFailure: true, }) + + async function addLogs(target, eventAbi) { + if (!target) return; + const convert = i => [[i.baseToken, i.quoteToken], i.pool] + let logs = await getLogs({ api, target, eventAbi, onlyArgs: true, fromBlock, }); + ownerTokens.push(...logs.map(convert)) + } + } + } +}) \ No newline at end of file From f4351ed649bf689fbc1c61d1badc48b5e763eeb2 Mon Sep 17 00:00:00 2001 From: Lawson Graham <45542987+LawsonGraham@users.noreply.github.com> Date: Thu, 7 Nov 2024 05:24:22 -0800 Subject: [PATCH 234/787] echelon support FA TVL tracking (#12192) --- projects/echelon/index.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/projects/echelon/index.js b/projects/echelon/index.js index ff5ede091823..9d8b9c12aa68 100644 --- a/projects/echelon/index.js +++ b/projects/echelon/index.js @@ -1,10 +1,11 @@ const sdk = require("@defillama/sdk"); const { getResource, } = require("../helper/chain/aptos"); const { transformBalances } = require("../helper/portedTokens"); +const { get } = require("../helper/http"); const mainLendingContract = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba"; const isolatedLendingContract = "0x024c90c44edf46aa02c3e370725b918a59c52b5aa551388feb258bd5a1e82271"; - +const coinAssetType = '300'; // main pool async function getMarketAddresses() { @@ -13,11 +14,16 @@ async function getMarketAddresses() { } async function getMarket(marketAddress) { - const [market, coinInfo] = await Promise.all([ - getResource(marketAddress, `${mainLendingContract}::lending::Market`), - getResource(marketAddress, `${mainLendingContract}::lending::CoinInfo`) - ]) - return { cash: market.total_cash, liability: market.total_liability, fee: market.total_reserve, coin: coinInfo.type_name }; + const market = await getResource(marketAddress, `${mainLendingContract}::lending::Market`) + var coinInfo = null; + if (market.asset_type === coinAssetType) { + coinInfo = (await getResource(marketAddress, `${mainLendingContract}::lending::CoinInfo`)).type_name + } else { + coinInfo = (await getResource(marketAddress, `${mainLendingContract}::lending::FungibleAssetInfo`)).metadata.inner; + } + + + return { cash: market.total_cash, liability: market.total_liability, fee: market.total_reserve, coin: coinInfo }; } // isolated pairs @@ -80,4 +86,4 @@ module.exports = { return transformBalances("aptos", balances); } }, -}; \ No newline at end of file +}; From 129165a0646675f2e5492338f71af2e398ccd9a4 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Thu, 7 Nov 2024 06:26:53 -0700 Subject: [PATCH 235/787] Fix: avalon finance cedefi tvl (#12188) --- projects/avalon-finance-cedefi/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/avalon-finance-cedefi/index.js b/projects/avalon-finance-cedefi/index.js index 203e16270fb3..84ddc6a99128 100644 --- a/projects/avalon-finance-cedefi/index.js +++ b/projects/avalon-finance-cedefi/index.js @@ -22,9 +22,9 @@ const getMetrics = async (api, borrowed) => { // const balanceOfCollateral = marketData.collateral; const balanceOfDebt = marketData.debt; if (!borrowed) { - const supply= await api.call({ abi: 'erc20:totalSupply', target: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9'}) - api.add('0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', supply) - + // pool balance of lfbtc + const balance = await api.call({ abi: 'erc20:balanceOf', target: config[api.chain].lfbtcAddress, params: poolAddress}) + api.add(config[api.chain].lfbtcAddress, balance) } if (borrowed) @@ -47,4 +47,4 @@ module.exports = { }, } -delete module.exports.bitcoin \ No newline at end of file +delete module.exports.bitcoin From b1fdb5634bb50483502f55050a2caa9d684af3a5 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Thu, 7 Nov 2024 07:18:07 -0700 Subject: [PATCH 236/787] Chore: remove BTC on bitcoin chain (#12200) --- projects/avalon-finance-cedefi/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/avalon-finance-cedefi/index.js b/projects/avalon-finance-cedefi/index.js index 84ddc6a99128..2f7e5b71114e 100644 --- a/projects/avalon-finance-cedefi/index.js +++ b/projects/avalon-finance-cedefi/index.js @@ -40,11 +40,11 @@ module.exports = { tvl: (api) => getMetrics(api, false), borrowed: (api) => getMetrics(api, true), }, - bitcoin: { - tvl: sdk.util.sumChainTvls([ - sumTokensExport({ owners: btcOwnersOfCedefi }), - ]), - }, + // bitcoin: { + // tvl: sdk.util.sumChainTvls([ + // sumTokensExport({ owners: btcOwnersOfCedefi }), + // ]), + // }, } delete module.exports.bitcoin From 6267349cae749ba8b5cae150b8621404302d8c4c Mon Sep 17 00:00:00 2001 From: leeamijo <154820412+leeamijo@users.noreply.github.com> Date: Thu, 7 Nov 2024 21:33:59 +0700 Subject: [PATCH 237/787] feat: update coins (#12187) --- projects/helper/tokenMapping.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index be9aca5dcc24..c10668255a87 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -149,6 +149,17 @@ const fixBalancesTokens = { '0xc7d67a9cbb121b3b0b9c053dd9f469523243379a': { coingeckoId: 'tether', decimals: 6 }, '0x803dce4d3f4ae2e17af6c51343040dee320c149d': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, }, + btr: { + '0xC39E757dCb2b17B79A411eA1C2810735dc9032F8': { coingeckoId: 'solv-protocol-solvbtc', decimals: 18 }, + }, + iotex: { + '0x236f8c0a61da474db21b693fb2ea7aab0c803894': { coingeckoId: 'iotex', decimals: 18 }, + }, + mantle: { + '0x93919784C523f39CACaa98Ee0a9d96c3F32b593e': { coingeckoId: 'universal-btc', decimals: 18 }, + '0xC75D7767F2EdFbc6a5b18Fc1fA5d51ffB57c2B37': { coingeckoId: 'pumpbtc', decimals: 18 }, + '0xCAbAE6f6Ea1ecaB08Ad02fE02ce9A44F09aebfA2': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 38e34e92501ad7afc71b0bef690d286e3e2d259e Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Thu, 7 Nov 2024 16:58:04 +0100 Subject: [PATCH 238/787] Feat: HeadStarter (#12199) Co-authored-by: baditu Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/headstarter/index.js | 70 +++++++++++++++++++++++++++++++++ projects/helper/tokenMapping.js | 2 + projects/hliquity/index.js | 13 ++---- 3 files changed, 75 insertions(+), 10 deletions(-) create mode 100644 projects/headstarter/index.js diff --git a/projects/headstarter/index.js b/projects/headstarter/index.js new file mode 100644 index 000000000000..4b58cc3448b5 --- /dev/null +++ b/projects/headstarter/index.js @@ -0,0 +1,70 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const STAKING_CONTRACT = "0x000000000000000000000000000000000070eac5"; +const HST = "0x00000000000000000000000000000000000ec585"; + +const ENTITIES = [ + { + token: "0x000000000000000000000000000000000048fda4", + contracts: [ + "0x00000000000000000000000000000000004e3387", + "0x00000000000000000000000000000000004e3395", + "0x00000000000000000000000000000000004d6daa", + "0x0000000000000000000000000000000000575c04", + ], + }, + { + token: "0x000000000000000000000000000000000030fb8b", + contracts: [ + "0x00000000000000000000000000000000005737f0", + "0x00000000000000000000000000000000005737e1", + "0x0000000000000000000000000000000000571a8d", + "0x0000000000000000000000000000000000571a8a", + "0x000000000000000000000000000000000056d9ea", + "0x0000000000000000000000000000000000575c04", + ], + }, + { + token: "0x00000000000000000000000000000000005c9f70", + contracts: [ + "0x00000000000000000000000000000000005cb45b", + "0x00000000000000000000000000000000005cb45f", + "0x0000000000000000000000000000000000575c04", + ], + }, +]; + +const HST_ENTITIES = [ + { + token: HST, + contracts: [ + STAKING_CONTRACT, + "0x00000000000000000000000000000000000f5ad1", + "0x00000000000000000000000000000000000fc16c", + "0x0000000000000000000000000000000000101201", + "0x0000000000000000000000000000000000575c04", + ], + }, +]; + +const getTokensAndOwners = (entities) => { + return entities.map(({ token, contracts}) => contracts.map(i => [token, i])).flat(); +}; + +const tvl = async (api) => { + const tokensAndOwners = getTokensAndOwners(ENTITIES); + return sumTokens2({api, tokensAndOwners }); +}; + +const staking = async (api) => { + const tokensAndOwners = getTokensAndOwners(HST_ENTITIES); + return sumTokens2({api, tokensAndOwners }); +}; + +module.exports = { + methodology: "We count the HST tokens locked in the HeadStarter contracts.", + hedera: { + tvl, + staking, + }, +}; diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index c10668255a87..513d619bdfc7 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -139,7 +139,9 @@ const fixBalancesTokens = { '0x00000000000000000000000000000000000b2ad5': { coingeckoId: 'saucerswap', decimals: 6 }, '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, '0x0000000000000000000000000000000000163b5a': { coingeckoId: 'hedera-hashgraph', decimals: 8 }, + '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, '0x000000000000000000000000000000000038b3db': { coingeckoId: 'dovu-2', decimals: 8 }, + '0x00000000000000000000000000000000005c9f70': { coingeckoId: 'hedera-liquity', decimals: 8 }, '0x00000000000000000000000000000000000ec585': { coingeckoId: 'headstarter', decimals: 8 }, '0x0000000000000000000000000000000000492a28': { coingeckoId: 'hashpack', decimals: 6 }, '0x000000000000000000000000000000000030fb8b': { coingeckoId: 'steam', decimals: 2 }, diff --git a/projects/hliquity/index.js b/projects/hliquity/index.js index 737f36cdf7a1..dc53a952b203 100644 --- a/projects/hliquity/index.js +++ b/projects/hliquity/index.js @@ -1,13 +1,6 @@ -const { nullAddress, sumTokens2 } = require("../helper/unwrapLPs"); - -const ACTIVE_POOL_CONTRACT = '0x00000000000000000000000000000000005c9f0b'; -async function tvl(api) { - await sumTokens2({ api, owner: ACTIVE_POOL_CONTRACT, token: nullAddress }) -} +const { getLiquityTvl } = require("../helper/liquity"); module.exports = { methodology: 'the amount of locked hbar in the HLiquity protocol', - hedera: { - tvl, - } -}; + hedera: { tvl: getLiquityTvl('0x00000000000000000000000000000000005c9f66')} +}; \ No newline at end of file From a443f09d67700d6d2d10f38d7f5d6ff9da5a3160 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:01:36 +0100 Subject: [PATCH 239/787] Feat: Mantle-treasury (#12194) --- projects/treasury/bitdao.js | 163 ++++++++++++++---------------------- 1 file changed, 63 insertions(+), 100 deletions(-) diff --git a/projects/treasury/bitdao.js b/projects/treasury/bitdao.js index 99027682dd7e..121bb28e296c 100644 --- a/projects/treasury/bitdao.js +++ b/projects/treasury/bitdao.js @@ -1,112 +1,75 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { nullAddress,treasuryExports } = require("../helper/treasury"); -const sdk = require("@defillama/sdk"); +const sdk = require('@defillama/sdk'); +const { nullAddress } = require("../helper/treasury"); +const { getConfig } = require('../helper/cache') -//eth wallets -const mTreasuryL1 = "0x78605Df79524164911C144801f41e9811B7DB73D"; -const mTreasuryL1SC = "0xCa264A4Adf80d3c390233de135468A914f99B6a5" -const mTreasuryL1O1 = "0xf0e91a74cb053d79b39837E1cfba947D0c98dd93" -const mTreasuryL1E1 = "0x1a743BD810dde05fa897Ec41FE4D42068F7fD6b2" -const mTreasuryL1RB1 = "0x164Cf077D3004bC1f26E7A46Ad8fA54df4449E3F" -const mTreasuryL1LPE1 = "0xA5b79541548ef2D48921F63ca72e4954e50a4a74" +const API_URL = 'https://api.mantle.xyz/api/v2/treasury/tokens'; +const MNT = '0x3c3a81e81dc49a522a592e7622a7e711c06bf354'; +const USDe = '0x4c9edd5852cd905f086c759e8383e09bff1e68b3'; +const COOK = '0x9f0c013016e8656bc256f948cd4b79ab25c7b94d' +const ethenaFarm = '0x8707f238936c12c309bfc2b9959c35828acfc512'; +const SPECIFIC_TOKENS = ['eth', 'ethena-farming-usde', 'eigen-layer-eth', 'mnt']; -//mantle wallets +const abi = "function stakes(address, address) view returns (uint256 stakedAmount, uint152 coolingDownAmount, uint104 cooldownStartTimestamp)"; -const mTreasuryL2 = "0x94FEC56BBEcEaCC71c9e61623ACE9F8e1B1cf473" -const mTreasuryL2RB2 = "0x87C62C3F9BDFc09200bCF1cbb36F233A65CeF3e6" -const mTreasuryL2LPM1 = "0x992b65556d330219e7e75C43273535847fEee262" -const mTreasuryL2FF1 = "0xcD9Dab9Fa5B55EE4569EdC402d3206123B1285F4" +const isSpecificToken = token => SPECIFIC_TOKENS.includes(token); -const BIT = "0x1A4b46696b2bB4794Eb3D4c26f1c55F9170fa4C5"; -const MNT = "0x3c3a81e81dc49a522a592e7622a7e711c06bf354" +const getEthenaFarmingBalance = async (api, wallet) => { + const { stakedAmount, coolingDownAmount } = await api.call({ target: ethenaFarm, params: [wallet, USDe], abi }); + return Number(stakedAmount) + Number(coolingDownAmount); +}; -const MNTMantle = ADDRESSES.metis.Metis -const wrappedmantleonmantle = ADDRESSES.mantle.WMNT +const getTvlData = async (api, key) => { + const data = await getConfig('mantle-treasury', API_URL) + const rawDatas = data.filter(({ chain }) => key === chain); + const datas = rawDatas.map(({ id, walletAddress, amount }) => ({ id, walletAddress, amount })); -const ecspWallets = [ -'0x87c185bEFFfb36a42b741d10601A007e997a63bA', -'0x8AA6a67e96850e070B0c8E94E3a35C5f9f01809C', -'0x50f6e426fdefb3f994d3fe9fa4e1ee715f85de7f', -'0x7427b4Fd78974Ba1C3B5d69e2F1B8ACF654fEB44', -'0x7fe2bAffD481a8776A9eaD15a8eD17Fe37107903', -'0x15Bb5D31048381c84a157526cEF9513531b8BE1e', -'0xdD1c2483056fF46153249bd903401ae7bF6360D1', -'0x565F603D583F9199487923775114ae8c0D17D044', -'0x650aD9e7EfCD34B7d050c22a6A8dFFAFe3B4A22E', -'0x607105cE5bf13e70B49E949a3DdFaD694d19374F', -'0x131C7f3461A6696317ddfEdfed3BCdc10A2062B2', -'0xa1F7D91Bf121f4940d96c5C52Bc577011B95B51b', -'0x911169AA285f5D18fC3567d150616d4B0869d3a5', -'0x3f946F00A00eB2A66A4BD1AeAF137E05dB6CAEc6', -'0x9fe09b3ed1A407162876fEB1995048A620552fD0', -'0xd4338fC8Dc9d2FDcb99604d3cFc80019EBE01058', -'0x71Fb53Afc7E36C3f11BC1bdBBAB7B6FC3E552eb6', -'0x92A9e359d72F934a5d7c1251201f9855A381B23c', -'0xb118d4B94B0D4ce38F0D15d88f1dC09580a60b7A', -'0xaA42736947d1fdcc5d93F459A6D1dC0d7b9a92a4', -'0xF366eC9FA2DCE0ee7A6bdae4Aaa5c076E8391AFC', -'0x5DA939F5e2bC3C7159ac16f98BbFb23759000cd5', -'0x60F6ce1965D99EEffDF63B5303664f25fCb0347F', -'0xC784F3aEA5ce3daBA6907ee5d6Ce321a204Eb3A8', -'0xDCA65E2DFEe70991374eD47EfB4aD6B4FCD0c612', -'0x4ea7b4D10a01c93509BaA0CBb128c89344A1F578', -'0x4dF3d780Af7cbD51d9c76f236477edF417c7B554', -'0xA38e519b12D9CE133396a3E4EB92aac0934AB351', -'0x6d9755211D627fe0EA02D94C23C6110af16a8882', -'0x43c0f24E84e6d45b021d18C982beAbFA969577c8', -'0xB82C91bB7e8696a4A057192ED61aFcD1F9121722', -'0x15FFBf5730FA9eF271B2E9b4a1a6c90F2288155B', -'0xCef70f66e50CF016BB932De6425AA6f7286A3886', -'0x50165383783124232B9e4367D59815947012Ac27', -'0x97D50c7d14E68bEBC0f81B4FdCed89a1122330A6' -] + const wallets = Object.values( + datas.reduce((acc, { id, walletAddress, amount }) => { + acc[walletAddress] = acc[walletAddress] || { owner: walletAddress, tokens: [] }; + acc[walletAddress].tokens.push({ address: id, amount }); + return acc; + }, {}) + ); -const tokenTreasuries = treasuryExports({ + const uniqueOwners = new Set(); + const uniqueTokens = new Set(); + + for (const { owner, tokens } of wallets) { + const eigenLayerToken = tokens.find(token => token.address === 'eigen-layer-eth'); + if (tokens.some(token => token.address === 'eth')) api.add(nullAddress, (await sdk.api.eth.getBalance({ target: owner })).output); + if (tokens.some(token => token.address === 'mnt')) api.add(MNT, (await sdk.api.eth.getBalance({ target: owner })).output, { skipChain: true }); + if (tokens.some(token => token.address === 'ethena-farming-usde')) api.add(USDe, await getEthenaFarmingBalance(api, owner)); + if (eigenLayerToken) api.add(nullAddress, eigenLayerToken.amount * 10 ** 18); + + const nonSpecificTokens = tokens.filter(token => !isSpecificToken(token.address)); + if (nonSpecificTokens.length > 0) { + uniqueOwners.add(owner); + nonSpecificTokens.forEach(token => uniqueTokens.add(token.address)); + } + } + + return { owners: Array.from(uniqueOwners), tokens: Array.from(uniqueTokens) }; +}; + +module.exports = { ethereum: { - tokens: [ - nullAddress, - ADDRESSES.ethereum.USDC,//USDC - ADDRESSES.ethereum.DAI,//DAI - ADDRESSES.ethereum.WETH,//WETH - ADDRESSES.ethereum.USDT,//USDT - '0x50D1c9771902476076eCFc8B2A83Ad6b9355a4c9',//FTT - '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',//xSUSHI - "0x52A8845DF664D76C69d2EEa607CD793565aF42B8", - ADDRESSES.ethereum.sUSDe, //sUSDe - ], - owners: [mTreasuryL1, mTreasuryL1SC,mTreasuryL1O1,mTreasuryL1E1, mTreasuryL1RB1, mTreasuryL1LPE1, ...ecspWallets ], - ownTokens: [BIT, MNT], - resolveLP: true, - resolveUniV3: true + tvl: sdk.util.sumChainTvls([async ({ api }) => { + const { owners, tokens } = await getTvlData(api, 'eth') + return api.sumTokens({ owners, tokens, blacklistedTokens: [MNT] }); + }]), + ownTokens: async ({ api }) => { + const { owners } = await getTvlData(api, 'eth') + return api.sumTokens({ ownerTokens: owners.map(owner => [[MNT], owner]) }); + } }, mantle: { - tokens: [ - nullAddress, - "0x5bE26527e817998A7206475496fDE1E68957c5A6", //ondo usd - "0xcda86a272531e8640cd7f1a92c01839911b90bb0", //mantle staked eth - ADDRESSES.mantle.WETH, //eth - ADDRESSES.mantle.USDC, //usdc - ADDRESSES.mantle.USDT, //tether - "0xf52b354ffdb323e0667e87a0136040e3e4d9df33", //lp meth - ], - owners: [mTreasuryL2, mTreasuryL2RB2, mTreasuryL2LPM1, mTreasuryL2FF1, ...ecspWallets], - ownTokens: [MNTMantle, wrappedmantleonmantle], - resolveLP: true, + tvl: async (api) => { + const { owners, tokens } = await getTvlData(api, 'mnt') + return api.sumTokens({ owners, tokens, blacklistedTokens: [COOK] }); + }, + ownTokens: async ({ api }) => { + const { owners } = await getTvlData(api, 'mnt') + return api.sumTokens({ ownerTokens: owners.map(owner => [[COOK], owner]) }); + } }, -}) - -async function otherTvl(_timestamp, _block, _chainBlocks, {api}){ - const shares = await api.call({ abi: 'function shares(address user) public view returns (uint256)', target: "0x298afb19a105d59e74658c4c334ff360bade6dd2", params:["0xca264a4adf80d3c390233de135468a914f99b6a5"]}) - const balances = { - "ethereum:0xd5f7838f5c461feff7fe49ea5ebaf7728bb0adfa": shares - } - return balances } - -module.exports={ - ethereum:{ - tvl: sdk.util.sumChainTvls([tokenTreasuries.ethereum.tvl, otherTvl]), - ownTokens: tokenTreasuries.ethereum.ownTokens - }, - mantle: tokenTreasuries.mantle -} \ No newline at end of file From 539a387b7006ff33b6de6ddf02eacb132c0f8b81 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 7 Nov 2024 23:17:46 +0000 Subject: [PATCH 240/787] add veTHE tracking for quoll --- projects/quoll/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/quoll/index.js b/projects/quoll/index.js index 98a1ea654303..2e8555f44add 100644 --- a/projects/quoll/index.js +++ b/projects/quoll/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { staking } = require("../helper/staking"); +const { stakings } = require("../helper/staking"); const abi = require('./abi.json'); const voterProxy = '0xe96c48C5FddC0DC1Df5Cf21d68A3D8b3aba68046'; const masterWombat = '0x489833311676B566f888119c29bd997Dc6C95830'; @@ -39,6 +39,7 @@ async function voterProxyBalances(api) { } async function tvl(api) { + api.add("0xf4c8e32eadec4bfe97e0f595add0f4450a863a11", await api.call({ abi: 'function balanceOfNFT(uint256) returns (uint256)', target: "0xfbbf371c9b0b994eebfcc977cef603f7f31c070d", params: [16274], })) api.add(wom, await api.call({ abi: 'erc20:balanceOf', target: veWom, params: [voterProxy], })) await voterProxyBalances(api) } @@ -48,8 +49,8 @@ module.exports = { "TVL of Quoll Finance consists of Wombat LP tokens staked in MasterWombat, WOM tokens locked in veWOM, and Quoll tokens locked in QUO Vote Lock contract.", bsc: { tvl, - staking: staking( - quoLocker, + staking: stakings( + [quoLocker, "0xc634c0A24BFF88c015Ff32145CE0F8d578B02F60"], quo, chain ), From d16e1dc206fb89e986c09cebf975b1f827404dc3 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 8 Nov 2024 00:02:54 +0000 Subject: [PATCH 241/787] fix --- projects/helper/bitcoin-book/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index a8c9e3a46184..b3b8ff4b8ffc 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -1,6 +1,6 @@ const ainn = require('./ainn-layer2.js') const allo = require('./allo.js') -const avalance = require('./avalanche-btc.js') +const avalanche = require('./avalanche-btc.js') const fetchers = require('./fetchers.js') const bevm = require('./bevm.js') const binance = require('./binance.js') @@ -88,7 +88,7 @@ module.exports = { ...fetchers, ainn, allo, - avalance, + avalanche, bevm, binance, binance2, From 93d6603bb1edae2e0a8c2111a2c6409ab282b42b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:05:53 +0100 Subject: [PATCH 242/787] lint fix --- projects/helper/tokenMapping.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 513d619bdfc7..85634144793f 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -139,7 +139,6 @@ const fixBalancesTokens = { '0x00000000000000000000000000000000000b2ad5': { coingeckoId: 'saucerswap', decimals: 6 }, '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, '0x0000000000000000000000000000000000163b5a': { coingeckoId: 'hedera-hashgraph', decimals: 8 }, - '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, '0x000000000000000000000000000000000038b3db': { coingeckoId: 'dovu-2', decimals: 8 }, '0x00000000000000000000000000000000005c9f70': { coingeckoId: 'hedera-liquity', decimals: 8 }, '0x00000000000000000000000000000000000ec585': { coingeckoId: 'headstarter', decimals: 8 }, From ac3e26d23d844d57a228f442d7dd87dbc9c9f9a2 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:08:59 +0100 Subject: [PATCH 243/787] supr #12209 --- projects/supr-staking/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/supr-staking/index.js b/projects/supr-staking/index.js index 9bf5f10ed093..84463e778ac8 100644 --- a/projects/supr-staking/index.js +++ b/projects/supr-staking/index.js @@ -1,9 +1,11 @@ const SUPR = '0x3390108E913824B8eaD638444cc52B9aBdF63798' const ROLLUX_SUPR_STAKING = '0x400aDCba906EA6E87FEC276f0E0C0857F71A85F2' +const ROLLUX_SUPR_GROUP_STAKING = '0xa9A37e4D70Fc6af8A0CC16995B9363f10dCE132E' async function staking(api) { const bal = await api.call({ abi: 'erc20:totalSupply', target: ROLLUX_SUPR_STAKING }) api.add(SUPR, bal) + return api.sumTokens({ owner: ROLLUX_SUPR_GROUP_STAKING, tokens: [SUPR] }) } module.exports = { From 52d8f28dda8d691c189a2a9997198502b920a4ea Mon Sep 17 00:00:00 2001 From: Lawson Graham <45542987+LawsonGraham@users.noreply.github.com> Date: Thu, 7 Nov 2024 20:15:26 -0800 Subject: [PATCH 244/787] thalaswap v2 tVL (#12208) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/thalaswap-v2/index.js | 35 ++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 projects/thalaswap-v2/index.js diff --git a/projects/thalaswap-v2/index.js b/projects/thalaswap-v2/index.js new file mode 100644 index 000000000000..da46d1a5bb25 --- /dev/null +++ b/projects/thalaswap-v2/index.js @@ -0,0 +1,35 @@ +const { getResource, function_view } = require("../helper/chain/aptos"); + +const thalaswapAddress = "0x007730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5"; +const thalaswapControllerResource = `${thalaswapAddress}::pool::ThalaSwap`; +let resourcesCache; + +async function _getResource(address, key) { + if (!resourcesCache) resourcesCache = getResource(address, key) + return resourcesCache +} +async function getBalance(poolAddress, assetMetadata) { + return function_view({ functionStr: "0x1::primary_fungible_store::balance", type_arguments: ["0x1::fungible_asset::Metadata"], args: [poolAddress, assetMetadata] }); +} + +module.exports = { + timetravel: false, + methodology: + "Aggregates TVL in all pools in Thalaswap, Thala Labs' AMM.", + aptos: { + tvl: async (api) => { + const controller = await _getResource(thalaswapAddress, thalaswapControllerResource) + + const poolObjects = controller.pools.inline_vec.map(pool => (pool.inner)) + + for (const poolAddress of poolObjects) { + const pool = await getResource(poolAddress, `${thalaswapAddress}::pool::Pool`) + const assets = pool.assets_metadata.map(asset => asset.inner) + for (const asset of assets) { + const balance = await getBalance(poolAddress, asset) + api.add(asset, balance) + } + } + }, + }, +}; \ No newline at end of file From 4227fd717e9ab289e53b9963dbbae4fa751277d5 Mon Sep 17 00:00:00 2001 From: Joshua Sum <58564538+JoshuaSum@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:32:01 -0500 Subject: [PATCH 245/787] Add Bitget Staked SOL (BGSOL) (#12207) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/bgsol/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/bgsol/index.js diff --git a/projects/bgsol/index.js b/projects/bgsol/index.js new file mode 100644 index 000000000000..12a938e64eea --- /dev/null +++ b/projects/bgsol/index.js @@ -0,0 +1,12 @@ +const { sumTokens2 } = require("../helper/solana"); + +async function tvl() { + return sumTokens2({ tokenAccounts: ['Ejg5vqsthntG8wJDijzgEWvdvhoAh8pzu4Q4r4MqsdkR'] }) +} + +module.exports = { + timetravel: false, + doublecounted: true, + methodology: "Bitget Staked SOL (BGSOL) is a tokenized representation on your staked sSOL", + solana: { tvl }, +}; \ No newline at end of file From 3a509fc1b7b9470da75d744a59bd42cd9604746f Mon Sep 17 00:00:00 2001 From: nikitariabukhin <108471336+nikitariabukhin@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:32:14 -0500 Subject: [PATCH 246/787] Create index.js (#12206) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/bitcoin-book/index.js | 5 ++++- projects/p2pb2b/index.js | 30 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 projects/p2pb2b/index.js diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index b3b8ff4b8ffc..f5f7285f2cd4 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -84,6 +84,8 @@ const toobit = require('./toobit.js') const indiaCovid = require('./india-covid.js') const wooCEX = require('./woo-cex.js') +const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] + module.exports = { ...fetchers, ainn, @@ -169,5 +171,6 @@ module.exports = { swissborg, toobit, indiaCovid, - wooCEX + wooCEX, + p2pb2b, } \ No newline at end of file diff --git a/projects/p2pb2b/index.js b/projects/p2pb2b/index.js new file mode 100644 index 000000000000..87281e64a0af --- /dev/null +++ b/projects/p2pb2b/index.js @@ -0,0 +1,30 @@ +const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + +const config = { + bitcoin: { + owners: bitcoinAddressBook.p2pb2b, + }, + ethereum: { + owners: [ + '0xcfed1443a1ed773119ed1a41a39b3b66f0ffde0f', + '0x302f4d246fc1E283AF3239311B8B84bD5a1c7736', + '0x03feA254cfA7434004E8d495725bCbB7cCc40454', + '0x7a2556e23ce7bc1ADFBDCa650130390A10C05f63' + ], + }, + bsc: { + owners: [ + '0x83455d6c365dcbac10855c623da884b552aaefdd', + '0x03feA254cfA7434004E8d495725bCbB7cCc40454' + ] + }, + polygon: { + owners: [ + '0x302f4d246fc1E283AF3239311B8B84bD5a1c7736' + ] + } +} + +module.exports = cexExports(config) +module.exports.methodology = 'We are only tracking part of their cold wallets for P2PB2B, more information here https://coinmarketcap.com/exchanges/p2b/' From 1b37f5f146c9cd3e34a1daf4517f68da7cefe99c Mon Sep 17 00:00:00 2001 From: Metodi <38468321+metodi96@users.noreply.github.com> Date: Fri, 8 Nov 2024 08:32:49 +0400 Subject: [PATCH 247/787] Add support for new lending pools on Nolus (#12203) --- projects/nolus/index.js | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/projects/nolus/index.js b/projects/nolus/index.js index 3bc9d8ee929f..653dab1afba0 100644 --- a/projects/nolus/index.js +++ b/projects/nolus/index.js @@ -12,6 +12,26 @@ const osmosisAxlOracleAddr = 'nolus1vjlaegqa7ssm2ygf2nnew6smsj8ref9cmurerc7pzwxq const osmosisAxlLeaserAddr = 'nolus1wn625s4jcmvk0szpl85rj5azkfc6suyvf75q6vrddscjdphtve8s5gg42f' const osmosisAxlLppAddr = 'nolus1qg5ega6dykkxc307y25pecuufrjkxkaggkkxh7nad0vhyhtuhw3sqaa3c5' +// Osmosis stATOM Protocol Contracts (OSMOSIS-OSMOSIS-ST_ATOM) pirin-1 +const osmosisStAtomOracleAddr = 'nolus1mtcv0vhpt94s82mcemj5sc3v94pq3k2g62yfa5p82npfnd3xqx8q2w8c5f' +const osmosisStAtomLeaserAddr = 'nolus1xv0erzdcphnpkf8tr76uynldqx6sspw7782zg9wthz8xpemh7rnsv4nske' +const osmosisStAtomLppAddr = 'nolus1jufcaqm6657xmfltdezzz85quz92rmtd88jk5x0hq9zqseem32ysjdm990' + +// Osmosis allBTC Protocol Contracts (OSMOSIS-OSMOSIS-ALL_BTC) pirin-1 +const osmosisBtcOracleAddr = 'nolus1y0nlrnw25mh2vxhaupamwca4wdvuxs26tq4tnxgjk8pw0gxevwfq5ry07c' +const osmosisBtcLeaserAddr = 'nolus1dzwc9hu9aqlmm7ua4lfs2lyafmy544dd8vefsmjw57qzcanhsvgsf4u3ld' +const osmosisBtcLppAddr = 'nolus1w2yz345pqheuk85f0rj687q6ny79vlj9sd6kxwwex696act6qgkqfz7jy3' + +// Osmosis allSOL Protocol Contracts (OSMOSIS-OSMOSIS-ALL_SOL) pirin-1 +const osmosisSolOracleAddr = 'nolus153kmhl85vavd03r9c7ardw4fgydge6kvvhrx5v2uvec4eyrlwthsejc6ce' +const osmosisSolLeaserAddr = 'nolus1lj3az53avjf8s9pzwvfe86d765kd7cmnhjt76vtqxjvn08xu0c6saumtza' +const osmosisSolLppAddr = 'nolus1qufnnuwj0dcerhkhuxefda6h5m24e64v2hfp9pac5lglwclxz9dsva77wm' + +// Osmosis AKT Protocol Contracts (OSMOSIS-OSMOSIS-AKT) pirin-1 +const osmosisAktOracleAddr = 'nolus12sx0kr60rptp846z2wvuwyxn47spg55dcnzwrhl4f7nfdduzsrxq7rfetn' +const osmosisAktLeaserAddr = 'nolus1shyx34xzu5snjfukng323u5schaqcj4sgepdfcv7lqfnvntmq55sj94hqt' +const osmosisAktLppAddr = 'nolus1lxr7f5xe02jq6cce4puk6540mtu9sg36at2dms5sk69wdtzdrg9qq0t67z' + // Astroport Protocol Contracts (NEUTRON-ASTROPORT-USDC_AXELAR) pirin-1 const astroportOracleAddr = 'nolus1jew4l5nq7m3xhkqzy8j7cc99083m5j8d9w004ayyv8xl3yv4h0dql2dd4e' const astroportLppAddr = 'nolus1qqcr7exupnymvg6m63eqwu8pd4n5x6r5t3pyyxdy7r97rcgajmhqy3gn94' @@ -51,11 +71,20 @@ async function getLppTvl(lppAddresses) { const lpps = await queryManyContracts({ contracts: lppAddresses, chain: 'nolus', data: { 'lpp_balance': [] } }) let totalLpp = 0 + let divisor = _6Zeros; // Default 6 decimals + + // Adjust divisor based on specific addresses for allBTC and allSOL + if (lppAddresses.includes(osmosisBtcLppAddr)) { + divisor = 100000000; // 8 decimals for BTC + } else if (lppAddresses.includes(osmosisSolLppAddr)) { + divisor = 1000000000; // 9 decimals for SOL + } + lpps.forEach(v => { totalLpp += Number(v.balance.amount) }) - return totalLpp / _6Zeros + return totalLpp / divisor; } function sumAssests(balances, leases, currencies) { @@ -103,7 +132,11 @@ module.exports = { tvl: async () => { return { 'axlusdc': await getLppTvl([osmosisAxlLppAddr, astroportLppAddr]), - 'usd-coin': await getLppTvl([osmosisNobleLppAddr, astroportNobleLppAddr]) + 'usd-coin': await getLppTvl([osmosisNobleLppAddr, astroportNobleLppAddr]), + 'stride-staked-atom': await getLppTvl([osmosisStAtomLppAddr]), + 'osmosis-allbtc': await getLppTvl([osmosisBtcLppAddr]), + 'osmosis-allsol': await getLppTvl([osmosisSolLppAddr]), + 'akash-network': await getLppTvl([osmosisAktLppAddr]) } } }, @@ -120,6 +153,10 @@ module.exports = { return await tvl([ { leaser: osmosisNobleLeaserAddr, oracle: osmosisNobleOracleAddr }, { leaser: osmosisAxlLeaserAddr, oracle: osmosisAxlOracleAddr }, + { leaser: osmosisStAtomLeaserAddr, oracle: osmosisStAtomOracleAddr }, + { leaser: osmosisBtcLeaserAddr, oracle: osmosisBtcOracleAddr }, + { leaser: osmosisSolLeaserAddr, oracle: osmosisSolOracleAddr }, + { leaser: osmosisAktLeaserAddr, oracle: osmosisAktOracleAddr } ]) } } From 85f5f76d3f1bcbb23c4ff4d1e7cc69700d245bea Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Thu, 7 Nov 2024 21:33:11 -0700 Subject: [PATCH 248/787] Fix avalon usda typo (#12202) --- projects/avalon-finance-usda/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/avalon-finance-usda/index.js b/projects/avalon-finance-usda/index.js index 5de4e4c95086..a4e3c61b6a6b 100644 --- a/projects/avalon-finance-usda/index.js +++ b/projects/avalon-finance-usda/index.js @@ -22,7 +22,7 @@ const config = { } module.exports = { - methodology: `FBTC and LFFBTC as collateral`, + methodology: `FBTC and LFBTC as collateral`, } Object.keys(config).forEach(chain => { @@ -30,4 +30,4 @@ Object.keys(config).forEach(chain => { module.exports[chain] = { tvl: sumTokensExport({ owner: poolAddress, tokens: [lfbtcAddress, fbtcAddress], }), } -}) \ No newline at end of file +}) From 99575c3acf11f4fda3d8415b5bac1611ebedeec4 Mon Sep 17 00:00:00 2001 From: Brandon Date: Thu, 7 Nov 2024 20:34:05 -0800 Subject: [PATCH 249/787] update/add-chains (#12164) Co-authored-by: deepak --- projects/steer/index.js | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/projects/steer/index.js b/projects/steer/index.js index feebf6ae128e..8b1e583f7da7 100644 --- a/projects/steer/index.js +++ b/projects/steer/index.js @@ -28,12 +28,12 @@ const supportedChains = [ chainId: 56, identifier: 'bsc' }, - { - name: 'Evmos', - subgraphEndpoint: 'https://subgraph.satsuma-prod.com/769a117cc018/steer/steer-protocol-evmos/api', - chainId: 9001, - identifier: 'evmos' - }, + // { + // name: 'Evmos', + // subgraphEndpoint: 'https://subgraph.satsuma-prod.com/769a117cc018/steer/steer-protocol-evmos/api', + // chainId: 9001, + // identifier: 'evmos' + // }, { name: 'Avalanche', subgraphEndpoint: 'https://subgraph-proxy-server-xf2uthetka-as.a.run.app/gateway-arbitrum/GZotTj3rQJ8ZqVyodtK8TcnKcUxMgeF7mCJHGPYbu8dA', @@ -160,6 +160,24 @@ const supportedChains = [ chainId: 14, identifier: 'flare' }, + { + name: 'ApeChain', + subgraphEndpoint: 'https://api.goldsky.com/api/public/project_clohj3ta78ok12nzs5m8yag0b/subgraphs/steer-protocol-apechain/1.1.1/gn', + chainId: 33139, + identifier: 'apechain' + }, + // { + // name: 'Bittorrent', + // subgraphEndpoint: 'https://api.goldsky.com/api/public/project_clohj3ta78ok12nzs5m8yag0b/subgraphs/steer-protocol-btt/1.1.1/gn', + // chainId: 199, + // identifier: 'bittorrent' + // }, + { + name: 'Filecoin', + subgraphEndpoint: 'https://fil.subgraph.laconic.com/v1/steer-protocol/iRoheeEh2g6CdZ9OnunLwNCFHG8a7TAdtIYNNxboRSKVxgZfjq', + chainId: 314, + identifier: 'filecoin' + }, ] // Fetch active vaults and associated data @todo limited to 1000 per chain From 42200761f58b3be7885360a74fb91654257161ff Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:37:49 +0100 Subject: [PATCH 250/787] steer: enable evmos --- projects/steer/index.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/steer/index.js b/projects/steer/index.js index 8b1e583f7da7..32ad3085db13 100644 --- a/projects/steer/index.js +++ b/projects/steer/index.js @@ -28,12 +28,12 @@ const supportedChains = [ chainId: 56, identifier: 'bsc' }, - // { - // name: 'Evmos', - // subgraphEndpoint: 'https://subgraph.satsuma-prod.com/769a117cc018/steer/steer-protocol-evmos/api', - // chainId: 9001, - // identifier: 'evmos' - // }, + { + name: 'Evmos', + subgraphEndpoint: 'https://subgraph.satsuma-prod.com/769a117cc018/steer/steer-protocol-evmos/api', + chainId: 9001, + identifier: 'evmos' + }, { name: 'Avalanche', subgraphEndpoint: 'https://subgraph-proxy-server-xf2uthetka-as.a.run.app/gateway-arbitrum/GZotTj3rQJ8ZqVyodtK8TcnKcUxMgeF7mCJHGPYbu8dA', From bd5b5b7d9959954583eadebce4517d35b83099ed Mon Sep 17 00:00:00 2001 From: rouzwelt Date: Fri, 8 Nov 2024 05:22:50 +0000 Subject: [PATCH 251/787] update raindex eth v4 contract (#12210) --- projects/raindex/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/raindex/index.js b/projects/raindex/index.js index dde9156dbdeb..f67d3f26e170 100644 --- a/projects/raindex/index.js +++ b/projects/raindex/index.js @@ -33,7 +33,9 @@ const orderbooks = { v3: [ { address: "0xf1224a483ad7f1e9aa46a8ce41229f32d7549a74", start: 1707183011 }, ], - v4: [] + v4: [ + { address: "0x0eA6d458488d1cf51695e1D6e4744e6FB715d37C", start: 1729850783 }, + ] }, flare: { v3: [ From 06e947aa44f769078c08aafa316a8f0d5e3b88ff Mon Sep 17 00:00:00 2001 From: Vojtch Date: Fri, 8 Nov 2024 06:27:41 +0100 Subject: [PATCH 252/787] update: pwn (#12204) --- projects/pwn/index.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/projects/pwn/index.js b/projects/pwn/index.js index b4f34810cdb5..5ce7b821b5b7 100644 --- a/projects/pwn/index.js +++ b/projects/pwn/index.js @@ -14,6 +14,7 @@ const PWN_BUNDLER_BSC = "0x4A75a527E97d853109aA6998a2B9E45a87A31e9f"; const PWN_V1_SIMPLE_LOAN = "0x50160ff9c19fbE2B5643449e1A321cAc15af2b2C"; const PWN_V1_1_SIMPLE_LOAN_A = "0x57c88D78f6D08b5c88b4A3b7BbB0C1AA34c3280A"; // Mainnet, Polygon, Arbitrum, BSC const PWN_V1_1_SIMPLE_LOAN_B = "0x4188C513fd94B0458715287570c832d9560bc08a"; // Cronos, Base, Optimism +const PWN_V1_2_SIMPLE_LOAN = "0x9A93AE395F09C6F350E3306aec592763c517072e"; module.exports = { misrepresentedTokens: true, @@ -26,6 +27,7 @@ module.exports = { PWN_BUNDLER_MAINNET, PWN_V1_SIMPLE_LOAN, PWN_V1_1_SIMPLE_LOAN_A, + PWN_V1_2_SIMPLE_LOAN, ], resolveNFTs: true, resolveArtBlocks: true, @@ -40,6 +42,7 @@ module.exports = { PWN_BUNDLER_POLYGON, PWN_V1_SIMPLE_LOAN, PWN_V1_1_SIMPLE_LOAN_A, + PWN_V1_2_SIMPLE_LOAN, ], fetchCoValentTokens: true, }), @@ -51,22 +54,32 @@ module.exports = { }, base: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_BASE, PWN_V1_1_SIMPLE_LOAN_B], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_BASE, PWN_V1_1_SIMPLE_LOAN_B, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, arbitrum: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_ARBITRUM, PWN_V1_1_SIMPLE_LOAN_A], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_ARBITRUM, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, optimism: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_OPTIMISM, PWN_V1_1_SIMPLE_LOAN_B], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_OPTIMISM, PWN_V1_1_SIMPLE_LOAN_B, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, bsc: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_BSC, PWN_V1_1_SIMPLE_LOAN_A], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_BSC, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + }), + }, + linea: { + tvl: sumTokensExport({ + owners: [PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + }), + }, + xdai: { + tvl: sumTokensExport({ + owners: [PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, mantle: { tvl: () => ({}) }, From acc32bfbaaa0646c15a6a6c14b883b7370d1524d Mon Sep 17 00:00:00 2001 From: Koen Vermeulen <84975944+kptvermeulen@users.noreply.github.com> Date: Fri, 8 Nov 2024 06:37:02 +0100 Subject: [PATCH 253/787] project/reform (#12201) Co-authored-by: Koen Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/reform/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/reform/index.js diff --git a/projects/reform/index.js b/projects/reform/index.js new file mode 100644 index 000000000000..8a59d884b9c0 --- /dev/null +++ b/projects/reform/index.js @@ -0,0 +1,9 @@ +const { staking } = require('../helper/staking') + +module.exports = { + ethereum: { + tvl: () => ({}), + staking: staking('0x74ef3b69e8c475df8450eddda5dabd9b6dd17972', '0xea3eed8616877F5d3c4aEbf5A799F2e8D6DE9A5E'), + pool2: staking('0x74ef3b69e8c475df8450eddda5dabd9b6dd17972', '0xf4e14a7766a3316d6cefbaec614c714f2d4965d8') + } +} From fb6927ebc31219c0685bf2d12de424ca8079efab Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 8 Nov 2024 14:35:48 +0800 Subject: [PATCH 254/787] feat: udpate pumpbtc adapter logic (#12147) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/bitcoin-book/fetchers.js | 6 ++-- projects/pumpbtc/index.js | 46 ++++++++++++++++-------- 2 files changed, 34 insertions(+), 18 deletions(-) diff --git a/projects/helper/bitcoin-book/fetchers.js b/projects/helper/bitcoin-book/fetchers.js index c6e7d795d2e5..5fd55c3f2dfd 100644 --- a/projects/helper/bitcoin-book/fetchers.js +++ b/projects/helper/bitcoin-book/fetchers.js @@ -74,11 +74,11 @@ module.exports = { return Object.values(await getConfig('solv-protocol/solv-btc-lst', API_URL)).flat(); }, pumpBTC: async () => { - const API_URL = 'https://dashboard.pumpbtc.xyz/api/dashboard/btc/addresses' - return getConfig('pumpbtc', undefined, { + const API_URL = 'https://dashboard.pumpbtc.xyz/api/dashboard/asset/tokenowners' + return getConfig('pumpbtc/v2', undefined, { fetcher: async () => { const { data } = await axios.get(API_URL) - return data.data || [] + return data.data.bitcoin.owners } }) }, diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index 7291dc99056c..00073c974d76 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -1,30 +1,46 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens } = require('../helper/sumTokens'); -const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') +const utils = require('../helper/utils'); +const { getConfig } = require('../helper/cache'); +const bitcoinBook = require('../helper/bitcoin-book'); module.exports = { methodology: 'TVL for pumpBTC is calculated based on the total value of WBTC, FBTC, BTCB held in the contract that were utilized in the minting process of pumpBTC.', } -const config = { - ethereum: { owners: ['0x1fCca65fb6Ae3b2758b9b2B394CB227eAE404e1E', '0x3d9bCcA8Bc7D438a4c5171435f41a0AF5d5E6083', '0xAC364d14020f1da0044699691a91f06ca6131Fe3', '0x1fCca65fb6Ae3b2758b9b2B394CB227eAE404e1E'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364', ADDRESSES.ethereum.WBTC], }, - bsc: { owners: ['0x2Ee808F769AB697C477E0aF8357315069b66bCBb', '0x80922aD2771c5Ea9C14bA5FF4a903EC6B0f7e7C9', '0x2b4B9047C9fEA54705218388bFC7Aa7bADA4BB5E', '0x8A0727B87fa1027c419c3aa2caf56C799d5Bd8c5'], tokens: [ADDRESSES.bsc.BTCB, '0xC96dE26018A54D51c097160568752c4E3BD6C364'], }, - mantle: { owners: ['0xd6Ab15B2458B6EC3E94cE210174d860FdBdd6b96'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364'], }, - bitcoin: {}, - base: { owners: ['0x1fCca65fb6Ae3b2758b9b2B394CB227eAE404e1E', '0x4913D495cBA3e1380218d2258126F22Ea5dE5f8B', '0xC7DA129335F8815d62fBd3ca7183A3b2791CdB5e', '0xca873913BBf124441857d32Bb23f723b68433465', '0xF1D06Be8dF2F7Ed4Cdc9ac05915EA2b618FFA3Fb'], tokens: ['0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'], }, + +async function getStakingAddresses() { + let res = await utils.fetchURL('https://dashboard.pumpbtc.xyz/api/dashboard/asset/tokenowners') + + const btcAddresses = res.data.data || {} + //console.log('>>', btcAddresses.length) + return btcAddresses +} + +async function bitcoinTvl(api) { + const owners = await bitcoinBook.pumpBTC() + return sumTokens({ api, owners }) +} + +async function otherTvl(api) { + const addresses = await getConfig('pumpbtc/v2', undefined, { fetcher: getStakingAddresses }) + + if (!addresses[api.chain]) { + return; + } + + const { owners, tokens } = addresses[api.chain] + return api.sumTokens({ owners, tokens }) } -Object.keys(config).forEach(chain => { - const { owners, tokens, } = config[chain] +module.exports.isHeavyProtocol = true; - if (chain === 'bitcoin') { +['bitcoin', 'ethereum', 'bsc', 'mantle', 'base'].forEach(chain => { + if (chain == 'bitcoin') { module.exports[chain] = { - tvl: async (api) => { return sumTokens({ api, owners: await bitcoinAddressBook.pumpBTC() }) } + tvl: bitcoinTvl, } } else { module.exports[chain] = { - tvl: async (api) => api.sumTokens({ owners, tokens }) + tvl: otherTvl } } }) - -module.exports.isHeavyProtocol = true From d356afd0e4a07f69cd12dd43fa26727a64470403 Mon Sep 17 00:00:00 2001 From: santino <83203265+santinoYoung@users.noreply.github.com> Date: Fri, 8 Nov 2024 19:43:45 +0800 Subject: [PATCH 255/787] Update Desyn strategy Pools (#12136) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/desyn-basisTrading/index.js | 12 +++++ projects/desyn-farm/helper.js | 59 +++++++++++++++++++++++++ projects/desyn-farm/index.js | 46 ++++--------------- projects/desyn-farm1/index.js | 48 -------------------- projects/desyn-yieldAggregator/index.js | 12 +++++ projects/desyn/index.js | 39 ---------------- 6 files changed, 92 insertions(+), 124 deletions(-) create mode 100644 projects/desyn-basisTrading/index.js create mode 100644 projects/desyn-farm/helper.js delete mode 100644 projects/desyn-farm1/index.js create mode 100644 projects/desyn-yieldAggregator/index.js delete mode 100644 projects/desyn/index.js diff --git a/projects/desyn-basisTrading/index.js b/projects/desyn-basisTrading/index.js new file mode 100644 index 000000000000..ec2b2904956f --- /dev/null +++ b/projects/desyn-basisTrading/index.js @@ -0,0 +1,12 @@ +const { getTvlFunction, chains } = require("../desyn-farm/helper"); + +module.exports = { + doublecounted: true, + methodology: 'Combines on-chain airdrops with stable returns from basis trading on Binance.', +} + +chains.forEach(chain => { + module.exports[chain] = { + tvl: getTvlFunction('StrategyType3', true) + } +}) \ No newline at end of file diff --git a/projects/desyn-farm/helper.js b/projects/desyn-farm/helper.js new file mode 100644 index 000000000000..e4c51906f273 --- /dev/null +++ b/projects/desyn-farm/helper.js @@ -0,0 +1,59 @@ +const { getConfig } = require('../helper/cache') + +const chains = ["ethereum", "arbitrum", "btr", "mode", "zklink", "core", "ailayer", "linea", "merlin", "scroll"]; + +const abi = { + getBalance: "function getBalance(address) view returns (uint256)" +} + +async function getInfoListPool(strategy_type, chain) { + const data = await getConfig('desyn/' + strategy_type, `https://api.desyn.io/etf/defillama/get_pool_list?strategy_type=${strategy_type}`) + return data.data.config[chain]?.safePools +} + +// This is aSTETH, +// before the design of the semi-closed soETH, +// the contract in order to limit the closure of the time, +// the user can still deposit, +// so he was given a maximum value of the balance, +// which will become negative after adding any number, blocking the user to put in +const leverageStaking = '0x1982b2F5814301d4e9a8b0201555376e62F82428' + + +function getTvlFunction(strategy_type, isDoubleCounted) { + return async (api) => { + const pools = await getInfoListPool(strategy_type, api.chain) + if (!pools?.length) return; + const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools }) + const calls = [] + const tokensAndOwners = [] + const allTokens = [] + let i = 0 + + for (const pool of pools) { + for (const token of tokens[i]) { + if (!isDoubleCounted) { + tokensAndOwners.push([token, pool]) + } else { + calls.push({ target: pool, params: token }) + allTokens.push(token) + } + } + i++ + } + + if (!isDoubleCounted) return api.sumTokens({ tokensAndOwners }) + + const allBals = await api.multiCall({ abi: abi.getBalance, calls }) + api.add(allTokens, allBals) + + if (strategy_type === 'StrategyType2') + api.removeTokenBalance(leverageStaking) + } +} + + +module.exports = { + getTvlFunction, + chains +} \ No newline at end of file diff --git a/projects/desyn-farm/index.js b/projects/desyn-farm/index.js index b87569fa867f..07add1a91de6 100644 --- a/projects/desyn-farm/index.js +++ b/projects/desyn-farm/index.js @@ -1,44 +1,16 @@ -const { getLogs } = require('../helper/cache/getLogs') +const { getTvlFunction, chains } = require("./helper"); module.exports = { - doublecounted: true, - methodology: 'On-chain restaking', + hallmarks: [ + [1719734400, "Launched on Merlin Chain"], + [1718092800, "DeSyn KelpDAO Restaking Fund Launched"], + [1713340800, "Restaking Fund Series Launched"] + ], + methodology: 'Focused on airdrops from DeSyn and new chains.', } -const config = { - merlin: { factory: '0x790b4ee7998A93702f29e56f8b615eF35BE5af43', fromBlock: 11260440}, -} - -const abi = { - getBalance: "function getBalance(address) view returns (uint256)" -} - -Object.keys(config).forEach(chain => { - const {factory, fromBlock, } = config[chain] +chains.forEach(chain => { module.exports[chain] = { - tvl: async (api) => { - const logs = await getLogs({ - api, - target: factory, - eventAbi: 'event LOG_NEW_POOL (address indexed caller, address indexed pool)', - onlyArgs: true, - fromBlock, - }) - - const pools = logs.map(i=>i.pool) - const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools}) - const calls = [] - const allTokens = [] - let i = 0 - for (const pool of pools) { - for (const token of tokens[i]) { - calls.push({ target: pool, params: token }) - allTokens.push(token) - } - i++ - } - const allBals = await api.multiCall({ abi: abi.getBalance, calls }) - api.add(allTokens, allBals) - } + tvl: getTvlFunction('StrategyType1', false) } }) \ No newline at end of file diff --git a/projects/desyn-farm1/index.js b/projects/desyn-farm1/index.js deleted file mode 100644 index ace2e44e8938..000000000000 --- a/projects/desyn-farm1/index.js +++ /dev/null @@ -1,48 +0,0 @@ -const { getLogs } = require('../helper/cache/getLogs') - -module.exports = { - methodology: 'On-chain restaking', - doublecounted: true -} - -const config = { - btr: { factory: '0x09eFC8C8F08B810F1F76B0c926D6dCeb37409665', fromBlock: 2393247 }, - mode: { factory: '0x09Dfee598d5217da799bEAd56206beC0fDB0D17B', fromBlock: 9912410 }, - zklink: { factory: '0xCCA610644f19d7d8f96b90a896B160f54cBE3204', fromBlock: 4734230 }, - core: { factory: '0x5C3027D8Cb28A712413553206A094213337E88c5', fromBlock: 17552799 } - -} - -const abi = { - getBalance: "function getBalance(address) view returns (uint256)" -} - -Object.keys(config).forEach(chain => { - const { factory, fromBlock, } = config[chain] - module.exports[chain] = { - tvl: async (api) => { - const logs = await getLogs({ - api, - target: factory, - eventAbi: 'event LOG_NEW_POOL (address indexed caller, address indexed pool)', - onlyArgs: true, - fromBlock, - }) - - const pools = logs.map(i => i.pool) - const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools }) - const calls = [] - const allTokens = [] - let i = 0 - for (const pool of pools) { - for (const token of tokens[i]) { - calls.push({ target: pool, params: token }) - allTokens.push(token) - } - i++ - } - const allBals = await api.multiCall({ abi: abi.getBalance, calls }) - api.add(allTokens, allBals) - } - } -}) \ No newline at end of file diff --git a/projects/desyn-yieldAggregator/index.js b/projects/desyn-yieldAggregator/index.js new file mode 100644 index 000000000000..835f12569bb8 --- /dev/null +++ b/projects/desyn-yieldAggregator/index.js @@ -0,0 +1,12 @@ +const { getTvlFunction, chains } = require("../desyn-farm/helper"); + +module.exports = { + doublecounted: true, + methodology: 'Engages with DeFi protocols like Lending, DEX, and Restaking, offering both airdrops and structured yield options.', +} + +chains.forEach(chain => { + module.exports[chain] = { + tvl: getTvlFunction('StrategyType2', true) + } +}) \ No newline at end of file diff --git a/projects/desyn/index.js b/projects/desyn/index.js deleted file mode 100644 index a2fbc83e3e4a..000000000000 --- a/projects/desyn/index.js +++ /dev/null @@ -1,39 +0,0 @@ -const sdk = require('@defillama/sdk') -const { getLogs } = require('../helper/cache/getLogs') - -module.exports = { - doublecounted: true, - hallmarks: [ - [1719734400, "Launched on Merlin Chain"], - ], - methodology: 'Liquid restaking strategy', -} - -const config = { - ethereum: { factory: '0x01a38B39BEddCD6bFEedBA14057E053cBF529cD2', fromBlock: 17335174}, - arbitrum: { factory: '0xdE6b117384452b21F5a643E56952593B88110e78', fromBlock: 175985457}, - //merlin chain is tracked under a new listing for farm - // merlin: { factory: '0x790b4ee7998A93702f29e56f8b615eF35BE5af43', fromBlock: 11260440}, - //bitlayer chain is tracked under a new listing for farm - // btr: { factory: '0x09eFC8C8F08B810F1F76B0c926D6dCeb37409665', fromBlock: 2393247}, -} - -Object.keys(config).forEach(chain => { - const {factory, fromBlock, } = config[chain] - - module.exports[chain] = { - tvl: async (api) => { - const logs = await getLogs({ - api, - target: factory, - eventAbi: 'event LOG_NEW_POOL (address indexed caller, address indexed pool)', - onlyArgs: true, - fromBlock, - }) - - const pools = logs.map(i=>i.pool) - const tokens = await api.multiCall({ abi: 'address[]:getCurrentTokens', calls: pools}) - return api.sumTokens({ ownerTokens: tokens.map((tokens, i) => [tokens, pools[i]])}) - } - } -}) \ No newline at end of file From 0791ac874f322371d176be21862ec94896ea74f2 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:24:27 +0100 Subject: [PATCH 256/787] [WIP] -Fix: Maker (#12211) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/maker-rwa/index.js | 224 ++++++++++-------------------------- projects/maker/index.js | 224 ++++++++++-------------------------- 2 files changed, 118 insertions(+), 330 deletions(-) diff --git a/projects/maker-rwa/index.js b/projects/maker-rwa/index.js index d25b128706ff..e1f80c3b05f6 100644 --- a/projects/maker-rwa/index.js +++ b/projects/maker-rwa/index.js @@ -1,185 +1,79 @@ const ADDRESSES = require('../helper/coreAssets.json') -// const utils = require('web3-utils'); -const sdk = require('@defillama/sdk'); -const MakerSCDConstants = require("../maker/abis/makerdao.js"); -const MakerMCDConstants = require("../maker/abis/maker-mcd.js"); -const { sumTokens2 } = require('../helper/unwrapLPs') -const { getLogs } = require('../helper/cache/getLogs') +const { getLogs2 } = require('../helper/cache/getLogs') -async function getJoins(block, api) { - // let rely = utils.sha3("rely(address)").substr(0, 10); - // let relyTopic = utils.padRight(rely, 64); - let relyTopic = '0x65fae35e00000000000000000000000000000000000000000000000000000000' +const MCD_VAT = '0x35d1b3f3d7966a1dfe207aa4514c12a259a0492b' +const VAT_topic = '0x65fae35e00000000000000000000000000000000000000000000000000000000' +const START_VAT_BLOCK = 8928152 - let joins = []; - let failed = []; - const failedSet = new Set(failedJoins) +const MCD_DOG = '0x135954d155898d42c90d2a57824c690e0c7bef1b' +const DOG_topic = '0x4ff2caaa972a7c6629ea01fae9c93d73cc307d13ea4c369f9bbbb7f9b7e9461d' +const START_DOG_BLOCK = 12317310 - // get list of auths - const auths = ( - await getLogs({ - api, - target: MakerMCDConstants.VAT, - fromBlock: MakerMCDConstants.STARTBLOCK, - topics: [relyTopic], - }) - ).map(i => `0x${i.topics[1].substr(26)}`).filter(i => !failedSet.has(i)) - - const ilks = await api.multiCall({ - abi: MakerMCDConstants.ilk, - calls: auths, - permitFailure: true, - }); +const abi = { + ilk: 'function ilk() view returns (bytes32)', + ilks: 'function ilks (bytes32) view returns (uint256 art, uint256 rate, uint256 spot, uint256 line,uint256 dust)', + gem: "address:gem", + dog: "address:dog", +} - ilks.forEach((_, i) => { - const token = auths[i].toLowerCase() - if (_) joins.push(token) - else failed.push(token) +const getJoins = async (api) => { + const logs = (await getLogs2({ api, target: MCD_VAT, fromBlock: START_VAT_BLOCK, topics: [VAT_topic] })).map(log => { + return '0x' + log.topics[1].slice(-40); }) - if (failed.length) sdk.log('failed', failed) - - return joins; + const ilks = await api.multiCall({ abi: abi.ilk, calls: logs, permitFailure: true }) + + return logs.map((auth, i) => { + const ilk = ilks[i]; + if (!ilk) return null + return auth.toLowerCase(); + }).filter(Boolean); } -async function tvl(api) { - const block = api.block - let toa = [] - - const blacklistedJoins = [ - '0x7b3799b30f268ba55f926d7f714a3001af89d359', - '0x41ca7a7aa2be78cf7cb80c0f4a9bdfbc96e81815', - ] - if (block > MakerMCDConstants.STARTBLOCK) { - let joins = await getJoins(block, api); - const dogSet = new Set(dogs) - joins = joins.filter(i => !blacklistedJoins.includes(i) && !dogSet.has(i)) - - const { output: gems } = await sdk.api.abi.multiCall({ - abi: MakerMCDConstants.gem, - block, calls: joins.map(i => ({ target: i })), - permitFailure: true, - }) - const dogCalls = dogs.map(i => ({ target: i })) - - gems.forEach(({ success, output, input: { target } }) => { - target = target.toLowerCase() - if (!success) { - dogCalls.push({ target }) - return; - } - - toa.push([output, target]) - }) - - const { output: dogRes } = await sdk.api.abi.multiCall({ - abi: MakerMCDConstants.dog, - calls: dogCalls, block, - permitFailure: true, - }) - - const failedCalls = dogRes.filter(i => !i.success) - if (failedCalls.length) { - failedCalls.forEach(i => sdk.log('Failed both gem and dog calls', i.input.target)) - throw new Error('Failed both gem and dog calls') - } - } +const getDogs = async (api) => { + const logs = (await getLogs2({ api, target: MCD_DOG, fromBlock: START_DOG_BLOCK, topics: [DOG_topic], })).map(log => { + return '0x' + log.data.slice(-40); + }) - toa = toa.filter(i => i[0].toLowerCase() !== ADDRESSES.ethereum.SAI.toLowerCase()) - const symbols = await api.multiCall({ abi: 'erc20:symbol', calls: toa.map(t => t[0]) }) + const dogs = await api.multiCall({ abi: abi.dog, calls: logs, permitFailure: true }) + + return logs.map((auth, i) => { + const dog = dogs[i]; + if (!dog) return null + return auth.toLowerCase(); + }).filter(Boolean); +} - const owners = [] - toa.map((_, i) => { - if (!symbols[i].startsWith('RWA')) return; - owners.push(toa[i][1]) - }) - const ilks = await api.multiCall({ abi: 'function ilk() view returns (bytes32)', calls: owners }) - const res = await api.multiCall({ abi: 'function ilks (bytes32) view returns (uint256 art, uint256 rate, uint256 spot, uint256 line,uint256 dust)', calls:ilks, target:'0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B' }) +const tvl = async (api) => { + const [joins/*, dogs*/] = await Promise.all([ + getJoins(api), + // getDogs(api) + ]) + + const tokens = await api.multiCall({ abi: abi.gem, calls: joins, permitFailure: true }) + + let toas = joins.map((join, i) => { + const token = tokens[i]; + if (!token) return null + return [token, join] + }).filter(Boolean) + + toas = toas.filter(i => i[0].toLowerCase() !== ADDRESSES.ethereum.SAI.toLowerCase()) + const symbols = await api.multiCall({ abi: 'erc20:symbol', calls: toas.map(t => t[0]) }) + const owners = toas.map((toa, i) => { + if (!symbols[i].startsWith('RWA')) return null + return toa[1] + }).filter(Boolean) + + const ilks = await api.multiCall({ abi: abi.ilk, calls: owners }) + const res = await api.multiCall({ abi: abi.ilks, calls: ilks, target:'0x35D1b3F3D7966A1DFe207aa4514C12a259A0492B' }) res.forEach(i => api.add(ADDRESSES.ethereum.DAI, i.art)) - - return api.getBalances() } module.exports = { - methodology: `Counts all the tokens being used as collateral of CDPs. - - On the technical level, we get all the collateral tokens by fetching events, get the amounts locked by calling balanceOf() directly, unwrap any uniswap LP tokens and then get the price of each token from coingecko`, + methodology: `Counts all the tokens being used as collateral of CDPs. On the technical level, we get all the collateral tokens by fetching events, get the amounts locked by calling balanceOf() directly, unwrap any uniswap LP tokens and then get the price of each token from coingecko`, start: 1513566671, // 12/18/2017 @ 12:00am (UTC) ethereum: { tvl }, }; - -const dogs = [ - '0x832dd5f17b30078a5e46fdb8130a68cbc4a74dc0', - '0x9dacc11dcd0aa13386d295eaeebbd38130897e6f', - '0xc67963a226eddd77b91ad8c421630a1b0adff270', - '0x71eb894330e8a4b96b8d6056962e7f116f50e06f', - '0xc2b12567523e3f3cbd9931492b91fe65b240bc47', - '0x0227b54adbfaeec5f1ed1dfa11f54dcff9076e2c', - '0x3d22e6f643e2f4c563fd9db22b229cbb0cd570fb', - '0xdc90d461e148552387f3ab3ebee0bdc58aa16375', - '0x006aa3eb5e666d8e006aa647d4afab212555ddea', - '0xf5c8176e1eb0915359e46ded16e52c071bb435c0', - '0x2bb690931407dca7ece84753ea931ffd304f0f38', - '0x81c5cdf4817dbf75c7f08b8a1cdab05c9b3f70f7', - '0x6aac067bb903e633a422de7be9355e62b3ce0378', - '0x3713f83ee6d138ce191294c131148176015bc29a', - '0x834719bea8da68c46484e001143bdde29370a6a3', - '0x8723b74f598de2ea49747de5896f9034cc09349e', - '0x9f6981ba5c77211a34b76c6385c0f6fa10414035', - '0x93ae03815baf1f19d7f18d9116e4b637cc32a131', - '0x2ac4c9b49051275acb4c43ec973082388d015d48', - '0x4fc53a57262b87abda61d6d0db2be7e9be68f6b8', - '0xb15afab996904170f87a64fe42db0b64a6f75d24', - '0x6aa0520354d1b84e1c6abfe64a708939529b619e', - '0xb0ece6f5542a4577e2f1be491a937ccbbec8479e', - '0x854b252ba15eafa4d1609d3b98e00cc10084ec55', - '0xe4b82be84391b9e7c56a1fc821f47569b364dd4a', - '0x046b1a5718da6a226d912cfd306ba19980772908', - '0x5590f23358fe17361d7e4e4f91219145d8ccfcb3', - '0x0f6f88f8a4b918584e3539182793a0c276097f44', - '0xfc9d6dd08bee324a5a8b557d2854b9c36c2aec5d', - '0xbcb396cd139d1116bd89562b49b9d1d6c25378b0', - '0xa47d68b9db0a0361284fa04ba40623fcbd1a263e', - '0x66609b4799fd7ce12ba799ad01094abd13d5014d', - '0x9b3310708af333f6f379fa42a5d09cbaa10ab309', - '0x5322a3551bc6a1b39d5d142e5e38dc5b4bc5b3d2', - '0x29342f530ed6120bdb219d602dafd584676293d1', - '0x5048c5cd3102026472f8914557a1fd35c8dc6c9e', - '0x49a33a28c4c7d9576ab28898f4c9ac7e52ea457a', - '0xa93b98e57dde14a3e301f20933d59dc19bf8212e', - '0xe30663c6f83a06edee6273d72274ae24f1084a22', - '0x39f29773dcb94a32529d0612c6706c49622161d1', - '0xf93cc3a50f450ed245e003bfecc8a6ec1732b0b2', - '0xb55da3d3100c4ebf9de755b6ddc24bf209f6cc06', - '0x1926862f899410bfc19fefb8a3c69c7aed22463a', - '0x3ea60191b7d5990a3544b6ef79983fd67e85494a', - '0x27ca5e525ea473ed52ea9423cd08ccc081d96a98', - '0xd9e758bd239e5d568f44d0a748633f6a8d52cbbb', -] - -const failedJoins = [ - '0xbaa65281c2fa2baacb2cb550ba051525a480d3f4', - '0x65c79fcb50ca1594b025960e539ed7a9a6d434a3', - '0x19c0976f590d67707e62397c87829d896dc0f1f1', - '0x197e90f9fad81970ba7976f33cbd77088e5d7cf7', - '0x78f2c2af65126834c51822f56be0d7469d7a523e', - '0xab14d3ce3f733cacb76ec2abe7d2fcb00c99f3d5', - '0xbe8e3e3618f7474f8cb1d074a26affef007e98fb', - '0x4d95a049d5b0b7d32058cd3f2163015747522e99', - '0xa41b6ef151e06da0e34b009b86e828308986736d', - '0xa5679c04fc3d9d8b0aab1f0ab83555b301ca70ea', - '0xc7bdd1f2b16447dcf3de045c4a039a60ec2f0ba3', - '0x88f88bb9e66241b73b84f3a6e197fbba487b1e30', - '0xbb856d1742fd182a90239d7ae85706c2fe4e5922', - '0x29cfbd381043d00a98fd9904a431015fef07af2f', - '0x135954d155898d42c90d2a57824c690e0c7bef1b', - '0x1eb4cf3a948e7d72a198fe073ccb8c7a948cd853', - '0x2cc583c0aacdac9e23cb601fda8f1a0c56cdcb71', - '0x09e05ff6142f2f9de8b6b65855a1d56b6cfe4c58', - '0xa4c22f0e25c6630b2017979acf1f865e94695c4b', - '0x0e2e8f1d1326a4b9633d96222ce399c708b19c28', - '0x60744434d6339a6b27d73d9eda62b6f66a0a04fa', - '0x12f36cdea3a28c35ac8c6cc71d9265c17c74a27f', -] diff --git a/projects/maker/index.js b/projects/maker/index.js index 3775e50cd29a..d50414d7c735 100644 --- a/projects/maker/index.js +++ b/projects/maker/index.js @@ -1,103 +1,73 @@ const ADDRESSES = require('../helper/coreAssets.json') -// const utils = require('web3-utils'); -const sdk = require('@defillama/sdk'); -const MakerSCDConstants = require("./abis/makerdao.js"); -const MakerMCDConstants = require("./abis/maker-mcd.js"); +const { getLogs2 } = require('../helper/cache/getLogs') const { sumTokens2 } = require('../helper/unwrapLPs') -const { getLogs } = require('../helper/cache/getLogs') -async function getJoins(block, api) { - // let rely = utils.sha3("rely(address)").substr(0, 10); - // let relyTopic = utils.padRight(rely, 64); - let relyTopic = '0x65fae35e00000000000000000000000000000000000000000000000000000000' +const MCD_VAT = '0x35d1b3f3d7966a1dfe207aa4514c12a259a0492b' +const VAT_topic = '0x65fae35e00000000000000000000000000000000000000000000000000000000' +const START_VAT_BLOCK = 8928152 - let joins = []; - let failed = []; - const failedSet = new Set(failedJoins) +const MCD_DOG = '0x135954d155898d42c90d2a57824c690e0c7bef1b' +const DOG_topic = '0x4ff2caaa972a7c6629ea01fae9c93d73cc307d13ea4c369f9bbbb7f9b7e9461d' +const START_DOG_BLOCK = 12317310 - // get list of auths - const auths = ( - await getLogs({ - api, - target: MakerMCDConstants.VAT, - fromBlock: MakerMCDConstants.STARTBLOCK, - topics: [relyTopic], - }) - ).map(i => `0x${i.topics[1].substr(26)}`).filter(i => !failedSet.has(i)) - - const ilks = await api.multiCall({ - abi: MakerMCDConstants.ilk, - calls: auths, - permitFailure: true, - }); +const abi = { + ilk: "function ilk() view returns (bytes32)", + gem: "address:gem", + Pie: "uint256:Pie", + dog: "address:dog", +} - ilks.forEach((_, i) => { - const token = auths[i].toLowerCase() - if (_) joins.push(token) - else failed.push(token) +const getJoins = async (api) => { + const logs = (await getLogs2({ api, target: MCD_VAT, fromBlock: START_VAT_BLOCK, topics: [VAT_topic] })).map(log => { + return '0x' + log.topics[1].slice(-40); }) - if (failed.length) sdk.log('failed', failed) - - return joins; + const ilks = await api.multiCall({ abi: abi.ilk, calls: logs, permitFailure: true }) + + return logs.map((auth, i) => { + const ilk = ilks[i]; + if (!ilk) return null + return auth.toLowerCase(); + }).filter(Boolean); } -async function tvl(api) { - const block = api.block - let toa = [ - [MakerSCDConstants.WETH_ADDRESS, MakerSCDConstants.TUB_ADDRESS,], - ] - - const blacklistedJoins = [ - '0x7b3799b30f268ba55f926d7f714a3001af89d359', - '0x41ca7a7aa2be78cf7cb80c0f4a9bdfbc96e81815', - ] - if (block > MakerMCDConstants.STARTBLOCK) { - let joins = await getJoins(block, api); - const dogSet = new Set(dogs) - joins = joins.filter(i => !blacklistedJoins.includes(i) && !dogSet.has(i)) - - const { output: gems } = await sdk.api.abi.multiCall({ - abi: MakerMCDConstants.gem, - block, calls: joins.map(i => ({ target: i })), - permitFailure: true, - }) - const dogCalls = dogs.map(i => ({ target: i })) - - gems.forEach(({ success, output, input: { target } }) => { - target = target.toLowerCase() - if (!success) { - dogCalls.push({ target }) - return; - } +const getDogs = async (api) => { + const logs = (await getLogs2({ api, target: MCD_DOG, fromBlock: START_DOG_BLOCK, topics: [DOG_topic], skipCache: true, skipCacheRead: true })).map(log => { + return '0x' + log.data.slice(-40); + }) - toa.push([output, target]) - }) + const dogs = await api.multiCall({ abi: abi.dog, calls: logs, permitFailure: true }) + + return logs.map((auth, i) => { + const dog = dogs[i]; + if (!dog) return null + return auth.toLowerCase(); + }).filter(Boolean); +} - const { output: dogRes } = await sdk.api.abi.multiCall({ - abi: MakerMCDConstants.dog, - calls: dogCalls, block, - permitFailure: true, - }) +const tvl = async (api) => { + const [joins/*, dogs*/] = await Promise.all([ + getJoins(api), + // getDogs(api) + ]) - const failedCalls = dogRes.filter(i => !i.success) - if (failedCalls.length) { - failedCalls.forEach(i => sdk.log('Failed both gem and dog calls', i.input.target)) - throw new Error('Failed both gem and dog calls') - } - } + const tokens = await api.multiCall({ abi: abi.gem, calls: joins, permitFailure: true }) - toa = toa.filter(i => i[0].toLowerCase() !== ADDRESSES.ethereum.SAI.toLowerCase()) - const symbols = await api.multiCall({ abi: 'erc20:symbol', calls: toa.map(t => t[0]) }) - const gUNIToa = toa.filter((_, i) => symbols[i] === 'G-UNI') - toa = toa.filter((_, i) => symbols[i] !== 'G-UNI' && !symbols[i].startsWith('RWA')) + let toas = joins.map((join, i) => { + const token = tokens[i]; + if (!token) return null + return [token, join] + }).filter(Boolean) - const balances = await sumTokens2({ api, tokensAndOwners: toa, resolveLP: true, }) - await unwrapGunis({ api, toa: gUNIToa, balances, }) - return balances + toas = toas.filter(i => i[0].toLowerCase() !== ADDRESSES.ethereum.SAI.toLowerCase()) + const symbols = await api.multiCall({ abi: 'erc20:symbol', calls: toas.map(([token]) => token) }) + const gUNIToa = toas.filter((_, i) => symbols[i] === 'G-UNI') + toas = toas.filter((_, i) => symbols[i] !== 'G-UNI' && !symbols[i].startsWith('RWA')) + await unwrapGunis({ api, toa: gUNIToa, }) + return sumTokens2({ api, tokensAndOwners: toas, resolveLP: true}) } -async function unwrapGunis({ api, toa, balances = {} }) { +async function unwrapGunis({ api, toa, }) { const lps = toa.map(i => i[0]) const balanceOfCalls = toa.map(t => ({ params: t[1], target: t[0] })) const [ @@ -114,93 +84,17 @@ async function unwrapGunis({ api, toa, balances = {} }) { const ratio = bal / supplies[i] const token0Bal = uBalances[i][0] * ratio const token1Bal = uBalances[i][1] * ratio - sdk.util.sumSingleBalance(balances, token0s[i], token0Bal) - sdk.util.sumSingleBalance(balances, token1s[i], token1Bal) + api.add(token0s[i], token0Bal) + api.add(token1s[i], token1Bal) }) - sdk.util.removeTokenBalance(balances, ADDRESSES.ethereum.DAI) // remove dai balances - return balances + api.removeTokenBalance(ADDRESSES.ethereum.DAI) // remove dai balances } + module.exports = { - methodology: `Counts all the tokens being used as collateral of CDPs. - - On the technical level, we get all the collateral tokens by fetching events, get the amounts locked by calling balanceOf() directly, unwrap any uniswap LP tokens and then get the price of each token from coingecko`, + methodology: `Counts all the tokens being used as collateral of CDPs. On the technical level, we get all the collateral tokens by fetching events, get the amounts locked by calling balanceOf() directly, unwrap any uniswap LP tokens and then get the price of each token from coingecko`, start: 1513566671, // 12/18/2017 @ 12:00am (UTC) ethereum: { tvl }, -}; - -const dogs = [ - '0x832dd5f17b30078a5e46fdb8130a68cbc4a74dc0', - '0x9dacc11dcd0aa13386d295eaeebbd38130897e6f', - '0xc67963a226eddd77b91ad8c421630a1b0adff270', - '0x71eb894330e8a4b96b8d6056962e7f116f50e06f', - '0xc2b12567523e3f3cbd9931492b91fe65b240bc47', - '0x0227b54adbfaeec5f1ed1dfa11f54dcff9076e2c', - '0x3d22e6f643e2f4c563fd9db22b229cbb0cd570fb', - '0xdc90d461e148552387f3ab3ebee0bdc58aa16375', - '0x006aa3eb5e666d8e006aa647d4afab212555ddea', - '0xf5c8176e1eb0915359e46ded16e52c071bb435c0', - '0x2bb690931407dca7ece84753ea931ffd304f0f38', - '0x81c5cdf4817dbf75c7f08b8a1cdab05c9b3f70f7', - '0x6aac067bb903e633a422de7be9355e62b3ce0378', - '0x3713f83ee6d138ce191294c131148176015bc29a', - '0x834719bea8da68c46484e001143bdde29370a6a3', - '0x8723b74f598de2ea49747de5896f9034cc09349e', - '0x9f6981ba5c77211a34b76c6385c0f6fa10414035', - '0x93ae03815baf1f19d7f18d9116e4b637cc32a131', - '0x2ac4c9b49051275acb4c43ec973082388d015d48', - '0x4fc53a57262b87abda61d6d0db2be7e9be68f6b8', - '0xb15afab996904170f87a64fe42db0b64a6f75d24', - '0x6aa0520354d1b84e1c6abfe64a708939529b619e', - '0xb0ece6f5542a4577e2f1be491a937ccbbec8479e', - '0x854b252ba15eafa4d1609d3b98e00cc10084ec55', - '0xe4b82be84391b9e7c56a1fc821f47569b364dd4a', - '0x046b1a5718da6a226d912cfd306ba19980772908', - '0x5590f23358fe17361d7e4e4f91219145d8ccfcb3', - '0x0f6f88f8a4b918584e3539182793a0c276097f44', - '0xfc9d6dd08bee324a5a8b557d2854b9c36c2aec5d', - '0xbcb396cd139d1116bd89562b49b9d1d6c25378b0', - '0xa47d68b9db0a0361284fa04ba40623fcbd1a263e', - '0x66609b4799fd7ce12ba799ad01094abd13d5014d', - '0x9b3310708af333f6f379fa42a5d09cbaa10ab309', - '0x5322a3551bc6a1b39d5d142e5e38dc5b4bc5b3d2', - '0x29342f530ed6120bdb219d602dafd584676293d1', - '0x5048c5cd3102026472f8914557a1fd35c8dc6c9e', - '0x49a33a28c4c7d9576ab28898f4c9ac7e52ea457a', - '0xa93b98e57dde14a3e301f20933d59dc19bf8212e', - '0xe30663c6f83a06edee6273d72274ae24f1084a22', - '0x39f29773dcb94a32529d0612c6706c49622161d1', - '0xf93cc3a50f450ed245e003bfecc8a6ec1732b0b2', - '0xb55da3d3100c4ebf9de755b6ddc24bf209f6cc06', - '0x1926862f899410bfc19fefb8a3c69c7aed22463a', - '0x3ea60191b7d5990a3544b6ef79983fd67e85494a', - '0x27ca5e525ea473ed52ea9423cd08ccc081d96a98', - '0xd9e758bd239e5d568f44d0a748633f6a8d52cbbb', -] - -const failedJoins = [ - '0xbaa65281c2fa2baacb2cb550ba051525a480d3f4', - '0x65c79fcb50ca1594b025960e539ed7a9a6d434a3', - '0x19c0976f590d67707e62397c87829d896dc0f1f1', - '0x197e90f9fad81970ba7976f33cbd77088e5d7cf7', - '0x78f2c2af65126834c51822f56be0d7469d7a523e', - '0xab14d3ce3f733cacb76ec2abe7d2fcb00c99f3d5', - '0xbe8e3e3618f7474f8cb1d074a26affef007e98fb', - '0x4d95a049d5b0b7d32058cd3f2163015747522e99', - '0xa41b6ef151e06da0e34b009b86e828308986736d', - '0xa5679c04fc3d9d8b0aab1f0ab83555b301ca70ea', - '0xc7bdd1f2b16447dcf3de045c4a039a60ec2f0ba3', - '0x88f88bb9e66241b73b84f3a6e197fbba487b1e30', - '0xbb856d1742fd182a90239d7ae85706c2fe4e5922', - '0x29cfbd381043d00a98fd9904a431015fef07af2f', - '0x135954d155898d42c90d2a57824c690e0c7bef1b', - '0x1eb4cf3a948e7d72a198fe073ccb8c7a948cd853', - '0x2cc583c0aacdac9e23cb601fda8f1a0c56cdcb71', - '0x09e05ff6142f2f9de8b6b65855a1d56b6cfe4c58', - '0xa4c22f0e25c6630b2017979acf1f865e94695c4b', - '0x0e2e8f1d1326a4b9633d96222ce399c708b19c28', - '0x60744434d6339a6b27d73d9eda62b6f66a0a04fa', - '0x12f36cdea3a28c35ac8c6cc71d9265c17c74a27f', -] +}; \ No newline at end of file From 9f6d22772a1fa35d75b4aef11f082dab38c64589 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 8 Nov 2024 15:50:54 +0000 Subject: [PATCH 257/787] add wallets --- projects/treasury/op-foundation.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/treasury/op-foundation.js b/projects/treasury/op-foundation.js index 8b0283756d71..908dea7ea357 100644 --- a/projects/treasury/op-foundation.js +++ b/projects/treasury/op-foundation.js @@ -2,6 +2,10 @@ const ADDRESSES = require('../helper/coreAssets.json') const { nullAddress, treasuryExports } = require("../helper/treasury"); const treasury = "0x2501c477d0a35545a387aa4a3eee4292a9a8b3f0"; +const treasury2 = "0xfedfaf1a10335448b7fa0268f56d2b44dbd357de"; +const treasury3 = "0x2a82ae142b2e62cb7d10b55e323acb1cab663a26"; +const treasury4 = "0x19793c7824be70ec58bb673ca42d2779d12581be"; + const OP = ADDRESSES.optimism.OP module.exports = treasuryExports({ @@ -10,7 +14,7 @@ module.exports = treasuryExports({ nullAddress, ADDRESSES.optimism.USDC ], - owners: [treasury], + owners: [treasury,treasury2,treasury3,treasury4], ownTokens: [OP], }, ethereum: { From f009c9a606eb01871e06bf8aa9dbe34e2066fb41 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 8 Nov 2024 16:01:49 +0000 Subject: [PATCH 258/787] add wallet --- projects/treasury/safe.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/treasury/safe.js b/projects/treasury/safe.js index 47ddb3f1acf2..61b6a539bfaf 100644 --- a/projects/treasury/safe.js +++ b/projects/treasury/safe.js @@ -5,6 +5,7 @@ const treasury = "0x3EDf6868d7c42863E44072DaEcC16eCA2804Dea1" // const SAFE = ADDRESSES.ethereum.SAFE const safe_foundation_treasury = "0x1d4f25bc16b68c50b78e1040bc430a8097fd6f45" const safe_dao_2 = "0x0b00b3227a5f3df3484f03990a87e02ebad2f888" +const safe_gnosisdao_joint_treasury = "0xd28b432f06cb64692379758B88B5fCDFC4F56922" module.exports = treasuryExports({ @@ -19,7 +20,7 @@ module.exports = treasuryExports({ tokens: [ nullAddress, ], - owners: [safe_foundation_treasury, safe_dao_2], + owners: [safe_foundation_treasury, safe_dao_2,safe_gnosisdao_joint_treasury], ownTokens: [SAFE], }, From b19b41f8e7d131908562b2e57ea2a38ebe5201dd Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Fri, 8 Nov 2024 20:03:00 +0100 Subject: [PATCH 259/787] Fix: Velvet v3 (#12213) --- projects/velvet-capital-v3/index.js | 46 ++++++++++++----------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/projects/velvet-capital-v3/index.js b/projects/velvet-capital-v3/index.js index e5d4f0f52c03..532cba5dc350 100644 --- a/projects/velvet-capital-v3/index.js +++ b/projects/velvet-capital-v3/index.js @@ -1,38 +1,30 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require('../helper/unwrapLPs') -async function tvl(api) { - const indexes = await api.fetchList({ lengthAbi: 'uint256:portfolioId', itemAbi: 'function getPortfolioList(uint256) view returns (address)', target: config[api.chain] }) - const [tokens, vaults] = await Promise.all([ - api.multiCall({ abi: 'address[]:getTokens', calls: indexes }), - api.multiCall({ abi: 'address:vault', calls: indexes }), - ]) - - const blacklistsByChain = { - base: [ - ADDRESSES.bsc.USDT - ], - bsc: [ - ADDRESSES.optimism.WETH_1 - ] - } +const config = { + base: { address: '0xf93659fb357899e092813bc3a2959ceDb3282a7f', blacklistedTokens: [ADDRESSES.bsc.USDT, "0x96af5739ca66ca55ab71ac9f308720d5044995ee"] }, + bsc: { address: '0xA1fe1C37Bf899C7F7521082C002dFA4fEbAaA8dd', blacklistedTokens: [ADDRESSES.optimism.WETH_1] } +} - const blacklistedTokens = blacklistsByChain[api.chain] || [] +const abi = { + getTokens: 'address[]:getTokens', + vault: 'address:vault' +} +async function tvl(api, address, blacklistedTokens) { + const indexes = await api.fetchList({ lengthAbi: 'uint256:portfolioId', itemAbi: 'function getPortfolioList(uint256) view returns (address)', target: address }) + const [tokens, vaults] = await Promise.all([ + api.multiCall({ abi: abi.getTokens, calls: indexes }), + api.multiCall({ abi: abi.vault, calls: indexes }), + ]) - const ownerTokens = tokens.map((tokens, i) => [tokens, vaults[i]]); + const ownerTokens = vaults.map((vault, i) => ([tokens[i], vault])) return sumTokens2({ api, ownerTokens, resolveLP: true, blacklistedTokens}); } -module.exports = { - methodology: 'calculates overall value deposited across different protocol portfolios', -} - -const config = { - base : '0xf93659fb357899e092813bc3a2959ceDb3282a7f', - bsc: '0xA1fe1C37Bf899C7F7521082C002dFA4fEbAaA8dd' -} +module.exports = { methodology: 'calculates overall value deposited across different protocol portfolios' } Object.keys(config).forEach(chain => { - module.exports[chain] = { tvl } -}) \ No newline at end of file + const { address, blacklistedTokens } = config[chain] + module.exports[chain] = { tvl: (api) => tvl(api, address, blacklistedTokens) } +}) From 92dc1ca0f4e8578b415075b74559e993912b67fe Mon Sep 17 00:00:00 2001 From: JSB Date: Fri, 8 Nov 2024 15:40:25 -0600 Subject: [PATCH 260/787] =?UTF-8?q?=F0=9F=A5=95=20added=20Carrot=20tvl=20a?= =?UTF-8?q?dapter=20(#12205)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/carrot/index.js | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 projects/carrot/index.js diff --git a/projects/carrot/index.js b/projects/carrot/index.js new file mode 100644 index 000000000000..181ce8bb9cc8 --- /dev/null +++ b/projects/carrot/index.js @@ -0,0 +1,50 @@ +const { PublicKey } = require('@solana/web3.js'); +const { Program } = require("@project-serum/anchor"); +const { getConnection, getProvider, getTokenSupplies } = require('../helper/solana') + +async function tvl(api) { + + const connection = getConnection() + const programId = 'CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s' + const testVaultExclusion = '2AV35oWyAuSN5wmuy26VD5JirjVpXkfkv5ZMCQ2LtpuV' // our test vault should not be included in TVL + + // Use this method to track TVL via the token... + // const CRT_MINT = 'CRTx1JouZhzSU6XytsE42UQraoGqiHgxabocVfARTy2s'; + // await getTokenSupplies(CRT_MINT, {api}) + + // Use this method to track TVL via onchain state of each Vault by adding the balance at each strategy. + const programAccounts = await connection.getProgramAccounts(new PublicKey(programId), { + filters: [{ + memcmp: { + offset: 8, + bytes: 'CarrotLYPhQzYL4fEsTUvEzw5QDaMGSZUENHSkh7qzQa' // carrot keeper + }, + },] + }); + + const provider = getProvider(); + const idl = await Program.fetchIdl(programId, provider) + const program = new Program(idl, programId, provider) + + programAccounts.forEach(({ account, pubkey }, i) => { + if(pubkey.toBase58() !== testVaultExclusion) { + const { assets, strategies } = program.coder.accounts.decode( + "Vault", + account.data + ); + const assetMap = {} + assets.forEach(({assetId, mint }) => assetMap[assetId] = mint.toString()) + + strategies.forEach(i => { + api.add(assetMap[i.assetId], i.balance.toString()) + }) + } + }) +} + +module.exports = { + doublecounted: true, + timetravel: false, + methodology: 'TVL calculated by calling the onchain state of the CRT Vault accounts, and tallying the balance of each strategy.', + solana: { tvl }, +} From e57d8cefff92346c8d766cdb481f8239f06ace3c Mon Sep 17 00:00:00 2001 From: Octopus <156575930+gguuttss@users.noreply.github.com> Date: Sat, 9 Nov 2024 12:59:29 +0100 Subject: [PATCH 261/787] Add STAB Protocol adapter (#12218) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/stab-protocol/index.js | 37 +++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 projects/stab-protocol/index.js diff --git a/projects/stab-protocol/index.js b/projects/stab-protocol/index.js new file mode 100644 index 000000000000..20e6b505c0ee --- /dev/null +++ b/projects/stab-protocol/index.js @@ -0,0 +1,37 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +const { queryAddresses, sumTokens } = require('../helper/chain/radixdlt'); + +const STAB_COMPONENT = "component_rdx1cq70cjajtvllgk9z9wm9l8v6w8hsgtlw530cdgpraxprn4yevg89kf"; +const STAB_XRD_POOL_XRD_VAULT = "internal_vault_rdx1trk04c3sxffatj5h78w3266c8q07cvjlgq0zx44sask8wsam4q8rup"; +const ORACLE_COMPONENT = "component_rdx1cq7zsdqfh0mcwnutrevkz6wtml0vnav5fcmtf7rksmhk48urkyjg9c"; + +async function tvl(api) { + //get the token amounts of collaterals used in the STAB Protocol + const stabComponentTokens = await sumTokens({ owners: [STAB_COMPONENT], api }) + const xrdAmount = stabComponentTokens['radixdlt:resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd'] + const lsuLpAmount = stabComponentTokens['radixdlt:resource_rdx1thksg5ng70g9mmy9ne7wz0sc7auzrrwy7fmgcxzel2gvp8pj0xxfmf'] + + //calculate value of LSULP against XRD to get accurate price data + const [{ details: { state } }] = await queryAddresses({ addresses: [ORACLE_COMPONENT] } ) + const xrdPrice = state.fields[0].elements[0].fields[1].value + const lsuLpPrice = state.fields[0].elements[1].fields[1].value + const lsuLpMultiplier = lsuLpPrice / xrdPrice + + //add XRD and LSULP values to tvl + api.add('resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd', xrdAmount + lsuLpAmount * lsuLpMultiplier) + + //get the amount of XRD in the protocol native STAB/XRD pool (with 50/50 weights) + const stabXrdPoolXrdVault = await queryAddresses({ addresses: [STAB_XRD_POOL_XRD_VAULT] }); + const xrdAmountPool = stabXrdPoolXrdVault[0].details.balance.amount; + + //add only XRD value of pool to tvl (STAB value is excluded as backing of STAB tokens are already included in tvl) + api.add('resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd', xrdAmountPool) +} + +module.exports = { + methodology: 'Calculates TVL using the amount of collateral locked to borrow STAB using CDPs, and amount of STAB and XRD locked in the protocol-native STAB/XRD pool.', + radixdlt: { tvl }, + misrepresentedTokens: true, + timetravel: false, +}; From ee7641cb5797f03ffef4001860c42e665c409150 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 9 Nov 2024 20:00:49 +0800 Subject: [PATCH 262/787] Fix pumpbtc adapter(addresses of other chains not read properly) (#12217) --- projects/pumpbtc/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index 00073c974d76..eae9d22a1753 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -21,7 +21,7 @@ async function bitcoinTvl(api) { } async function otherTvl(api) { - const addresses = await getConfig('pumpbtc/v2', undefined, { fetcher: getStakingAddresses }) + const addresses = await getConfig('pumpbtc/v2-other', undefined, { fetcher: getStakingAddresses }) if (!addresses[api.chain]) { return; From 25e0795277d93c6bfed13c3a844660bebcd5a3c6 Mon Sep 17 00:00:00 2001 From: Si Yushin Date: Sat, 9 Nov 2024 20:02:05 +0800 Subject: [PATCH 263/787] Magma v3 (#12216) Co-authored-by: magmastone <152827065+magmastone@users.noreply.github.com> --- projects/magma/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/magma/index.js b/projects/magma/index.js index 944f4132a01b..29431c6927ff 100644 --- a/projects/magma/index.js +++ b/projects/magma/index.js @@ -5,8 +5,8 @@ const sdk = require('@defillama/sdk') module.exports = { iotex: { tvl: sdk.util.sumChainTvls([ - getLiquityTvl('0x21d81DABF6985587CE64C2E8EB12F69DF2178fe2'), - getLiquityTvl('0xAeB0B38040aDdc4a2b520919f13944D9bC944435') + getLiquityTvl('0x4315BcE6076953571caf1903d15D682727FBD935'), + getLiquityTvl('0xFF5F4bA96586EDae7E7D838D8770dFB3376Ec245', { nonNativeCollateralToken: true, collateralToken: "0x236f8c0a61dA474dB21B693fB2ea7AAB0c803894" }) ]), // staking: staking('0x037a2e9a464fbA409D0E55600836864B410d6Dd8', '0x6C0bf4b53696b5434A0D21C7D13Aa3cbF754913E'), // disabled as backing of WEN is already counted towards tvl }, From 88107559f704d97112b181235475442ef7493123 Mon Sep 17 00:00:00 2001 From: David Lee Date: Sat, 9 Nov 2024 07:03:18 -0500 Subject: [PATCH 264/787] Add additional reserve managers and tokens (#12215) --- projects/level-money/index.js | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/projects/level-money/index.js b/projects/level-money/index.js index 9eb014978698..d33473349184 100644 --- a/projects/level-money/index.js +++ b/projects/level-money/index.js @@ -1,8 +1,16 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/unwrapLPs"); +const AUSDC = '0x98C23E9d8f34FEFb1B7BD6a91B7FF122F4e16F5c'; +const AUSDT = '0x23878914EFE38d27C4D67Ab83ed1b93A74D4086a'; + +const LEVEL_WRAPPED_AUSDC = '0x78c6B27Be6DB520d332b1b44323F94bC831F5e33'; +const LEVEL_WRAPPED_AUSDT = '0xb723377679b807370Ae8615ae3E76F6D1E75a5F2'; + const LEVEL_STAKING_CONTRACT = '0x7FDA203f6F77545548E984133be62693bCD61497'; -const LEVEL_RESERVE_MANAGERS = ['0x70D544F75c2228D68EE04BC63e6e4Bae8F31fCEF']; +const LEVEL_RESERVE_MANAGERS = ['0x70D544F75c2228D68EE04BC63e6e4Bae8F31fCEF', '0x7B2c2C905184CEf1FABe920D4CbEA525acAa6f14']; +const LEVEL_WRAPPED_TOKENS = [LEVEL_WRAPPED_AUSDC, LEVEL_WRAPPED_AUSDT]; + const TOKEN_CONTRACTS = [ ADDRESSES.ethereum.USDT, // USDT @@ -11,17 +19,23 @@ const TOKEN_CONTRACTS = [ ADDRESSES.ethereum.SDAI, // sDAI ADDRESSES.ethereum.sUSDe, // sUSD ADDRESSES.ethereum.USDe, // USDe - "0x57f5e098cad7a3d1eed53991d4d66c45c9af7812", // wUSDM - "0x73a15fed60bf67631dc6cd7bc5b6e8da8190acf5", // USD0 + ADDRESSES.ethereum.FRAX, // FRAX + "0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776", // stUSD + "0xa663b02cf0a4b149d2ad41910cb81e23e1c41c32", // sFRAX + "0xa663b02cf0a4b149d2ad41910cb81e23e1c41c32", // sFRAX + "0x57F5E098CaD7A3D1Eed53991D4d66C45C9AF7812", // wUSDM + "0x73A15FeD60Bf67631dC6cd7Bc5B6e8da8190aCF5", // USD0 "0x35D8949372D46B7a3D5A56006AE77B215fc69bC0", // USD0++ - "0x15700b564ca08d9439c58ca5053166e8317aa138", // deUSD - "0x5c5b196abe0d54485975d1ec29617d42d9198326", // stdeUSD + "0x15700B564Ca08D9439C58cA5053166E8317aa138", // deUSD + "0x5C5b196aBE0d54485975D1Ec29617D42D9198326", // stdeUSD + AUSDC, + AUSDT, ]; module.exports = { ethereum: { tvl: sumTokensExport({ - owners: [LEVEL_STAKING_CONTRACT].concat(LEVEL_RESERVE_MANAGERS), + owners: [LEVEL_STAKING_CONTRACT, ...LEVEL_RESERVE_MANAGERS, ...LEVEL_WRAPPED_TOKENS], tokens: TOKEN_CONTRACTS, }), } From 95df8c63608efef94b7cc47c8666eb485c8efeb8 Mon Sep 17 00:00:00 2001 From: TheGreatAxios Date: Sat, 9 Nov 2024 04:23:05 -0800 Subject: [PATCH 265/787] Add SKALE IMA Bridge (Native) to SKALE TVL (#12214) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/skale/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/skale/index.js diff --git a/projects/skale/index.js b/projects/skale/index.js new file mode 100644 index 000000000000..f8ddabb789f2 --- /dev/null +++ b/projects/skale/index.js @@ -0,0 +1,10 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') +const depositBoxETH = '0x49F583d263e4Ef938b9E09772D3394c71605Df94'; +const depositBoxERC20 = '0x8fB1A35bB6fB9c47Fb5065BE5062cB8dC1687669'; + +module.exports = { + start: 1626697290, // Mon July 19 06:38:20 PM UTC 2021 + ethereum: { + tvl: sumTokensExport({ owners: [depositBoxETH, depositBoxERC20], fetchCoValentTokens: true, permitFailure: true }), + } +} \ No newline at end of file From ae6cda53aac5d0b7eb4e64b70983228ecf69e55d Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sat, 9 Nov 2024 14:50:19 +0000 Subject: [PATCH 266/787] add ezETH and uniBTC vaults --- projects/helper/tokenMapping.js | 8 ++++- projects/mitosis/index.js | 57 +++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 85634144793f..32b38de1173d 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -160,7 +160,13 @@ const fixBalancesTokens = { '0x93919784C523f39CACaa98Ee0a9d96c3F32b593e': { coingeckoId: 'universal-btc', decimals: 18 }, '0xC75D7767F2EdFbc6a5b18Fc1fA5d51ffB57c2B37': { coingeckoId: 'pumpbtc', decimals: 18 }, '0xCAbAE6f6Ea1ecaB08Ad02fE02ce9A44F09aebfA2': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, - } + }, + bsc: { + '0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a': { coingeckoId: 'universal-btc', decimals: 8 }, + }, + arbitrum: { + '0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a': { coingeckoId: 'universal-btc', decimals: 8 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/mitosis/index.js b/projects/mitosis/index.js index 8cc14608b2e4..885708245cbe 100644 --- a/projects/mitosis/index.js +++ b/projects/mitosis/index.js @@ -20,6 +20,48 @@ const UNIETH_ADDRESS = { }, }; +const uniBTC_ADDRESS = { + ethereum: { + asset: "0x004E9C3EF86bc1ca1f0bB5C7662861Ee93350568", + vault: "0xA1eBd23c4364e7491633237A0d9359D82c629182", + }, + arbitrum: { + asset: "0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a", + vault: "0x73981B0496fC08e9136BAF74b79d32A4d4F2a007", + }, + optimism: { + asset: "0x93919784C523f39CACaa98Ee0a9d96c3F32b593e", + vault: "0x5616Fe2762687Cd8a9158c27F62aff84E36821Be", + }, + bsc: { + asset: "0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a", + vault: "0xaDd58517c5D45c8ed361986f193785F8Ed1ABFc2", + }, +}; + +const ezETH_ADDRESS = { + ethereum: { + asset: "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110", + vault: "0x0109e9f292516dAB3E15EfC61811C5e5a7FA5358", + }, + arbitrum: { + asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + vault: "0xbEd575b0FeDa4F84b71144634693DaCc07749471", + }, + blast: { + asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + vault: "0x8506fD66FCeD711c11F9E837EcAEC0F87C3F60A0", + }, + linea: { + asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + vault: "0x96d6cE4e83dB947fF6bD1Ab0B377F23cd5D9ec2D", + }, + mode: { + asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + vault: "0xbEd575b0FeDa4F84b71144634693DaCc07749471" + } +}; + const WEETH_ADDRESS = { ethereum: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee", arbitrum: "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", @@ -88,6 +130,8 @@ module.exports = { { type: 'cap', data: { asset: WEETH_ADDRESS.ethereum, cap: CAP_ADDRESS.ethereum }}, { type: 'vault', data: { asset: VAULT_weETHs.ethereum, vault: vaults.ethereum }}, { type: 'vault', data: UNIETH_ADDRESS.ethereum }, + { type: 'vault', data: uniBTC_ADDRESS.ethereum }, + { type: 'vault', data: ezETH_ADDRESS.ethereum }, ], ), }, @@ -104,6 +148,8 @@ module.exports = { [ { type: 'cap', data: { asset: WEETH_ADDRESS.arbitrum, cap: CAP_ADDRESS.arbitrum }}, { type: 'vault', data: UNIETH_ADDRESS.arbitrum }, + { type: 'vault', data: uniBTC_ADDRESS.arbitrum }, + { type: 'vault', data: ezETH_ADDRESS.arbitrum }, ] ), }, @@ -111,6 +157,7 @@ module.exports = { tvl: chainTVL( [ { type: 'cap', data: { asset: WEETH_ADDRESS.optimism, cap: CAP_ADDRESS.optimism }}, + { type: 'vault', data: uniBTC_ADDRESS.optimism }, ], ), }, @@ -118,6 +165,7 @@ module.exports = { tvl: chainTVL( [ { type: 'cap', data: { asset: WEETH_ADDRESS.mode, cap: CAP_ADDRESS.mode }}, + { type: 'vault', data: ezETH_ADDRESS.mode }, ], ), }, @@ -132,6 +180,7 @@ module.exports = { tvl: chainTVL( [ { type: 'cap', data: { asset: WEETH_ADDRESS.blast, cap: CAP_ADDRESS.blast }}, + { type: 'vault', data: ezETH_ADDRESS.blast }, ], ), }, @@ -140,7 +189,15 @@ module.exports = { [ { type: 'cap', data: { asset: WEETH_ADDRESS.linea, cap: CAP_ADDRESS.linea }}, { type: 'vault', data: UNIETH_ADDRESS.linea }, + { type: 'vault', data: ezETH_ADDRESS.linea }, ], ), }, + bsc: { + tvl: chainTVL( + [ + { type: 'vault', data: uniBTC_ADDRESS.bsc }, + ] + ) + } }; From 18bdd69a84552535f98b4c3be10f521332ca04c6 Mon Sep 17 00:00:00 2001 From: Henrique Date: Sat, 9 Nov 2024 18:13:30 +0000 Subject: [PATCH 267/787] feat: add new base vault (w/morpho) on bakerfi (#12220) --- projects/bakerfi/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/bakerfi/index.js b/projects/bakerfi/index.js index 4452fe8612ee..ee598baa7f38 100644 --- a/projects/bakerfi/index.js +++ b/projects/bakerfi/index.js @@ -3,7 +3,7 @@ const config = { vaults: ["0x4c6d58749126FEBb1D28E8B8FdE97DC3107996d3"] }, base: { - vaults: ["0x37327c99bBc522e677a97d01021dB20227faF60A"] + vaults: ["0x37327c99bBc522e677a97d01021dB20227faF60A", "0x892022FE1431fdE03836725BBD0f0380e21E2095"] }, ethereum: { vaults: ["0x01280b3683fE20Dc9cCF4D9526418F252871E4F7"] From a6d9045479b25c6b32df2fa579ac4df9baba8b20 Mon Sep 17 00:00:00 2001 From: Sam <165231790+samswealth@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:13:46 +0300 Subject: [PATCH 268/787] add commonwealth tvl (#12219) Co-authored-by: samswealth Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/commonwealth/index.js | 26 ++++++++++++++++++++++++++ projects/treasury/commonwealth.js | 13 +++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 projects/commonwealth/index.js create mode 100644 projects/treasury/commonwealth.js diff --git a/projects/commonwealth/index.js b/projects/commonwealth/index.js new file mode 100644 index 000000000000..df1f9ba06348 --- /dev/null +++ b/projects/commonwealth/index.js @@ -0,0 +1,26 @@ +const { staking } = require('../helper/staking'); + +const TREASURY = [ + '0xdE70B8BC5215BdF03f839BB8cD0F639D4E3E2881', + '0xA205fD6A798A9Ba8b107A00b8A6a5Af742d6aCb5', + '0x990eCdf73704f9114Ee28710D171132b5Cfdc6f0', + '0xa653879692D4D0e6b6E0847ceDd58eAD2F1CC136' +] + + +const CONTRACTS = [ + '0xf4aa59f5192856f41ae19caab4929ccd3a265e70', // staked + '0x7519461fbd96abb539c770d57f38c2e91f8262aa', + '0xd7e31990883250e53314b15ee555345f04d011e8', + '0x87412c03979cc19c60071f5f98313a7cbe9f6d65', // rewards + +]; + +const WLTH = '0x99b2B1A2aDB02B38222ADcD057783D7e5D1FCC7D'; + +module.exports = { + base: { + tvl: () => ({}), + staking: staking(CONTRACTS, WLTH) + } +}; diff --git a/projects/treasury/commonwealth.js b/projects/treasury/commonwealth.js new file mode 100644 index 000000000000..3a99df4e7e41 --- /dev/null +++ b/projects/treasury/commonwealth.js @@ -0,0 +1,13 @@ +const { treasuryExports } = require("../helper/treasury"); + +const owners = [ + '0xdE70B8BC5215BdF03f839BB8cD0F639D4E3E2881', + '0xA205fD6A798A9Ba8b107A00b8A6a5Af742d6aCb5', + '0x990eCdf73704f9114Ee28710D171132b5Cfdc6f0', + '0xa653879692D4D0e6b6E0847ceDd58eAD2F1CC136' +] + +const WLTH = '0x99b2B1A2aDB02B38222ADcD057783D7e5D1FCC7D'; +module.exports = treasuryExports({ + base: { owners, ownTokens: [WLTH], }, +}) From 2b1b7eb38d654079245f0787a90200c582d8731b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 10 Nov 2024 10:57:38 +0100 Subject: [PATCH 269/787] track royco --- projects/royco/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/royco/index.js diff --git a/projects/royco/index.js b/projects/royco/index.js new file mode 100644 index 000000000000..ed66d98db65b --- /dev/null +++ b/projects/royco/index.js @@ -0,0 +1,19 @@ +const { getLogs2 } = require('../helper/cache/getLogs') + +const config = { + ethereum: { factory: '0xb316D165D01aC68d31B297F847533D671c965662', fromBlock: 21040754 }, + arbitrum: { factory: '0xb316D165D01aC68d31B297F847533D671c965662', fromBlock: 267610608 }, + base: { factory: '0xb316D165D01aC68d31B297F847533D671c965662', fromBlock: 21548421 }, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: 'event WrappedVaultCreated (address indexed underlyingVaultAddress, address indexed incentivizedVaultAddress, address owner, address inputToken, uint256 frontendFee, string name, string vaultSymbol)', fromBlock, }) + const tokensAndOwners = logs.map(log => [log.underlyingVaultAddress, log.incentivizedVaultAddress]) + return api.sumTokens({ tokensAndOwners }) + + } + } +}) \ No newline at end of file From a679a7c523387075c8f9dfb1cea3378495013fea Mon Sep 17 00:00:00 2001 From: fico23 Date: Sun, 10 Nov 2024 12:27:52 +0100 Subject: [PATCH 270/787] AeraFinance - added new arbitrum Aera Vault Factory (#12224) --- projects/aera/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/aera/index.js b/projects/aera/index.js index 4e6dadc4f727..270e3e3b4ae6 100644 --- a/projects/aera/index.js +++ b/projects/aera/index.js @@ -96,6 +96,10 @@ const config = { { address: "0xaF2762E1F75DeCdb8d240576e7A2CEc1A365cD46", fromBlock: 203397910 + }, + { + address: '0x49b428ea1cd536e7d103e9729ea14400785e30ec', + fromBlock: 245595750 } ] }, From 0d666e59b1491549c7943dee72b31842f66c6ec2 Mon Sep 17 00:00:00 2001 From: Josh Levine <24902242+jparklev@users.noreply.github.com> Date: Sun, 10 Nov 2024 18:28:25 +0700 Subject: [PATCH 271/787] Add newly supported Rumpel assets (Primarly YTs) (#12223) --- projects/rumpel/index.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/projects/rumpel/index.js b/projects/rumpel/index.js index 2bd21af77882..ba2bf3fff320 100644 --- a/projects/rumpel/index.js +++ b/projects/rumpel/index.js @@ -22,6 +22,7 @@ const TOKENS = { USDE: ADDRESSES.ethereum.USDe, WSTETH: ADDRESSES.ethereum.WSTETH, WBTC: ADDRESSES.ethereum.WBTC, + AMPHRETH:"0x5fD13359Ba15A84B76f7F87568309040176167cd", WEETH: "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee", WEETHS: "0x917ceE801a67f933F2e6b33fC0cD1ED2d5909D88", MSTETH: "0x49446A0874197839D15395B908328a74ccc96Bc0", @@ -34,6 +35,16 @@ const TOKENS = { KWEETH: "0x2DABcea55a12d73191AeCe59F508b191Fb68AdaC", DC_WSTETH_COLLATERAL: "0xC329400492c6ff2438472D4651Ad17389fCb843a", DC_SUSDE_COLLATERAL: "0x19d0D8e6294B7a04a2733FE433444704B791939A", + DC_LBTC_COLLATERAL: "0x9C0823D3A1172F9DdF672d438dec79c39a64f448", + YT_EBTC: "0xeB993B610b68F2631f70CA1cf4Fe651dB81f368e", + YT_WEETHK: "0x7B64b99A1fd80b6c012E354a14ADb352b5916CE1", + YT_AGETH: "0x3568f1d2e8058F6D99Daa17051Cb4a2930C83978", + YT_WEETHS: "0x719B51Dd92B7809A80A2E8c91D89367BF58f1D7A", + YT_SUSDE: "0xbE05538f48D76504953c5d1068898C6642937427", + YT_USDE: "0x5D8B3cd632c58D5CE75C2141C1C8b3b0C209b3ed", + YT_RE7LRT: "0x89E7f4E5210A77Ac0f20511389Df71eC98ce9971", + YT_RSTETH: "0x11CCff2F748a0100dBd457FF7170A54e12064Aba", + YT_AMPHRETH: "0x5dB8a2391a72F1114BbaE30eFc9CD89f4a29F988", }; const MORPHO_SUSDE_MARKET_ID = @@ -70,7 +81,7 @@ async function tvl(api) { } async function handleZircuitAssets() { - const assets = [TOKENS.WEETH, TOKENS.WEETHS, TOKENS.USDE, TOKENS.MSTETH] + const assets = [TOKENS.WEETH, TOKENS.WEETHS, TOKENS.USDE, TOKENS.MSTETH, TOKENS.AMPHRETH] const calls = [] for (const asset of assets) for (const owner of owners) @@ -91,6 +102,15 @@ async function tvl(api) { TOKENS.RSTETH, TOKENS.RE7LRT, TOKENS.RE7RWBTC, + TOKENS.YT_EBTC, + TOKENS.YT_WEETHK, + TOKENS.YT_AGETH, + TOKENS.YT_WEETHS, + TOKENS.YT_SUSDE, + TOKENS.YT_USDE, + TOKENS.YT_RE7LRT, + TOKENS.YT_RSTETH, + TOKENS.YT_AMPHRETH, ] return api.sumTokens({ owners, tokens }) } From 6b02ca0bd28470a08708906e1e03a4f83273f14a Mon Sep 17 00:00:00 2001 From: Amir Date: Sun, 10 Nov 2024 13:28:41 +0200 Subject: [PATCH 272/787] Add SolanaHub Staked SOL (hubSOL) (#12221) --- projects/solanahub-sol/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/solanahub-sol/index.js diff --git a/projects/solanahub-sol/index.js b/projects/solanahub-sol/index.js new file mode 100644 index 000000000000..c874fd186b83 --- /dev/null +++ b/projects/solanahub-sol/index.js @@ -0,0 +1,12 @@ +const { getSolBalanceFromStakePool } = require('../helper/solana') + +async function tvl(api) { + await getSolBalanceFromStakePool('ECRqn7gaNASuvTyC5xfCUjehWZCSowMXstZiM5DNweyB', api) +} + +module.exports ={ + timetravel: false, + doublecounted: true, + methodology: "SolanaHub Staked SOL (hubSOL) is a tokenized representation on your staked SOL + stake rewards", + solana: { tvl }, +}; \ No newline at end of file From d6093901e7a5c5b34b09baa0f09261dbf00819d9 Mon Sep 17 00:00:00 2001 From: FluxusFi Date: Mon, 11 Nov 2024 07:05:19 +0100 Subject: [PATCH 273/787] Add FluxusFi on Base (#12222) --- projects/fluxusbase/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/fluxusbase/index.js diff --git a/projects/fluxusbase/index.js b/projects/fluxusbase/index.js new file mode 100644 index 000000000000..510b0046d5f7 --- /dev/null +++ b/projects/fluxusbase/index.js @@ -0,0 +1,11 @@ +const { uniTvlExport } = require('../helper/calculateUniTvl.js') + +module.exports = { + misrepresentedTokens: true, + base: { + tvl: uniTvlExport("0x27c2d144b106B26Be3d0dEB6c14c5CFA2e9a507C", undefined, undefined, { + allPairsLength: 'uint256:allPairsLength', + allPairs: 'function allPairs(uint256) view returns (address)', + }, { useDefaultCoreAssets: true, hasStablePairs: true, }), + }, +} \ No newline at end of file From 095531b8320add5786a74797012a348745b510f9 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 07:14:26 +0100 Subject: [PATCH 274/787] update bedrock #12229 --- projects/bedrock/index.js | 16 ++++++++- projects/helper/bitcoin-book/fetchers.js | 44 ++++++++++++------------ 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/projects/bedrock/index.js b/projects/bedrock/index.js index d1327d026fba..b673ced9d285 100644 --- a/projects/bedrock/index.js +++ b/projects/bedrock/index.js @@ -1,5 +1,6 @@ const { sumTokens } = require('../helper/chain/bitcoin') const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') +const { getConfig } = require('../helper/cache.js') async function tvl() { return sumTokens({ owners: await bitcoinAddressBook.bedrock() }) @@ -7,8 +8,21 @@ async function tvl() { module.exports = { timetravel: false, - doublecounted:true, + doublecounted: true, bitcoin: { tvl } } + +async function tvlEvm(api) { + const API_URL = 'https://raw.githubusercontent.com/Bedrock-Technology/uniBTC/refs/heads/main/data/tvl/reserve_address.json' + const { evm, } = await getConfig('bedrock.btc_address', API_URL) + const chain = api.chain == 'btr' ? 'bitlayer' : api.chain + const { vault, tokens } = evm[chain] ?? {} + if (!vault) return; + return api.sumTokens({ api, owner: vault, tokens }) +} + +['btr', 'ethereum', 'bsc', 'arbitrum', 'mantle', 'merlin', 'optimism', 'bob', 'bsquared', 'zeta', 'mode'].forEach(chain => { + module.exports[chain] = { tvl: tvlEvm } +}) \ No newline at end of file diff --git a/projects/helper/bitcoin-book/fetchers.js b/projects/helper/bitcoin-book/fetchers.js index 5fd55c3f2dfd..95e96f7b59eb 100644 --- a/projects/helper/bitcoin-book/fetchers.js +++ b/projects/helper/bitcoin-book/fetchers.js @@ -8,7 +8,7 @@ const abi = { getQualifiedUserInfo: 'function getQualifiedUserInfo(address _user module.exports = { bedrock: async () => { - const API_URL = 'https://bedrock-datacenter.rockx.com/uniBTC/reserve/address' + const API_URL = 'https://raw.githubusercontent.com/Bedrock-Technology/uniBTC/refs/heads/main/data/tvl/reserve_address.json' const { btc } = await getConfig('bedrock.btc_address', API_URL) return btc }, @@ -52,19 +52,19 @@ module.exports = { let offset = 0; let batchNumber = 1; let hasMore = true; - + while (hasMore) { const { addresses: data, has_more } = await get(`${API_URL}?limit=${BATCH_SIZE}&offset=${offset}`); const newAddresses = data.map(a => a.btc_address); - + allAddresses.push(...newAddresses); sdk.log(`Batch ${batchNumber} completed: ${newAddresses.length} addresses`); - + hasMore = has_more; offset += BATCH_SIZE; batchNumber++; } - + return allAddresses; } }) @@ -101,25 +101,25 @@ module.exports = { let hasMore = true; while (hasMore) { - const { data: response } = await axios.post(API2_URL, { - "json": true, - "code": "brdgmng.xsat", - "scope": custody_id, - "table": "addrmappings", - "lower_bound": lower_bound, - "upper_bound": null, - "index_position": 1, - "key_type": "", - "limit": "100", - "reverse": false, - "show_payer": true - }); + const { data: response } = await axios.post(API2_URL, { + "json": true, + "code": "brdgmng.xsat", + "scope": custody_id, + "table": "addrmappings", + "lower_bound": lower_bound, + "upper_bound": null, + "index_position": 1, + "key_type": "", + "limit": "100", + "reverse": false, + "show_payer": true + }); - const addrs = response.rows.map(row => row.data.btc_address); - owners.push(...addrs); + const addrs = response.rows.map(row => row.data.btc_address); + owners.push(...addrs); - hasMore = response.more; - lower_bound = response.next_key; + hasMore = response.more; + lower_bound = response.next_key; } } return owners From eca800c0bde4bdc799f5f6856289f92f295ea6a2 Mon Sep 17 00:00:00 2001 From: turgut-demir <165087519+turgut-demir@users.noreply.github.com> Date: Mon, 11 Nov 2024 09:19:37 +0300 Subject: [PATCH 275/787] create oceanpoint/index.js (#12225) Co-authored-by: turgut-demir Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/oceanpoint/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/oceanpoint/index.js diff --git a/projects/oceanpoint/index.js b/projects/oceanpoint/index.js new file mode 100644 index 000000000000..faa9d512b53c --- /dev/null +++ b/projects/oceanpoint/index.js @@ -0,0 +1,20 @@ +const { staking } = require('../helper/staking'); + +const CONTRACTS = [ + "0x13299657e662894b933Bb3Ee73F7f8dA94b55451", + "0x1802f66868d0649687a7a6bc9b8a4292e148daec", + "0x6f1e92fb8a685aaa0710bad194d7b1aa839f7f8a", + "0x57ba886442d248C2E7a3a5826F2b183A22eCc73e" +]; + +const ERC20_TOKENS = [ + "0x509A38b7a1cC0dcd83Aa9d06214663D9eC7c7F4a" +]; + +module.exports = { + ethereum: { + tvl: () => ({}), + pool2: staking(CONTRACTS, '0x0E85fB1be698E777F2185350b4A52E5eE8DF51A6'), + staking: staking(CONTRACTS, ERC20_TOKENS), + } +}; From 88c37e53e72a52329bdfc3b6853e9725015f7a7f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 07:31:37 +0100 Subject: [PATCH 276/787] update solv lst #12228 --- projects/solv-btc-lst/index.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index ff13d82b7e7c..133e5ec5e905 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -5,8 +5,22 @@ async function tvl() { return sumTokens({ owners: await bitcoinAddressBook.solvBTC() }) } + +const solvbtclstListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solvbtc-lst.json'; + +async function evmTVL(api) { + let solvbtclst = await getConfig('solv-protocol/solv-btc-lst', solvbtclstListUrl) + let { depositAddress: owners, tokens } = solvbtclst[api.chain]?.otherDeposit ?? {} + api.sumTokens({ owners, tokens }) +} + module.exports = { methodology: 'Staked tokens via Babylon and Core are counted towards TVL, as they represent the underlying BTC assets securing their respective networks.', - doublecounted:true, + doublecounted: true, bitcoin: { tvl } -} \ No newline at end of file +} + +const chains = ['ethereum'] +chains.forEach(chain => { + module.exports[chain] = { tvl: evmTVL } +}) \ No newline at end of file From 0bb20c8eed0254da83030aa1eb53a666d3d7395a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 07:40:20 +0100 Subject: [PATCH 277/787] bugfix --- projects/solv-btc-lst/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index 133e5ec5e905..038e6edcd742 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -1,5 +1,6 @@ const { sumTokens } = require('../helper/chain/bitcoin'); -const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js'); +const { getConfig } = require('../helper/cache.js'); async function tvl() { return sumTokens({ owners: await bitcoinAddressBook.solvBTC() }) From b5f19e9f28c75e8cd739a23f6e9b865df0dba591 Mon Sep 17 00:00:00 2001 From: LpcAries <101619245+LpcAries@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:05:12 +0800 Subject: [PATCH 278/787] add utonic adapter (#12231) --- projects/utonic/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/utonic/index.js diff --git a/projects/utonic/index.js b/projects/utonic/index.js new file mode 100644 index 000000000000..6a9cccd91f99 --- /dev/null +++ b/projects/utonic/index.js @@ -0,0 +1,11 @@ +const { call } = require("../helper/chain/ton"); + +module.exports = { + timetravel: false, + ton: { + tvl: async () => { + const result = await call({ target: "EQAfF5j3JMIpZlLmACv7Ub7RH7WmiVMuV4ivcgNYHvNnqHTz", abi: "get_minter_data"}) + return { "coingecko:the-open-network": result[0]/1e9 }; + } + } +} \ No newline at end of file From c211904135df1a693b68987321859e47fbfc84eb Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:21:29 +0100 Subject: [PATCH 279/787] update worldes #12184 --- projects/worldes/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/worldes/index.js b/projects/worldes/index.js index 0a55a0699c2e..f3a4353fc92b 100644 --- a/projects/worldes/index.js +++ b/projects/worldes/index.js @@ -1,14 +1,18 @@ const { getLogs2 } = require('../helper/cache/getLogs') const config = { - arbitrum: { dvmFactory: '0x3bA0388E64900e274f2C6fCfaE34Eed65c01282A', fromBlock: 228710000, dspFactory: '0xf3AadDd00C2E263d760BE52BB7142276B74E8b47', WorldesRWATokenFactory: '0x4Ef31B45919aE1874840B9563D46FCD57E2Ae0b7', WorldesDvmProxy: '0x7e93ED796aFD3D9a6e9a24c668153fBb981bE60E', WorldesDspProxy: '0xE6933Fb2dc110a43fdeC6bB83d6ae99aC557c452', WorldesMineProxy: '0x2eFda50249176e3ee1A26964Ad6496DC5aA2aCE7' }, + arbitrum: { dvmFactory: '0x3bA0388E64900e274f2C6fCfaE34Eed65c01282A', fromBlock: 228710000, dspFactory: '0xf3AadDd00C2E263d760BE52BB7142276B74E8b47', WorldesRWATokenFactory: '0x4Ef31B45919aE1874840B9563D46FCD57E2Ae0b7', WorldesDvmProxy: '0x7e93ED796aFD3D9a6e9a24c668153fBb981bE60E', WorldesDspProxy: '0xE6933Fb2dc110a43fdeC6bB83d6ae99aC557c452', WorldesMineProxy: '0x2eFda50249176e3ee1A26964Ad6496DC5aA2aCE7', WES: '0xcEab5Af10D5376016c8C352ea77F8Bc6a88bDa11' }, } Object.keys(config).forEach(chain => { - const { dvmFactory, fromBlock, dspFactory, blacklistedTokens, } = config[chain] + const { dvmFactory, fromBlock, dspFactory, blacklistedTokens, WES, } = config[chain] module.exports[chain] = { tvl: async (api) => { const ownerTokens = [] + if (WES) { + const supply = await api.call({ abi: 'uint256:totalSupply', target: WES }) + api.add(WES, supply) + } await builder(dvmFactory, 'event NewDVM(address baseToken, address quoteToken, address creator, address pool)'); await builder(dspFactory, 'event NewDSP(address baseToken, address quoteToken, address creator, address pool)'); From 15a6be50aee9b00685524bd0ca213ad631a7b989 Mon Sep 17 00:00:00 2001 From: Ivan Herger <36133712+iherger@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:05:55 +0100 Subject: [PATCH 280/787] feat: add Arbitrum deployment for Enzyme (#12232) --- projects/enzyme/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/enzyme/index.js b/projects/enzyme/index.js index 03709f93b73b..8bd0e867834a 100644 --- a/projects/enzyme/index.js +++ b/projects/enzyme/index.js @@ -5,6 +5,7 @@ const { sumTokens2 } = require('../helper/unwrapLPs') const config = { polygon: { endpoint: sdk.graph.modifyEndpoint('GCAHDyqvZBLMwqdb9U7AqWAN4t4TSwR3aXMHDoUUFuRV') }, ethereum: { endpoint: sdk.graph.modifyEndpoint('9DLBBLep5UyU16kUQRvxBCMqko4q9XzuE4XsMMpARhKK') }, + arbitrum: { endpoint: sdk.graph.modifyEndpoint('8UJ5Bkf2eazZhXsAshhzQ2Keibcb8NFHBvXis9pb2C2Y') }, } const query = `query get_accounts($lastId: String!) { vaults( From 36d5d850e81b94faf8aee7a34d5f4895a7f2c34b Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:22:07 +0000 Subject: [PATCH 281/787] add ourbit adapter (#12233) --- projects/ourbit/index.js | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 projects/ourbit/index.js diff --git a/projects/ourbit/index.js b/projects/ourbit/index.js new file mode 100644 index 000000000000..7253f71ac53b --- /dev/null +++ b/projects/ourbit/index.js @@ -0,0 +1,50 @@ +const { cexExports } = require('../helper/cex') + +const config = { + ethereum: { + owners: [ + "0xf81b45b1663b7ea8716c74796d99bbe4ea26f488", + "0x18D080B89570e4B996EB17fA1F0206F0CE35d604", + ], + }, + tron: { + owners: [ + "TApNqy5BNx11TiNa7oibbBUV63BY5a2sNE", + "TJP6zoGwWwUmANvMdrtqYq9iWA8qMAAY4q" + ], + }, + bsc: { + owners: [ + "0xdbf7122c0b7af893580df087eabac0b3be3e9483", + "0x6c6EC4beeAa53171a0ce0691D5c9A5FaAF509a8A" + ], + }, + optimism: { + owners: [ + "0x944d6b4c2bf808f9324ca0675f1d7e0e92a35436", + ], + }, + avax: { + owners: [ + "0x8fc27c899fb2c1044608516450e385378195639d", + ], + }, + arbitrum: { + owners: [ + "0x040432c11ee833bdcaac2495329b65bee7cca6d9", + ], + }, + solana: { + owners: [ + "7UhjbynicBP8rqcobwsAJDfRMjwgHSgdxcYNJmLwxfms", + "3pjwKq9yuzpVYfD4h5jMZLLfV8oSd8YiwpoAaB5oZS3H" + ], + }, + bitcoin: { + owners: [ + "bc1q2cvpg2c74puqke4py0ufr0aauj4m5vdeaqpjxv", + ], + }, +} + +module.exports = cexExports(config) \ No newline at end of file From cb7345683b60387f05ac7d020d43135078545eb1 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:47:47 +0100 Subject: [PATCH 282/787] track reservoir #11478 --- projects/reservoir-protocol/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 projects/reservoir-protocol/index.js diff --git a/projects/reservoir-protocol/index.js b/projects/reservoir-protocol/index.js new file mode 100644 index 000000000000..f5b4d9cfc10d --- /dev/null +++ b/projects/reservoir-protocol/index.js @@ -0,0 +1,22 @@ +const config = { + ethereum: [ + // https://docs.reservoir.xyz/products/proof-of-reserves + '0x0c7e4342534e6e8783311dCF17828a2aa0951CC7', + '0x9BB2c38F57883E5285b7c296c66B9eEA4769eF80', + '0x99A95a9E38e927486fC878f41Ff8b118Eb632b10', + // '0x31Eae643b679A84b37E3d0B4Bd4f5dA90fB04a61', - exluded RUSD because it is project's own token + ] +} + +Object.keys(config).forEach(chain => { + const funds = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const tokens = await api.multiCall({ abi: 'address:underlying', calls: funds }) + const bals = await api.multiCall({ abi: 'uint256:totalValue', calls: funds }) + const decimals = await api.multiCall({ abi: 'uint8:decimals', calls: tokens }) + bals.forEach((v, i) => bals[i] = v * 10 ** (decimals[i] - 18)) + api.add(tokens, bals) + } + } +}) \ No newline at end of file From b83baa61f037cb646ca1bc85d1f23ee1e85df562 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:29:22 +0100 Subject: [PATCH 283/787] fix magma: #12234 --- projects/magma/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/magma/index.js b/projects/magma/index.js index 29431c6927ff..739350a3e562 100644 --- a/projects/magma/index.js +++ b/projects/magma/index.js @@ -5,7 +5,8 @@ const sdk = require('@defillama/sdk') module.exports = { iotex: { tvl: sdk.util.sumChainTvls([ - getLiquityTvl('0x4315BcE6076953571caf1903d15D682727FBD935'), + getLiquityTvl('0x21d81DABF6985587CE64C2E8EB12F69DF2178fe2'), + getLiquityTvl('0xAeB0B38040aDdc4a2b520919f13944D9bC944435'), getLiquityTvl('0xFF5F4bA96586EDae7E7D838D8770dFB3376Ec245', { nonNativeCollateralToken: true, collateralToken: "0x236f8c0a61dA474dB21B693fB2ea7AAB0c803894" }) ]), // staking: staking('0x037a2e9a464fbA409D0E55600836864B410d6Dd8', '0x6C0bf4b53696b5434A0D21C7D13Aa3cbF754913E'), // disabled as backing of WEN is already counted towards tvl From b5a6a5ad7e2ce8fa0e06dd555be639f6cd3f5ef8 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:32:29 +0100 Subject: [PATCH 284/787] fix uniswap v3 #12235 --- projects/helper/unwrapLPs.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/helper/unwrapLPs.js b/projects/helper/unwrapLPs.js index 18edbcb2e1de..e8eb59a1cd9f 100644 --- a/projects/helper/unwrapLPs.js +++ b/projects/helper/unwrapLPs.js @@ -465,7 +465,9 @@ async function sumBalancerLps(balances, tokensAndOwners, block, chain, transform } const nullAddress = ADDRESSES.null -const gasTokens = [nullAddress, '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'] +const gasTokens = [nullAddress, '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee', '0xbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', + '0x000000000000000000000000000000000000800a', // zksync era gas token +] /* tokensAndOwners [ [token, owner] - eg ["0xaaa", "0xbbb"] From b500fbc6526a15a9bd65a700a6a67707dcd74fb0 Mon Sep 17 00:00:00 2001 From: Andrea Date: Mon, 11 Nov 2024 12:35:40 +0100 Subject: [PATCH 285/787] Update VaultCraft staking TVL: include stVCX (#12236) --- projects/popcorn/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/popcorn/index.js b/projects/popcorn/index.js index ea9224672be2..876ecf8c7a14 100644 --- a/projects/popcorn/index.js +++ b/projects/popcorn/index.js @@ -2,7 +2,7 @@ const sdk = require('@defillama/sdk'); const { getConfig } = require('../helper/cache') const { addFraxVaultToTVL } = require("./fraxVault"); -const { staking } = require("../helper/staking"); +const { stakings } = require("../helper/staking"); const { sumTokens2 } = require('../helper/unwrapLPs'); const getVaultsAbi = 'address[]:getRegisteredAddresses'; @@ -36,11 +36,13 @@ async function tvl(api) { const veVCX = "0x0aB4bC35Ef33089B9082Ca7BB8657D7c4E819a1A"; const WETH_VCX_BAL_LP_TOKEN = "0x577A7f7EE659Aa14Dc16FD384B3F8078E23F1920"; +const stVCX = "0xE5d383FC43F6c370DdD3975cf9e363Ad42367697"; +const VCX = "0xce246eea10988c495b4a90a905ee9237a0f91543"; module.exports = { ethereum: { start: 12237585, - staking: staking(veVCX, WETH_VCX_BAL_LP_TOKEN), + staking: stakings([stVCX, veVCX], [VCX, WETH_VCX_BAL_LP_TOKEN]), tvl, }, bsc: { tvl, }, From bd461cf3d30398d1d02730cc74a756e7a3b239be Mon Sep 17 00:00:00 2001 From: charq <73696209+buchaoqun@users.noreply.github.com> Date: Mon, 11 Nov 2024 20:01:20 +0800 Subject: [PATCH 286/787] Return api.sumTokens (#12237) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: qwen-solv Co-authored-by: hja <740055963@qq.com> --- projects/solv-btc-lst/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index 038e6edcd742..61b800334f17 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -12,7 +12,7 @@ const solvbtclstListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/sl async function evmTVL(api) { let solvbtclst = await getConfig('solv-protocol/solv-btc-lst', solvbtclstListUrl) let { depositAddress: owners, tokens } = solvbtclst[api.chain]?.otherDeposit ?? {} - api.sumTokens({ owners, tokens }) + return api.sumTokens({ owners, tokens }) } module.exports = { From e6af79dd2845698bec52608bc81901cb59b1218c Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:47:21 +0100 Subject: [PATCH 287/787] Fix: Fuji-v2 (#12238) --- projects/fujidao-v2/index.js | 52 +++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/projects/fujidao-v2/index.js b/projects/fujidao-v2/index.js index 1e1f2c241a18..dd832d0c0d7e 100644 --- a/projects/fujidao-v2/index.js +++ b/projects/fujidao-v2/index.js @@ -81,24 +81,25 @@ Object.keys(config).forEach(chain => { const assets = bassets.concat(yassets) const debtAssets = blogs.map(log => log.debtAsset) - - const bals = await api.multiCall({ abi: 'uint256:totalAssets', calls: vaults }) - const debtBals = await api.multiCall({ abi: 'uint256:totalDebt', calls: bvaults, permitFailure: true, }) - bals.forEach((bal, i) => { - api.add(assets[i], bal) - }) + const [bals, debtBals] = await Promise.all([ + api.multiCall({ abi: 'uint256:totalAssets', calls: vaults, permitFailure: true }), + api.multiCall({ abi: 'uint256:totalDebt', calls: bvaults, permitFailure: true, }) + ]) - debtAssets.forEach((bal, i) => { - if (!debtBals[i]) { - return; - // if (+bal === 0) return; - // throw new Error(`No debt balance for ${bvaults[i]}`) - } - api.add(debtAssets[i], debtBals[i] * -1) + vaults.map((_, i) => { + const asset = assets[i] + const bal = bals[i] + if (!bal) return + api.add(asset, bal) }) - return api.getBalances() + bvaults.map((_, i) => { + const debtAsset = debtAssets[i] + const debtBal = debtBals[i] + if (!debtBal) return + api.add(debtAsset, debtBal * -1) + }) }, borrowed: async (api) => { let logs = []; @@ -119,17 +120,18 @@ Object.keys(config).forEach(chain => { } const vaults = logs.map(log => log.vault) const debtAssets = logs.map(log => log.debtAsset) - const bals = await api.multiCall({ abi: 'uint256:totalAssets', calls: vaults }) - const debtBals = (await api.multiCall({ abi: 'uint256:totalDebt', calls: vaults, permitFailure: true, })) - bals.forEach((bal, i) => { - if (!debtBals[i]) { - return; - // if (+bal === 0) return; - // throw new Error(`No debt balance for ${vaults[i]}`) - } - api.add(debtAssets[i], debtBals[i]) - }) - return api.getBalances() + + const [bals, debtBals] = await Promise.all([ + api.multiCall({ abi: 'uint256:totalAssets', calls: vaults, permitFailure: true }), + api.multiCall({ abi: 'uint256:totalDebt', calls: vaults, permitFailure: true }) + ]) + + vaults.forEach((_, i) => { + const debtBal = debtBals[i] + const debtAsset = debtAssets[i] + if (!debtBal) return + api.add(debtAsset, debtBal) + }) } } }) \ No newline at end of file From 2c0c01d22741aaa005e55c807dff35533a595754 Mon Sep 17 00:00:00 2001 From: David Zhang <125990317+zhangdav@users.noreply.github.com> Date: Tue, 12 Nov 2024 01:47:50 +0700 Subject: [PATCH 288/787] Add support for Arbitrum chain in PumpBTC (#12239) --- projects/pumpbtc/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index eae9d22a1753..47aef26159e6 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -11,7 +11,7 @@ async function getStakingAddresses() { let res = await utils.fetchURL('https://dashboard.pumpbtc.xyz/api/dashboard/asset/tokenowners') const btcAddresses = res.data.data || {} - //console.log('>>', btcAddresses.length) + //console.log('>>', btcAddresses.length) return btcAddresses } @@ -33,7 +33,7 @@ async function otherTvl(api) { module.exports.isHeavyProtocol = true; -['bitcoin', 'ethereum', 'bsc', 'mantle', 'base'].forEach(chain => { +['bitcoin', 'ethereum', 'bsc', 'mantle', 'base', 'arbitrum'].forEach(chain => { if (chain == 'bitcoin') { module.exports[chain] = { tvl: bitcoinTvl, From c69bcc3c5b8fd6497a6738eaed1f8c935ab726f8 Mon Sep 17 00:00:00 2001 From: m66260 <117136064+m66260@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:48:40 -0500 Subject: [PATCH 289/787] Update an address in the D8X adapter (#12240) --- projects/d8x/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/d8x/index.js b/projects/d8x/index.js index 474940d7094d..87622b002f22 100644 --- a/projects/d8x/index.js +++ b/projects/d8x/index.js @@ -2,7 +2,7 @@ const abi = require("./abi-poolInfo.json"); const { sumTokens2 } = require("../helper/unwrapLPs"); const config = { - polygon_zkevm: { factory: "0xaB7794EcD2c8e9Decc6B577864b40eBf9204720f" }, + polygon_zkevm: { factory: "0x900DfC161C34656a9D9c43307F92255C2aa06162" }, xlayer: { factory: "0xb24dB543749277E8625a59C061aE7574C8235475" }, arbitrum: { factory: "0x8f8BccE4c180B699F81499005281fA89440D1e95" }, }; From ae80346691099f9e03567d8b89bdfac652fedaa6 Mon Sep 17 00:00:00 2001 From: "Guillermo M. Narvaja" Date: Mon, 11 Nov 2024 15:50:35 -0300 Subject: [PATCH 290/787] Ensuro: adds native USDC in AAVE to the list of assets (#12243) --- projects/ensuro/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/ensuro/index.js b/projects/ensuro/index.js index 8f814ae81d71..b892a405af23 100644 --- a/projects/ensuro/index.js +++ b/projects/ensuro/index.js @@ -4,7 +4,8 @@ const { sumTokens2 } = require('../helper/unwrapLPs') const addressBook = { polygon: { usdc: ADDRESSES.polygon.USDC, - aave_v3_usdc: "0x625E7708f30cA75bfd92586e17077590C60eb4cD", // aPolUSDC + aave_v3_usdc: "0x625E7708f30cA75bfd92586e17077590C60eb4cD", // aPolUSDC - AAVE USDC (Bridged) + aave_v3_native_usdc: "0xA4D94019934D8333Ef880ABFFbF2FDd611C762BD", // aPolUSDCn - AAVE USDC (Native) compound_v3_usdc: "0xF25212E676D1F7F89Cd72fFEe66158f541246445", // Compound USDC mountain_usdm: ADDRESSES.ethereum.USDM, // Mountain USDM reserves: [ @@ -54,7 +55,7 @@ const addressBook = { async function tvl(api) { const addresses = addressBook[api.chain]; - const ownerTokens = addresses.reserves.map(i => [[addresses.usdc, addresses.aave_v3_usdc, addresses.compound_v3_usdc, addresses.mountain_usdm], i.address]) + const ownerTokens = addresses.reserves.map(i => [[addresses.usdc, addresses.aave_v3_usdc, addresses.aave_v3_native_usdc, addresses.compound_v3_usdc, addresses.mountain_usdm], i.address]) return sumTokens2({ api, ownerTokens, }); } From 6e640f5682b5750e93272b7112b076f46e573bd7 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Mon, 11 Nov 2024 20:34:29 +0000 Subject: [PATCH 291/787] add staking --- projects/gammaswap/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/gammaswap/index.js b/projects/gammaswap/index.js index 189b291cc641..2b3d893e3e07 100644 --- a/projects/gammaswap/index.js +++ b/projects/gammaswap/index.js @@ -1,5 +1,6 @@ const { getLogs } = require('../helper/cache/getLogs') const { sumTokens2 } = require('../helper/unwrapLPs') +const { staking } = require('../helper/staking') const config = { arbitrum: { @@ -28,4 +29,6 @@ Object.keys(config).forEach(chain => { return sumTokens2({ ownerTokens, api, resolveLP: true, }) } } -}) \ No newline at end of file +}) + +module.exports.arbitrum.staking = staking("0x9b4D784E1cCaf038AEa4BFa837262704caF78B66", "0xb08d8becab1bf76a9ce3d2d5fa946f65ec1d3e83") \ No newline at end of file From 5eb30abede20ffcc0cab7e10145ed9aa5a9108c4 Mon Sep 17 00:00:00 2001 From: charq <73696209+buchaoqun@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:41:58 +0800 Subject: [PATCH 292/787] Fix getConfig cache (#12245) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: qwen-solv Co-authored-by: hja <740055963@qq.com> --- projects/solv-btc-lst/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index 61b800334f17..f7408ba34130 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -10,7 +10,7 @@ async function tvl() { const solvbtclstListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solvbtc-lst.json'; async function evmTVL(api) { - let solvbtclst = await getConfig('solv-protocol/solv-btc-lst', solvbtclstListUrl) + let solvbtclst = await getConfig('solv-protocol/solv-btc-lst-evm', solvbtclstListUrl) let { depositAddress: owners, tokens } = solvbtclst[api.chain]?.otherDeposit ?? {} return api.sumTokens({ owners, tokens }) } From 7fcdead485a272d7c54c3347b3696bcb0021458e Mon Sep 17 00:00:00 2001 From: zluqo Date: Tue, 12 Nov 2024 09:02:53 +0400 Subject: [PATCH 293/787] adding bitflux (#12244) --- projects/bitflux/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/bitflux/index.js diff --git a/projects/bitflux/index.js b/projects/bitflux/index.js new file mode 100644 index 000000000000..a3f45f7644cc --- /dev/null +++ b/projects/bitflux/index.js @@ -0,0 +1,19 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); + +const swapFlashLoan = '0x4bcb9Ea3dACb8FfE623317E0B102393A3976053C'; + +const ADDRESSES = { + 'WBTC': "0x5832f53d147b3d6Cd4578B9CBD62425C7ea9d0Bd", + "solvBTCb": "0x5b1fb849f1f76217246b8aaac053b5c7b15b7dc3", + "solvBTCcore": "0x9410e8052bc661041e5cb27fdf7d9e9e842af2aa" +} + +module.exports = { + core: { + tvl: sumTokensExport( + { + owner: swapFlashLoan, + tokens: [ADDRESSES.WBTC, ADDRESSES.solvBTCb, ADDRESSES.solvBTCcore] + }), + } +} \ No newline at end of file From b24b1e1c82336b24b0cacb48739a63c8208f43e9 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:41:10 +0000 Subject: [PATCH 294/787] remove hallmarks (#12247) --- projects/desyn-farm/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/projects/desyn-farm/index.js b/projects/desyn-farm/index.js index 07add1a91de6..37d3e2839d29 100644 --- a/projects/desyn-farm/index.js +++ b/projects/desyn-farm/index.js @@ -1,11 +1,6 @@ const { getTvlFunction, chains } = require("./helper"); module.exports = { - hallmarks: [ - [1719734400, "Launched on Merlin Chain"], - [1718092800, "DeSyn KelpDAO Restaking Fund Launched"], - [1713340800, "Restaking Fund Series Launched"] - ], methodology: 'Focused on airdrops from DeSyn and new chains.', } From 07d7561839997712ac1aa364f4e1b0b5e71ae924 Mon Sep 17 00:00:00 2001 From: Masashi Ono <98894508+Masashi-Ono0611@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:15:56 +0900 Subject: [PATCH 295/787] Create index.js by Bagel Finance (#12249) --- projects/BagelFinance/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/BagelFinance/index.js diff --git a/projects/BagelFinance/index.js b/projects/BagelFinance/index.js new file mode 100644 index 000000000000..95a32763b67a --- /dev/null +++ b/projects/BagelFinance/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require("../helper/chain/ton"); +const ADDRESSES = require("../helper/coreAssets.json"); + +const BagelLpPool = "UQAqcydSR5paeZTvCSN5XwAuaHB1T5aE33rofhvpz0B59gKr" + +module.exports = { + methodology: 'Counts LP smartcontract balance as TVL.', + ton: { + tvl: sumTokensExport({ owners: [BagelLpPool], tokens: [ADDRESSES.null]}), + } +} From b72d5ce0c65d8dbb694cd1c416efd34f70bdb2be Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:22:36 +0100 Subject: [PATCH 296/787] minor fix --- projects/deltatrade.js | 3 +-- projects/helper/solana.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/projects/deltatrade.js b/projects/deltatrade.js index 37af707c019d..815fecee3301 100644 --- a/projects/deltatrade.js +++ b/projects/deltatrade.js @@ -4,8 +4,7 @@ const { getConfig } = require('./helper/cache') const { get } = require('./helper/http') const { PublicKey } = require('@solana/web3.js'); -const { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, } = require("@solana/spl-token"); -const { sumTokens2 } = require('./helper/solana') +const { sumTokens2, ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, } = require('./helper/solana') const state = new PublicKey('FRcbUFpGHQppvXAyJrNYLKME1BQfowh4xKZB2vt9j6yn'); const programId = new PublicKey('CNLGhYQgNwjyDfHZTEjHfk1MPkqwP96qZahWN82UfcLM'); diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 58a3d11e2457..91d9c111759b 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -9,7 +9,15 @@ const { sleep, sliceIntoChunks, log, } = require('./utils') const { decodeAccount } = require('./utils/solana/layout') const sdk = require('@defillama/sdk'); -const { TOKEN_PROGRAM_ID, ASSOCIATED_PROGRAM_ID, } = require('@project-serum/anchor/dist/cjs/utils/token'); + +/** Address of the SPL Token program */ +const TOKEN_PROGRAM_ID = new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA') + +/** Address of the SPL Token 2022 program */ +const TOKEN_2022_PROGRAM_ID = new PublicKey('TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb') + +/** Address of the SPL Associated Token Account program */ +const ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey('ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL') const blacklistedTokens_default = [ 'CowKesoLUaHSbAMaUxJUj7eodHHsaLsS65cy8NFyRDGP', @@ -282,7 +290,7 @@ async function sumTokens2({ return tokensAndOwners.map(([mint, owner]) => { return PublicKey.findProgramAddressSync( [owner.toBuffer(), programBuffer, mint.toBuffer(),], - ASSOCIATED_PROGRAM_ID + ASSOCIATED_TOKEN_PROGRAM_ID )[0] }) } @@ -381,4 +389,7 @@ module.exports = { getStakedSol, getSolBalanceFromStakePool, getTokenSupplies, + TOKEN_PROGRAM_ID, + ASSOCIATED_TOKEN_PROGRAM_ID, + TOKEN_2022_PROGRAM_ID, }; From cb3b623e0ba5be92dba59810ed2f667f7a85051f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Nov 2024 16:46:32 +0100 Subject: [PATCH 297/787] Eclipse (#12251) --- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/portedTokens.js | 2 +- projects/helper/solana.js | 41 ++++++++++++++++++++++----------- projects/helper/tokenMapping.js | 11 ++++++++- projects/invariant/index.js | 22 ++++++++++++++---- projects/lifinity-v2/index.js | 17 ++++++++++---- projects/orca/index.js | 13 ++++++----- projects/solar-studios/index.js | 20 ++++++++++++++++ projects/solend/index.js | 7 +++++- 10 files changed, 102 insertions(+), 33 deletions(-) create mode 100644 projects/solar-studios/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index b18ca1574521..a83cb91ada08 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -95,6 +95,7 @@ "dydx", "dymension", "echelon", + "eclipse", "edg", "elastos", "elrond", diff --git a/projects/helper/env.js b/projects/helper/env.js index c95eb7eaba8b..5abcb317a4bc 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -8,6 +8,7 @@ const DEFAULTS = { STARKNET_RPC: 'https://starknet-mainnet.public.blastapi.io', COVALENT_KEY: 'ckey_72cd3b74b4a048c9bc671f7c5a6', SOLANA_RPC: 'https://mainnet.helius-rpc.com/?api-key=0109717a-77b4-498a-bc3c-a0b31aa1b3bf', + ECLIPSE_RPC: 'https://eclipse.lgns.net', APTOS_RPC: 'https://aptos-mainnet.pontem.network', SUI_RPC: 'https://fullnode.mainnet.sui.io/', SUI_GRAPH_RPC: 'https://sui-mainnet.mystenlabs.com/graphql', diff --git a/projects/helper/portedTokens.js b/projects/helper/portedTokens.js index 01eb946f4a27..f24b23c6f366 100644 --- a/projects/helper/portedTokens.js +++ b/projects/helper/portedTokens.js @@ -113,7 +113,7 @@ async function getChainTransform(chain) { if (chain === 'aura' && addr.startsWith('aura')) return chainStr if (chain === 'massa' && addr.startsWith('AS1')) return chainStr if (chain === 'algorand' && /^\d+$/.test(addr)) return chainStr - if (addr.startsWith('0x') || ['solana', 'kava', 'renec'].includes(chain)) return chainStr + if (addr.startsWith('0x') || ['solana', 'kava', 'renec', 'eclipse'].includes(chain)) return chainStr return addr }; } diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 91d9c111759b..29f7b404e078 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -39,9 +39,12 @@ const endpoint = (isClient) => { } const renecEndpoint = () => getEnv('RENEC_RPC') +const eclipseEndpoint = () => getEnv('ECLIPSE_RPC') + const endpointMap = { solana: endpoint, renec: renecEndpoint, + eclipse: eclipseEndpoint, } function getConnection(chain = 'solana') { @@ -175,7 +178,12 @@ function sumTokensExport({ tokenAccounts, owner, owners, tokens, solOwners, blac return (api) => sumTokens2({ api, chain: api.chain, tokenAccounts, owner, owners, tokens, solOwners, blacklistedTokens, allowError, tokensAndOwners, ...rest }) } +function getEndpoint(chain) { + return endpointMap[chain]() +} + async function sumTokens2({ + api, balances = {}, tokensAndOwners = [], tokens = [], @@ -186,7 +194,10 @@ async function sumTokens2({ blacklistedTokens = [], allowError = false, computeTokenAccount = false, + chain = 'solana', }) { + if (api) chain = api.chain + const endpoint = getEndpoint(chain) blacklistedTokens.push(...blacklistedTokens_default) if (!tokensAndOwners.length) { if (owner) tokensAndOwners = tokens.map(t => [t, owner]) @@ -198,8 +209,9 @@ async function sumTokens2({ const data = await getOwnerAllAccounts(_owners) for (const item of data) { if (blacklistedTokens.includes(item.mint) || +item.amount < 1e6) continue; - sdk.util.sumSingleBalance(balances, 'solana:' + item.mint, item.amount) + sdk.util.sumSingleBalance(balances, chain + ':' + item.mint, item.amount) } + await transformBalancesOrig(chain, balances) } tokensAndOwners = tokensAndOwners.filter(([token]) => !blacklistedTokens.includes(token)) @@ -212,20 +224,20 @@ async function sumTokens2({ tokensAndOwners = getUnique(tokensAndOwners) log('total balance queries: ', tokensAndOwners.length) await runInChunks(tokensAndOwners, async (chunk) => { - const tokenBalances = await getTokenBalances(chunk) - transformBalances({ tokenBalances, balances, }) + const tokenBalances = await getTokenBalances(chunk, chain) + transformBalances({ tokenBalances, balances, chain, }) }, { sleepTime: 400 }) } if (tokenAccounts.length) { tokenAccounts = getUniqueAddresses(tokenAccounts, 'solana') - const tokenBalances = await getTokenAccountBalances(tokenAccounts, { allowError }) - await transformBalances({ tokenBalances, balances, }) + const tokenBalances = await getTokenAccountBalances(tokenAccounts, { allowError, chain }) + await transformBalances({ tokenBalances, balances, chain, }) } if (solOwners.length) { - const solBalance = await getSolBalances(solOwners) + const solBalance = await getSolBalances(solOwners, { chain }) sdk.util.sumSingleBalance(balances, 'solana:' + ADDRESSES.solana.SOL, solBalance) } @@ -242,10 +254,10 @@ async function sumTokens2({ } async function getOwnerAllAccounts(owners) { - console.log('fetching sol token balances for', owners.length, 'owners') + sdk.log('fetching sol token balances for', owners.length, 'owners', chain,) return runInChunks(owners, async (chunk) => { const body = chunk.map(i => formOwnerBalanceQuery(i)) - const tokenBalances = await http.post(endpoint(), body) + const tokenBalances = await http.post(endpoint, body) return tokenBalances.map(i => i.result.value).flat().map(i => ({ account: i.pubkey, mint: i.account.data.parsed.info.mint, @@ -270,8 +282,8 @@ async function sumTokens2({ } } - async function getSolBalances(accounts) { - const connection = getConnection() + async function getSolBalances(accounts, { chain} = {}) { + const connection = getConnection(chain) const balances = await runInChunks(accounts, async (chunk) => { chunk = chunk.map(i => typeof i === 'string' ? new PublicKey(i) : i) @@ -295,9 +307,10 @@ async function sumTokens2({ }) } - async function getTokenBalances(tokensAndAccounts) { + async function getTokenBalances(tokensAndAccounts, chain) { + const endpoint = getEndpoint(chain) const body = tokensAndAccounts.map(([token, account], i) => formTokenBalanceQuery(token, account, i)) - const tokenBalances = await http.post(endpoint(), body); + const tokenBalances = await http.post(endpoint, body); const balances = {} tokenBalances.forEach(({ result: { value } = {} } = {}) => { if (!value) return; @@ -322,8 +335,8 @@ async function sumTokens2({ } } -async function transformBalances({ tokenBalances, balances = {}, }) { - await transformBalancesOrig('solana', tokenBalances) +async function transformBalances({ tokenBalances, balances = {}, chain = 'solana' }) { + await transformBalancesOrig(chain, tokenBalances) for (const [token, balance] of Object.entries(tokenBalances)) sdk.util.sumSingleBalance(balances, token, balance) return balances diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 32b38de1173d..2ee5d86cc624 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -19,7 +19,9 @@ coreAssets = JSON.parse(JSON.stringify(coreAssets)) const ibcChains = ['ibc', 'terra', 'terra2', 'crescent', 'osmosis', 'kujira', 'stargaze', 'juno', 'injective', 'cosmos', 'comdex', 'umee', 'orai', 'persistence', 'fxcore', 'neutron', 'quasar', 'chihuahua', 'sei', 'archway', 'migaloo', 'secret', 'aura', 'xpla', 'bostrom', 'joltify'] -const caseSensitiveChains = [...ibcChains, 'solana', 'tezos', 'ton', 'algorand', 'aptos', 'near', 'bitcoin', 'waves', 'tron', 'litecoin', 'polkadot', 'ripple', 'elrond', 'cardano', 'stacks', 'sui', 'ergo', 'mvc', 'renec', 'doge', 'stellar', 'massa',] +const caseSensitiveChains = [...ibcChains, 'solana', 'tezos', 'ton', 'algorand', 'aptos', 'near', 'bitcoin', 'waves', 'tron', 'litecoin', 'polkadot', 'ripple', 'elrond', 'cardano', 'stacks', 'sui', 'ergo', 'mvc', 'renec', 'doge', 'stellar', 'massa', + 'eclipse', +] const transformTokens = { // Sample Code @@ -167,6 +169,13 @@ const fixBalancesTokens = { arbitrum: { '0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a': { coingeckoId: 'universal-btc', decimals: 8 }, }, + eclipse: { + 'So11111111111111111111111111111111111111112': { coingeckoId: 'ethereum', decimals: 9 }, + '9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP': { coingeckoId: 'ethereum', decimals: 9 }, + 'BeRUj3h7BqkbdfFU7FBNYbodgf8GCHodzKvF9aVjNNfL': { coingeckoId: 'solana', decimals: 9 }, + 'AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE': { coingeckoId: 'usd-coin', decimals: 6 }, + '841P4tebEgNux2jaWSjCoi9LhrVr9eHGjLc758Va3RPH': { coingeckoId: 'dogwifcoin', decimals: 6 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/invariant/index.js b/projects/invariant/index.js index 0098e4a90e37..82fb0475e988 100644 --- a/projects/invariant/index.js +++ b/projects/invariant/index.js @@ -1,13 +1,25 @@ const { sumTokens2 } = require('../helper/solana') +const { getConfig } = require('../helper/cache') -async function tvl() { - return sumTokens2({ owner: 'J4uBbeoWpZE8fH58PM1Fp9n9K6f1aThyeVCyRdJbaXqt' }) +const config = { + solana: 'J4uBbeoWpZE8fH58PM1Fp9n9K6f1aThyeVCyRdJbaXqt', + eclipse: 'D4P9HJYPczLFHvxBgpLKooy7eWczci8pr4x9Zu7iYCVN', } module.exports = { timetravel: false, - solana: { - tvl - }, methodology: "TVL is a sum of the locked capital in each liquidity pool", }; + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: async (api) => { + if (chain === 'eclipse') { + const { tokensData } = await getConfig('invariant/eclipse', 'https://stats.invariant.app/svm/full_snap/eclipse-mainnet') + const tokens = tokensData.map(t => t.address) + return sumTokens2({ owner: config[chain], tokens, api }) + } + return sumTokens2({ owner: config[chain], api }) + } + } +}) diff --git a/projects/lifinity-v2/index.js b/projects/lifinity-v2/index.js index db5e782803a0..846353ac456f 100644 --- a/projects/lifinity-v2/index.js +++ b/projects/lifinity-v2/index.js @@ -1,21 +1,28 @@ const { getProvider, sumTokens2, } = require('../helper/solana') const { Program } = require("@project-serum/anchor"); -async function getTokenAccounts(programId, idl) { - const provider = getProvider() +async function getTokenAccounts(programId, idl, chain) { + const provider = getProvider(chain) + console.log(programId, chain) const program = new Program(idl, programId, provider) const data = await program.account.amm.all() return data.map(({ account: { tokenAAccount, tokenBAccount }}) => ([tokenAAccount, tokenBAccount,])).flat() } -async function tvl() { - const tokenAccounts = await getTokenAccounts('2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c', v2Idl) - return sumTokens2({ tokenAccounts, }) +const config = { + solana: '2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c', + eclipse: '4UsSbJQZJTfZDFrgvcPBRCSg5BbcQE6dobnriCafzj12', +} + +async function tvl(api) { + const tokenAccounts = await getTokenAccounts(config[api.chain], v2Idl, api.chain) + return sumTokens2({ tokenAccounts, api, }) } module.exports = { timetravel: false, solana: { tvl, }, + eclipse: { tvl, }, } const v2Idl = { diff --git a/projects/orca/index.js b/projects/orca/index.js index a3c21e323d8c..2f25675e57d4 100644 --- a/projects/orca/index.js +++ b/projects/orca/index.js @@ -2,13 +2,13 @@ const { getProvider, sumTokens2, exportDexTVL, } = require('../helper/solana') const { Program, } = require("@project-serum/anchor"); const sdk = require('@defillama/sdk') -async function tvl() { - const provider = getProvider() +async function tvl(api) { + const provider = getProvider(api.chain) const programId = 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc' const program = new Program(whirpoolIDL, programId, provider) const whirlpools = await program.account.whirlpool.all() - const tokenAccounts = whirlpools.map(({ account}) => [account.tokenVaultA, account.tokenVaultB]).flat() - return sumTokens2({ tokenAccounts, }) + const tokenAccounts = whirlpools.map(({ account }) => [account.tokenVaultA, account.tokenVaultB]).flat() + return sumTokens2({ tokenAccounts, api, }) } /* async function orcaPoolTvlViaConfig() { @@ -22,14 +22,15 @@ async function tvl() { return sumTokens2({ tokenAccounts, blacklistedTokens, }) } */ -const orcaV1Tvl = exportDexTVL('DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1') -const orcaV2Tvl = exportDexTVL('9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP') +const orcaV1Tvl = exportDexTVL('DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1') +const orcaV2Tvl = exportDexTVL('9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP') module.exports = { timetravel: false, solana: { tvl: sdk.util.sumChainTvls([orcaV1Tvl, orcaV2Tvl, tvl]) }, + eclipse: { tvl }, hallmarks: [ [1628565707, "Token+LM launch"], [1667865600, "FTX collapse"] diff --git a/projects/solar-studios/index.js b/projects/solar-studios/index.js new file mode 100644 index 000000000000..c519ab923f3a --- /dev/null +++ b/projects/solar-studios/index.js @@ -0,0 +1,20 @@ +const { getProvider, sumTokens2 } = require("../helper/solana"); +const { Program, } = require("@project-serum/anchor"); + + +async function tvl(api) { + + const provider = getProvider(api.chain) + const programId = 'sooGfQwJ6enHfLTPfasFZtFR7DgobkJD77maDNEqGkD' + const idl = await Program.fetchIdl(programId, provider) + const program = new Program(idl, programId, provider) + const data = await program.account.poolState.all() + console.log(data.length) + const tokenAccounts = data.map(({ account: { token0Vault, token1Vault }}) => ([token0Vault, token1Vault,])).flat() + return sumTokens2({ tokenAccounts, api, }) +} + +module.exports = { + timetravel: false, + eclipse: { tvl, }, +} diff --git a/projects/solend/index.js b/projects/solend/index.js index d8c495f05e37..9670d6dda500 100644 --- a/projects/solend/index.js +++ b/projects/solend/index.js @@ -21,7 +21,11 @@ async function borrowed(api) { async function tvl() { const markets = (await getConfig('solend', solendConfigEndpoint)) - return sumTokens2({ owners: markets.map(i => i.authorityAddress)}); + return sumTokens2({ owners: markets.map(i => i.authorityAddress) }); +} + +async function eclipseTvl(api) { + return sumTokens2({ api, owners: ['5Gk1kTdDqqacmA2UF3UbNhM7eEhVFvF3p8nd9p3HbXxk'] }); } module.exports = { @@ -30,6 +34,7 @@ module.exports = { tvl, borrowed, }, + eclipse: { tvl: eclipseTvl }, methodology: "TVL consists of deposits made to the protocol and like other lending protocols, borrowed tokens are not counted. Coingecko is used to price tokens.", hallmarks: [ From 1ca82c9df2d81ef35b037d28769020a7e145b5f6 Mon Sep 17 00:00:00 2001 From: 0xYFLOW <139814596+0xYFLOW@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:55:47 +0400 Subject: [PATCH 298/787] Update index.js (#12250) --- projects/yieldflow/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/yieldflow/index.js b/projects/yieldflow/index.js index 65872ca4fcb0..4f6f7dc694a3 100644 --- a/projects/yieldflow/index.js +++ b/projects/yieldflow/index.js @@ -78,6 +78,14 @@ const managers = [ '0x1F73AbC7e254980AB26974C9A13c8493143F97Bc', '0x599Dd6b1205E51fbcb2879105051C0EBbfa76b03', '0xcC125F83BFe2A30F1BEfdf6E06043dB5a7a02A61', + + '0xd7F287266D0E057D0e64C126687154CB1db9610A', + '0x56E81D09b31572982019fDa2e284cFAe48BD5aAc', + '0xAf0ddFa27EcccF9f0358cAC2d18E4800b53063f4', + + '0x3Bd5B4422685F9321F0e5a8333067A4A049fC664', + '0x1AC1d8911BBb2Fed8fD736e3649FC363001C8e07', + '0x5ABf77610fabaD2DeF07A43eF6f66C1D2438dE7e', ] async function tvl(api) { From cdcae7451127972460958f7904f7a1ab4cfda532 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 07:28:54 +0100 Subject: [PATCH 299/787] track opendelta #12248 --- projects/opendelta/index.js | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 projects/opendelta/index.js diff --git a/projects/opendelta/index.js b/projects/opendelta/index.js new file mode 100644 index 000000000000..fa045dd629cb --- /dev/null +++ b/projects/opendelta/index.js @@ -0,0 +1,39 @@ +const { PublicKey, } = require("@solana/web3.js") +const { getConnection, } = require("../helper/solana") + +const OPB_MINT_ADDRESS = "opbrKSFxFXRHNg75xjpEAbJ5R6e6GYZ6QKEqdvcBq7c" + +async function tvl(api) { + const connection = getConnection() + const { value: { data: { parsed: { info: { supply, decimals, extensions }}}}} = await connection.getParsedAccountInfo(new PublicKey(OPB_MINT_ADDRESS)) + const { state } = extensions.find(e => e.extension === 'interestBearingConfig') + api.addUSDValue(computeSupply(supply, state, decimals)) + + function computeSupply(supply, extensionData, decimals) { + // Compute the supply based on the interest-bearing extension + const { currentRate, initializationTimestamp, preUpdateAverageRate, lastUpdateTimestamp, } = extensionData + + // Example computation (adjust as needed) + const currentTimestamp = Math.floor(Date.now() / 1000) + const timeElapsed = lastUpdateTimestamp - initializationTimestamp + const timeElapsedSinceLastUpdate = currentTimestamp - lastUpdateTimestamp + const interestRate = currentRate / 1e4 + const interestRatePre = preUpdateAverageRate / 1e4 + const ONE_YEAR = 365 * 24 * 60 * 60 + const interestAccruedCurrent = interestRate * timeElapsedSinceLastUpdate / ONE_YEAR + const interestAccruedPre = interestRatePre * timeElapsed / ONE_YEAR + + const computedSupply = supply * (1 + interestAccruedCurrent + interestAccruedPre) + return computedSupply / Math.pow(10, decimals) + } + +} + +module.exports = { + timetravel: false, + misrepresentedTokens: true, + methodology: "TVL is calculated by multiplying OPB token supply by the current USD value of 1.0 OPB. Initially worth $1.0, 1.0 OPB now reflects its increased value from accrued interest, derived via amountToUiAmount using the Interest Bearing extension.", + solana: { + tvl, + }, +} From 50140df9ec6a097ec9c7f378719a87fdc1548847 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 07:29:19 +0100 Subject: [PATCH 300/787] remove comment --- projects/opendelta/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/opendelta/index.js b/projects/opendelta/index.js index fa045dd629cb..e842ad9913b7 100644 --- a/projects/opendelta/index.js +++ b/projects/opendelta/index.js @@ -13,7 +13,6 @@ async function tvl(api) { // Compute the supply based on the interest-bearing extension const { currentRate, initializationTimestamp, preUpdateAverageRate, lastUpdateTimestamp, } = extensionData - // Example computation (adjust as needed) const currentTimestamp = Math.floor(Date.now() / 1000) const timeElapsed = lastUpdateTimestamp - initializationTimestamp const timeElapsedSinceLastUpdate = currentTimestamp - lastUpdateTimestamp From b1d8cd1be900450cd391e542d663ca6a8df4ef7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=EB=8B=A4=EC=9D=80?= <132417166+leeeunda@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:32:11 +0900 Subject: [PATCH 301/787] Add memeta adapter (#12262) --- projects/memeta/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/memeta/index.js diff --git a/projects/memeta/index.js b/projects/memeta/index.js new file mode 100644 index 000000000000..ce86a6650327 --- /dev/null +++ b/projects/memeta/index.js @@ -0,0 +1,19 @@ +const ADDRESSES = require('../helper/coreAssets.json'); + +async function tvl(api) { + const MEMETA_CONTRACT_ADDRESS = "0xD76A1A03C4873042c50ba77cE455C793C70d1b2d"; + + return api.sumTokens({ + owner: MEMETA_CONTRACT_ADDRESS, + tokens: [ + ADDRESSES.manta.WETH, + ADDRESSES.manta.USDC, + ADDRESSES.manta.USDT, + ADDRESSES.manta.WBTC, + ], + }); +} + +module.exports = { + manta: { tvl }, +}; \ No newline at end of file From 4b7f45535fd0c1da308749b7916ac793d9b640e3 Mon Sep 17 00:00:00 2001 From: jan-magpie <155635960+jan-magpie@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:19:16 +0530 Subject: [PATCH 302/787] Modified code to counter race error (#12263) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/eigenpie/index.js | 44 +++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/projects/eigenpie/index.js b/projects/eigenpie/index.js index 849fd8c5a2c3..c487fad2e26f 100644 --- a/projects/eigenpie/index.js +++ b/projects/eigenpie/index.js @@ -1,20 +1,40 @@ const config = require("./config"); +const sdk = require('@defillama/sdk') + +async function getZircuitSupplies(api) { + const { msteth, egeth } = config[api.chain]; + const mlrttokens = [msteth, egeth]; + const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens, }); + return { + zircuitMstethSupply: tokenSupplies[0], + zircuitEgethSupply: tokenSupplies[1], + }; +} async function tvl(api) { - const { eigenConfig, } = config[api.chain]; + const { eigenConfig } = config[api.chain]; + + const zircuitApi = new sdk.ChainApi({ chain: 'zircuit', timestamp: api.timestamp }); + await zircuitApi.getBlock() + const zircuitSupplies = await getZircuitSupplies(zircuitApi); + api.add('0xae7ab96520de3a18e5e111b5eaab095312d7fe84', zircuitSupplies.zircuitMstethSupply * -1); // Adjust for msteth + api.add('0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf', zircuitSupplies.zircuitEgethSupply * -1); // Adjust for egeth - let tokens = await api.call({ abi: 'address[]:getSupportedAssetList', target: eigenConfig, }); - const mlrttokens = await api.multiCall({ abi: 'function mLRTReceiptByAsset(address) view returns (address)', calls: tokens, target: eigenConfig }) - const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens }) - api.add(tokens, tokenSupplies) + // Fetch token list and their supplies + let tokens = await api.call({ abi: 'address[]:getSupportedAssetList', target: eigenConfig }); + const mlrttokens = await api.multiCall({ abi: 'function mLRTReceiptByAsset(address) view returns (address)', calls: tokens, target: eigenConfig }); + const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens }); + api.add(tokens, tokenSupplies); } async function tvl_zircuit(api) { const { msteth, egeth, wsteth, weth } = config[api.chain]; - const mlrttokens = [msteth, egeth] - const tokens = [wsteth, weth] - const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens }) - api.add(tokens, tokenSupplies) + const mlrttokens = [msteth, egeth]; + const tokens = [wsteth, weth]; + + // Now add zircuit-specific supplies + const tokenSupplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: mlrttokens }); + api.add(tokens, tokenSupplies); } module.exports = { @@ -23,7 +43,7 @@ module.exports = { }, zircuit: { tvl: tvl_zircuit, - } -} + }, +}; -module.exports.doublecounted = true \ No newline at end of file +module.exports.doublecounted = true; From 0b36e45c39f21258fda0425f69c6c293bf611146 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:02:21 +0100 Subject: [PATCH 303/787] track manifest trade #12260 --- projects/manifest-trade/index.js | 83 ++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 projects/manifest-trade/index.js diff --git a/projects/manifest-trade/index.js b/projects/manifest-trade/index.js new file mode 100644 index 000000000000..9208b0fc6711 --- /dev/null +++ b/projects/manifest-trade/index.js @@ -0,0 +1,83 @@ +const { PublicKey } = require("@solana/web3.js"); +const { getConnection, sumTokens2, } = require("../helper/solana"); + +const PROGRAM_ADDRESS = 'MNFSTqtC93rEfYHB6hF82sKdZpUDFWkViLByLd1k1Ms'; +const PROGRAM_ID = new PublicKey(PROGRAM_ADDRESS); +function getVaultAddress(market, mint) { + const [vaultAddress, _unusedBump] = PublicKey.findProgramAddressSync( + [Buffer.from('vault'), market.toBuffer(), mint.toBuffer()], + PROGRAM_ID, + ); + return vaultAddress; +} +function getGlobalVaultAddress(mint) { + const [globalVaultAddress, _unusedBump] = PublicKey.findProgramAddressSync( + [Buffer.from('global-vault'), mint.toBuffer()], + PROGRAM_ID, + ); + return globalVaultAddress; +} + +async function listMarketPublicKeys( + connection, +) { + const accounts = await connection.getProgramAccounts(PROGRAM_ID, { + filters: [ + { + memcmp: { + offset: 0, + bytes: '8K9hj5OfcUM=', + encoding: 'base64', + }, + }, + ], + }); + + return accounts.map((a) => a.pubkey); +} + +async function tvl() { + const connection = getConnection(); + const marketPks = await listMarketPublicKeys(connection); + + const vaultAccounts = []; + let globalAccounts = []; + for (const pk of marketPks) { + const [buffer, _slot] = await connection + .getAccountInfoAndContext(pk) + .then( + ( + getAccountInfoAndContext, + ) => { + return [ + getAccountInfoAndContext.value?.data, + getAccountInfoAndContext.context.slot, + ]; + }, + ); + + let offset = 16; + const baseMint = new PublicKey(buffer.subarray(offset, offset + 32)); + const quoteMint = new PublicKey(buffer.subarray(offset + 32, offset + 32 + 32)); + + const baseVaultPk = getVaultAddress(pk, baseMint); + const quoteVaultPk = getVaultAddress(pk, quoteMint); + vaultAccounts.push(baseVaultPk); + vaultAccounts.push(quoteVaultPk); + + const baseGlobalPk = getGlobalVaultAddress(baseMint); + const quoteGlobalPk = getGlobalVaultAddress(quoteMint); + globalAccounts.push(baseGlobalPk); + globalAccounts.push(quoteGlobalPk); + } + + const tokenAccounts = vaultAccounts.concat(globalAccounts); + return sumTokens2({ tokenAccounts, allowError: true }) +} + +module.exports = { + timetravel: false, + solana: { + tvl, + }, +}; \ No newline at end of file From 5a8ec866ba340d1a52f30ec4c3ca2a8b965c785f Mon Sep 17 00:00:00 2001 From: Liam Dyer Date: Wed, 13 Nov 2024 02:03:15 -0500 Subject: [PATCH 304/787] fix: drop hex conversion on liqwid asset name (#12259) Co-authored-by: rcheiko --- projects/liqwid/index.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/projects/liqwid/index.js b/projects/liqwid/index.js index 020298cf5e77..ba25beed08e7 100644 --- a/projects/liqwid/index.js +++ b/projects/liqwid/index.js @@ -61,11 +61,13 @@ const query = `query($input: MarketsInput) { const tokenMapping = { Ada: 'lovelace', DJED: '8db269c3ec630e06ae29f74bc39edd1f87c819f1056206e879a1cd61446a65644d6963726f555344', + USDM: 'c48cbb3d5e57ed56e276bc45f99ab39abe94e6cd7ac39fb402da47ad0014df105553444d', DAI: 'dai', - USDM: 'c48cbb3d5e57ed56e276bc45f99ab39abe94e6cd7ac39fb402da47ad0014df105553444d' + USDC: 'usd-coin', + USDT: 'tether', } -const getToken = (market) => tokenMapping[market.id] ?? market.asset.currencySymbol + toHex(market.asset.name) +const getToken = (market) => tokenMapping[market.id] ?? market.asset.currencySymbol + market.asset.name const getOptimBondTVL = async () => { const getLoans = async (pageIndex = 0, collectedLoans = []) => { @@ -166,11 +168,3 @@ async function borrowed(api) { add(api, market, market.borrow * 10 ** market.asset.decimals) }) } - -function toHex(str) { - let hex = '' - for (let i = 0; i < str.length; i++) { - hex += str.charCodeAt(i).toString(16); - } - return hex -} From 06e465fa5954e845c9a3c8a71a2468d4fbfb9b7f Mon Sep 17 00:00:00 2001 From: Mahyar Daneshpajooh <34237597+MahyarDaneshpajooh@users.noreply.github.com> Date: Wed, 13 Nov 2024 02:18:57 -0500 Subject: [PATCH 305/787] feat: teleswap adapter (#12258) --- projects/teleswap/index.js | 96 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 projects/teleswap/index.js diff --git a/projects/teleswap/index.js b/projects/teleswap/index.js new file mode 100644 index 000000000000..68adfee55e5a --- /dev/null +++ b/projects/teleswap/index.js @@ -0,0 +1,96 @@ +const sdk = require('@defillama/sdk'); +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens } = require('../helper/chain/bitcoin.js'); +// const { sumTokensExport: sumBRC20TokensExport } = require('../helper/chain/brc20.js'); + +const POLYGON_LOCKERS_MANAGER_PROXY = '0xf5D6D369A7F4147F720AEAdd4C4f903aE8046166'; +const BNB_LOCKERS_MANAGER_PROXY = '0x84F74e97ebab432CeE185d601290cE0A483987A5'; +const BSQUARED_LOCKERS_MANAGER_PROXY = '0x20752a82fe75996a582Ae2be1b7C3D4866C5b733'; +const BOB_LOCKERS_MANAGER_PROXY = '0xd720996f0D8fFD9154c8271D2991f54E5d93D2A9'; +const TST = "0x0828096494ad6252F0F853abFC5b6ec9dfe9fDAd"; +const TST_DELEGATION = "0x93AD6C8B3a273E0B4aeeBd6CF03422C885217D3B"; + +const POLYGON_LOCKER = '3CAQAw7m95axbY761Xq8d9DADhjNaX9b8o'; +const BNB_LOCKER = '3KLdeu9maZAfccm3TeRWEmUMuw2e8SLo4v'; +const BSQUARED_LOCKER = '3E2hwnq5BsmP1ea6JUhjdKZjh2wy4NuQ8T'; +const BOB_LOCKER = '31uHNFfbejkbUD2B26o2CARfU1ALJ6x6Ag'; +// const BRC20_LOCKER='3LNsey3ceG9ZHkQ7bcfAjwnew7KVujHt29'; + +async function bitcoin_tvl() { + // TODO: add BRC-20 locker + // TODO: get Bitcoin address of Lockers dynamically + // Get BTC balance of Lockers + return await sumTokens({ + owners: [POLYGON_LOCKER, BNB_LOCKER, BSQUARED_LOCKER, BOB_LOCKER] + }); +} + +async function polygon_tvl(api) { + // Get Lockers collateral + const collateralBalance = await sdk.api.eth.getBalance({ + target: POLYGON_LOCKERS_MANAGER_PROXY, + chain: 'polygon' + }); + api.add("0x0000000000000000000000000000000000000000", collateralBalance.output) +} + +async function bnb_tvl(api) { + // Get Lockers collateral + const collateralBalance = await sdk.api.eth.getBalance({ + target: BNB_LOCKERS_MANAGER_PROXY, + chain: 'bsc' + }); + api.add("0x0000000000000000000000000000000000000000", collateralBalance.output) +} + +async function bsquared_tvl(api) { + // Get Lockers collateral + const collateralBalance = await api.call({ + abi: 'erc20:balanceOf', + target: ADDRESSES.bsquared.WBTC, + params: [BSQUARED_LOCKERS_MANAGER_PROXY], + }); + api.add(ADDRESSES.bsquared.WBTC, collateralBalance) +} + +async function bob_tvl(api) { + // Get Lockers collateral + const collateralBalance = await api.call({ + abi: 'erc20:balanceOf', + target: ADDRESSES.bob.WBTC, + params: [BOB_LOCKERS_MANAGER_PROXY], + }); + api.add(ADDRESSES.bob.WBTC, collateralBalance) +} + +async function ethereum_tvl(api) { + // Get delegated TST + const delegatedBalace = await api.call({ + abi: 'erc20:balanceOf', + target: TST, + params: [TST_DELEGATION], + }); + api.add(TST, delegatedBalace) +} + +module.exports = { + methodology: 'TVL is the sum of all BTC locked by users, collateral locked by Lockers, and TST delegated to Lockers.', + bitcoin: { + tvl: bitcoin_tvl, + }, + polygon: { + tvl: polygon_tvl, + }, + bsc: { + tvl: bnb_tvl, + }, + bsquared: { + tvl: bsquared_tvl, + }, + bob: { + tvl: bob_tvl, + }, + ethereum: { + tvl: ethereum_tvl, + } +}; \ No newline at end of file From f29f871145b3e2f4ca931e175ce2b25378f6697d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:19:55 +0100 Subject: [PATCH 306/787] Teleswap (#12264) Co-authored-by: MahyarDaneshpajooh --- projects/helper/bitcoin-book/index.js | 8 ++ projects/teleswap/index.js | 108 ++++++-------------------- 2 files changed, 31 insertions(+), 85 deletions(-) diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index f5f7285f2cd4..f3ac166bc37a 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -85,9 +85,17 @@ const indiaCovid = require('./india-covid.js') const wooCEX = require('./woo-cex.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] +const teleswap = [ + '3CAQAw7m95axbY761Xq8d9DADhjNaX9b8o', // POLYGON_LOCKER + '3KLdeu9maZAfccm3TeRWEmUMuw2e8SLo4v', // BNB_LOCKER + '3E2hwnq5BsmP1ea6JUhjdKZjh2wy4NuQ8T', // BSQUARED_LOCKER + '31uHNFfbejkbUD2B26o2CARfU1ALJ6x6Ag', // BOB_LOCKER + '3LNsey3ceG9ZHkQ7bcfAjwnew7KVujHt29', // BRC20_LOCKER +] module.exports = { ...fetchers, + teleswap, ainn, allo, avalanche, diff --git a/projects/teleswap/index.js b/projects/teleswap/index.js index 68adfee55e5a..f4d272436a9b 100644 --- a/projects/teleswap/index.js +++ b/projects/teleswap/index.js @@ -1,96 +1,34 @@ const sdk = require('@defillama/sdk'); const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens } = require('../helper/chain/bitcoin.js'); -// const { sumTokensExport: sumBRC20TokensExport } = require('../helper/chain/brc20.js'); +const { sumTokensExport } = require('../helper/sumTokens.js'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') +const { sumTokensExport: sumBRC20TokensExport } = require('../helper/chain/brc20.js'); -const POLYGON_LOCKERS_MANAGER_PROXY = '0xf5D6D369A7F4147F720AEAdd4C4f903aE8046166'; -const BNB_LOCKERS_MANAGER_PROXY = '0x84F74e97ebab432CeE185d601290cE0A483987A5'; -const BSQUARED_LOCKERS_MANAGER_PROXY = '0x20752a82fe75996a582Ae2be1b7C3D4866C5b733'; -const BOB_LOCKERS_MANAGER_PROXY = '0xd720996f0D8fFD9154c8271D2991f54E5d93D2A9'; const TST = "0x0828096494ad6252F0F853abFC5b6ec9dfe9fDAd"; const TST_DELEGATION = "0x93AD6C8B3a273E0B4aeeBd6CF03422C885217D3B"; -const POLYGON_LOCKER = '3CAQAw7m95axbY761Xq8d9DADhjNaX9b8o'; -const BNB_LOCKER = '3KLdeu9maZAfccm3TeRWEmUMuw2e8SLo4v'; -const BSQUARED_LOCKER = '3E2hwnq5BsmP1ea6JUhjdKZjh2wy4NuQ8T'; -const BOB_LOCKER = '31uHNFfbejkbUD2B26o2CARfU1ALJ6x6Ag'; -// const BRC20_LOCKER='3LNsey3ceG9ZHkQ7bcfAjwnew7KVujHt29'; -async function bitcoin_tvl() { - // TODO: add BRC-20 locker - // TODO: get Bitcoin address of Lockers dynamically - // Get BTC balance of Lockers - return await sumTokens({ - owners: [POLYGON_LOCKER, BNB_LOCKER, BSQUARED_LOCKER, BOB_LOCKER] - }); -} - -async function polygon_tvl(api) { - // Get Lockers collateral - const collateralBalance = await sdk.api.eth.getBalance({ - target: POLYGON_LOCKERS_MANAGER_PROXY, - chain: 'polygon' - }); - api.add("0x0000000000000000000000000000000000000000", collateralBalance.output) -} - -async function bnb_tvl(api) { - // Get Lockers collateral - const collateralBalance = await sdk.api.eth.getBalance({ - target: BNB_LOCKERS_MANAGER_PROXY, - chain: 'bsc' - }); - api.add("0x0000000000000000000000000000000000000000", collateralBalance.output) -} - -async function bsquared_tvl(api) { - // Get Lockers collateral - const collateralBalance = await api.call({ - abi: 'erc20:balanceOf', - target: ADDRESSES.bsquared.WBTC, - params: [BSQUARED_LOCKERS_MANAGER_PROXY], - }); - api.add(ADDRESSES.bsquared.WBTC, collateralBalance) -} - -async function bob_tvl(api) { - // Get Lockers collateral - const collateralBalance = await api.call({ - abi: 'erc20:balanceOf', - target: ADDRESSES.bob.WBTC, - params: [BOB_LOCKERS_MANAGER_PROXY], - }); - api.add(ADDRESSES.bob.WBTC, collateralBalance) +module.exports = { + methodology: 'TVL is the sum of all BTC locked by users, collateral locked by Lockers, and TST delegated to Lockers.', + bitcoin: { + tvl: sdk.util.sumChainTvls([ + sumTokensExport({ owners: bitcoinAddressBook.teleswap }), + sumBRC20TokensExport({ owners: bitcoinAddressBook.teleswap }), + ]) + }, + ethereum: { staking: sumTokensExport({ owners: [TST_DELEGATION], tokens: [TST] }) }, } -async function ethereum_tvl(api) { - // Get delegated TST - const delegatedBalace = await api.call({ - abi: 'erc20:balanceOf', - target: TST, - params: [TST_DELEGATION], - }); - api.add(TST, delegatedBalace) +const config = { + polygon: { owners: ['0xf5D6D369A7F4147F720AEAdd4C4f903aE8046166'], tokens: [ADDRESSES.null] }, + bsc: { owners: ['0x84F74e97ebab432CeE185d601290cE0A483987A5'], tokens: [ADDRESSES.null] }, + bsquared: { owners: ['0x20752a82fe75996a582Ae2be1b7C3D4866C5b733'], tokens: [ADDRESSES.bsquared.WBTC] }, + bob: { owners: ['0xd720996f0D8fFD9154c8271D2991f54E5d93D2A9'], tokens: [ADDRESSES.bob.WBTC] }, } -module.exports = { - methodology: 'TVL is the sum of all BTC locked by users, collateral locked by Lockers, and TST delegated to Lockers.', - bitcoin: { - tvl: bitcoin_tvl, - }, - polygon: { - tvl: polygon_tvl, - }, - bsc: { - tvl: bnb_tvl, - }, - bsquared: { - tvl: bsquared_tvl, - }, - bob: { - tvl: bob_tvl, - }, - ethereum: { - tvl: ethereum_tvl, - } -}; \ No newline at end of file +Object.keys(config).forEach(chain => { + const { owners, tokens, } = config[chain] + module.exports[chain] = { + tvl: sumTokensExport({ owners, tokens }) + } +}) \ No newline at end of file From aef50d23d820ab8ea6909b913bbfcf648e058b06 Mon Sep 17 00:00:00 2001 From: SimsalaCrypto <94809733+SimsalaCrypto@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:20:50 +0100 Subject: [PATCH 307/787] - add preon amo tvl (#12257) --- projects/preon/index.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/projects/preon/index.js b/projects/preon/index.js index 98fa07930675..44425b980c20 100644 --- a/projects/preon/index.js +++ b/projects/preon/index.js @@ -1,3 +1,4 @@ +//preon const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require("../helper/unwrapLPs"); @@ -16,6 +17,11 @@ const config = { [["0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE"], "0xdc4552609a3f673f0b72958f678d4a48d0e94ebd"], // aPolDAI ], }, + base: { + ownerTokens: [ + [[ADDRESSES.base.WETH], "0xEfaA597277Ce531e52018d42224aB579Bbe31a04"], // aeroAMO + ], + }, }; const extraConfig = { @@ -48,12 +54,25 @@ async function customTvl(api) { } } +async function baseTvl(api) { + const aeroAMO = '0xEfaA597277Ce531e52018d42224aB579Bbe31a04' + const [amountWeth, _amountOETH] = await api.call({ + abi: 'function getPositionPrincipal() view returns (uint256, uint256)', + target: aeroAMO + }) + api.add(ADDRESSES.base.USDC, amountWeth) + return api.getBalances() +} + async function tvl(api) { + if (api.chain === 'base') { + return baseTvl(api) + } await Promise.all([tokenTvl, customTvl].map((fn) => fn(api))); } module.exports = { - methodology: "Adds up the total value locked as collateral on the Preon Finance", + methodology: "Adds up the total value locked as collateral, as well as the AMO positions on Preon Finance", }; Object.keys(config).forEach((chain) => { From 4777e469276147406bffd386f3bfdd8a11788d1c Mon Sep 17 00:00:00 2001 From: Aymen <146243083+aymentrosh@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:21:08 +0100 Subject: [PATCH 308/787] added karak, bsc, and mantle factories to karak tvl (#12256) --- projects/karak/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/karak/index.js b/projects/karak/index.js index ba5290c9c386..4225da63dbea 100644 --- a/projects/karak/index.js +++ b/projects/karak/index.js @@ -4,9 +4,9 @@ const { sumTokens2 } = require("../helper/unwrapLPs") const config = { ethereum: { v1: { factory: '0x54e44dbb92dba848ace27f44c0cb4268981ef1cc' } }, arbitrum: { v1: { factory: '0x399f22ae52a18382a67542b3de9bed52b7b9a4ad' }, v2: { factory: '0xc4B3D494c166eBbFF9C716Da4cec39B579795A0d', block: 261874079 }}, - karak: { v1: { factory:'0xB308474350D75447cA8731B7Ce87c9ee9DA03B1C' } }, - mantle: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'} }, - bsc: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'} }, + karak: { v1: { factory:'0xB308474350D75447cA8731B7Ce87c9ee9DA03B1C' }, v2: { factory: '0x1368AE21e85c9FA25f1aB579b6D3C6e20Ad6db04', block: 13814008 }}, + mantle: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'}, v2: { factory: '0x993E140Ba530E8Ffe1135ecef07ce7484f26CAA3', block: 71616200 }}, + bsc: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'}, v2: { factory: '0x93036971877E084DD303463628494c150572856D', block: 43813383 }}, blast: { v1: { factory: '0x58b5dc145ca2BE84fe087614CFe36055be609BB3'} }, fraxtal: { v1: { factory: '0xdF922c74CC0dc394022ea002Af5aFaa32348670e'}, v2: { factory: '0x04962047B6a9E8c99C8Da874D34c4285a87d541E', block: 11669871 } }, } From 8b5000b9d808cd5a9fa8536d0d3a26b93530b8d4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:29:27 +0100 Subject: [PATCH 309/787] reservoir: track PSM --- projects/reservoir-protocol/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/reservoir-protocol/index.js b/projects/reservoir-protocol/index.js index f5b4d9cfc10d..c6691b1af993 100644 --- a/projects/reservoir-protocol/index.js +++ b/projects/reservoir-protocol/index.js @@ -1,3 +1,5 @@ +const ADDRESSES = require('../helper/coreAssets.json') + const config = { ethereum: [ // https://docs.reservoir.xyz/products/proof-of-reserves @@ -17,6 +19,9 @@ Object.keys(config).forEach(chain => { const decimals = await api.multiCall({ abi: 'uint8:decimals', calls: tokens }) bals.forEach((v, i) => bals[i] = v * 10 ** (decimals[i] - 18)) api.add(tokens, bals) + return api.sumTokens({ + owner: '0x4809010926aec940b550D34a46A52739f996D75D', token: ADDRESSES.ethereum.USDC + }) } } }) \ No newline at end of file From a5fa3676ce50ca6b57870f0e668d6e7181a68420 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 13 Nov 2024 08:32:18 +0100 Subject: [PATCH 310/787] Feat: Mantle-restaking (#12252) --- projects/mantle-restaking/index.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 projects/mantle-restaking/index.js diff --git a/projects/mantle-restaking/index.js b/projects/mantle-restaking/index.js new file mode 100644 index 000000000000..8ad5875e8036 --- /dev/null +++ b/projects/mantle-restaking/index.js @@ -0,0 +1,24 @@ +const targets = [ + '0x6DfbE3A1a0e835C125EEBb7712Fffc36c4D93b25', // eigenPos1 + '0x021180A06Aa65A7B5fF891b5C146FbDaFC06e2DA', // eigenPos2 + '0x52EA8E95378d01B0aaD3B034Ca0656b0F0cc21A2', // karakPos + '0x919531146f9a25dfc161d5ab23b117feae2c1d36', // symbioticPos +] + +const mETH = '0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa' +const boringVault = '0x33272D40b247c4cd9C646582C9bbAD44e85D4fE4' +const delayedWithdraw = '0x12be34be067ebd201f6eaf78a861d90b2a66b113' + +const abi = "function getUnderlyings() view returns (address[] assets, uint256[] amounts)" + +const tvl = async (api) => { + const allocateds = await api.multiCall({ calls: targets, abi }) + allocateds.forEach(({ assets: [asset], amounts: [amount] }) => api.add(asset, amount)); + return api.sumTokens({ tokens: [mETH], owners: [boringVault, delayedWithdraw] }) +} + +module.exports = { + doublecounted: true, + methodology: 'TVL corresponds to the sum of mETH deposited across various restaking protocols + the funds pending withdrawal or deposit', + ethereum: { tvl } +} From 5fad57cf391bb22038352d6a68ea77a6b09e288f Mon Sep 17 00:00:00 2001 From: Paul <133055914+PaulZhemanov@users.noreply.github.com> Date: Wed, 13 Nov 2024 13:15:25 +0300 Subject: [PATCH 311/787] spark onbording (#12265) --- projects/spark/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/spark/index.js diff --git a/projects/spark/index.js b/projects/spark/index.js new file mode 100644 index 000000000000..b39e27907731 --- /dev/null +++ b/projects/spark/index.js @@ -0,0 +1,11 @@ +const { sumTokens } = require("../helper/chain/fuel") + +async function tvl(api) { + const contractId = '0xfe2c524ad8e088f33d232a45dbea43e792861640b71aa1814b30506bf8430ee5' + return sumTokens({ api, owner: contractId, }) +} + +module.exports = { + fuel: { tvl }, + timetravel: false, +} \ No newline at end of file From 2587909704a3fab6064555620a7ec96ff7dff4a0 Mon Sep 17 00:00:00 2001 From: minato <100826289+0x-minato@users.noreply.github.com> Date: Wed, 13 Nov 2024 15:45:48 +0530 Subject: [PATCH 312/787] Added ETH Sensei XL (#12268) Co-authored-by: ariyan-hashstack --- projects/strkfarm/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/strkfarm/index.js b/projects/strkfarm/index.js index 4468fef29b0b..40145a0d99b7 100644 --- a/projects/strkfarm/index.js +++ b/projects/strkfarm/index.js @@ -28,6 +28,10 @@ const STRATEGIES = { address: "0x9d23d9b1fa0db8c9d75a1df924c3820e594fc4ab1475695889286f3f6df250", token: ADDRESSES.starknet.ETH, // ETH Sensei zToken: '0x1b5bd713e72fdc5d63ffd83762f81297f6175a5e0a4771cdadbc1dd5fe72cb1' + }, { + address: "0x9140757f8fb5748379be582be39d6daf704cc3a0408882c0d57981a885eed9", + token: ADDRESSES.starknet.ETH, // ETH Sensei XL + zToken: '0x057146f6409deb4c9fa12866915dd952aa07c1eb2752e451d7f3b042086bdeb8' }] } From c45d611e6cabb2a90799bdab32956a812121873a Mon Sep 17 00:00:00 2001 From: 0xchimz <5950717+0xchimz@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:16:04 +0700 Subject: [PATCH 313/787] Redeploy factory contract (#12267) Co-authored-by: 0xchimz --- projects/rabbitswap-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rabbitswap-v3/index.js b/projects/rabbitswap-v3/index.js index 96c15aa065a3..05d3a89e4dd7 100644 --- a/projects/rabbitswap-v3/index.js +++ b/projects/rabbitswap-v3/index.js @@ -1,5 +1,5 @@ const { uniV3Export } = require('../helper/uniswapV3') module.exports = uniV3Export({ - tomochain: { factory: '0xe615c973e92bDcB584Bf9085c4612E342164e12A', fromBlock: 86210948, isAlgebra: false }, + tomochain: { factory: '0x3A6Ef894d48700cF1834FA8D0AF601fA295a87B2', fromBlock: 86778024, isAlgebra: false }, }) From 0af8df34ce8f6289b38497d53f4ae0ea671894a2 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 13 Nov 2024 10:45:47 +0000 Subject: [PATCH 314/787] add tokens reya (#12270) --- projects/reya-perp/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/reya-perp/index.js b/projects/reya-perp/index.js index 88906971ed3d..1b13c74456a4 100644 --- a/projects/reya-perp/index.js +++ b/projects/reya-perp/index.js @@ -2,5 +2,5 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const ADDRESSES = require('../helper/coreAssets.json') module.exports = { - reya: { tvl: sumTokensExport({ owner: '0xA763B6a5E09378434406C003daE6487FbbDc1a80', tokens: [ADDRESSES.reya.RUSD]})} + reya: { tvl: sumTokensExport({ owner: '0xA763B6a5E09378434406C003daE6487FbbDc1a80', tokens: [ADDRESSES.reya.RUSD, "0x4D3fEB76ab1C7eF40388Cd7a2066edacE1a2237D", "0x809B99df4DDd6fA90F2CF305E2cDC310C6AD3C2c", "0x2339D41f410EA761F346a14c184385d15f7266c4", "0xAAB18B45467eCe5e47F85CA6d3dc4DF2a350fd42", "0x6B48C2e6A32077ec17e8Ba0d98fFc676dfab1A30"]})} } \ No newline at end of file From b71478c7fc0bddcc295e118d05926c7b4b0c962f Mon Sep 17 00:00:00 2001 From: rav <85165079+rav-ipor@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:13:34 +0100 Subject: [PATCH 315/787] Add Base to IPOR Protocol and IPOR Fusion (#12269) Co-authored-by: adam Co-authored-by: kris-ipor <98769272+kris-ipor@users.noreply.github.com> --- projects/helper/coreAssets.json | 3 ++- projects/ipor-fusion/index.js | 1 + projects/ipor/index.js | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index a87d0f20647e..53cbb8cbe7d9 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1493,7 +1493,8 @@ "USDC": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "DAI": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb", "USDT": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2", - "rETH": "0xb6fe221fe9eef5aba221c348ba20a1bf5e73624c" + "rETH": "0xb6fe221fe9eef5aba221c348ba20a1bf5e73624c", + "wstETH": "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452" }, "sei": { "SEI": "usei", diff --git a/projects/ipor-fusion/index.js b/projects/ipor-fusion/index.js index 2f43974e9837..edef674d2cf9 100644 --- a/projects/ipor-fusion/index.js +++ b/projects/ipor-fusion/index.js @@ -12,4 +12,5 @@ module.exports = { methodology: `Counts the tokens deposited into IPOR Fusion Vaults.`, ethereum: { tvl }, arbitrum: { tvl }, + base: { tvl }, }; diff --git a/projects/ipor/index.js b/projects/ipor/index.js index dbdfb7cc8a6e..e52807e4721b 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -39,6 +39,31 @@ async function tvlArbitrum(api) { return api.getBalances(); } +async function tvlBase(api) { + const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); + + const assets = [ + ADDRESSES.base.USDC, // USDC + ] + + const res = await api.multiCall({ abi: abi.getBalancesForOpenSwap, calls: assets, target: addresses.base.IporProtocolRouter }) + const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: assets }) + + res.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, vault }, i) => { + const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool + const decimal = 18 - decimals[i] + api.add(assets[i], balance / (10 ** decimal)) + }); + + for (const pool of addresses.base.pools) { + if (assets.includes(pool.asset)) { + continue; + } + await api.sumTokens({owner: pool.AmmTreasury, tokens: [pool.asset]}); + } + return api.getBalances(); +} + async function calculateTvlForV2(api) { const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL) @@ -94,6 +119,9 @@ module.exports = { arbitrum: { tvl: tvlArbitrum }, + base: { + tvl: tvlBase + }, hallmarks:[ [1674648000, "Liquidity Mining Start"] ], From 3e30708bca6c91c8f54b7b723066fa361f9db6f7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:13:59 +0100 Subject: [PATCH 316/787] minor fix --- projects/ipor/index.js | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/projects/ipor/index.js b/projects/ipor/index.js index e52807e4721b..205d49c2d5ee 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -54,14 +54,8 @@ async function tvlBase(api) { const decimal = 18 - decimals[i] api.add(assets[i], balance / (10 ** decimal)) }); - - for (const pool of addresses.base.pools) { - if (assets.includes(pool.asset)) { - continue; - } - await api.sumTokens({owner: pool.AmmTreasury, tokens: [pool.asset]}); - } - return api.getBalances(); + const tokensAndOwners = addresses.base.pools.map(pool => [pool.asset, pool.AmmTreasury]); + return api.sumTokens({ tokensAndOwners, blacklistedTokens: assets }); } async function calculateTvlForV2(api) { @@ -81,15 +75,8 @@ async function calculateTvlForV2(api) { const decimal = 18 - decimals[i] api.add(assets[i], balance / (10 ** decimal)) }); - - for (const pool of addresses.ethereum.pools) { - if (assets.includes(pool.asset)) { - continue; - } - await api.sumTokens({owner: pool.AmmTreasury, tokens: [pool.asset]}); - } - - return api.getBalances(); + const tokensAndOwners = addresses.ethereum.pools.map(pool => [pool.asset, pool.AmmTreasury]); + return api.sumTokens({ tokensAndOwners, blacklistedTokens: assets }); } async function calculateTvlForV1(api) { From 8ca45ca4ba45c21747c4160eaa4b463a28a7e28d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 12:46:21 +0100 Subject: [PATCH 317/787] zircuit #12241 --- projects/zircuit/index.js | 84 ++++++++++----------------------------- 1 file changed, 20 insertions(+), 64 deletions(-) diff --git a/projects/zircuit/index.js b/projects/zircuit/index.js index 7aa750582cf6..8f06809941bf 100644 --- a/projects/zircuit/index.js +++ b/projects/zircuit/index.js @@ -1,67 +1,23 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokensExport } = require("../helper/unwrapLPs"); +const { getLogs2 } = require('../helper/cache/getLogs'); +const { sumTokens2 } = require('../helper/unwrapLPs'); -const ZIRCUIT_STAKING_CONTRACT_ETHEREUM = '0xf047ab4c75cebf0eb9ed34ae2c186f3611aeafa6'; -const ZIRCUIT_STAKING_CONTRACT_ZIRCUIT = '0x7d8311839eB44Dd5194abd2dd3998722455A24E0'; +const config = { + ethereum: { + factory: '0xf047ab4c75cebf0eb9ed34ae2c186f3611aeafa6', fromBlock: 19237243, missing: [ + '0xa1290d69c65a6fe4df752f95823fae25cb99e5a7', + '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110', + ] + }, + zircuit: { factory: '0x7d8311839eB44Dd5194abd2dd3998722455A24E0', fromBlock: 2427557, }, +} -const TOKEN_CONTRACTS_ETHEREUM = [ - '0xa1290d69c65a6fe4df752f95823fae25cb99e5a7', // rsETH - '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110', // ezETH - '0x8c1BEd5b9a0928467c9B1341Da1D7BD5e10b6549', // lsETH - ADDRESSES.ethereum.WETH, // ETH - '0xFAe103DC9cf190eD75350761e95403b7b8aFa6c0', // rswETH - '0x49446A0874197839D15395B908328a74ccc96Bc0', // mstETH - '0xE46a5E19B19711332e33F33c2DB3eA143e86Bc10', // mwBETH - '0x32bd822d615A3658A68b6fDD30c2fcb2C996D678', // mswETH - ADDRESSES.ethereum.WSTETH, // wstETH - '0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee', // weETH - '0xf951E335afb289353dc249e82926178EaC7DEd78', // swETH - ADDRESSES.ethereum.USDe, // USDe - ADDRESSES.ethereum.STONE, // cSTONE - '0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa', // mETH - '0xD9A442856C234a39a81a089C06451EBAa4306a72', // pufETH - '0x18f313Fc6Afc9b5FD6f0908c1b3D476E3feA1DD9', // egETH - '0x5fD13359Ba15A84B76f7F87568309040176167cd', // amphrETH - '0x7a4EffD87C2f3C55CA251080b1343b605f327E3a', // rstETH - '0xBEEF69Ac7870777598A04B2bd4771c71212E6aBc', // steakLRT - '0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a', // Re7LRT - '0x8c9532a60E0E7C6BbD2B2c1303F63aCE1c3E9811', // pzETH - '0xF469fBD2abcd6B9de8E169d128226C0Fc90a012e', // pumpBTC - '0x917ceE801a67f933F2e6b33fC0cD1ED2d5909D88', // weETHs - '0xC96dE26018A54D51c097160568752c4E3BD6C364', // FBTC - '0x8236a87084f8b84306f72007f36f2618a5634494', // LBTC - ADDRESSES.ethereum.FDUSD // FDUSD -]; - -const TOKEN_CONTRACTS_ZIRCUIT = [ - ADDRESSES.optimism.WETH_1, // wETH - '0x91a0F6EBdCa0B4945FbF63ED4a95189d2b57163D', // mETH - '0xD8b29106d4ceBad087C30B10c0E41BAa3A9ea703', // rswETH - '0x850CDF416668210ED0c36bfFF5d21921C7adA3b8', // swETH - '0xF469fBD2abcd6B9de8E169d128226C0Fc90a012e', // pumpBTC - '0x9cb41CD74D01ae4b4f640EC40f7A60cA1bCF83E7', // pzETH - ADDRESSES.scroll.STONE, // STONE - ADDRESSES.arbitrum.USDe, // USDe - '0xF97c7A9bECe498FD6e31e344643589aACC96206A', // LsETH - '0x4186BFC76E2E237523CBC30FD220FE055156b41F', // rsETH - '0xf0e673Bc224A8Ca3ff67a61605814666b1234833', // wstETH - ADDRESSES.optimism.ezETH, // ezETH - '0x3535DF6e1d776631D0cBA53FE9efD34bCbDcEeD4', // weETH - '0x4b03831043082E3e5191218ad5331E99AaaC4A81', // weETHs - '0x5661cE45EE081CbE1f81BF23E46f4E01E11795D4' // FBTC -]; - -module.exports = { - ethereum: { - tvl: sumTokensExport({ - owner: ZIRCUIT_STAKING_CONTRACT_ETHEREUM, - tokens: TOKEN_CONTRACTS_ETHEREUM, - }), - }, - zircuit: { - tvl: sumTokensExport({ - owner: ZIRCUIT_STAKING_CONTRACT_ZIRCUIT, - tokens: TOKEN_CONTRACTS_ZIRCUIT, - }), +Object.keys(config).forEach(chain => { + const { factory, fromBlock, missing = [] } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: 'event TokenStakabilityChanged(address token, bool enabled)', fromBlock, }) + const tokens = logs.map(i => i.token).concat(missing) + return sumTokens2({ api, owner: factory, tokens, permitFailure: true, }) } -}; \ No newline at end of file + } +}) \ No newline at end of file From e75ba91042ba83d2d992037c5bc0db61b0bda392 Mon Sep 17 00:00:00 2001 From: imfeng Date: Wed, 13 Nov 2024 19:37:47 +0700 Subject: [PATCH 318/787] =?UTF-8?q?Updated=20TVL=20For=20Satoshi=20Protoco?= =?UTF-8?q?l=20on=20B=C2=B2=20Network=20chain=20(#12271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projects/satoshi-protocol/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/satoshi-protocol/index.js b/projects/satoshi-protocol/index.js index 9bc433835228..1206ea125caa 100644 --- a/projects/satoshi-protocol/index.js +++ b/projects/satoshi-protocol/index.js @@ -73,4 +73,10 @@ module.exports = { fromBlock: 4614620, } }), + bsquared: createExports({ + troveList: [ + '0xa79241206c3008bE4EB4B62A48A4F98303060D4f', // BSquare WBTC Collateral + '0xc6F361db5eC432E95D0A08A9Fbe0d7412971cE6c', // BSquare uBTC Collateral + ], + }), } From a5fc825877b4b2ccbe984daec0d8750c1cdf9158 Mon Sep 17 00:00:00 2001 From: ftm1337 <84405345+ftm1337@users.noreply.github.com> Date: Wed, 13 Nov 2024 07:38:04 -0500 Subject: [PATCH 319/787] Add E.L.M.A. on Fantom (#12254) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/elma/index.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 projects/elma/index.js diff --git a/projects/elma/index.js b/projects/elma/index.js new file mode 100644 index 000000000000..4f1ce27e1de2 --- /dev/null +++ b/projects/elma/index.js @@ -0,0 +1,24 @@ +module.exports = { + methodology: "Principal Tokens (PT) are always 1:1 mintable & redeemable with Underlying Tokens (UT). TVL is Total Market Cap of all PT, where 1 PT = 1 UT.", +} + +const config = { + fantom: { markets: [ + '0x0a558d43bccbc7586547fc74e3a0e70467215b3c', + '0x35402cDc3BCFFb904116bDC720Afc75c2921De08', + '0xB6633c351a3aF289ed6bbF4A78c682FA16656B1E', + '0xFaa22e721924fa57d042F6E2c793997aA9287B27', + ]} +} + +Object.keys(config).forEach(chain => { + const {markets,} = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const tokens = await api.multiCall({ abi: 'address:BASE', calls: markets}) + const wTokens = await api.multiCall({ abi: 'address:WRAP', calls: markets}) + const supplies = await api.multiCall({ abi: 'erc20:totalSupply', calls: wTokens}) + api.add(tokens, supplies) + } + } +}) \ No newline at end of file From 085385eeef3dbb28659707976ec1e95d1b715eca Mon Sep 17 00:00:00 2001 From: Orex <122088118+adrena-orex@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:57:58 +0400 Subject: [PATCH 320/787] Add Adrena Adapter (#12266) --- projects/adrena/index.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 projects/adrena/index.js diff --git a/projects/adrena/index.js b/projects/adrena/index.js new file mode 100644 index 000000000000..510b18bf1d11 --- /dev/null +++ b/projects/adrena/index.js @@ -0,0 +1,35 @@ +const { sumTokens2, getConnection } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js") +const { decodeAccount } = require('../helper/utils/solana/layout') +const ADDRESSES = require('../helper/coreAssets.json') + +async function staking() { + return sumTokens2({ tokenAccounts: ['9nD5AenzdbhRqWo7JufdNBbC4VjZ5QH7jzLuvPZy2rhb']}) +} + +async function tvl(api) { + const connection = getConnection("solana"); + + await sumTokens2({ + owner: '4o3qAErcapJ6gRLh1m1x4saoLLieWDu7Rx3wpwLc7Zk9', + balances: api.getBalances(), + blacklistedTokens: [ + 'AuQaustGiaqxRvj2gtCdrd22PBzTn8kM3kEPEkZCtuDw', // ADX + '4yCLi5yWGzpTWMQ1iWHG5CrGYAdBkhyEdsuSugjDUqwj', // ALP + ], + }); + + const rewards = await connection.getAccountInfo(new PublicKey('5GAFPnocJ4GUDJJxtExBDsH5wXzJd3RYzG8goGGCneJi')); + + // Remove rewards from AUM + api.add(ADDRESSES.solana.USDC, +decodeAccount('tokenAccount', rewards).amount.toString() * -1) +} + +module.exports = { + timetravel: false, + methodology: "TVL counts tokens deposited in the Liquidity Pool.", + solana: { + tvl, + staking, + }, +}; From af36d3d44d86f65e9fa82a225762d74383ce0472 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Wed, 13 Nov 2024 19:21:05 +0000 Subject: [PATCH 321/787] fix --- projects/marinade.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/marinade.js b/projects/marinade.js index 82d33f65dc48..3e14878caf95 100644 --- a/projects/marinade.js +++ b/projects/marinade.js @@ -1,5 +1,6 @@ const { getProvider, sumTokens2, } = require("./helper/solana") const { Program, } = require("@project-serum/anchor"); +const ADDRESSES = require('./helper/coreAssets.json') async function tvl() { const provider = getProvider() @@ -15,7 +16,7 @@ async function tvl() { },] = await program.account.state.all() const balances = { - solana: (+totalActiveBalance + +availableReserveBalance + +emergencyCoolingDown) / 1e9 + [ADDRESSES.solana.SOL]: +totalActiveBalance + +availableReserveBalance + +emergencyCoolingDown } return sumTokens2({ balances, solOwners: ['UefNb6z6yvArqe4cJHTXCqStRsKmWhGxnZzuHbikP5Q'] }) // Liq Pool Sol Leg Pda From 2c8f55f60625315cedeb43e07add0e264119194a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:33:21 +0100 Subject: [PATCH 322/787] fix solana sumTokens bug --- projects/helper/solana.js | 21 +++++++++++++++------ projects/marinade.js | 12 ++++++------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 29f7b404e078..872c05708d4e 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -184,7 +184,7 @@ function getEndpoint(chain) { async function sumTokens2({ api, - balances = {}, + balances, tokensAndOwners = [], tokens = [], owners = [], @@ -196,7 +196,13 @@ async function sumTokens2({ computeTokenAccount = false, chain = 'solana', }) { + if (api) chain = api.chain + if (!balances) { + if (api) balances = api.getBalances() + else balances = {} + } + const endpoint = getEndpoint(chain) blacklistedTokens.push(...blacklistedTokens_default) if (!tokensAndOwners.length) { @@ -206,12 +212,15 @@ async function sumTokens2({ if (!tokensAndOwners.length) { const _owners = getUniqueAddresses([...owners, owner].filter(i => i), 'solana') - const data = await getOwnerAllAccounts(_owners) - for (const item of data) { - if (blacklistedTokens.includes(item.mint) || +item.amount < 1e6) continue; - sdk.util.sumSingleBalance(balances, chain + ':' + item.mint, item.amount) + if (_owners.length) { + const data = await getOwnerAllAccounts(_owners) + const tokenBalances = {} + for (const item of data) { + if (blacklistedTokens.includes(item.mint) || +item.amount < 1e6) continue; + sdk.util.sumSingleBalance(tokenBalances,item.mint, item.amount) + } + await transformBalances({ tokenBalances, balances, chain, }) } - await transformBalancesOrig(chain, balances) } tokensAndOwners = tokensAndOwners.filter(([token]) => !blacklistedTokens.includes(token)) diff --git a/projects/marinade.js b/projects/marinade.js index 3e14878caf95..21e776536f2a 100644 --- a/projects/marinade.js +++ b/projects/marinade.js @@ -2,7 +2,7 @@ const { getProvider, sumTokens2, } = require("./helper/solana") const { Program, } = require("@project-serum/anchor"); const ADDRESSES = require('./helper/coreAssets.json') -async function tvl() { +async function tvl(api) { const provider = getProvider() const programId = 'MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD' const idl = await Program.fetchIdl(programId, provider) @@ -14,12 +14,12 @@ async function tvl() { emergencyCoolingDown, }, },] = await program.account.state.all() + + api.add(ADDRESSES.solana.SOL, totalActiveBalance) + api.add(ADDRESSES.solana.SOL, availableReserveBalance) + api.add(ADDRESSES.solana.SOL, emergencyCoolingDown) - const balances = { - [ADDRESSES.solana.SOL]: +totalActiveBalance + +availableReserveBalance + +emergencyCoolingDown - } - - return sumTokens2({ balances, solOwners: ['UefNb6z6yvArqe4cJHTXCqStRsKmWhGxnZzuHbikP5Q'] }) // Liq Pool Sol Leg Pda + return sumTokens2({ api, solOwners: ['UefNb6z6yvArqe4cJHTXCqStRsKmWhGxnZzuHbikP5Q'] }) // Liq Pool Sol Leg Pda } module.exports = { From 24aa534026ac83e0e117543f4e1667c911e1d1f5 Mon Sep 17 00:00:00 2001 From: Flo Date: Wed, 13 Nov 2024 23:05:50 +0100 Subject: [PATCH 323/787] update index.js of OpenDelta TVL adapter (#12273) --- projects/opendelta/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/opendelta/index.js b/projects/opendelta/index.js index e842ad9913b7..e721a8efa445 100644 --- a/projects/opendelta/index.js +++ b/projects/opendelta/index.js @@ -18,11 +18,11 @@ async function tvl(api) { const timeElapsedSinceLastUpdate = currentTimestamp - lastUpdateTimestamp const interestRate = currentRate / 1e4 const interestRatePre = preUpdateAverageRate / 1e4 - const ONE_YEAR = 365 * 24 * 60 * 60 - const interestAccruedCurrent = interestRate * timeElapsedSinceLastUpdate / ONE_YEAR - const interestAccruedPre = interestRatePre * timeElapsed / ONE_YEAR + const ONE_YEAR = 365.24 * 24 * 60 * 60 + const interestAccruedCurrent = Math.exp(interestRate * timeElapsedSinceLastUpdate / ONE_YEAR) + const interestAccruedPre = Math.exp(interestRatePre * timeElapsed / ONE_YEAR) - const computedSupply = supply * (1 + interestAccruedCurrent + interestAccruedPre) + const computedSupply = supply * (interestAccruedCurrent * interestAccruedPre) return computedSupply / Math.pow(10, decimals) } @@ -31,7 +31,7 @@ async function tvl(api) { module.exports = { timetravel: false, misrepresentedTokens: true, - methodology: "TVL is calculated by multiplying OPB token supply by the current USD value of 1.0 OPB. Initially worth $1.0, 1.0 OPB now reflects its increased value from accrued interest, derived via amountToUiAmount using the Interest Bearing extension.", + methodology: "TVL is calculated by multiplying the OPB token supply by the current USD value of 1.0 OPB. Initially worth $1.0, 1.0 OPB now reflects its increased value from accrued interest, derived using amountToUiAmount approach of Solana Token2022 Interest Bearing extension.", solana: { tvl, }, From f3d032e04b6c39c8aac2005ac037088ce8a39156 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 14 Nov 2024 03:40:10 +0000 Subject: [PATCH 324/787] exclude pozo --- projects/sailing-portfolios/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/sailing-portfolios/index.js b/projects/sailing-portfolios/index.js index 40fab41fd1a4..c07de05ebb17 100644 --- a/projects/sailing-portfolios/index.js +++ b/projects/sailing-portfolios/index.js @@ -10,7 +10,7 @@ async function tvl(api) { }) const tokens = await api.multiCall({ abi: 'address[]:getPortfolioAssets', calls: portfolios}) const ownerTokens = portfolios.map((portfolio, i) => [tokens[i], portfolio]) - return api.sumTokens({ ownerTokens, blacklistedTokens: ['0x47a663C082926d0d913cAcB89240c3f4bc409a88'] }) + return api.sumTokens({ ownerTokens, blacklistedTokens: ['0x47a663C082926d0d913cAcB89240c3f4bc409a88','0x2d519b9308aeb0c57921030dd5de4e88c44cec7c'] }) } module.exports = { From d714c1916e6dd06832dab0f8ca21cbc020d9d8af Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Nov 2024 05:45:19 +0100 Subject: [PATCH 325/787] mark as dead --- projects/amun/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/amun/index.js b/projects/amun/index.js index ed95afa5c108..8268809ca30f 100644 --- a/projects/amun/index.js +++ b/projects/amun/index.js @@ -5,6 +5,7 @@ async function tvl(api) { } module.exports = { + deadFrom: '2023-03-22', timetravel: false, ethereum: { tvl: () => ({}), }, polygon: { tvl: () => ({}), }, From 09af79589bc8765a9e00561ea69fe07e21b2246a Mon Sep 17 00:00:00 2001 From: Rahul Sethuram Date: Thu, 14 Nov 2024 09:14:43 +0400 Subject: [PATCH 326/787] feat: add lisk (#12284) --- projects/ionic/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/ionic/index.js b/projects/ionic/index.js index a68ce8b0abad..a7c095deb88c 100644 --- a/projects/ionic/index.js +++ b/projects/ionic/index.js @@ -14,4 +14,6 @@ module.exports = mergeExports([{ fraxtal: compoundExports2({ comptroller: '0xB5141403e811fFFE02f4d49Ea8d4a7B0b9590658' }) }, { optimism: compoundExports2({ comptroller: '0xaFB4A254D125B0395610fdc8f1D022936c7b166B' }) + }, { + lisk: compoundExports2({ comptroller: '0xF448A36feFb223B8E46e36FF12091baBa97bdF60' }) }]) \ No newline at end of file From 89de0b87324f0dff9aa93a4f78c7aae981168fe7 Mon Sep 17 00:00:00 2001 From: Aleksei Lushnikov Date: Thu, 14 Nov 2024 06:19:25 +0000 Subject: [PATCH 327/787] symbiosis adds cronos zkevm chain (#12274) --- projects/helper/coreAssets.json | 3 ++- projects/symbiosis-finance/config.js | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 53cbb8cbe7d9..ae35fee3e4c4 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1938,7 +1938,8 @@ }, "cronos_zkevm": { "wzkCRO": "0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d", - "ETH": "0x898b3560affd6d955b1574d87ee09e46669c60ea" + "ETH": "0x898b3560affd6d955b1574d87ee09e46669c60ea", + "USDC": "0xaa5b845f8c9c047779bedf64829601d8b264076c" }, "neox": { "WGAS": "0x008cd7f573998cb841a5d82a857ed1f0ce03a653", diff --git a/projects/symbiosis-finance/config.js b/projects/symbiosis-finance/config.js index 359463091390..68ec85e76d6d 100644 --- a/projects/symbiosis-finance/config.js +++ b/projects/symbiosis-finance/config.js @@ -43,6 +43,9 @@ const TOKENS = { }, bsquared: { WBTC: ADDRESSES.bsquared.WBTC, + }, + cronos_zkevm: { + USDC: ADDRESSES.cronos_zkevm.USDC, } } @@ -440,5 +443,14 @@ module.exports = { '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 ] }, + { + name: 'cronos_zkevm', + tokens: [ + TOKENS.cronos_zkevm.USDC, + ], + holders: [ + '0x2E818E50b913457015E1277B43E469b63AC5D3d7', // portal v2 + ] + }, ] } \ No newline at end of file From 0657808b80e142850742975a8fdec92c392dd08f Mon Sep 17 00:00:00 2001 From: 0xchimz <5950717+0xchimz@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:28:31 +0700 Subject: [PATCH 328/787] Update Rabbit Factory Contract (#12287) Co-authored-by: 0xchimz --- projects/rabbitswap-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/rabbitswap-v3/index.js b/projects/rabbitswap-v3/index.js index 05d3a89e4dd7..33614fd56ba3 100644 --- a/projects/rabbitswap-v3/index.js +++ b/projects/rabbitswap-v3/index.js @@ -1,5 +1,5 @@ const { uniV3Export } = require('../helper/uniswapV3') module.exports = uniV3Export({ - tomochain: { factory: '0x3A6Ef894d48700cF1834FA8D0AF601fA295a87B2', fromBlock: 86778024, isAlgebra: false }, + tomochain: { factory: '0x1F09b50e8cbAed8A157fEe28716d13AfE36A77E7', fromBlock: 86787787, isAlgebra: false }, }) From 98cba76da120c98159fc73b298a02b8d593869aa Mon Sep 17 00:00:00 2001 From: "Luren L." Date: Thu, 14 Nov 2024 02:28:42 -0500 Subject: [PATCH 329/787] Update navi new listings (#12286) --- projects/navi/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/navi/index.js b/projects/navi/index.js index 28a92dffd476..d4f0bd2ca3f8 100644 --- a/projects/navi/index.js +++ b/projects/navi/index.js @@ -11,6 +11,8 @@ const decimalShift = { ['0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH']: -1, // native ETH ['0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY']: -3, // USDY ['0xf16e6b723f242ec745dfd7634ad072c42d5c1d9ac9d62a39c381303eaa57693a::fdusd::FDUSD']: -3, // FDUSD + ['0x5145494a5f5100e645e4b0aa950fa6b68f614e8c59e17bc5ded3495123a79178::ns::NS']: -3, // NS + ['0x5f496ed5d9d045c5b788dc1bb85f54100f2ede11e46f6a232c29daada4c5bdb6::coin::COIN']: -1, //stBTC } const storageId = "0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe" From 0f08dc02540e5cae29d9b8454301a092a51077bb Mon Sep 17 00:00:00 2001 From: LpcAries <101619245+LpcAries@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:28:56 +0800 Subject: [PATCH 330/787] [izumi] add iotex config (#12285) --- projects/izumi-iziswap/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/izumi-iziswap/index.js b/projects/izumi-iziswap/index.js index 4e30464f957a..bb866ab41271 100644 --- a/projects/izumi-iziswap/index.js +++ b/projects/izumi-iziswap/index.js @@ -36,6 +36,7 @@ const poolHelpers = { 'taiko': ['0x33531bDBFE34fa6Fd5963D0423f7699775AacaaF'], 'core': ['0x19b683A2F45012318d9B2aE1280d68d3eC54D663'], 'gravity': ['0x19b683A2F45012318d9B2aE1280d68d3eC54D663'], + 'iotex': ['0x19b683A2F45012318d9B2aE1280d68d3eC54D663'], } // iziswap liquidityManager contracts const blacklistedTokens = [ From 85838801ebc4955335e3bbc544aa5fe485f73100 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Nov 2024 09:25:42 +0100 Subject: [PATCH 331/787] update sdk version --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f1eed9d6e60b..9bd007ac9fce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1009,9 +1009,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.96", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.96.tgz", - "integrity": "sha512-xaQUecL8V2fWT1Z6LEg/3iV3DCsW32VItRZ5oRqeDzvyeYnFS22GntkJiyxBRMFdCKHRpr1zNAn+IKOKGfpHUg==", + "version": "5.0.98", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.98.tgz", + "integrity": "sha512-HeXnoPDKDqH2qmag5j+EnRxPr5N/Pog+R6XEOE1L2+x53UwjjVEmCnVzdTYOMqL2fIfiM2Ba+ByShxJ88gKxlg==", "license": "ISC", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", From 3f73757731e1dfaafc6a1b8d69d2121598d347e6 Mon Sep 17 00:00:00 2001 From: Josh <165199008+basedjosh@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:18:41 +0300 Subject: [PATCH 332/787] add based AI adapter (#12290) Co-authored-by: basedjosh --- projects/basedai/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/basedai/index.js diff --git a/projects/basedai/index.js b/projects/basedai/index.js new file mode 100644 index 000000000000..fbdcdbf57a34 --- /dev/null +++ b/projects/basedai/index.js @@ -0,0 +1,12 @@ +const { staking } = require('../helper/staking'); + +module.exports = { + ethereum: { + tvl: () => ({}), + staking: staking( + "0xa6b816010ab51e088c4f19c71aba87e54b422e14", + "0xA9E8aCf069C58aEc8825542845Fd754e41a9489A" + ) + }, + methodology: "Currently, the TVL is considered as the amount of Pepecoin tokens held in the farming contract at '0xa6b816010ab51e088c4f19c71aba87e54b422e14'." +}; From b326a3a228c357cd328e4b1e1b606c9c0d2a706e Mon Sep 17 00:00:00 2001 From: Siddhi Date: Thu, 14 Nov 2024 17:22:18 +0700 Subject: [PATCH 333/787] Fix predict.fun TVL calculation (#12291) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/predict-fun/index.js | 63 ++++++----------------------------- 1 file changed, 10 insertions(+), 53 deletions(-) diff --git a/projects/predict-fun/index.js b/projects/predict-fun/index.js index 4568154ef3f6..a4d1d1f4d8d3 100644 --- a/projects/predict-fun/index.js +++ b/projects/predict-fun/index.js @@ -1,55 +1,12 @@ -const { graphQuery } = require('../helper/http') const ADDRESSES = require('../helper/coreAssets.json') - -const config = { - blast: 'https://graphql.predict.fun/graphql' -} - - -const query = (after) => `query { - categories (pagination: { - first: 100 - ${after ? `after: "${after}"` : ''} - }) { - totalCount - pageInfo { - hasNextPage - startCursor - endCursor - } - edges { - node { - id - slug - title - statistics { - liquidityValueUsd - volume24hUsd - volumeTotalUsd - } - } - } - } +const { sumTokensExport } = require('../helper/unwrapLPs'); + +module.exports = { + blast: { + tvl: sumTokensExport({ owners: [ + '0xE1A2E68C401378050fdba9704FA8BCb1f72b98f4', + '0x8F9C9f888A4268Ab0E2DDa03A291769479bAc285' + ], tokens: [ADDRESSES.blast.USDB]}) + }, + methodology: `TVL is the total quantity of USDB held in the conditional tokens contract as well as USDB collateral submitted to every predict.fun market ever opened - once the markets resolve, participants are able to withdraw their share given the redemption rate and their input stake.` } -` - -Object.keys(config).forEach(chain => { - const endpoint = config[chain] - module.exports[chain] = { - tvl: async (api) => { - const categories = [] - let after = null - do { - const data = await graphQuery(endpoint, query(after)) - categories.push(...data.categories.edges) - if (data.categories.pageInfo.hasNextPage) { - after = data.pageInfo.endCursor - } - } while (after) - const usd = categories.reduce((tvl, category) => tvl + category.node.statistics.liquidityValueUsd, 0) - api.add(ADDRESSES.blast.USDB, usd * 1e18) - } - } -}) - -module.exports.timetravel = false \ No newline at end of file From b35027af3ac360d3a43de7e1ff1e7e17c11b3999 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Nov 2024 13:11:24 +0100 Subject: [PATCH 334/787] Bob (#12294) Co-authored-by: Brendon Votteler --- projects/bob-gateway/index.js | 6 +++++- projects/helper/coreAssets.json | 8 +++++++- projects/helper/tokenMapping.js | 6 +++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/projects/bob-gateway/index.js b/projects/bob-gateway/index.js index 7eb9c1876107..954e389fcd34 100644 --- a/projects/bob-gateway/index.js +++ b/projects/bob-gateway/index.js @@ -30,10 +30,14 @@ module.exports = { return sumTokens2({ api, - chain: "bob", tokens: [ ADDRESSES.bob.WBTC, ADDRESSES.bob.TBTC, + ADDRESSES.bob.SolvBTC, + ADDRESSES.bob.SolvBTC_BBN, + ADDRESSES.bob.FBTC, + ADDRESSES.bob.uniBTC, + ADDRESSES.bob.pumpBTC, ], owners: gateways, }); diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index ae35fee3e4c4..f8ae15caef78 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1844,7 +1844,13 @@ "STETH": "0x85008aE6198BC91aC0735CB5497CF125ddAAc528", "STONE": "0x96147a9ae9a42d7da551fd2322ca15b71032f342", "RETH": "0xb5686c4f60904ec2bda6277d6fe1f7caa8d1b41a", - "TBTC": "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2" + "TBTC": "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2", + "SolvBTC": "0x541fd749419ca806a8bc7da8ac23d346f2df8b77", + "SolvBTC_BBN": "0xCC0966D8418d412c599A6421b760a847eB169A8c", + "FBTC": "0xc96de26018a54d51c097160568752c4e3bd6c364", + "satUSD": "0x78Fea795cBFcC5fFD6Fb5B845a4f53d25C283bDB", + "uniBTC": "0x236f8c0a61dA474dB21B693fB2ea7AAB0c803894", + "pumpBTC": "0x1fcca65fb6ae3b2758b9b2b394cb227eae404e1e" }, "btr": { "ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 2ee5d86cc624..38455e084b9c 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -79,9 +79,9 @@ const fixBalancesTokens = { '0xac485391eb2d7d88253a7f1ef18c37f4242d1a24': { coingeckoId: 'lisk', decimals: 18 }, }, bob: { - "0x541fd749419ca806a8bc7da8ac23d346f2df8b77": { coingeckoId: "solv-btc", decimals: 18 }, - "0xcc0966d8418d412c599a6421b760a847eb169a8c": { coingeckoId: "solv-btc", decimals: 18 }, - "0x236f8c0a61da474db21b693fb2ea7aab0c803894": { coingeckoId: "universal-btc", decimals: 8 }, + [ADDRESSES.bob.SolvBTC]: { coingeckoId: "solv-btc", decimals: 18 }, + [ADDRESSES.bob.SolvBTC_BBN]: { coingeckoId: "solv-protocol-solvbtc-bbn", decimals: 18 }, + [ADDRESSES.bob.uniBTC]: { coingeckoId: "universal-btc", decimals: 8 } }, flow: { '0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e': { coingeckoId: 'flow', decimals: 18 }, From b5b6355bbe7cece19b7388ad3d32a673174a5f42 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:02:34 +0100 Subject: [PATCH 335/787] fix: Kyber elastic (#12295) --- projects/kyber/index.js | 65 +++++++++++++---------------------------- 1 file changed, 21 insertions(+), 44 deletions(-) diff --git a/projects/kyber/index.js b/projects/kyber/index.js index 069bb63b2092..57595dea3d46 100644 --- a/projects/kyber/index.js +++ b/projects/kyber/index.js @@ -2,40 +2,18 @@ const sdk = require("@defillama/sdk") const { cachedGraphQuery } = require("../helper/cache"); const { sumTokens2 } = require('../helper/unwrapLPs') -const chains = { - ethereum: { - graphId: "mainnet", - }, - arbitrum: { - graphId: "arbitrum-one", - }, - polygon: { - graphId: "matic", - }, - avax: { - graphId: "avalanche", - }, - bsc: { - graphId: "bsc", - }, - fantom: { - graphId: "fantom", - }, - cronos: { - graphId: "cronos", - }, - optimism: { - graphId: "optimism", - }, - linea: { - graphId: 'linea' - }, - base: { - graphId: 'base' - }, - scroll: { - graphId: 'scroll' - } +const CONFIG = { + ethereum: { graphId: "mainnet" }, + arbitrum: { graphId: "arbitrum-one", blacklistedTokens: ['0x0df5dfd95966753f01cb80e76dc20ea958238c46'] }, // rWETH + polygon: { graphId: "matic" }, + avax: { graphId: "avalanche" }, + bsc: { graphId: "bsc" }, + fantom: { graphId: "fantom" }, + cronos: { graphId: "cronos" }, + optimism: { graphId: "optimism" }, + linea: { graphId: 'linea' }, + base: { graphId: 'base' }, + scroll: { graphId: 'scroll' } }; async function fetchPools(chain) { @@ -76,12 +54,11 @@ async function fetchPools(chain) { return toa; } -function elastic(chain) { +function elastic(graphId, blacklistedTokens = []) { return async (api) => { - if (!("graphId" in chains[chain])) return {}; - - const pools = await fetchPools(chains[chain].graphId); - return sumTokens2({ api, tokensAndOwners: pools }) + if (!graphId) return + const pools = await fetchPools(graphId); + return sumTokens2({ api, tokensAndOwners: pools, blacklistedTokens }) } } @@ -92,10 +69,10 @@ module.exports = { [1700611200,'Protocol exploit'], ], }; -Object.keys(chains).forEach(chain => { - module.exports[chain] = { - tvl: elastic(chain) - }; -}); + +Object.keys(CONFIG).forEach((chain) => { + const { graphId, blacklistedTokens } = CONFIG[chain] + module.exports[chain] = { tvl: elastic(graphId, blacklistedTokens)} +}) module.exports.base.tvl = () => ({}) // setting base to 0 for now as I could not find the graph endpoint \ No newline at end of file From e7089785f50f560e327db73240149908dfee4823 Mon Sep 17 00:00:00 2001 From: Vladislav Sailor <1732750+vladislavpetushkov@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:59:56 +0400 Subject: [PATCH 336/787] add protocol to new network unit0 (#12276) Co-authored-by: Vladislav Petushkov Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 3 +++ projects/swop/index.js | 17 ++++++++--------- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/projects/helper/chains.json b/projects/helper/chains.json index a83cb91ada08..5a2d1b4da0d5 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -329,6 +329,7 @@ "ultra", "ultron", "umee", + "unit0", "vechain", "velas", "venom", diff --git a/projects/helper/env.js b/projects/helper/env.js index 5abcb317a4bc..2c906eb4eb5e 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -27,6 +27,7 @@ const DEFAULTS = { WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", APECHAIN_RPC: "https://rpc.apechain.com", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", + UNIT0_RPC: "https://rpc.unit0.dev", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 38455e084b9c..05e2da1ee949 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -175,6 +175,9 @@ const fixBalancesTokens = { 'BeRUj3h7BqkbdfFU7FBNYbodgf8GCHodzKvF9aVjNNfL': { coingeckoId: 'solana', decimals: 9 }, 'AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE': { coingeckoId: 'usd-coin', decimals: 6 }, '841P4tebEgNux2jaWSjCoi9LhrVr9eHGjLc758Va3RPH': { coingeckoId: 'dogwifcoin', decimals: 6 }, + }, + unit0: { + '0xcf43f7703d9b4e8835f977ef364b4014fa7e856e': { coingeckoId: 'unit0', decimals: 18 }, } } diff --git a/projects/swop/index.js b/projects/swop/index.js index a70e7ddf3285..f73ae827beab 100644 --- a/projects/swop/index.js +++ b/projects/swop/index.js @@ -1,32 +1,31 @@ const { sumTokens, call } = require('../helper/chain/waves'); const { getConfig } = require("../helper/cache"); -// const { get } = require("../helper/http"); -// const { toUSDTBalances } = require("../helper/balances"); - +const { getUniTVL } = require('../helper/unknownTokens') const swopfiBackendEndpoint = "https://backend.swop.fi"; const getSwopFiTVL = async (api) => { - // const poolsStats = await get(`${swopfiBackendEndpoint}/pools`); - // return toUSDTBalances(poolsStats.overall.liquidity); const { pools } = await getConfig('swop', `${swopfiBackendEndpoint}/pools`) - // const owners = pools.map(i => i.id) for (const pool of pools) { await sumTokens({ owners: [pool.id], api, includeWaves: true, blacklistedTokens: ['Ehie5xYpeN8op1Cctc6aGUrqx8jq3jtf1DSjXDbfm7aT'] }) } } - module.exports = { timetravel: false, // Waves blockchain, methodology: "Counts the tokens locked on AMM pools", + misrepresentedTokens: true, + hallmarks: [ + [1730299107, "Unit0 Protocol Lunch"] + ], waves: { tvl: getSwopFiTVL, staking: async () => { - // const stakingStats = await get(`${swopfiBackendEndpoint}/staking`); - // return toUSDTBalances(stakingStats.swop.totalSwopUsdt); const res = await call({ target: '3PLHVWCqA9DJPDbadUofTohnCULLauiDWhS', key: 'total_GSwop_amount' }) return { swop: res / 1e8 } } + }, + unit0: { + tvl: getUniTVL({ factory: '0x944Eb5ac122Ea8c764Fa80e80A7fCA2C9A13Ab0a', useDefaultCoreAssets: true}) } }; From f1eeb1757818957233a70d713893c3e12a59de92 Mon Sep 17 00:00:00 2001 From: 0dd431c8 <83228790+0dd431c8@users.noreply.github.com> Date: Fri, 15 Nov 2024 02:13:42 +0800 Subject: [PATCH 337/787] add elexium (#12288) Co-authored-by: 0dd431c8 <0dd431c8@users.noreply.github.com> Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/ayin/index.js | 50 +++---------------- projects/elexium/index.js | 65 +++++++++++++++++++++++++ projects/helper/chain/alephium.js | 79 +++++++++++++++++++++---------- projects/helper/tokenMapping.js | 10 ++-- 4 files changed, 132 insertions(+), 72 deletions(-) create mode 100644 projects/elexium/index.js diff --git a/projects/ayin/index.js b/projects/ayin/index.js index 375005468d42..e4ef7ac6ecb0 100644 --- a/projects/ayin/index.js +++ b/projects/ayin/index.js @@ -14,30 +14,11 @@ const Addresses = { ayinUsdcPool: '2961aauvprhETv6TXGQRc3zZY4FbLnqKon2a4wK6ABH9q', ayinApadPool: '247rZysrruj8pj2GnFyK2bqB2nU4JsUj7k2idksAp4XMy', usdtUsdcPool: '27C75V9K5o9CkkGTMDQZ3x2eP82xnacraEqTYXA35Xuw5', - usdt: 'zSRgc7goAYUgYsEBYdAzogyyeKv3ne3uvWb3VDtxnaEK', - weth: 'vP6XSUyjmgWCB2B9tD5Rqun56WJqDdExWnfwZVEqzhQb', - ayin: 'vT49PY8ksoUL6NcXiZ1t2wAmC7tTPRfFfER8n3UCLvXy', - wbtc: 'xUTp3RXGJ1fJpCGqsAY6GgyfRQ3WQ1MdcYR1SiwndAbR', - usdc: '22Nb9JajRpAh9A2fWNgoKt867PA6zNyi541rtoraDfKXV', - apad: '27HxXZJBTPjhHXwoF1Ue8sLMcSxYdxefoN2U6d8TKmZsm', - cheng: '27DP28mGQzSrHGZgnRvYQH1VAWYZVVLUjGALazLrtrRJF', - ansd: '2AhEaQiUYtAF6g1vtRQHsPR7xTkMY1PRr3k7QkXuisynF', - alphaga: '26Mirs33zojnVMRkqVDJtMZvVZcbAFVyxGojGw7UtWp2K' } +const alephId = '0000000000000000000000000000000000000000000000000000000000000000' const XAyinAddress = 'zst5zMzizEeFYFis6DNSknY5GCYTpM85D3yXeRLe2ug3' -const TokenIds = { - usdt: alephium.contractIdFromAddress(Addresses.usdt), - weth: alephium.contractIdFromAddress(Addresses.weth), - ayin: alephium.contractIdFromAddress(Addresses.ayin), - wbtc: alephium.contractIdFromAddress(Addresses.wbtc), - usdc: alephium.contractIdFromAddress(Addresses.usdc), - apad: alephium.contractIdFromAddress(Addresses.apad), - cheng: alephium.contractIdFromAddress(Addresses.cheng), - ansd: alephium.contractIdFromAddress(Addresses.ansd) -} - async function ayinTvlForXAyin() { const results = await alephium.contractMultiCall([ { group: 0, address: XAyinAddress, methodIndex: 3 }, @@ -49,35 +30,18 @@ async function ayinTvlForXAyin() { return (Number(totalSupply) / 1e18) * (Number(currentPrice) / 1e18) } -async function tvl() { +async function tvl(api) { const alphTvls = await Promise.all([ Addresses.alphAyinPool, Addresses.alphUsdtPool, Addresses.alphUsdcPool, Addresses.alphWethPool, Addresses.alphApadPool, Addresses.alphChengPool, Addresses.alphAnsdPool, Addresses.alphAlphagaPool ].map(poolAddress => alephium.getAlphBalance(poolAddress))) const alphTvl = alphTvls.reduce((tvl, res) => tvl + Number(res.balance), 0) - const tokensTvls = await Promise.all([ - Addresses.alphAyinPool, Addresses.alphUsdtPool, Addresses.alphWethPool, Addresses.ayinUsdtPool, - Addresses.ayinUsdcPool,Addresses.alphWbtcPool, Addresses.usdtUsdcPool,Addresses.alphApadPool, Addresses.alphChengPool, Addresses.ayinApadPool, Addresses.alphAnsdPool, Addresses.alphAlphagaPool - ].map(poolAddress => alephium.getTokensBalance(poolAddress))) - const tokensTvl = tokensTvls.reduce((res, tokenTvls) => { + api.add(alephId, alphTvl) + const tokensTvls = await Promise.all(Object.values(Addresses).map(poolAddress => alephium.getTokensBalance(poolAddress))) + tokensTvls.forEach((tokenTvls) => { tokenTvls.forEach(tokenTvl => { - if (res[tokenTvl.tokenId] !== undefined) { - res[tokenTvl.tokenId] = Number(res[tokenTvl.tokenId]) + Number(tokenTvl.balance) - } + api.add(tokenTvl.tokenId, tokenTvl.balance) }); - return res - }, { [TokenIds.ayin]: 0, [TokenIds.usdt]: 0, [TokenIds.weth]: 0, [TokenIds.wbtc]: 0, [TokenIds.usdc]: 0, [TokenIds.apad]: 0, [TokenIds.cheng]: 0, [TokenIds.ansd]: 0, [TokenIds.ansd]: 0, [TokenIds.alphaga]: 0 }) - return { - alephium: alphTvl / 1e18, - ayin: tokensTvl[TokenIds.ayin] / 1e18, - weth: tokensTvl[TokenIds.weth] / 1e18, - tether: tokensTvl[TokenIds.usdt] / 1e6, - usdc: tokensTvl[TokenIds.usdc] / 1e6, - bitcoin: tokensTvl[TokenIds.wbtc] / 1e8, - alphpad: tokensTvl[TokenIds.apad] / 1e18, - gigacheng: tokensTvl[TokenIds.cheng] / 1e6, - alephiumdomains: tokensTvl[TokenIds.ansd] / 1e18, - alphaga: tokensTvl[TokenIds.alphaga] / 1e18 - } + }) } async function staking() { diff --git a/projects/elexium/index.js b/projects/elexium/index.js new file mode 100644 index 000000000000..25363aa8de5c --- /dev/null +++ b/projects/elexium/index.js @@ -0,0 +1,65 @@ +const alephium = require("../helper/chain/alephium"); + +const elexiumTokenId = "cad22f7c98f13fe249c25199c61190a9fb4341f8af9b1c17fcff4cd4b2c3d200"; +const alephId = '0000000000000000000000000000000000000000000000000000000000000000' +const veAddress = "23XEjbtTNN2FtcJryavvfMf6VwgVK22uiw5T6N85kjFzX"; +const pairFactoryAddress = "22oTtDJEMjNc9QAdmcZarnEzgkAooJp9gZy7RYBisniR5"; + +async function getAllPools() { + const results = await alephium.contractMultiCall([ + { group: 0, address: pairFactoryAddress, methodIndex: 0 }, + ]); + + const pairsCount = Number(results[0].returns[0].value); + + const poolIds = []; + + for (let i = 0; i < pairsCount; i++) { + const results = await alephium.contractMultiCall([ + { + group: 0, + address: pairFactoryAddress, + methodIndex: 2, + args: [{ value: i, type: "U256" }], + }, + ]); + + const poolId = results[0].returns[0].value; + + poolIds.push(poolId); + } + + return poolIds; +} + +async function addPoolTokens(poolId, api) { + const poolAddress = alephium.addressFromContractId(poolId); + + const tokenBalance = (await alephium.getTokensBalance(poolAddress)).filter( + (t) => t.tokenId !== poolId, + ); + + tokenBalance.forEach(i => api.add(i.tokenId, i.balance)); + + const alphBalance = (await alephium.getAlphBalance(poolAddress)).balance; + api.add(alephId, alphBalance); +} + +async function poolsTvl(api) { + const allPools = await getAllPools() + + for (const pool of allPools) + await addPoolTokens(pool, api); +} + +async function veTVL(api) { + const tokenBalance = (await alephium.getTokensBalance(veAddress)).find((t) => t.tokenId === elexiumTokenId,) ?? { balance: 0 }; + api.add(elexiumTokenId, tokenBalance.balance); +} + +module.exports = { + timetravel: false, + methodology: + "Total value of tokens provided as liquidity on alephium and total amount of locked $EX in voting escrow", + alephium: { tvl: poolsTvl, staking: veTVL }, +}; diff --git a/projects/helper/chain/alephium.js b/projects/helper/chain/alephium.js index 982a05db0e28..d1ff69bdb911 100644 --- a/projects/helper/chain/alephium.js +++ b/projects/helper/chain/alephium.js @@ -1,49 +1,80 @@ -const axios = require("axios") -const basex = require('base-x') +const axios = require("axios"); +const basex = require("base-x"); -const ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' -const bs58 = basex(ALPHABET) +const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; +const bs58 = basex(ALPHABET); -const EXPLORER_API_HOST = 'https://backend-v115.mainnet.alephium.org' -const NODE_API_HOST = 'https://node.mainnet.alephium.org' +const EXPLORER_API_HOST = "https://backend.mainnet.alephium.org"; +const NODE_API_HOST = "https://node.mainnet.alephium.org"; async function getAlphBalance(address) { - return (await axios.get(`${EXPLORER_API_HOST}/addresses/${address}/balance`)).data + return (await axios.get(`${EXPLORER_API_HOST}/addresses/${address}/balance`)) + .data; } async function getTokensBalance(address) { - return (await axios.get(`${EXPLORER_API_HOST}/addresses/${address}/tokens-balance`)).data + return ( + await axios.get(`${EXPLORER_API_HOST}/addresses/${address}/tokens-balance`) + ).data; } async function contractMultiCall(payload) { - const result = (await axios.post(`${NODE_API_HOST}/contracts/multicall-contract`, {calls: payload})).data - return result.results.map((r) => tryGetCallResult(r)) + const result = ( + await axios.post(`${NODE_API_HOST}/contracts/multicall-contract`, { + calls: payload, + }) + ).data; + return result.results.map((r) => tryGetCallResult(r)); } function tryGetCallResult(result) { - if (result.type === 'CallContractFailed') { - throw new Error(`Failed to call contract, error: ${result.error}`) + if (result.type === "CallContractFailed") { + throw new Error(`Failed to call contract, error: ${result.error}`); } - return result + return result; +} + +async function getTokenInfo(tokenId) { + const [metadata] = ( + await axios.post(`${EXPLORER_API_HOST}/tokens/fungible-metadata`, [tokenId]) + ).data; + + return metadata; } function contractIdFromAddress(address) { - const decoded = bs58.decode(address) + const decoded = bs58.decode(address); - if (decoded.length == 0) throw new Error('Address string is empty') - const addressType = decoded[0] - const addressBody = decoded.slice(1) + if (decoded.length == 0) throw new Error("Address string is empty"); + const addressType = decoded[0]; + const addressBody = decoded.slice(1); if (addressType == 0x03) { - return Buffer.from(addressBody).toString('hex') + return Buffer.from(addressBody).toString("hex"); } else { - throw new Error(`Invalid contract address type: ${addressType}`) + throw new Error(`Invalid contract address type: ${addressType}`); } } -module.exports = { - getAlphBalance, - getTokensBalance, - contractIdFromAddress, - contractMultiCall +function hexToBinUnsafe(hex) { + const bytes = []; + for (let i = 0; i < hex.length; i += 2) { + bytes.push(parseInt(hex.slice(i, i + 2), 16)); + } + return new Uint8Array(bytes); } + +function addressFromContractId(contractId) { + const hash = hexToBinUnsafe(contractId); + const bytes = new Uint8Array([0x03, ...hash]); + return bs58.encode(bytes); +} + +module.exports = { + getAlphBalance, + getTokensBalance, + getTokenInfo, + contractIdFromAddress, + addressFromContractId, + contractMultiCall, +}; diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 05e2da1ee949..9eab7a5c307e 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -43,8 +43,8 @@ const fixBalancesTokens = { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, stellar: { - "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV": { coingeckoId: "euro-coin", decimals: 7}, - "CAUIKL3IYGMERDRUN6YSCLWVAKIFG5Q4YJHUKM4S4NJZQIA3BAS6OJPK": { coingeckoId: "aquarius", decimals: 7}, + "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV": { coingeckoId: "euro-coin", decimals: 7 }, + "CAUIKL3IYGMERDRUN6YSCLWVAKIFG5Q4YJHUKM4S4NJZQIA3BAS6OJPK": { coingeckoId: "aquarius", decimals: 7 }, }, shape: { @@ -62,7 +62,7 @@ const fixBalancesTokens = { base: { [ADDRESSES.base.rETH]: { coingeckoId: 'rocket-pool-eth', decimals: 18 }, '0x0a27e060c0406f8ab7b64e3bee036a37e5a62853': { coingeckoId: 'zai-stablecoin', decimals: 18 }, - '0xc26c9099bd3789107888c35bb41178079b282561': { coingeckoId: 'solv-protocol-solvbtc-bbn', decimals: 18}, + '0xc26c9099bd3789107888c35bb41178079b282561': { coingeckoId: 'solv-protocol-solvbtc-bbn', decimals: 18 }, }, op_bnb: { [ADDRESSES.defiverse.USDC]: { coingeckoId: 'binance-bitcoin', decimals: 18 }, @@ -136,7 +136,7 @@ const fixBalancesTokens = { hedera: { '0x00000000000000000000000000000000001647e8': { coingeckoId: 'xsauce', decimals: 6 }, '0x000000000000000000000000000000000006f89a': { coingeckoId: 'usd-coin', decimals: 6 }, - '0x000000000000000000000000000000000022d6de': { coingeckoId: 'karate-combat', decimals: 8}, + '0x000000000000000000000000000000000022d6de': { coingeckoId: 'karate-combat', decimals: 8 }, '0x00000000000000000000000000000000000cba44': { coingeckoId: 'hbarx', decimals: 8 }, '0x00000000000000000000000000000000000b2ad5': { coingeckoId: 'saucerswap', decimals: 6 }, '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, @@ -178,7 +178,7 @@ const fixBalancesTokens = { }, unit0: { '0xcf43f7703d9b4e8835f977ef364b4014fa7e856e': { coingeckoId: 'unit0', decimals: 18 }, - } + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 5b6d38981dba23365783643ce19800c45331cf87 Mon Sep 17 00:00:00 2001 From: ratex-tony Date: Fri, 15 Nov 2024 02:18:44 +0800 Subject: [PATCH 338/787] feat: add usde vaults (#12298) --- projects/rate-x/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/rate-x/index.js b/projects/rate-x/index.js index f4c264872edd..a67599fa8be7 100644 --- a/projects/rate-x/index.js +++ b/projects/rate-x/index.js @@ -12,7 +12,10 @@ async function tvl(api) { '6opMSfkHgWsvG5KmZo8y2DuShaDHwXfB6VUuTx6W4Age', '4Ejjk5w7HAWvmXYT57s5uwn8rs7i61nbpcTRQ9ABB11M', '4xq7VjrJCU2Smk5JcJToik5hiEJ8RCvECReePP8Jg6q8', - 'B2YeVM6Kf3SKYLuH2nfucCmZwy8KJcQpd9e9JEuwv9mt' + 'B2YeVM6Kf3SKYLuH2nfucCmZwy8KJcQpd9e9JEuwv9mt', + '8DeQth4AWPXauRfgAEUy9WpHuyKKyYuNNsH76C5v1Hv7', + 'FS7TTuJejy7zjkdJXD9BjeLFZ44ipxxr2qmMMUKMZv6y', + '6K8yrdpm2dVaLSLpqoRJKv7SNuP54xmbv5KULcJzKTHc' ], balances: api.getBalances() }) From 6c4a5f5affdd0727ae7761b95beba2596e3a4724 Mon Sep 17 00:00:00 2001 From: dmytro-horbatenko <148330112+dmytro-horbatenko@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:26:25 +0200 Subject: [PATCH 339/787] Midas RWA: add mBTC token and Base TVL (#12297) --- projects/midas/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/midas/index.js b/projects/midas/index.js index 797ffa5699c6..2377b64c49ff 100644 --- a/projects/midas/index.js +++ b/projects/midas/index.js @@ -2,6 +2,11 @@ const config = { ethereum: { mTBILL: '0xDD629E5241CbC5919847783e6C96B2De4754e438', mBASIS: '0x2a8c22E3b10036f3AEF5875d04f8441d4188b656', + mBTC: '0x007115416AB6c266329a03B09a8aa39aC2eF7d9d' + }, + base: { + mTBILL: '0xDD629E5241CbC5919847783e6C96B2De4754e438', + mBASIS: '0x1C2757c1FeF1038428b5bEF062495ce94BBe92b2', } } From 12e9a08fb2b8e1d05251b077b8018e20133a29d0 Mon Sep 17 00:00:00 2001 From: pixelcooker <155977639+pixelcooker@users.noreply.github.com> Date: Fri, 15 Nov 2024 02:27:36 +0800 Subject: [PATCH 340/787] Add goose (#12283) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/goose-farm/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/goose-farm/index.js diff --git a/projects/goose-farm/index.js b/projects/goose-farm/index.js new file mode 100644 index 000000000000..e529e28b34a9 --- /dev/null +++ b/projects/goose-farm/index.js @@ -0,0 +1,13 @@ +module.exports = { + bsc: { + tvl: async (api) => { + const vault = '0x0874f961178879cdbde3500544c49f864f232899' + const lpToken= await api.call({ abi: 'address:lpToken', target: vault}) + const token= await api.call({ abi: 'address:token', target: vault}) + const supply= await api.call({ abi: 'uint256:totalSupply', target: lpToken}) + const price= await api.call({ abi: 'uint256:price', target: lpToken}) + + api.addTokens(token, supply * price/1e18); + } + } +}; \ No newline at end of file From d81b6cd0f8fc32ccf20cb5914e46a0fad3812290 Mon Sep 17 00:00:00 2001 From: Joshua Sum <58564538+JoshuaSum@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:06:17 -0500 Subject: [PATCH 341/787] Update: Add Solayer USD (sUSD) (#12278) --- projects/solayer-ssol/index.js | 22 ++++++++++++++++++++++ projects/solayer-susd/index.js | 19 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 projects/solayer-ssol/index.js create mode 100644 projects/solayer-susd/index.js diff --git a/projects/solayer-ssol/index.js b/projects/solayer-ssol/index.js new file mode 100644 index 000000000000..4d3ecdb86daf --- /dev/null +++ b/projects/solayer-ssol/index.js @@ -0,0 +1,22 @@ +const { sumTokens2, getConnection, } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); +const ADDRESSES = require('../helper/coreAssets.json') + +async function tvl(api) { + const connection = getConnection(); + + // add native SOL staking for sSOL + const stakeAccount = await connection.getAccountInfo(new PublicKey('po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2')) + api.add(ADDRESSES.solana.SOL, Number(stakeAccount.data.readBigUint64LE(258))) + + return sumTokens2({ + balances: api.getBalances() + }) +} + +module.exports = { + timetravel: false, + doublecounted: true, + methodology: "TVL is calculated by restaked native SOL in the Solayer staking pool", + solana: { tvl }, +}; \ No newline at end of file diff --git a/projects/solayer-susd/index.js b/projects/solayer-susd/index.js new file mode 100644 index 000000000000..685aaf1439ef --- /dev/null +++ b/projects/solayer-susd/index.js @@ -0,0 +1,19 @@ +const { sumTokens2 } = require("../helper/solana"); +const ADDRESSES = require('../helper/coreAssets.json') + +async function tvl() { + // Sum up assets in sUSD pool + return sumTokens2({ + tokensAndOwners: [ + ['4MmJVdwYN8LwvbGeCowYjSx7KoEi6BJWg8XXnW4fDDp6', 'FhVcYNEe58SMtxpZGnTu2kpYJrTu2vwCZDGpPLqbd2yG'], + [ADDRESSES.solana.USDC, 'FhVcYNEe58SMtxpZGnTu2kpYJrTu2vwCZDGpPLqbd2yG'], + ] + }) +} + +module.exports = { + timetravel: false, + doublecounted: true, + methodology: "sUSD TVL is calculated by summing all assets backing the stablecoin", + solana: { tvl }, +}; \ No newline at end of file From fafb7ec1194b04c2b495dba57b91875cd8385e08 Mon Sep 17 00:00:00 2001 From: codenutt <23013728+codenutt@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:35:10 -0600 Subject: [PATCH 342/787] add base support for tokemak (#12301) --- projects/tokemak/index.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/projects/tokemak/index.js b/projects/tokemak/index.js index 23b780f9d39d..3d516c554763 100644 --- a/projects/tokemak/index.js +++ b/projects/tokemak/index.js @@ -14,9 +14,13 @@ const cvx_abi = { stkcvxFRAXBP_lockedStakesOf: "function lockedStakesOf(address account) view returns (tuple(bytes32 kek_id, uint256 start_timestamp, uint256 liquidity, uint256 ending_timestamp, uint256 lock_multiplier)[])", } -const v2Gen3EthMainnet = { - systemRegistry: { - address: "0x2218F90A98b0C070676f249EF44834686dAa4285", +const AUTOPILOT_SYSTEM_REGISTRIES_BY_CHAIN = { + 1: '0x2218F90A98b0C070676f249EF44834686dAa4285', + 8453: '0x18Dc926095A7A007C01Ef836683Fdef4c4371b4e' +} + +const autopilotContracts = { + systemRegistry: { abi: { autoPoolRegistry: "function autoPoolRegistry() view returns (address)" } @@ -167,18 +171,22 @@ async function tvl(api) { const amountRes = await api.multiCall({ abi: abi.userInfo, calls }) tokens.forEach((val, i) => api.add(val, amountRes[i].amount)) + await populateAutopilotDetails(1, api); - // ================================================ - // Autopilot - // ================================================ + return sumTokens2({ api, tokensAndOwners: toa, }) +} +async function populateAutopilotDetails(chainId, api) { // Get the instance of the Autopool Registry from the System Registry - const autopoolRegistry = await api.call({ abi: v2Gen3EthMainnet.systemRegistry.abi.autoPoolRegistry, target: v2Gen3EthMainnet.systemRegistry.address, }); + const autopoolRegistry = await api.call({ abi: autopilotContracts.systemRegistry.abi.autoPoolRegistry, target: AUTOPILOT_SYSTEM_REGISTRIES_BY_CHAIN[chainId], }); // Use the Autopool Registry to get all the Autopools in the system - const autopools = await api.call({ abi: v2Gen3EthMainnet.autoPoolRegistry.abi.listVaults, target: autopoolRegistry, }); + const autopools = await api.call({ abi: autopilotContracts.autoPoolRegistry.abi.listVaults, target: autopoolRegistry, }); await api.erc4626Sum2({ calls: autopools}) +} - return sumTokens2({ api, tokensAndOwners: toa, }) +async function baseTvl(api) { + await populateAutopilotDetails(8453, api); + return sumTokens2({ api }) } function lpBalances(holdings, toa, tokens, calls) { @@ -226,5 +234,8 @@ module.exports = { tvl, pool2, staking + }, + base: { + tvl: baseTvl } } From 598753a1b8b422b50281cd1b4daf92cf097f3aa1 Mon Sep 17 00:00:00 2001 From: 0xbe1 <0xbetrue@gmail.com> Date: Fri, 15 Nov 2024 10:36:32 +0800 Subject: [PATCH 343/787] [thalaswap-v2] fix tvl (#12300) --- projects/thalaswap-v2/index.js | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/projects/thalaswap-v2/index.js b/projects/thalaswap-v2/index.js index da46d1a5bb25..1a8ab37abbf5 100644 --- a/projects/thalaswap-v2/index.js +++ b/projects/thalaswap-v2/index.js @@ -1,15 +1,9 @@ -const { getResource, function_view } = require("../helper/chain/aptos"); +const { function_view } = require("../helper/chain/aptos"); -const thalaswapAddress = "0x007730cd28ee1cdc9e999336cbc430f99e7c44397c0aa77516f6f23a78559bb5"; -const thalaswapControllerResource = `${thalaswapAddress}::pool::ThalaSwap`; -let resourcesCache; +const thalaswapLensAddress = "ff1ac437457a839f7d07212d789b85dd77b3df00f59613fcba02388464bfcacb"; -async function _getResource(address, key) { - if (!resourcesCache) resourcesCache = getResource(address, key) - return resourcesCache -} -async function getBalance(poolAddress, assetMetadata) { - return function_view({ functionStr: "0x1::primary_fungible_store::balance", type_arguments: ["0x1::fungible_asset::Metadata"], args: [poolAddress, assetMetadata] }); +async function getPools(lensAddress) { + return function_view({ functionStr: `${lensAddress}::lens::get_all_pools_info`}) } module.exports = { @@ -18,16 +12,13 @@ module.exports = { "Aggregates TVL in all pools in Thalaswap, Thala Labs' AMM.", aptos: { tvl: async (api) => { - const controller = await _getResource(thalaswapAddress, thalaswapControllerResource) + const poolInfos = await getPools(thalaswapLensAddress) - const poolObjects = controller.pools.inline_vec.map(pool => (pool.inner)) - - for (const poolAddress of poolObjects) { - const pool = await getResource(poolAddress, `${thalaswapAddress}::pool::Pool`) - const assets = pool.assets_metadata.map(asset => asset.inner) - for (const asset of assets) { - const balance = await getBalance(poolAddress, asset) - api.add(asset, balance) + for (const poolInfo of poolInfos) { + const assets = poolInfo.assets_metadata.map(asset => asset.inner) + const balances = poolInfo.balances + for (let i = 0; i < assets.length; i++) { + api.add(assets[i], balances[i]) } } }, From 5f4c769e588170faa5d26ac91829942c4878d734 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 15 Nov 2024 03:37:27 +0100 Subject: [PATCH 344/787] minor fix --- projects/thalaswap-v2/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/thalaswap-v2/index.js b/projects/thalaswap-v2/index.js index 1a8ab37abbf5..bb57d69b9684 100644 --- a/projects/thalaswap-v2/index.js +++ b/projects/thalaswap-v2/index.js @@ -17,9 +17,7 @@ module.exports = { for (const poolInfo of poolInfos) { const assets = poolInfo.assets_metadata.map(asset => asset.inner) const balances = poolInfo.balances - for (let i = 0; i < assets.length; i++) { - api.add(assets[i], balances[i]) - } + api.add(assets, balances) } }, }, From af96d6449988818c9ad6647ba14853298b7bcb53 Mon Sep 17 00:00:00 2001 From: B-aublys <57601610+B-aublys@users.noreply.github.com> Date: Fri, 15 Nov 2024 03:51:22 +0100 Subject: [PATCH 345/787] Adding Sensi (#12296) Co-authored-by: Baubliukas Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/sensi/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/sensi/index.js diff --git a/projects/sensi/index.js b/projects/sensi/index.js new file mode 100644 index 000000000000..5e578dac84bd --- /dev/null +++ b/projects/sensi/index.js @@ -0,0 +1,23 @@ +const { staking } = require('../helper/staking') +const SENSI_TOKEN_CONTRACT = '0x63e77cf206801782239d4f126cfa22b517fb4edb' +const SENSI_LOCKING_CONTRACT = '0xc13Aff57B67145012Ef3a4604bDB3f3dA17E114f' +const SENSI_SY_CONTRACT = '0x21B656d3818A1dD07B800c1FE728fB81921af3A3' + +const SY_ABI = { + "getSYPortfolio": "function getSYPortfolio() view returns ((uint256 totalPayToken, uint256 totalBuyInToken, uint256 rewardsInPool, uint256 rewardsLastRun, uint256 lockingLastRun, uint256 SENSICirculatingSupply, uint256 SYNFTCirculatingSupply, uint256 lastMintedSYNFTID, uint256 totalVaults, uint256 totalActiveVaults) SY_Portfolio)" +} + +async function tvl(api) { + const balance_of_SY = await api.call({ abi: SY_ABI.getSYPortfolio, target: SENSI_SY_CONTRACT }) + + const balance_of_SY_TVL = balance_of_SY.totalPayToken + api.add("0x0000000000000000000000000000000000000000", balance_of_SY_TVL) +} + +module.exports = { + methodology: 'Counts how many tokens are in Sensi Locks and in SmartYield', + bsc: { + tvl, + staking: staking(SENSI_LOCKING_CONTRACT, SENSI_TOKEN_CONTRACT), + } +} \ No newline at end of file From 78143c174140f7de3d84fc804d11d42bd835839e Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:10:05 +0000 Subject: [PATCH 346/787] add modeswap v3 adapter (#12307) --- projects/swapmode-v3/index.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 projects/swapmode-v3/index.js diff --git a/projects/swapmode-v3/index.js b/projects/swapmode-v3/index.js new file mode 100644 index 000000000000..0d83ba821882 --- /dev/null +++ b/projects/swapmode-v3/index.js @@ -0,0 +1,6 @@ +const { uniV3Export } = require('../helper/uniswapV3') +const factory = '0x6E36FC34eA123044F278d3a9F3819027B21c9c32' + +module.exports = uniV3Export({ + mode: { factory, fromBlock: 5005167 }, +}) \ No newline at end of file From 43fadb4cb6e208d268336af4c7b064421c3e5d04 Mon Sep 17 00:00:00 2001 From: Utkarsh <83659045+0xShuk@users.noreply.github.com> Date: Fri, 15 Nov 2024 15:43:56 +0530 Subject: [PATCH 347/787] feat: update api for spl-governance TVL (#12160) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/spl-governance/index.js | 42 +++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/projects/spl-governance/index.js b/projects/spl-governance/index.js index f68ef0c49f02..1abdbfd465b4 100644 --- a/projects/spl-governance/index.js +++ b/projects/spl-governance/index.js @@ -1,22 +1,36 @@ -const { getCache } = require('../helper/http') -const url = 'https://api.realms.today/stats/tvl' +const { PublicKey } = require('@solana/web3.js') +const { get } = require('../helper/http') +const { getConnection } = require('../helper/solana') +const { sliceIntoChunks } = require('../helper/utils') -async function tvl() { - const { tvl } = await getCache(url) - return tvlObject(tvl) -} +const url = 'https://realms-tvl.vercel.app/tvl/latest' -async function staking() { - const { ownTokens } = await getCache(url) - return tvlObject(ownTokens) -} +const isSolOrStable = (token) => ['sol', 'usd', 'btc', 'eth'].some(i => token.token_symbol.toLowerCase().includes(i)) + +async function tvl(api, isStaking = false) { + // const connnection = getConnection() + let { totalValueUsd: { tokens } } = await get(url) + const filterFn = isStaking ? i => !isSolOrStable(i) : isSolOrStable + tokens = tokens.filter(filterFn) + tokens.forEach(i => api.addUSDValue(i.value)) + /* const decimalsMap = {} + const _tokens = tokens.map(i => i.token) + const chunks = sliceIntoChunks(_tokens, 99) + + for (const chunk of chunks) { + const { value } = await connnection.getMultipleParsedAccounts(chunk.map(i => new PublicKey(i))) + value.forEach((val, i) => { + decimalsMap[chunk[i]] = val.data.parsed.info.decimals + }) + } -function tvlObject(obj) { - return Object.fromEntries(Object.entries(obj).filter(([_, i]) => +i > 1).map(([a, b]) => ['solana:'+a, b])) + for (const token of tokens) + api.add(token.token, +token.balance * 10 ** decimalsMap[token.token]) */ } module.exports = { - methodology: 'SOL token and stables held in the contracts are counted under tvl, gov tokens are counted under staking', + misrepresentedTokens: true, + methodology: 'SOL token and stables held in the contracts are counted under tvl, gov tokens are counted under staking', timetravel: false, - solana: { tvl, staking, } + solana: { tvl: api => tvl(api), staking: api => tvl(api, true), } } From b7e17d48f1dc63b0db7a3c9e60555002b53ff455 Mon Sep 17 00:00:00 2001 From: lilchizh <55549631+lilchizh@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:15:46 +0700 Subject: [PATCH 348/787] add TONCO DEX (#12308) --- projects/tonco/index.js | 48 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 projects/tonco/index.js diff --git a/projects/tonco/index.js b/projects/tonco/index.js new file mode 100644 index 000000000000..6d54f1109db8 --- /dev/null +++ b/projects/tonco/index.js @@ -0,0 +1,48 @@ +const { cachedGraphQuery } = require('../helper/cache'); +const { post } = require('../helper/http') +const { transformDexBalances } = require('../helper/portedTokens') +const sdk = require('@defillama/sdk') +const { ethers } = require("ethers") + +const API_URL = 'https://indexer.tonco.io'; + +const poolsQuery = ` + { + pools { + address + jetton0 { + bounceableAddress + decimals + } + jetton1 { + bounceableAddress + decimals + } + totalValueLockedJetton0 + totalValueLockedJetton1 + } + } +` + +module.exports = { + misrepresentedTokens: true, + timetravel: false, + ton: { + tvl: async () => { + + const result = await cachedGraphQuery('tonco-swap', API_URL, poolsQuery) + + sdk.log(result) + + return transformDexBalances({ + chain: 'ton', + data: result.pools.map(pool => ({ + token0: pool.jetton0.bounceableAddress, + token1: pool.jetton1.bounceableAddress, + token0Bal: Number(ethers.parseUnits(String(pool.totalValueLockedJetton0.toFixed(pool.jetton0.decimals)), parseInt(pool.jetton0.decimals))), + token1Bal: Number(ethers.parseUnits(String(pool.totalValueLockedJetton1.toFixed(pool.jetton1.decimals)), parseInt(pool.jetton1.decimals))), + })) + }) + } + } +} From 1a58f51da33d13fa70a76f555f96b6f75809ef4c Mon Sep 17 00:00:00 2001 From: WindowAzure Date: Fri, 15 Nov 2024 18:19:24 +0800 Subject: [PATCH 349/787] add tron wallet address (#12306) Co-authored-by: Azure --- projects/hibt/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/hibt/index.js b/projects/hibt/index.js index 657dae49417f..5c7a3a96e875 100644 --- a/projects/hibt/index.js +++ b/projects/hibt/index.js @@ -13,7 +13,9 @@ const config = { tron: { owners: [ 'TWVCro8i15sJjmwRKfV53gPnCsgz2ThQSc', - 'TGoPfFBjoZ6wFFia1NAFio21Pi9Sc8KFw5' + 'TGoPfFBjoZ6wFFia1NAFio21Pi9Sc8KFw5', + 'TXzjxSsfS2YDc8wktEjbUAHnETWdAgN3aF', + 'TWkAzr1bfTbm84awjbBgyThPqZPs6GbskW' ] }, } From c5229a545819214ef0398ec4c9321dd334b84c9b Mon Sep 17 00:00:00 2001 From: Uday Khokhariya <101034951+githubotoro@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:20:28 +0700 Subject: [PATCH 350/787] Update Royco Contract Addresses (#12305) --- projects/royco/index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/royco/index.js b/projects/royco/index.js index ed66d98db65b..ebe975e45b16 100644 --- a/projects/royco/index.js +++ b/projects/royco/index.js @@ -1,9 +1,9 @@ const { getLogs2 } = require('../helper/cache/getLogs') const config = { - ethereum: { factory: '0xb316D165D01aC68d31B297F847533D671c965662', fromBlock: 21040754 }, - arbitrum: { factory: '0xb316D165D01aC68d31B297F847533D671c965662', fromBlock: 267610608 }, - base: { factory: '0xb316D165D01aC68d31B297F847533D671c965662', fromBlock: 21548421 }, + ethereum: { factory: '0xbfac50c6b2c91ab756c1e5efab699438992cc1b2', fromBlock: 21183492 }, + arbitrum: { factory: '0xbfac50c6b2c91ab756c1e5efab699438992cc1b2', fromBlock: 274261481 }, + base: { factory: '0xbfac50c6b2c91ab756c1e5efab699438992cc1b2', fromBlock: 22384258 }, } Object.keys(config).forEach(chain => { @@ -16,4 +16,4 @@ Object.keys(config).forEach(chain => { } } -}) \ No newline at end of file +}) From bd88264cdd5fa1f51041a2023fc83cd6858a759e Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 15 Nov 2024 12:42:11 +0100 Subject: [PATCH 351/787] mark broken adapters --- projects/anedak/index.js | 3 ++- projects/babena/index.js | 5 +++-- projects/kdlaunch/index.js | 31 +--------------------------- projects/parallel-lending/index.js | 8 ++++++- projects/parallel-staking/index.js | 8 ++++++- projects/parallel-stream/index.js | 8 ++++++- projects/parallel.js | 8 ++++++- projects/parallelamm/index.js | 8 ++++++- projects/shadeprotocol-lend/index.js | 31 +++++++++++++++------------- projects/vaporwave.js | 5 +++-- 10 files changed, 61 insertions(+), 54 deletions(-) diff --git a/projects/anedak/index.js b/projects/anedak/index.js index 493ebe635bca..950d50178163 100644 --- a/projects/anedak/index.js +++ b/projects/anedak/index.js @@ -116,10 +116,11 @@ async function fetch() { } module.exports = { + // deadFrom: '2024-08-30', timetravel: false, misrepresentedTokens: true, methodology: "TVL accounts for the liquidity on all Anedak AMM pools, with all values calculated in terms of KDA price.", kadena: { - tvl: fetch, + tvl: () => ({}), }, }; diff --git a/projects/babena/index.js b/projects/babena/index.js index 838dc984444a..ab91127e7201 100644 --- a/projects/babena/index.js +++ b/projects/babena/index.js @@ -104,9 +104,10 @@ async function stakingfetch() { module.exports = { timetravel: false, misrepresentedTokens: true, + // deadFrom: '2024-08-30', kadena: { - tvl: fetch, - staking: stakingfetch + tvl: () => ({}), + staking: () => ({}) } } \ No newline at end of file diff --git a/projects/kdlaunch/index.js b/projects/kdlaunch/index.js index d1c4dd306851..2da059a049bf 100644 --- a/projects/kdlaunch/index.js +++ b/projects/kdlaunch/index.js @@ -1,40 +1,12 @@ const { fetchLocal, mkMeta } = require("../helper/pact"); const network = (chainId) => `https://api.chainweb.com/chainweb/0.0/mainnet01/chain/${chainId}/pact`; -const GAS_PRICE = 0.00000001; const creationTime = () => Math.round(new Date().getTime() / 1000) - 10; const getReserve = (tokenData) => { return parseFloat(tokenData.decimal ? tokenData.decimal : tokenData); } -const getTokenToKadena = async (token) => { - const chainId = '3'; - let data = await fetchLocal({ - pactCode: ` - (use free.exchange) - (let* - ( - (p (get-pair ${token} coin)) - (reserveA (reserve-for p ${token})) - (reserveB (reserve-for p coin)) - )[reserveA reserveB]) - `, - meta: mkMeta("account", chainId, GAS_PRICE, 3000, creationTime(), 600), - }, network(chainId)); - - if (data.result.status === "success") { - const tokenReserve = getReserve(data.result.data[0]); - const kadenaReserve = getReserve(data.result.data[1]); - return kadenaReserve / tokenReserve; - } - - throw new Error(`Kadena fetch failed`); -} - -const fetchKdlPrice = async () => { - return await getTokenToKadena("kdlaunch.token"); -} const getTotalStakedKdl = async () => { const chainId = '1'; @@ -54,10 +26,9 @@ const getTotalStakedKdl = async () => { } async function fetchStakingTvl() { - const kdlPrice = await fetchKdlPrice(); const stakedKdl = await getTotalStakedKdl(); return { - kadena: stakedKdl * kdlPrice + kdlaunch: stakedKdl } } diff --git a/projects/parallel-lending/index.js b/projects/parallel-lending/index.js index ca943193127a..2c365e77b31a 100644 --- a/projects/parallel-lending/index.js +++ b/projects/parallel-lending/index.js @@ -1,7 +1,13 @@ const { getExports } = require('../helper/heroku-api') module.exports = { + // deadFrom: '2024-08-17', timetravel: false, misrepresentedTokens: true, ...getExports("parallel-lending", ['heiko', 'parallel'], ['borrowed']), -} \ No newline at end of file +} + +const chains = ['heiko', 'parallel'] +chains.forEach(chain => { + Object.keys(module.exports[chain]).forEach(key => module.exports[chain][key] = () => ({})) +}) \ No newline at end of file diff --git a/projects/parallel-staking/index.js b/projects/parallel-staking/index.js index c49199a2b026..8a64eb93ca86 100644 --- a/projects/parallel-staking/index.js +++ b/projects/parallel-staking/index.js @@ -1,6 +1,12 @@ const { getExports } = require('../helper/heroku-api') module.exports = { + // deadFrom: '2024-08-17', timetravel: false, ...getExports("parallel-staking", ['heiko', 'parallel']), -} \ No newline at end of file +} + +const chains = ['heiko', 'parallel'] +chains.forEach(chain => { + Object.keys(module.exports[chain]).forEach(key => module.exports[chain][key] = () => ({})) +}) \ No newline at end of file diff --git a/projects/parallel-stream/index.js b/projects/parallel-stream/index.js index bb1791d8427e..45c848afe2c7 100644 --- a/projects/parallel-stream/index.js +++ b/projects/parallel-stream/index.js @@ -1,7 +1,13 @@ const { getExports } = require('../helper/heroku-api') module.exports = { + // deadFrom: '2024-08-17', timetravel: false, misrepresentedTokens: true, ...getExports("parallel-stream", ['heiko', 'parallel']), -} \ No newline at end of file +} + +const chains = ['heiko', 'parallel'] +chains.forEach(chain => { + Object.keys(module.exports[chain]).forEach(key => module.exports[chain][key] = () => ({})) +}) \ No newline at end of file diff --git a/projects/parallel.js b/projects/parallel.js index b9eb689f5cd9..d216a1336d1e 100644 --- a/projects/parallel.js +++ b/projects/parallel.js @@ -1,6 +1,12 @@ const { getExports } = require('./helper/heroku-api') module.exports = { + // deadFrom: '2024-08-17', timetravel: false, ...getExports("parallel-crowdloan", ['heiko', 'parallel']), -} \ No newline at end of file +} + +const chains = ['heiko', 'parallel'] +chains.forEach(chain => { + Object.keys(module.exports[chain]).forEach(key => module.exports[chain][key] = () => ({})) +}) \ No newline at end of file diff --git a/projects/parallelamm/index.js b/projects/parallelamm/index.js index 24412eac1a80..9fd270af21ac 100644 --- a/projects/parallelamm/index.js +++ b/projects/parallelamm/index.js @@ -1,7 +1,13 @@ const { getExports } = require('../helper/heroku-api') module.exports = { + // deadFrom: '2024-08-17', timetravel: false, misrepresentedTokens: true, ...getExports("parallelamm", ['heiko', 'parallel']), -} \ No newline at end of file +} + +const chains = ['heiko', 'parallel'] +chains.forEach(chain => { + Object.keys(module.exports[chain]).forEach(key => module.exports[chain][key] = () => ({})) +}) diff --git a/projects/shadeprotocol-lend/index.js b/projects/shadeprotocol-lend/index.js index 16ee7d06a877..a1ab55b5cd97 100644 --- a/projects/shadeprotocol-lend/index.js +++ b/projects/shadeprotocol-lend/index.js @@ -1,24 +1,27 @@ -const { get } = require("../helper/http") +const { post } = require("../helper/http") -// Total Collateral Deposited in Vaults -async function tvl(api) { - const data = await get('https://ruvzuawwz7.execute-api.us-east-1.amazonaws.com/prod-analytics-v1/lend') - - let totalValue = 0; +async function getData(api) { + const isoTimestamp = new Date((api.timestamp - 5 * 60 * 60) * 1000).toISOString() + const { data: { lendStatsHistories } } = await post('https://prodv1.securesecrets.org/graphql', { "operationName": "getLendHistory", "variables": { "intervalIso": isoTimestamp }, "query": "query getLendHistory($intervalIso: String!) {\n lendStatsHistories(\n query: {where: {time: {gte: $intervalIso}}, orderBy: {time: \"desc\"}}\n ) {\n averageLtv\n collateralUsd\n debtAmount\n debtUsd\n time\n __typename\n }\n}" }) + console.log(lendStatsHistories.length) + return lendStatsHistories[0] +} - for (let i = 0; i < data.collaterals.length; i++) { - // Add the value of each collateral to the total value - totalValue += data.collaterals[i].value; - } +async function tvl(api) { + const data = await getData(api) + api.addUSDValue(data.collateralUsd - data.debtUsd) +} - return { - tether: totalValue - } +async function borrowed(api) { + const data = await getData(api) + api.addUSDValue(data.debtUsd) } + module.exports = { misrepresentedTokens: true, secret: { - tvl + tvl, + borrowed, } } diff --git a/projects/vaporwave.js b/projects/vaporwave.js index 4f801f600931..9909985a09a9 100644 --- a/projects/vaporwave.js +++ b/projects/vaporwave.js @@ -32,12 +32,13 @@ const chains = { module.exports = { timetravel: false, misrepresentedTokens: true, + // deadFrom: '2024-08-01', methodology: 'TVL data is pulled from the Vaporwave Finance API "https://api.vaporwave.farm/tvl".', doublecounted: true, ...Object.fromEntries(Object.entries(chains).map(chain => [chain[0], { - tvl: fetchChain(chain[1], false), - staking: fetchChain(chain[1], true), + tvl: () => ({}), + staking: () => ({}), }])) } From 68b0b225495ea8ce188d857cc7f25d01c9875583 Mon Sep 17 00:00:00 2001 From: Ora <165104067+oraprotocolfi@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:23:47 +0300 Subject: [PATCH 352/787] track Ora Protocol tvl (#12310) Co-authored-by: oraprotocolfi Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/oraprotocol/index.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 projects/oraprotocol/index.js diff --git a/projects/oraprotocol/index.js b/projects/oraprotocol/index.js new file mode 100644 index 000000000000..72f3df35ff41 --- /dev/null +++ b/projects/oraprotocol/index.js @@ -0,0 +1,29 @@ +const contracts = [ + "0xc0b2FdA4EDb0f7995651B05B179596b112aBE0Ff", + "0x0a7Df7BC7a01A4b6C9889d5994196C1600D4244a", + "0x5982241e50Cb4C42cb51D06e74A97EAaCa3a8CE2", + "0xDF03600C34cacE7496A0A8Ef102B4bCe718958a2", + "0x3e0598fee8a73d09c06b3de3e205ba7ff8edb004" +]; + + +module.exports = { + ethereum: { + tvl, staking, + } +}; + +async function tvl(api) { + const tokens = await api.multiCall({ abi: 'address:stakingTokenAddress', calls: contracts }) + return api.sumTokens({ tokensAndOwners2: [tokens, contracts] }) +} + +async function staking(api) { + + const contracts = [ + "0x07b022bd57e22c8c5abc577535cf25e483dae3df", + "0x4f5e12233ed7ca1699894174fcbd77c7ed60b03d", + ]; + const tokens = await api.multiCall({ abi: 'address:stakingTokenAddress', calls: contracts }) + return api.sumTokens({ tokensAndOwners2: [tokens, contracts] }) +} \ No newline at end of file From 2553ae5cc684814bf7f47f24e2feabe068906d5f Mon Sep 17 00:00:00 2001 From: Antoine <67124021+antoineborg@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:24:11 +0100 Subject: [PATCH 353/787] SwissBorg: Add new wallets (#12309) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/swissborg/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index b3a1e43bb308..d559134f952a 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -47,6 +47,7 @@ const config = { '9qoUcyhKSWMbk6tqGUYQUpeosPcdUnJszG4eQKwfe4gL', 'Fe7SEekiKygziaEGKxsDsgLVzrCfNvVBvAYsaJBwFA8s', 'AR2ecEWY2vfsXmd4fUxc196LhbX5p8TnhvJg8t3fgYUN', + '7Sng9GTnkjjb8WTF2kYX8JWqGHHwJGk5Ke9639zREUAR', ], }, polkadot: { @@ -109,7 +110,12 @@ const config = { owners: [ '0x8F0d8b27bF808976Fa94f03e2230b4bca95bf3C4', ] - } + }, + // injective: { + // owners: [ + // 'inj1wvhk7xhzf9kus9a4tpa6v8vhuqvm265rz7zd6n', + // ] + // } } module.exports = cexExports(config) From 288ded4d4b89890effd665743eebde593b217d63 Mon Sep 17 00:00:00 2001 From: David Lee Date: Fri, 15 Nov 2024 08:58:40 -0500 Subject: [PATCH 354/787] [Level] Add curve LP tokens in LevelUSD points farm to calculation (#12312) --- projects/level-money/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/level-money/index.js b/projects/level-money/index.js index d33473349184..d4876546097a 100644 --- a/projects/level-money/index.js +++ b/projects/level-money/index.js @@ -11,6 +11,9 @@ const LEVEL_STAKING_CONTRACT = '0x7FDA203f6F77545548E984133be62693bCD61497'; const LEVEL_RESERVE_MANAGERS = ['0x70D544F75c2228D68EE04BC63e6e4Bae8F31fCEF', '0x7B2c2C905184CEf1FABe920D4CbEA525acAa6f14']; const LEVEL_WRAPPED_TOKENS = [LEVEL_WRAPPED_AUSDC, LEVEL_WRAPPED_AUSDT]; +const LEVEL_USD_POINTS_FARM = '0x80B73eF4534FE245300017A5197451973559c00f'; + +const LEVEL_USD_USDC_CURVE_LP_TOKEN = '0x1220868672d5b10f3e1cb9ab519e4d0b08545ea4'; const TOKEN_CONTRACTS = [ ADDRESSES.ethereum.USDT, // USDT @@ -38,5 +41,6 @@ module.exports = { owners: [LEVEL_STAKING_CONTRACT, ...LEVEL_RESERVE_MANAGERS, ...LEVEL_WRAPPED_TOKENS], tokens: TOKEN_CONTRACTS, }), + pool2: sumTokensExport({ owner: LEVEL_USD_POINTS_FARM, tokens: [LEVEL_USD_USDC_CURVE_LP_TOKEN] }) } }; From af46ef743e15e1c8d1cbda92f8b5b132ee59fe06 Mon Sep 17 00:00:00 2001 From: David Zhang <125990317+zhangdav@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:09:14 +0700 Subject: [PATCH 355/787] Add Bob chain and replace FBTC with LFBTC on Ethereum, Arbitrum, BSC, Mantle, and Bob (#12282) --- projects/pumpbtc/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index 47aef26159e6..673c987723c9 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -33,7 +33,7 @@ async function otherTvl(api) { module.exports.isHeavyProtocol = true; -['bitcoin', 'ethereum', 'bsc', 'mantle', 'base', 'arbitrum'].forEach(chain => { +['bitcoin', 'ethereum', 'bsc', 'mantle', 'base', 'arbitrum', 'bob'].forEach(chain => { if (chain == 'bitcoin') { module.exports[chain] = { tvl: bitcoinTvl, @@ -43,4 +43,4 @@ module.exports.isHeavyProtocol = true; tvl: otherTvl } } -}) +}) \ No newline at end of file From 25dcdfd5323fc52baa7926ac35046f59ffcf4dbd Mon Sep 17 00:00:00 2001 From: suidollar Date: Fri, 15 Nov 2024 16:12:26 +0200 Subject: [PATCH 356/787] Creating DefiLlama adapter for suidollar (#12275) --- projects/suidollar/index.js | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 projects/suidollar/index.js diff --git a/projects/suidollar/index.js b/projects/suidollar/index.js new file mode 100644 index 000000000000..5802b948d0c8 --- /dev/null +++ b/projects/suidollar/index.js @@ -0,0 +1,57 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const sui = require("../helper/chain/sui"); + +const EVENT_TYPES = { + DEPOSIT: "0xe8087c2b86351ce15e8d72e83a39c5772c0b1d054015ae9671305e686cef5034::suidollar::Deposit", + WITHDRAW: "0xe8087c2b86351ce15e8d72e83a39c5772c0b1d054015ae9671305e686cef5034::suidollar::Withdraw" +}; + +async function getAllEvents(eventType) { + let hasMore = true; + let cursor = null; + let allEvents = []; + + while (hasMore) { + const events = await sui.queryEvents({ + eventType, + transform: i => i, + cursor, + limit: 50 + }); + + if (Array.isArray(events) && events.length > 0) { + allEvents = allEvents.concat(events); + } + + if (events.hasNextPage && events.nextCursor) { + cursor = events.nextCursor; + } else { + hasMore = false; + } + } + + return allEvents.map(event => eventType === EVENT_TYPES.DEPOSIT ? event.deposit_amount : event.amount) + .filter(amount => amount !== undefined); +} + +async function tvl(api) { + const deposits = await getAllEvents(EVENT_TYPES.DEPOSIT); + const withdraws = await getAllEvents(EVENT_TYPES.WITHDRAW); + + let totalBalance = 0n; + + deposits.forEach(amount => amount && (totalBalance += BigInt(amount))); + withdraws.forEach(amount => amount && (totalBalance -= BigInt(amount))); + + api.add(ADDRESSES.sui.USDC_CIRCLE, totalBalance); + + return api.getBalances(); +} + +module.exports = { + timetravel: false, + sui: { + tvl + }, + methodology: "Calculates TVL by tracking deposit and withdrawal events" +} \ No newline at end of file From 46579072746eb78728edaa836d9bae13652585da Mon Sep 17 00:00:00 2001 From: vvalecha519 <65174294+vvalecha519@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:05:19 -0500 Subject: [PATCH 357/787] do not double count (#12246) --- projects/etherfi-liquid/index.js | 38 ++++++++++++++++++++------- projects/etherfi-lrt/index.js | 44 +++++++++++++++++++++++++++----- 2 files changed, 67 insertions(+), 15 deletions(-) diff --git a/projects/etherfi-liquid/index.js b/projects/etherfi-liquid/index.js index 2ffb2b3b8dda..bc6001deb4ed 100644 --- a/projects/etherfi-liquid/index.js +++ b/projects/etherfi-liquid/index.js @@ -1,12 +1,18 @@ const ADDRESSES = require('../helper/coreAssets.json') const sdk = require('@defillama/sdk') +const liquidVaults = [ + "0xf0bb20865277aBd641a307eCe5Ee04E79073416C", + "0x08c6F91e2B681FaF5e17227F2a44C307b3C1364C" +] + +const liquidAccountants = [ + "0x0d05D94a5F1E76C18fbeB7A13d17C8a314088198", + "0xc315D6e14DDCDC7407784e2Caf815d131Bc1D3E7" +] + async function tvl(api) { const optimismApi = new sdk.ChainApi({ chain: 'optimism', timestamp: api.timestamp }) - const balETH = await api.call({ - abi: "uint256:totalSupply", - target: '0xf0bb20865277aBd641a307eCe5Ee04E79073416C', - }); await optimismApi.getBlock() const wethBal = await optimismApi.call({ target: '0xAB7590CeE3Ef1A863E9A5877fBB82D9bE11504da', @@ -18,17 +24,31 @@ async function tvl(api) { abi: 'function categoryLastUpdated(string _category) view returns (uint256)', params: ['liquid-weth'] }); - if (api.timestamp - updatedTimestamp > 12 * 60 * 60 || updatedTimestamp > api.timestamp) { + + //eth vault + const balETH = await api.call({ + abi: "uint256:totalSupply", + target: liquidVaults[0], + }); + const ethQuote = await api.call({ + target: liquidAccountants[0], + abi: 'function getRate() view returns (uint256)' + }); + if (api.timestamp - updatedTimestamp > 12 * 60 * 60) { throw new Error('Data is outdated') } - console.log(updatedTimestamp, api.timestamp) - api.add(ADDRESSES.ethereum.EETH, BigInt(balETH) - BigInt(wethBal)); + api.add(ADDRESSES.ethereum.EETH, BigInt(balETH) * BigInt(ethQuote) / BigInt(1e18) - BigInt(wethBal)); api.add(ADDRESSES.ethereum.WETH, wethBal) + //usdc vault const balUSD = await api.call({ abi: "uint256:totalSupply", - target: '0x08c6f91e2b681faf5e17227f2a44c307b3c1364c', + target: liquidVaults[1], + }); + const usdQuote = await api.call({ + target: liquidAccountants[1], + abi: 'function getRate() view returns (uint256)' }); - api.add(ADDRESSES.ethereum.USDC, balUSD); + api.add(ADDRESSES.ethereum.USDC, balUSD * usdQuote / 1e6); } module.exports = { diff --git a/projects/etherfi-lrt/index.js b/projects/etherfi-lrt/index.js index 68fa8567b2fb..a5543b4dcba0 100644 --- a/projects/etherfi-lrt/index.js +++ b/projects/etherfi-lrt/index.js @@ -1,4 +1,6 @@ -const { sumTokensExport } = require('../helper/unwrapLPs'); +const ADDRESSES = require('../helper/coreAssets.json') +const sdk = require('@defillama/sdk') + const vaults = [ '0x917ceE801a67f933F2e6b33fC0cD1ED2d5909D88', '0x7223442cad8e9cA474fC40109ab981608F8c4273', @@ -7,13 +9,43 @@ const vaults = [ '0xeDa663610638E6557c27e2f4e973D3393e844E70', ] +const vaultAccountant = [ + '0xbe16605B22a7faCEf247363312121670DFe5afBE', + '0x126af21dc55C300B7D0bBfC4F3898F558aE8156b', + '0x1b293DC39F94157fA0D1D36d7e0090C8B8B8c13F', + '0xBae19b38Bf727Be64AF0B578c34985c3D612e2Ba', + '0x1D4F0F05e50312d3E7B65659Ef7d06aa74651e0C', +] + +async function vaultsTvl(api) { + for (let i = 0; i < vaults.length; i++) { + const bv = vaults[i] + const ba = vaultAccountant[i] + const bvSupply = await api.call({ + target: bv, + abi: 'uint256:totalSupply', + }); + let [base, quote] = await Promise.all([ + api.call({ + target: ba, + abi: "function base() external view returns (address)", + }), + api.call({ + target: ba, + abi: "function getRate() external view returns (uint256 rate)", + }), + ]); + if(base.toLowerCase() === String(ADDRESSES.ethereum.WETH).toLowerCase()) { + base = ADDRESSES.ethereum.EETH + } + const denominator = Math.pow(10, (String(quote).length-1)) + api.add(base, bvSupply * quote / denominator ) + } +} + module.exports = { doublecounted: true, ethereum: { - tvl: sumTokensExport({ owners: vaults, fetchCoValentTokens: true, tokenConfig: { - onlyWhitelisted: false, - }, resolveUniV3: true, blacklistedTokens: [ - '0x657e8c867d8b37dcc18fa4caead9c45eb088c642', // eBTC - ] }), + tvl: vaultsTvl, }, } \ No newline at end of file From cb929b33d2e88f3fcd33e73f64a9a66e3e553325 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 15 Nov 2024 17:21:49 +0100 Subject: [PATCH 358/787] Shido dex (#12314) Co-authored-by: Bernard Namangala <58230307+Bernard-Namangala@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/tokenMapping.js | 4 ++++ projects/shido-dex/index.js | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 projects/shido-dex/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 5a2d1b4da0d5..ede3c645a837 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -291,6 +291,7 @@ "shape", "shibarium", "shiden", + "shido", "shimmer_evm", "sifchain", "smartbch", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 9eab7a5c307e..981d7ab3af59 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -179,6 +179,10 @@ const fixBalancesTokens = { unit0: { '0xcf43f7703d9b4e8835f977ef364b4014fa7e856e': { coingeckoId: 'unit0', decimals: 18 }, }, + shido: { + '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: 'shido', decimals: 18 }, + '0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd': { coingeckoId: 'usd-coin', decimals: 6 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/shido-dex/index.js b/projects/shido-dex/index.js new file mode 100644 index 000000000000..5300e5c4570e --- /dev/null +++ b/projects/shido-dex/index.js @@ -0,0 +1,4 @@ +const { uniV3GraphExport } = require('../helper/uniswapV3') +module.exports = { + shido: { tvl: uniV3GraphExport({ graphURL: 'https://ljd1t705przomdjt11587.cleavr.xyz/subgraphs/name/shido/mainnet', name: 'shido-dex' }) } +} \ No newline at end of file From d9c4ea8177a408eb8757dd7d83c73eab67c751ae Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 15 Nov 2024 23:10:36 +0000 Subject: [PATCH 359/787] add solana token that isn't priced --- projects/helper/tokenMapping.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 981d7ab3af59..1605e6b1db62 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -182,6 +182,9 @@ const fixBalancesTokens = { shido: { '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: 'shido', decimals: 18 }, '0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd': { coingeckoId: 'usd-coin', decimals: 6 }, + }, + solana: { + 'AZsHEMXd36Bj1EMNXhowJajpUXzrKcK57wW4ZGXVa7yR': { coingeckoId: 'guacamole', decimals: 5 } } } From 4f95f0489b50c917c7ca1a8de24a0bbbaad8fa85 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 15 Nov 2024 23:28:56 +0000 Subject: [PATCH 360/787] add mantle --- projects/equilibria/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/equilibria/index.js b/projects/equilibria/index.js index b848170a21cd..14c6cc39e75c 100644 --- a/projects/equilibria/index.js +++ b/projects/equilibria/index.js @@ -26,6 +26,12 @@ const contracts = { staker: "0x4D32C8Ff2fACC771eC7Efc70d6A8468bC30C26bF", eqbRewardsAddress: "0x22Fc5A29bd3d6CCe19a06f844019fd506fCe4455", pendleAddress: "0xBC7B1Ff1c6989f006a1185318eD4E7b5796e66E1", + }, + mantle: { + boosterAddress: "0x920873E5b302A619C54c908aDFB77a1C4256A3B8", + staker: "0x479603DE0a8B6D2f4D4eaA1058Eea0d7Ac9E218d", + eqbRewardsAddress: "0x71e0ce200a10f0bBFB9F924fE466ACf0B7401EbF", + pendleAddress: "0xd27B18915e7acc8FD6Ac75DB6766a80f8D2f5729", } }; @@ -90,7 +96,7 @@ async function tvl(chain, block) { return balances; } -const chains = ["ethereum", "arbitrum", 'bsc', 'optimism']; +const chains = ["ethereum", "arbitrum", 'bsc', 'optimism', 'mantle']; module.exports = { doublecounted: true, From 34371af47f26bd779ed0f483cc0b9f291a0f5160 Mon Sep 17 00:00:00 2001 From: Ahsan Javaid <104683677+ahsan-javaiid@users.noreply.github.com> Date: Sat, 16 Nov 2024 10:19:42 +0500 Subject: [PATCH 361/787] Add `Powpeg` protocol Tvl (Fast mode option TVL) (#12317) --- projects/powpeg/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 projects/powpeg/index.js diff --git a/projects/powpeg/index.js b/projects/powpeg/index.js new file mode 100644 index 000000000000..e15c669a6378 --- /dev/null +++ b/projects/powpeg/index.js @@ -0,0 +1,8 @@ +const { sumTokensExport, nullAddress } = require('../helper/unwrapLPs') + +module.exports = { + rsk: { + // Powpeg (flyover) fast mod protocol + tvl: sumTokensExport({ owner: '0xAa9caf1e3967600578727f975F283446a3dA6612', tokens: [nullAddress] }) + } +} \ No newline at end of file From 8e48cc92a02aa4a6f3d1f0a2077bdb6ef39898dd Mon Sep 17 00:00:00 2001 From: chainupk <121842069+chainupk@users.noreply.github.com> Date: Sat, 16 Nov 2024 12:19:51 +0700 Subject: [PATCH 362/787] updated obelisk address book (#12318) Co-authored-by: zhenhao goh Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/bitcoin-book/obelisk.js | 6 ++++-- projects/obelisk/index.js | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/helper/bitcoin-book/obelisk.js b/projects/helper/bitcoin-book/obelisk.js index 9931c8410b39..498c99a2f5bd 100644 --- a/projects/helper/bitcoin-book/obelisk.js +++ b/projects/helper/bitcoin-book/obelisk.js @@ -1,7 +1,9 @@ module.exports = [ 'bc1p0tr3dgulgpx43dkktjxy8z2azz6yvx4j7s0lelj67tlwct0wnqtqeakfer', '14ejzLtUSMsjZE8Pp2LUhX3Pf7BbXPeZyP', - 'bc1q0hapsvdtqfeyw9fjacey9350k8zu552p0khyhj', 'bc1pr6pga0d44xm3t8z36qnya6sfznsm8fwkn507x6gqt86xtnvm4h4sj2zqus', - 'bc1qy4pkldj4dqxtqypz6awwj7y8vahkht8uqhdlw3' + 'bc1qy4pkldj4dqxtqypz6awwj7y8vahkht8uqhdlw3', + 'bc1qyd4g2r0n0p9u775z7062rz8j88xxy27kmmh5aj', + '155FvRapVDRbFYxaxGxJ9eCQjgr7X2yC6g', + 'bc1qjnhtrjgr4y0new266twr6x6703lshszuey8zwm' ] \ No newline at end of file diff --git a/projects/obelisk/index.js b/projects/obelisk/index.js index 6fdb6eace7be..c1788b0cbbae 100644 --- a/projects/obelisk/index.js +++ b/projects/obelisk/index.js @@ -1,5 +1,6 @@ const { sumTokens } = require('../helper/chain/bitcoin') const sdk = require('@defillama/sdk') + const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const abi = { From eb49e321ffdc74ab358100264e2b60f144d7d680 Mon Sep 17 00:00:00 2001 From: bifkn <25141495+DJHellscream@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:20:01 -0800 Subject: [PATCH 363/787] Update factory addresses to new versions (#12319) --- projects/apexdefi/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/apexdefi/index.js b/projects/apexdefi/index.js index f55ec47840c1..1437fcac87ae 100644 --- a/projects/apexdefi/index.js +++ b/projects/apexdefi/index.js @@ -2,8 +2,8 @@ const { staking } = require('../helper/staking') const ADDRESSES = require('../helper/coreAssets.json'); const config = { - avax: { factory: "0x3D193de151F8e4e3cE1C4CB2977F806663106A87", wrapperFactory: '0x39aB4aabAd7656f94E32ebD90547C3c4a183f4B4' }, - base: { factory: "0x4ccf7aa5736c5e8b6da5234d1014b5019f50cb56", wrapperFactory: '0xc9fbf1e865eeababe92d47ddb11d580f37ce4e00' }, + avax: { factory: "0x754A0c42C35562eE7a41eb824d14bc1259820f01", wrapperFactory: '0x39aB4aabAd7656f94E32ebD90547C3c4a183f4B4' }, + base: { factory: "0x10d11Eb1d5aB87E65518458F990311480b321061", wrapperFactory: '0xc9fbf1e865eeababe92d47ddb11d580f37ce4e00' }, ethereum: { factory: "0x820c889D5749847217599B43ab86FcC91781019f", }, } From 1dc2433a86afedd2fd95aa67ee39b2c7951d7be6 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Sat, 16 Nov 2024 01:33:31 -0700 Subject: [PATCH 364/787] Avalon Labs: add new TVL data, new sub-protocol: USDaLend (#12302) --- projects/avalon-finance-usdalend/index.js | 14 ++++++++++++++ projects/avalon-finance/index.js | 20 +++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 projects/avalon-finance-usdalend/index.js diff --git a/projects/avalon-finance-usdalend/index.js b/projects/avalon-finance-usdalend/index.js new file mode 100644 index 000000000000..1807c42393da --- /dev/null +++ b/projects/avalon-finance-usdalend/index.js @@ -0,0 +1,14 @@ + +const { aaveExports } = require('../helper/aave') +const methodologies = require('../helper/methodologies') +const { mergeExports } = require('../helper/utils') + +//@note Main & Innovative Markets +const mainMarket = { + iotex: aaveExports('', '', undefined, ['0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'], { v3: true }),} + +module.exports = mergeExports( + mainMarket, +) + +module.exports.methodology = methodologies.lendingMarket diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index f7a293d4fc26..949e1b2397e8 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -11,6 +11,7 @@ const mainMarket = { iotex: aaveExports('', '', undefined, ['0xBa77520d38953BF6a8395D118CfF714Ed672533f'], { v3: true }), bsquared: aaveExports('', '', undefined, ['0x4Ea93E846b8C6E7b3D5a5BEDF4fe6B8AED58FCEe'], { v3: true }), taiko: aaveExports('', '', undefined, ['0xF6Aa54a5b60c324602C9359E8221423793e5205d'], { v3: true }), + mode: aaveExports('', '', undefined, ['0xC5b05b7092257Ee3eEAf013198d30F1E8179B6C9'], { v3: true }), } const innovativeMarket = { @@ -36,6 +37,7 @@ const unibtcMarkets = { merlin: aaveExports('', '0x0024818043D04B1Cc9685233D47eF7eea6Df0A5E', undefined, ['0x623700Fee1dF64088f258e2c4DAB4D6aEac4dDA6'], { v3: true }), btr: aaveExports('', '', undefined, ['0x898D0EF6E20B7597728AEB41169c22608Fe4b234'], { v3: true }), bsc: aaveExports('', '', undefined, ['0xF828A73cB00072843241C6294ed778F26854fe5C'], { v3: true }), + mode: aaveExports('', '', undefined, ['0x8F016F5dac399F20B34E35CBaF1dFf12eeE2dE74'], { v3: true }), } const stbtcMarkets = { @@ -50,7 +52,23 @@ const otherProtocolTokenMarkets = { bsc: aaveExports('', '', undefined, ['0xA34F1a928024E3609C8968fEA90C747e8D1fA20f'], { v3: true }), } +const obtcMarkets = { + core: aaveExports('', '', undefined, ['0x5c78EbB34cC5b52146D107365A66E37a677Fcf50'], { v3: true }), +} + +const ubtcMarkets = { + core: aaveExports('', '', undefined, ['0x2752237ccC6aB5e4B9e9BFca57D7a6956aF4FE3d'], { v3: true }), +} + +const xaumMarkets = { + bsc: aaveExports('', '', undefined, ['0x2c4aEB7C9f0D196a51136B3c7bec49cB2DBD1966'], { v3: true }), +} + +const lbtcMarkets = { + bsc: aaveExports('', '', undefined, ['0x5b9b3C211B81627Cc6b46824CB26829F31A587dc'], { v3: true }), +} + module.exports = mergeExports( - mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets + mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets ) module.exports.methodology = methodologies.lendingMarket From 2c07de08d18d5879b2e62f295d3455c0ff0a15b8 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sat, 16 Nov 2024 17:24:14 +0000 Subject: [PATCH 365/787] remove duplicate entry --- projects/helper/tokenMapping.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 1605e6b1db62..981d7ab3af59 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -182,9 +182,6 @@ const fixBalancesTokens = { shido: { '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: 'shido', decimals: 18 }, '0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd': { coingeckoId: 'usd-coin', decimals: 6 }, - }, - solana: { - 'AZsHEMXd36Bj1EMNXhowJajpUXzrKcK57wW4ZGXVa7yR': { coingeckoId: 'guacamole', decimals: 5 } } } From 396ae074f3dd5cf3109cbbec1419be3992dadaf3 Mon Sep 17 00:00:00 2001 From: callylab520 <124106736+callylab520@users.noreply.github.com> Date: Sun, 17 Nov 2024 19:29:33 +0000 Subject: [PATCH 366/787] [ADD]: reddex dex (#12320) Co-authored-by: sceptre520 Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 5 ++++- projects/reddex/index.js | 7 +++++++ 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 projects/reddex/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index ede3c645a837..0ef1a0a40ba5 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -269,6 +269,7 @@ "radixdlt", "rari", "real", + "rbn", "reef", "regen", "rei", diff --git a/projects/helper/env.js b/projects/helper/env.js index 2c906eb4eb5e..8c24dd6cb21b 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -28,6 +28,7 @@ const DEFAULTS = { APECHAIN_RPC: "https://rpc.apechain.com", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", UNIT0_RPC: "https://rpc.unit0.dev", + RBN_RPC: "https://governors.mainnet.redbelly.network", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 981d7ab3af59..afeae9679c8b 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -179,10 +179,13 @@ const fixBalancesTokens = { unit0: { '0xcf43f7703d9b4e8835f977ef364b4014fa7e856e': { coingeckoId: 'unit0', decimals: 18 }, }, + rbn: { + '0x6ed1f491e2d31536d6561f6bdb2adc8f092a6076': { coingeckoId: 'redbelly-network-token', decimals: 18 }, + }, shido: { '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: 'shido', decimals: 18 }, '0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd': { coingeckoId: 'usd-coin', decimals: 6 }, - } + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/reddex/index.js b/projects/reddex/index.js new file mode 100644 index 000000000000..19ad1e6c3436 --- /dev/null +++ b/projects/reddex/index.js @@ -0,0 +1,7 @@ +const { uniTvlExports } = require('../helper/unknownTokens') + +module.exports = uniTvlExports({ + ethereum: '0xBC7D212939FBe696e514226F3FAfA3697B96Bf59', + bsc: '0x6D642253B6fD96d9D155279b57B8039675E49D8e', + rbn: '0x2E592dF6c56a8720E46bB00D17f8FaB391BF97c8', +}) From d70e4280be57d758a923c7142e2c23c15fd28ea5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 18 Nov 2024 07:01:16 +0100 Subject: [PATCH 367/787] migrate token mappings to server --- projects/helper/coreAssets.json | 88 ++++++++++++++++++- projects/helper/tokenMapping.js | 144 -------------------------------- 2 files changed, 86 insertions(+), 146 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index f8ae15caef78..8201ef6787cd 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1044,7 +1044,9 @@ "USDC": "0x368433cac2a0b8d76e64681a9835502a1f2a8a30", "WETH": "0xaa1c53afd099e415208f47fcfa2c880f659e6904", "USDT": "0x28c9c7fb3fe3104d2116af26cc8ef7905547349c", - "WBTC": "0x2a4dc2e946b92ab4a1f7d62844eb237788f9056c" + "WBTC": "0x2a4dc2e946b92ab4a1f7d62844eb237788f9056c", + "ETH": "0xaa1c53afd099e415208f47fcfa2c880f659e6904", + "BTC": "0x2a4dc2e946b92ab4a1f7d62844eb237788f9056c" }, "vision": { "USDT": "0x1db6cdc620388a0b6046b20cd59503a0839adcff", @@ -1834,7 +1836,9 @@ "lac": { "LAC": "0x2911a1ab18546cb501628be8625c7503a2a7db54", "WETH": "0x42c8c9c0f0a98720dacdaeac0c319cb272b00d7e", - "WBTC": "0xf54b8cb8eeee3823a55dddf5540ceaddf9724626" + "WBTC": "0xf54b8cb8eeee3823a55dddf5540ceaddf9724626", + "USDT": "0x7dc8b9e3b083c26c68f0b124ca923aaec7fbee39", + "USDC": "0x51115241c7b8361eee88d8610f71d0a92cee5323" }, "bob": { "WETH": "0x4200000000000000000000000000000000000006", @@ -1964,5 +1968,85 @@ }, "bitkub": { "KKUB": "0x67ebd850304c70d983b2d1b93ea79c7cd6c3f6b5" + }, + "shape": { + "WETH": "0x4200000000000000000000000000000000000006", + "WETH_1": "0x48A9B22b80F566E88f0f1DcC90Ea15A8A3bAE8a4" + }, + "hela": { + "hUSDC": "0xf5b85320a772b436cb8105441a3db9ba29437b4a", + "hUSDT": "0xd3442073fa7ccf8a7c39d95dc125cd59497aa078", + "WHLUSD": "0x3a035615e101373fa9ba21c5bea7fe4026fc40b4" + }, + "lisk": { + "USDT": "0x05d032ac25d322df992303dca074ee7392c117b9", + "WETH": "0x4200000000000000000000000000000000000006", + "LSK": "0xac485391eb2d7d88253a7f1ef18c37f4242d1a24" + }, + "flow": { + "WFLOW": "0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e", + "ankrFLOWEVM": "0x1b97100eA1D7126C4d60027e231EA4CB25314bdb", + "USDC_e": "0x7f27352d5f83db87a5a3e00f4b07cc2138d8ee52" + }, + "matchain": { + "WBNB": "0x4200000000000000000000000000000000000006" + }, + "fuel": { + "USDC": "0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b", + "ETH": "0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07", + "USDT": "0xa0265fb5c32f6e8db3197af3c7eb05c48ae373605b8165b6f4a51c5b0ba4812e", + "sDAI": "0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958", + "mBTC": "0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b", + "METH": "0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4", + "RZETH": "0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0" + }, + "wc": { + "USDC_e": "0x79A02482A880bCE3F13e09Da970dC34db4CD24d1", + "WLD": "0x2cFc85d8E48F8EAB294be644d9E25C3030863003", + "WBTC": "0x03c7054bcb39f7b2e5b2c7acb37583e32d70cfa3", + "WETH": "0x4200000000000000000000000000000000000006" + }, + "apechain": { + "WAPE": "0x48b62137EdfA95a428D35C09E44256a739F6B557", + "sDAI": "0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4", + "ApeETH": "0xcF800F4948D16F23333508191B1B1591daF70438" + }, + "zircuit": { + "WETH": "0x4200000000000000000000000000000000000006" + }, + "hedera": { + "XSAUCE": "0x00000000000000000000000000000000001647e8", + "USDC": "0x000000000000000000000000000000000006f89a", + "KARATE": "0x000000000000000000000000000000000022d6de", + "HBARX": "0x00000000000000000000000000000000000cba44", + "SAUCE": "0x00000000000000000000000000000000000b2ad5", + "WHBAR": "0x0000000000000000000000000000000000163b5a", + "DOVU": "0x000000000000000000000000000000000038b3db", + "HLQT": "0x00000000000000000000000000000000005c9f70", + "HST": "0x00000000000000000000000000000000000ec585", + "PACK": "0x0000000000000000000000000000000000492a28", + "STEAM": "0x000000000000000000000000000000000030fb8b" + }, + "morph": { + "WETH": "0x5300000000000000000000000000000000000011", + "USDT": "0xc7d67a9cbb121b3b0b9c053dd9f469523243379a", + "WBTC": "0x803dce4d3f4ae2e17af6c51343040dee320c149d" + }, + "eclipse": { + "ETH": "So11111111111111111111111111111111111111112", + "ETH_1": "9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP", + "SOL": "BeRUj3h7BqkbdfFU7FBNYbodgf8GCHodzKvF9aVjNNfL", + "USDC": "AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE", + "WIF": "841P4tebEgNux2jaWSjCoi9LhrVr9eHGjLc758Va3RPH" + }, + "unit0": { + "UNIT": "0xcf43f7703d9b4e8835f977ef364b4014fa7e856e" + }, + "rbn": { + "WRBNT": "0x6ed1f491e2d31536d6561f6bdb2adc8f092a6076" + }, + "shido": { + "WSHIDO": "0x8cbaffd9b658997e7bf87e98febf6ea6917166f7", + "USDC": "0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd" } } \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index afeae9679c8b..c588acff7a35 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -42,150 +42,6 @@ const fixBalancesTokens = { ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, - stellar: { - "CDTKPWPLOURQA2SGTKTUQOWRCBZEORB4BWBOMJ3D3ZTQQSGE5F6JBQLV": { coingeckoId: "euro-coin", decimals: 7 }, - "CAUIKL3IYGMERDRUN6YSCLWVAKIFG5Q4YJHUKM4S4NJZQIA3BAS6OJPK": { coingeckoId: "aquarius", decimals: 7 }, - - }, - shape: { - [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, - '0x48A9B22b80F566E88f0f1DcC90Ea15A8A3bAE8a4': { coingeckoId: 'ethereum', decimals: 18 }, - }, - hela: { - '0xf5b85320a772b436cb8105441a3db9ba29437b4a': { coingeckoId: "usd-coin", decimals: 6 }, - '0xd3442073fa7ccf8a7c39d95dc125cd59497aa078': { coingeckoId: "tether", decimals: 6 }, - '0x3a035615e101373fa9ba21c5bea7fe4026fc40b4': { coingeckoId: "hela-usd", decimals: 18 }, - }, - heco: { - [ADDRESSES.heco.WHT]: { coingeckoId: 'huobi-token', decimals: 18 }, - }, - base: { - [ADDRESSES.base.rETH]: { coingeckoId: 'rocket-pool-eth', decimals: 18 }, - '0x0a27e060c0406f8ab7b64e3bee036a37e5a62853': { coingeckoId: 'zai-stablecoin', decimals: 18 }, - '0xc26c9099bd3789107888c35bb41178079b282561': { coingeckoId: 'solv-protocol-solvbtc-bbn', decimals: 18 }, - }, - op_bnb: { - [ADDRESSES.defiverse.USDC]: { coingeckoId: 'binance-bitcoin', decimals: 18 }, - }, - lac: { - [ADDRESSES.null]: { coingeckoId: "la-coin", decimals: 18 }, - [ADDRESSES.lac.LAC]: { coingeckoId: "la-coin", decimals: 18 }, - '0x7dc8b9e3b083c26c68f0b124ca923aaec7fbee39': { coingeckoId: 'tether', decimals: 6 }, - '0x51115241c7b8361eee88d8610f71d0a92cee5323': { coingeckoId: 'usd-coin', decimals: 6 }, - }, - lisk: { - [ADDRESSES.bob.USDT]: { coingeckoId: 'tether', decimals: 6 }, - [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, - '0xac485391eb2d7d88253a7f1ef18c37f4242d1a24': { coingeckoId: 'lisk', decimals: 18 }, - }, - bob: { - [ADDRESSES.bob.SolvBTC]: { coingeckoId: "solv-btc", decimals: 18 }, - [ADDRESSES.bob.SolvBTC_BBN]: { coingeckoId: "solv-protocol-solvbtc-bbn", decimals: 18 }, - [ADDRESSES.bob.uniBTC]: { coingeckoId: "universal-btc", decimals: 8 } - }, - flow: { - '0xd3bF53DAC106A0290B0483EcBC89d40FcC961f3e': { coingeckoId: 'flow', decimals: 18 }, - '0x1b97100eA1D7126C4d60027e231EA4CB25314bdb': { coingeckoId: 'ankr-staked-flow', decimals: 18 }, - [ADDRESSES.milkomeda.BNB]: { coingeckoId: 'usd-coin', decimals: 6 }, - }, - core: { - '0x782e2b85fda9a8224c17b191fc5de1e085a962b2': { coingeckoId: "wrapped-bitcoin-universal", decimals: 18 }, - }, - matchain: { - [ADDRESSES.null]: { coingeckoId: 'binancecoin', decimals: 18 }, - [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'binancecoin', decimals: 18 }, - }, - rollux: { - '0x570baA32dB74279a50491E88D712C957F4C9E409': { coingeckoId: 'uno-re', decimals: 18 }, - [ADDRESSES.rollux.WETH]: { coingeckoId: 'weth', decimals: 18 }, - [ADDRESSES.rollux.WBTC]: { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, - }, - taiko: { - [ADDRESSES.taiko.LRC]: { coingeckoId: "loopring", decimals: 18 }, - }, - bitkub: { - [ADDRESSES.bitkub.KKUB]: { coingeckoId: 'bitkub-coin', decimals: 18 }, - }, - fuel: { - // https://docs.fuel.network/docs/verified-addresses/assets/ - '0x286c479da40dc953bddc3bb4c453b608bba2e0ac483b077bd475174115395e6b': { coingeckoId: 'usd-coin', decimals: 6 }, - '0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07': { coingeckoId: 'ethereum', decimals: 9 }, - '0xa0265fb5c32f6e8db3197af3c7eb05c48ae373605b8165b6f4a51c5b0ba4812e': { coingeckoId: 'tether', decimals: 6 }, - '0x9e46f919fbf978f3cad7cd34cca982d5613af63ff8aab6c379e4faa179552958': { coingeckoId: 'savings-dai', decimals: 9 }, - '0xaf3111a248ff7a3238cdeea845bb2d43cf3835f1f6b8c9d28360728b55b9ce5b': { coingeckoId: 'manta-mbtc', decimals: 9 }, - '0xafd219f513317b1750783c6581f55530d6cf189a5863fd18bd1b3ffcec1714b4': { coingeckoId: 'manta-meth', decimals: 9 }, - '0x91b3559edb2619cde8ffb2aa7b3c3be97efd794ea46700db7092abeee62281b0': { coingeckoId: 'renzo-restaked-eth', decimals: 9 }, - }, - wc: { - '0x79A02482A880bCE3F13e09Da970dC34db4CD24d1': { coingeckoId: 'usd-coin', decimals: 6 }, - '0x2cFc85d8E48F8EAB294be644d9E25C3030863003': { coingeckoId: 'worldcoin-wld', decimals: 18 }, - [ADDRESSES.bob.WBTC]: { coingeckoId: 'bitcoin', decimals: 8 }, - [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'weth', decimals: 18 } - }, - apechain: { - '0x48b62137EdfA95a428D35C09E44256a739F6B557': { coingeckoId: 'apecoin', decimals: 18 }, - '0xA2235d059F80e176D931Ef76b6C51953Eb3fBEf4': { coingeckoId: 'savings-dai', decimals: 18 }, - '0xcF800F4948D16F23333508191B1B1591daF70438': { coingeckoId: 'staked-ether', decimals: 18 }, - }, - zircuit: { - [ADDRESSES.optimism.WETH_1]: { coingeckoId: 'ethereum', decimals: 18 }, - }, - bsquared: { - '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3': { coingeckoId: 'lorenzo-stbtc', decimals: 18 } - }, - hedera: { - '0x00000000000000000000000000000000001647e8': { coingeckoId: 'xsauce', decimals: 6 }, - '0x000000000000000000000000000000000006f89a': { coingeckoId: 'usd-coin', decimals: 6 }, - '0x000000000000000000000000000000000022d6de': { coingeckoId: 'karate-combat', decimals: 8 }, - '0x00000000000000000000000000000000000cba44': { coingeckoId: 'hbarx', decimals: 8 }, - '0x00000000000000000000000000000000000b2ad5': { coingeckoId: 'saucerswap', decimals: 6 }, - '0x0000000000000000000000000000000000000000': { coingeckoId: 'hedera-hashgraph', decimals: 18 }, - '0x0000000000000000000000000000000000163b5a': { coingeckoId: 'hedera-hashgraph', decimals: 8 }, - '0x000000000000000000000000000000000038b3db': { coingeckoId: 'dovu-2', decimals: 8 }, - '0x00000000000000000000000000000000005c9f70': { coingeckoId: 'hedera-liquity', decimals: 8 }, - '0x00000000000000000000000000000000000ec585': { coingeckoId: 'headstarter', decimals: 8 }, - '0x0000000000000000000000000000000000492a28': { coingeckoId: 'hashpack', decimals: 6 }, - '0x000000000000000000000000000000000030fb8b': { coingeckoId: 'steam', decimals: 2 }, - }, - morph: { - '0x5300000000000000000000000000000000000011': { coingeckoId: 'ethereum', decimals: 18 }, - '0xc7d67a9cbb121b3b0b9c053dd9f469523243379a': { coingeckoId: 'tether', decimals: 6 }, - '0x803dce4d3f4ae2e17af6c51343040dee320c149d': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, - }, - btr: { - '0xC39E757dCb2b17B79A411eA1C2810735dc9032F8': { coingeckoId: 'solv-protocol-solvbtc', decimals: 18 }, - }, - iotex: { - '0x236f8c0a61da474db21b693fb2ea7aab0c803894': { coingeckoId: 'iotex', decimals: 18 }, - }, - mantle: { - '0x93919784C523f39CACaa98Ee0a9d96c3F32b593e': { coingeckoId: 'universal-btc', decimals: 18 }, - '0xC75D7767F2EdFbc6a5b18Fc1fA5d51ffB57c2B37': { coingeckoId: 'pumpbtc', decimals: 18 }, - '0xCAbAE6f6Ea1ecaB08Ad02fE02ce9A44F09aebfA2': { coingeckoId: 'wrapped-bitcoin', decimals: 8 }, - }, - bsc: { - '0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a': { coingeckoId: 'universal-btc', decimals: 8 }, - }, - arbitrum: { - '0x6B2a01A5f79dEb4c2f3c0eDa7b01DF456FbD726a': { coingeckoId: 'universal-btc', decimals: 8 }, - }, - eclipse: { - 'So11111111111111111111111111111111111111112': { coingeckoId: 'ethereum', decimals: 9 }, - '9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP': { coingeckoId: 'ethereum', decimals: 9 }, - 'BeRUj3h7BqkbdfFU7FBNYbodgf8GCHodzKvF9aVjNNfL': { coingeckoId: 'solana', decimals: 9 }, - 'AKEWE7Bgh87GPp171b4cJPSSZfmZwQ3KaqYqXoKLNAEE': { coingeckoId: 'usd-coin', decimals: 6 }, - '841P4tebEgNux2jaWSjCoi9LhrVr9eHGjLc758Va3RPH': { coingeckoId: 'dogwifcoin', decimals: 6 }, - }, - unit0: { - '0xcf43f7703d9b4e8835f977ef364b4014fa7e856e': { coingeckoId: 'unit0', decimals: 18 }, - }, - rbn: { - '0x6ed1f491e2d31536d6561f6bdb2adc8f092a6076': { coingeckoId: 'redbelly-network-token', decimals: 18 }, - }, - shido: { - '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: 'shido', decimals: 18 }, - '0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd': { coingeckoId: 'usd-coin', decimals: 6 }, - }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 826fdce367c50553add4bc5f09c48a1a3991c7b2 Mon Sep 17 00:00:00 2001 From: Andrija Sagi Date: Mon, 18 Nov 2024 07:03:52 +0100 Subject: [PATCH 368/787] Adding SRWAio (#12323) --- projects/SRWAio/index.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/SRWAio/index.js diff --git a/projects/SRWAio/index.js b/projects/SRWAio/index.js new file mode 100644 index 000000000000..a1ed193b07c2 --- /dev/null +++ b/projects/SRWAio/index.js @@ -0,0 +1,31 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +const { queryAddresses, sumTokens } = require('../helper/chain/radixdlt'); + +const componentAddress = 'component_rdx1cps7jyr7vqrtm2uxj8d77a9fyjkv804nhqzvfn2u7m58tg3wdk2qky' + +const resources = [ + { + address: ADDRESSES.radixdlt.XRD, + }, + { + address: 'resource_rdx1t4upr78guuapv5ept7d7ptekk9mqhy605zgms33mcszen8l9fac8vf', + } +] + +async function tvl(api) { + return sumTokens({ api, owners: [componentAddress] }); +} + +async function borrowed(api) { + const componentData = await queryAddresses({ addresses: [componentAddress] }); + resources.forEach((resource) => { + const matchingEntry = componentData[0].details.state.fields[12]?.entries.find((entry) => entry.key.value === resource.address); + api.add(matchingEntry.key.value, Number(matchingEntry.value.value)); + }); +} + +module.exports = { + radixdlt: { tvl, borrowed }, + timetravel: false, +}; \ No newline at end of file From 3d04086801254f105659e852cdf1350d998fc67e Mon Sep 17 00:00:00 2001 From: tonfarmix <164873385+tonfarmix@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:18:00 +0300 Subject: [PATCH 369/787] Farmix (https://farmix.tg) project listing (#12322) Co-authored-by: Maktd Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/farmix/index.js | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 projects/farmix/index.js diff --git a/projects/farmix/index.js b/projects/farmix/index.js new file mode 100644 index 000000000000..559b765ffe31 --- /dev/null +++ b/projects/farmix/index.js @@ -0,0 +1,54 @@ +const { sleep } = require('../helper/utils') +const { call } = require('../helper/chain/ton'); +const plimit = require("p-limit"); +const ADDRESSES = require('../helper/coreAssets.json'); + +const _rateLimited = plimit(1) +const rateLimited = fn => (...args) => _rateLimited(() => fn(...args)) +const getPoolJettonsRateLimited = rateLimited(getPoolCurrentJettons); + + +const POOLS = [ + 'EQC-jlX83DYZgSWRW5q_XuHLWWFQPp2xGmc8BCoeWckKpeHs', + 'EQD6gQSWCayHh0FvUnTXlpfizIWiq7UeE4gYvXGYtEhIYJ8q', + 'EQCE_6TevKEpj8OTz3rZt1D5bR6fENQbSN2bbW0jzxbWGGIo', +] + +const UNDERLYING_JETTONS = [ + ADDRESSES.ton.TON, + ADDRESSES.ton.USDT, + ADDRESSES.ton.NOT, +] + + +async function getPoolCurrentJettons(api, poolAddr, underlyingJettonAddr, isBorrowed) { + const result = await call({ + target: poolAddr, + abi: 'get_expected_state', + params: [['num', 0]] + }); + await sleep(1000 * (2 * Math.random() + 3)); + const jettonCurrentAmount = isBorrowed ? result[6] : result[5]; + api.add(underlyingJettonAddr, jettonCurrentAmount); +} + +async function tvl(api) { + await Promise.all(POOLS.map(async (poolAddr, i) => { + return getPoolJettonsRateLimited(api, poolAddr, UNDERLYING_JETTONS[i]); + })) +} + +async function borrowed(api) { + await Promise.all(POOLS.map(async (poolAddr, i) => { + return getPoolJettonsRateLimited(api, poolAddr, UNDERLYING_JETTONS[i], true); + })) +} + +module.exports = { + methodology: 'TVL is counted only as current available pool liquidity. Borrowed jettons not included in the tvl', + timetravel: false, + ton: { + tvl, + borrowed, + } +} \ No newline at end of file From 204954024f93dad25e6b8aedfd39a53c4a8b7a8b Mon Sep 17 00:00:00 2001 From: hyphin Date: Mon, 18 Nov 2024 08:18:18 +0200 Subject: [PATCH 370/787] [ADD] SuperSwap V2 & V3 (#12321) --- projects/superswap-v2/index.js | 13 +++++++++++++ projects/superswap-v3/index.js | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 projects/superswap-v2/index.js create mode 100644 projects/superswap-v3/index.js diff --git a/projects/superswap-v2/index.js b/projects/superswap-v2/index.js new file mode 100644 index 000000000000..eea758e2d450 --- /dev/null +++ b/projects/superswap-v2/index.js @@ -0,0 +1,13 @@ +const { getUniTVL } = require("../helper/unknownTokens") +const FACTORY = "0x22505cb4d5d10b2c848a9d75c57ea72a66066d8c" + +const dexTVL = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, permitFailure: true }) + + +module.exports = { + misrepresentedTokens: true, + methodology: `Uses factory(${FACTORY}) address and whitelisted tokens address to find and price Liquidity Pool pairs.`, + optimism: { + tvl: dexTVL, + } +}; diff --git a/projects/superswap-v3/index.js b/projects/superswap-v3/index.js new file mode 100644 index 000000000000..b523c956f781 --- /dev/null +++ b/projects/superswap-v3/index.js @@ -0,0 +1,8 @@ +const { uniV3Export } = require("../helper/uniswapV3") + +module.exports = { + methodology: "TVL accounts for the liquidity on all AMM pools taken from the factory contract", + ...uniV3Export({ + optimism: { factory: "0xe52a36Bb76e8f40e1117db5Ff14Bd1f7b058B720", fromBlock: 124982239 }, + }) +} From 856aace883f96690ff3af4043823ac0ee72bd271 Mon Sep 17 00:00:00 2001 From: Tommy Kang Date: Mon, 18 Nov 2024 18:30:37 +0900 Subject: [PATCH 371/787] fragmetric: support BNSOL (#12325) --- projects/fragmetric/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/fragmetric/index.js b/projects/fragmetric/index.js index 78804daa9e24..462f79a03840 100644 --- a/projects/fragmetric/index.js +++ b/projects/fragmetric/index.js @@ -6,9 +6,11 @@ async function tvl() { "4b3xtGBwmP9FQyQ85HDmyEtQrLdoVzz6NBwBjaRBzJuS", "BXUyJdESgoyssvATKa3omD7zHtdeztpWnG13mDUQ6fcM", "B2vjfDaLsaJ32ESoFsVf7NPS2hd5f4QisiPLiXBrS1BK", + "7rtyMjMKPrmKfciayvxaZdKiY9D7Rx9o3JtW3QvsUnsc", "HSKvv9UFCn4c6Jq3j8iiJfFgXFjRE6dr6QhWX2KD8gGU", "3KdpoeWuwaXLuukf56p8e1FtDKjY8pCmtZdmZejUctwP", "9grKYUmguSLVC9RHW1xKcLpiAphJrmcDkTVTCg9ebpFz", + "EbMiibdEBswBKxATPtYEiaRcx7uzJvyWvexVzUJ6iyje", ], solOwners: [ "3H22A3T3CMyoGzAURZ4szV5Hmt64Dooo5g9Ns8h1kYy7", From 2f94e0fd5505ee578375bb152f8f6723c8ed7b9a Mon Sep 17 00:00:00 2001 From: Cian <96416801+NatureLab@users.noreply.github.com> Date: Mon, 18 Nov 2024 20:12:31 +0800 Subject: [PATCH 372/787] Add cian-yl. (#12326) --- projects/cian-yl/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/cian-yl/index.js diff --git a/projects/cian-yl/index.js b/projects/cian-yl/index.js new file mode 100644 index 000000000000..0b9afbfc121f --- /dev/null +++ b/projects/cian-yl/index.js @@ -0,0 +1,25 @@ +// cian yield layer +const config = { + ethereum: [ + "0xB13aa2d0345b0439b064f26B82D8dCf3f508775d", + "0xd87a19fF681AE98BF10d2220D1AE3Fbd374ADE4e", + "0x9fdDAD44eD6b77e6777dC1b16ee4FCcCBaF0A019", + "0x6c77bdE03952BbcB923815d90A73a7eD7EC895D1", + "0xcc7E6dE27DdF225E24E8652F62101Dab4656E20A", + "0xd4Cc9b31e9eF33E392FF2f81AD52BE8523e0993b", + "0x3D086B688D7c0362BE4f9600d626f622792c4a20", + ], + arbitrum: ["0x15cbFF12d53e7BdE3f1618844CaaEf99b2836d2A"], +}; + +module.exports = { + doublecounted: true, +}; + +Object.keys(config).forEach((chain) => { + module.exports[chain] = { + tvl: async (_, _b, _cb, { api }) => { + return api.erc4626Sum({ calls: config[chain], isOG4626: true }); + }, + }; +}); From 657668128e6c3fcc8cfdecfd8777685575db409f Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:14:01 +0100 Subject: [PATCH 373/787] Update: BUIDL (BlackRock RWA), more chains (#12330) --- projects/securitize/index.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/projects/securitize/index.js b/projects/securitize/index.js index 97790fae5b48..7f0cbae78c00 100644 --- a/projects/securitize/index.js +++ b/projects/securitize/index.js @@ -1,15 +1,13 @@ const ADDRESSES = require('../helper/coreAssets.json') -const BUIDL = "0x7712c34205737192402172409a8f7ccef8aa2aec" +const BUIDL = { + ethereum: '0x7712c34205737192402172409a8f7ccef8aa2aec', + polygon: '0x2893ef551b6dd69f661ac00f11d93e5dc5dc0e99', + avax: '0x53fc82f14f009009b440a706e31c9021e1196a2f', + optimism: '0xa1cdab15bba75a80df4089cafba013e376957cf5', + arbitrum: '0xa6525ae43edcd03dc08e775774dcabd3bb925872', +} -module.exports = { - ethereum: { - tvl: async (api) => { - const totalSupply = await api.call({ - target: BUIDL, - abi: 'erc20:totalSupply' - }) - return api.add(ADDRESSES.ethereum.USDC, totalSupply) - } - } -} \ No newline at end of file +Object.keys(BUIDL).forEach((chain) => { + module.exports[chain] = { tvl: async (api) => { api.add(ADDRESSES.ethereum.USDC, await api.call({ target: BUIDL[chain], abi: 'erc20:totalSupply' }), { skipChain: true }) } } +}) From 415dfa654c29852412feaa361c0589c5d906d6db Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:15:55 +0100 Subject: [PATCH 374/787] Update: Franklin (RWA), more chains (#12331) --- projects/franklinTempleton-finance/index.js | 29 +++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/projects/franklinTempleton-finance/index.js b/projects/franklinTempleton-finance/index.js index bbbaf4b88308..01f33d2aabff 100644 --- a/projects/franklinTempleton-finance/index.js +++ b/projects/franklinTempleton-finance/index.js @@ -1,10 +1,15 @@ const { toUSDTBalances } = require('../helper/balances'); -const BENJI_STELLAR = {ticker: "BENJI", address: 'GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5'} -const BENJI_POLYGON = '0x408a634b8a8f0de729b48574a3a7ec3fe820b00a' +const BENJI = { + stellar: {ticker: "BENJI", address: 'GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5'}, + arbitrum: '0xb9e4765bce2609bc1949592059b17ea72fee6c6a', + polygon: '0x408a634b8a8f0de729b48574a3a7ec3fe820b00a', + avax: '0xe08b4c1005603427420e64252a8b120cace4d122', + base: '0x60cfc2b186a4cf647486e42c42b11cc6d571d1e4' +} const stellarTvl = async (api) => { - const stellarApi = `https://api.stellar.expert/explorer/public/asset/${BENJI_STELLAR.ticker}-${BENJI_STELLAR.address}` + const stellarApi = `https://api.stellar.expert/explorer/public/asset/${BENJI[api.chain].ticker}-${BENJI[api.chain].address}` const response = await fetch(stellarApi) const {supply, toml_info} = await response.json() const adjustedSupply = toUSDTBalances((supply / Math.pow(10, toml_info.decimals))) @@ -12,17 +17,19 @@ const stellarTvl = async (api) => { return api.add(tokenAddress, tokenBalance, { skipChain: true }) } -const polygonTvl = async (api) => { +const evmTVL = async (api) => { const [decimals, totalSupply] = await Promise.all([ - api.call({target: BENJI_POLYGON, abi:'erc20:decimals'}), - api.call({target: BENJI_POLYGON, abi:'erc20:totalSupply'}) + api.call({target: BENJI[api.chain], abi:'erc20:decimals'}), + api.call({target: BENJI[api.chain], abi:'erc20:totalSupply'}) ]) + const adjustedSupply = toUSDTBalances((totalSupply / Math.pow(10, decimals))) const [[tokenAddress, tokenBalance]] = Object.entries(adjustedSupply); - api.add(tokenAddress, tokenBalance, {skipChain: true} ) -} + api.add(tokenAddress, tokenBalance, { skipChain: true }) -module.exports = { - stellar: {tvl: stellarTvl}, - polygon: {tvl: polygonTvl}, } + +Object.keys(BENJI).forEach((chain) => { + module.exports[chain] = { tvl: chain === 'stellar' ? stellarTvl : evmTVL }; +}); + From 02bb75006820a6d7085da0f00fc1ccf31c67fa9b Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Mon, 18 Nov 2024 14:15:03 +0000 Subject: [PATCH 375/787] pulsechain --- projects/pulsechain/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/pulsechain/index.js diff --git a/projects/pulsechain/index.js b/projects/pulsechain/index.js new file mode 100644 index 000000000000..133c1ce524d0 --- /dev/null +++ b/projects/pulsechain/index.js @@ -0,0 +1,13 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owner: '0x1715a3E4A142d8b698131108995174F37aEBA10D', + fetchCoValentTokens: true, + permitFailure: true + }), + }, +}; From 0a2ac6671c3ed9bbb1eca0352d564e0c390d4348 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 18 Nov 2024 14:33:48 +0000 Subject: [PATCH 376/787] Update Hedgehog-Markets support (#12315) Co-authored-by: jkdipeppe --- projects/hedgehog-markets/index.js | 118 ++++++++++++++++++----------- tsconfig.json | 2 +- 2 files changed, 74 insertions(+), 46 deletions(-) diff --git a/projects/hedgehog-markets/index.js b/projects/hedgehog-markets/index.js index a5ff4b4cc797..a700868ce533 100644 --- a/projects/hedgehog-markets/index.js +++ b/projects/hedgehog-markets/index.js @@ -1,37 +1,65 @@ - const { PublicKey } = require("@solana/web3.js"); -const { getProvider, sumTokens2, getConnection, decodeAccount, } = require("../helper/solana") -const { Program, } = require("@project-serum/anchor"); +const { getProvider, sumTokens2, getConnection, decodeAccount } = require("../helper/solana"); +const { Program } = require("@project-serum/anchor"); async function tvl(api) { - const provider = getProvider() - const connection = getConnection() - const tokenAccounts = [] - const owners = [] - await getClassicMarketTokenAccounts() - await addP2PBalances() - await addParlay() - await addParimutuel() - - const balances = api.getBalances() - await sumTokens2({ owners, balances, }) - return sumTokens2({ tokenAccounts, balances, }) + const provider = getProvider(); + const connection = getConnection(); + + const tokenAccounts = []; + const owners = []; + + await getClassicMarketTokenAccounts(); + await addP2PDepositTokenAccounts(); + await addP2PLuloBalances(); + await addParlay(); + await addParimutuel(); + + const balances = api.getBalances(); + + await sumTokens2({ owners, balances }); + + return sumTokens2({ tokenAccounts, balances }); async function getClassicMarketTokenAccounts() { + const classicMarketProgramId = "D8vMVKonxkbBtAXAxBwPPWyTfon8337ARJmHvwtsF98G"; + const idl = await Program.fetchIdl(classicMarketProgramId, provider); + + const program = new Program(idl, classicMarketProgramId, provider); + const markets = await program.account.market.all(); + const collateralAccounts = markets.map(({ account }) => account.marketCollateral); + tokenAccounts.push(...collateralAccounts); + } - const classicMarketProgramId = "D8vMVKonxkbBtAXAxBwPPWyTfon8337ARJmHvwtsF98G" - const idl = await Program.fetchIdl(classicMarketProgramId, provider) - const program = new Program(idl, classicMarketProgramId, provider) - const markets = await program.account.market.all() - const collateralAccounts = markets.map(({ account }) => account.marketCollateral) - tokenAccounts.push(...collateralAccounts) + async function addP2PDepositTokenAccounts() { + const programId = new PublicKey("P2PototC41acvjMc9cvAoRjFjtaRD5Keo9PvNJfRwf3"); + + const result = await connection.getProgramAccounts(programId, { + encoding: "base64", + // We only care about the market addresses. + dataSlice: { offset: 0, length: 0 }, + filters: [ + // Market accounts have a discriminator of 3 at offset 0. + { memcmp: { offset: 0, bytes: "4" } }, + ], + }); + + for (const { pubkey } of result) { + // Market deposit account. + const [deposit] = PublicKey.findProgramAddressSync( + [Buffer.from("deposit"), pubkey.toBuffer()], + programId, + ); + + tokenAccounts.push(deposit); + } } async function addParlay() { - const programId = new PublicKey('PLYaNRbQs9GWyVQdcLrzPvvZu7NH4W2sneyHcEimLr7') - const poolOwner = "8Y46GkrbUqXnbs6kPD6SWr44NjcKPEWYzvpAn8UB5duR" - owners.push(poolOwner) + const programId = new PublicKey("PLYaNRbQs9GWyVQdcLrzPvvZu7NH4W2sneyHcEimLr7"); + const poolOwner = "8Y46GkrbUqXnbs6kPD6SWr44NjcKPEWYzvpAn8UB5duR"; + owners.push(poolOwner); const accounts = await connection.getProgramAccounts(programId, { // We only care about: @@ -45,20 +73,20 @@ async function tvl(api) { // Open markets have a state of 0 at offset 149. { memcmp: { offset: 149, bytes: "1" } }, ], - }) + }); accounts.forEach(({ account }) => { - const data = decodeAccount('hhParlay', account) + const data = decodeAccount("hhParlay", account); - api.add(data.mint.toString(), Number(data.entryCount) * Number(data.entryCost)) - }) + api.add(data.mint.toString(), Number(data.entryCount) * Number(data.entryCost)); + }); } - async function addP2PBalances() { + async function addP2PLuloBalances() { // https://github.com/Hedgehog-Markets/hedgehog-program-library/blob/master/p2p/idl.json - const programId = new PublicKey('P2PzLraW8YF87BxqZTZ5kgrfvzcrKGPnqUBNhqmcV9B') - const poolOwner = "J9EH18EWSo8s69gouHGNy5zFHkhcHRbb9zBZXwSG4cHy" - owners.push(poolOwner) + const programId = new PublicKey("P2PzLraW8YF87BxqZTZ5kgrfvzcrKGPnqUBNhqmcV9B"); + const poolOwner = "J9EH18EWSo8s69gouHGNy5zFHkhcHRbb9zBZXwSG4cHy"; + owners.push(poolOwner); const accounts = await connection.getProgramAccounts(programId, { // We only care about: @@ -68,24 +96,24 @@ async function tvl(api) { dataSlice: { offset: 69, length: 56 }, filters: [ // Market accounts have a discriminator of 3 at offset 0. - { memcmp: { offset: 0, bytes: "4", } }, + { memcmp: { offset: 0, bytes: "4" } }, // Open markets have a state of 0 at offset 129. { memcmp: { offset: 129, bytes: "1" } }, ], }); accounts.forEach(({ account: { data } }) => { - const mint = new PublicKey(data.slice(0, 32)).toString() + const mint = new PublicKey(data.slice(0, 32)).toString(); const yesAmount = Number(data.readUInt8(40)); const noAmount = Number(data.readUInt8(48)); - api.add(mint, yesAmount + noAmount) - }) + api.add(mint, yesAmount + noAmount); + }); } async function addParimutuel() { - const programId = new PublicKey('PARrVs6F5egaNuz8g6pKJyU4ze3eX5xGZCFb3GLiVvu') - const poolOwner = "3SAUPiGiATqv8TBgvzSJqpLxLGF6LbJamvimueJQT7WT" - owners.push(poolOwner) + const programId = new PublicKey("PARrVs6F5egaNuz8g6pKJyU4ze3eX5xGZCFb3GLiVvu"); + const poolOwner = "3SAUPiGiATqv8TBgvzSJqpLxLGF6LbJamvimueJQT7WT"; + owners.push(poolOwner); const accounts = await connection.getProgramAccounts(programId, { filters: [ @@ -94,20 +122,20 @@ async function tvl(api) { // Open markets have a state of 0 at offset 149. { memcmp: { offset: 149, bytes: "1" } }, ], - }) + }); accounts.forEach(({ account: { data } }) => { - const token = new PublicKey(data.slice(69,69+ 32)).toString() + const token = new PublicKey(data.slice(69, 69 + 32)).toString(); // Amounts is a u64 array with u8 length prefix at offset 131. const amountsLen = data.readUint8(131); - let amounts = [] + let amounts = []; for (let i = 0; i < amountsLen; i++) { - amounts.push(data.readBigUint64LE(132 + i * 8).toString()) + amounts.push(data.readBigUint64LE(132 + i * 8).toString()); } - api.add(token, amounts) - }) + api.add(token, amounts); + }); } } diff --git a/tsconfig.json b/tsconfig.json index 97ad9508cb44..682d025ac436 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,4 +18,4 @@ "strictNullChecks": false, "typeRoots": ["./typings/", "./node_modules/@types/"] } -} +} \ No newline at end of file From e18d5e985013cf6df16724d0e0e260943efd87ec Mon Sep 17 00:00:00 2001 From: vokkantthakkar <51082769+vokkantthakkar@users.noreply.github.com> Date: Mon, 18 Nov 2024 20:06:15 +0530 Subject: [PATCH 377/787] add ezSOL to Renzo (#12334) --- projects/renzo/index.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/projects/renzo/index.js b/projects/renzo/index.js index 0cfc8323661a..4ba6f3fdcd24 100644 --- a/projects/renzo/index.js +++ b/projects/renzo/index.js @@ -1,4 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens2 } = require("../helper/solana"); const L1_EZ_ETH_ADDRESS = "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110"; const L2_EZ_ETH_ADDRESS = ADDRESSES.blast.ezETH; const L1_LOCKBOX_ADDRESS = "0xC8140dA31E6bCa19b287cC35531c2212763C2059"; @@ -19,15 +20,29 @@ async function ethTvl(api) { api.add(L1_PZ_ETH_ADDRESS, pzEthBalance); } +async function solanaTvl() { + return sumTokens2( + { + tokenAccounts: [ + "9VBi7unB9Sz5eBNUdvQH2xzUENXvNsaiEkP9p2Cabvsy" + ] + } + ) +} + const chains = ["mode", "blast", "bsc", "linea", "arbitrum", "base", "optimism", "fraxtal","zircuit","sei" ] module.exports = { doublecounted: true, ethereum: { - tvl: ethTvl, + tvl: ethTvl + }, + solana: { + tvl: solanaTvl } } chains.forEach(chain => { module.exports[chain] = { tvl: L2Tvl } }) + From 375619d504dc33a27ca4ab19aba7c11db57172e5 Mon Sep 17 00:00:00 2001 From: Krugo D <85778179+Krugo-D@users.noreply.github.com> Date: Mon, 18 Nov 2024 21:38:57 +0700 Subject: [PATCH 378/787] Add TVL tracking for Ocelex Fusion pools and Ocelex V1 pools to DefiLlama (#12332) --- projects/ocelex-v1/index.js | 6 ++++++ projects/ocelex/index.js | 9 +++++++++ 2 files changed, 15 insertions(+) create mode 100644 projects/ocelex-v1/index.js create mode 100644 projects/ocelex/index.js diff --git a/projects/ocelex-v1/index.js b/projects/ocelex-v1/index.js new file mode 100644 index 000000000000..a061c1757b92 --- /dev/null +++ b/projects/ocelex-v1/index.js @@ -0,0 +1,6 @@ +const { uniTvlExport } = require("../helper/unknownTokens"); + +module.exports = uniTvlExport("zircuit", "0xdd018347c29a27088eb2d0bf0637d9a05b30666c", { + hasStablePools: true, + useDefaultCoreAssets: true, +}); diff --git a/projects/ocelex/index.js b/projects/ocelex/index.js new file mode 100644 index 000000000000..01e0e7e3b41e --- /dev/null +++ b/projects/ocelex/index.js @@ -0,0 +1,9 @@ +const { uniV3Export } = require("../helper/uniswapV3"); + +module.exports = uniV3Export({ + zircuit: { + factory: "0x03057ae6294292b299a1863420edD65e0197AFEf", + fromBlock: 3709368, + isAlgebra: true, + }, +}) \ No newline at end of file From 75f10f8f100ff803fd2602d8b29a8e2937e814cc Mon Sep 17 00:00:00 2001 From: ratex-tony Date: Mon, 18 Nov 2024 22:39:48 +0800 Subject: [PATCH 379/787] use alt to get the address list (#12333) --- projects/rate-x/index.js | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/projects/rate-x/index.js b/projects/rate-x/index.js index a67599fa8be7..b87ba3a32563 100644 --- a/projects/rate-x/index.js +++ b/projects/rate-x/index.js @@ -1,22 +1,23 @@ const { sumTokens2 } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); +const { getConnection } = require("../helper/solana"); async function tvl(api) { + const connection = getConnection(); + const lookupTableAddress = new PublicKey("eP8LuPmLaF1wavSbaB4gbDAZ8vENqfWCL5KaJ2BRVyV"); + + const lookupTableAccount = ( + await connection.getAddressLookupTable(lookupTableAddress) + ).value; + + const tokenAccounts = [] + for (let i = 0; i < lookupTableAccount.state.addresses.length; i++) { + const address = lookupTableAccount.state.addresses[i]; + tokenAccounts.push(address.toBase58()); + } + return sumTokens2({ - tokenAccounts: [ - 'EmLhAPj7J6LTAnomsLfZUKDtb4t2A8e6eofDSfTwMgkY', - 'DY3Rw6BZwf6epvWnVo8DSV6kYptEdCh7HbYmFRpdPxuH', - '3CppdkMFxuz7ASS27pB35EDbwgfUhwrarFYuWDBWWwHB', - 'Grk7mshVug1TafphUvuYBrzwRqadtmCcf7GGPoPKkgs6', - 'BpYbhwDZGpPvcKw3cSh5f9UqRaHfuxgz3avW9g324LUz', - '4nyfJ4JBsRJLij7VGCVUeHwKSLAAku66ptJamoodY29L', - '6opMSfkHgWsvG5KmZo8y2DuShaDHwXfB6VUuTx6W4Age', - '4Ejjk5w7HAWvmXYT57s5uwn8rs7i61nbpcTRQ9ABB11M', - '4xq7VjrJCU2Smk5JcJToik5hiEJ8RCvECReePP8Jg6q8', - 'B2YeVM6Kf3SKYLuH2nfucCmZwy8KJcQpd9e9JEuwv9mt', - '8DeQth4AWPXauRfgAEUy9WpHuyKKyYuNNsH76C5v1Hv7', - 'FS7TTuJejy7zjkdJXD9BjeLFZ44ipxxr2qmMMUKMZv6y', - '6K8yrdpm2dVaLSLpqoRJKv7SNuP54xmbv5KULcJzKTHc' - ], + tokenAccounts, balances: api.getBalances() }) } From d073742f17c120abb05e51556494824e2d2f8e07 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 18 Nov 2024 15:43:04 +0100 Subject: [PATCH 380/787] Fix: wrong values RocketPool (#12327) --- projects/rocketpool/abi.json | 13 --- projects/rocketpool/index.js | 200 ++++++++++------------------------- 2 files changed, 55 insertions(+), 158 deletions(-) delete mode 100644 projects/rocketpool/abi.json diff --git a/projects/rocketpool/abi.json b/projects/rocketpool/abi.json deleted file mode 100644 index e62ad3963955..000000000000 --- a/projects/rocketpool/abi.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "rocketNodeStaking.getNodeEffectiveRPLStake": "function getNodeEffectiveRPLStake(address _nodeAddress) view returns (uint256)", - "rocketNodeStaking.getTotalRPLStake": "uint256:getTotalRPLStake", - "rocketNetworkBalances.getTotalETHBalance": "uint256:getTotalETHBalance", - "rocketMinipoolQueue.getTotalLength": "uint256:getTotalLength", - "rocketMinipoolQueue.getTotalCapacity": "uint256:getTotalCapacity", - "rocketDepositPool.getBalance": "uint256:getBalance", - "rocketMinipoolManager.getMinipoolCountPerStatus": "function getMinipoolCountPerStatus(uint256 offset, uint256 limit) view returns (uint256 initialisedCount, uint256 prelaunchCount, uint256 stakingCount, uint256 withdrawableCount, uint256 dissolvedCount)", - "rocketMinipoolManager.getActiveMinipoolCount": "uint256:getActiveMinipoolCount", - "rocketMinipoolManager.getStakingMinipoolCount": "uint256:getStakingMinipoolCount", - "rocketVault.balanceOfToken": "function balanceOfToken(string _networkContractName, address _tokenAddress) view returns (uint256)", - "rocketVault.balanceOf": "function balanceOf(string _networkContractName) view returns (uint256)" -} \ No newline at end of file diff --git a/projects/rocketpool/index.js b/projects/rocketpool/index.js index b62bdf1b7392..32df6b962d93 100644 --- a/projects/rocketpool/index.js +++ b/projects/rocketpool/index.js @@ -1,156 +1,66 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk") -const abi = require('./abi.json') -const rocketMinipoolManager = '0x6293B8abC1F36aFB22406Be5f96D893072A8cF3a' +const ETH = ADDRESSES.null +const RPL = '0xd33526068d116ce69f19a9ee46f0bd304f21a51f' +const rocketNodeManager = '0x2b52479F6ea009907e46fc43e91064D1b92Fdc86' const rocketVault = '0x3bDC69C4E5e13E52A65f5583c23EFB9636b469d6' -const rocketNodeStaking_contract = '0x3019227b2b8493e45Bf5d25302139c9a2713BF15' - -const weth = ADDRESSES.ethereum.WETH -const rpl = '0xd33526068d116ce69f19a9ee46f0bd304f21a51f' - -async function tvl(timestamp, ethBlock, chainBlocks) { - // Get ETH staked for rETH, which is given by users and Node Operators - // Also get RPL staked by Node Operators to spin up a node - - // Get minipool count per status - let offset = 0 - const limit = 400, statusesCount = 5 - let minipool_count_per_status = new Array(statusesCount).fill(0); - while (true) { // eslint-disable-line - const {output: activeMinipoolCount} = await sdk.api.abi.call({ - target: rocketMinipoolManager, - params: [offset, limit], - abi: abi['rocketMinipoolManager.getMinipoolCountPerStatus'], - block: ethBlock, - chain: 'ethereum' - }) - const activeMinipoolCount_arr = [...Array(statusesCount).keys()].map(i => activeMinipoolCount[i.toString()]) - minipool_count_per_status = minipool_count_per_status.map((sum, idx) => sum + parseInt(activeMinipoolCount[idx])) - if (activeMinipoolCount_arr.reduce((a, b)=> a + parseInt(b), 0) < limit) { break; } - offset += limit - } - - // Get ETH and RPL balance of multiple rocketpool contracts as well as RPL staked - const [ - {output: rocketDepositPoolBalance}, - {output: rocketTokenRETHBalance}, - {output: totalRPLStake}, - {output: rocketDAONodeTrustedActions_rplBalance}, - {output: rocketAuctionManager_rplBalance} - ] = await Promise.all([ - sdk.api.abi.call({ - target: rocketVault, - params: ['rocketDepositPool'], - abi: abi['rocketVault.balanceOf'], - block: ethBlock, - chain: 'ethereum' - }), - sdk.api.abi.call({ - target: rocketVault, - params: ['rocketTokenRETH'], - abi: abi['rocketVault.balanceOf'], - block: ethBlock, - chain: 'ethereum' - }), - sdk.api.abi.call({ - target: rocketNodeStaking_contract, - abi: abi['rocketNodeStaking.getTotalRPLStake'], - block: ethBlock, - chain: 'ethereum' - }), - sdk.api.abi.call({ - target: rocketVault, - params: ['rocketDAONodeTrustedActions', rpl], - abi: abi['rocketVault.balanceOfToken'], - block: ethBlock, - chain: 'ethereum' - }), - sdk.api.abi.call({ - target: rocketVault, - params: ['rocketAuctionManager', rpl], - abi: abi['rocketVault.balanceOfToken'], - block: ethBlock, - chain: 'ethereum' - }), +const rocketRewardsPool = '0xEE4d2A71cF479e0D3d0c3c2C923dbfEB57E73111' +const trustedNodeManager = '0xb8e783882b11Ff4f6Cef3C501EA0f4b960152cc9' + +const abi = { + getNodeCount: "function getNodeCount() view returns (uint256)", + getNodeAddresses: "function getNodeAddresses(uint256 _offset, uint256 _limit) view returns (address[])", + getNodeDetails: "function getNodeDetails(address _nodeAddress) view returns ((bool exists, uint256 registrationTime, string timezoneLocation, bool feeDistributorInitialised, address feeDistributorAddress, uint256 rewardNetwork, uint256 rplStake, uint256 effectiveRPLStake, uint256 minimumRPLStake, uint256 maximumRPLStake, uint256 ethMatched, uint256 ethMatchedLimit, uint256 minipoolCount, uint256 balanceETH, uint256 balanceRETH, uint256 balanceRPL, uint256 balanceOldRPL, uint256 depositCreditBalance, uint256 distributorBalanceUserETH, uint256 distributorBalanceNodeETH, address withdrawalAddress, address pendingWithdrawalAddress, bool smoothingPoolRegistrationState, uint256 smoothingPoolRegistrationChanged, address nodeAddress))", + getPendingETHRewards: "function getPendingETHRewards() view returns (uint256)", + balanceOf: "function balanceOf(string _networkContractName) view returns (uint256)", + balanceOfToken: "function balanceOfToken(string _networkContractName, address _tokenAddress) view returns (uint256)", + getMemberAt: "function getMemberAt(uint256 _index) view returns (address)", + getMemberCount: "function getMemberCount() view returns (uint256)", + getMemberRPLBondAmount: "function getMemberRPLBondAmount(address _nodeAddress) view returns (uint256)" +}; + +const tvl = async (api) => { + const [nodeLength, pendingETHRewards, depositPoolBalance] = await Promise.all([ + api.call({ target: rocketNodeManager, abi: abi.getNodeCount }), + api.call({ target: rocketRewardsPool, abi: abi.getPendingETHRewards }), + api.call({ target: rocketVault, abi: abi.balanceOf, params: ['rocketDepositPool'] }), ]) - // ETH staked in Rocketpool pools - const unmatched_minipools = minipool_count_per_status[0] * 16 // Unmatched minipools - const pending_minipools = minipool_count_per_status[1] * 32 // Pending minipools (matched but not staking yet) - const staking_minipools = minipool_count_per_status[2] * 32 // Staking minipools - const withdrawable_minipools = minipool_count_per_status[3] * 32 // Withdrawable minipools - // Deposit pool balance - // rocketDepositPool_balance = solidity.to_float(rp.call("rocketDepositPool.getBalance")) - // rETH collateral from withdrawn minipools - // rETH_collateral_from_withdrawn_minipools = solidity.to_float(w3.eth.getBalance(rp.get_address_by_name("rocketTokenRETH"))) + const addresses = await api.call({ target: rocketNodeManager, abi: abi.getNodeAddresses, params: [0, nodeLength] }); - const ETH_TVL = staking_minipools - + pending_minipools - + unmatched_minipools - + withdrawable_minipools - + parseFloat(rocketDepositPoolBalance) / 1e18 - + parseFloat(rocketTokenRETHBalance) / 1e18 - - // RPL staked - // rpl_tvl += "rocketNodeStaking.getTotalRPLStake")) // RPL staked by Node Operators - // rpl_tvl += solidity.to_float(rp.call("rocketVault.balanceOfToken", "rocketDAONodeTrustedActions", rpl)) // RPL bonded by the oDAO - // rpl_tvl += solidity.to_float(rp.call("rocketVault.balanceOfToken", "rocketAuctionManager", rpl)) // slashed RPL that hasn't been auctioned off yet - const RPL_tvl = parseFloat(totalRPLStake) + parseFloat(rocketDAONodeTrustedActions_rplBalance) + parseFloat(rocketAuctionManager_rplBalance) - -// pending_minipools: ${pending_minipools} -// unmatched_minipools: ${unmatched_minipools} -// withdrawable_minipools: ${withdrawable_minipools} -// rocketDepositPoolBalance: ${rocketDepositPoolBalance / 1e18} -// rocketTokenRETHBalance: ${rocketTokenRETHBalance / 1e18} -// = ETH_TVL: ${ETH_TVL}\n -// rocketNodeStaking.getTotalRPLStake: ${totalRPLStake/1e18} -// rocketDAONodeTrustedActions_rplBalance: ${rocketDAONodeTrustedActions_rplBalance/1e18} -// rocketAuctionManager_rplBalance: ${rocketAuctionManager_rplBalance/1e18} -// = RPL_tvl: ${RPL_tvl/1e18}\n`) - - const balances = { - [weth]: ETH_TVL * 1e18, - [rpl]: RPL_tvl + const batchSize = 100; + const batchedAddresses = []; + for (let i = 0; i < addresses.length; i += batchSize) { + batchedAddresses.push(addresses.slice(i, i + batchSize)); } - return balances -} -module.exports = { - methodology: "Rocketpool TVL is ethereum staked by the users and node operators - collateral provided against rETH - staked on beacon chain 32 * activeMinipoolCount + RPL staked by Node Operators to operate a node.", - ethereum: { - tvl, - }, + const nodeDetails = await Promise.all( + batchedAddresses.map(async (batch) => { + const results = await api.multiCall({ calls: batch.map((address) => ({ target: rocketNodeManager, params: [address] })), abi: abi.getNodeDetails, permitFailure: true }) + return results ? results.filter((result) => result && result.exists) : [] + }) + ) + + const { minipoolCount, ethMatched } = nodeDetails.flat().reduce( + (acc, curr) => { + if (!curr) return acc; + acc.minipoolCount += Number(curr.minipoolCount) || 0; + acc.ethMatched += Number(curr.ethMatched) || 0; + return acc; + }, + { minipoolCount: 0, ethMatched: 0 } + ); + + api.add(ETH, [pendingETHRewards, depositPoolBalance, ethMatched]) } -/* -New Rocketpool TVL computation from tvl bot -minipool_count_per_status = call mulitple times rp.call("rocketMinipoolManager.getMinipoolCountPerStatus", offset, limit) - -# staking minipools -eth_tvl += minipool_count_per_status[2] * 32 -# pending minipools (matched but not staking yet) -eth_tvl += minipool_count_per_status[1] * 32 -# unmatched minipools -eth_tvl += minipool_count_per_status[0] * 16 -# withdrawable minipools -eth_tvl += minipool_count_per_status[3] * 32 -# deposit pool balance -eth_tvl += solidity.to_float(rp.call("rocketDepositPool.getBalance")) -# rETH collateral from withdrawn minipools -eth_tvl += solidity.to_float(w3.eth.getBalance(rp.get_address_by_name("rocketTokenRETH"))) - -# staked RPL -rpl_tvl += solidity.to_float(rp.call("rocketNodeStaking.getTotalRPLStake"))) -# RPL bonded by the oDAO -rpl_tvl += solidity.to_float(rp.call("rocketVault.balanceOfToken", "rocketDAONodeTrustedActions", rpl_address)) -# slashed RPL that hasn't been auctioned off yet -rpl_tvl += solidity.to_float(rp.call("rocketVault.balanceOfToken", "rocketAuctionManager", rpl_address)) - -// rocketDAONodeTrustedActions is RPL bonded by the oDAO Member. Rocketpool team considers them users, as they are independent entities. These Bonds can be slashed if the oDAO Member miss behaves. rocketAuctionManager is slashed RPL that hasn't been sold by the protocol yet. They consider it TVL because its RPL that will be sold for ETH and kept as additional rETH collateral - +const staking = async (api) => { + const trustedNodes = await api.fetchList({ target: trustedNodeManager, lengthAbi: abi.getMemberCount, itemAbi: abi.getMemberAt }) + api.add(RPL, await api.multiCall({ calls: trustedNodes.map((node) => ({ target: trustedNodeManager, params: [node] })), abi: abi.getMemberRPLBondAmount })) + return api.sumTokens({ owner: rocketVault, tokens: [RPL] }) +} -Previous incomplete simpler TVL: - - ETH locked in the deposit contract, which would be 32 * rocketMinipoolManager.getActiveMinipoolCount - - RPL locked by Node Operators rocketNodeStaking.getTotalRPLStake -*/ +module.exports = { + methodology: 'TVL represents the total ETH from the minipools as well as the staking rewards pending distribution', + ethereum: { tvl, staking } +} \ No newline at end of file From 574ac0c138856b045e77b2317b80f7c8c6703f68 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Mon, 18 Nov 2024 14:45:37 +0000 Subject: [PATCH 381/787] zircuit chain --- projects/zircuit-chain/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/zircuit-chain/index.js diff --git a/projects/zircuit-chain/index.js b/projects/zircuit-chain/index.js new file mode 100644 index 000000000000..ee2044a19d62 --- /dev/null +++ b/projects/zircuit-chain/index.js @@ -0,0 +1,17 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owners: ['0x17bfAfA932d2e23Bd9B909Fd5B4D2e2a27043fb1', '0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8'], + fetchCoValentTokens: true, + permitFailure: true, + blacklistedTokens: ['0xfd418e42783382e86ae91e445406600ba144d162'] + }), + staking: (api) => sumTokens2({ + api, owner: '0x386B76D9cA5F5Fb150B6BFB35CF5379B22B26dd8', token: '0xfd418e42783382e86ae91e445406600ba144d162', + }) + }, +}; From ba724ec081eb4f3378872e4647dbc31c69cc6c02 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 18 Nov 2024 16:12:33 +0100 Subject: [PATCH 382/787] Ape express (#12336) Co-authored-by: boivlad Co-authored-by: Vladyslav Boichenko <44983140+boivlad@users.noreply.github.com> --- projects/ape-express/index.js | 30 ++++++++++++++++++++++++++++++ projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 projects/ape-express/index.js diff --git a/projects/ape-express/index.js b/projects/ape-express/index.js new file mode 100644 index 000000000000..ad907f925c2c --- /dev/null +++ b/projects/ape-express/index.js @@ -0,0 +1,30 @@ +const { getLogs } = require('../helper/cache/getLogs'); +const { sumTokens2 } = require('../helper/unwrapLPs'); +const { nullAddress } = require('../helper/tokenMapping'); + +const configs = [ + { factory: "0xCd7a0227Bc48b1c14C5a1A6a4851010f80943476", fromBlock: 63905 }, + { factory: "0xBcace40e446b06E6A530D945eFbae222f84fA836", fromBlock: 3633933 } +] + +const tvl = async (api) => { + const logs = [] + for (const { factory, fromBlock } of configs) { + logs.push(await getLogs({ + api, + target: factory, + topics: ['0x8409923236a093dc9b93970d1428b15e2c21c325f3480269492056cdd1134023'], + eventAbi: 'event TokenCreated (address indexed token, address indexed bondingCurve, address indexed creator, string name, string symbol, address router, uint256 initialVirtualAPE, uint256 finalVirtualAPE, uint8 tradeFeePercent, uint8 apxSuccessFee, uint8 creatorSuccessFee)', + onlyArgs: true, + fromBlock, + })) + } + let pools = logs.flat().map(log => log.bondingCurve) + return sumTokens2({ api, owners: pools, token: nullAddress }) +} + +module.exports = { + apechain: { + tvl, + } +} \ No newline at end of file diff --git a/projects/helper/env.js b/projects/helper/env.js index 8c24dd6cb21b..fcd578c0968e 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -23,6 +23,7 @@ const DEFAULTS = { MATCHAIN_RPC_MULTICALL: "0xDa91510Bd8c50bfa54FC2BE2dD6dAbE03eA8496c", SHAPE_RPC:'https://mainnet.shape.network', SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", + APECHAIN_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", MORPH_RPC_MULTICALL: "0x33A213b1049D5AD2eeE6e61dAe040955e60383D4", WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", APECHAIN_RPC: "https://rpc.apechain.com", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index c588acff7a35..6d70fdeae96d 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -42,6 +42,9 @@ const fixBalancesTokens = { ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, + apechain: { + '0x0000000000000000000000000000000000000000': { coingeckoId: "apecoin", decimals: 18 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 7389e9619dae8e3fd4ca3682a2ef059466d8b3fa Mon Sep 17 00:00:00 2001 From: Trisha <87116734+trishateh@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:00:48 +0800 Subject: [PATCH 383/787] Add Lavarage adapter (#12311) Co-authored-by: Alexander Ho <39906305+piske-alex@users.noreply.github.com> Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/lavarage/index.js | 196 +++++++++++++++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 projects/lavarage/index.js diff --git a/projects/lavarage/index.js b/projects/lavarage/index.js new file mode 100644 index 000000000000..1c6db59d14fa --- /dev/null +++ b/projects/lavarage/index.js @@ -0,0 +1,196 @@ +const { getProvider, sumTokens2 } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); +const anchor = require("@project-serum/anchor"); +const bs58 = require('bs58'); + +const solProgramId = "CRSeeBqjDnm3UPefJ9gxrtngTsnQRhEJiTA345Q83X3v"; +const usdcProgramId = "1avaAUcjccXCjSZzwUvB2gS3DzkkieV2Mw8CjdN65uu"; +const stakingProgramId = "85vAnW1P89t9tdNddRGk6fo5bDxhYAY854NfVJDqzf7h"; +const TOKEN_PROGRAM_ID = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"); +const SPL_ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"); + +const edgeCaseTimestamps = [ + { start: 1713880000, end: 1713885480 }, // 10:32 AM - 10:58 AM ET on April 23, 2024 + { start: 1713874500, end: 1713876060 }, // 8:15 AM - 8:41 AM ET on April 23, 2024 +]; + +const idleAccount = new PublicKey("bkhAyULeiXwju7Zmy4t3paDHtVZjNaofVQ4VgEdTWiE"); +const deployedAccount = new PublicKey("6riP1W6R3qzUPWYwLGtXEC23aTqmyAEdDtXzhntJquAh"); +const multisigAccount = new PublicKey("DkPYEECBc28iute8vWvAuAU4xiM91Sht59p7FHZbmNQv"); +const pendingUnstakeAccount = new PublicKey("HTnwdgfXrA6gZRiQsnfxLKbvdcqnxdbuC2FJsmCCVMw9"); +const usdcAddress = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"); +const iscAddress = new PublicKey("J9BcrQfX4p9D1bvLzRNCbMDv8f44a9LFdeqNE4Yk2WMD"); +const usdcPoolAccount = new PublicKey("9m3wEeK3v5yyqDGMnDiDRR3FjCwZjRVB4n92pieGtTbP"); +const iscPoolAccount = new PublicKey("CrsxVEF7YNGAk9QwwbB2vuesUWoDopfgFAhA9apoCJ2z"); + +function getPositionFilters() { + const sizeFilter = { dataSize: 178 }; + const value = BigInt(9999); + const valueBuffer = Buffer.alloc(8); + valueBuffer.writeBigUInt64LE(value, 0); + const val0Filter = { + memcmp: { + offset: 40, + bytes: bs58.encode(Buffer.from(new Uint8Array(8))), + }, + } + const val9999Filter = { + memcmp: { + offset: 40, + bytes: bs58.encode(valueBuffer), + }, + } + return [ + [sizeFilter, val0Filter], + [sizeFilter, val9999Filter], + ] +} + +async function tvl(api) { + const provider = getProvider(); + for (const programId of [solProgramId, usdcProgramId]) { + + const program = new anchor.Program(lavarageIDL, programId, provider); + const pools = await program.account.pool.all() + const poolMap = {} + pools.forEach((pool) => { + poolMap[pool.publicKey.toBase58()] = pool.account.collateralType.toBase58() + }) + for (const filter of getPositionFilters()) { + const positions = await program.account.position.all(filter) + positions.forEach(({ account }) => { + let { closeStatusRecallTimestamp, pool, collateralAmount, timestamp } = account + const token = poolMap[pool.toBase58()] + const closeTS = closeStatusRecallTimestamp.toNumber() + const ts = timestamp.toNumber() + if ((closeTS && !isWithinEdgeCaseTimeRange(ts)) || !token) return; + api.add(token, collateralAmount.toString()) + }) + } + } + return sumTokens2({ + balances: api.getBalances(), tokenAccounts: [ + getAssociatedTokenAddress(usdcAddress, usdcPoolAccount), + getAssociatedTokenAddress(iscAddress, iscPoolAccount), + ], solOwners: [ + deployedAccount, pendingUnstakeAccount, + ] + }) +} + +function getAssociatedTokenAddress(mint, owner,) { + const [associatedTokenAddress] = PublicKey.findProgramAddressSync([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], SPL_ASSOCIATED_TOKEN_PROGRAM_ID); + return associatedTokenAddress; +} + +function isWithinEdgeCaseTimeRange(closeTimestamp) { + return edgeCaseTimestamps.some( + ({ start, end }) => closeTimestamp >= start && closeTimestamp <= end + ); +} + +module.exports = { + timetravel: false, + solana: { + tvl, + }, +}; + +const lavarageIDL = { + version: "0.1.0", + name: "lavarage", + instructions: [], + accounts: [ + { + name: "pool", + type: { + kind: "struct", + fields: [ + { + name: "interestRate", + type: "u8", + }, + { + name: "collateralType", + type: "publicKey", + }, + { + name: "maxBorrow", + type: "u64", + }, + { + name: "nodeWallet", + type: "publicKey", + }, + { + name: "maxExposure", + type: "u64", + }, + { + name: "currentExposure", + type: "u64", + }, + ], + }, + }, + { + name: "position", + type: { + kind: "struct", + fields: [ + { + name: "pool", + type: "publicKey", + }, + { + name: "closeStatusRecallTimestamp", + type: "u64", + }, + { + name: "amount", + type: "u64", + }, + { + name: "userPaid", + type: "u64", + }, + { + name: "collateralAmount", + type: "u64", + }, + { + name: "timestamp", + type: "i64", + }, + { + name: "trader", + type: "publicKey", + }, + { + name: "seed", + type: "publicKey", + }, + { + name: "closeTimestamp", + type: "i64", + }, + { + name: "closingPositionSize", + type: "u64", + }, + { + name: "interestRate", + type: "u8", + }, + { + name: "lastInterestCollect", + type: "i64", + }, + ], + }, + }, + ], + types: [], + events: [], + errors: [], +}; From d390b16b50adca1c81fee028bd93d70a1ddd41a3 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Tue, 19 Nov 2024 10:30:07 +0000 Subject: [PATCH 384/787] core bridge --- projects/core-bridge/index.js | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 projects/core-bridge/index.js diff --git a/projects/core-bridge/index.js b/projects/core-bridge/index.js new file mode 100644 index 000000000000..1b3d41eb8540 --- /dev/null +++ b/projects/core-bridge/index.js @@ -0,0 +1,70 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const owners = ['0x52e75D318cFB31f9A2EdFa2DFee26B161255B233', '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2'] +const owner = '0x29d096cD18C0dA7500295f082da73316d704031A' + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owners, + fetchCoValentTokens: true, + permitFailure: true + }), + }, + bsc: { + tvl: (api) => + sumTokens2({ + api, + owners, + fetchCoValentTokens: true, + permitFailure: true + }), + }, + polygon: { + tvl: (api) => + sumTokens2({ + api, + owners, + fetchCoValentTokens: true, + permitFailure: true + }), + }, + optimism: { + tvl: (api) => + sumTokens2({ + api, + owner, + fetchCoValentTokens: true, + permitFailure: true + }), + }, + avax: { + tvl: (api) => + sumTokens2({ + api, + owner, + fetchCoValentTokens: true, + permitFailure: true + }), + }, + arbitrum: { + tvl: (api) => + sumTokens2({ + api, + owner, + fetchCoValentTokens: true, + permitFailure: true + }), + }, + base: { + tvl: (api) => + sumTokens2({ + api, + owner: '0x84FB2086Fed7b3c9b3a4Bc559f60fFaA91507879', + fetchCoValentTokens: true, + permitFailure: true + }), + }, +}; From 50e6d91ea7eb7e818a90b001c285238593e36d2a Mon Sep 17 00:00:00 2001 From: Aymen <146243083+aymentrosh@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:50:44 +0100 Subject: [PATCH 385/787] Add Ethereum v2 assets to Karak (#12353) --- projects/karak/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/karak/index.js b/projects/karak/index.js index 4225da63dbea..b3e20d84828c 100644 --- a/projects/karak/index.js +++ b/projects/karak/index.js @@ -2,7 +2,7 @@ const { getLogs2 } = require('../helper/cache/getLogs') const { sumTokens2 } = require("../helper/unwrapLPs") const config = { - ethereum: { v1: { factory: '0x54e44dbb92dba848ace27f44c0cb4268981ef1cc' } }, + ethereum: { v1: { factory: '0x54e44dbb92dba848ace27f44c0cb4268981ef1cc' }, v2: { factory: '0x7A91498D5fA6705d35c9406b752d6D50f49C9510', block: 21189340 }}, arbitrum: { v1: { factory: '0x399f22ae52a18382a67542b3de9bed52b7b9a4ad' }, v2: { factory: '0xc4B3D494c166eBbFF9C716Da4cec39B579795A0d', block: 261874079 }}, karak: { v1: { factory:'0xB308474350D75447cA8731B7Ce87c9ee9DA03B1C' }, v2: { factory: '0x1368AE21e85c9FA25f1aB579b6D3C6e20Ad6db04', block: 13814008 }}, mantle: { v1: { factory: '0x4a2b015CcB8658998692Db9eD4522B8e846962eD'}, v2: { factory: '0x993E140Ba530E8Ffe1135ecef07ce7484f26CAA3', block: 71616200 }}, From 4bbe01452c331a8cd90c792932a9d331d55056b1 Mon Sep 17 00:00:00 2001 From: Josh Levine <24902242+jparklev@users.noreply.github.com> Date: Tue, 19 Nov 2024 08:50:55 -0800 Subject: [PATCH 386/787] Add Fluid Positions to Rumpel TVL (#12352) --- projects/rumpel/index.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/projects/rumpel/index.js b/projects/rumpel/index.js index ba2bf3fff320..f35ddd91be7e 100644 --- a/projects/rumpel/index.js +++ b/projects/rumpel/index.js @@ -7,6 +7,7 @@ const CONTRACTS = { ETHENA_LP_STAKING: "0x8707f238936c12c309bfc2B9959C35828AcFc512", MORPHO_BLUE: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb", ZIRCUIT_RESTAKING_POOL: "0xF047ab4c75cebf0eB9ed34Ae2c186f3611aEAfa6", + FLUID_POSITION_RESOLVER: "0x3E3dae4F30347782089d398D462546eb5276801C", }; const DEPLOYMENT = { @@ -47,13 +48,21 @@ const TOKENS = { YT_AMPHRETH: "0x5dB8a2391a72F1114BbaE30eFc9CD89f4a29F988", }; +const FLUID_VAULTS = [ + { VAULT: "0xeAEf563015634a9d0EE6CF1357A3b205C35e028D", TOKEN: TOKENS.WEETH }, + { VAULT: "0x1c6068eC051f0Ac1688cA1FE76810FA9c8644278", TOKEN: TOKENS.WEETHS }, + { VAULT: "0x3996464c0fCCa8183e13ea5E5e74375e2c8744Dd", TOKEN: TOKENS.SUSDE }, + { VAULT: "0xBc345229C1b52e4c30530C614BB487323BA38Da5", TOKEN: TOKENS.SUSDE }, + { VAULT: "0xe210d8ded13Abe836a10E8Aa956dd424658d0034", TOKEN: TOKENS.SUSDE }, +] + const MORPHO_SUSDE_MARKET_ID = "0x39d11026eae1c6ec02aa4c0910778664089cdd97c3fd23f68f7cd05e2e95af48"; async function tvl(api) { const owners = await getOwners(api); - await Promise.all([sumBaseTokens, handleLockedUSDE, handleMorphoSuppliedSUSDE, handleZircuitAssets, handleStrategyTokenBalances].map(async (fn) => fn())); + await Promise.all([sumBaseTokens, handleLockedUSDE, handleMorphoSuppliedSUSDE, handleZircuitAssets, handleStrategyTokenBalances, handleFluidPositions].map(async (fn) => fn())); async function sumBaseTokens() { return api.sumTokens({ @@ -80,6 +89,19 @@ async function tvl(api) { api.add(TOKENS.USDE, positions.map(i => i.amount)) } + async function handleFluidPositions() { + const positions = await api.multiCall({ + target: CONTRACTS.FLUID_POSITION_RESOLVER, + abi: "function getAllVaultPositions(address) view returns ((uint256,address owner,uint256 supply,uint256)[])", + calls: FLUID_VAULTS.map(({ VAULT }) => ({ params: [VAULT] })), + }); + + for (let i = 0; i < positions.length; i++) { + const rumpelPositions = positions[i].filter(i => owners.includes(i.owner)); + api.add(FLUID_VAULTS[i].TOKEN, rumpelPositions.map(i => i.supply)) + } + } + async function handleZircuitAssets() { const assets = [TOKENS.WEETH, TOKENS.WEETHS, TOKENS.USDE, TOKENS.MSTETH, TOKENS.AMPHRETH] const calls = [] From 1843c6e712aa2200c6234048f941c3c6c415f256 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Tue, 19 Nov 2024 17:02:43 +0000 Subject: [PATCH 387/787] add mapping for etherlink tokens --- projects/helper/tokenMapping.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 6d70fdeae96d..aec72e10f5ed 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -44,6 +44,11 @@ const fixBalancesTokens = { }, apechain: { '0x0000000000000000000000000000000000000000': { coingeckoId: "apecoin", decimals: 18 }, + }, + etlk: { + '0x796ea11fa2dd751ed01b53c372ffdb4aaa8f00f9': { coingeckoId: "usd-coin", decimals: 6 }, + '0x2c03058c8afc06713be23e58d2febc8337dbfe6a': { coingeckoId: "tether", decimals: 6 }, + '0xfc24f770f94edbca6d6f885e12d4317320bcb401': { coingeckoId: "weth", decimals: 18 }, } } From 8e7c4c28fa11257bf1833d50411817ba6770545b Mon Sep 17 00:00:00 2001 From: Oleh Kyslashko Date: Tue, 19 Nov 2024 19:06:37 +0200 Subject: [PATCH 388/787] add Delea project (#12350) --- projects/Delea/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/Delea/index.js diff --git a/projects/Delea/index.js b/projects/Delea/index.js new file mode 100644 index 000000000000..7e6d95799813 --- /dev/null +++ b/projects/Delea/index.js @@ -0,0 +1,9 @@ +const { sumTokensExport } = require("../helper/chain/ton"); +const ADDRESSES = require("../helper/coreAssets.json"); + +module.exports = { + methodology: 'Counts Delea smartcontract balance as TVL.', + ton: { + tvl: sumTokensExport({ owners: ["EQB6rkS8xt3Ey4XugdVqQDe1vt4KJDh813_k2ceoONTCBnyD", "EQCwIIRKpuV9fQpQxdTMhLAO30MNHa6GOYd00TsySOOYtA9n", "EQA2OzCuP8-d_lN2MYxLv5WCNfpLH1NUuugppOZBZgNYn-aa", "EQCgGUMB_u1Gkrskw2o407Ig8ymQmfkxWuPW2d4INuQoPFJO"], tokens: [ADDRESSES.null]}), + } +} From e5a2b0244222ce2c2a5d610c32f6a5a66a101517 Mon Sep 17 00:00:00 2001 From: Antoine <161333389+theausicist@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:40:56 +0530 Subject: [PATCH 389/787] Track Ruscet Exchange (#12338) --- projects/ruscet/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/ruscet/index.js diff --git a/projects/ruscet/index.js b/projects/ruscet/index.js new file mode 100644 index 000000000000..c555ed73f520 --- /dev/null +++ b/projects/ruscet/index.js @@ -0,0 +1,11 @@ +const { sumTokens } = require("../helper/chain/fuel") + +async function tvl(api) { + const contractId = '0x8002f2e86302ef9421558d0ae25a68cdfdbec5d27915cc2db49eded220799ecc' + return sumTokens({ api, owner: contractId }) +} + +module.exports = { + fuel: { tvl }, + timetravel: false, +} From 840219b5b0c10e5bba04b81d24f0ebf238286d99 Mon Sep 17 00:00:00 2001 From: Robojosef <104118694+robojosef@users.noreply.github.com> Date: Tue, 19 Nov 2024 09:12:03 -0800 Subject: [PATCH 390/787] Correct the fungible asset mints for Superposition (#12340) --- projects/superposition/index.js | 47 ++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/projects/superposition/index.js b/projects/superposition/index.js index b6ecf4c48d72..f37e0a6a68fc 100644 --- a/projects/superposition/index.js +++ b/projects/superposition/index.js @@ -13,21 +13,44 @@ async function _getResources() { const brokersFilter = (i) => i.type.includes(`${spRootAddress}::broker::Broker`); -function processBrokerData(brokerDataArray, isBorrowed = false) { +const coinToFungibleAssetFilter = (i) => + i.type.includes(`${spRootAddress}::map::Map`); + +function processBrokerData(brokerDataArray, coinToFungibleAssetArray, isBorrowed = false) { + const coinToFungibleAssetMap = coinToFungibleAssetArray.reduce(function(map, item) { + map[item.type] = item.data.fa_metadata; + return map; + }, {}); + const result = {}; brokerDataArray.map((item) => { const { type, data } = item; - result[type] = !isBorrowed ? parseInt(data.available) : parseInt(data.borrowed) + + const brokerType = type; + + const coinType = brokerType.match(/<([^>]+)>/)[1]; + + let tokenMint = coinType; + { + // Superposition uses custom coin types to represent fungible assets + // Find the fungible asset address so DefiLama can find + // the correct token price + const mapType = `${spRootAddress}::map::Map<${coinType}>`; + if (mapType in coinToFungibleAssetMap) { + tokenMint = coinToFungibleAssetMap[mapType]; + } + } + + result[tokenMint] = !isBorrowed ? parseInt(data.available) : parseInt(data.borrowed) }); return result; } -function simplifyKeys(balanceData, api) { +function addBalanceData(balanceData, api) { Object.entries(balanceData).forEach(([key, value]) => { - const newKey = key.match(/<([^>]+)>/)[1]; - api.add(newKey, value); + api.add(key, value); }); } @@ -38,14 +61,20 @@ module.exports = { tvl: async (api) => { const resources = await _getResources(); const brokers = resources.filter(brokersFilter); - const balanceData = processBrokerData(brokers); - simplifyKeys(balanceData, api); + const coinToFungibleAssetArray = resources.filter( + coinToFungibleAssetFilter + ); + const balanceData = processBrokerData(brokers, coinToFungibleAssetArray); + addBalanceData(balanceData, api); }, borrowed: async (api) => { const resources = await _getResources(); const brokers = resources.filter(brokersFilter); - const balanceData = processBrokerData(brokers, true); - simplifyKeys(balanceData, api); + const coinToFungibleAssetArray = resources.filter( + coinToFungibleAssetFilter + ); + const balanceData = processBrokerData(brokers, coinToFungibleAssetArray, true); + addBalanceData(balanceData, api); }, }, }; From ff8d261f8ef8a173e116adcbc5175e0b1292b7dd Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:14:10 +0100 Subject: [PATCH 391/787] fix audit issue --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bd007ac9fce..6c769bfdb7cf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2535,9 +2535,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, "dependencies": { "path-key": "^3.1.0", From b5483eeda131e9ee379435974dd712052871eb7b Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:24:16 +0100 Subject: [PATCH 392/787] Fix: Estate-protocol (Outdated) (#12347) --- projects/estate-protocol/index.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/projects/estate-protocol/index.js b/projects/estate-protocol/index.js index b526c2747bf2..58bca1154727 100644 --- a/projects/estate-protocol/index.js +++ b/projects/estate-protocol/index.js @@ -1,20 +1,20 @@ const ADDRESSES = require('../helper/coreAssets.json') const { get } = require('../helper/http') -async function arbTvl(api) { - let ep_tokens = await get('https://estateprotocol.com/api/public/property/list') +const EVM_ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/; - // Filter out tokens - ep_tokens = ep_tokens.filter(t => t.propertyAddress && t.token_price) +async function tvl(api) { + const tokens = (await get('https://estateprotocol.com/api/public/property/list')).filter(t => t.propertyAddress && EVM_ADDRESS_REGEX.test(t.propertyAddress) && t.token_price) + const tokenSupplies = await api.multiCall({ calls: tokens.map((token) => ({ target: token.propertyAddress })), abi: 'erc20:totalSupply' }) - // Get total supply for each token - const tokenSupplies_arb = await api.multiCall({calls: ep_tokens.map(t => t.propertyAddress), abi: 'erc20:totalSupply'}); - tokenSupplies_arb.map((supply, i) => api.add(ADDRESSES.arbitrum.USDC_CIRCLE, supply/1e18 * parseFloat(ep_tokens[i]['token_price']) * 1e6 )) + tokenSupplies.forEach((supply, i) => { + const token = tokens[i] + const price = parseFloat(token.token_price) + api.add(ADDRESSES.arbitrum.USDC_CIRCLE, supply * price * Math.pow(10, 6-18)) + }) } module.exports = { methodology: `TVL for Estate Protocol consists of the accumulation of all properties prices, each being tokenSupply * tokenPrice where tokenPrice is given by the API`, - arbitrum: { - tvl: arbTvl - }, + arbitrum: { tvl } } From b78e2c37cc85d521a215838c46236cca49877aa9 Mon Sep 17 00:00:00 2001 From: tstemko <57684389+tstemko@users.noreply.github.com> Date: Tue, 19 Nov 2024 13:24:29 -0500 Subject: [PATCH 393/787] Add rootstock vaults to tvl calcs (#12354) Co-authored-by: Tatyana Stemkovski --- projects/ichifarm/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/ichifarm/index.js b/projects/ichifarm/index.js index 89cff51d3574..119f8af69126 100644 --- a/projects/ichifarm/index.js +++ b/projects/ichifarm/index.js @@ -158,6 +158,11 @@ const config = { { factory: '0x860F3881aCBbF05D48a324C5b8ca9004D31A146C', fromBlock: 599247, isAlgebra: false, }, // Pearl ] }, + rsk: { + vaultConfigs: [ + { factory: '0x8cCd02E769e6A668a447Bd15e134C31bEccd8182', fromBlock: 6753128, isAlgebra: false, }, // Uniswap + ] + }, scroll: { vaultConfigs: [ { factory: '0xb42D5956cDe4386B65C087CfCD16910aB6114F15', fromBlock: 5264782, isAlgebra: false, }, // Metavault From cf3eb78cb4b8e80cb51cd6ff87294db961e1708e Mon Sep 17 00:00:00 2001 From: mdcryptonfts <105838382+mdcryptonfts@users.noreply.github.com> Date: Tue, 19 Nov 2024 14:36:11 -0500 Subject: [PATCH 394/787] Added /projects/nfthive (#12328) Co-authored-by: Mike D --- projects/nfthive/index.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 projects/nfthive/index.js diff --git a/projects/nfthive/index.js b/projects/nfthive/index.js new file mode 100644 index 000000000000..8df589effb75 --- /dev/null +++ b/projects/nfthive/index.js @@ -0,0 +1,27 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +const tokens = [ + ["eosio.token", "WAX", "wax"], + ["alien.worlds", "TLM", "alien-worlds"], + ["wuffi", "WUF", "wuffi"], +]; + +// NFTHive +// https://nfthive.io +async function wax() { + const accounts = ["nfthivedrops", "nfthivepacks", "nfthivecraft"]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +async function staking() { + const accounts = ["nfthivevault"]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `NFTHive TVL is achieved by querying token balances from NFT market contracts.`, + wax: { + tvl: wax, + staking + }, +} \ No newline at end of file From 7a92002f7d2c3d2479af83bc850a6abbd9b6bdb7 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Tue, 19 Nov 2024 22:27:41 +0000 Subject: [PATCH 395/787] add hallmark --- projects/polter/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/polter/index.js b/projects/polter/index.js index 182b3aea9f02..50d421564c17 100644 --- a/projects/polter/index.js +++ b/projects/polter/index.js @@ -17,6 +17,9 @@ const base = { module.exports = { + hallmarks: [ + [1731715200,"Price Oracle Exploit"] + ], fantom: aaveV2Export(fantom.POLTER_LENDINGPOOL_CONTRACT), base: aaveV2Export(base.POLTER_LENDINGPOOL_CONTRACT), } From 13659bd833c9e6de789a868068060f0d8c687967 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 20 Nov 2024 12:52:35 +0000 Subject: [PATCH 396/787] astherus-basis-trading (#12366) --- projects/astherus-basis-trading/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/astherus-basis-trading/index.js diff --git a/projects/astherus-basis-trading/index.js b/projects/astherus-basis-trading/index.js new file mode 100644 index 000000000000..79fcfcc24c6d --- /dev/null +++ b/projects/astherus-basis-trading/index.js @@ -0,0 +1,10 @@ +const USDF = "0x5A110fC00474038f6c02E89C707D638602EA44B5" + +module.exports = { + bsc: { + tvl: async (api) => { + const supply = await api.call({ abi: 'erc20:totalSupply', target: USDF }) + api.add(USDF, supply) + }, + } +} \ No newline at end of file From 7bf8725ba638573070a626a859f8a29b3dbea0da Mon Sep 17 00:00:00 2001 From: 0xaslan <161349919+0xaslan@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:01:31 -0500 Subject: [PATCH 397/787] Add NS and Typus to list of coins for DeepBook v3 (#12368) --- projects/deepbook-v3/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/deepbook-v3/index.js b/projects/deepbook-v3/index.js index 6f8d51f4c5d5..88495a261b87 100644 --- a/projects/deepbook-v3/index.js +++ b/projects/deepbook-v3/index.js @@ -8,6 +8,8 @@ const coins = { bethType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH", wusdtType: ADDRESSES.sui.USDT, wusdcType: ADDRESSES.sui.USDC, + nsType: "0x5145494a5f5100e645e4b0aa950fa6b68f614e8c59e17bc5ded3495123a79178::ns::NS", + typusType: "0xf82dc05634970553615eef6112a1ac4fb7bf10272bf6cbe0f80ef44a6c489385::typus::TYPUS", } const endpointUrl = "https://deepbook-indexer.mainnet.mystenlabs.com" From a21787d5c5fb36b086584e67a87aee9ddce142bc Mon Sep 17 00:00:00 2001 From: Antoine <67124021+antoineborg@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:01:40 +0100 Subject: [PATCH 398/787] Add new SwissBorg wallet (#12367) --- projects/swissborg/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index d559134f952a..052e2e97ac8f 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -19,7 +19,8 @@ const config = { '0x178Fb204c1ff2Ed7d0651C522A3a5B15480Eb76d', '0xFbA64167e4f091Ca625FA79aa6f83665856f8Bf2', '0x8F0d8b27bF808976Fa94f03e2230b4bca95bf3C4', - '0xe2484A7Ac1b9Cb6D8E55fd00e129aB913172bea6' + '0xe2484A7Ac1b9Cb6D8E55fd00e129aB913172bea6', + '0xdbe15F6573108B6736c70779C683Ca633c18aFe2', ], }, bitcoin: { From 1160de03783f17b19b8e4e86cc515359dc314882 Mon Sep 17 00:00:00 2001 From: shapeshed Date: Wed, 20 Nov 2024 15:01:46 +0000 Subject: [PATCH 399/787] Add Margined Protocol Neutron Vaults (#12364) --- projects/margined-protocol/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/margined-protocol/index.js b/projects/margined-protocol/index.js index 3fa68abb0e2f..05dc8c3e5493 100644 --- a/projects/margined-protocol/index.js +++ b/projects/margined-protocol/index.js @@ -17,6 +17,10 @@ const osmosisVaults = { const neutronVaults = { ATOMFund: "neutron1puedrclm6rn33x3zv66xg6m23qcdagayqua6jj2wqzvfznlqef8qe53wr2", NTRNStructured: "neutron13h4jzme5880knnc23xvwu9gytynnxu5cc0fek6fndmjyctzznj9sd5yhhy", + ATOMdATOM: "neutron1f99ujxefjr4jqmskc7hvg09am6pdq2j2c5049xwl0de4cavc4rfsl866y0", + wBTCUSDC: "neutron17fyzkafg4scrd6xu0sp9llrl6hazegza7yer4erlea0kvk30yxsqk2xqfd", + NTRNUSDC: "neutron1t0fl9k43g86sv60ghx9vtwed9rpgtf49rxzm05ff477j23h52c6s0urdc7", + TIAUSDC: "neutron1wv8pl7tsatzx6n9yaqfksvu5y0x7j50g6mhy636udwfn3vyqp0hsu7g8yk", } const config = { From 24726703a16866513f97fcab658d8ff051575efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=E1=BB=8Bnh=20Ti=E1=BA=BFn=20=C4=90=E1=BA=A1t?= <97428594+Miyukishirogane@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:09:10 +0700 Subject: [PATCH 400/787] Add adapter for tcv_platform (#12363) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/tcv_platform/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/tcv_platform/index.js diff --git a/projects/tcv_platform/index.js b/projects/tcv_platform/index.js new file mode 100644 index 000000000000..9a2da61ba615 --- /dev/null +++ b/projects/tcv_platform/index.js @@ -0,0 +1,18 @@ + + +const { sumTokens2 } = require('../helper/unwrapLPs'); + +async function tvl(api) { + const tcvFactory = "0xCa2396933E02Fb7636126a914aE5f5512ab31077"; + const index = await api.call({ target: tcvFactory, abi: 'uint256:numVaults', }); + const vaults = await api.call({ target: tcvFactory, abi: 'function vaults(uint256,uint256) returns (address[])', params: ["0", String(index)], }); + await sumTokens2({ api, resolveUniV3: true, owners: vaults }) +} + +module.exports = { + methodology: "Calculates total liquidity from all NFT ranges in the given pools.", + start: 1717239410, + arbitrum: { + tvl, + }, +}; \ No newline at end of file From 4e5bc1b11c9c682d4de51a0dff1600141700079f Mon Sep 17 00:00:00 2001 From: baklavaspace <93024988+baklavaspace@users.noreply.github.com> Date: Wed, 20 Nov 2024 23:17:45 +0800 Subject: [PATCH 401/787] Add Base Moonwell WETH & USDC vault (#12358) --- projects/baklava-space/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/baklava-space/index.js b/projects/baklava-space/index.js index 8c589c35f6fd..976b87a6e15a 100644 --- a/projects/baklava-space/index.js +++ b/projects/baklava-space/index.js @@ -47,7 +47,9 @@ const config = { '0xf81Ac49CEeA834deC340aB08a544fB1E79d44c31', '0xed1031885D7DE7DB78BE921F5FeAacD3f6E9a127', '0x9bD9b6600eeE5f8318913cCb17BF836E1e9d2f4F', - '0x90011B2AB095c9a9f70a8eBEe21313FB3989029f' // CLM pool + '0x25F0Bc213ED49ABe3AD36CB8D0919A138d19b648', + '0x59639E20A17EaD110aaBAF249001Ab140917C18e', + '0x90011B2AB095c9a9f70a8eBEe21313FB3989029f' // CLM pool(Not calculated by defillama) ], bsc: [ '0x6659B42C106222a50EE555F76BaD09b68EC056f9', From ebf45e69d1d84a835364870c6fd15dc94eb0bc79 Mon Sep 17 00:00:00 2001 From: Leofis G Date: Wed, 20 Nov 2024 23:18:38 +0800 Subject: [PATCH 402/787] Added Aries Markets Native Usdt Count. (#12357) --- projects/aries-markets/index.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/aries-markets/index.js b/projects/aries-markets/index.js index 20a2e72f70b9..2a5ac2351480 100644 --- a/projects/aries-markets/index.js +++ b/projects/aries-markets/index.js @@ -1,5 +1,4 @@ const sdk = require("@defillama/sdk"); -const { default: BigNumber } = require("bignumber.js"); const { getResources, getTableData, } = require("../helper/chain/aptos"); const { transformBalances } = require("../helper/portedTokens"); const toHex = (str) => Buffer.from(str, 'utf-8').toString('hex'); @@ -11,7 +10,8 @@ async function _getResources() { return resourcesCache } const extractCoinAddress = (str) => str.slice(str.indexOf("<") + 1, str.lastIndexOf(">")); -const reserveContrainerFilter = (i) => i.type.includes("0x9770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da3::reserve::ReserveCoinContainer") +const reserveContrainerFilter = (i) => i.type.includes("0x9770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da3::reserve::ReserveCoinContainer"); +const faWrapperFilter = (i) => i.type.includes("0x9770fa9c725cbd97eb50b2be5f7416efdfd1f1554beb0750d4dae4c64e860da3::fa_to_coin_wrapper::WrapperCoinInfo"); module.exports = { timetravel: false, @@ -26,11 +26,20 @@ module.exports = { lamports: i.data.underlying_coin.value, tokenAddress: extractCoinAddress(i.type), })); + const faWrappers = data.filter(faWrapperFilter) + .map((i) => ({ + lamports: i.data.fa_amount, + faAddress: i.data.metadata.inner, + })); coinContainers.forEach(({ lamports, tokenAddress }) => { sdk.util.sumSingleBalance(balances, tokenAddress, lamports); }); + faWrappers.forEach(({ lamports, faAddress }) => { + sdk.util.sumSingleBalance(balances, faAddress, lamports); + }); + return transformBalances("aptos", balances); }, borrowed: async () => { @@ -59,10 +68,13 @@ module.exports = { }); const total_borrowed = BigInt(reserveStatus.total_borrowed.val) / BigInt(10 ** 18); + + const faInfo = data.filter(faWrapperFilter).filter((i) => i.type.includes(coin_type)); + const normalizedAddress = faInfo.length == 0 ? coin_type : faInfo[0].data.metadata.inner; return { lamports: total_borrowed.toString(), - tokenAddress: coin_type, + tokenAddress: normalizedAddress, }; }) ); From 9157c852c1d42da77b111de1af6adb1a66682566 Mon Sep 17 00:00:00 2001 From: Teddy Not Bear <106410805+TeddyNotBear@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:18:48 +0700 Subject: [PATCH 403/787] fix: token addresses for Bountive V2 (#12360) --- projects/bountive/index.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/projects/bountive/index.js b/projects/bountive/index.js index 134cab63885a..74d80582d483 100644 --- a/projects/bountive/index.js +++ b/projects/bountive/index.js @@ -4,15 +4,13 @@ const { multiCall } = require('../helper/chain/starknet') const bountiveTokens = [ // BoSTRK: Bountive STRK - "0x05a0fff20829d60a0cdae2da18a32bd3de5c32f8d0109d2a0b59a88a7a77176e", + "0x018e009bbb035c506234e7a8eca6a7229adfd59a278ba3845285d28b03ed6d53", // BoETH: Bountive ETH - "0x00d91e36ff68918b392c9cfc2e3f575526f69e04b97eb28142856fae3611fcf7", + "0x02fcaebd41710024e25b6dc646a62acb6560125a699a3f695b6adb54a180aaee", // BoUSDC: Bountive USDC - "0x04ed6784fa5c11889851c2d13bbd80464e55605a90b5b664f9400df0fd6ef4a5", + "0x028a88bf75f1b10dc8552051a56fbdc732084af514f6065f4c67ea6d50204720", // BoUSDT: Bountive USDT - "0x0753dc6f8fee7487fe3f32728c0f1af9df1f7a3d0443ef507eb79a974697be12", - // BoDAI: Bountive DAI - "0x06e32d47c49efb0243da8d456dc413f1dcf50ceea7be28ef520492eccfff2b43", + "0x0243d9a1cffc0b5ebbf549efd1232a96b1ef392fe595e91dd72103d5a8e7d847", ] const underlyingsTokens = [ @@ -24,8 +22,6 @@ const underlyingsTokens = [ ADDRESSES.starknet.USDC, // USDT ADDRESSES.starknet.USDT, - // DAI - ADDRESSES.starknet.DAI, ] async function tvl(api) { From df00cd61522a4876a131f28f0c1acd6209318f95 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:50:00 +0100 Subject: [PATCH 404/787] Fix: RocketPool (#12371) --- projects/rocketpool/index.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/projects/rocketpool/index.js b/projects/rocketpool/index.js index 32df6b962d93..3553ad32c4be 100644 --- a/projects/rocketpool/index.js +++ b/projects/rocketpool/index.js @@ -6,6 +6,7 @@ const rocketNodeManager = '0x2b52479F6ea009907e46fc43e91064D1b92Fdc86' const rocketVault = '0x3bDC69C4E5e13E52A65f5583c23EFB9636b469d6' const rocketRewardsPool = '0xEE4d2A71cF479e0D3d0c3c2C923dbfEB57E73111' const trustedNodeManager = '0xb8e783882b11Ff4f6Cef3C501EA0f4b960152cc9' +const rocketNodeStaking = '0xF18Dc176C10Ff6D8b5A17974126D43301F8EEB95' const abi = { getNodeCount: "function getNodeCount() view returns (uint256)", @@ -16,7 +17,8 @@ const abi = { balanceOfToken: "function balanceOfToken(string _networkContractName, address _tokenAddress) view returns (uint256)", getMemberAt: "function getMemberAt(uint256 _index) view returns (address)", getMemberCount: "function getMemberCount() view returns (uint256)", - getMemberRPLBondAmount: "function getMemberRPLBondAmount(address _nodeAddress) view returns (uint256)" + getMemberRPLBondAmount: "function getMemberRPLBondAmount(address _nodeAddress) view returns (uint256)", + getNodeETHProvided: "function getNodeETHProvided(address _nodeAddress) view returns (uint256)", }; const tvl = async (api) => { @@ -34,24 +36,29 @@ const tvl = async (api) => { batchedAddresses.push(addresses.slice(i, i + batchSize)); } - const nodeDetails = await Promise.all( + const results = await Promise.all( batchedAddresses.map(async (batch) => { - const results = await api.multiCall({ calls: batch.map((address) => ({ target: rocketNodeManager, params: [address] })), abi: abi.getNodeDetails, permitFailure: true }) - return results ? results.filter((result) => result && result.exists) : [] + const details = await api.multiCall({ calls: batch.map((address) => ({ target: rocketNodeManager, params: [address] })), abi: abi.getNodeDetails, permitFailure: true }) + const ethProvided = await api.multiCall({ calls: batch.map((address) => ({ target: rocketNodeStaking, params: [address] })), abi: abi.getNodeETHProvided, permitFailure: true }) + return { details: details ? details.filter((result) => result && result.exists) : [], ethProvided: ethProvided || [] }; }) ) - const { minipoolCount, ethMatched } = nodeDetails.flat().reduce( - (acc, curr) => { + const flattenedDetails = results.flatMap((result) => result.details); + const flattenedEthProvided = results.flatMap((result) => result.ethProvided); + + const { minipoolCount, ethMatched, nodeEthProvided } = flattenedDetails.reduce( + (acc, curr, index) => { if (!curr) return acc; acc.minipoolCount += Number(curr.minipoolCount) || 0; acc.ethMatched += Number(curr.ethMatched) || 0; + acc.nodeEthProvided += Number(flattenedEthProvided[index]) || 0; return acc; }, - { minipoolCount: 0, ethMatched: 0 } + { minipoolCount: 0, ethMatched: 0, nodeEthProvided: 0 } ); - api.add(ETH, [pendingETHRewards, depositPoolBalance, ethMatched]) + api.add(ETH, [pendingETHRewards, depositPoolBalance, ethMatched, nodeEthProvided]) } const staking = async (api) => { From f508718135726758d5d2945e98ca089308ed17c2 Mon Sep 17 00:00:00 2001 From: Hongchao Liu Date: Wed, 20 Nov 2024 17:50:39 +0100 Subject: [PATCH 405/787] Update Alephium Bridge with BSC (#12370) --- projects/alephium-bridge/index.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/projects/alephium-bridge/index.js b/projects/alephium-bridge/index.js index 884308d9e0e8..383fcf0f4d78 100644 --- a/projects/alephium-bridge/index.js +++ b/projects/alephium-bridge/index.js @@ -2,20 +2,23 @@ const sdk = require("@defillama/sdk"); const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs'); -const tokenBridgeAddress = '0x579a3bde631c3d8068cbfe3dc45b0f14ec18dd43' -const bridgedAlphAddress = '0x590f820444fa3638e022776752c5eef34e2f89a6' +const ethTokenBridgeAddress = '0x579a3bde631c3d8068cbfe3dc45b0f14ec18dd43' +const ethBridgedAlphAddress = '0x590f820444fa3638e022776752c5eef34e2f89a6' +const bscTokenBridgeAddress = '0x2971F580C34d3D584e0342741c6a622f69424dD8' +const bscBridgedAlphAddress = '0x8683BA2F8b0f69b2105f26f488bADe1d3AB4dec8' async function tvl(ts, block) { - const totalBridgedAlphSupply = await sdk.api.erc20.totalSupply({ target: bridgedAlphAddress, block }) + const ethTotalBridgedAlphSupply = await sdk.api.erc20.totalSupply({ target: ethBridgedAlphAddress, block, chain: 'ethereum' }) + const bscTotalBridgedAlphSupply = await sdk.api.erc20.totalSupply({ target: bscBridgedAlphAddress, block, chain: 'bsc' }) return { - alephium: totalBridgedAlphSupply.output / 1e18, + alephium: (ethTotalBridgedAlphSupply.output / 1e18) + (bscTotalBridgedAlphSupply.output / 1e18), } } module.exports = { - methodology: "Tracks funds locked in the Alephium Bridge Token contracts on Ethereum", + methodology: "Tracks funds locked in the Alephium Bridge Token contracts on Ethereum and Binance Smart Chain", ethereum: { - tvl: sumTokensExport({ owner: tokenBridgeAddress, tokens: [ + tvl: sumTokensExport({ owner: ethTokenBridgeAddress, tokens: [ ADDRESSES.ethereum.WETH, ADDRESSES.ethereum.USDT, ADDRESSES.ethereum.USDC, @@ -23,6 +26,13 @@ module.exports = { ADDRESSES.ethereum.DAI ] }), }, + bsc: { + tvl: sumTokensExport({ owner: bscTokenBridgeAddress, tokens: [ + ADDRESSES.bsc.WBNB, + ADDRESSES.bsc.USDC, + ADDRESSES.bsc.USDT + ] }), + }, alephium: { tvl } From 615dc4b7ee3d89ba1dabf4c1fe70e63a7002dade Mon Sep 17 00:00:00 2001 From: Dodi Triwibowo Date: Thu, 21 Nov 2024 01:46:17 +0700 Subject: [PATCH 406/787] add pluto.so (#12356) Co-authored-by: Dodi Pluto Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/pluto-so/idl.json | 117 ++++++++++++++++++++++++++++ projects/pluto-so/index.js | 75 ++++++++++++++++++ utils/formatIdl.js | 151 +++++++++++++++++++++++++++++++++++++ 3 files changed, 343 insertions(+) create mode 100644 projects/pluto-so/idl.json create mode 100644 projects/pluto-so/index.js create mode 100644 utils/formatIdl.js diff --git a/projects/pluto-so/idl.json b/projects/pluto-so/idl.json new file mode 100644 index 000000000000..cb5ca018fb90 --- /dev/null +++ b/projects/pluto-so/idl.json @@ -0,0 +1,117 @@ +{ + "address": "5UFYdXHgXLMsDzHyv6pQW9zv3fNkRSNqHwhR7UPnkhzy", + "metadata": {"name": "pluto", "version": "0.1.0", "spec": "0.1.0", "description": "Created with Anchor"}, + "instructions": [], + "accounts": [ + {"name": "vaultEarn", "discriminator": [255, 18, 25, 189, 255, 106, 176, 136]}, + {"name": "vaultLeverage", "discriminator": [135, 160, 136, 66, 119, 36, 19, 115]} + ], + "events": [], + "errors": [], + "types": [ + { + "name": "vaultEarn", + "serialization": "bytemuckunsafe", + "repr": {"kind": "c"}, + "type": { + "kind": "struct", + "fields": [ + {"name": "isInitialized", "type": "bool"}, + {"name": "version", "type": "u8"}, + {"name": "bump", "type": "u8"}, + {"name": "align0", "type": {"array": ["u8", 5]}}, + {"name": "protocol", "type": "pubkey"}, + {"name": "earnStats", "type": "pubkey"}, + {"name": "creator", "type": "pubkey"}, + {"name": "authority", "type": "pubkey"}, + {"name": "earnConfig", "type": "pubkey"}, + {"name": "vaultLiquidity", "type": "pubkey"}, + {"name": "priceOracle", "type": "pubkey"}, + {"name": "priceFeed", "type": {"array": ["u8", 64]}}, + {"name": "tokenProgram", "type": "pubkey"}, + {"name": "tokenMint", "type": "pubkey"}, + {"name": "tokenDecimal", "type": "u8"}, + {"name": "align1", "type": {"array": ["u8", 7]}}, + {"name": "lastUpdated", "type": "i64"}, + {"name": "unitSupply", "type": "u128"}, + {"name": "unitBorrowed", "type": "u128"}, + {"name": "unitLent", "type": "u128"}, + {"name": "unitLeverage", "type": "u128"}, + {"name": "index", "type": "u128"}, + {"name": "lastIndexUpdated", "type": "i64"}, + {"name": "apy", "type": {"defined": {"name": "rate"}}}, + {"name": "padding1", "type": {"array": ["u64", 64]}} + ] + } + }, + { + "name": "rate", + "serialization": "bytemuckunsafe", + "repr": {"kind": "c"}, + "type": { + "kind": "struct", + "fields": [ + {"name": "lastUpdated", "type": "i64"}, + {"name": "lastValue", "type": "u32"}, + {"name": "align0", "type": {"array": ["u8", 4]}}, + {"name": "lastEmaHourUpdated", "type": "i64"}, + {"name": "emaHourly", "type": "u32"}, + {"name": "align1", "type": {"array": ["u8", 4]}}, + {"name": "lastEmaDayUpdated", "type": "i64"}, + {"name": "ema3d", "type": "u32"}, + {"name": "ema7d", "type": "u32"}, + {"name": "ema14d", "type": "u32"}, + {"name": "ema30d", "type": "u32"}, + {"name": "ema90d", "type": "u32"}, + {"name": "ema180d", "type": "u32"}, + {"name": "ema365d", "type": "u32"}, + {"name": "align2", "type": {"array": ["u8", 4]}}, + {"name": "padding1", "type": {"array": ["u64", 7]}} + ] + } + }, + { + "name": "vaultLeverage", + "serialization": "bytemuckunsafe", + "repr": {"kind": "c"}, + "type": { + "kind": "struct", + "fields": [ + {"name": "isInitialized", "type": "bool"}, + {"name": "version", "type": "u8"}, + {"name": "bump", "type": "u8"}, + {"name": "align0", "type": {"array": ["u8", 5]}}, + {"name": "protocol", "type": "pubkey"}, + {"name": "leverageStats", "type": "pubkey"}, + {"name": "creator", "type": "pubkey"}, + {"name": "authority", "type": "pubkey"}, + {"name": "leverageConfig", "type": "pubkey"}, + {"name": "borrowVault", "type": "pubkey"}, + {"name": "tokenCollateralPriceOracle", "type": "pubkey"}, + {"name": "tokenCollateralPriceFeed", "type": {"array": ["u8", 64]}}, + {"name": "tokenCollateralTokenProgram", "type": "pubkey"}, + {"name": "tokenCollateralTokenMint", "type": "pubkey"}, + {"name": "tokenCollateralVaultLiquidity", "type": "pubkey"}, + {"name": "tokenCollateralTokenDecimal", "type": "u8"}, + {"name": "align1", "type": {"array": ["u8", 7]}}, + {"name": "nativeCollateralPriceOracle", "type": "pubkey"}, + {"name": "nativeCollateralPriceFeed", "type": {"array": ["u8", 64]}}, + {"name": "nativeCollateralTokenProgram", "type": "pubkey"}, + {"name": "nativeCollateralTokenMint", "type": "pubkey"}, + {"name": "nativeCollateralVaultLiquidity", "type": "pubkey"}, + {"name": "nativeCollateralTokenDecimal", "type": "u8"}, + {"name": "align2", "type": {"array": ["u8", 7]}}, + {"name": "lastUpdated", "type": "i64"}, + {"name": "borrowingUnitSupply", "type": "u128"}, + {"name": "borrowingIndex", "type": "u128"}, + {"name": "unitSupply", "type": "u128"}, + {"name": "index", "type": "u128"}, + {"name": "lastIndexUpdated", "type": "i64"}, + {"name": "borrowingApy", "type": {"defined": {"name": "rate"}}}, + {"name": "apy", "type": {"defined": {"name": "rate"}}}, + {"name": "padding1", "type": {"array": ["u64", 64]}} + ] + } + } + ] +} \ No newline at end of file diff --git a/projects/pluto-so/index.js b/projects/pluto-so/index.js new file mode 100644 index 000000000000..0c593616ddf9 --- /dev/null +++ b/projects/pluto-so/index.js @@ -0,0 +1,75 @@ +const { getProvider } = require("../helper/solana"); +const { Program } = require("@coral-xyz/anchor"); +const PlutosoIDL = require("./idl.json"); + +let program + +function getProgram() { + if (!program) { + program = new Program(PlutosoIDL, getProvider()); + } + return program; +} + +async function tvl(api) { + await earnTvl(api) + await leverageTvl(api) +} + +async function borrowed(api) { + return leverageTvl(api, true) +} + +const HNST_VAULT = 'C5uSiUij9P6nWUQBDF8CeJQnYQMeKJWhANRDirGHHD28' + +async function staking(api) { + const pluto = getProgram() + + const earnHnst = await pluto.account.vaultEarn.fetch(HNST_VAULT) + + let unitHnst = earnHnst.unitSupply.toString() / 1e8 + let indexHnst = earnHnst.index.toString() / 1e12 + let amountHnst = unitHnst * indexHnst + + api.add(earnHnst.tokenMint.toString(), amountHnst * (10 ** earnHnst.tokenDecimal)); +} + +async function earnTvl(api) { + const pluto = getProgram() + const vaultData = await pluto.account.vaultEarn.all() + vaultData.forEach(({ publicKey, account }) => { + if (publicKey.toString() === HNST_VAULT) return; + let unit = account.unitSupply.toString() / 1e8 + let index = account.index.toString() / 1e12 + let amount = unit * index + api.add(account.tokenMint.toString(), amount * (10 ** account.tokenDecimal)); + }) +} + +async function leverageTvl(api, isBorrow = false) { + const pluto = getProgram() + const vaultData = await pluto.account.vaultLeverage.all() + vaultData.forEach(({ account }) => { + if (isBorrow) { + let unit = account.borrowingUnitSupply.toString() / 1e8 + let index = account.borrowingIndex.toString() / 1e12 + let amount = unit * index + api.add(account.tokenCollateralTokenMint.toString(), amount * (10 ** account.tokenCollateralTokenDecimal)); + } else { + let unit = account.unitSupply.toString() / 1e8 + let index = account.index.toString() / 1e12 + let amount = unit * index + api.add(account.nativeCollateralTokenMint.toString(), amount * (10 ** account.nativeCollateralTokenDecimal)); + } + }) +} + +module.exports = { + timetravel: false, + methodology: "The Total Value Locked (TVL) is calculated as the sum of leveraged position assets and the available assets deposited in Earn Vaults.", + solana: { + staking, + tvl, + // borrowed, + }, +}; diff --git a/utils/formatIdl.js b/utils/formatIdl.js new file mode 100644 index 000000000000..7f799098f3da --- /dev/null +++ b/utils/formatIdl.js @@ -0,0 +1,151 @@ +// const jsonString = require('json-stringify-pretty-compact') +const fs = require('fs') + +const stringOrChar = /("(?:[^\\"]|\\.)*")|[:,]/g; +let idl = require('../projects/test/idl.json') + +idl.instructions = [] +idl.events = [] +idl.errors = [] + +const whitelistedTypes = new Set() +const typeMap = {} +idl.types.forEach(t => typeMap[t.name] = t) +const whitelistedTypeMap = {} +const accountMap = {} +idl.accounts.forEach(a => accountMap[a.name] = a) + +idl.accounts.forEach(checkType) + +function checkType(typeObj) { + let isAccountObjInTypeMap = false + if (whitelistedTypes.has(typeObj.name)) return; + whitelistedTypes.add(typeObj.name) + if (!typeObj.type && accountMap[typeObj.name]) { // it could be account whose type is present in the typeMap + if (typeMap[typeObj.name]) { + typeObj = typeMap[typeObj.name] + isAccountObjInTypeMap = true + } + else return; + } + + if (isAccountObjInTypeMap || !accountMap[typeObj.name]) + whitelistedTypeMap[typeObj.name] = typeObj + + if (typeObj.type.kind !== 'struct') return; + typeObj.type.fields.forEach(f => { + if (typeof f.type === 'object') { + const tName = f.type.defined?.name + if (tName && typeMap[tName]) checkType(typeMap[tName]) + if (f.type.array) + f.type.array.forEach(a => { + if (a.defined && typeMap[a.defined.name]) checkType(typeMap[a.defined.name]) + }) + } + }) +} + +console.log(JSON.stringify({whitelistedTypeMap: Object.keys(whitelistedTypeMap), accountMap: Object.keys(accountMap), whitelistedTypes: Array.from(whitelistedTypes)}, null, 2)) +idl.types = Object.values(whitelistedTypeMap) + + + + +const res = stringify(idl, { maxLength: 153 }) +fs.writeFileSync(__dirname + '/../projects/test/idl.json', res) + + +// from json-stringify-pretty-compact + +function stringify(passedObj, options = {}) { + const indent = JSON.stringify( + [1], + undefined, + options.indent === undefined ? 2 : options.indent + ).slice(2, -3); + + const maxLength = + indent === "" + ? Infinity + : options.maxLength === undefined + ? 80 + : options.maxLength; + + let { replacer } = options; + + return (function _stringify(obj, currentIndent, reserved) { + if (obj && typeof obj.toJSON === "function") { + obj = obj.toJSON(); + } + + const string = JSON.stringify(obj, replacer); + + if (string === undefined) { + return string; + } + + const length = maxLength - currentIndent.length - reserved; + + if (string.length <= length) { + const prettified = string.replace( + stringOrChar, + (match, stringLiteral) => { + return stringLiteral || `${match} `; + } + ); + if (prettified.length <= length) { + return prettified; + } + } + + if (replacer != null) { + obj = JSON.parse(string); + replacer = undefined; + } + + if (typeof obj === "object" && obj !== null) { + const nextIndent = currentIndent + indent; + const items = []; + let index = 0; + let start; + let end; + + if (Array.isArray(obj)) { + start = "["; + end = "]"; + const { length } = obj; + for (; index < length; index++) { + items.push( + _stringify(obj[index], nextIndent, index === length - 1 ? 0 : 1) || + "null" + ); + } + } else { + start = "{"; + end = "}"; + const keys = Object.keys(obj); + const { length } = keys; + for (; index < length; index++) { + const key = keys[index]; + const keyPart = `${JSON.stringify(key)}: `; + const value = _stringify( + obj[key], + nextIndent, + keyPart.length + (index === length - 1 ? 0 : 1) + ); + if (value !== undefined) { + items.push(keyPart + value); + } + } + } + + if (items.length > 0) { + return [start, indent + items.join(`,\n${nextIndent}`), end].join( + `\n${currentIndent}` + ); + } + } + + return string; + })(passedObj, "", 0); +} From 0837177cc54447181dbd0cb93b97817e273f6720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90inh=20V=C4=83n=20ti=E1=BA=BFn?= Date: Thu, 21 Nov 2024 02:15:34 +0700 Subject: [PATCH 407/787] Add TempestFinance TVL (#12344) --- projects/tempest-finance/chains.js | 10 ++++++++++ projects/tempest-finance/index.js | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 projects/tempest-finance/chains.js create mode 100644 projects/tempest-finance/index.js diff --git a/projects/tempest-finance/chains.js b/projects/tempest-finance/chains.js new file mode 100644 index 000000000000..fefbc9aee644 --- /dev/null +++ b/projects/tempest-finance/chains.js @@ -0,0 +1,10 @@ +module.exports = { + ethereum: 1, + optimism: 10, + bsc: 56, + manta: 169, + canto: 7700, + base: 8453, + arbitrum: 42161, + scroll: 534352, +} \ No newline at end of file diff --git a/projects/tempest-finance/index.js b/projects/tempest-finance/index.js new file mode 100644 index 000000000000..915b98dbf0fd --- /dev/null +++ b/projects/tempest-finance/index.js @@ -0,0 +1,20 @@ +const chains = require("./chains"); +const axios = require("axios"); + +async function tvl(api) { + const response = await axios.get(`https://protocol-service-api.tempestfinance.xyz/api/v1/vaults?chainId=${chains[api.chain]}`) + const vaults = response.data.data.vaults; + + const tokens = vaults.map(vault => vault.mainAsset); + const balances = await api.multiCall({ abi: 'uint256:totalAssets', calls: vaults.map(vault => vault.address) }); + + api.addTokens(tokens, balances) +} + +Object.keys(chains).forEach(chain => { + module.exports[chain] = { + tvl: async (api) => { + return await tvl(api) + } + } +}) From 5f0f616233cbfc2d35af042deaa6f12268a6a9d2 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 21 Nov 2024 01:53:05 +0000 Subject: [PATCH 408/787] add blacklist --- projects/vexchange/index.js | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/projects/vexchange/index.js b/projects/vexchange/index.js index eeb0bf360bfe..47bccf246155 100644 --- a/projects/vexchange/index.js +++ b/projects/vexchange/index.js @@ -1,25 +1,33 @@ -const { get } = require('../helper/http') +const { get } = require('../helper/http'); const { toUSDTBalances } = require('../helper/balances'); +const blacklist = ['0xb008022F676a8918299E046c91Af65Fc06b52B1C','0xca907dD0044D673e878E08Af32E2Dc2AdC731369']; + async function tvl() { - const data = await get('https://api.vexchange.io/v1/pairs') - let balance = 0 - Object.values(data).forEach(pair => { + const data = await get('https://api.vexchange.io/v1/pairs'); + let balance = 0; + + Object.entries(data).forEach(([pairAddress, pair]) => { + // Skip the blacklisted pair + if (blacklist.includes(pairAddress)) return; + if (pair.token0.usdPrice && pair.token1.usdPrice) { - balance += +pair.token0Reserve * pair.token0.usdPrice - balance += +pair.token1Reserve * pair.token1.usdPrice + balance += +pair.token0Reserve * pair.token0.usdPrice; + balance += +pair.token1Reserve * pair.token1.usdPrice; } else if (pair.token0.usdPrice) { - balance += +pair.token0Reserve * pair.token0.usdPrice * 2 - }else if (pair.token1.usdPrice) { - balance += +pair.token1Reserve * pair.token1.usdPrice * 2 + balance += +pair.token0Reserve * pair.token0.usdPrice * 2; + } else if (pair.token1.usdPrice) { + balance += +pair.token1Reserve * pair.token1.usdPrice * 2; } - }) - return toUSDTBalances(balance) + }); + + return toUSDTBalances(balance); } + module.exports = { timetravel: false, misrepresentedTokens: true, vechain: { - tvl - } -}; \ No newline at end of file + tvl, + }, +}; From d83c846e24d3f1a895afac10a40ba35fbb159c28 Mon Sep 17 00:00:00 2001 From: Elara Finance Date: Thu, 21 Nov 2024 14:43:27 +0800 Subject: [PATCH 409/787] add Elara Finance (#12377) --- projects/elara/index.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 projects/elara/index.js diff --git a/projects/elara/index.js b/projects/elara/index.js new file mode 100644 index 000000000000..59f6e25980d6 --- /dev/null +++ b/projects/elara/index.js @@ -0,0 +1,6 @@ +const { methodology, compoundExports2 } = require("../helper/compound"); + +module.exports = { + zircuit: compoundExports2({ comptroller: '0x695aCEf58D1a10Cf13CBb4bbB2dfB7eDDd89B296' }), + methodology, +} \ No newline at end of file From dbacba935826f708d9750d30052d1e47d5d374fd Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:14:11 +0100 Subject: [PATCH 410/787] update doubler #12375 --- projects/doubler/index.js | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/projects/doubler/index.js b/projects/doubler/index.js index 98a8ad562867..ce04c5f7fb60 100644 --- a/projects/doubler/index.js +++ b/projects/doubler/index.js @@ -1,18 +1,30 @@ const ADDRESSES = require('../helper/coreAssets.json') -const WETH_CONTRACT = ADDRESSES.arbitrum.WETH; -const DOUBLER_CONTRACT = '0x56386f04111057a5D8DF8d719827038B716333F0'; -async function tvl(api) { - const collateralBalance = await api.call({ - abi: 'erc20:balanceOf', - target: WETH_CONTRACT, - params: [DOUBLER_CONTRACT], - }); - api.add(WETH_CONTRACT, collateralBalance) -} +const ARB_DOUBLER_POOL1_CONTRACT = '0x56386f04111057a5D8DF8d719827038B716333F0'; + +const abi = "function getPool() view returns ((bool isNative, uint16 inputFee, uint16 withdrawFee, uint256 id, uint256 lastPrice, uint256 cLastRbTime, uint256 lowerOfInputMaximum, uint256 endPrice, uint256 startTime, uint256 lastDayRate, uint256 endTime, address asset, address cToken, address bToken, address creator))" -module.exports = { +const config = { arbitrum: { - tvl, + pepe: '0x15AD6EDCa40dFAFE1B3BAc5F1c6d65411726F1bF', + pool2: '0xC64a3f7da839F8851cB2A5710b693c92fA461027', + }, + manta: { + weth: '0xc8480647Eeb358df638Ca882362cE528cC666087', + manta: '0x498F4711a706F9ad33b5D68EaA20E56a87d5d926', + }, +} + +Object.keys(config).forEach(chain => { + const pools = Object.values(config[chain]) + module.exports[chain] = { + tvl: async (api) => { + const tokens = await api.multiCall({ abi, calls: pools, }) + if (chain === 'arbitrum') { + tokens.push({ asset: ADDRESSES.arbitrum.WETH }) + pools.push(ARB_DOUBLER_POOL1_CONTRACT) + } + return api.sumTokens({ tokensAndOwners2: [tokens.map(i => i.asset), pools] }) + } } -}; \ No newline at end of file +}) \ No newline at end of file From 7de0648b689f8f20f32e3684221da3fc17ea471c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:16:03 +0100 Subject: [PATCH 411/787] update lock file --- package-lock.json | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c769bfdb7cf..5b6ddb351cea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1009,10 +1009,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.98", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.98.tgz", - "integrity": "sha512-HeXnoPDKDqH2qmag5j+EnRxPr5N/Pog+R6XEOE1L2+x53UwjjVEmCnVzdTYOMqL2fIfiM2Ba+ByShxJ88gKxlg==", - "license": "ISC", + "version": "5.0.101", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.101.tgz", + "integrity": "sha512-mlZsTA9dxIDn/VG2qKq6q9BbIikb5UWL7WSI71JNRNDJ0RE/bHiRvpU0gjtgEb6svt5pV5jRsWONjcSPOWcljg==", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@elastic/elasticsearch": "^8.13.1", From cfaa801f360ab1a0ed63ecfbd0eed742a71d1f66 Mon Sep 17 00:00:00 2001 From: ZkSwapFinance <126151208+ZkSwapFinance@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:25:37 +0700 Subject: [PATCH 412/787] Add zkSwap Finance Stableswap Pools (#12374) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/zkSwap-finance-stableswap/index.js | 35 +++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 projects/zkSwap-finance-stableswap/index.js diff --git a/projects/zkSwap-finance-stableswap/index.js b/projects/zkSwap-finance-stableswap/index.js new file mode 100644 index 000000000000..92ea9e093dec --- /dev/null +++ b/projects/zkSwap-finance-stableswap/index.js @@ -0,0 +1,35 @@ +const { getLogs2 } = require('../helper/cache/getLogs') + +module.exports = { + methodology: + "TVL accounts for the liquidity on all StableSwap pools.", +} + +const config = { + era: [{ target: '0xc93397F26886daB0d752C86612C78dbd2C1d5a59', fromBlock: 48190039, token3: true, },], +} + +Object.keys(config).forEach(chain => { + const factories = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const configs = await Promise.all(factories.map(getTvlConfig)) + return api.sumTokens({ ownerTokens: configs.flat() }) + + async function getTvlConfig({ target, fromBlock, token3 }) { + let topic = '0xa9551fb056fc743efe2a0a34e39f9769ad10166520df7843c09a66f82e148b97' + let eventAbi = 'event NewStableSwapPair(address indexed swapContract, address indexed tokenA, address indexed tokenB)' + let getOwnTokens = logs => logs.map(i => ([[i.tokenA, i.tokenB], i.swapContract])) + + if (token3) { + topic = '0x48dc7a1b156fe3e70ed5ed0afcb307661905edf536f15bb5786e327ea1933532' + eventAbi = 'event NewStableSwapPair(address indexed swapContract, address tokenA, address tokenB, address tokenC, address LP)' + getOwnTokens = logs => logs.map(i => ([[i.tokenA, i.tokenB, i.tokenC], i.swapContract])) + } + + const logs = await getLogs2({ api, target, fromBlock, eventAbi }) + return getOwnTokens(logs) + } + } + } +}) \ No newline at end of file From 79d3f632b35d15c522e652a49d46734db4e27da3 Mon Sep 17 00:00:00 2001 From: ZkSwapFinance <126151208+ZkSwapFinance@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:25:55 +0700 Subject: [PATCH 413/787] Add zkSwap Finance v3 Pools (#12373) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/zkSwap-finance-v3/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/zkSwap-finance-v3/index.js diff --git a/projects/zkSwap-finance-v3/index.js b/projects/zkSwap-finance-v3/index.js new file mode 100644 index 000000000000..bdcfdbc69eb8 --- /dev/null +++ b/projects/zkSwap-finance-v3/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + era: { factory: '0x88ADD6a7e3C221e02f978B388a092c9FD8cd7850', fromBlock: 49205949 }, +}) From 20d6d2695abdbe1be449ad6d259b08cec76138df Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Nov 2024 17:32:02 +0100 Subject: [PATCH 414/787] use multicall --- projects/etherfi-lrt/index.js | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/projects/etherfi-lrt/index.js b/projects/etherfi-lrt/index.js index a5543b4dcba0..78604fcdee0e 100644 --- a/projects/etherfi-lrt/index.js +++ b/projects/etherfi-lrt/index.js @@ -1,5 +1,4 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require('@defillama/sdk') const vaults = [ '0x917ceE801a67f933F2e6b33fC0cD1ED2d5909D88', @@ -18,33 +17,24 @@ const vaultAccountant = [ ] async function vaultsTvl(api) { + const supplies = await api.multiCall({ calls: vaults, abi: 'uint256:totalSupply' }) + const quotes = await api.multiCall({ calls: vaultAccountant, abi: 'uint256:getRate' }) + const bases = await api.multiCall({ calls: vaultAccountant, abi: 'address:base' }) for (let i = 0; i < vaults.length; i++) { - const bv = vaults[i] - const ba = vaultAccountant[i] - const bvSupply = await api.call({ - target: bv, - abi: 'uint256:totalSupply', - }); - let [base, quote] = await Promise.all([ - api.call({ - target: ba, - abi: "function base() external view returns (address)", - }), - api.call({ - target: ba, - abi: "function getRate() external view returns (uint256 rate)", - }), - ]); - if(base.toLowerCase() === String(ADDRESSES.ethereum.WETH).toLowerCase()) { + const bvSupply = supplies[i] + let base = bases[i] + const quote = quotes[i] + if (base.toLowerCase() === ADDRESSES.ethereum.WETH.toLowerCase()) base = ADDRESSES.ethereum.EETH - } - const denominator = Math.pow(10, (String(quote).length-1)) - api.add(base, bvSupply * quote / denominator ) + + const denominator = Math.pow(10, (String(quote).length - 1)) + api.add(base, bvSupply * quote / denominator) } } module.exports = { doublecounted: true, + misrepresentedTokens: true, ethereum: { tvl: vaultsTvl, }, From ab93c5139c9fd111fe3133cb6f8c0eba0acd6b80 Mon Sep 17 00:00:00 2001 From: chainupk <121842069+chainupk@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:52:42 +0800 Subject: [PATCH 415/787] Added more address for Obelisk (#12378) --- projects/helper/bitcoin-book/obelisk.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/helper/bitcoin-book/obelisk.js b/projects/helper/bitcoin-book/obelisk.js index 498c99a2f5bd..713f0b042202 100644 --- a/projects/helper/bitcoin-book/obelisk.js +++ b/projects/helper/bitcoin-book/obelisk.js @@ -5,5 +5,8 @@ module.exports = [ 'bc1qy4pkldj4dqxtqypz6awwj7y8vahkht8uqhdlw3', 'bc1qyd4g2r0n0p9u775z7062rz8j88xxy27kmmh5aj', '155FvRapVDRbFYxaxGxJ9eCQjgr7X2yC6g', - 'bc1qjnhtrjgr4y0new266twr6x6703lshszuey8zwm' -] \ No newline at end of file + 'bc1qjnhtrjgr4y0new266twr6x6703lshszuey8zwm', + 'bc1quxgdtm6n9zau50n6aptcyn55gm0r5xjhvl8399', + 'bc1qt887udazek8rl89ck43nar4397a8qkp9qe9qdp', + 'bc1qunzwmk6gkx3ugxd4kmult6vl8vlws0w2jfume8jhnyxmz47ucy4qkhqwu6' +] From 3a406bf80d82481af54b9da383a45d9795a2a03a Mon Sep 17 00:00:00 2001 From: naz <85476822+welaskez@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:54:42 +0500 Subject: [PATCH 416/787] create BeetrootFinance adapter (#12351) --- projects/BeetrootFinance/index.js | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 projects/BeetrootFinance/index.js diff --git a/projects/BeetrootFinance/index.js b/projects/BeetrootFinance/index.js new file mode 100644 index 000000000000..338248e54dda --- /dev/null +++ b/projects/BeetrootFinance/index.js @@ -0,0 +1,73 @@ + +const { get } = require('../helper/http') +const ADDRESSES = require("../helper/coreAssets.json"); +const { getJettonBalances } = require('../helper/chain/ton') + +async function fetchVaultData(address) { + const url = 'https://api5.storm.tg/graphql'; + + const query = ` + query VaultQuery($address: String!) { + getVault(address: $address) { + rate + } + } + `; + + try { + const response = await fetch(url, { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + operationName: 'VaultQuery', + variables: { address }, + query + }) + }); + + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + + const data = await response.json(); + return data.data.getVault; + } catch (error) { + console.error('Error fetching vault data:', error); + throw error; + } +} + +async function calculateTvl() { + const USDT_TLP_PRICE = (await get('https://tradoor.io/v3/lp/history/price?period=week')).data[0].price; + + const vaultData = await fetchVaultData('0:33e9e84d7cbefff0d23b395875420e3a1ecb82e241692be89c7ea2bd27716b77'); + const USDT_SLP_PRICE = vaultData?.rate / 1e9 || 0; + + const balances = await getJettonBalances('0:c2f0c639b58e6b3cce8a145c73e7c7cc5044baa92b05c62fcf6da8a0d50b8edc'); + + const USDT_SLP_ADDRESS = '0:aea78c710ae94270dc263a870cf47b4360f53cc5ed38e3db502e9e9afb904b11'; + const USDT_TLP_ADDRESS = '0:332c916f885a26051cb3a121f00c2bda459339eb103df36fe484df0b87b39384'; + + const USDT_SLP_BALANCE = balances[USDT_SLP_ADDRESS].balance / 1e9; + const USDT_TLP_BALANCE = balances[USDT_TLP_ADDRESS].balance / 1e9; + + const tvl = ((USDT_TLP_PRICE * USDT_TLP_BALANCE) + (USDT_SLP_PRICE * USDT_SLP_BALANCE)) * 1e6; + return tvl; +} + + +async function tvl(api) { + const calculatedTvl = await calculateTvl(); + api.add(ADDRESSES.ton.USDT, calculatedTvl); +} + +module.exports = { + misrepresentedTokens: true, + timetravel: false, + methodology: `TVL calculation methodology consists of the delta between onchain USDT deposits and withdrawals`.trim(), + ton: { + tvl + } +} From 278fec437a1c50ad7ded77d154c2f1dc115e0d92 Mon Sep 17 00:00:00 2001 From: Pavel Shuvalov Date: Thu, 21 Nov 2024 15:04:20 +0400 Subject: [PATCH 417/787] Switch to public REST API for ston.fi (#12382) --- projects/ston/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/projects/ston/index.js b/projects/ston/index.js index ea4db669f8ad..88664defbdca 100644 --- a/projects/ston/index.js +++ b/projects/ston/index.js @@ -1,4 +1,4 @@ -const { post } = require('../helper/http') +const { get } = require('../helper/http') const { transformDexBalances } = require('../helper/portedTokens') const sdk = require('@defillama/sdk') @@ -7,12 +7,11 @@ module.exports = { timetravel: false, ton: { tvl: async () => { - const { result: {pools}} = await post('https://app.ston.fi/rpc', {"jsonrpc":"2.0","id":2,"method":"pool.list","params":{}}) - sdk.log(pools.length) + const result = await get("https://api.ston.fi/v1/pools?dex_v2=true") return transformDexBalances({ chain: 'ton', - data: pools.map(i => ({ + data: result.pool_list.map(i => ({ token0: i.token0_address, token1: i.token1_address, token0Bal: i.reserve0, From d50bc282eeace299406d2ee85886219e58b76ff9 Mon Sep 17 00:00:00 2001 From: Akarsh Maurya <57176420+Havoc19@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:05:03 +0700 Subject: [PATCH 418/787] Address black list (#12384) --- projects/velvet-capital-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/velvet-capital-v3/index.js b/projects/velvet-capital-v3/index.js index 532cba5dc350..4e748c20821a 100644 --- a/projects/velvet-capital-v3/index.js +++ b/projects/velvet-capital-v3/index.js @@ -2,7 +2,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require('../helper/unwrapLPs') const config = { - base: { address: '0xf93659fb357899e092813bc3a2959ceDb3282a7f', blacklistedTokens: [ADDRESSES.bsc.USDT, "0x96af5739ca66ca55ab71ac9f308720d5044995ee"] }, + base: { address: '0xf93659fb357899e092813bc3a2959ceDb3282a7f', blacklistedTokens: [ADDRESSES.bsc.USDT, "0x96af5739ca66ca55ab71ac9f308720d5044995ee","0xca4f1536cd29d42bcbc8211f1b621ba9e817433f"]}, bsc: { address: '0xA1fe1C37Bf899C7F7521082C002dFA4fEbAaA8dd', blacklistedTokens: [ADDRESSES.optimism.WETH_1] } } From 30ca251fe36609cf280bd5fd7c235e5171bb0644 Mon Sep 17 00:00:00 2001 From: pixelcooker <155977639+pixelcooker@users.noreply.github.com> Date: Thu, 21 Nov 2024 19:06:39 +0800 Subject: [PATCH 419/787] feat: add chain data of goose-farm (#12381) Co-authored-by: rocker --- projects/goose-farm/index.js | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/projects/goose-farm/index.js b/projects/goose-farm/index.js index e529e28b34a9..3da68cd42f52 100644 --- a/projects/goose-farm/index.js +++ b/projects/goose-farm/index.js @@ -1,13 +1,25 @@ -module.exports = { - bsc: { - tvl: async (api) => { - const vault = '0x0874f961178879cdbde3500544c49f864f232899' - const lpToken= await api.call({ abi: 'address:lpToken', target: vault}) - const token= await api.call({ abi: 'address:token', target: vault}) - const supply= await api.call({ abi: 'uint256:totalSupply', target: lpToken}) - const price= await api.call({ abi: 'uint256:price', target: lpToken}) - - api.addTokens(token, supply * price/1e18); - } +const chainList = [ + {symbol: 'bsc', address: '0x0874f961178879cdbde3500544c49f864f232899', decimals: 18,}, + {symbol: 'ethereum', address: '0xe8a01d8dac4af19ec7a22cf87f3d141ce6e7e9fb', decimals: 6}, + {symbol: 'arbitrum', address: '0x0874F961178879cDbDe3500544C49F864F232899', decimals: 6}, + {symbol: 'op_bnb', address: '0x857aB0b4F236F7DD7E5AC5F96C0bbEbF230c2D3B', decimals: 18}, +] + +const getTvl = async (api, chain) => { + const lpToken= await api.call({ abi: 'address:lpToken', target: chain.address}) + const token= await api.call({ abi: 'address:token', target: chain.address}) + const supply= await api.call({ abi: 'uint256:totalSupply', target: lpToken}) + const price= await api.call({ abi: 'uint256:price', target: lpToken}) + api.addTokens(token, supply * price/Math.pow(10, chain.decimals)); +} + +const tvlFunctions = chainList.reduce((acc, chain) => { + acc[chain.symbol] = { + tvl: async (api) => getTvl(api, chain) } + return acc; +}, {}); + +module.exports = { + ...tvlFunctions, }; \ No newline at end of file From 67de122cef78a34b296fca4e76a223c323e7e16d Mon Sep 17 00:00:00 2001 From: D <105202131+dmitrykarpushkin@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:07:15 +0400 Subject: [PATCH 420/787] Escrow update (#12380) --- projects/banx/index.js | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/projects/banx/index.js b/projects/banx/index.js index 02c5ddea41c8..f39198dd44f6 100644 --- a/projects/banx/index.js +++ b/projects/banx/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { Program, } = require("@project-serum/anchor"); +const { Program } = require('@coral-xyz/anchor'); const { getConfig } = require('../helper/cache') const { bs58 } = require('@project-serum/anchor/dist/cjs/utils/bytes'); const { getProvider } = require('../helper/solana') @@ -11,28 +11,26 @@ async function getData() { return data async function getAllData() { - const programId = '4tdmkuY6EStxbS6Y8s5ueznL3VPMSugrvQuDeAHGZhSt' const provider = getProvider() const idl = await getConfig('banx-idl', 'https://api.banx.gg/idl') - const program = new Program(idl, programId, provider) + const program = new Program(idl, provider) - const bondOfferOffset = 32 + 8; const bondTradeTxnOffset = 8; + const userVaultOffset = 8; const [ - bondOffers, bondTradeTxn, + userVaults, ] = await Promise.all([ - getFilteredAccounts(program, 'bondOfferV3', bondOfferOffset, [5, 7,]), - getFilteredAccounts(program, 'bondTradeTransactionV3', bondTradeTxnOffset, [2, 6, 9]), - ]) + getFilteredAccounts(program, 'bondTradeTransactionV3', bondTradeTxnOffset, [2, 6, 9, 13]), + getFilteredAccounts(program, 'userVault', userVaultOffset, [1]), + ]); - // OffersSum is sum of sol in pools not yet lent out. The borrowedSum is the sum of SOL which has been borrowed and overcollaterized by the value of locked NFTs - const { offersSum, offersSumUsdc } = bondOffers.reduce(({ offersSum, offersSumUsdc }, offer) => { - if (offer.account.bondingCurve.bondingType.linearUsdc || offer.account.bondingCurve.bondingType.exponentialUsdc) { - return { offersSumUsdc: offersSumUsdc + (+offer.account.fundsSolOrTokenBalance) + Math.max(0, +offer.account.bidSettlement), offersSum }; + const { escrowSum, escrowSumUsdc } = userVaults.reduce(({ escrowSum, escrowSumUsdc }, userVault) => { + if (userVault.account.lendingTokenType.usdc) { + return { escrowSum, escrowSumUsdc: escrowSumUsdc + (+userVault.account.offerLiquidityAmount) } } - return { offersSum: offersSum + (+offer.account.fundsSolOrTokenBalance) + Math.max(0, +offer.account.bidSettlement), offersSumUsdc }; - }, { offersSum: 0, offersSumUsdc: 0 }); + return { escrowSum: escrowSum + (+userVault.account.offerLiquidityAmount), escrowSumUsdc } + }, { escrowSum: 0, escrowSumUsdc: 0 }) const { borrowedSum, borrowedSumUsdc } = bondTradeTxn.reduce(({ borrowedSum, borrowedSumUsdc }, bondTxn) => { if (bondTxn.account.lendingToken.usdc) { @@ -42,7 +40,7 @@ async function getData() { }, { borrowedSum: 0, borrowedSumUsdc: 0 }); - return { tvl: offersSum, tvlUsdc: offersSumUsdc, borrowed: borrowedSum, borrowedUsdc: borrowedSumUsdc } + return { tvl: escrowSum, tvlUsdc: escrowSumUsdc, borrowed: borrowedSum, borrowedUsdc: borrowedSumUsdc } } } From c01a05adf511b65e0caea9c65fcb27ee76958528 Mon Sep 17 00:00:00 2001 From: Snape <76953546+Snape888@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:25:27 +0000 Subject: [PATCH 421/787] mortgageFiTVL (#12383) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/mortgageFi/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/mortgageFi/index.js diff --git a/projects/mortgageFi/index.js b/projects/mortgageFi/index.js new file mode 100644 index 000000000000..72d359817dbe --- /dev/null +++ b/projects/mortgageFi/index.js @@ -0,0 +1,17 @@ +const config = { + arbitrum: { pools: ['0x9Be2Cf73E62DD3b5dF4334D9A36888394822A33F'] }, + base: { pools: ['0x1bE87D273d47C3832Ab7853812E9A995A4DE9EEA'] }, +} + +Object.keys(config).forEach(chain => { + const { pools, } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const cTokens = await api.multiCall({ abi: 'address:contractCoin', calls: pools }) + const sTokens = await api.multiCall({ abi: 'address:stablecoin', calls: pools }) + const tokens = cTokens.concat(sTokens) + const owners = pools.concat(pools) + return api.sumTokens({ tokensAndOwners2: [tokens, owners] }) + } + } +}) \ No newline at end of file From b6c18409f35aa21388dbc32fab3a8d644c140170 Mon Sep 17 00:00:00 2001 From: eth_sign Date: Thu, 21 Nov 2024 19:59:32 +0530 Subject: [PATCH 422/787] feat: adding lucidly vaults tvl adapter (#12386) --- projects/lucidly/index.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/projects/lucidly/index.js b/projects/lucidly/index.js index 1f8326f6de52..2934990891b3 100644 --- a/projects/lucidly/index.js +++ b/projects/lucidly/index.js @@ -1,15 +1,18 @@ async function tvl(api) { - const pools = [ - '0x8dBE744F6558F36d34574a0a6eCA5A8dAa827235', - ] - const tokens = await api.fetchList({ lengthAbi: 'numTokens', itemAbi: 'tokens', calls:pools, groupedByInput: true, }) - console.log(tokens) - const ownerTokens = pools.map((v, i) => [tokens[i], v]) - return api.sumTokens({ ownerTokens }) + const registryAddress = '0x3C2A24c9296eC8B1fdb8039C937DaC7CBca3976c'; + + const pools = await api.call({ + abi: 'function getPoolAddresses() view returns (address[])', + target: registryAddress, + }); + + const tokens = await api.fetchList({ lengthAbi: 'numTokens', itemAbi: 'tokens', calls: pools, groupedByInput: true, }) + const ownerTokens = pools.map((v, i) => [tokens[i], v]) + return api.sumTokens({ ownerTokens }) } module.exports = { - start: 1693971707, - ethereum: { tvl } + start: 1693971707, + ethereum: { tvl } }; From 27b1d88f5b4d49cb8baf53d788fc0dbb19a7da06 Mon Sep 17 00:00:00 2001 From: gravymcstrut <165300338+gravymcstrut@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:30:43 +0300 Subject: [PATCH 423/787] add acet adapter (#12385) Co-authored-by: gravymcstrut --- projects/acet/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/acet/index.js diff --git a/projects/acet/index.js b/projects/acet/index.js new file mode 100644 index 000000000000..68378f60052a --- /dev/null +++ b/projects/acet/index.js @@ -0,0 +1,19 @@ +const stakingAccounts = [ + "0x64D2C3a33F5bc09Dc045f9A20fA4cA4f42215c0b", + "0xfb62ea552eeba8b00cc5db56ba8d7c50429c0001", + "0x38506a479E8959150466cE9253c19089fd0907D7", +]; + +const token = "0x9F3BCBE48E8b754F331Dfc694A894e8E686aC31D"; + +module.exports = { + bsc: { + tvl: async () => ({}), + staking: async (api) => { + return api.sumTokens({ + tokensAndOwners: stakingAccounts.map((account) => [token, account]), + }); + }, + }, +}; + \ No newline at end of file From 4f24eb9e1078a6666a6056740a27ff5bd95b1a04 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:07:46 +0000 Subject: [PATCH 424/787] btc-bitlayer (#12387) --- projects/bitlayer-btc/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 projects/bitlayer-btc/index.js diff --git a/projects/bitlayer-btc/index.js b/projects/bitlayer-btc/index.js new file mode 100644 index 000000000000..a41fda2005b0 --- /dev/null +++ b/projects/bitlayer-btc/index.js @@ -0,0 +1,22 @@ +const sdk = require("@defillama/sdk"); +const { sumTokensExport } = require("../helper/sumTokens"); + +const owners = [ + "132Cka5Vdw9FcFX3eb28xikKAMvhuMJGwi", + "3JszuRdFFEz1WbQKam4XjAtnZsYX62RLMX", + "33uhW878fbvVxZuZ216q2XvgdajLdG4rN4", + "32a7u8tM45GPSdjzy7PbRvuncEvHFxnYR4", + "3D3a4fPJ5HKw43Qd6QHtoJ6RvMUL7UBDT5", + "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2", + "bc1p87c2auxxj372evzhd5f5huddtrladtkn3z4p94ew32qvwcsgujestjj45r", + "bc1puqn6dw6etk6yg8zruvf2s94cmhxkfncsaumwhtfhu5qy3e6m94sq37eq66", + "bc1pvnh3zy48ml3nhzhqrtc7endhj9rrtrv5puy2775p3jwka8y99aqsz78uu2", + "bc1pxpp82hc4t4flkyqtjdnzr3q72qh9st78gfge50vzlrjtp9c6yn4s5zq5vk", + "bc1p7agkadaau66jtva9n8k5pg3lsctuyqur8a2l5y9hzwqkh5nlmd0skuhws3", +]; + +module.exports = { + bitcoin: { + tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: owners })]), + }, +}; From afbfe81468fab008181f90d46bb5586b9eef19ca Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:19:49 +0100 Subject: [PATCH 425/787] bitlayter bridge: code refactor --- projects/bitlayer-btc/index.js | 18 ++---------------- .../helper/bitcoin-book/bitlayer-bridge.js | 13 +++++++++++++ projects/helper/bitcoin-book/index.js | 2 ++ 3 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 projects/helper/bitcoin-book/bitlayer-bridge.js diff --git a/projects/bitlayer-btc/index.js b/projects/bitlayer-btc/index.js index a41fda2005b0..5a6957f6e997 100644 --- a/projects/bitlayer-btc/index.js +++ b/projects/bitlayer-btc/index.js @@ -1,22 +1,8 @@ -const sdk = require("@defillama/sdk"); const { sumTokensExport } = require("../helper/sumTokens"); - -const owners = [ - "132Cka5Vdw9FcFX3eb28xikKAMvhuMJGwi", - "3JszuRdFFEz1WbQKam4XjAtnZsYX62RLMX", - "33uhW878fbvVxZuZ216q2XvgdajLdG4rN4", - "32a7u8tM45GPSdjzy7PbRvuncEvHFxnYR4", - "3D3a4fPJ5HKw43Qd6QHtoJ6RvMUL7UBDT5", - "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2", - "bc1p87c2auxxj372evzhd5f5huddtrladtkn3z4p94ew32qvwcsgujestjj45r", - "bc1puqn6dw6etk6yg8zruvf2s94cmhxkfncsaumwhtfhu5qy3e6m94sq37eq66", - "bc1pvnh3zy48ml3nhzhqrtc7endhj9rrtrv5puy2775p3jwka8y99aqsz78uu2", - "bc1pxpp82hc4t4flkyqtjdnzr3q72qh9st78gfge50vzlrjtp9c6yn4s5zq5vk", - "bc1p7agkadaau66jtva9n8k5pg3lsctuyqur8a2l5y9hzwqkh5nlmd0skuhws3", -]; +const { bitlayerBridge } = require("../helper/bitcoin-book"); module.exports = { bitcoin: { - tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: owners })]), + tvl: sumTokensExport({ owners: bitlayerBridge }) }, }; diff --git a/projects/helper/bitcoin-book/bitlayer-bridge.js b/projects/helper/bitcoin-book/bitlayer-bridge.js new file mode 100644 index 000000000000..85e16abf14ed --- /dev/null +++ b/projects/helper/bitcoin-book/bitlayer-bridge.js @@ -0,0 +1,13 @@ +module.exports = [ + "132Cka5Vdw9FcFX3eb28xikKAMvhuMJGwi", + "3JszuRdFFEz1WbQKam4XjAtnZsYX62RLMX", + "33uhW878fbvVxZuZ216q2XvgdajLdG4rN4", + "32a7u8tM45GPSdjzy7PbRvuncEvHFxnYR4", + "3D3a4fPJ5HKw43Qd6QHtoJ6RvMUL7UBDT5", + "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2", + "bc1p87c2auxxj372evzhd5f5huddtrladtkn3z4p94ew32qvwcsgujestjj45r", + "bc1puqn6dw6etk6yg8zruvf2s94cmhxkfncsaumwhtfhu5qy3e6m94sq37eq66", + "bc1pvnh3zy48ml3nhzhqrtc7endhj9rrtrv5puy2775p3jwka8y99aqsz78uu2", + "bc1pxpp82hc4t4flkyqtjdnzr3q72qh9st78gfge50vzlrjtp9c6yn4s5zq5vk", + "bc1p7agkadaau66jtva9n8k5pg3lsctuyqur8a2l5y9hzwqkh5nlmd0skuhws3", +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index f3ac166bc37a..0db660450d85 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -83,6 +83,7 @@ const swissborg = require('./swissborg.js') const toobit = require('./toobit.js') const indiaCovid = require('./india-covid.js') const wooCEX = require('./woo-cex.js') +const bitlayerBridge = require('./bitlayer-bridge.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -95,6 +96,7 @@ const teleswap = [ module.exports = { ...fetchers, + bitlayerBridge, teleswap, ainn, allo, From d976342fc9b8c01009dbadacfab6d497a056ae8b Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 21 Nov 2024 15:39:49 +0000 Subject: [PATCH 426/787] add WSHIDO token --- projects/helper/tokenMapping.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index aec72e10f5ed..6c7556ebd451 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -49,6 +49,9 @@ const fixBalancesTokens = { '0x796ea11fa2dd751ed01b53c372ffdb4aaa8f00f9': { coingeckoId: "usd-coin", decimals: 6 }, '0x2c03058c8afc06713be23e58d2febc8337dbfe6a': { coingeckoId: "tether", decimals: 6 }, '0xfc24f770f94edbca6d6f885e12d4317320bcb401': { coingeckoId: "weth", decimals: 18 }, + }, + shido: { + '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: "shido-2", decimals: 18 } // WSHIDO } } From f1a265f42dd38cdf9a9e11d617947d396a391d99 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:10:44 +0100 Subject: [PATCH 427/787] fix pluto-so --- projects/pluto-so/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pluto-so/index.js b/projects/pluto-so/index.js index 0c593616ddf9..0fa02757e886 100644 --- a/projects/pluto-so/index.js +++ b/projects/pluto-so/index.js @@ -39,7 +39,7 @@ async function earnTvl(api) { const vaultData = await pluto.account.vaultEarn.all() vaultData.forEach(({ publicKey, account }) => { if (publicKey.toString() === HNST_VAULT) return; - let unit = account.unitSupply.toString() / 1e8 + let unit = (account.unitSupply.toNumber() - account.unitBorrowed.toNumber()) / 1e8 let index = account.index.toString() / 1e12 let amount = unit * index api.add(account.tokenMint.toString(), amount * (10 ** account.tokenDecimal)); From 2e88ca18f29b063dedab80a1dbfacc32f71cb249 Mon Sep 17 00:00:00 2001 From: Diyahir <32445955+diyahir@users.noreply.github.com> Date: Thu, 21 Nov 2024 14:30:58 -0600 Subject: [PATCH 428/787] Add fluid protocol (#12388) --- projects/fluid-protocol/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/fluid-protocol/index.js diff --git a/projects/fluid-protocol/index.js b/projects/fluid-protocol/index.js new file mode 100644 index 000000000000..d9537addb7e7 --- /dev/null +++ b/projects/fluid-protocol/index.js @@ -0,0 +1,12 @@ +const { sumTokens } = require("../helper/chain/fuel") + +async function tvl(api) { + const contractId = '0xb18340bfe68c0b3a4fbd3a3ae2c014be94c16569b7f360cf53efe1b7023e545e' + + return sumTokens({ api, owner: contractId }) +} + +module.exports = { + fuel: { tvl }, + timetravel: false, +} From fbae322e085a3cd9228f8f3ef24b7a4d91f34c4b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:52:03 +0100 Subject: [PATCH 429/787] update pumpbtc #12379 --- projects/helper/tokenMapping.js | 17 ++++++++++++++++- projects/pumpbtc/index.js | 4 ++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 6c7556ebd451..dc017774ec2a 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -52,7 +52,22 @@ const fixBalancesTokens = { }, shido: { '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: "shido-2", decimals: 18 } // WSHIDO - } + }, + ethereum: { + '0x777B2913b1BB171A83cA3cdf79CB40523Ac76fDb': { coingeckoId: "ignition-fbtc", decimals: 8 }, + }, + arbitrum: { + '0xbbeb34F9d50e0BABe1bd03Fd4120296354510529': { coingeckoId: "ignition-fbtc", decimals: 8 }, + }, + bsc: { + '0x2B25f4F134a56054b2b6388C2750F1eA3877e02b': { coingeckoId: "ignition-fbtc", decimals: 8 }, + }, + mantle: { + '0x93C6afA1882ea5E5bF403cA8fcb5aF87409EeCd0': { coingeckoId: "ignition-fbtc", decimals: 8 }, + }, + bob: { + '0xd681C5574b7F4E387B608ed9AF5F5Fc88662b37c': { coingeckoId: "ignition-fbtc", decimals: 8 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index 673c987723c9..d1419a37c57b 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -2,6 +2,7 @@ const { sumTokens } = require('../helper/sumTokens'); const utils = require('../helper/utils'); const { getConfig } = require('../helper/cache'); const bitcoinBook = require('../helper/bitcoin-book'); +const { sumTokens2 } = require('../helper/unwrapLPs'); module.exports = { methodology: 'TVL for pumpBTC is calculated based on the total value of WBTC, FBTC, BTCB held in the contract that were utilized in the minting process of pumpBTC.', @@ -11,7 +12,6 @@ async function getStakingAddresses() { let res = await utils.fetchURL('https://dashboard.pumpbtc.xyz/api/dashboard/asset/tokenowners') const btcAddresses = res.data.data || {} - //console.log('>>', btcAddresses.length) return btcAddresses } @@ -28,7 +28,7 @@ async function otherTvl(api) { } const { owners, tokens } = addresses[api.chain] - return api.sumTokens({ owners, tokens }) + return sumTokens2({ api, owners, tokens }) } module.exports.isHeavyProtocol = true; From c56e85dc703416db847a0c0b13f8f290160ba806 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:39:46 +0100 Subject: [PATCH 430/787] refactor ipor #12389 --- projects/ipor/index.js | 64 ++++++------------------------------------ 1 file changed, 9 insertions(+), 55 deletions(-) diff --git a/projects/ipor/index.js b/projects/ipor/index.js index 205d49c2d5ee..11b43e51c901 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -1,4 +1,3 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { abi } = require("./abi"); const { getConfig } = require('../helper/cache') @@ -14,68 +13,23 @@ async function tvlEthereum(api) { return await calculateTvlForV1(api); } } -async function tvlArbitrum(api) { - const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); - - const assets = [ - ADDRESSES.arbitrum.USDC_CIRCLE, // USDC - ] - - const res = await api.multiCall({ abi: abi.getBalancesForOpenSwap, calls: assets, target: addresses.arbitrum.IporProtocolRouter }) - const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: assets }) - - res.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, vault }, i) => { - const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool - const decimal = 18 - decimals[i] - api.add(assets[i], balance / (10 ** decimal)) - }); - - for (const pool of addresses.arbitrum.pools) { - if (assets.includes(pool.asset)) { - continue; - } - await api.sumTokens({owner: pool.AmmTreasury, tokens: [pool.asset]}); - } - return api.getBalances(); -} - -async function tvlBase(api) { - const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); - - const assets = [ - ADDRESSES.base.USDC, // USDC - ] - - const res = await api.multiCall({ abi: abi.getBalancesForOpenSwap, calls: assets, target: addresses.base.IporProtocolRouter }) - const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: assets }) - - res.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, vault }, i) => { - const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool - const decimal = 18 - decimals[i] - api.add(assets[i], balance / (10 ** decimal)) - }); - const tokensAndOwners = addresses.base.pools.map(pool => [pool.asset, pool.AmmTreasury]); - return api.sumTokens({ tokensAndOwners, blacklistedTokens: assets }); -} async function calculateTvlForV2(api) { - const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL) + const chain = api.chain + const {[chain]: { IporProtocolRouter, pools, vaults }} = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL) - const assets = [ - ADDRESSES.ethereum.USDT, // USDT - ADDRESSES.ethereum.USDC, // USDC - ADDRESSES.ethereum.DAI, // DAI - ] + let assets = vaults.map(i => i.asset) + assets = [...new Set(assets)] - const res = await api.multiCall({ abi: abi.getAmmBalance, calls: assets, target: addresses.ethereum.IporProtocolRouter }) + const res = await api.multiCall({ abi: abi.getBalancesForOpenSwap, calls: assets, target: IporProtocolRouter }) const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: assets }) - res.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, vault }, i) => { + res.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, }, i) => { const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool const decimal = 18 - decimals[i] api.add(assets[i], balance / (10 ** decimal)) }); - const tokensAndOwners = addresses.ethereum.pools.map(pool => [pool.asset, pool.AmmTreasury]); + const tokensAndOwners = pools.map(pool => [pool.asset, pool.AmmTreasury]); return api.sumTokens({ tokensAndOwners, blacklistedTokens: assets }); } @@ -104,10 +58,10 @@ module.exports = { tvl: tvlEthereum }, arbitrum: { - tvl: tvlArbitrum + tvl: calculateTvlForV2 }, base: { - tvl: tvlBase + tvl: calculateTvlForV2 }, hallmarks:[ [1674648000, "Liquidity Mining Start"] From 22bde959c7f07d4ad0cd93ff0eaa21c492db339d Mon Sep 17 00:00:00 2001 From: sofa-org <161308389+sofa-org@users.noreply.github.com> Date: Fri, 22 Nov 2024 17:45:19 +0800 Subject: [PATCH 431/787] add more vaults (#12393) --- projects/sofa-org/index.js | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/projects/sofa-org/index.js b/projects/sofa-org/index.js index 9f38c147d126..ca253f321c50 100644 --- a/projects/sofa-org/index.js +++ b/projects/sofa-org/index.js @@ -45,6 +45,19 @@ const config = { '0x3191a0008415dEB5c5161C4B394Ec46C8C703f8c', '0xC9Aa266e2E50EC2474cD881566845480F8daE931', ], + // scrvusd + crvtokens: [ + '0x0655977FEb2f289A4aB78af67BAB0d17aAb84367', + '0x0655977FEb2f289A4aB78af67BAB0d17aAb84367', + '0x0655977FEb2f289A4aB78af67BAB0d17aAb84367', + '0x0655977FEb2f289A4aB78af67BAB0d17aAb84367' + ], + crvUSDVaults: [ + '0xF5BF8aa4b571FF2Be9905289bfcEbC1D46408D9F', + '0x9832e7E40d5a1495cA7bdbCd6A5C0A90D28F6cFA', + '0x99595455Ba95b286F8e2614470b865e34f034Aa1', + '0xf421B050647CF6eB757dE873F212e04a5e324487', + ], }, arbitrum: { vaults: [ @@ -85,6 +98,15 @@ const config = { '0x94Fe821E8Adde08aB97530D432Ff34A724FD7830', '0x4a5B4049a4aFae31278d36768704872f73dA67D1', '0x08c57aE48a89b6876A76dC618972Ef1602da7ED8', + // automator + '0x986Fa0383C39dBdA1B3A29Ac536fe5Df354Ed160', + '0x770f7fcEce69C68B208B80bBc4e3d1Bf8f9c0672', + '0x1e5A684d263F42BaC1f2bAd6fB379277D4D6c28C', + '0xBF898C0C2E7d415dE8FCcc78d1200D029a060560', + ], + crvtokens: [ + ], + crvUSDVaults: [ ], }, bsc: { @@ -101,18 +123,23 @@ const config = { '0xD0fb7977df47d7Fe946A21679DAbCe877f7A3a05', '0xab08fF5dd91636fE556f692825Cadd7bA04A4c97', ], + crvtokens: [ + ], + crvUSDVaults: [ + ], } } Object.keys(config).forEach(chain => { - const { vaults = [], aVaults = [] } = config[chain] + const { vaults = [], aVaults = [], crvtokens = [], crvUSDVaults = [] } = config[chain] module.exports[chain] = { tvl: async (api) => { const tokens = await api.multiCall({ abi: 'address:collateral', calls: vaults }) const tokens2 = await api.multiCall({ abi: 'address:collateral', calls: aVaults }) const atokens = await api.multiCall({ abi: 'address:aToken', calls: aVaults }) - return api.sumTokens({ tokensAndOwners2: [[tokens, tokens2, atokens].flat(), [vaults, aVaults, aVaults].flat()] }) + + return api.sumTokens({ tokensAndOwners2: [[tokens, tokens2, atokens, crvtokens].flat(), [vaults, aVaults, aVaults, crvUSDVaults].flat()] }) } } }) From 1d95cb7f9d0bb30158c2a620600055837d0bf5ca Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:32:06 +0100 Subject: [PATCH 432/787] solayer (#12397) Co-authored-by: Joshua Sum Co-authored-by: Joshua Sum <58564538+JoshuaSum@users.noreply.github.com> --- projects/helper/solana.js | 10 ++++++++++ projects/solayer-ssol/index.js | 34 ++++++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 872c05708d4e..67fbc7ca8aab 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -62,6 +62,15 @@ function getProvider(chain = 'solana') { return provider[chain] } + +function getAssociatedTokenAddress(mint, owner,) { + if (typeof mint === 'string') mint = new PublicKey(mint) + if (typeof owner === 'string') owner = new PublicKey(owner) + const [associatedTokenAddress] = PublicKey.findProgramAddressSync([owner.toBuffer(), TOKEN_PROGRAM_ID.toBuffer(), mint.toBuffer()], ASSOCIATED_TOKEN_PROGRAM_ID); + return associatedTokenAddress; +} + + async function getTokenSupplies(tokens, { api } = {}) { const sleepTime = tokens.length > 2000 ? 2000 : 200 const connection = getConnection() @@ -414,4 +423,5 @@ module.exports = { TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_2022_PROGRAM_ID, + getAssociatedTokenAddress, }; diff --git a/projects/solayer-ssol/index.js b/projects/solayer-ssol/index.js index 4d3ecdb86daf..9ebc1a0a633c 100644 --- a/projects/solayer-ssol/index.js +++ b/projects/solayer-ssol/index.js @@ -1,22 +1,44 @@ -const { sumTokens2, getConnection, } = require("../helper/solana"); +const { sumTokens2, getConnection, getAssociatedTokenAddress, } = require("../helper/solana"); const { PublicKey } = require("@solana/web3.js"); const ADDRESSES = require('../helper/coreAssets.json') async function tvl(api) { const connection = getConnection(); - // add native SOL staking for sSOL + // add native SOL staking const stakeAccount = await connection.getAccountInfo(new PublicKey('po1osKDWYF9oiVEGmzKA4eTs8eMveFRMox3bUKazGN2')) api.add(ADDRESSES.solana.SOL, Number(stakeAccount.data.readBigUint64LE(258))) + // get LST details + const data = await connection.getProgramAccounts(new PublicKey('sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn'), { + filters: [{ dataSize: 74, },], + }) + + // Build list of token accounts by deriving ATAs for each LST-vault pair + const tokenAccounts = data.map((i) => { + const offset = 8 + const lstMint = new PublicKey(i.account.data.slice(offset + 0, offset + 32)); + const vaultPubkey = new PublicKey(i.pubkey.toString()); + + // Derive the ATA for this LST and vault + const ata = getAssociatedTokenAddress(lstMint, vaultPubkey); + + return ata.toString() + }); + + return sumTokens2({ - balances: api.getBalances() + api, + tokenAccounts, + blacklistedTokens: [ + 'sSo1wxKKr6zW2hqf5hZrp2CawLibcwi1pMBqk5bg2G4', + 'testqcAoCvfFpuFNtdmrBnBMSfFoXKkSTJ3ky6cPKjx', + ] }) } module.exports = { timetravel: false, - doublecounted: true, - methodology: "TVL is calculated by restaked native SOL in the Solayer staking pool", + methodology: "TVL is calculated by summing all re-staked assets.", solana: { tvl }, -}; \ No newline at end of file +}; From 48c282bfb12a5168105b68ce429a357bdb8ead5d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:38:47 +0100 Subject: [PATCH 433/787] track pv01 #12365 --- projects/pv01/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/pv01/index.js diff --git a/projects/pv01/index.js b/projects/pv01/index.js new file mode 100644 index 000000000000..8f64d3c0e835 --- /dev/null +++ b/projects/pv01/index.js @@ -0,0 +1,21 @@ +const PV01_VAULT_FACTORY_ETHEREUM = '0x7eB37F9326E2474D5178Fd5224bc35E30A5398B5'; +const abi = { + getVaults: "function getVaults(string type_) view returns (address[])" +}; + +async function tvl(api) { + // Fetch the list of vaults from the factory + const vaults = await api.call({ abi: abi.getVaults, target: PV01_VAULT_FACTORY_ETHEREUM, params: ['BondPerpetualVault'] }); + // Fetch total supply for each vault + const supplies = await api.multiCall({ abi: "erc20:totalSupply", calls: vaults, }); + api.add(vaults, supplies) +} + +module.exports = { + methodology: + "Counts the total supply of rTBL (Rolling T-bill) tokens across all PV01 perpetual bond vaults.", + start: 20377028, + ethereum: { + tvl, + }, +}; From 475ac0131ac39a47f33e20c2432202bf61061a54 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:53:17 +0100 Subject: [PATCH 434/787] fix aleph bridge --- projects/alephium-bridge/index.js | 42 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/projects/alephium-bridge/index.js b/projects/alephium-bridge/index.js index 383fcf0f4d78..4fc07c5cdc33 100644 --- a/projects/alephium-bridge/index.js +++ b/projects/alephium-bridge/index.js @@ -7,31 +7,37 @@ const ethBridgedAlphAddress = '0x590f820444fa3638e022776752c5eef34e2f89a6' const bscTokenBridgeAddress = '0x2971F580C34d3D584e0342741c6a622f69424dD8' const bscBridgedAlphAddress = '0x8683BA2F8b0f69b2105f26f488bADe1d3AB4dec8' -async function tvl(ts, block) { - const ethTotalBridgedAlphSupply = await sdk.api.erc20.totalSupply({ target: ethBridgedAlphAddress, block, chain: 'ethereum' }) - const bscTotalBridgedAlphSupply = await sdk.api.erc20.totalSupply({ target: bscBridgedAlphAddress, block, chain: 'bsc' }) - return { - alephium: (ethTotalBridgedAlphSupply.output / 1e18) + (bscTotalBridgedAlphSupply.output / 1e18), - } +async function tvl(api) { + const ethApi = new sdk.ChainApi({ chain: 'ethereum', timestamp: api.timestamp }) + const bscApi = new sdk.ChainApi({ chain: 'bsc', timestamp: api.timestamp }) + await ethApi.getBlock() + await bscApi.getBlock() + const ethBal = await ethApi.call({ abi: 'erc20:totalSupply', target: ethBridgedAlphAddress }) + const bscBal = await bscApi.call({ abi: 'erc20:totalSupply', target: bscBridgedAlphAddress }) + api.addCGToken('alephium', (+ethBal + +bscBal) / 1e18) } module.exports = { methodology: "Tracks funds locked in the Alephium Bridge Token contracts on Ethereum and Binance Smart Chain", ethereum: { - tvl: sumTokensExport({ owner: ethTokenBridgeAddress, tokens: [ - ADDRESSES.ethereum.WETH, - ADDRESSES.ethereum.USDT, - ADDRESSES.ethereum.USDC, - ADDRESSES.ethereum.WBTC, - ADDRESSES.ethereum.DAI - ] }), + tvl: sumTokensExport({ + owner: ethTokenBridgeAddress, tokens: [ + ADDRESSES.ethereum.WETH, + ADDRESSES.ethereum.USDT, + ADDRESSES.ethereum.USDC, + ADDRESSES.ethereum.WBTC, + ADDRESSES.ethereum.DAI + ] + }), }, bsc: { - tvl: sumTokensExport({ owner: bscTokenBridgeAddress, tokens: [ - ADDRESSES.bsc.WBNB, - ADDRESSES.bsc.USDC, - ADDRESSES.bsc.USDT - ] }), + tvl: sumTokensExport({ + owner: bscTokenBridgeAddress, tokens: [ + ADDRESSES.bsc.WBNB, + ADDRESSES.bsc.USDC, + ADDRESSES.bsc.USDT + ] + }), }, alephium: { tvl From 3167014c77dd3c8be52ff045e668ddf34a47b001 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 22 Nov 2024 11:48:23 +0000 Subject: [PATCH 435/787] fix ondo --- projects/ondofinance/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/ondofinance/index.js b/projects/ondofinance/index.js index 4618e1e782ef..2b4705d921b2 100644 --- a/projects/ondofinance/index.js +++ b/projects/ondofinance/index.js @@ -70,7 +70,7 @@ Object.keys(config).forEach((chain) => { api.addTokens(config.ethereum.USDY, aptosSupply * 1e18, { skipChain: true, }); } else if (chain === "noble") { - const res = await get(`https://noble-api.polkachu.com/cosmos/bank/v1beta1/supply/${config.noble.USDY}`); + const res = await get(`https://rest.cosmos.directory/noble/cosmos/bank/v1beta1/supply/by_denom?denom=ausdy`); api.addTokens(config.ethereum.USDY, parseInt(res.amount.amount), { skipChain: true, }); } else { supplies = await api.multiCall({ abi: "erc20:totalSupply", calls: fundAddresses, }) From ebec7905f748afa4536b693f76c4436faa93f0d1 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:11:02 +0100 Subject: [PATCH 436/787] Cytonic (#12407) Co-authored-by: GooGrand Co-authored-by: GooGrand <55867268+GooGrand@users.noreply.github.com> --- projects/cytonic/index.js | 149 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 projects/cytonic/index.js diff --git a/projects/cytonic/index.js b/projects/cytonic/index.js new file mode 100644 index 000000000000..cb9e01c15f72 --- /dev/null +++ b/projects/cytonic/index.js @@ -0,0 +1,149 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require("../helper/unwrapLPs"); +const { getProvider, sumTokens2, } = require("../helper/solana"); +const { Program } = require("@project-serum/anchor"); +const idl = { + "version": "0.1.0", + "name": "depositor", + "instructions": [], + "accounts": [ + { + "name": "VaultData", + "docs": [ + "Vault is a instance that holds general deposit data for a particular token", + "It is also responsible for freezing and migrating funds", + "When program receives funds, they are send on vault data's account's ATA" + ], + "type": { + "kind": "struct", + "fields": [ + { "name": "owner", "type": "publicKey" }, + { "name": "mint", "type": "publicKey" }, + { "name": "vaultAta", "type": "publicKey" }, + { "name": "withdrawDuration", "type": "u64" }, + { "name": "isFrozen", "type": "bool" }, + { "name": "totalDeposited", "type": "u64" }, + { "name": "bump", "type": "u8" }, + { "name": "allowedForPurchase", "type": "bool" }, + { "name": "purchaseRecepientAta", "type": "publicKey" }, + { "name": "admin", "type": "publicKey" } + ] + } + } + ], + "types": [], + "events": [], + "errors": [] +} + + +const BRIDGE_DEPOSITOR_EVM = '0xaEA5Bf79F1E3F2069a99A99928927988EC642e0B'; +const BRIDGE_DEPOSITOR_SOL = 'HYDqq5GfUj4aBuPpSCs4fkmeS7jZHRhrrQ3q72KsJdD4'; + +async function sol_tvl() { + const provider = getProvider() + const program = new Program(idl, BRIDGE_DEPOSITOR_SOL, provider) + const tokenAccounts = (await program.account.vaultData.all()).map((a) => a.account.vaultAta); + return sumTokens2({ tokenAccounts }) +} + + +module.exports = { + ethereum: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // ETH + ADDRESSES.ethereum.WBTC, // WBTC + ADDRESSES.ethereum.WETH, // WETH + "0xd31a59c85ae9d8edefec411d448f90841571b89c", // WSOL + ADDRESSES.ethereum.WSTETH, // Lido WSTETH + ADDRESSES.ethereum.EETH, // EETH + '0xd9a442856c234a39a81a089c06451ebaa4306a72', // pufETH + '0xf951e335afb289353dc249e82926178eac7ded78', // swETH + ADDRESSES.ethereum.USDT, // USDT + ADDRESSES.ethereum.USDC, // USDC + ADDRESSES.ethereum.DAI, // DAI + '0xbf5495Efe5DB9ce00f80364C8B423567e58d2110', // ezETH + ADDRESSES.ethereum.USDe, // Ethena USD + ], + }), + }, + bsc: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // BNB + ADDRESSES.bsc.USDC, // USDC + ADDRESSES.bsc.USDT, // USDT + '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3', // DAI + ], + }), + }, + arbitrum: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // ETH + ADDRESSES.arbitrum.USDC_CIRCLE, // USDC + ADDRESSES.arbitrum.USDT, // USDT + ADDRESSES.arbitrum.DAI, // DAI + ADDRESSES.optimism.ezETH, // ezETH + ], + }), + }, + base: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // ETH + ADDRESSES.base.USDC, // USDC + ], + }), + }, + polygon: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // POL + ADDRESSES.polygon.USDC, // USDC + ADDRESSES.polygon.USDT, // USDT + ADDRESSES.polygon.DAI, // DAI + ], + }), + }, + avax: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // AVA + ADDRESSES.avax.USDC, // USDC + ADDRESSES.avax.USDt, // USDT + ADDRESSES.avax.DAI, // DAI + ], + }), + }, + optimism: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // ETH + ADDRESSES.optimism.USDC_CIRCLE, // USDC + ADDRESSES.optimism.USDT, // USDT + ADDRESSES.optimism.DAI, // DAI + ], + }), + }, + blast: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // ETH + ADDRESSES.blast.USDB, // USDB + ], + }), + }, + solana: { + tvl: sol_tvl + } +} \ No newline at end of file From ec2a5f118eacfe8bea5fc4f31202f870f5b7c8f9 Mon Sep 17 00:00:00 2001 From: KevinMoll-ls <35275573+KevinMoll-ls@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:15:21 -0500 Subject: [PATCH 437/787] Reserve TVL Addresses update (#12400) --- projects/reserve/index.js | 45 +++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/projects/reserve/index.js b/projects/reserve/index.js index 3501fe68b57d..7880018261dc 100644 --- a/projects/reserve/index.js +++ b/projects/reserve/index.js @@ -13,21 +13,34 @@ const chainConfigs = { deployerAddresses: [ "0xFd6CC4F251eaE6d02f9F7B41D1e80464D3d2F377", "0x5c46b718Cd79F2BBA6869A3BeC13401b9a4B69bB", + "0x1bd20253c49515d348dad1af70ff2c0473fea358", "0x15480f5b5ed98a94e1d36b52dd20e9a35453a38e", "0x43587CAA7dE69C3c2aD0fb73D4C9da67A8E35b0b", + "0x2204ec97d31e2c9ee62ead9e6e2d5f7712d3f1bf" ], rsr: "0x320623b8E4fF03373931769A31Fc52A4E78B5d70", vault: "0xaedcfcdd80573c2a312d15d6bb9d921a01e4fb0f", fromBlock: 16680995, erc4626Wrapped: ["0xaa91d24c2f7dbb6487f61869cd8cd8afd5c5cab2"], + subgraph_url: "https://subgraph.satsuma-prod.com/327d6f1d3de6/reserve/reserve-mainnet/api", }, base: { deployerAddresses: [ "0xf1B06c2305445E34CF0147466352249724c2EAC1", "0x9C75314AFD011F22648ca9C655b61674e27bA4AC", + "0xfd18ba9b2f9241ce40cde14079c1cda1502a8d0a", ], rsr: "0xab36452dbac151be02b16ca17d8919826072f64a", fromBlock: 5000000, + subgraph_url: "https://subgraph.satsuma-prod.com/327d6f1d3de6/reserve/reserve-base/api", + }, + arbitrum: { + deployerAddresses: [ + "0xfd7eb6b208e1fa7b14e26a1fb10ffc17cf695d68" + ], + rsr: "0xCa5Ca9083702c56b481D1eec86F1776FDbd2e594", + fromBlock: 64464546, + subgraph_url: "https://subgraph.satsuma-prod.com/327d6f1d3de6/reserve/reserve-arbitrum/api", }, }; @@ -173,6 +186,10 @@ module.exports = { tvl, staking, }, + arbitrum: { + tvl, + staking, + }, methodology: `TVL accounts for the underlying ERC20 collateral which back RTokens.`, }; @@ -205,20 +222,26 @@ async function unwrapCreamTokens(api, tokensAndOwners,) { } async function genericUnwrapCvxDeposit(api, tokensAndOwners) { - const tokens = [...new Set(tokensAndOwners.map(t => t[0]))] - const uTokens = await api.multiCall({ abi: 'address:curveToken', calls: tokens }) - const tokenMapping = {} + if (!tokensAndOwners.length) return; + const tokens = [...new Set(tokensAndOwners.map((t) => t[0]))]; + const uTokens = await api.multiCall({ abi: "address:curveToken", calls: tokens, permitFailure: true }); + const tokenMapping = {}; tokens.forEach((token, i) => { - tokenMapping[token] = uTokens[i] - }) + if (uTokens[i]) { + tokenMapping[token] = uTokens[i]; + } + }); + // Filter out tokens without curveToken + const validTokensAndOwners = tokensAndOwners.filter((t) => tokenMapping[t[0]]); const balances = await api.multiCall({ - calls: tokensAndOwners.map(t => ({ + calls: validTokensAndOwners.map((t) => ({ target: t[0], - params: t[1] + params: t[1], })), - abi: 'erc20:balanceOf', - }) + abi: "erc20:balanceOf", + }); balances.forEach((balance, i) => { - api.add(tokenMapping[tokensAndOwners[i][0]], balance) - }) + const token = validTokensAndOwners[i][0]; + api.add(tokenMapping[token], balance); + }); } \ No newline at end of file From bacbfdc5b2511df6dbfc315f404cc92b75fe3a3c Mon Sep 17 00:00:00 2001 From: mdcryptonfts <105838382+mdcryptonfts@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:17:31 -0500 Subject: [PATCH 438/787] Added LSWAX token to 3 WAX projects (#12402) Co-authored-by: Mike D --- projects/alcor/index.js | 1 + projects/neftyblocks/index.js | 1 + projects/taco/index.js | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/alcor/index.js b/projects/alcor/index.js index f23d4dc835a3..b8b614282e8b 100644 --- a/projects/alcor/index.js +++ b/projects/alcor/index.js @@ -20,6 +20,7 @@ async function wax() { ["alien.worlds", "TLM", "alien-worlds"], ["token.rfox", "USD", "redfox-labs"], ["usdt.alcor", "USDT", "usdt-alcor"], + ["token.fusion", "LSWAX", "waxfusion-staked-wax"], ]; return await get_account_tvl(accounts, tokens, "wax"); } diff --git a/projects/neftyblocks/index.js b/projects/neftyblocks/index.js index b6f1fd65f8c6..252d39347794 100644 --- a/projects/neftyblocks/index.js +++ b/projects/neftyblocks/index.js @@ -4,6 +4,7 @@ const tokens = [ ["eosio.token", "WAX", "wax"], ["alien.worlds", "TLM", "alien-worlds"], ["token.nefty", "NEFTY", "nefty"], + ["token.fusion", "LSWAX", "waxfusion-staked-wax"], ]; // NeftyBlocks diff --git a/projects/taco/index.js b/projects/taco/index.js index 79a2ccfdbf9f..b03c24affd16 100644 --- a/projects/taco/index.js +++ b/projects/taco/index.js @@ -10,7 +10,8 @@ async function wax() { ["alien.worlds", "TLM", "alien-worlds"], ["usdt.alcor", "USDT", "alcor-ibc-bridged-usdt-wax"], ["wombattokens", "WOMBAT", "wombat"], - ["wuffi", "WUF", "wuffi"] + ["wuffi", "WUF", "wuffi"], + ["token.fusion", "LSWAX", "waxfusion-staked-wax"], ]; return await get_account_tvl(accounts, tokens, "wax"); } From 4409ecbac7f682dd71a1fbc30e3b343fa387bf94 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Fri, 22 Nov 2024 14:21:02 -0700 Subject: [PATCH 439/787] Avalon Labs: new markets for DeFi lending (#12404) --- projects/avalon-finance-usdalend/index.js | 4 +++- projects/avalon-finance/index.js | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/projects/avalon-finance-usdalend/index.js b/projects/avalon-finance-usdalend/index.js index 1807c42393da..25cc7ba8ce1c 100644 --- a/projects/avalon-finance-usdalend/index.js +++ b/projects/avalon-finance-usdalend/index.js @@ -5,7 +5,9 @@ const { mergeExports } = require('../helper/utils') //@note Main & Innovative Markets const mainMarket = { - iotex: aaveExports('', '', undefined, ['0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'], { v3: true }),} + iotex: aaveExports('', '', undefined, ['0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'], { v3: true }), +} + module.exports = mergeExports( mainMarket, diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index 949e1b2397e8..d6169ff14720 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -12,6 +12,8 @@ const mainMarket = { bsquared: aaveExports('', '', undefined, ['0x4Ea93E846b8C6E7b3D5a5BEDF4fe6B8AED58FCEe'], { v3: true }), taiko: aaveExports('', '', undefined, ['0xF6Aa54a5b60c324602C9359E8221423793e5205d'], { v3: true }), mode: aaveExports('', '', undefined, ['0xC5b05b7092257Ee3eEAf013198d30F1E8179B6C9'], { v3: true }), + klaytn: aaveExports('', '', undefined, ['0xddD3D480521bc027596e078BCd1b838d50Daa076'], { v3: true }), // Kaia V3 Main + zeta: aaveExports('', '', undefined, ['0xA34F1a928024E3609C8968fEA90C747e8D1fA20f'], { v3: true }), // Zetachain V3 Main } const innovativeMarket = { @@ -68,7 +70,15 @@ const lbtcMarkets = { bsc: aaveExports('', '', undefined, ['0x5b9b3C211B81627Cc6b46824CB26829F31A587dc'], { v3: true }), } +const listaMarkets = { + bsc: aaveExports('', '', undefined, ['0x5157f63bE7808DEB090Eee7762e917745896A09E'], { v3: true }), // BSC - ListaDAO +} + +const usdaDefiMarkets = { + iotex: aaveExports('', '', undefined, ['0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'], { v3: true }), +} + module.exports = mergeExports( - mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets + mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets, listaMarkets, usdaDefiMarkets, ) module.exports.methodology = methodologies.lendingMarket From 0d579cd94aa7d6c80b066f6db3372255e93ccbd6 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 22 Nov 2024 22:26:41 +0100 Subject: [PATCH 440/787] fix avalon --- projects/avalon-finance/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index d6169ff14720..18c7ed309d7a 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -74,11 +74,7 @@ const listaMarkets = { bsc: aaveExports('', '', undefined, ['0x5157f63bE7808DEB090Eee7762e917745896A09E'], { v3: true }), // BSC - ListaDAO } -const usdaDefiMarkets = { - iotex: aaveExports('', '', undefined, ['0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'], { v3: true }), -} - module.exports = mergeExports( - mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets, listaMarkets, usdaDefiMarkets, + mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets, listaMarkets, ) module.exports.methodology = methodologies.lendingMarket From eb5baaa0c60416bb45ee1e731ed333a2f943edff Mon Sep 17 00:00:00 2001 From: troy Date: Fri, 22 Nov 2024 15:10:24 -0700 Subject: [PATCH 441/787] Synthetix V3: Update TVL (#12403) --- projects/synthetix-v3/index.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/projects/synthetix-v3/index.js b/projects/synthetix-v3/index.js index 168346a3d0c8..6c0afca10e0b 100644 --- a/projects/synthetix-v3/index.js +++ b/projects/synthetix-v3/index.js @@ -1,11 +1,22 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const ADDRESSES = require('../helper/coreAssets.json') +const CUSTOM_ADDRESSES = { + arbitrum: { + WEETH: "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", + sUSDe: "0x211Cc4DD073734dA055fbF44a2b4667d5E5fE5d2", + tBTC: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40" + } +} + module.exports = { + ethereum: { + tvl: sumTokensExport({ owner: '0xffffffaEff0B96Ea8e4f94b2253f31abdD875847', tokens: [ADDRESSES.ethereum.SNX] }) + }, base: { tvl: sumTokensExport({ owner: '0x32C222A9A159782aFD7529c87FA34b96CA72C696', tokens: [ADDRESSES.base.USDC] }) }, arbitrum: { - tvl: sumTokensExport({ owner: '0xffffffaEff0B96Ea8e4f94b2253f31abdD875847', tokens: [ADDRESSES.arbitrum.USDC_CIRCLE, ADDRESSES.arbitrum.WETH, ADDRESSES.arbitrum.ARB, ADDRESSES.arbitrum.USDe] }) + tvl: sumTokensExport({ owner: '0xffffffaEff0B96Ea8e4f94b2253f31abdD875847', tokens: [ADDRESSES.arbitrum.USDC_CIRCLE, ADDRESSES.arbitrum.WETH, ADDRESSES.arbitrum.ARB, ADDRESSES.arbitrum.USDe, ADDRESSES.arbitrum.WSTETH, CUSTOM_ADDRESSES.arbitrum.WEETH, CUSTOM_ADDRESSES.arbitrum.sUSDe, CUSTOM_ADDRESSES.arbitrum.tBTC] }) } } From ae2a58058afecaf2a685e6f06f2e5ce198685a34 Mon Sep 17 00:00:00 2001 From: Sean Date: Sat, 23 Nov 2024 06:14:36 +0800 Subject: [PATCH 442/787] add ibtc and xsat chain (#12406) Co-authored-by: Sean Co-authored-by: 0xngmi <80541789+0xngmi@users.noreply.github.com> Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chains.json | 3 ++- projects/ibtc/index.js | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 projects/ibtc/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 0ef1a0a40ba5..06c355b3f3bd 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -357,5 +357,6 @@ "zklink", "zksync", "zora", - "zyx" + "zyx", + "xsat" ] diff --git a/projects/ibtc/index.js b/projects/ibtc/index.js new file mode 100644 index 000000000000..24fcdef49a22 --- /dev/null +++ b/projects/ibtc/index.js @@ -0,0 +1,13 @@ +const ibtcContract = "0x8154Aaf094c2f03Ad550B6890E1d4264B5DdaD9A"; + +async function tvl(api) { + // 1iBTC=1XBTC=1BTC(exsat)=1BTC + const ibtcTotalSupply = await api.call({ target: ibtcContract, abi: "uint256:totalSupply" }) + api.addCGToken('bitcoin', ibtcTotalSupply / 1e18) +} + +module.exports = { + xsat: { + tvl + }, +} From 650bb5a2c05697afddf8d0fa44551820dbbff97b Mon Sep 17 00:00:00 2001 From: Five Stars <146636499+fivestarsfi@users.noreply.github.com> Date: Sat, 23 Nov 2024 02:18:37 +0300 Subject: [PATCH 443/787] create syde adapter (#12398) --- projects/syde/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/syde/index.js diff --git a/projects/syde/index.js b/projects/syde/index.js new file mode 100644 index 000000000000..8becae7d9a13 --- /dev/null +++ b/projects/syde/index.js @@ -0,0 +1,13 @@ +const { sumTokensExport } = require("../helper/chain/ton"); +const ADDRESSES = require("../helper/coreAssets.json"); + +const sydeBtcPool = "EQA2J0WCTdYdG-XeyMpPBTeu2dWB2f0oFiV4KVRfV0gewF4E" +const sydeEthPool = "EQD-7ycFO3yeh0EeT2wgXoOQmu64rdDBXqGm4nHDInPfCxJG" +const sydeEurPool = "EQDXvkuKPZahcTDRHSybwiU0E5VpiGFP2QS2iHr082JmtTT9" + +module.exports = { + methodology: 'Counts Syde smartcontract balance as TVL.', + ton: { + tvl: sumTokensExport({ owners: [sydeBtcPool, sydeEthPool, sydeEurPool], tokens: [ADDRESSES.null]}), + } +} From 293e0ae048e52a07fb589adec812db1c8dffb93c Mon Sep 17 00:00:00 2001 From: charq <73696209+buchaoqun@users.noreply.github.com> Date: Sun, 24 Nov 2024 01:30:48 +0800 Subject: [PATCH 444/787] Change the GitHub URL (#12409) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: qwen-solv Co-authored-by: hja <740055963@qq.com> --- projects/helper/bitcoin-book/fetchers.js | 2 +- projects/solv-btc-lst/index.js | 3 ++- projects/solv-protocol-funds/index.js | 5 ++--- projects/solvbtc/index.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/helper/bitcoin-book/fetchers.js b/projects/helper/bitcoin-book/fetchers.js index 95e96f7b59eb..6a2e351d29ff 100644 --- a/projects/helper/bitcoin-book/fetchers.js +++ b/projects/helper/bitcoin-book/fetchers.js @@ -70,7 +70,7 @@ module.exports = { }) }, solvBTC: async () => { - const API_URL = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/refs/heads/main/bitcoin.json' + const API_URL = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/bitcoin.json' return Object.values(await getConfig('solv-protocol/solv-btc-lst', API_URL)).flat(); }, pumpBTC: async () => { diff --git a/projects/solv-btc-lst/index.js b/projects/solv-btc-lst/index.js index f7408ba34130..3db1b193511e 100644 --- a/projects/solv-btc-lst/index.js +++ b/projects/solv-btc-lst/index.js @@ -7,7 +7,7 @@ async function tvl() { } -const solvbtclstListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solvbtc-lst.json'; +const solvbtclstListUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solvbtc-lst.json'; async function evmTVL(api) { let solvbtclst = await getConfig('solv-protocol/solv-btc-lst-evm', solvbtclstListUrl) @@ -18,6 +18,7 @@ async function evmTVL(api) { module.exports = { methodology: 'Staked tokens via Babylon and Core are counted towards TVL, as they represent the underlying BTC assets securing their respective networks.', doublecounted: true, + timetravel: false, bitcoin: { tvl } } diff --git a/projects/solv-protocol-funds/index.js b/projects/solv-protocol-funds/index.js index c3347fc589cc..eaddedb068ca 100644 --- a/projects/solv-protocol-funds/index.js +++ b/projects/solv-protocol-funds/index.js @@ -16,7 +16,7 @@ const graphUrlList = { const slotListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/solv-protocol-rwa-slot/main/slot.json'; -const addressUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solv-funds.json'; +const addressUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solv-funds.json'; async function tvl(api) { const address = (await getConfig('solv-protocol/funds', addressUrl)); @@ -32,7 +32,7 @@ async function tvl(api) { await ceffuBalance(api, address, graphData); } -const solvbtcListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solvbtc.json'; +const solvbtcListUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solvbtc.json'; async function getSolvBTCVAddresses(api) { let solvbtc = (await getConfig('solv-protocol/solvbtc', solvbtcListUrl)); @@ -221,7 +221,6 @@ async function lendle(api, address) { async function vaultBalance(api, graphData) { const network = api.chain; - const solvbtcListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solvbtc.json'; let solvbtc = (await getConfig('solv-protocol/solvbtc', solvbtcListUrl)); if (graphData.pools.length > 0) { const poolLists = graphData.pools; diff --git a/projects/solvbtc/index.js b/projects/solvbtc/index.js index 405202021c83..e8cfcd145658 100644 --- a/projects/solvbtc/index.js +++ b/projects/solvbtc/index.js @@ -2,7 +2,7 @@ const { getConfig } = require("../helper/cache"); const { sumTokens2, } = require("../helper/unwrapLPs"); const { sumTokens } = require("../helper/chain/bitcoin"); -const solvbtcListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/slov-protocol-defillama/main/solvbtc.json'; +const solvbtcListUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solvbtc.json'; async function bitcoinTvl(api) { let solvbtc = (await getConfig('solv-protocol/solvbtc', solvbtcListUrl)); From b11568074aa6d557d8379fecc61897834d4b1bd7 Mon Sep 17 00:00:00 2001 From: Jarekkkkk <86938582+Jarekkkkk@users.noreply.github.com> Date: Sun, 24 Nov 2024 01:33:05 +0800 Subject: [PATCH 445/787] [Bucket Protocol] add new collateral type (#12411) --- projects/bucket-protocol/index.js | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/projects/bucket-protocol/index.js b/projects/bucket-protocol/index.js index e804a4a7b553..c4e070763b5a 100644 --- a/projects/bucket-protocol/index.js +++ b/projects/bucket-protocol/index.js @@ -11,7 +11,12 @@ const USDT = ADDRESSES.sui.USDT; const USDC_CIRCLE= ADDRESSES.sui.USDC_CIRCLE const SCALLOP_swUSDC = "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC" const SCALLOP_sUSDC = "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC" - +const SCALLOP_sUSDT = "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT" +const SCALLOP_sSUI = "0xaafc4f740de0dd0dde642a31148fb94517087052f19afb0f7bed1dc41a50c77b::scallop_sui::SCALLOP_SUI" +const SCALLOP_sSB_ETH = "0xb14f82d8506d139eacef109688d1b71e7236bcce9b2c0ad526abcd6aa5be7de0::scallop_sb_eth::SCALLOP_SB_ETH" +const SCALLOP_sSCA = "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::SCALLOP_SCA" +const SPRING_SUI = "0x83556891f4a0f233ce7b05cfe7f957d4020492a34f5405b2cb9377d060bef4bf::spring_sui::SPRING_SUI" +const SCA_ADDRESS = "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA" const AF_LP_IDs = [ "0xe2569ee20149c2909f0f6527c210bc9d97047fe948d34737de5420fab2db7062", "0x885e09419b395fcf5c8ee5e2b7c77e23b590e58ef3d61260b6b4eb44bbcc8c62", @@ -93,6 +98,21 @@ async function getScallopsLPAmount(id) { return stakingLPObject.fields.coin_balance; } +function convertUnderlyingAssets(coin){ + // USDC + if(coin === SCALLOP_swUSDC) return ADDRESSES.sui.USDC + if(coin === SCALLOP_sUSDC) return ADDRESSES.sui.USDC_CIRCLE + // USDT + if(coin === SCALLOP_sUSDT) return ADDRESSES.sui.USDT + // sSUI + if(coin === SCALLOP_sSUI) return ADDRESSES.sui.SUI + // sbETH + if(coin === SCALLOP_sSB_ETH) return ADDRESSES.sui.WETH + // sSCA + if(coin === SCALLOP_sSCA) return SCA_ADDRESS + return coin +} + async function tvl(api) { const protocolFields = await sui.getDynamicFieldObjects({ parent: MAINNET_PROTOCOL_ID, @@ -144,11 +164,11 @@ async function tvl(api) { for (const bucket of bucketList) { //AF_LP doesn't have price, need to split the tokens if (bucket.type.includes("AF_LP")) continue; - let coin = bucket.type.split("<").pop()?.replace(">", "") ?? ""; + const coin_address = bucket.type.split("<").pop()?.replace(">", "") ?? ""; /// Since we're unable to fetch the price of Scallop's sCOIN, we'll regard sCOIN as underlying assets - if(coin === SCALLOP_swUSDC) coin = ADDRESSES.sui.USDC - if(coin === SCALLOP_sUSDC) coin = ADDRESSES.sui.USDC_CIRCLE + const coin = convertUnderlyingAssets(coin_address) + api.add(coin, bucket.fields.collateral_vault); } From c1b5489dc2f11fe77cf7cb6f8bf14ab32c5caa3b Mon Sep 17 00:00:00 2001 From: Rajeeb Kumar Malik Date: Sat, 23 Nov 2024 23:04:46 +0530 Subject: [PATCH 446/787] Update index.js for Filament TVL update. (#12412) --- projects/filament/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/filament/index.js b/projects/filament/index.js index e4970b23ae65..d188e10297f5 100644 --- a/projects/filament/index.js +++ b/projects/filament/index.js @@ -2,9 +2,10 @@ const { sumTokensExport } = require("../helper/unwrapLPs"); const USDC_CONTRACT = '0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1'; const FILAMENT_VAULT_CONTRACT = '0xbeB6A6273c073815eBe288d2dF4e5E8bc027DA11'; +const FILAMENT_DEPOSIT_CONTRACT = '0x894DE0011C0d69BCa2e19c21CD246C17A8A4252e'; module.exports = { sei: { - tvl: sumTokensExport({ owner: FILAMENT_VAULT_CONTRACT, tokens: [USDC_CONTRACT] }), + tvl: sumTokensExport({ owners: [FILAMENT_VAULT_CONTRACT, FILAMENT_DEPOSIT_CONTRACT], tokens: [USDC_CONTRACT] }), }, } From ece82a3da413c2d8fdef3501383ad1a60af3976f Mon Sep 17 00:00:00 2001 From: Akshat Chhajer Date: Sat, 23 Nov 2024 23:07:34 +0530 Subject: [PATCH 447/787] add rfx-exchange (#12413) --- projects/rfx-exchange/index.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 projects/rfx-exchange/index.js diff --git a/projects/rfx-exchange/index.js b/projects/rfx-exchange/index.js new file mode 100644 index 000000000000..ed5b20d6e6c6 --- /dev/null +++ b/projects/rfx-exchange/index.js @@ -0,0 +1,7 @@ +const { gmxExportsV2 } = require("../helper/gmx"); + +module.exports = { + era: { + tvl: gmxExportsV2({ eventEmitter: '0x9f006f3a4177e645fc872b911cf544e890c82b1a', fromBlock: 46545081 }), + }, +}; From 3a81a8281649e696c7578e4c089f8b21f2a05092 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 23 Nov 2024 18:38:56 +0100 Subject: [PATCH 448/787] pumpbtc: mark as doublecounted #12410 --- projects/pumpbtc/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index d1419a37c57b..cab2120c9c16 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -32,6 +32,7 @@ async function otherTvl(api) { } module.exports.isHeavyProtocol = true; +module.exports.doublecounted = true; ['bitcoin', 'ethereum', 'bsc', 'mantle', 'base', 'arbitrum', 'bob'].forEach(chain => { if (chain == 'bitcoin') { From 3635c975ca2f250d634412ba55e2de3f8c54504a Mon Sep 17 00:00:00 2001 From: Jon Greenwood <81202085+0xJonHoldsCrypto@users.noreply.github.com> Date: Sat, 23 Nov 2024 11:51:19 -0600 Subject: [PATCH 449/787] Add Base Support (#12414) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/vesper/index.js | 58 ++++++++++++++-------------------------- 1 file changed, 20 insertions(+), 38 deletions(-) diff --git a/projects/vesper/index.js b/projects/vesper/index.js index dae3a61ab053..bb1fd9204710 100644 --- a/projects/vesper/index.js +++ b/projects/vesper/index.js @@ -1,70 +1,52 @@ -const sdk = require("@defillama/sdk") -const abi = require('./abi.json') -const { getChainTransform } = require('../helper/portedTokens') const { getConfig } = require("../helper/cache") +const { sumTokensExport } = require("../helper/unwrapLPs") const chainConfig = { ethereum: { stakingPool: '0xbA4cFE5741b357FA371b506e5db0774aBFeCf8Fc', VSP: '0x1b40183efb4dd766f11bda7a7c3ad8982e998421', - api: ['https://api.vesper.finance/pools?stages=prod', 'https://api.vesper.finance/pools?stages=orbit'], + endpoints: ['https://api.vesper.finance/pools?stages=prod', 'https://api.vesper.finance/pools?stages=orbit'], }, avax: { - api: ['https://api-avalanche.vesper.finance/pools?stages=prod'], + endpoints: ['https://api-avalanche.vesper.finance/pools?stages=prod'], }, polygon: { - api: ['https://api-polygon.vesper.finance/pools?stages=prod'], + endpoints: ['https://api-polygon.vesper.finance/pools?stages=prod'], }, optimism: { - api: ['https://api-optimism.vesper.finance/pools'] + endpoints: ['https://api-optimism.vesper.finance/pools'] + }, + base: { + endpoints: ['https://api-base.vesper.finance/pools'] }, } function getChainExports(chain) { - const { stakingPool, VSP, api } = chainConfig[chain] || {} - - async function tvl(timestamp, _block, chainBlocks) { - const block = chainBlocks[chain] - const transformAddress = await getChainTransform(chain) - const balances = {} - let network = chain === 'ethereum' ? 'mainnet' : chain - if (network === 'avax') network = 'avalanche' + const { stakingPool, VSP, endpoints } = chainConfig[chain] || {} + async function tvl(api) { const poolSet = new Set() - for (let i = 0;i< api.length;i++) { + for (let i = 0; i < endpoints.length; i++) { const key = ['vesper', chain, i].join('/') - const data = await getConfig(key, api[i]) + const data = await getConfig(key, endpoints[i]) data.forEach(pool => poolSet.add(pool.address)) // add pools from our contracts list } - if (stakingPool) poolSet.delete(stakingPool) + if (stakingPool) poolSet.delete(stakingPool) const poolList = [...poolSet] - if (!poolList.length) return balances + if (!poolList.length) return; // Get collateral token - const calls = poolList.map(target => ({ target })) - const { output: tokens } = await sdk.api.abi.multiCall({ calls, abi: abi.token, chain, block, }) - const { output: totalValue } = await sdk.api.abi.multiCall({ calls, abi: abi.totalValue, chain, block, }) - tokens.forEach((token, index) => sdk.util.sumSingleBalance(balances, transformAddress(token.output), totalValue[index].output)) - return balances + const tokens = await api.multiCall({ abi: 'address:token', calls: poolList }) + const bals = await api.multiCall({ abi: 'uint256:totalValue', calls: poolList }) + api.add(tokens, bals) } let staking - if (stakingPool) - staking = async (timestamp, _block, chainBlocks) => { - const block = chainBlocks[chain] - const transformAddress = await getChainTransform(chain) - const balances = {} - const vspBalance = (await sdk.api.erc20.balanceOf({ - block, chain, - target: VSP, - owner: stakingPool - })).output; - sdk.util.sumSingleBalance(balances, transformAddress(VSP), vspBalance) - return balances - } + if (stakingPool && VSP) + staking = sumTokensExport({ owner: stakingPool, token: VSP }) return { [chain]: { tvl, staking } @@ -73,5 +55,5 @@ function getChainExports(chain) { module.exports = { start: 1608667205, // December 22 2020 at 8:00 PM UTC - ...['ethereum', 'avax', 'polygon','optimism'].reduce((acc, chain) => ({ ...acc, ...getChainExports(chain) }), {}) + ...['ethereum', 'avax', 'polygon', 'optimism', 'base'].reduce((acc, chain) => ({ ...acc, ...getChainExports(chain) }), {}) }; From c6fa424ea49580da3f479828f72e7af55f3f40ac Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 24 Nov 2024 20:41:53 +0100 Subject: [PATCH 450/787] track weft v2 #12415 --- projects/weft-finance-v2/index.js | 37 +++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 projects/weft-finance-v2/index.js diff --git a/projects/weft-finance-v2/index.js b/projects/weft-finance-v2/index.js new file mode 100644 index 000000000000..7c338cbab63a --- /dev/null +++ b/projects/weft-finance-v2/index.js @@ -0,0 +1,37 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { post } = require('../helper/http') + +const { sumTokens } = require('../helper/chain/radixdlt'); + +const KEY_VALUE_STORE_URL = `https://mainnet.radixdlt.com/state/key-value-store/` + +const lendingPool = 'component_rdx1czmr02yl4da709ceftnm9dnmag7rthu0tu78wmtsn5us9j02d9d0xn' + +const lendingMarket = 'component_rdx1cpy6putj5p7937clqgcgutza7k53zpha039n9u5hkk0ahh4stdmq4w' + +const resourcePoolsKVS = 'internal_keyvaluestore_rdx1kzjr763caq96j0kv883vy8gnf3jvrrp7dfm9zr5n0akryvzsxvyujc' + +async function tvl(api) { + return sumTokens({ owners: [lendingPool, lendingMarket], api }); +} + +async function borrowed(api) { + + let keys = (await post(`${KEY_VALUE_STORE_URL}/keys`, { "key_value_store_address": resourcePoolsKVS })).items.map(i => ({ key_hex: i.key.raw_hex })) + + let data = (await post(`${KEY_VALUE_STORE_URL}/data`, { "key_value_store_address": resourcePoolsKVS, "keys": keys })).entries.map(i => ([i.key.programmatic_json.value, i.value.programmatic_json.fields])) + + data.forEach(([key, fields]) => { + + let totalLoan = fields[6].fields[1].value + + api.add(key, +totalLoan) + + }); + +} + +module.exports = { + radixdlt: { tvl, borrowed }, + timetravel: false, +}; From d796a97c3587c36522d19f6126a192577f37732e Mon Sep 17 00:00:00 2001 From: Vojtch Date: Sun, 24 Nov 2024 20:47:49 +0100 Subject: [PATCH 451/787] update: pwn (#12416) --- projects/pwn/index.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/projects/pwn/index.js b/projects/pwn/index.js index 5ce7b821b5b7..84e885cefff5 100644 --- a/projects/pwn/index.js +++ b/projects/pwn/index.js @@ -15,6 +15,7 @@ const PWN_V1_SIMPLE_LOAN = "0x50160ff9c19fbE2B5643449e1A321cAc15af2b2C"; const PWN_V1_1_SIMPLE_LOAN_A = "0x57c88D78f6D08b5c88b4A3b7BbB0C1AA34c3280A"; // Mainnet, Polygon, Arbitrum, BSC const PWN_V1_1_SIMPLE_LOAN_B = "0x4188C513fd94B0458715287570c832d9560bc08a"; // Cronos, Base, Optimism const PWN_V1_2_SIMPLE_LOAN = "0x9A93AE395F09C6F350E3306aec592763c517072e"; +const PWN_V1_2_2_SIMPLE_LOAN = "0x0773d5F2f7b3264a9Eb285F085aCCcC53d5aAa4F"; module.exports = { misrepresentedTokens: true, @@ -28,6 +29,7 @@ module.exports = { PWN_V1_SIMPLE_LOAN, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN, + PWN_V1_2_2_SIMPLE_LOAN, ], resolveNFTs: true, resolveArtBlocks: true, @@ -43,6 +45,7 @@ module.exports = { PWN_V1_SIMPLE_LOAN, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN, + PWN_V1_2_2_SIMPLE_LOAN, ], fetchCoValentTokens: true, }), @@ -54,32 +57,32 @@ module.exports = { }, base: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_BASE, PWN_V1_1_SIMPLE_LOAN_B, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_BASE, PWN_V1_1_SIMPLE_LOAN_B, PWN_V1_2_SIMPLE_LOAN, PWN_V1_2_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, arbitrum: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_ARBITRUM, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_ARBITRUM, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN, PWN_V1_2_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, optimism: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_OPTIMISM, PWN_V1_1_SIMPLE_LOAN_B, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_OPTIMISM, PWN_V1_1_SIMPLE_LOAN_B, PWN_V1_2_SIMPLE_LOAN, PWN_V1_2_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, bsc: { tvl: sumTokensExport({ - owners: [PWN_BUNDLER_BSC, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + owners: [PWN_BUNDLER_BSC, PWN_V1_1_SIMPLE_LOAN_A, PWN_V1_2_SIMPLE_LOAN, PWN_V1_2_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, linea: { tvl: sumTokensExport({ - owners: [PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + owners: [PWN_V1_2_SIMPLE_LOAN, PWN_V1_2_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, xdai: { tvl: sumTokensExport({ - owners: [PWN_V1_2_SIMPLE_LOAN], fetchCoValentTokens: true, + owners: [PWN_V1_2_SIMPLE_LOAN, PWN_V1_2_2_SIMPLE_LOAN], fetchCoValentTokens: true, }), }, mantle: { tvl: () => ({}) }, From 5b99dbfeea140daddbd987a38d86d1d0d83b2687 Mon Sep 17 00:00:00 2001 From: Wayne Kuo <95527849+WayneAl@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:15:22 +0800 Subject: [PATCH 452/787] Add Typus Safu Funding Vaults and $TYPUS token (#12421) --- projects/typus-safu/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/projects/typus-safu/index.js b/projects/typus-safu/index.js index a6a15ac094d7..28f79c2daf10 100644 --- a/projects/typus-safu/index.js +++ b/projects/typus-safu/index.js @@ -1,8 +1,10 @@ const sui = require("../helper/chain/sui"); const SAFU_REGISTRY = "0xdc970d638d1489385e49ddb76889748011bac4616b95a51aa63633972b841706"; +const FUNDING_VAULT_REGISTRY = "0xeb9e1c94b72cd3e1a4ca2e4d6e9dd61547c0c45c654843e0db03c50ba3c21138"; async function tvl(api) { + // Safu Vaults const fields = await sui.getDynamicFieldObjects({ parent: SAFU_REGISTRY, }); @@ -12,6 +14,17 @@ async function tvl(api) { const deposit_token = "0x" + fields.deposit_token.fields.name; api.add(deposit_token, fields.share_supply.slice(0, 4)); }); + + // Safu Funding Vults + const fields2 = await sui.getDynamicFieldObjects({ + parent: FUNDING_VAULT_REGISTRY, + }); + const safuFundingVaults = fields2.filter((item) => item.type.includes("Vault")); + + safuFundingVaults.forEach(({ fields }) => { + const deposit_token = "0x" + fields.token.fields.name; + api.add(deposit_token, fields.info[1]); + }); } module.exports = { From 5d2a3464c6938ec9fa2c67699004ecf9c2419273 Mon Sep 17 00:00:00 2001 From: Nyangbari <110552619+Nyangbari@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:26:32 +0900 Subject: [PATCH 453/787] feat: catalist dex project added (#12420) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/catalist-dex/index.js | 4 ++++ projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 projects/catalist-dex/index.js diff --git a/projects/catalist-dex/index.js b/projects/catalist-dex/index.js new file mode 100644 index 000000000000..f04be0c5a43d --- /dev/null +++ b/projects/catalist-dex/index.js @@ -0,0 +1,4 @@ +const { uniV3Export } = require('../helper/uniswapV3') +module.exports = uniV3Export({ + 'ace': { factory: '0xbe2fb231883840b9de5a0f43eb55b71253b0ce7b', fromBlock: 10,} +}) \ No newline at end of file diff --git a/projects/helper/env.js b/projects/helper/env.js index fcd578c0968e..b665d9001b1e 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -30,6 +30,7 @@ const DEFAULTS = { RPC_PROXY_URL: "https://rpc-proxy.llama.fi", UNIT0_RPC: "https://rpc.unit0.dev", RBN_RPC: "https://governors.mainnet.redbelly.network", + ACE_RPC_MULTICALL: "0x025A2B4fCE1E0bD736D5cebe6C8a52229795376B", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index dc017774ec2a..6bb97ff8a58e 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -50,6 +50,9 @@ const fixBalancesTokens = { '0x2c03058c8afc06713be23e58d2febc8337dbfe6a': { coingeckoId: "tether", decimals: 6 }, '0xfc24f770f94edbca6d6f885e12d4317320bcb401': { coingeckoId: "weth", decimals: 18 }, }, + ace: { + '0x71ee6485cf72b9c3bf183528a2241474f21b2efa': { coingeckoId: "usd-coin", decimals: 6 }, + }, shido: { '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: "shido-2", decimals: 18 } // WSHIDO }, From 9412aada0873efb89578bed1576c725deacb62b5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:12:49 +0100 Subject: [PATCH 454/787] track typus treasury #12421 --- projects/helper/chain/sui.js | 15 +++++++++++++-- projects/helper/sumTokens.js | 1 + projects/treasury/typus-finance.js | 8 ++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 projects/treasury/typus-finance.js diff --git a/projects/helper/chain/sui.js b/projects/helper/chain/sui.js index aa832b2077f9..7bfd9a9c8bfd 100644 --- a/projects/helper/chain/sui.js +++ b/projects/helper/chain/sui.js @@ -134,13 +134,23 @@ function dexExport({ } -async function sumTokens({ balances = {}, owners = [], blacklistedTokens = [], tokens = [], api }) { +async function sumTokens({ owners = [], blacklistedTokens = [], api, tokens = [], }) { owners = getUniqueAddresses(owners, true) const bals = await call('suix_getAllBalances', owners) - bals.forEach(i => api.add(i.coinType, i.totalBalance)) + const blacklistSet = new Set(blacklistedTokens) + const tokenSet = new Set(tokens) + bals.forEach(i => { + if (blacklistSet.has(i.coinType)) return; + if (tokenSet.size > 0 && !tokenSet.has(i.coinType)) return; + api.add(i.coinType, i.totalBalance) + }) return api.getBalances() } +function sumTokensExport(config) { + return (api) => sumTokens({ ...config, api }) +} + async function queryEventsByType({ eventType, transform = i => i }) { const query = `query GetEvents($after: String, $eventType: String!) { events(first: 50, after: $after, filter: { eventType: $eventType }) { @@ -174,5 +184,6 @@ module.exports = { getDynamicFieldObjects, dexExport, sumTokens, + sumTokensExport, queryEventsByType, }; diff --git a/projects/helper/sumTokens.js b/projects/helper/sumTokens.js index c376231260eb..64cb79179dfe 100644 --- a/projects/helper/sumTokens.js +++ b/projects/helper/sumTokens.js @@ -4,6 +4,7 @@ const { sumTokens2: sumTokensEVM, nullAddress, } = require('./unwrapLPs') const sdk = require('@defillama/sdk') const helpers = { + "sui": require("./chain/sui"), "eos": require("./chain/eos"), "ton": require("./chain/ton"), "ergo": require("./chain/ergo"), diff --git a/projects/treasury/typus-finance.js b/projects/treasury/typus-finance.js new file mode 100644 index 000000000000..b5527cb22fa0 --- /dev/null +++ b/projects/treasury/typus-finance.js @@ -0,0 +1,8 @@ +const { treasuryExports } = require("../helper/treasury"); + +module.exports = treasuryExports({ + sui: { + owners: ['0xb9a09efd534d29cc9f990db26b2dab00289f32de0cdcefa68c6808de208bc9cb'], + ownTokens: ['0xf82dc05634970553615eef6112a1ac4fb7bf10272bf6cbe0f80ef44a6c489385::typus::TYPUS'], + }, +}) \ No newline at end of file From 1f8e0ef358bf0baf7c30939a9295718a1eb72cc7 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 25 Nov 2024 11:53:32 +0100 Subject: [PATCH 455/787] Fix: Small fix Cian yield (#12423) --- projects/cian-yl/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/cian-yl/index.js b/projects/cian-yl/index.js index 0b9afbfc121f..5b216026edb7 100644 --- a/projects/cian-yl/index.js +++ b/projects/cian-yl/index.js @@ -18,8 +18,6 @@ module.exports = { Object.keys(config).forEach((chain) => { module.exports[chain] = { - tvl: async (_, _b, _cb, { api }) => { - return api.erc4626Sum({ calls: config[chain], isOG4626: true }); - }, + tvl: async (api) => api.erc4626Sum({ calls: config[chain], isOG4626: true, permitFailure: true }) }; }); From a914c79c64785015064eab73d49d267b3394997a Mon Sep 17 00:00:00 2001 From: amedrontadora <134207821+amedrontadora@users.noreply.github.com> Date: Mon, 25 Nov 2024 18:54:43 +0800 Subject: [PATCH 456/787] Zuit: add Zuit TVL (#12422) Co-authored-by: amedrontadora --- projects/zuit/index.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 projects/zuit/index.js diff --git a/projects/zuit/index.js b/projects/zuit/index.js new file mode 100644 index 000000000000..49f28b441523 --- /dev/null +++ b/projects/zuit/index.js @@ -0,0 +1,32 @@ +const { sumTokens2 } = require('../helper/unwrapLPs') +const { getLogs2 } = require('../helper/cache/getLogs') + +async function tvl(api) { + const { fromBlock, baseFactorys, stableFactorys, oasisFactorys = [] } = config[api.chain] + + let logs = await Promise.all([baseFactorys, stableFactorys, oasisFactorys].flat().map(getFactoryLogs)) + logs = logs.flat() + + const ownerTokens = logs.map(({ token0, token1, pool }) => [[token0, token1], pool]) + return sumTokens2({ api, ownerTokens}) + + async function getFactoryLogs(target) { + return getLogs2({ + api, + target, + fromBlock, + eventAbi: 'event PoolCreated(address indexed token0, address indexed token1, address pool)', + }) + } +} + +const config = { + zircuit: { + fromBlock: 1374699, + baseFactorys: ['0xE4CF807E351b56720B17A59094179e7Ed9dD3727'], + stableFactorys: ['0x40d660504eB163708d8AC8109fc8F2c063ddAE4b'], + oasisFactorys: ['0xE14f6575F4721F404FFB79DA76e4790AD67B960A'] + } +} + +Object.keys(config).forEach(chain => { module.exports[chain] = { tvl } }) \ No newline at end of file From 1e589186a18aff070fbe498f0a911c09102c9da2 Mon Sep 17 00:00:00 2001 From: calebryan <169087314+calebryan@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:56:29 +0300 Subject: [PATCH 457/787] track LinqAI tvl (#12418) Co-authored-by: calebryan --- projects/linqai/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/linqai/index.js diff --git a/projects/linqai/index.js b/projects/linqai/index.js new file mode 100644 index 000000000000..48aeb8352115 --- /dev/null +++ b/projects/linqai/index.js @@ -0,0 +1,19 @@ +const stakingPools = [ + "0x786d0536B63f3638bcD17897A98B066D901C27b8", + "0xCB5Dc61Cc672761Ec049dd9349745b418580BC83", + ]; + + const rewardToken = "0xD4F4D0a10BcaE123bB6655E8Fe93a30d01eEbD04"; // LNQ + + module.exports = { + ethereum: { + tvl: async () => ({}), + staking: async (api) => { + const stakingData = stakingPools.map((poolAddress) => [rewardToken, poolAddress]); + return api.sumTokens({ + tokensAndOwners: stakingData, + }); + }, + }, + }; + \ No newline at end of file From a13095c753f5fecc3e9cae2e1e09e42c7473ee18 Mon Sep 17 00:00:00 2001 From: undefined Date: Mon, 25 Nov 2024 20:12:53 +0900 Subject: [PATCH 458/787] add shibarium mint-club-v2 (#12417) --- projects/mint-club-v2/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/mint-club-v2/index.js b/projects/mint-club-v2/index.js index 6a245f13c10f..515fcf70c83e 100644 --- a/projects/mint-club-v2/index.js +++ b/projects/mint-club-v2/index.js @@ -11,14 +11,15 @@ const V2_BOND_CONTRACTS = { degen: "0x3bc6B601196752497a68B2625DB4f2205C3b150b", zora: "0xc5a076cad94176c2996B32d8466Be1cE757FAa27", klaytn: "0xc5a076cad94176c2996B32d8466Be1cE757FAa27", - ham: "0xc5a076cad94176c2996B32d8466Be1cE757FAa27" + ham: "0xc5a076cad94176c2996B32d8466Be1cE757FAa27", + shibarium: "0xc5a076cad94176c2996B32d8466Be1cE757FAa27" } const ownTokens = { bsc: ['0x1f3Af095CDa17d63cad238358837321e95FC5915'] } -const chains = ['avax', 'ethereum', 'optimism', 'arbitrum', 'polygon', 'bsc', 'base', 'blast', 'degen', 'zora', 'klaytn', 'ham'] +const chains = ['avax', 'ethereum', 'optimism', 'arbitrum', 'polygon', 'bsc', 'base', 'blast', 'degen', 'zora', 'klaytn', 'ham', 'shibarium'] chains.forEach(chain => { const BOND_CONTRACT = V2_BOND_CONTRACTS[chain] ?? '0xc5a076cad94176c2996B32d8466Be1cE757FAa27' From dde73a99ad2314e5d3d1c43fc3fecb19c8764ac6 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:49:59 +0100 Subject: [PATCH 459/787] bugfix --- projects/helper/sumTokens.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/helper/sumTokens.js b/projects/helper/sumTokens.js index 64cb79179dfe..c376231260eb 100644 --- a/projects/helper/sumTokens.js +++ b/projects/helper/sumTokens.js @@ -4,7 +4,6 @@ const { sumTokens2: sumTokensEVM, nullAddress, } = require('./unwrapLPs') const sdk = require('@defillama/sdk') const helpers = { - "sui": require("./chain/sui"), "eos": require("./chain/eos"), "ton": require("./chain/ton"), "ergo": require("./chain/ergo"), From 1f632fb5a650ae06ffa653955faca5480e789ac4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:50:36 +0100 Subject: [PATCH 460/787] btcfi (#12426) Co-authored-by: Ss5h --- projects/btcfi-cdp/index.js | 10 +++++++++- projects/helper/bitcoin-book/fetchers.js | 6 ++++++ projects/ixswap/index.js | 4 ++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/projects/btcfi-cdp/index.js b/projects/btcfi-cdp/index.js index 6390a554531e..887b1469872b 100644 --- a/projects/btcfi-cdp/index.js +++ b/projects/btcfi-cdp/index.js @@ -1,5 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport, } = require('../helper/unwrapLPs') +const { sumTokens } = require("../helper/chain/bitcoin"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const chainPools = { bfc: { @@ -8,10 +10,16 @@ const chainPools = { }, } +async function bitcoinTvl() { + return sumTokens({ owners: await bitcoinAddressBook.btcfi_cdp() }) +} + Object.keys(chainPools).forEach(chain => { const pools = chainPools[chain] const tokensAndOwners = Object.values(pools).map(({ pool, token }) => ([token, pool,])) module.exports[chain] = { tvl: sumTokensExport({ tokensAndOwners }) } -}) \ No newline at end of file +}) + +module.exports["bitcoin"] = { tvl: bitcoinTvl } \ No newline at end of file diff --git a/projects/helper/bitcoin-book/fetchers.js b/projects/helper/bitcoin-book/fetchers.js index 6a2e351d29ff..185aa5990819 100644 --- a/projects/helper/bitcoin-book/fetchers.js +++ b/projects/helper/bitcoin-book/fetchers.js @@ -7,6 +7,12 @@ const sdk = require('@defillama/sdk') const abi = { getQualifiedUserInfo: 'function getQualifiedUserInfo(address _user) view returns ((bool locked, string depositAddress, string withdrawalAddress) info)' } module.exports = { + btcfi_cdp: async () => { + const target = "0x0000000000000000000000000000000000000100"; + const api = new sdk.ChainApi({ chain: 'bfc' }) + const round = await api.call({ abi: 'uint32:current_round', target}) + return api.call({ abi: 'function vault_addresses(uint32 pool_round) view returns (string[])', target, params: round }) + }, bedrock: async () => { const API_URL = 'https://raw.githubusercontent.com/Bedrock-Technology/uniBTC/refs/heads/main/data/tvl/reserve_address.json' const { btc } = await getConfig('bedrock.btc_address', API_URL) diff --git a/projects/ixswap/index.js b/projects/ixswap/index.js index e0bdaeac3a24..a10a8ba98864 100644 --- a/projects/ixswap/index.js +++ b/projects/ixswap/index.js @@ -2,6 +2,7 @@ const { getUniTVL } = require("../helper/unknownTokens"); const { staking } = require('../helper/staking') const IXS_POLYGON = "0x1BA17C639BdaeCd8DC4AAc37df062d17ee43a1b8" +const IXS_BASE = "0xfe550bffb51eb645ea3b324d772a19ac449e92c5" const STAKING_CONTRACTS = [ "0xad644F3cC768bc6dceF97096790e2210D5191cec", // stake bank ] @@ -11,4 +12,7 @@ module.exports = { tvl: getUniTVL({ factory: '0xc2D0e0bc81494adB71Ce9Aa350cC875DaE12D81D', blacklistedTokens: [IXS_POLYGON] }), staking: staking(STAKING_CONTRACTS, IXS_POLYGON), }, + base:{ + staking: staking(['0x44F07B446e14127136f3554A16014b49BC67D9E6'], IXS_BASE), + }, } \ No newline at end of file From 78b43fbedf2d9396a1f4e3922a41994a5cdd658f Mon Sep 17 00:00:00 2001 From: nuhbye Date: Mon, 25 Nov 2024 17:27:28 +0530 Subject: [PATCH 461/787] Include Evaa staked balance via USDT pool in TVL (#12425) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/tonpools/index.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/projects/tonpools/index.js b/projects/tonpools/index.js index 65889d5c44f9..3faff2f7adc5 100644 --- a/projects/tonpools/index.js +++ b/projects/tonpools/index.js @@ -1,19 +1,21 @@ -const { sumTokensExport } = require("../helper/chain/ton"); +const { call } = require('../helper/chain/ton') +const { sumTokens } = require("../helper/chain/ton"); const ADDRESSES = require("../helper/coreAssets.json"); -const tonpoolsContractAddress = - "EQA7y9QkiP4xtX_BhOpY4xgVlLM7LPcYUA4QhBHhFZeL4fTa"; +const tonpoolsContractAddress = "EQA7y9QkiP4xtX_BhOpY4xgVlLM7LPcYUA4QhBHhFZeL4fTa"; -const tonpoolUSDTContractAddress = - "EQDrSz9W4tjwnqy1F4z-O4Vkdp8g2YP94cmh12X5RbYpejCw"; +const tonpoolUSDTContractAddress = "EQDrSz9W4tjwnqy1F4z-O4Vkdp8g2YP94cmh12X5RbYpejCw"; + +async function tvl(api) { + const result = await call({ target: tonpoolUSDTContractAddress, abi: 'poolBalances' }) + api.add(ADDRESSES.ton.USDT, result[1]) + await sumTokens({ api, owners: [tonpoolsContractAddress], tokens: [ADDRESSES.null], }) +} module.exports = { methodology: "Ton Pools's TVL includes all deposited supported assets", ton: { - tvl: sumTokensExport({ - owners: [tonpoolsContractAddress, tonpoolUSDTContractAddress], - tokens: [ADDRESSES.null], - }), + tvl, }, }; From 654b72dce97f0f9183882fb7399664674fc674c4 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:57:45 +0100 Subject: [PATCH 462/787] Fix: Luchadores (treasury) (#12424) --- projects/treasury/luchadores.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/treasury/luchadores.js b/projects/treasury/luchadores.js index 4d55111cbfaa..a22ede10c5a1 100644 --- a/projects/treasury/luchadores.js +++ b/projects/treasury/luchadores.js @@ -1,4 +1,4 @@ -const ADDRESSES = require('../helper/coreAssets.json') +const ADDRESSES = require('../helper/coreAssets.json'); const { nullAddress, treasuryExports } = require("../helper/treasury"); module.exports = treasuryExports({ @@ -19,6 +19,7 @@ module.exports = treasuryExports({ ], owners: ['0xa715c8b17268f140D76494c12ec07B48218549C4'], ownTokens: ['0xF4435cC8b478d54313F04c956882BE3D9aCf9F6F'], + blacklistedTokens: ['0x3a94201a0b6c3593ad3b3e17e3dfce33da183514'], resolveLP: true, } }) From a589441d910be90e9ff5c1ea15128bded777fdc4 Mon Sep 17 00:00:00 2001 From: Antonio Viggiano Date: Mon, 25 Nov 2024 11:00:10 -0300 Subject: [PATCH 463/787] Update SizeCredit to protocol v1.5 (#12427) --- projects/size-credit/index.js | 52 +++++++++++++++++++++++++++-------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/projects/size-credit/index.js b/projects/size-credit/index.js index 24b220db467d..90d31b0c9511 100644 --- a/projects/size-credit/index.js +++ b/projects/size-credit/index.js @@ -1,23 +1,51 @@ -const { sumTokensExport } = require('../helper/unwrapLPs') -const ADDRESSES = require('../helper/coreAssets.json') +const SIZE_FACTORY = '0x330Dc31dB45672c1F565cf3EC91F9a01f8f3DF0b' -const AUSDC_CONTRACT = '0x4e65fe4dba92790696d040ac24aa414708f5c0ab' -const SZDEBT_CONTRACT = '0xb0a00c4b3d77c896f46dc6b204695e22de7a185d' -const SIZE_PROXY_CONTRACT = '0xC2a429681CAd7C1ce36442fbf7A4a68B11eFF940' -const tokens = [ - ADDRESSES.base.WETH, - AUSDC_CONTRACT, -] +const abis = { + SizeFactory: { + getMarkets: 'function getMarkets() view returns (address[])', + }, + Size: { + data: 'function data() view returns (uint256 nextDebtPositionId,uint256 nextCreditPositionId,address underlyingCollateralToken,address underlyingBorrowToken,address collateralToken,address borrowAToken,address debtToken,address variablePool)', + }, + Pool: { + getReserveData: 'function getReserveData(address asset) view returns (uint256 configuration,uint128 liquidityIndex,uint128 currentLiquidityRate,uint128 variableBorrowIndex,uint128 currentVariableBorrowRate,uint128 currentStableBorrowRate,uint40 lastUpdateTimestamp,uint16 id,address aTokenAddress,address stableDebtTokenAddress,address variableDebtTokenAddress,address interestRateStrategyAddress,uint128 accruedToTreasury,uint128 unbacked,uint128 isolationModeTotalDebt)' + } +} + +async function tvl(api) { + const markets = await api.call({ abi: abis.SizeFactory.getMarkets, target: SIZE_FACTORY }) + const datas = await api.multiCall({ abi: abis.Size.data, calls: markets }) + + const borrowATokens = datas.map(data => data.borrowAToken) + const variablePools = datas.map(data => data.variablePool) + const underlyingBorrowTokens = datas.map(data => data.underlyingBorrowToken) + const underlyingCollateralTokens = datas.map(data => data.underlyingCollateralToken) + + const getReserveDatas = await api.multiCall({ abi: abis.Pool.getReserveData, calls: variablePools.map((variablePool, i) => ({ target: variablePool, params: underlyingBorrowTokens[i] })) }) + + const aTokens = getReserveDatas.map(data => data.aTokenAddress) + + return api.sumTokens({ + owners: [...borrowATokens, ...markets], + tokens: [...aTokens, ...underlyingCollateralTokens] + }) +} async function borrowed(api) { - const totalDebt = await api.call({ abi: 'erc20:totalSupply', target: SZDEBT_CONTRACT, }); + const markets = await api.call({ abi: abis.SizeFactory.getMarkets, target: SIZE_FACTORY }) + const datas = await api.multiCall({ abi: abis.Size.data, calls: markets }) + + const debtTokens = datas.map(data => data.debtToken) + + const underlyingBorrowTokens = datas.map(data => data.underlyingBorrowToken) + const totalDebts = await api.multiCall({ abi: 'erc20:totalSupply', calls: debtTokens }); - return api.add(ADDRESSES.base.USDbC, totalDebt) + return api.add(underlyingBorrowTokens, totalDebts) } module.exports = { base: { - tvl: sumTokensExport({ tokens, owner: SIZE_PROXY_CONTRACT }), + tvl, borrowed } } From 3527b18b9e4f2012c253fe3d7225c75522251024 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:19:30 +0100 Subject: [PATCH 464/787] fix llamaPay? --- projects/llamapay/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/llamapay/index.js b/projects/llamapay/index.js index 82df62f150be..55bec7661ffd 100644 --- a/projects/llamapay/index.js +++ b/projects/llamapay/index.js @@ -19,7 +19,7 @@ async function calculateTvl(llamapay, vestingContract, api, isVesting) { tokensAndOwners = tokensAndOwners.filter(([token]) => isWhitelistedToken(symbolMapping[token], token, isVesting)) if (isVesting) tokensAndOwners.push(...await getTokensAndOwners(vestingContract, api, true)) - return sumTokens2({ tokensAndOwners, api, resolveLP: true, }) + return sumTokens2({ tokensAndOwners, api, resolveLP: false, }) // resolveLP: false maybe breaking them down returns too high TVL for some reason } async function getTokensAndOwners(contract, api, isVestingContract) { From 2b922a759e9c65364c0a8028ddaae84c3385f3b5 Mon Sep 17 00:00:00 2001 From: Catton <166699866+Cattontech@users.noreply.github.com> Date: Mon, 25 Nov 2024 21:40:19 +0700 Subject: [PATCH 465/787] Add Catton Adapter (#12394) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/catton/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/catton/index.js diff --git a/projects/catton/index.js b/projects/catton/index.js new file mode 100644 index 000000000000..a63c82dc549d --- /dev/null +++ b/projects/catton/index.js @@ -0,0 +1,21 @@ +const { call, getJettonBalances, getTonBalance, sumTokens } = require("../helper/chain/ton"); +const { sleep } = require('../helper/utils') +const ADDRESSES = require('../helper/coreAssets.json') + +const TON_POOL_ADDRESS = "EQAze1aSZHY1yUGz1BFndH62k-VYpXYeDiYofCXTRZClF8Qr" +const USD_POOL_ADDRESS = "EQBy7pjr6IBzqW8vuVCZ780evtnkiIF3jZSRRDxeqScfZoU9" +const CTON_ADDRESS = "0:86cf8401d283627a87b58c367b440cad933ab8aa7b383419e8ff7d1a00c945f8" +const CTUSDT_ADDRESS = "0:9fb449ce8fb43d0f682c713c01d9d8357c7cd0d4a49dd64dd585926990174a4e" +const USDT_ADDRESS = "0:b113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe" + +async function tvl(api) { + return sumTokens({ owners: [TON_POOL_ADDRESS, USD_POOL_ADDRESS, "UQDFlyZ5zsWyowbZvZjZwIW_Vzm-1uvf8z_PUfvQtHrV14dp"], tokens: [ADDRESSES.null, USDT_ADDRESS], api, onlyWhitelistedTokens: true }) +} + +module.exports = { + methodology: 'Total amount of collateral locked in the Catton Protocol', + timetravel: false, + ton: { + tvl + } +} From 43bc8bc98fb9c586d70f98787600b3714384a10a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 25 Nov 2024 15:47:48 +0100 Subject: [PATCH 466/787] add HLUSD mapping #11816 --- projects/helper/tokenMapping.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 6bb97ff8a58e..fcca5c170502 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -71,6 +71,9 @@ const fixBalancesTokens = { bob: { '0xd681C5574b7F4E387B608ed9AF5F5Fc88662b37c': { coingeckoId: "ignition-fbtc", decimals: 8 }, }, + hela: { + '0x3a035615e101373fa9ba21c5bea7fe4026fc40b4': { coingeckoId: "hela-usd", decimals: 18 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From e433d032a6733f564e3aeef3defc8b87d4de642d Mon Sep 17 00:00:00 2001 From: Root Finance Date: Mon, 25 Nov 2024 17:07:07 +0100 Subject: [PATCH 467/787] Add LSULP pool to Root Finance TVL calculation in index.js (#12430) --- projects/root-finance/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/root-finance/index.js b/projects/root-finance/index.js index b731b4f68c30..42cf5917a93f 100644 --- a/projects/root-finance/index.js +++ b/projects/root-finance/index.js @@ -26,8 +26,13 @@ const pools = [ { pool: 'component_rdx1cqlfmwmhdmp0ln4gaera4skn3yz30p4k5ssv7lqflgh0rjeakwzs9f', resource: 'resource_rdx1t4upr78guuapv5ept7d7ptekk9mqhy605zgms33mcszen8l9fac8vf', + }, + // Adding the LSULP Pool + { + pool: 'component_rdx1czmq3me09q7p7g7hgsyaqctfw3he4hl6ypg6em2h7nyd2umk0dhhnq', + resource: 'resource_rdx1thksg5ng70g9mmy9ne7wz0sc7auzrrwy7fmgcxzel2gvp8pj0xxfmf', } -] +]; async function fetchData(addresses) { return await queryAddresses({ addresses }); From 40a13e3b8ac1a7bc77756d1f708ad8309b78b565 Mon Sep 17 00:00:00 2001 From: Will Hawkins <5409021+wmhawkins-iv@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:07:53 -0400 Subject: [PATCH 468/787] Add Arkham Exchange PoR (#12431) --- projects/arkham-exchange/index.js | 42 +++++++++++++++++++ .../helper/bitcoin-book/arkham-exchange.js | 3 ++ projects/helper/bitcoin-book/index.js | 4 +- 3 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 projects/arkham-exchange/index.js create mode 100644 projects/helper/bitcoin-book/arkham-exchange.js diff --git a/projects/arkham-exchange/index.js b/projects/arkham-exchange/index.js new file mode 100644 index 000000000000..cf1a7f923197 --- /dev/null +++ b/projects/arkham-exchange/index.js @@ -0,0 +1,42 @@ +const { cexExports } = require('../helper/cex') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + +const config = { + ethereum: { + owners: [ + '0x679Fb19dEc9d66C34450a8563FfDFD29C04e615A', + '0x0323718324218dcBfF7c9f89bA5a5954F61A6c74', + '0x794C629e4403CA7CEE126Cc19d6C7b002D0238a5', + ], + }, + bitcoin: { + owners: bitcoinAddressBook.arkhamExchange + }, + solana: { + owners: [ + 'H2qEpXtSEzQTH5xNFpA8VA1W2NKNZWxUoVpascxyWAK1', + '3huamNpghPSPbgQSLX56B18Sj1hq5SE4KGxwTvhwJGnC', + ], + }, + doge: { + owners: [ + '9xFftuJonFHopj9FB6tyW1kyxqusr4jrGh', + ] + }, + avax: { + owners: [ + '0xDc2822D0685c0CcEAb07b35d6de4aC9280FB9cFF', + '0x34407900475cEF87acE1597670A9A42F31961d02', + '0xaF4E837d27cD6A5B33D67d51b88Ae42c0Bb3f1af', + ] + }, + ton: { + owners: [ + 'UQDT3cimS92wrKXrc7U6quPIM1ose_N5-R4U5byIUDHkF8pt', + 'UQDd2gNTRcIsgdUgf0DYMVcpxZuV78hegZ4D1tIj7xLKTwWn', + ] + }, +} + +module.exports = cexExports(config) +module.exports.methodology = 'Wallets can be tracked here: https://intel.arkm.com/explorer/entity/arkham-exchange' diff --git a/projects/helper/bitcoin-book/arkham-exchange.js b/projects/helper/bitcoin-book/arkham-exchange.js new file mode 100644 index 000000000000..334cc7e19192 --- /dev/null +++ b/projects/helper/bitcoin-book/arkham-exchange.js @@ -0,0 +1,3 @@ +module.exports = [ + 'bc1qlnkyrrupehgw5evu43erlgkhhagv0uj3yyhacvc65n3ud6qeas0sa958ps' +] diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index 0db660450d85..ed023233e10d 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -84,6 +84,7 @@ const toobit = require('./toobit.js') const indiaCovid = require('./india-covid.js') const wooCEX = require('./woo-cex.js') const bitlayerBridge = require('./bitlayer-bridge.js') +const arkhamExchange = require('./arkham-exchange.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -183,4 +184,5 @@ module.exports = { indiaCovid, wooCEX, p2pb2b, -} \ No newline at end of file + arkhamExchange, +} From b74ab2043cc82bbe58b6d7a910bd05f5c3a6145a Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Tue, 26 Nov 2024 10:36:30 +0000 Subject: [PATCH 469/787] inverse treasury --- projects/treasury/inverse.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/treasury/inverse.js b/projects/treasury/inverse.js index 366b64fe133f..d1bc67789e74 100644 --- a/projects/treasury/inverse.js +++ b/projects/treasury/inverse.js @@ -64,7 +64,10 @@ module.exports = treasuryExports({ "0x0404d05F3992347d2f0dC3a97bdd147D77C85c1c",// dola-fraxusdc lp CVX ], auraPools: [ - "0xA36d3799eA28f4B75653EBF9D91DDA4519578086", // sDOLA-DOLA aura pool + // "0xA36d3799eA28f4B75653EBF9D91DDA4519578086", // sDOLA-DOLA aura pool + ], + blacklistedLPs: [ + '0xcb79637aaffdc1e8db17761fa10367b46745ecb0' ] }, optimism: { From 2685a01d530f5c602b216b59b0516bf60e085339 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:22:46 +0000 Subject: [PATCH 470/787] asBTC (#12440) --- projects/astherus-asbtc/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/astherus-asbtc/index.js diff --git a/projects/astherus-asbtc/index.js b/projects/astherus-asbtc/index.js new file mode 100644 index 000000000000..3059a5e938f5 --- /dev/null +++ b/projects/astherus-asbtc/index.js @@ -0,0 +1,10 @@ +const asBTC = "0x184b72289c0992bdf96751354680985a7c4825d6" + +module.exports = { + bsc: { + tvl: async (api) => { + const supply = await api.call({ abi: 'erc20:totalSupply', target: asBTC }) + api.add(asBTC, supply) + }, + } +} \ No newline at end of file From 3c6d40cfc6d198d2adabd57af17a5378dedaa5da Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Tue, 26 Nov 2024 13:06:36 +0000 Subject: [PATCH 471/787] inverse treasury (#12439) --- projects/treasury/inverse.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/treasury/inverse.js b/projects/treasury/inverse.js index 366b64fe133f..d1bc67789e74 100644 --- a/projects/treasury/inverse.js +++ b/projects/treasury/inverse.js @@ -64,7 +64,10 @@ module.exports = treasuryExports({ "0x0404d05F3992347d2f0dC3a97bdd147D77C85c1c",// dola-fraxusdc lp CVX ], auraPools: [ - "0xA36d3799eA28f4B75653EBF9D91DDA4519578086", // sDOLA-DOLA aura pool + // "0xA36d3799eA28f4B75653EBF9D91DDA4519578086", // sDOLA-DOLA aura pool + ], + blacklistedLPs: [ + '0xcb79637aaffdc1e8db17761fa10367b46745ecb0' ] }, optimism: { From 95fe94a23818421debd415a096f09f27b4796d9a Mon Sep 17 00:00:00 2001 From: minato <100826289+0x-minato@users.noreply.github.com> Date: Tue, 26 Nov 2024 18:36:47 +0530 Subject: [PATCH 472/787] Adding Endur to Defillama (#12438) Co-authored-by: ariyan-hashstack --- projects/endur/erc4626abi.js | 48 ++++++++++++++++++++++++++++++++++++ projects/endur/index.js | 33 +++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 projects/endur/erc4626abi.js create mode 100644 projects/endur/index.js diff --git a/projects/endur/erc4626abi.js b/projects/endur/erc4626abi.js new file mode 100644 index 000000000000..1edd29b8500b --- /dev/null +++ b/projects/endur/erc4626abi.js @@ -0,0 +1,48 @@ +const ERC4626Abi = [ + { + "name": "asset", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "state_mutability": "view" + }, + { + "name": "balanceOf", + "type": "function", + "inputs": [ + { + "name": "account", + "type": "core::starknet::contract_address::ContractAddress" + } + ], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view", + "customInput": 'address', + }, + { + "name": "total_assets", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + } +] + +const ERC4626AbiMap = {} +ERC4626Abi.forEach(i => ERC4626AbiMap[i.name] = i) + +module.exports = { + ERC4626AbiMap +} \ No newline at end of file diff --git a/projects/endur/index.js b/projects/endur/index.js new file mode 100644 index 000000000000..f2b3879df4d5 --- /dev/null +++ b/projects/endur/index.js @@ -0,0 +1,33 @@ +/** + * Endur is a liquid staking solution for STRK + */ + +const {multiCall} = require("../helper/chain/starknet"); +const ADDRESSES = require('../helper/coreAssets.json'); +const { ERC4626AbiMap } = require('./erc4626abi') + +const LSTDATA = [{ //data of an LST contract; currently only xSTRK + address: "0x28d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a", // address of xSTRK vault contract + token: ADDRESSES.starknet.STRK +}] + +// returns the tvl of the all LST tokens in terms of their native token +async function tvl(api) { + const totalAssets = await multiCall({ + calls: LSTDATA.map(c => c.address), + abi: ERC4626AbiMap.total_assets + }); + // the balance of the tokens will be xTOKEN + // considering all 1 TOKEN = 1xTOKEN + // eg for now we only have xSTRK i.e 1 STRK = 1 xSTRK + + api.addTokens(LSTDATA.map(c => c.token), totalAssets); +} + +module.exports = { + doublecounted: true, + methodology: "The TVL is the total staked STRK managed by Endur's LST", + starknet: { + tvl, + }, +}; \ No newline at end of file From e290b807a4a73621cfd718a81c23f43a9874dd9c Mon Sep 17 00:00:00 2001 From: thi-investax <118243127+thi-investax@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:07:12 +0700 Subject: [PATCH 473/787] Update IX swap tvl on Base (#12437) --- projects/ixswap/index.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/projects/ixswap/index.js b/projects/ixswap/index.js index a10a8ba98864..eb5fafd74b26 100644 --- a/projects/ixswap/index.js +++ b/projects/ixswap/index.js @@ -1,18 +1,19 @@ -const { getUniTVL } = require("../helper/unknownTokens"); -const { staking } = require('../helper/staking') +const {getUniTVL} = require("../helper/unknownTokens"); +const {staking} = require('../helper/staking') const IXS_POLYGON = "0x1BA17C639BdaeCd8DC4AAc37df062d17ee43a1b8" const IXS_BASE = "0xfe550bffb51eb645ea3b324d772a19ac449e92c5" const STAKING_CONTRACTS = [ - "0xad644F3cC768bc6dceF97096790e2210D5191cec", // stake bank + "0xad644F3cC768bc6dceF97096790e2210D5191cec", // stake bank ] module.exports = { - polygon:{ - tvl: getUniTVL({ factory: '0xc2D0e0bc81494adB71Ce9Aa350cC875DaE12D81D', blacklistedTokens: [IXS_POLYGON] }), + polygon: { + tvl: getUniTVL({factory: '0xc2D0e0bc81494adB71Ce9Aa350cC875DaE12D81D', blacklistedTokens: [IXS_POLYGON]}), staking: staking(STAKING_CONTRACTS, IXS_POLYGON), }, - base:{ + base: { + tvl: getUniTVL({factory: '0x2eE28d1Bbc2EcB1fFDB83E8055d585E9F0fb757f'}), staking: staking(['0x44F07B446e14127136f3554A16014b49BC67D9E6'], IXS_BASE), }, -} \ No newline at end of file +} From 22c9cc97aafc1e170fa59bde3aeeca7feffcffa2 Mon Sep 17 00:00:00 2001 From: Rahul Mittal <84127070+alienHunterOnMars@users.noreply.github.com> Date: Tue, 26 Nov 2024 18:38:47 +0530 Subject: [PATCH 474/787] adding DegenHive adapter (#12429) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/DegenHive-amm/index.js | 40 +++++++++++++++++++++++++++++ projects/DegenHive-dsui/index.js | 18 +++++++++++++ projects/DegenHive-memepad/index.js | 35 +++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 projects/DegenHive-amm/index.js create mode 100644 projects/DegenHive-dsui/index.js create mode 100644 projects/DegenHive-memepad/index.js diff --git a/projects/DegenHive-amm/index.js b/projects/DegenHive-amm/index.js new file mode 100644 index 000000000000..76939e26147a --- /dev/null +++ b/projects/DegenHive-amm/index.js @@ -0,0 +1,40 @@ +const sui = require("../helper/chain/sui"); +const { cachedGraphQuery } = require('../helper/cache'); + +const graphQL_endpoint = "https://5lox8etck8.execute-api.eu-central-1.amazonaws.com/api/v1"; +const GET_SUI_POOLS = `query GetSuiPools { + getSuiPools { + pools { + poolId + } + } +}` + +async function tvl(api) { + const sui_pools = await cachedGraphQuery('degen-hive-sui-pools', graphQL_endpoint, GET_SUI_POOLS); + const poolIds = sui_pools.getSuiPools.pools.map(pool => pool.poolId); + const suiPoolsData = await sui.getObjects(poolIds); + + for (const { type, fields } of suiPoolsData) { + if (fields.coin_x_reserve == 0 && fields.coin_y_reserve == 0) continue; + let coin_x_type = type.split('<')[1].split(',')[0].trim(); + let coin_y_type = type.split('<')[1].split(',')[1].trim(); + + api.add(coin_x_type, fields.coin_x_reserve); + api.add(coin_y_type, fields.coin_y_reserve); + + if (fields.coin_z_reserve && fields.coin_z_reserve > 0) { + let coin_z_type = type.split('<')[1].split(',')[2].trim(); + api.add(coin_z_type, fields.coin_z_reserve); + } + } +} + +// Export first +module.exports = { + timetravel: false, + sui: { + tvl, + }, + methodology: "TVL consists of the liquidity in the DegenHive's AMM pools." +}; \ No newline at end of file diff --git a/projects/DegenHive-dsui/index.js b/projects/DegenHive-dsui/index.js new file mode 100644 index 000000000000..797acfa0619d --- /dev/null +++ b/projects/DegenHive-dsui/index.js @@ -0,0 +1,18 @@ +const sui = require("../helper/chain/sui"); + +async function tvl(api) { + + // Add TVL from SUI liquid staking + const dsui_vault = await sui.getObject("0x85aaf87a770b4a09822e7ca3de7f9424a4f58688cfa120f55b294a98d599d402"); + let sui_staked = Number(Number(dsui_vault.fields.dsui_supply * dsui_vault.fields.sui_claimable_per_dsui / 1e9 + dsui_vault.fields.sui_to_stake).toFixed(0)); + api.add( "0x2::sui::SUI", sui_staked) + +} + +module.exports = { + timetravel: false, + sui: { + tvl, + }, + methodology: "TVL consists of SUI staked with DegenHive's liquid staking protocol." +}; \ No newline at end of file diff --git a/projects/DegenHive-memepad/index.js b/projects/DegenHive-memepad/index.js new file mode 100644 index 000000000000..b5e52109b1d4 --- /dev/null +++ b/projects/DegenHive-memepad/index.js @@ -0,0 +1,35 @@ +const sui = require("../helper/chain/sui"); +const { cachedGraphQuery } = require('../helper/cache'); + +const graphQL_endpoint = "https://5lox8etck8.execute-api.eu-central-1.amazonaws.com/api/v1"; +const GET_SUI_MEME_POOLS = `query GetSuiMemePools { + getSuiMemePools { + pools { + meme_pool_addr + } + } +}` + + + +async function tvl(api) { + const sui_meme_pools = await cachedGraphQuery('degen-hive-sui-meme-pools', graphQL_endpoint, GET_SUI_MEME_POOLS); + + // Extract arrays of pool IDs + const poolIds = sui_meme_pools.getSuiMemePools.pools.map(pool => pool.meme_pool_addr); + const suiMemePoolsData = await sui.getObjects(poolIds) + + // Add TVL for MEME Pools + for (const { fields } of suiMemePoolsData) { + if ( fields.sui_available == 0) continue; + api.add( "0x2::sui::SUI", fields.sui_available) + } +} + +module.exports = { + timetravel: false, + sui: { + tvl, + }, + methodology: "TVL consists of the liquidity in meme-coin launchpad pools." +}; \ No newline at end of file From 0624556843a96752f51b8a1b108e878c27e04839 Mon Sep 17 00:00:00 2001 From: Joe Bowman Date: Tue, 26 Nov 2024 13:09:09 +0000 Subject: [PATCH 475/787] Add Celestia to Quicksilver TVL (#12432) --- projects/quicksilver/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/quicksilver/index.js b/projects/quicksilver/index.js index 342ac38365e9..f6c616da259e 100644 --- a/projects/quicksilver/index.js +++ b/projects/quicksilver/index.js @@ -12,6 +12,7 @@ const coinGeckoIds = { ustars: "stargaze", usaga: "saga-2", ubld: "agoric", + utia: "celestia", }; async function tvl() { From 94c01c85de2d8b60083b77f45039090a2a69e33f Mon Sep 17 00:00:00 2001 From: Andrew Smirnov Date: Tue, 26 Nov 2024 16:09:19 +0300 Subject: [PATCH 476/787] Add new chains and tokens to CrossCurve (#12433) --- projects/crosscurve/index.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/projects/crosscurve/index.js b/projects/crosscurve/index.js index 1cd9439331ac..0a997399ecdc 100644 --- a/projects/crosscurve/index.js +++ b/projects/crosscurve/index.js @@ -120,6 +120,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ ADDRESSES.blast.WETH, // WETH + "0x4300000000000000000000000000000000000003", // USDB ], }), }, @@ -128,6 +129,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ ADDRESSES.mantle.WETH, // WETH + "0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9", // USDC ], }), }, @@ -137,6 +139,7 @@ module.exports = { tokens: [ ADDRESSES.linea.WETH, // WETH "0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4", // WBTC + "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", // USDC.e ], }), }, @@ -145,6 +148,31 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ ADDRESSES.taiko.WETH, // WETH + "0x07d83526730c7438048d55a4fc0b850e2aab6f0b", // USDC + ], + }), + }, + celo: { + tvl: sumTokensExport({ + owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", + tokens: [ + "0x28f209844029755fc563c1bd4fd21f42dc7ce0e4", // Tri-pool + ], + }), + }, + fraxtal: { + tvl: sumTokensExport({ + owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", + tokens: [ + "0xcaef324bea3ff5c7a08710081294f3344ffadc54", // FRAX/USDT + ], + }), + }, + kava: { + tvl: sumTokensExport({ + owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", + tokens: [ + "0x919C1c267BC06a7039e03fcc2eF738525769109c", // USDt ], }), }, From 3d1d183f1b5ceb5221d556a710f363beb575b78e Mon Sep 17 00:00:00 2001 From: admin-wagmi Date: Tue, 26 Nov 2024 16:09:29 +0300 Subject: [PATCH 477/787] Added wagmi adapter (#12435) Co-authored-by: p.serebryany --- projects/wagmi/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/wagmi/index.js diff --git a/projects/wagmi/index.js b/projects/wagmi/index.js new file mode 100644 index 000000000000..0589370c388f --- /dev/null +++ b/projects/wagmi/index.js @@ -0,0 +1,18 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const { fetchURL } = require('../helper/utils'); + +async function fetchTvl(api) { + const response = await fetchURL("https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getBondingCurveBalanceSum") + api.add(ADDRESSES.ton.TON, response.data.balance) +} + + +module.exports = { + methodology: ` + TVL is calculated on the backend by summing up all the balances of the bonding curves that have not gone to the DEX yet. + `.trim(), + timetravel: false, + ton: { + tvl: fetchTvl + } +} From c2a6aa6532a116d0cfa7ed6f00220141ee30a5bb Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 26 Nov 2024 14:10:06 +0100 Subject: [PATCH 478/787] Revert "Added wagmi adapter" (#12442) --- projects/wagmi/index.js | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 projects/wagmi/index.js diff --git a/projects/wagmi/index.js b/projects/wagmi/index.js deleted file mode 100644 index 0589370c388f..000000000000 --- a/projects/wagmi/index.js +++ /dev/null @@ -1,18 +0,0 @@ -const ADDRESSES = require("../helper/coreAssets.json"); -const { fetchURL } = require('../helper/utils'); - -async function fetchTvl(api) { - const response = await fetchURL("https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getBondingCurveBalanceSum") - api.add(ADDRESSES.ton.TON, response.data.balance) -} - - -module.exports = { - methodology: ` - TVL is calculated on the backend by summing up all the balances of the bonding curves that have not gone to the DEX yet. - `.trim(), - timetravel: false, - ton: { - tvl: fetchTvl - } -} From 26455e2a59a809e55de717dce157bfd85930f936 Mon Sep 17 00:00:00 2001 From: JB Date: Tue, 26 Nov 2024 05:11:39 -0800 Subject: [PATCH 479/787] Update Royco addresses to final vault deployment (#12436) --- projects/royco/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/royco/index.js b/projects/royco/index.js index ebe975e45b16..75aa36731e54 100644 --- a/projects/royco/index.js +++ b/projects/royco/index.js @@ -1,9 +1,9 @@ const { getLogs2 } = require('../helper/cache/getLogs') const config = { - ethereum: { factory: '0xbfac50c6b2c91ab756c1e5efab699438992cc1b2', fromBlock: 21183492 }, - arbitrum: { factory: '0xbfac50c6b2c91ab756c1e5efab699438992cc1b2', fromBlock: 274261481 }, - base: { factory: '0xbfac50c6b2c91ab756c1e5efab699438992cc1b2', fromBlock: 22384258 }, + ethereum: { factory: '0x75e502644284edf34421f9c355d75db79e343bca', fromBlock: 21244948 }, + arbitrum: { factory: '0x75e502644284edf34421f9c355d75db79e343bca', fromBlock: 277208990 }, + base: { factory: '0x75e502644284edf34421f9c355d75db79e343bca', fromBlock: 22754606 }, } Object.keys(config).forEach(chain => { From 26793b7576d691fcad1cda7413f7ba9e65cc9508 Mon Sep 17 00:00:00 2001 From: Steven Enamakel <31011319+senamakel@users.noreply.github.com> Date: Tue, 26 Nov 2024 17:11:57 +0400 Subject: [PATCH 480/787] Updated the ZAI addresses for mainnet and base (#12441) --- projects/mahaxyz/index.js | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/projects/mahaxyz/index.js b/projects/mahaxyz/index.js index 683bfdfc359a..cc8cae18c1b7 100644 --- a/projects/mahaxyz/index.js +++ b/projects/mahaxyz/index.js @@ -6,49 +6,57 @@ const eth = { dai: ADDRESSES.ethereum.DAI, maha: "0x745407c86df8db893011912d3ab28e68b62e49b0", usdc: ADDRESSES.ethereum.USDC, + susde: '0x9D39A5DE30e57443BfF2A8307A4256c8797A3497', usdt: ADDRESSES.ethereum.USDT, weth: ADDRESSES.ethereum.WETH, - zai: "0x69000405f9dce69bd4cbf4f2865b79144a69bfe0", + zai: "0x69000dFD5025E82f48Eb28325A2B88a241182CEd", + szai: "0x69000195D5e3201Cf73C9Ae4a1559244DF38D47C", // peg stability modules psmUSDC: '0x69000052a82e218ccb61fe6e9d7e3f87b9c5916f', + psmsUSDe: '0xEEc58Cd30D88c70894B331b2fe0ECc2BF535656B', // pools - zaiUsdcCurve: "0x6ee1955afb64146b126162b4ff018db1eb8f08c3", - zaiMahaCurve: "0x0086ef314a313018c70a2cd92504c7d1038a25aa", + zaiUsdcCurve: "0x4a0c954d0f19269f4fc5c217821c6150a8870ad4", + zaiMahaCurve: "0x7d2dffa9e903b8377c96196da424c7965b06bcc3", + zaiSzaiCurve: "0x53ad9268a66cef20a4c458d759eee5aa55be1140", // pool staking contracts - zaiMahaCurveStaking: "0x237efe587f2cb44597063dc8403a4892a60a5a4f", - zaiUsdcCurveStaking: "0x154F52B347D8E48b8DbD8D8325Fe5bb45AAdCCDa", + zaiMahaCurveStaking: "0xE2EbBf803d0199A5A26108bA36FBAc366b201Be1", + zaiUsdcCurveStaking: "0xdFB06C4c562Bcc810C112FBAC99c59C2856b86D1", + zaiSzaiCurveStaking: "0xfDAeB792FF19e7bd4f7ED5d6ce2ef7925d002A19", }; const base = { usdc: ADDRESSES.base.USDC, maha: '0x554bba833518793056CF105E66aBEA330672c0dE', - usdz: '0x0A27E060C0406f8Ab7B64e3BEE036a37e5a62853', + zai: "0x69000dFD5025E82f48Eb28325A2B88a241182CEd", + szai: "0x69000195D5e3201Cf73C9Ae4a1559244DF38D47C", // pools - zaiUsdcAerodrome: "0x72d509aff75753aaad6a10d3eb98f2dbc58c480d", - zaiMahaAerodrome: "0x6B22E989E1D74621ac4c8bcb62bcC7EE7c25b45A", + zaiUsdcAerodrome: "0x93EdC603D7A2eA03518Ac55219cAD320010a58e4", + zaiMahaAerodrome: "0x96A0EC12A9F3bEabFf9Bb59c3F33EE439dAF2a85", // staking contracts - zaiUsdcStaking: "0x1097dFe9539350cb466dF9CA89A5e61195A520B0", - zaiMahaStaking: "0x7D5a39744608A809c850f63CB1A3d3f9b4cAc586", + zaiUsdcStaking: "0xD87ECeF739161be77bbe9891dBA80F14275BBE34", + zaiMahaStaking: "0xe77b404e934c1d97f179061349F459847f70Cd8C", } Object.keys(eth).forEach((k) => (eth[k] = eth[k].toLowerCase())); -const collaterals = [eth.usdc, eth.usdt, eth.dai]; -const pegStabilityModules = [eth.psmUSDC] +const collaterals = [eth.usdc, eth.usdt, eth.dai, eth.usdc, eth.susde]; +const pegStabilityModules = [eth.psmUSDC, eth.psmsUSDe] module.exports = { ethereum: { pool2: sumTokensExport({ tokensAndOwners: [ [eth.zaiMahaCurve, eth.zaiMahaCurveStaking], - [eth.zaiUsdcCurve, eth.zaiUsdcCurveStaking] - ] + [eth.zaiUsdcCurve, eth.zaiUsdcCurveStaking], + [eth.zaiSzaiCurve, eth.zaiSzaiCurveStaking] + ], + resolveLP: true, }), tvl: sumTokensExport({ owners: pegStabilityModules, tokens: collaterals }), }, From f588262868877eba7c7a20cf159952b7dc11214c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:12:13 +0100 Subject: [PATCH 481/787] temp fix stargaze --- projects/stargaze/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/stargaze/index.js b/projects/stargaze/index.js index 5fd6ce24600f..db843560ea41 100644 --- a/projects/stargaze/index.js +++ b/projects/stargaze/index.js @@ -2,6 +2,7 @@ const sdk = require("@defillama/sdk"); const { get } = require('../helper/http') async function tvl() { + throw new Error('Api response include NFT value') const balances = {}; /** From 6a4e128d550e8cd67b48042c45e7a70b5527cefd Mon Sep 17 00:00:00 2001 From: Da Sichuan <86024678+DaSichuan@users.noreply.github.com> Date: Tue, 26 Nov 2024 06:21:44 -0800 Subject: [PATCH 482/787] Add SpringSui (Ecosystem) (#12261) --- projects/springsui-ecosystem/index.js | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 projects/springsui-ecosystem/index.js diff --git a/projects/springsui-ecosystem/index.js b/projects/springsui-ecosystem/index.js new file mode 100644 index 000000000000..7f8178a58f73 --- /dev/null +++ b/projects/springsui-ecosystem/index.js @@ -0,0 +1,30 @@ +const sui = require('../helper/chain/sui') + +const CREATE_EVENT_TYPE = '0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::events::Event<0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CreateEvent>'; +const EXCLUDE_POOL_IDS = [ + '0x15eda7330c8f99c30e430b4d82fd7ab2af3ead4ae17046fcb224aa9bad394f6b', +] + +async function tvl() { + const poolIds = (await sui.queryEvents({ + eventType: CREATE_EVENT_TYPE, + transform: (i) => i.event.liquid_staking_info_id, + })).filter((id) => !EXCLUDE_POOL_IDS.includes(id)); + + let suiAmount = 0; + for (const poolId of poolIds) { + const pool = await sui.getObject(poolId); + suiAmount += pool.fields.storage.fields.total_sui_supply / 10 ** 9 + } + return { + sui: suiAmount, + } +} + + +module.exports = { + methodology: "Calculates the amount of SUI staked in ecosystem SpringSui LSTs.", + sui: { + tvl, + } +} From 2e5dc35337a0df7ff096db29b8eefe602c8b2daa Mon Sep 17 00:00:00 2001 From: HydrometerFi Date: Wed, 27 Nov 2024 01:49:46 +0100 Subject: [PATCH 483/787] Add Hydrometer | Base (#12444) --- projects/hydrometer/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/hydrometer/index.js diff --git a/projects/hydrometer/index.js b/projects/hydrometer/index.js new file mode 100644 index 000000000000..759955785b4f --- /dev/null +++ b/projects/hydrometer/index.js @@ -0,0 +1,11 @@ +const { uniTvlExport } = require('../helper/calculateUniTvl.js') + +module.exports = { + misrepresentedTokens: true, + base: { + tvl: uniTvlExport("0xF60caCf0A3daa5B6a79ca6594BEF38F85391AE0A", undefined, undefined, { + allPairsLength: 'uint256:allPoolsLength', + allPairs: 'function allPools(uint256) view returns (address)', + }, { useDefaultCoreAssets: true, hasStablePools: true, }), + }, +} \ No newline at end of file From 80942a7cd7079140c32c392403d9dfe98a05fb76 Mon Sep 17 00:00:00 2001 From: Lucas Santos <72104971+lucasgabrielgsp@users.noreply.github.com> Date: Tue, 26 Nov 2024 21:50:00 -0300 Subject: [PATCH 484/787] UnoRe - feat: add new treasury address (#12445) --- projects/treasury/unore.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/treasury/unore.js b/projects/treasury/unore.js index d12966f9d2c0..e4b371641d7c 100644 --- a/projects/treasury/unore.js +++ b/projects/treasury/unore.js @@ -2,6 +2,7 @@ const ADDRESSES = require("../helper/coreAssets.json"); const { treasuryExports, nullAddress } = require("../helper/treasury"); const multisig='0x46488d2D36D8983de980Ff3b9f046DCd0a9DC2ae'; const multisig2='0x4aede441085398BD74FeB9eeFCfe08E709e69ABF' +const multisig3= '0xacd5009f13a5b4f874d61b2a1e20241ea7a7b953'; const UNO = "0x474021845c4643113458ea4414bdb7fb74a01a77"; @@ -14,7 +15,7 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.WETH,//WETH ADDRESSES.ethereum.USDT,//USDT ], - owners: [multisig,multisig2], + owners: [multisig,multisig2, multisig3], ownTokens: [UNO], }, }); From 08239f856cae06594ccfb703eec94c99e4ef9598 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:52:40 +0100 Subject: [PATCH 485/787] Use string timestamps for start fields (#12453) --- package.json | 1 + projects/0x0dex/index.js | 2 +- projects/0x_nodes/index.js | 2 +- projects/0xacid/index.js | 2 +- projects/1155Tech/index.js | 1 - projects/3xcalibur/index.js | 2 +- projects/88mph/index.js | 2 +- projects/BankOfCronos/index.js | 9 --- projects/BankofCronos-Loans/index.js | 1 - projects/DeNet/index.js | 2 +- projects/FeeFree/index.js | 2 +- projects/LamaMiner/index.js | 2 +- projects/MantaTimeLockContract/index.js | 1 - projects/MeowMiner/index.js | 2 +- projects/MorpheusAI/index.js | 2 +- projects/aboard-exchange/index.js | 2 +- projects/acala-euphrates/index.js | 2 +- projects/acoconut/index.js | 2 +- projects/algem/index.js | 1 - projects/alien-finance/index.js | 2 +- projects/alkemi/index.js | 2 +- projects/allspark/index.js | 1 - projects/alpaca-finance-lend/index.js | 2 +- projects/alpaca-finance-v2/index.js | 2 +- projects/alpaca-finance/index.js | 2 +- projects/alpha-homora/index.js | 2 +- projects/alternity/index.js | 2 +- projects/altr-lend/index.js | 2 +- projects/amped/index.js | 2 +- projects/anyhedge/index.js | 2 +- projects/ape-fi/index.js | 1 - projects/apollox/index.js | 2 +- projects/applepie/index.js | 1 - projects/aqua-network/index.js | 2 +- projects/aqua-patina/index.js | 1 - projects/aquaprotocol/index.js | 2 +- projects/arbor-finance/index.js | 1 - projects/arcadia-finance-v2/index.js | 2 +- projects/arcadia-finance/index.js | 2 +- projects/arcanum/index.js | 1 - projects/astherus/index.js | 2 +- projects/astra-dao/index.js | 1 - projects/astriddao/index.js | 1 - projects/atlendis-v2/index.js | 2 +- projects/auctus/index.js | 2 +- projects/autotronic/index.js | 2 +- projects/awaken/index.js | 2 +- projects/axe/index.js | 2 +- projects/babylon/index.js | 2 +- projects/bagel-finance/index.js | 2 +- projects/bancor/index.js | 2 +- projects/bancor/v3.js | 2 +- projects/bao-baskets/index.js | 2 +- projects/base3d/index.js | 1 - projects/basemax-finance/index.js | 1 - projects/basin/index.js | 2 +- projects/baton/index.js | 1 - projects/bean/index.js | 2 +- projects/bepro/index.js | 1 - projects/betswirl/index.js | 2 +- projects/bit-reserve/index.js | 2 +- projects/bitlend/index.js | 1 - projects/blex/index.js | 2 +- projects/bluebit/index.js | 1 - projects/bonqdao/index.js | 1 - projects/bracketX/index.js | 2 +- projects/bril-finance/index.js | 1 - projects/brine/index.js | 2 +- projects/brokkr/index.js | 2 +- projects/burve-protocol/index.js | 2 +- projects/cache-gold/index.js | 2 +- projects/cake-monster/index.js | 1 - projects/camelot/index.js | 2 +- projects/capy-finance/index.js | 1 - projects/cauldron/index.js | 2 +- projects/chainflip/index.js | 2 +- projects/clip-finance/index.js | 2 +- projects/collectionxyz/index.js | 1 - projects/colony/index.js | 2 +- projects/connext/old.js | 2 +- projects/convergence/index.js | 2 +- projects/core-powercity-io/index.js | 2 +- projects/core/index.js | 2 +- projects/coupon-finance/index.js | 1 - projects/cream/index.js | 2 +- projects/creamswap/index.js | 2 +- projects/cryptoswap/index.js | 2 +- projects/csix/index.js | 1 - projects/cybro/index.js | 1 - projects/dam-finance/index.js | 1 - projects/ddex/index.js | 2 +- projects/deepbook-v3/index.js | 2 +- projects/deepp/index.js | 2 +- projects/defi-swap/index.js | 2 +- projects/defifranc/index.js | 2 +- projects/defiyieldprotocol/index.js | 2 +- projects/defrost/index.js | 1 - projects/degate/index.js | 2 +- projects/deltaprime/index.js | 2 - projects/derivadex/index.js | 2 +- projects/dexilla/index.js | 2 +- projects/dexter/index.js | 2 +- projects/dextf/index.js | 2 +- projects/dforce/index.js | 2 +- projects/dirac-finance/index.js | 1 - projects/dogedollar/index.js | 1 - projects/dolomite/index.js | 2 +- projects/dvol/index.js | 1 - projects/dydx/index.js | 2 +- projects/earn-powercity-io/index.js | 2 +- projects/ebtc/index.js | 2 +- projects/ecodefi/index.js | 1 - projects/ensuro/index.js | 2 +- projects/epoch-island/index.js | 2 +- projects/erasure/index.js | 2 +- projects/esper-finance/index.js | 1 - projects/ethichub/index.js | 2 +- projects/ethosx/index.js | 2 +- projects/everdex/index.js | 2 +- projects/exsat-credit-staking/index.js | 2 +- projects/ezkalibur/index.js | 2 +- projects/ferdyflip/index.js | 2 +- projects/ferro/index.js | 2 +- projects/flashstake/index.js | 2 +- projects/flex-powercity-io/index.js | 2 +- projects/flexdao/index.js | 1 - projects/florence-finance/index.js | 6 +- projects/forgesx/index.js | 2 +- projects/frankencoin/index.js | 2 +- projects/freestyle/index.js | 2 +- projects/frigg-eco/index.js | 1 - projects/future-swap/index.js | 2 +- projects/futureswap/index.js | 2 +- projects/geode/index.js | 1 - projects/glif/index.js | 2 +- projects/gnosis/index.js | 2 +- projects/goat-tech/index.js | 1 - projects/gogocoin/index.js | 2 +- projects/goku-money/index.js | 2 +- projects/goldlink/index.js | 2 +- projects/goober/index.js | 2 +- projects/grace/index.js | 1 - projects/grafun/index.js | 1 - projects/grappa-finance/index.js | 2 +- projects/gravita-protocol/index.js | 2 +- projects/gravity-bridge/index.js | 1 - projects/groprotocol/index.js | 2 +- projects/gudchain/index.js | 1 - projects/gullnetwork/index.js | 2 +- projects/hai/index.js | 2 +- projects/harmonix/index.js | 2 +- projects/hectagon/index.js | 1 - projects/hedgefarm/index.js | 1 - projects/hodlify/index.js | 2 +- projects/huma/index.js | 2 +- projects/hydt/index.js | 2 +- projects/illuminex/index.js | 2 +- projects/increment-protocol/index.js | 2 +- projects/insuredefi/index.js | 2 +- projects/invar-finance/index.js | 1 - projects/inverse-finance-firm/index.js | 2 +- projects/inverse/index.js | 2 +- projects/ion-dao/index.js | 1 - projects/ip/index.js | 1 - projects/ironbank/index.js | 2 +- projects/ithaca/index.js | 1 - projects/ithil/index.js | 1 - projects/juicebox-v1/index.js | 2 +- projects/juicebox-v2/index.js | 2 +- projects/juicebox-v3/index.js | 2 +- projects/kaiafun/index.js | 1 - projects/keeper-dao/index.js | 2 +- projects/kewl/index.js | 2 +- projects/kiloex/index.js | 2 +- projects/lavarage/index.js | 4 +- projects/lien/index.js | 2 +- projects/lightning-network/index.js | 2 +- projects/liqee/index.js | 2 +- projects/liquidity-slicing/index.js | 1 - projects/liquity/index.js | 2 +- projects/llamalend/index.js | 2 +- projects/lobster-protocol/index.js | 2 +- projects/loopfi/index.js | 2 +- projects/louverture/index.js | 2 +- projects/love/index.js | 1 - projects/lsdx/index.js | 1 - projects/lucidly/index.js | 2 +- projects/lumin-finance/index.js | 1 - projects/lusd-chickenbonds/index.js | 1 - projects/lybra-v2/index.js | 1 - projects/lybra/index.js | 2 +- projects/lyve/index.js | 2 +- projects/maker-rwa/index.js | 2 +- projects/maker/index.js | 2 +- projects/mangrove/index.js | 2 +- projects/meme-dollar/index.js | 2 +- projects/merlin/index.js | 2 +- projects/metastreet-v2/index.js | 1 - projects/metastreet/index.js | 1 - projects/metronome/index.js | 2 +- projects/milkomeda-djed/index.js | 1 - projects/milkyway/index.js | 2 +- projects/minerPepe/index.js | 1 - projects/mobius/index.js | 1 - projects/mojitoswap/index.js | 1 - projects/mole/index.js | 2 +- projects/monroeprotocol/index.js | 2 +- projects/monster/index.js | 1 - projects/moret/index.js | 2 +- projects/mountain-protocol/index.js | 1 - projects/mstable/index.js | 2 +- projects/nayms/index.js | 2 +- projects/neptune-mutual/index.js | 2 +- projects/nerve/index.js | 2 +- projects/nexus/index.js | 2 +- projects/nomad/index.js | 1 - projects/nsure/index.js | 2 +- projects/olympus/index.js | 2 +- projects/onsenswap/index.js | 2 +- projects/optionBlitz/index.js | 1 - projects/opulous/index.js | 2 +- projects/orange-finance/index.js | 1 - projects/ottopia/index.js | 1 - projects/pairex/index.js | 2 +- projects/paladinfinance-dullahan/index.js | 1 - projects/paladinfinance-warlord/index.js | 1 - projects/pangolin/index.js | 2 +- projects/papparico-finance/index.js | 1 - projects/peakdefi/index.js | 2 +- projects/peardao/index.js | 1 - projects/perfect-pool/index.js | 2 +- projects/perlinx/index.js | 2 +- projects/perp88/index.js | 2 +- projects/phission-finance/index.js | 2 +- projects/phoenix/index.js | 2 +- projects/piggy/index.js | 2 +- projects/pingu/index.js | 2 +- projects/pizzax/index.js | 1 - projects/planar-finance/index.js | 2 +- projects/plenty/index.js | 2 +- projects/polygon/index.js | 2 +- projects/polytrade/index.js | 2 +- projects/ponyswap/index.js | 2 +- projects/popcorn/index.js | 1 - projects/powerindex/index.js | 2 +- projects/prime-staked/index.js | 1 - projects/primitive/index.js | 2 +- projects/promethium/index.js | 2 +- projects/psy/index.js | 2 +- projects/puffer/index.js | 1 - projects/pumpxy/index.js | 2 +- projects/pv01/index.js | 1 - projects/qian/index.js | 2 +- projects/quadrat/index.js | 2 +- projects/range/index.js | 2 +- projects/rari/index.js | 2 +- projects/ray/index.js | 2 +- projects/rebalance/index.js | 2 +- projects/reflexer/index.js | 2 +- projects/revault/index.js | 2 +- projects/reyield-finance/index.js | 2 +- projects/risq.js | 1 - projects/rize/index.js | 2 +- projects/rosy-burnt-steak/index.js | 2 +- projects/rumi/index.js | 1 - projects/sablier/index.js | 2 +- projects/saltyio/index.js | 2 +- projects/salvor/index.js | 2 +- projects/sandclock/index.js | 1 - projects/scientixfinance/index.js | 1 - projects/scoreplay/index.js | 2 +- projects/seashell/index.js | 1 - projects/set-protocol/index.js | 2 +- projects/sfinance/index.js | 6 +- projects/shell/index.js | 1 - projects/sherlock/index.js | 2 +- projects/shibui/index.js | 2 - projects/shield/index.js | 10 +-- projects/shprd/index.js | 2 +- projects/single/index.js | 2 +- projects/singularx/index.js | 2 +- projects/sirius-finance/index.js | 2 +- projects/skale/index.js | 2 +- projects/skcs/index.js | 1 - projects/slsd/index.js | 1 - projects/smbswap/index.js | 2 +- projects/smilee-finance/index.js | 1 - projects/solid-world/index.js | 2 +- projects/sommelier/index.js | 2 +- projects/spacewhale/index.js | 2 +- projects/spiral-dao/index.js | 1 - projects/stCelo/index.js | 1 - projects/stake-ly/index.js | 2 +- projects/stakedotlink/index.js | 2 +- projects/stakestone-btc/index.js | 1 - projects/stakestone/index.js | 1 - projects/steakHut/index.js | 1 - projects/stealthpad/index.js | 1 - projects/stream/index.js | 1 - projects/suzaku/index.js | 2 +- projects/swaap-earn/index.js | 2 +- projects/swaap/index.js | 2 +- projects/swapsicle/index.js | 1 - projects/symbiotic/index.js | 2 +- projects/symmetry-trade/index.js | 1 - projects/synthetix/api.js | 2 +- projects/synthetix/apiCache.js | 2 +- projects/synthex/index.js | 1 - projects/t-protocol-v2/index.js | 2 +- projects/t-protocol/index.js | 2 +- projects/taidog/index.js | 1 - projects/tcv_platform/index.js | 2 +- projects/tetu/index.js | 2 +- projects/thala-vethl/index.js | 2 +- projects/tholgar/index.js | 1 - projects/thorn-protocol/index.js | 2 +- projects/tlx/index.js | 2 +- projects/toros/index.js | 2 +- projects/toucan-protocol/index.js | 2 +- projects/tranche/index.js | 2 +- projects/treasury/betswirl.js | 2 +- projects/treasury/perfect-pool.js | 2 +- projects/treasury/shibui.js | 2 - projects/treehouse/index.js | 2 +- projects/truefi/index.js | 2 +- projects/twtstake/index.js | 1 - projects/umamifinance/index.js | 2 +- projects/unbk/index.js | 1 - projects/unitus/index.js | 2 +- projects/universe/index.js | 2 +- projects/uniwhale/index.js | 2 +- projects/uno-farm/index.js | 2 +- projects/unore/index.js | 2 +- projects/uplift/index.js | 2 +- projects/valleyswap/index.js | 1 - projects/valueliquid/index.js | 2 +- projects/varen/index.js | 2 +- projects/vectorreserve/index.js | 1 - projects/vela-exchange/index.js | 1 - projects/vendor-finance-v2/index.js | 1 - projects/vendor-finance/index.js | 1 - projects/vesper/index.js | 2 +- projects/vest/index.js | 2 +- projects/vesta/index.js | 2 +- projects/vine/index.js | 2 +- projects/visor/index.js | 2 +- projects/w3bank/index.js | 2 +- projects/warp/index.js | 2 +- projects/waterfalldefi/index.js | 1 - projects/weave/index.js | 1 - projects/winr-protocol/index.js | 1 - projects/wowswap/index.js | 2 +- projects/xdai/index.js | 2 +- projects/xfai/index.js | 2 +- projects/y24/index.js | 1 - projects/yamato/index.js | 2 +- projects/yamfore/index.js | 2 +- projects/yaxis/index.js | 2 +- projects/yay-staking/index.js | 2 +- projects/yearn-ether/index.js | 2 +- projects/yetiFinance/index.js | 2 +- projects/yfii/index.js | 2 +- projects/yiedl-vaults/index.js | 2 +- projects/yieldfields/index.js | 2 +- projects/yieldyak-staked-avax/index.js | 2 +- projects/yldr/index.js | 2 +- projects/zeno/index.js | 2 +- projects/zeroswap/index.js | 1 - projects/zkUSD/index.js | 2 +- projects/zkdx/index.js | 1 - projects/zkswap/index.js | 2 +- utils/scripts/stringTimestamp.js | 96 +++++++++++++++++++++++ 372 files changed, 359 insertions(+), 393 deletions(-) create mode 100644 utils/scripts/stringTimestamp.js diff --git a/package.json b/package.json index 0ad5df52622b..16a0dbca56c7 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "useTokenLabels": "node utils/scripts/useTokenLabels.js", "biggest-files": "find ./projects -name '*.js' -not -path './projects/helper/*' -not -path './projects/curve/*' -not -path './projects/sigmao/*' -exec du -sh {} \\; | sort -rh | head -n 100", "check-bitcoin-duplicates": "node utils/scripts/checkBTCDupsv2.js", + "string-timestamp": "node utils/scripts/stringTimestamp.js", "postinstall": "echo 'run \"npm update @defillama/sdk\" if you want lastest sdk changes' " }, "author": "", diff --git a/projects/0x0dex/index.js b/projects/0x0dex/index.js index 54d77d54b046..5bf23d2fa362 100644 --- a/projects/0x0dex/index.js +++ b/projects/0x0dex/index.js @@ -2,6 +2,6 @@ const { sumTokensExport, nullAddress } = require('../helper/unwrapLPs'); const ETH_POOL_ADDRESS = "0x3d18AD735f949fEbD59BBfcB5864ee0157607616"; module.exports = { - start: 1685386800, // 19/05/2023 @ 07:00pm UTC + start: '2023-05-29', // 19/05/2023 @ 07:00pm UTC ethereum: { tvl: sumTokensExport({ owner: ETH_POOL_ADDRESS, tokens: [nullAddress]}) }, }; \ No newline at end of file diff --git a/projects/0x_nodes/index.js b/projects/0x_nodes/index.js index 22aa4c7df0bf..0b55c58ae2d1 100644 --- a/projects/0x_nodes/index.js +++ b/projects/0x_nodes/index.js @@ -50,7 +50,7 @@ module.exports = { ], methodology: ` Counts the number of wrapped native tokens in all yield strategies across all the chains the protocol is deployed on + staking counts the number of BIOS tokens staked in the kernels across all the chains (PFA: Protocol Fee Accruals by staking assets)`, - start: 1633046400, // Friday 1. October 2021 00:00:00 GMT + start: '2021-10-01', // Friday 1. October 2021 00:00:00 GMT ...tvlExports, deadFrom: 1659527340, } diff --git a/projects/0xacid/index.js b/projects/0xacid/index.js index ed924429df20..aa86e413ea40 100644 --- a/projects/0xacid/index.js +++ b/projects/0xacid/index.js @@ -4,7 +4,7 @@ const ACID_STAKING = "0x00a842038a674616f6a97e62f80111a536778282"; const ACID_TOKEN = "0x29C1EA5ED7af53094b1a79eF60d20641987c867e"; module.exports = { - start: 1678417200, + start: '2023-03-10', arbitrum: { tvl: () => ({}), staking: stakingUnknownPricedLP(ACID_STAKING, ACID_TOKEN, "arbitrum", "0x73474183a94956cd304c6c5a504923d8150bd9ce") diff --git a/projects/1155Tech/index.js b/projects/1155Tech/index.js index 85e5b89fba99..9fdf80684d0a 100644 --- a/projects/1155Tech/index.js +++ b/projects/1155Tech/index.js @@ -4,7 +4,6 @@ const MARKET_1155TECH_CONTRACT = '0x33b77fAf955Ed3eDAf939ae66C4D7a2D78bc30C6'; module.exports = { methodology: 'Value of all Keys across all art markets is TVL in the protocol', - start: 7280880, canto: { tvl: sumTokensExport({ owner: MARKET_1155TECH_CONTRACT, tokens: [ADDRESSES.canto.NOTE] }) } diff --git a/projects/3xcalibur/index.js b/projects/3xcalibur/index.js index cd5a6b759247..56d14d6d2c0b 100644 --- a/projects/3xcalibur/index.js +++ b/projects/3xcalibur/index.js @@ -2,7 +2,7 @@ const { uniTvlExport } = require("../helper/calculateUniTvl.js"); module.exports = { misrepresentedTokens: true, - start: 1667689200, + start: '2022-11-06', arbitrum: { tvl: uniTvlExport("0xD158bd9E8b6efd3ca76830B66715Aa2b7Bad2218", "arbitrum", undefined, undefined, { hasStablePools: true, useDefaultCoreAssets: true, }), }, diff --git a/projects/88mph/index.js b/projects/88mph/index.js index a931e7e9ed51..d77e5257b0fc 100644 --- a/projects/88mph/index.js +++ b/projects/88mph/index.js @@ -135,6 +135,6 @@ tvlExports.ethereum.staking = staking("0x1702F18c1173b791900F81EbaE59B908Da8F689 module.exports = { methodology: `Using the addresses for the fixed interest rate bonds we are able to find the underlying tokens held in each address. Once we have the underlying token we then get the balances of each of the tokens. For the CRV tokens used "CRV:STETH" for example, the address is replaced with the address of one of the tokens. In the example at hand the address is replaced with the "WETH" address so that the price can be calculated.`, - start: 1606109629, // Monday, November 23, 2020 5:33:49 AM GMT + start: '2020-11-23', // Monday, November 23, 2020 5:33:49 AM GMT ...tvlExports } diff --git a/projects/BankOfCronos/index.js b/projects/BankOfCronos/index.js index 59704192af49..368edeec2341 100644 --- a/projects/BankOfCronos/index.js +++ b/projects/BankOfCronos/index.js @@ -1,14 +1,5 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokensExport } = require("../helper/unwrapLPs"); - -const BOC_TREASURY_ADDRESS = "0xBacF28BF21B374459C738289559EF89978D08102"; -const CUSD_ADDRESS = "0x26043Aaa4D982BeEd7750e2D424547F5D76951d4"; -const USDC_ADDRESS = ADDRESSES.cronos.USDC; - module.exports = { - start: 6949784, cronos: { - // tvl: sumTokensExport({ owner: BOC_TREASURY_ADDRESS, tokens: [CUSD_ADDRESS, USDC_ADDRESS]}), tvl: () => 0 }, methodology: diff --git a/projects/BankofCronos-Loans/index.js b/projects/BankofCronos-Loans/index.js index 46c8641f59f8..4aed7b4fbd0e 100644 --- a/projects/BankofCronos-Loans/index.js +++ b/projects/BankofCronos-Loans/index.js @@ -9,7 +9,6 @@ async function tvl(api) { } module.exports = { - start: 6949784, cronos: { tvl, }, diff --git a/projects/DeNet/index.js b/projects/DeNet/index.js index e62bff66ac6c..d7887384a6c2 100644 --- a/projects/DeNet/index.js +++ b/projects/DeNet/index.js @@ -7,7 +7,7 @@ const owners = [ ] module.exports = { - start: 1691761595, // Friday, 11-Aug-23 13:46:35 UTC + start: '2023-08-11', // Friday, 11-Aug-23 13:46:35 UTC methodology: "Total amount of DE tokens used for DeNet storage payments", polygon: { diff --git a/projects/FeeFree/index.js b/projects/FeeFree/index.js index 7e8942a4772f..1d46901ddc55 100644 --- a/projects/FeeFree/index.js +++ b/projects/FeeFree/index.js @@ -17,7 +17,7 @@ const config = { } module.exports = { - start: 1714060800, // Apr 26 2024 + start: '2024-04-25', // Apr 26 2024 } Object.keys(config).forEach(chain => { diff --git a/projects/LamaMiner/index.js b/projects/LamaMiner/index.js index 0c13ec936a89..8df22f017619 100644 --- a/projects/LamaMiner/index.js +++ b/projects/LamaMiner/index.js @@ -9,7 +9,7 @@ const LP_LQDX_LAMA = "0x3a74922803415Dfc43c0030d47707b20f4c1b05d" module.exports = { misrepresentedTokens: true, methodology: 'counts the number of LAMA tokens in the Lama Miner contract.', - start: 1711962980, + start: '2024-04-01', avax: { tvl: sumTokensExport({ owner: LAMA_MINER_CONTRACT, tokens: [LAMA_TOKEN_CONTRACT], lps: [LP_LAMA_WAVAX], useDefaultCoreAssets: true, }), staking: sumTokensExport({ owner: LAMA_STAKING_CONTRACT, tokens: [LAMA_TOKEN_CONTRACT], lps: [LP_LAMA_WAVAX, LP_LQDX_LAMA], useDefaultCoreAssets: true, }) diff --git a/projects/MantaTimeLockContract/index.js b/projects/MantaTimeLockContract/index.js index 48c2933078d9..fcac3efcfd75 100644 --- a/projects/MantaTimeLockContract/index.js +++ b/projects/MantaTimeLockContract/index.js @@ -6,7 +6,6 @@ const TIME_LOCK_CONTRACT = '0x8Bb6CaE3f1CADA07Dd14bA951e02886ea6bBA183'; module.exports = { methodology: 'counts the number of (MANTA OR STONE) in the time lock contract.', - start: 1497066, manta: { tvl: sumTokensExport({ owner: TIME_LOCK_CONTRACT, tokens: [MANTA, STONE] }), } diff --git a/projects/MeowMiner/index.js b/projects/MeowMiner/index.js index 5ef8c54a5a3f..e4a47d802699 100644 --- a/projects/MeowMiner/index.js +++ b/projects/MeowMiner/index.js @@ -5,7 +5,7 @@ const LP_MEOW_WAVAX = "0xbbf8e4b9AD041edE1F5270CAf5b7B41F0e55f719" module.exports = { methodology: 'counts the number of MEOW tokens in the Meow Miner contract.', - start: 1710293916, + start: '2024-03-13', avax: { tvl: sumTokensExport({ owner: MEOW_MINER_CONTRACT, tokens: [MEOW_TOKEN_CONTRACT], lps: [LP_MEOW_WAVAX], useDefaultCoreAssets: true, }), } diff --git a/projects/MorpheusAI/index.js b/projects/MorpheusAI/index.js index 916627513046..52c17377f170 100644 --- a/projects/MorpheusAI/index.js +++ b/projects/MorpheusAI/index.js @@ -16,7 +16,7 @@ module.exports = { timetravel: true, misrepresentedTokens: false, methodology: 'Calculates TVL based on stETH deposits in the project contract.', - start: 1707378815, // Feb-08-2024 07:33:35 AM UTC in Unix timestamp + start: '2024-02-08', // Feb-08-2024 07:33:35 AM UTC in Unix timestamp ethereum: { tvl }, diff --git a/projects/aboard-exchange/index.js b/projects/aboard-exchange/index.js index 7478d5e87d7e..26cbc8fb9c95 100644 --- a/projects/aboard-exchange/index.js +++ b/projects/aboard-exchange/index.js @@ -6,7 +6,7 @@ const { sumTokensExport } = require('../helper/unwrapLPs'); module.exports = { methodology: "TVL is equal to users' deposits minus withdrawals", - start: 1641625200, // Jan-08-2022 07:00:00 AM +UTC + start: '2022-01-08', // Jan-08-2022 07:00:00 AM +UTC } const config = { diff --git a/projects/acala-euphrates/index.js b/projects/acala-euphrates/index.js index 1d3c3ca66c9c..15c7bd079c62 100644 --- a/projects/acala-euphrates/index.js +++ b/projects/acala-euphrates/index.js @@ -16,7 +16,7 @@ async function tvl(api) { module.exports = { misrepresentedTokens: true, - start: 1695657600, + start: '2023-09-25', methodology: 'total ldot and tdot locked in the euphrates contract', acala: { tvl, diff --git a/projects/acoconut/index.js b/projects/acoconut/index.js index ec15ad39c67e..6a534fb4b672 100644 --- a/projects/acoconut/index.js +++ b/projects/acoconut/index.js @@ -32,5 +32,5 @@ module.exports = { bsc:{ tvl: bsc }, - start: 1600185600, // 09/16/2020 @ 12:00am (UTC+8) + start: '2020-09-15', // 09/16/2020 @ 12:00am (UTC+8) }; diff --git a/projects/algem/index.js b/projects/algem/index.js index d66a69e60155..e31d8d61c44d 100644 --- a/projects/algem/index.js +++ b/projects/algem/index.js @@ -13,7 +13,6 @@ async function tvl(timestamp, block, chainBlocks) { module.exports = { methodology: 'counts the number of ASTR tokens locked in Liquid Staking contract', - start: 1502025, astar: { tvl, } diff --git a/projects/alien-finance/index.js b/projects/alien-finance/index.js index ba6bff29a842..abd2d1339dc6 100644 --- a/projects/alien-finance/index.js +++ b/projects/alien-finance/index.js @@ -6,7 +6,7 @@ module.exports = { blast: { tvl, borrowed, }, - start: 1709630412, + start: '2024-03-05', }; async function tvl(api) { diff --git a/projects/alkemi/index.js b/projects/alkemi/index.js index e30d6514c4b4..a1dd5cc21277 100644 --- a/projects/alkemi/index.js +++ b/projects/alkemi/index.js @@ -71,6 +71,6 @@ async function tvl(timestamp, block) { module.exports = { methodology: "TVL consists of Assets (ETH, WBTC, Stablecoins) deposited in Alkemi Earn, Assets (ETH, WBTC, Stablecoins) deposited in Alkemi Earn Open, and does NOT currently consider assets borrowed", - start: 1609380306, // unix timestamp (utc 0) specifying when the project began, or where live data begins + start: '2020-12-31', // unix timestamp (utc 0) specifying when the project began, or where live data begins ethereum: { tvl } // tvl adapter }; diff --git a/projects/allspark/index.js b/projects/allspark/index.js index e59b148d7b70..224d8852c699 100644 --- a/projects/allspark/index.js +++ b/projects/allspark/index.js @@ -3,7 +3,6 @@ const {staking} = require("../helper/staking"); module.exports = { methodology: 'allspark counts the staking values as tvl', - start: 1690371, zklink:{ tvl: staking( ["0xD06B5A208b736656A8F9cD04ed43744C738BD8A9"], diff --git a/projects/alpaca-finance-lend/index.js b/projects/alpaca-finance-lend/index.js index 4ddec9ca94f8..ab96424579e6 100644 --- a/projects/alpaca-finance-lend/index.js +++ b/projects/alpaca-finance-lend/index.js @@ -2,7 +2,7 @@ const { tvl, borrowed } = require("./lend"); // node test.js projects/alpaca-finance-lend/index.js module.exports = { - start: 1602054167, + start: '2020-10-07', methodology: "Sum floating balance and vaultDebtValue in each vault", bsc: { tvl, borrowed, }, fantom: { tvl, borrowed, }, diff --git a/projects/alpaca-finance-v2/index.js b/projects/alpaca-finance-v2/index.js index 546dabaa96c4..e3dfbaef57ed 100644 --- a/projects/alpaca-finance-v2/index.js +++ b/projects/alpaca-finance-v2/index.js @@ -1,7 +1,7 @@ const { lendingTvl, borrowTvl } = require("./moneyMarket"); module.exports = { - start: 1602054167, + start: '2020-10-07', methodology: "Sum floating balance and borrow for each token", bsc: { tvl: lendingTvl, diff --git a/projects/alpaca-finance/index.js b/projects/alpaca-finance/index.js index 80f4b65ae455..042b95927ece 100644 --- a/projects/alpaca-finance/index.js +++ b/projects/alpaca-finance/index.js @@ -5,7 +5,7 @@ const { calxALPACAtvl } = require('./xalpaca'); const aExports = require('../alpaca-finance-lend'); module.exports = { - start: 1602054167, + start: '2020-10-07', bsc: { tvl: sdk.util.sumChainTvls([calLyfTvl, calAusdTvl, aExports.bsc.tvl]), staking: calxALPACAtvl, diff --git a/projects/alpha-homora/index.js b/projects/alpha-homora/index.js index 39b58dd157df..b614e73bdea6 100644 --- a/projects/alpha-homora/index.js +++ b/projects/alpha-homora/index.js @@ -26,7 +26,7 @@ module.exports = { optimism:{ tvl: tvlV2Onchain }, - start: 1602054167, // unix timestamp (utc 0) specifying when the project began, or where live data begins + start: '2020-10-07', // unix timestamp (utc 0) specifying when the project began, or where live data begins hallmarks: [ [1613178000, "37M exploit"], // Feb 13, 2021 [1626220800, "Upgrade to V2 on ETH"], // July 14, 2021 00:00 UTC diff --git a/projects/alternity/index.js b/projects/alternity/index.js index b5aba4a54144..64a009c6c511 100644 --- a/projects/alternity/index.js +++ b/projects/alternity/index.js @@ -6,7 +6,7 @@ const STAKING_ADDRESS = "0x424891f1D6D4De5c07B6E3F74B3709D6BD9E77ea"; const ALTR_ADDRESS = "0xD1ffCacFc630CE68d3cd3369F5db829a3ed01fE2" module.exports = { - start: 1692423851, + start: '2023-08-19', ethereum: { tvl: getLiquityTvl('0x51c014510A5AdA43408b40D49eF52094014ef3A7'), staking: staking(STAKING_ADDRESS, ALTR_ADDRESS) diff --git a/projects/altr-lend/index.js b/projects/altr-lend/index.js index 6ae0ea96e5dc..83c24a523ded 100644 --- a/projects/altr-lend/index.js +++ b/projects/altr-lend/index.js @@ -17,7 +17,7 @@ async function borrowed(api) { module.exports = { methodology: "Determined by querying from our public TheGraph the total USD value of all active loans", - start: 1707874007, + start: '2024-02-14', polygon: { tvl: () => ({}), borrowed, diff --git a/projects/amped/index.js b/projects/amped/index.js index 04f69f4f2234..36ac7c82bb07 100644 --- a/projects/amped/index.js +++ b/projects/amped/index.js @@ -6,7 +6,7 @@ const phoenixStakingAddress = '0x3c9586567a429BA0467Bc63FD38ea71bB6B912E0'; const phoenixAmpAddress = '0xca7F14F14d975bEFfEe190Cd3cD232a3a988Ab9C'; module.exports = { - start: 1717674114, + start: '2024-06-06', lightlink_phoenix: { staking: staking(phoenixStakingAddress, phoenixAmpAddress), tvl: gmxExports({ vault: phoenixVaultAddress, }) diff --git a/projects/anyhedge/index.js b/projects/anyhedge/index.js index 4b03fd90e83c..f2673e2d0ec9 100644 --- a/projects/anyhedge/index.js +++ b/projects/anyhedge/index.js @@ -48,7 +48,7 @@ async function tvl({timestamp}) { module.exports = { methodology: "Scrape the blockchain and filter for spent transaction outputs that match the contract's input script template. Aggregate them to compute TVL. The TVL data lags by contract duration since contracts are secret until settled. So, TVL at the current time will always be 0 and can only be calculated in retrospect and stats back-filled when contracts are revealed. For this reason, the code cuts-off the data at 91 days ago. See here for more details: https://gitlab.com/0353F40E/anyhedge-stats/-/blob/master/readme.md", - start: 1654787405, + start: '2022-06-09', bitcoincash: { tvl }, hallmarks: [ [1681725240, "BCH Bull public release (AnyHedge v0.11 contract)"], diff --git a/projects/ape-fi/index.js b/projects/ape-fi/index.js index 3f7a647b4dc9..bbfdaf473411 100644 --- a/projects/ape-fi/index.js +++ b/projects/ape-fi/index.js @@ -42,7 +42,6 @@ module.exports = { tvl, staking: staking(apeAPE, APE), }, - start: 15688276, methodology: "Counts liquidity as the Collateral APE and USDC & FRAX on all AMOs through their contracts", }; diff --git a/projects/apollox/index.js b/projects/apollox/index.js index fc8582d6327e..02c7f0d8a130 100644 --- a/projects/apollox/index.js +++ b/projects/apollox/index.js @@ -65,7 +65,7 @@ async function bscTVL(timestamp, _block, { bsc: block }) { } module.exports = { - start: 1640100600, // 12/21/2021 @ 15:30pm (UTC) + start: '2021-12-21', // 12/21/2021 @ 15:30pm (UTC) bsc: { tvl: bscTVL, staking: stakings([stakingContract_APX, daoContract], TOKEN_APX), diff --git a/projects/applepie/index.js b/projects/applepie/index.js index 1cb02e6575d9..87493ee6e05b 100644 --- a/projects/applepie/index.js +++ b/projects/applepie/index.js @@ -6,7 +6,6 @@ const TOKENS = ["0x574f75bc522CB42ec2365dc54485D471f2eFb4B6"] module.exports = { methodology: "First Crosschain Pool as a Service Miner. Twist to generate 10%/daily reward.", - start: 35011373, bsc: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/aqua-network/index.js b/projects/aqua-network/index.js index 86fb368bc1bc..dd6225355466 100644 --- a/projects/aqua-network/index.js +++ b/projects/aqua-network/index.js @@ -32,7 +32,7 @@ async function tvl(api) { } module.exports = { - start: 1719792000, + start: '2024-07-01', misrepresentedTokens: true, methodology: 'counts the liquidity of the Pools on AMM, data is pulled from the Aquarius API.', diff --git a/projects/aqua-patina/index.js b/projects/aqua-patina/index.js index 14053941fad0..595973de9055 100644 --- a/projects/aqua-patina/index.js +++ b/projects/aqua-patina/index.js @@ -9,7 +9,6 @@ async function tvl(api) { module.exports = { doublecounted: true, methodology: 'Returns the ETH equivalent value of the total supply of apETH tokens on Ethereum. This is calculated by the multiplier used in the contract to determine the ETH value of each token when minting apETH.', - start: 20937454, ethereum: { tvl, } diff --git a/projects/aquaprotocol/index.js b/projects/aquaprotocol/index.js index 5b06ff4af5fd..52e266779e2f 100644 --- a/projects/aquaprotocol/index.js +++ b/projects/aquaprotocol/index.js @@ -5,7 +5,7 @@ const AQUA_ADDRESS = 'EQAWDyxARSl3ol2G1RMLMwepr3v6Ter5ls3jiAlheKshgg0K' module.exports = { methodology: 'Total amount of collateral locked in the Aqua Protocol (EQAWDyxARSl3ol2G1RMLMwepr3v6Ter5ls3jiAlheKshgg0K)', - start: 1726506000, + start: '2024-09-16', ton: { tvl: sumTokensExport({ owner: AQUA_ADDRESS, tokens: [ADDRESSES.null]}), } diff --git a/projects/arbor-finance/index.js b/projects/arbor-finance/index.js index f47256c6de60..7eac787a02c9 100644 --- a/projects/arbor-finance/index.js +++ b/projects/arbor-finance/index.js @@ -18,7 +18,6 @@ async function tvl(api) { module.exports = { methodology: "Sum the collateral value of active Arbor Finance bonds.", - start: 14906553, ethereum: { tvl, }, diff --git a/projects/arcadia-finance-v2/index.js b/projects/arcadia-finance-v2/index.js index 88571f13dcc9..e100b9808466 100644 --- a/projects/arcadia-finance-v2/index.js +++ b/projects/arcadia-finance-v2/index.js @@ -91,7 +91,7 @@ module.exports = { methodology: "TVL is calculated as the sum of all Account values and the available balance in the liquidity pools. Assets are not double counted.", base: { tvl }, - start: 1711389600, // Mon Mar 25 2024 18:00:00 GMT+0000 + start: '2024-03-25', // Mon Mar 25 2024 18:00:00 GMT+0000 hallmarks: [ [Math.floor(new Date("2024-04-03") / 1e3), "Points program announced."], ], diff --git a/projects/arcadia-finance/index.js b/projects/arcadia-finance/index.js index a9d10c7b41fc..9ca0a500dc27 100644 --- a/projects/arcadia-finance/index.js +++ b/projects/arcadia-finance/index.js @@ -5,7 +5,7 @@ module.exports = { "TVL includes ERC-20 tokens that have been supplied as collateral as well as ERC-20 tokens that are supplied by liquidity providers.", optimism: { tvl }, ethereum: { tvl }, - start: 1686391200, // Jun 10 2023 10:00:00 GMT+0000 + start: '2023-06-10', // Jun 10 2023 10:00:00 GMT+0000 hallmarks: [ [Math.floor(new Date('2023-07-10')/1e3), 'Protocol was exploited.'], ], diff --git a/projects/arcanum/index.js b/projects/arcanum/index.js index 49885497ebfe..3518e10927ac 100644 --- a/projects/arcanum/index.js +++ b/projects/arcanum/index.js @@ -20,7 +20,6 @@ const SPI_ASSETS_CONTRACTS = [ module.exports = { methodology: 'counts the quantities of all tokens in all multipool contracts.', - start: 1000235, arbitrum: { tvl: sumTokensExport({ ownerTokens: [[ARBI_ASSETS_CONTRACTS, ARBI_CONTRACT], [SPI_ASSETS_CONTRACTS, SPI_CONTRACT]] }) } diff --git a/projects/astherus/index.js b/projects/astherus/index.js index de07fb304d71..beb00949afdb 100644 --- a/projects/astherus/index.js +++ b/projects/astherus/index.js @@ -7,7 +7,7 @@ const config = { } module.exports = { - start: 1706716800, // 02/01/2024 @ 00:00:00pm (UTC) + start: '2024-01-31', // 02/01/2024 @ 00:00:00pm (UTC) } Object.keys(config).forEach(chain => { diff --git a/projects/astra-dao/index.js b/projects/astra-dao/index.js index 165a0b75d05f..fb38e05c08c4 100644 --- a/projects/astra-dao/index.js +++ b/projects/astra-dao/index.js @@ -24,7 +24,6 @@ async function tvl(api) { } module.exports = { - start: 17243078, ethereum: { tvl, }, diff --git a/projects/astriddao/index.js b/projects/astriddao/index.js index 53d43d0f0b5f..d1933ad79d42 100644 --- a/projects/astriddao/index.js +++ b/projects/astriddao/index.js @@ -199,7 +199,6 @@ async function tvl(ts, _block, chainBlocks ) { } module.exports = { - start: 915830, methodology: "Total locked collateral assets (in ERC-20 form) in ActivePool and DefaultPool, plus total staked BAI in StabilityPool", astar: { tvl, diff --git a/projects/atlendis-v2/index.js b/projects/atlendis-v2/index.js index fadb6463c4d1..5d1935198de0 100644 --- a/projects/atlendis-v2/index.js +++ b/projects/atlendis-v2/index.js @@ -63,7 +63,7 @@ async function borrowed(api) { } module.exports = { - start: 1686642643, + start: '2023-06-13', hallmarks: [ [1702367571, "Launch of Fluna V2 Pool on Polygon"], [1713855195, "Launch of Arjan pool on Mode Network"], diff --git a/projects/auctus/index.js b/projects/auctus/index.js index abba97069da7..3af3e435ad48 100644 --- a/projects/auctus/index.js +++ b/projects/auctus/index.js @@ -94,6 +94,6 @@ async function tvl(api) { } module.exports = { - start: 1590014400, // 05/20/2020 @ 08:10:40pm (UTC) + start: '2020-05-21', // 05/20/2020 @ 08:10:40pm (UTC) ethereum: { tvl } } diff --git a/projects/autotronic/index.js b/projects/autotronic/index.js index 77d074a24269..278eb3849400 100644 --- a/projects/autotronic/index.js +++ b/projects/autotronic/index.js @@ -1,6 +1,6 @@ const { getUniTVL } = require('../helper/unknownTokens') module.exports = { - start: 1692842880, + start: '2023-08-24', base: { tvl: getUniTVL({ factory: '0x55b3409335B81E7A8B7C085Bbb4047DDc23f7257', useDefaultCoreAssets: true, }), }, diff --git a/projects/awaken/index.js b/projects/awaken/index.js index 94db172ccbff..1b4b29c8eaa0 100644 --- a/projects/awaken/index.js +++ b/projects/awaken/index.js @@ -38,7 +38,7 @@ const v2graph = getChainTvl({ module.exports = { misrepresentedTokens: true, methodology: `Counts the tokens locked on AMM pools, pulling the data from the 'AElfIndexer_Swap' subgraph`, - start: 1706745600, + start: '2024-02-01', aelf: { tvl: v2graph("aelf"), }, diff --git a/projects/axe/index.js b/projects/axe/index.js index b1d62850bcf2..603a2df4f078 100644 --- a/projects/axe/index.js +++ b/projects/axe/index.js @@ -3,7 +3,7 @@ module.exports = { [1648765747, "Rug Pull"] ], deadFrom: 1648765747, - start: 1637036516, // 16 Nov 2021 + start: '2021-11-16', // 16 Nov 2021 ethereum: { tvl: () => ({}), staking: () => ({}), diff --git a/projects/babylon/index.js b/projects/babylon/index.js index ad038db97ed5..356632dfbc37 100644 --- a/projects/babylon/index.js +++ b/projects/babylon/index.js @@ -13,7 +13,7 @@ async function tvl(api) { module.exports = { methodology: 'TVL is fetched from Babylon’s Staking API and represents the total Bitcoin locked in the Babylon staking protocol.', - start: 1724351485, + start: '2024-08-22', timetravel: false, bitcoin: { tvl, diff --git a/projects/bagel-finance/index.js b/projects/bagel-finance/index.js index 78510c9e7881..7269ac6f9045 100644 --- a/projects/bagel-finance/index.js +++ b/projects/bagel-finance/index.js @@ -221,6 +221,6 @@ async function tvl(timestamp, ethBlock, chainBlocks) { } module.exports = { - start: 1602054167, + start: '2020-10-07', bsc: { tvl }, }; diff --git a/projects/bancor/index.js b/projects/bancor/index.js index 835254bea24e..de79d14ade14 100644 --- a/projects/bancor/index.js +++ b/projects/bancor/index.js @@ -42,7 +42,7 @@ async function generateCallsByBlockchain(api) { } module.exports = { - start: 1501632000, // 08/02/2017 @ 12:00am (UTC) + start: '2017-08-02', // 08/02/2017 @ 12:00am (UTC) ethereum: { tvl: generateCallsByBlockchain, }, diff --git a/projects/bancor/v3.js b/projects/bancor/v3.js index 266cd459a2ff..b0ee44a90b09 100644 --- a/projects/bancor/v3.js +++ b/projects/bancor/v3.js @@ -12,7 +12,7 @@ async function addV3Balance(api) { } module.exports = { - start: 1650283200, // 18/04/2022 @ 1:00pm (UTC) + start: '2022-04-18', // 18/04/2022 @ 1:00pm (UTC) methodology: `Counts the tokens in the Master Vault Contract.`, ethereum: { tvl: addV3Balance, diff --git a/projects/bao-baskets/index.js b/projects/bao-baskets/index.js index 648acd30efe0..3c7df95e49cb 100644 --- a/projects/bao-baskets/index.js +++ b/projects/bao-baskets/index.js @@ -20,7 +20,7 @@ const basketTvl = async (api) => { } module.exports = { - start: 1640995200, // Jan 1 2022 00:00:00 GMT+0000 + start: '2022-01-01', // Jan 1 2022 00:00:00 GMT+0000 ethereum: { tvl: basketTvl, pool2: sumTokensExport({ diff --git a/projects/base3d/index.js b/projects/base3d/index.js index 938d138e4cff..aa645787e428 100644 --- a/projects/base3d/index.js +++ b/projects/base3d/index.js @@ -10,5 +10,4 @@ module.exports = { tvl, }, methodology: 'Calculates TVL by checking the ETH balance of the main contract via the totalEthereumBalance function.', - start: 3331748, }; diff --git a/projects/basemax-finance/index.js b/projects/basemax-finance/index.js index 75051a460b19..72d85d53fb8c 100644 --- a/projects/basemax-finance/index.js +++ b/projects/basemax-finance/index.js @@ -5,7 +5,6 @@ const LP = '0xd2eb1de935fe66501aece023b0437fa7b9c40a25' module.exports = { methodology: "Counts USDC deposited to trade and to mint BLP. Staking counts BSM and esBSM deposited to earn esBSM", - start: 1700488, base: { tvl: staking("0xEDFFF5d0C68cFBd44FA12659Fd9AD55F04748874", ADDRESSES.base.USDbC), pool2: sumTokensExport({ owner: "0xe2cb504d51fd16d8bdf533c58553ed3f4f755f00", tokens: [LP], useDefaultCoreAssets: true, }), diff --git a/projects/basin/index.js b/projects/basin/index.js index 491a76161d3c..7fb35d028002 100644 --- a/projects/basin/index.js +++ b/projects/basin/index.js @@ -23,7 +23,7 @@ async function tvl(api) { module.exports = { methodology: "Counts the value of token reserves inside all deployed Wells.", - start: 1692797303, + start: '2023-08-23', ethereum: { tvl }, arbitrum: { tvl } }; diff --git a/projects/baton/index.js b/projects/baton/index.js index 9338d62f6496..0a6619c07dec 100644 --- a/projects/baton/index.js +++ b/projects/baton/index.js @@ -36,7 +36,6 @@ module.exports = { misrepresentedTokens: true, methodology: "Sums the total staked in baton farms and the total amount of tokens deposited as yield farming rewards.", - start: 17411300, ethereum: { tvl } diff --git a/projects/bean/index.js b/projects/bean/index.js index b30c77d6a725..76cb7ebb4f55 100644 --- a/projects/bean/index.js +++ b/projects/bean/index.js @@ -314,7 +314,7 @@ async function pool2(api) { module.exports = { methodology: "Counts the value of deposited Beans and LP tokens in the silo.", - start: 1628287657, + start: '2021-08-07', ethereum: { tvl: () => ({}), pool2, diff --git a/projects/bepro/index.js b/projects/bepro/index.js index d05e900a42ce..21d9fc176a99 100644 --- a/projects/bepro/index.js +++ b/projects/bepro/index.js @@ -20,7 +20,6 @@ const config = { module.exports = { methodology: 'counts the number of BEPRO tokens on Moonbeam Network contracts', - start: 1000235, }; Object.keys(config).forEach(chain => { diff --git a/projects/betswirl/index.js b/projects/betswirl/index.js index 7566436dd5cb..45662f1e22b9 100644 --- a/projects/betswirl/index.js +++ b/projects/betswirl/index.js @@ -3,7 +3,7 @@ const { sumTokens2 } = require("../helper/unwrapLPs.js") module.exports = { methodology: "TVL counts BETS tokens or 8020 LP deposited on the Staking contracts.", - start: 1687715559, + start: '2023-06-25', bsc: { staking: staking('0x20Df34eBe5dCB1082297A18BA8d387B55fB975a0', '0x94025780a1aB58868D9B2dBBB775f44b32e8E6e5'), }, diff --git a/projects/bit-reserve/index.js b/projects/bit-reserve/index.js index 580a2ea6a9d9..26e6fe2bd0dc 100644 --- a/projects/bit-reserve/index.js +++ b/projects/bit-reserve/index.js @@ -7,7 +7,7 @@ async function tvl(api) { module.exports = { methodology: 'The total value of BTC in the rBTC contract on the BIT-RESERVE platform.', - start: 1715917267, + start: '2024-05-17', core: { tvl } diff --git a/projects/bitlend/index.js b/projects/bitlend/index.js index 944624585784..7ea11d2ffd53 100644 --- a/projects/bitlend/index.js +++ b/projects/bitlend/index.js @@ -15,7 +15,6 @@ const bTRX = '0xE73fb086C7Aa48b83372b028f0f35B06E77C7511' module.exports = { methodology: 'Total staked tokens in Bitlend protocol.', - start: 14069919, bittorrent: { tvl: sumTokensExport({ chain: CHAIN, diff --git a/projects/blex/index.js b/projects/blex/index.js index 69934de5d58d..71992f714e6e 100644 --- a/projects/blex/index.js +++ b/projects/blex/index.js @@ -12,7 +12,7 @@ const contracts = [ const tokens = [ADDRESSES.arbitrum.USDT]; module.exports = { - start: 1691240820, + start: '2023-08-05', arbitrum: { tvl: sumTokensExport({ tokens, owners: contracts }) }, hallmarks: [[1691240820, "Blex Protocol Deployed on Arbitrum"]], }; diff --git a/projects/bluebit/index.js b/projects/bluebit/index.js index 2c5690370a00..5cbcde916538 100644 --- a/projects/bluebit/index.js +++ b/projects/bluebit/index.js @@ -29,7 +29,6 @@ const tvl = async (timestamp, block, chainBlocks) => { module.exports = { methodology: "The vaults on https://bluebit.fi are included in TVL.", - start: 62936418, aurora: { tvl: tvl, staking: staking(veToken, token), diff --git a/projects/bonqdao/index.js b/projects/bonqdao/index.js index 8f60657a81a9..6a94020d4577 100644 --- a/projects/bonqdao/index.js +++ b/projects/bonqdao/index.js @@ -69,7 +69,6 @@ module.exports = { ], deadFrom: '2023-02-01', methodology: 'Summation of the collateral deposited in BonqDAO Troves (personal lending vaults)', - start: 36884903, polygon: { tvl, staking: stakings([BNQ_STAKING_CONTRACT], BNQ), diff --git a/projects/bracketX/index.js b/projects/bracketX/index.js index 55ef535ab838..7be4fba694ac 100644 --- a/projects/bracketX/index.js +++ b/projects/bracketX/index.js @@ -14,7 +14,7 @@ async function tvl(api) { module.exports = { methodology: 'Count the number of WETH tokens locked in the protocol contract.', - start: 1704412800, + start: '2024-01-05', arbitrum: { tvl, } diff --git a/projects/bril-finance/index.js b/projects/bril-finance/index.js index 73be3acf3cc8..52ef36192437 100644 --- a/projects/bril-finance/index.js +++ b/projects/bril-finance/index.js @@ -7,7 +7,6 @@ const config = { module.exports = { doublecounted: true, methodology: 'Count tokens managed by Bril automated liquidity management stratagies', - start: 30131926, }; Object.keys(config).forEach(chain => { diff --git a/projects/brine/index.js b/projects/brine/index.js index 89402f930182..e3cd28078419 100644 --- a/projects/brine/index.js +++ b/projects/brine/index.js @@ -63,7 +63,7 @@ const scrollTokens = [ ] module.exports = { - start: 1685817000, + start: '2023-06-03', ethereum: { tvl: sumTokensExport({ owners: ethereumContracts, tokens: ethereumTokens, }) }, polygon: { tvl: sumTokensExport({ owners: polygonContracts, tokens: polygonTokens}) }, optimism: { tvl: sumTokensExport({ owners: optimismContracts, tokens: optimismTokens}) }, diff --git a/projects/brokkr/index.js b/projects/brokkr/index.js index 8f7f54799710..7b842b3aebe5 100644 --- a/projects/brokkr/index.js +++ b/projects/brokkr/index.js @@ -66,7 +66,7 @@ async function addEquityValuationToBalances(address, api) { module.exports = { - start: 1554848955, // 04/09/2019 @ 10:29pm (UTC) + start: '2019-04-10', // 04/09/2019 @ 10:29pm (UTC) doublecounted: true, avax: { tvl, diff --git a/projects/burve-protocol/index.js b/projects/burve-protocol/index.js index 53d9ae554d50..dae89f7c1253 100644 --- a/projects/burve-protocol/index.js +++ b/projects/burve-protocol/index.js @@ -6,7 +6,7 @@ const config = { } module.exports = { - start: 1707300000, + start: '2024-02-07', methodology: "The TVL including total values of assets locked in the tokens which are deployed by BurveProtocol", } diff --git a/projects/cache-gold/index.js b/projects/cache-gold/index.js index ae5f2404e68a..22ce2749916b 100644 --- a/projects/cache-gold/index.js +++ b/projects/cache-gold/index.js @@ -27,5 +27,5 @@ module.exports = { ethereum: { tvl, }, - start: 1617235200 + start: '2021-04-01' }; diff --git a/projects/cake-monster/index.js b/projects/cake-monster/index.js index 891e9024d6dc..63a232986fd2 100644 --- a/projects/cake-monster/index.js +++ b/projects/cake-monster/index.js @@ -5,7 +5,6 @@ const CM_STAKING_CONTRACT = "0xF7CDDF60CD076d4d64c613489aA00dCCf1E518F6"; module.exports = { methodology: "counts the number of $MONSTA tokens in the Cake Monster Staking contract, excluding the amount reserved for the staking rewards.", - start: 15765654, bsc: { tvl: () => ({}), staking: staking(CM_STAKING_CONTRACT, CM_TOKEN_CONTRACT), diff --git a/projects/camelot/index.js b/projects/camelot/index.js index 195068af3fc5..82ea9cba7e46 100644 --- a/projects/camelot/index.js +++ b/projects/camelot/index.js @@ -2,7 +2,7 @@ const { getUniTVL } = require("../helper/unknownTokens"); module.exports = { misrepresentedTokens: true, - start: 1669075200, + start: '2022-11-22', arbitrum: { tvl: getUniTVL({ factory: '0x6EcCab422D763aC031210895C81787E87B43A652', useDefaultCoreAssets: true,}), }, diff --git a/projects/capy-finance/index.js b/projects/capy-finance/index.js index 9dedd33d17c1..08a07e461dc5 100644 --- a/projects/capy-finance/index.js +++ b/projects/capy-finance/index.js @@ -10,7 +10,6 @@ async function tvl(api) { module.exports = { methodology: 'The TVL of the Capy Finance project in USD.', - start: 1000235, bsquared: { tvl, }, diff --git a/projects/cauldron/index.js b/projects/cauldron/index.js index da279509ee65..ae166a15e035 100644 --- a/projects/cauldron/index.js +++ b/projects/cauldron/index.js @@ -23,7 +23,7 @@ async function tvl({ timestamp }) { module.exports = { methodology: "Scrape the blockchain and filter for spent transaction outputs that match the cauldron contract's redeem script. Check if the transaction has an output with a locking script that matches the redeem script in the input. A match on locking script means the funds are still locked in the DEX contract. Aggregate the value of funds in contract utxos.", - start: 1688198180, + start: '2023-07-01', bitcoincash: { tvl }, hallmarks: [ [1688198180, "First cauldron contract deployed (SOCK)"], diff --git a/projects/chainflip/index.js b/projects/chainflip/index.js index 975f0bb523d5..b015ace57f3c 100644 --- a/projects/chainflip/index.js +++ b/projects/chainflip/index.js @@ -59,7 +59,7 @@ async function tvl(api) { module.exports = { methodology: 'The number of FLIP tokens in the Chainflip State Chain Gateway Contract, as well as the total liquidity.', - start: 1700740800, // FLIP went live on 2023-11-23 12:00 UTC + start: '2023-11-23', // FLIP went live on 2023-11-23 12:00 UTC ethereum: { tvl: () => ({}), staking: staking(FLIP_TOKEN, STATE_CHAIN_GATEWAY_CONTRACT), diff --git a/projects/clip-finance/index.js b/projects/clip-finance/index.js index 1da2b85271b0..7b655bcf6bc4 100644 --- a/projects/clip-finance/index.js +++ b/projects/clip-finance/index.js @@ -140,7 +140,7 @@ module.exports = { methodology: "Clip Finance TVL is achieved by summing total values of assets deposited in other protocols through our vaults and vaults balances.", doublecounted: true, - start: 1697627757, // (Oct-18-2023 11:15:57 AM +UTC) deployed on the BSC network + start: '2023-10-18', // (Oct-18-2023 11:15:57 AM +UTC) deployed on the BSC network }; Object.keys(config).forEach((chain) => { diff --git a/projects/collectionxyz/index.js b/projects/collectionxyz/index.js index 17c0ddd6bdf2..468255ebedfc 100644 --- a/projects/collectionxyz/index.js +++ b/projects/collectionxyz/index.js @@ -35,7 +35,6 @@ async function getTotalValueLocked(api) { } module.exports = { - start: 16945809, ethereum: { tvl: getTotalValueLocked, }, diff --git a/projects/colony/index.js b/projects/colony/index.js index 3bc233767bdd..47b576910f61 100644 --- a/projects/colony/index.js +++ b/projects/colony/index.js @@ -46,7 +46,7 @@ module.exports = { "TVL also includes rewards in various tokens distributed in the staking contract, " + "actual fundraised stablecoins in projects (Nests), and liquidity from Colony Dex.", avax: { - start: 1638367059, // CLY Token deployment + start: '2021-12-01', // CLY Token deployment tvl: _tvl(), staking: _staking, // vesting: clyVesting(colonyGovernanceToken, vestingContract), diff --git a/projects/connext/old.js b/projects/connext/old.js index fb8ca7571384..4e6e29ae8c56 100644 --- a/projects/connext/old.js +++ b/projects/connext/old.js @@ -136,7 +136,7 @@ async function xdai(timestamp, ethBlock, {xdai: block}) { } module.exports = { - start: 1552065900, // 03/08/2019 @ 5:25pm (UTC) + start: '2019-03-08', // 03/08/2019 @ 5:25pm (UTC) ethereum: { tvl: ethereum }, diff --git a/projects/convergence/index.js b/projects/convergence/index.js index a0c69348d7b0..ad534ffc33dd 100644 --- a/projects/convergence/index.js +++ b/projects/convergence/index.js @@ -3,7 +3,7 @@ const MOONBEAM_FACTORY = '0x9504d0d43189d208459e15c7f643aac1abe3735d'; const { getUniTVL } = require('../helper/unknownTokens') module.exports = { - start: 1621220505, //2021-05-17 00:00:00 +UTC + start: '2021-05-17', //2021-05-17 00:00:00 +UTC misrepresentedTokens: true, ethereum: { tvl: getUniTVL({ diff --git a/projects/core-powercity-io/index.js b/projects/core-powercity-io/index.js index a2038bde24d1..fe231a9b4f74 100644 --- a/projects/core-powercity-io/index.js +++ b/projects/core-powercity-io/index.js @@ -5,7 +5,7 @@ const WATT_TOKEN = "0xDfdc2836FD2E63Bba9f0eE07901aD465Bff4DE71"; const WATT_PLS_LP = "0x956f097E055Fa16Aad35c339E17ACcbF42782DE6"; module.exports = { - start: 1702377175, + start: '2023-12-12', methodology: "No external tokens/coins staked/locked. Only protocol token WATT and WATT-PLS-LP staked within protocol.", pulse: { tvl: async () => ({}), diff --git a/projects/core/index.js b/projects/core/index.js index 6409055e0ea9..8fef789e5ae8 100644 --- a/projects/core/index.js +++ b/projects/core/index.js @@ -82,7 +82,7 @@ async function staking(_, block){ module.exports = { ethereum: { - start: 1601142406, // 2020-09-26 17:46:46 (UTC), + start: '2020-09-26', // 2020-09-26 17:46:46 (UTC), tvl, treasury, staking, diff --git a/projects/coupon-finance/index.js b/projects/coupon-finance/index.js index 203f49434049..52c1909fc1c9 100644 --- a/projects/coupon-finance/index.js +++ b/projects/coupon-finance/index.js @@ -69,7 +69,6 @@ module.exports = { misrepresentedTokens: true, doublecounted: true, methodology: "TVL consists of deposit and collateral in the Coupon Finance contract", - start: 150536505, arbitrum: { tvl, }, diff --git a/projects/cream/index.js b/projects/cream/index.js index 04b706225e95..b9a135c95b68 100644 --- a/projects/cream/index.js +++ b/projects/cream/index.js @@ -4,7 +4,7 @@ const { compoundExports } = require("../helper/compound"); module.exports = { hallmarks: [[1635292800, "Flashloan exploit"]], timetravel: false, // bsc and fantom api's for staked coins can't be queried at historical points - start: 1599552000, // 09/08/2020 @ 8:00am (UTC) + start: '2020-09-08', // 09/08/2020 @ 8:00am (UTC) ethereum: compoundExports("0xbdC857eae1D15ad171E11af6FC3e99413Ed57Ec4"), bsc: compoundExports( "0x589DE0F0Ccf905477646599bb3E5C622C84cC0BA", diff --git a/projects/creamswap/index.js b/projects/creamswap/index.js index fb8efca0c71d..b0d6eb9ab588 100644 --- a/projects/creamswap/index.js +++ b/projects/creamswap/index.js @@ -16,6 +16,6 @@ async function tvl(api) { } module.exports = { - start: 1599552000, // 09/08/2020 @ 8:00am (UTC) + start: '2020-09-08', // 09/08/2020 @ 8:00am (UTC) ethereum: { tvl } } diff --git a/projects/cryptoswap/index.js b/projects/cryptoswap/index.js index 637e0be72b74..b4f8c6a73ad2 100644 --- a/projects/cryptoswap/index.js +++ b/projects/cryptoswap/index.js @@ -6,5 +6,5 @@ module.exports = { bsc: { tvl: getUniTVL({ factory: '0x4136A450861f5CFE7E860Ce93e678Ad12158695C', useDefaultCoreAssets: true }), }, - start: 1651494114, // Mon May 02 2022 12:21:54 + start: '2022-05-02', // Mon May 02 2022 12:21:54 }; diff --git a/projects/csix/index.js b/projects/csix/index.js index 66a0fb885aa4..0b66fcdd4bee 100644 --- a/projects/csix/index.js +++ b/projects/csix/index.js @@ -22,6 +22,5 @@ module.exports = { tvl: () => ({}), staking, }, - start: 25647232, methodology: "Counts as TVL the CSIX deposited through Staking Contract", }; diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 7611d32485dc..2472f233b571 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -27,6 +27,5 @@ async function tvl(api) { module.exports = { doublecounted: true, methodology: "We calculate TVL based on the Total Supply of our proxy contracts through which users interact with vault's contracts", - start: 1000235, blast: { tvl }, }; diff --git a/projects/dam-finance/index.js b/projects/dam-finance/index.js index e0be38c63a9f..d8fc05afbec1 100644 --- a/projects/dam-finance/index.js +++ b/projects/dam-finance/index.js @@ -4,7 +4,6 @@ const ethCollateralJoins = ["0xB1fbcD7415F9177F5EBD3d9700eD5F15B476a5Fe"] module.exports = { methodology: 'Currently counting the USDC that DAM Finance has locked up, but will add more collateral types and multiple chains in the future', - start: 16375673, // LMCV Deployment Block ethereum: { tvl: sumTokensExport({ tokens: [ADDRESSES.ethereum.USDC], diff --git a/projects/ddex/index.js b/projects/ddex/index.js index 7af4ef51511b..0b0b97e9172c 100644 --- a/projects/ddex/index.js +++ b/projects/ddex/index.js @@ -26,7 +26,7 @@ async function tvl(timestamp, block) { } module.exports = { - start: 1566470505, // 2019-08-22T18:41:45+08:00 + start: '2019-08-22', // 2019-08-22T18:41:45+08:00 ethereum: { tvl } } diff --git a/projects/deepbook-v3/index.js b/projects/deepbook-v3/index.js index 88495a261b87..b1f880cc378e 100644 --- a/projects/deepbook-v3/index.js +++ b/projects/deepbook-v3/index.js @@ -25,7 +25,7 @@ const tvl = async (api) => { module.exports = { methodology: "All deposits into all BalanceManagers minutes all withdrawals from all BalanceManagers", - start: 1728858752, + start: '2024-10-14', sui: { tvl, } diff --git a/projects/deepp/index.js b/projects/deepp/index.js index 2499155bdc17..886c97fc5310 100644 --- a/projects/deepp/index.js +++ b/projects/deepp/index.js @@ -3,7 +3,7 @@ const ADDRESSES = require("../helper/coreAssets.json"); module.exports = { methodology: 'Lists the number of owned USDC tokens in the Deepp LP and BetLock contracts.', - start: 1696118400, + start: '2023-10-01', arbitrum: { tvl: sumTokensExport({ owners: Object.values({ diff --git a/projects/defi-swap/index.js b/projects/defi-swap/index.js index e2b4294eb8cf..5cd7ba3646cc 100644 --- a/projects/defi-swap/index.js +++ b/projects/defi-swap/index.js @@ -2,7 +2,7 @@ const { getUniTVL } = require('../helper/unknownTokens') module.exports = { misrepresentedTokens: true, - start: 1599523200, // Tuesday, 8 September 2020 00:00:00 + start: '2020-09-08', // Tuesday, 8 September 2020 00:00:00 ethereum: { tvl: getUniTVL({ factory: '0x9DEB29c9a4c7A88a3C0257393b7f3335338D9A9D', useDefaultCoreAssets: true }), }, diff --git a/projects/defifranc/index.js b/projects/defifranc/index.js index c56eb397c3d0..c89825a674e5 100644 --- a/projects/defifranc/index.js +++ b/projects/defifranc/index.js @@ -34,7 +34,7 @@ module.exports = { tvl, staking: staking(MON_STAKING_POOL, MON_TOKEN), }, - start: 1664074800, + start: '2022-09-25', methodology: "Total deposits of ETH and wBTC for borrowed DCHF.", }; \ No newline at end of file diff --git a/projects/defiyieldprotocol/index.js b/projects/defiyieldprotocol/index.js index fdffde9b53ed..ce1adc4572f4 100644 --- a/projects/defiyieldprotocol/index.js +++ b/projects/defiyieldprotocol/index.js @@ -83,7 +83,7 @@ const lps = { } module.exports = { - start: 1619654324, // Apr-28-2021 23:58:44 PM +UTC + start: '2021-04-29', // Apr-28-2021 23:58:44 PM +UTC ethereum: { tvl: sumTokensExport({ tokens: [ diff --git a/projects/defrost/index.js b/projects/defrost/index.js index 9759ed21a672..c8b24f6e19e7 100644 --- a/projects/defrost/index.js +++ b/projects/defrost/index.js @@ -60,7 +60,6 @@ async function staking(api) { module.exports = { doublecounted: true, - start: 6965653, avax: { tvl, staking diff --git a/projects/degate/index.js b/projects/degate/index.js index 04e1654b6855..9ad22c28c6a1 100644 --- a/projects/degate/index.js +++ b/projects/degate/index.js @@ -17,6 +17,6 @@ async function tvl(api) { } module.exports = { - start: 1699746983, // Nov-11-2023 11:56:23 PM +UTC + start: '2023-11-12', // Nov-11-2023 11:56:23 PM +UTC ethereum: { tvl } } diff --git a/projects/deltaprime/index.js b/projects/deltaprime/index.js index 626b2577ad0a..0d50cd626b6f 100644 --- a/projects/deltaprime/index.js +++ b/projects/deltaprime/index.js @@ -178,8 +178,6 @@ async function addTraderJoeLPs({ api, accounts }) { module.exports = { methodology: 'Counts TVL of DeltaPrime\'s lending pools and individual PrimeAccount contracts\'', - start: - 24753316, avax: { tvl: tvlAvalanche, }, diff --git a/projects/derivadex/index.js b/projects/derivadex/index.js index f41ed3fcdee6..e9a0b3f6db5e 100644 --- a/projects/derivadex/index.js +++ b/projects/derivadex/index.js @@ -58,6 +58,6 @@ async function tvl(timestamp, block) { ==================================================*/ module.exports = { - start: 1607126400, // 12/5/2020 00:00:00 utc + start: '2020-12-05', // 12/5/2020 00:00:00 utc ethereum: { tvl } }; diff --git a/projects/dexilla/index.js b/projects/dexilla/index.js index 40d509ca58a5..4261f539b1ad 100644 --- a/projects/dexilla/index.js +++ b/projects/dexilla/index.js @@ -51,7 +51,7 @@ const config = { module.exports = { methodology: 'TVL counts the ERC20 tokens on the exchange contracts.', - start: 1685610580, // June 1, 2023 @ 9:09:40 (UTC +0) + start: '2023-06-01', // June 1, 2023 @ 9:09:40 (UTC +0) } Object.keys(config).forEach(chain => { diff --git a/projects/dexter/index.js b/projects/dexter/index.js index 35108c2f45b3..8d1be049b69b 100644 --- a/projects/dexter/index.js +++ b/projects/dexter/index.js @@ -29,7 +29,7 @@ module.exports = { timetravel: false, // misrepresentedTokens: true, methodology: `Counts the liquidity on all AMM pools`, - start: 1679788800, // "2023-03-26" UTC + start: '2023-03-26', // "2023-03-26" UTC persistence: { tvl } diff --git a/projects/dextf/index.js b/projects/dextf/index.js index aeeee078523a..b168b0d1bd38 100644 --- a/projects/dextf/index.js +++ b/projects/dextf/index.js @@ -3,7 +3,7 @@ const tvlV2 = require('./v2'); const sdk = require('@defillama/sdk'); module.exports = { - start: 1595853825, // 27/07/2020 @ 12:43:45am (UTC) + start: '2020-07-27', // 27/07/2020 @ 12:43:45am (UTC) ethereum: { tvl: sdk.util.sumChainTvls([TVLV1, tvlV2]) }, avax: { tvl: tvlV2 }, era: { tvl: tvlV2 } diff --git a/projects/dforce/index.js b/projects/dforce/index.js index 312cc30dc033..801909c400f1 100644 --- a/projects/dforce/index.js +++ b/projects/dforce/index.js @@ -196,7 +196,7 @@ async function staking(timestamp, ethBlock, chainBlocks) { module.exports = { ...generalizedChainExports(chainTvl, ['ethereum', "bsc", "arbitrum", "optimism", "polygon", "avax", "kava", "conflux"]), - start: 1564165044, // Jul-27-2019 02:17:24 AM +UTC + start: '2019-07-26', // Jul-27-2019 02:17:24 AM +UTC hallmarks: [ [Math.floor(new Date('2023-12-19')/1e3), 'Unitus spin-off'], ], diff --git a/projects/dirac-finance/index.js b/projects/dirac-finance/index.js index b1131cc4e142..3b32f4df3d2e 100644 --- a/projects/dirac-finance/index.js +++ b/projects/dirac-finance/index.js @@ -35,7 +35,6 @@ module.exports = { timetravel: true, misrepresentedTokens: false, methodology: 'counts the number of MINT tokens in the Club Bonding contract.', - start: 11251616, polygon_zkevm: { tvl, } diff --git a/projects/dogedollar/index.js b/projects/dogedollar/index.js index 2cebc693c7e7..8b44cd12b1fb 100644 --- a/projects/dogedollar/index.js +++ b/projects/dogedollar/index.js @@ -4,7 +4,6 @@ const DJED_ADDR = '0xA99ef299CdA10AC4Ec974370778fbd27Cfb5CF61' module.exports = { methodology: 'finds the DOGE balance of the DJED instance backing the stablecoin, aswell as the fallback stablecoin balance', - start: 14576300, dogechain: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/dolomite/index.js b/projects/dolomite/index.js index 773ad3ad5e52..a41e80e3d8cc 100644 --- a/projects/dolomite/index.js +++ b/projects/dolomite/index.js @@ -34,7 +34,7 @@ async function borrowed(api) { } module.exports = { - start: 1664856000, // 10/4/2022 @ 00:00am (UTC) + start: '2022-10-04', // 10/4/2022 @ 00:00am (UTC) }; const config = { diff --git a/projects/dvol/index.js b/projects/dvol/index.js index b0186cea59c9..14416a4a74fc 100644 --- a/projects/dvol/index.js +++ b/projects/dvol/index.js @@ -58,7 +58,6 @@ async function borrowed(api) { } module.exports = { - start: 33674950, timetravel: false, bsc: { tvl, borrowed, diff --git a/projects/dydx/index.js b/projects/dydx/index.js index eb26b94f880e..166bf6e6b04e 100644 --- a/projects/dydx/index.js +++ b/projects/dydx/index.js @@ -40,7 +40,7 @@ const ADDRESSES = require('../helper/coreAssets.json') } module.exports = { - start: 1538179200, // 09/29/2018 @ 12:00am (UTC) + start: '2018-09-29', // 09/29/2018 @ 12:00am (UTC) ethereum: { tvl }, hallmarks:[ [1611630974, "Series B $10M"], diff --git a/projects/earn-powercity-io/index.js b/projects/earn-powercity-io/index.js index 39d159f06ea3..38729ca6d9af 100644 --- a/projects/earn-powercity-io/index.js +++ b/projects/earn-powercity-io/index.js @@ -18,7 +18,7 @@ const LP_EARN_PLSX_ADDRESS = "0xed77CbbB80e5a5C3A1FE664419d6F690766b5913"; const lps = [LP_PXDC_PLSX_ADDRESS, LP_EARN_PLSX_ADDRESS] module.exports = { - start: 1708418955, + start: '2024-02-20', methodology: "Total Value Locked includes all Troves, Stability Pool, Staking Pool and LP Farming Pools", pulse: { tvl: getLiquityTvl(TROVE_MANAGER_ADDRESS, { collateralToken: PLSX_ADDRESS }), diff --git a/projects/ebtc/index.js b/projects/ebtc/index.js index 37a7cf00dfde..9495901a6a14 100644 --- a/projects/ebtc/index.js +++ b/projects/ebtc/index.js @@ -13,7 +13,7 @@ async function tvl(api) { timetravel: true, misrepresentedTokens: false, methodology: 'Adds the total amount of collateral in the active pool and the collateral surplus pool of the eBTC protocol.', - start: 1710492719, + start: '2024-03-15', ethereum: { tvl, } diff --git a/projects/ecodefi/index.js b/projects/ecodefi/index.js index b996f17a8921..35c73ee57eec 100644 --- a/projects/ecodefi/index.js +++ b/projects/ecodefi/index.js @@ -8,7 +8,6 @@ module.exports = { ...compoundExports2({ comptroller: '0xfd1f241ba25b8966a14865cb22a4ea3d24c92451'}), staking: staking('0x55839fe60742c7789DaBcA85Fd693f1cAbaeDd69', '0x0985205D53D575CB07Dd4Fba216034dc614eab55'), }, - start: 15307794, // Feb-16-2022 01:49:31 PM +UTC } module.exports.bsc.borrowed = () => ({}) // bad debt \ No newline at end of file diff --git a/projects/ensuro/index.js b/projects/ensuro/index.js index b892a405af23..5039e7d9f910 100644 --- a/projects/ensuro/index.js +++ b/projects/ensuro/index.js @@ -65,7 +65,7 @@ module.exports = { polygon: { tvl }, - start: 1643673600, + start: '2022-02-01', hallmarks: [ [1669852800, "Ensuro V2 Launch"] ] diff --git a/projects/epoch-island/index.js b/projects/epoch-island/index.js index d0a381f149a0..c4608e2ff3b4 100644 --- a/projects/epoch-island/index.js +++ b/projects/epoch-island/index.js @@ -11,7 +11,7 @@ const config = { } module.exports = { - start: 1700179200, + start: '2023-11-17', hallmarks: [ [1700179200, "vEPOCH Launch"], [1704240000, "ITO Launch"] diff --git a/projects/erasure/index.js b/projects/erasure/index.js index d2d19e787112..f249af17c585 100644 --- a/projects/erasure/index.js +++ b/projects/erasure/index.js @@ -121,6 +121,6 @@ const ADDRESSES = require('../helper/coreAssets.json') ==================================================*/ module.exports = { - start: 1566518400, // 08/23/2019 @ 12:00am (UTC) + start: '2019-08-23', // 08/23/2019 @ 12:00am (UTC) ethereum: { tvl } }; diff --git a/projects/esper-finance/index.js b/projects/esper-finance/index.js index eecb132f3938..d9cb3a3505bb 100644 --- a/projects/esper-finance/index.js +++ b/projects/esper-finance/index.js @@ -2,7 +2,6 @@ const { getUniTVL } = require("../helper/unknownTokens"); module.exports = { misrepresentedTokens: true, - start: 4781359, mantle: { tvl: getUniTVL({ factory: '0x69C4515C926ac3db7A547044145495240961a7B5', useDefaultCoreAssets: true, }), }, diff --git a/projects/ethichub/index.js b/projects/ethichub/index.js index 6791c5d367bd..793e0ca9351a 100644 --- a/projects/ethichub/index.js +++ b/projects/ethichub/index.js @@ -15,7 +15,7 @@ const STAKED_ETHIX_CELO = '0xCb16E29d0B667BaD7266E5d0Cd59b711b6273C6B'; module.exports = { methodology: 'Count of the tokens in pools, reserves...', - start: 1608640693, + start: '2020-12-22', ethereum: { tvl: () => ({}), pool2: pool2(STAKED_UETHIX_MAINNET, ETHIX_WETH_UNIV2), diff --git a/projects/ethosx/index.js b/projects/ethosx/index.js index adbad62cd45d..d9817ab60d72 100644 --- a/projects/ethosx/index.js +++ b/projects/ethosx/index.js @@ -27,7 +27,7 @@ const USDC_BSC_ADDRESS = ADDRESSES.bsc.USDC; module.exports = { methodology: "TVL counts the USDC held in the controller contracts.", - start: 1715693000, + start: '2024-05-14', arbitrum: { tvl: sumTokensExport({ owners: [ diff --git a/projects/everdex/index.js b/projects/everdex/index.js index cf025fc2d024..07bbb757ff64 100644 --- a/projects/everdex/index.js +++ b/projects/everdex/index.js @@ -26,7 +26,7 @@ const uniTVL = getUniTVL({ factory: '0x19f21b0AB98EC10d734E314356Ad562ae349177d' module.exports = { misrepresentedTokens: true, - start: 1674864000, + start: '2023-01-28', bfc: { tvl: sdk.util.sumChainTvls([tvl, uniTVL]) }, diff --git a/projects/exsat-credit-staking/index.js b/projects/exsat-credit-staking/index.js index 1c7cd332c757..ab4402f2f6cd 100644 --- a/projects/exsat-credit-staking/index.js +++ b/projects/exsat-credit-staking/index.js @@ -7,6 +7,6 @@ async function tvl() { module.exports = { methodology: 'TVL is based on Bitcoin addresses in the exSat credit staking contract, summing their associated Bitcoin balances.', - start: 1729684800, + start: '2024-10-23', bitcoin: { tvl }, }; diff --git a/projects/ezkalibur/index.js b/projects/ezkalibur/index.js index 59d927171a99..90704dea8b53 100644 --- a/projects/ezkalibur/index.js +++ b/projects/ezkalibur/index.js @@ -7,7 +7,7 @@ const SWORD_WETH_LP = '0xc8b6b3a4d2d8428ef3a940eac1e32a7ddadcb0f1' module.exports = { misrepresentedTokens: true, - start: 1686309181, + start: '2023-06-09', era: { tvl: getUniTVL({ factory: '0x15C664A62086c06D43E75BB3fddED93008B8cE63', useDefaultCoreAssets: true, }), staking: stakingPricedLP(xSWORD,SWORD_TOKEN,'era',SWORD_WETH_LP,'weth') diff --git a/projects/ferdyflip/index.js b/projects/ferdyflip/index.js index e6242ae51973..4cd1250d46a8 100644 --- a/projects/ferdyflip/index.js +++ b/projects/ferdyflip/index.js @@ -16,7 +16,7 @@ const config = { Object.keys(config).forEach((chain) => { module.exports[chain] = { - start: 1675962000, //Fri Feb 10 2023 + start: '2023-02-09', //Fri Feb 10 2023 tvl: sumTokensExport(config[chain]), }; }); diff --git a/projects/ferro/index.js b/projects/ferro/index.js index 311df16a530e..2b99bf4c3df6 100644 --- a/projects/ferro/index.js +++ b/projects/ferro/index.js @@ -41,7 +41,7 @@ async function tvl(api) { module.exports = { methodology: 'sum of ferro stablecoin pool contracts balance', - start: 1651218360, + start: '2022-04-29', cronos: { tvl, } diff --git a/projects/flashstake/index.js b/projects/flashstake/index.js index f8b07fc387fd..a66ebba28a6e 100644 --- a/projects/flashstake/index.js +++ b/projects/flashstake/index.js @@ -18,7 +18,7 @@ async function getData() { module.exports = { doublecounted: true, - start: 1659312000, + start: '2022-08-01', hallmarks: [ [1659312000, "Protocol Launch"], [1666641600, "Optimism Launch"], diff --git a/projects/flex-powercity-io/index.js b/projects/flex-powercity-io/index.js index 6e6c7f8899a3..abca4499e353 100644 --- a/projects/flex-powercity-io/index.js +++ b/projects/flex-powercity-io/index.js @@ -18,7 +18,7 @@ const LP_FLEX_HEX_ADDRESS = "0x476d63aB94B4E86614Df0C3D5A27E9e22631D062"; const lps = [LP_HEXDC_HEX_ADDRESS, LP_FLEX_HEX_ADDRESS] module.exports = { - start: 1714534195, + start: '2024-05-01', methodology: "Total Value Locked includes all Troves, Stability Pool, Staking Pool and LP Farming Pools", pulse: { tvl: getLiquityTvl(TROVE_MANAGER_ADDRESS, { collateralToken: HEX_ADDRESS }), diff --git a/projects/flexdao/index.js b/projects/flexdao/index.js index 9e5f479df6ca..5ffabacb9783 100644 --- a/projects/flexdao/index.js +++ b/projects/flexdao/index.js @@ -11,7 +11,6 @@ const decimals = 18 module.exports = { methodology: 'Counting all FLEX tokens staked in the DAO', - start: 2153800, [chain]: { tvl: ()=>({}), staking: staking(veFLEX, FLEX, chain, coingeckoId, decimals) diff --git a/projects/florence-finance/index.js b/projects/florence-finance/index.js index 59432e80bfb1..c191bf482b70 100644 --- a/projects/florence-finance/index.js +++ b/projects/florence-finance/index.js @@ -41,7 +41,7 @@ async function getBorrowedOnBase(api) { module.exports = { methodology: "The Florin token (FLR) is minted whenever a new loan is funded and burned when a loan matures and is repaid. Since the Florin token is 1:1 redeemable for EUR the borrowed amount is denominated in the protocols treasuries EUR stablecoin of the respective chain. Consequently the total supply of Florin equals the amount borrowed through the protocol. To avoid double counting, the amount of FLR held in the bridge contract is subtracted from the total supply. ", - ethereum: { start: 16077400, borrowed: getBorrowedOnEthereum, tvl: () => ({}) }, - arbitrum: { start: 126183369, borrowed: getBorrowedOnArbitrum, tvl: () => ({}) }, - base: { start: 18941407, borrowed: getBorrowedOnBase, tvl: () => ({}) }, + ethereum: { borrowed: getBorrowedOnEthereum, tvl: () => ({}) }, + arbitrum: { borrowed: getBorrowedOnArbitrum, tvl: () => ({}) }, + base: { borrowed: getBorrowedOnBase, tvl: () => ({}) }, }; \ No newline at end of file diff --git a/projects/forgesx/index.js b/projects/forgesx/index.js index 952f6a7c8dbc..137edbb990c0 100644 --- a/projects/forgesx/index.js +++ b/projects/forgesx/index.js @@ -5,7 +5,7 @@ const USDC_TOKEN = ADDRESSES.arbitrum.USDC module.exports = { methodology: 'counts the number of USDC tokens deposited as collateral in the Forge.sol contract.', - start: 1680643295, + start: '2023-04-04', arbitrum: { tvl: sumTokensExport({ owner: FORGE_SOL, tokens: [USDC_TOKEN]}), } diff --git a/projects/frankencoin/index.js b/projects/frankencoin/index.js index 15e6c3633c7c..d5722c1fc8a1 100644 --- a/projects/frankencoin/index.js +++ b/projects/frankencoin/index.js @@ -15,5 +15,5 @@ module.exports = { ethereum: { tvl, }, - start: 1698487043, + start: '2023-10-28', }; diff --git a/projects/freestyle/index.js b/projects/freestyle/index.js index fce0e463725f..7ac9f3fbfc4d 100644 --- a/projects/freestyle/index.js +++ b/projects/freestyle/index.js @@ -4,7 +4,7 @@ const { request, } = require("graphql-request"); const freestyleConfig = { base: { token: ADDRESSES.base.USDC, - start: 1700006400, + start: '2023-11-15', graphUrl: "https://api-v2.morphex.trade/subgraph/3KhmYXgsM3CM1bbUCX8ejhcxQCtWwpUGhP7p9aDKZ94Z", accountSource: '0x6D63921D8203044f6AbaD8F346d3AEa9A2719dDD' }, diff --git a/projects/frigg-eco/index.js b/projects/frigg-eco/index.js index 956fd66e045b..56ff97f3df4c 100644 --- a/projects/frigg-eco/index.js +++ b/projects/frigg-eco/index.js @@ -36,7 +36,6 @@ async function tvl(_, block) { module.exports = { misrepresentedTokens: true, methodology: 'Gets the value of all tokens managed through frigg.eco universe', - start: 15575809, ethereum: { tvl }, diff --git a/projects/future-swap/index.js b/projects/future-swap/index.js index 389f72125fe3..ba2738761a23 100644 --- a/projects/future-swap/index.js +++ b/projects/future-swap/index.js @@ -24,7 +24,7 @@ async function farmStakings(api) { module.exports = { findora: { - start: 1677029212, // 2023-02-22 01:26:52 UTC + start: '2023-02-22', // 2023-02-22 01:26:52 UTC methodology: `Sum of liqudities backed USDF; and tokens values staked in the FutureSwap Farm.`, tvl: sumTokensExport({ owner: FutureSwapContracts.USDF, diff --git a/projects/futureswap/index.js b/projects/futureswap/index.js index d4cf03ead53c..f1c172784892 100644 --- a/projects/futureswap/index.js +++ b/projects/futureswap/index.js @@ -47,7 +47,7 @@ async function avax(timestamp, _, { avax: block }) { } module.exports = { - start: 1609459200, // unix timestamp (utc 0) specifying when the project began, or where live data begins + start: '2021-01-01', // unix timestamp (utc 0) specifying when the project began, or where live data begins ethereum: { tvl }, arbitrum: { tvl: arbitrum }, avax: { tvl: avax }, diff --git a/projects/geode/index.js b/projects/geode/index.js index 714ef1db55f5..397660fc1983 100644 --- a/projects/geode/index.js +++ b/projects/geode/index.js @@ -84,7 +84,6 @@ async function avax(timestamp, ethBlock, chainBlocks) { } module.exports = { - start: 16328353, methodology: "All Staking Derivatives are included to the TVL with relative underlying price. Also counted the Avax within the Dynamic Withdrawal Pools.", doublecounted: true, diff --git a/projects/glif/index.js b/projects/glif/index.js index 92a87f4ea439..2bf96f94b961 100644 --- a/projects/glif/index.js +++ b/projects/glif/index.js @@ -20,7 +20,7 @@ module.exports = { }, }, timetravel: true, - start: 1677628800, // 2023-03-01 + start: '2023-03-01', // 2023-03-01 hallmarks: [ // timestamp, event [1680206490, "Early deposits open"], // 2023-03-30 diff --git a/projects/gnosis/index.js b/projects/gnosis/index.js index d4faac58b025..3067b2421b19 100644 --- a/projects/gnosis/index.js +++ b/projects/gnosis/index.js @@ -4,7 +4,7 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const sdk = require('@defillama/sdk') module.exports = { - start: 1579811423, // Thu, 23 Jan 2020 20:30:23 GMT + start: '2020-01-23', // Thu, 23 Jan 2020 20:30:23 GMT ethereum: { tvl: sdk.util.sumChainTvls([ '0xc59b0e4de5f1248c1140964e0ff287b192407e0c', '0x6f400810b62df8e13fded51be75ff5393eaa841f', diff --git a/projects/goat-tech/index.js b/projects/goat-tech/index.js index 0b27dcca1176..c9486bebe839 100644 --- a/projects/goat-tech/index.js +++ b/projects/goat-tech/index.js @@ -11,7 +11,6 @@ const configs = { module.exports = { methodology: "Total staking", - start: 210487219, arbitrum: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/gogocoin/index.js b/projects/gogocoin/index.js index 107bd1de9e46..db9d4cb22f90 100644 --- a/projects/gogocoin/index.js +++ b/projects/gogocoin/index.js @@ -49,7 +49,7 @@ async function pool2X(...args) { } module.exports = { - start: 1638388550, + start: '2021-12-01', polygon: { staking: stakingX, pool2: pool2X, diff --git a/projects/goku-money/index.js b/projects/goku-money/index.js index b79f9955f870..c19bd78b9836 100644 --- a/projects/goku-money/index.js +++ b/projects/goku-money/index.js @@ -48,7 +48,7 @@ function getCollateralOwnersAndToken() { module.exports = { - start: 1698768000, // 01 Nov 2023 + start: '2023-10-31', // 01 Nov 2023 methodology: "Total locked collateral assets (in ERC-20 form) in ActivePool and DefaultPool, plus total staked GAI in StabilityPool", manta: { tvl: sumTokensExport({ diff --git a/projects/goldlink/index.js b/projects/goldlink/index.js index bfcf494ed2cf..84a749b7bf99 100755 --- a/projects/goldlink/index.js +++ b/projects/goldlink/index.js @@ -2,7 +2,7 @@ const { sumERC4626VaultsExport } = require('../helper/erc4626') module.exports = { methodology: 'Delta neutral farming in GMX Vault', - start: 1716638498, + start: '2024-05-25', doublecounted: true, arbitrum: { tvl: sumERC4626VaultsExport({ vaults: ['0xd8dd54df1a7d2ea022b983756d8a481eea2a382a',], isOG4626: true, }), diff --git a/projects/goober/index.js b/projects/goober/index.js index 1305312929f2..50942a954e2d 100644 --- a/projects/goober/index.js +++ b/projects/goober/index.js @@ -1,7 +1,7 @@ const abis = require("./abis"); module.exports = { - start: 1668410449, + start: '2022-11-14', methodology: "Counts GOO balance of the vault then sums it with the total multiplier reserve based on the vaults pricing of a multiplier in GOO", } diff --git a/projects/grace/index.js b/projects/grace/index.js index 49c598bd597d..5e1b6cdf1fdb 100644 --- a/projects/grace/index.js +++ b/projects/grace/index.js @@ -20,7 +20,6 @@ async function borrowed(api) { module.exports = { methodology: 'Fetches the list of pools and collaterals from the Core and sums up their balances', - start: 14684731, base: { tvl, borrowed }, diff --git a/projects/grafun/index.js b/projects/grafun/index.js index fb73c3eea577..92cbfbc58555 100644 --- a/projects/grafun/index.js +++ b/projects/grafun/index.js @@ -1,7 +1,6 @@ const { sumTokensExport, nullAddress } = require('../helper/unwrapLPs') module.exports = { methodology: "TVL is calculated by aggregating the market value of BNB tokens held within the Token Sale Factory smart contract.", - start: 42593135, bsc: { tvl: sumTokensExport({ owner: '0x8341b19a2A602eAE0f22633b6da12E1B016E6451', token: nullAddress }) } diff --git a/projects/grappa-finance/index.js b/projects/grappa-finance/index.js index 756cf41fd3d4..622c471c1f4d 100644 --- a/projects/grappa-finance/index.js +++ b/projects/grappa-finance/index.js @@ -2,7 +2,7 @@ const ethereumTvl = require('./grappa-ethereum'); module.exports = { ethereum: { - start: 1675468800, + start: '2023-02-04', tvl: ethereumTvl, }, hallmarks: [ diff --git a/projects/gravita-protocol/index.js b/projects/gravita-protocol/index.js index 05686b9570d2..d142e717cfef 100644 --- a/projects/gravita-protocol/index.js +++ b/projects/gravita-protocol/index.js @@ -30,7 +30,7 @@ async function tvl(api) { module.exports = { methodology: "Adds up the total value locked as collateral on the Gravita platform", - start: 1684256400, // Tuesday, May 15, 2023 17:00 GMT + start: '2023-05-16', // Tuesday, May 15, 2023 17:00 GMT }; Object.keys(ADMIN_ADDRESSES).forEach((chain) => { diff --git a/projects/gravity-bridge/index.js b/projects/gravity-bridge/index.js index 4e62bc8123d3..f983b4b967ed 100644 --- a/projects/gravity-bridge/index.js +++ b/projects/gravity-bridge/index.js @@ -58,7 +58,6 @@ const GRAVITY_BRIDGE_CONTRACT = "0xa4108aa1ec4967f8b52220a4f7e94a8201f2d906"; module.exports = { methodology: 'Counts the tokens locked in the Gravity Bridge contract on Ethereum chain.', - start: 13798211, ethereum: { tvl: sumTokensExport({ owner: GRAVITY_BRIDGE_CONTRACT, tokens: erc20Contracts, }), }, diff --git a/projects/groprotocol/index.js b/projects/groprotocol/index.js index 28613b9bb501..28baac7d2446 100644 --- a/projects/groprotocol/index.js +++ b/projects/groprotocol/index.js @@ -115,7 +115,7 @@ module.exports = { avax: { tvl: avaxTvl, }, - start: 1622204347, // 28-05-2021 12:19:07 (UTC) + start: '2021-05-28', // 28-05-2021 12:19:07 (UTC) methodology: "Assets held within the GRO Protocol - either within the PWRD or Vault (GVT) products, or staked in the Gro Protocol pools. Avax TVL is the sum of tokens locked in Gro Labs.", }; diff --git a/projects/gudchain/index.js b/projects/gudchain/index.js index 05acdf355112..54195b8651c2 100644 --- a/projects/gudchain/index.js +++ b/projects/gudchain/index.js @@ -7,7 +7,6 @@ module.exports = { ethereum: { tvl: sumTokensExport({ owner: launchBridge, - start: 20203960, tokens: [ ADDRESSES.null, ADDRESSES.ethereum.STETH, diff --git a/projects/gullnetwork/index.js b/projects/gullnetwork/index.js index b48859486b57..5bb2792497d6 100644 --- a/projects/gullnetwork/index.js +++ b/projects/gullnetwork/index.js @@ -25,7 +25,7 @@ const tvl = async (api) => { } module.exports = { - start: 1710844331, // May-17-2024 12:45:31 PM +UTC + start: '2024-03-19', // May-17-2024 12:45:31 PM +UTC methodology: 'GullNetwork TVL including total values of assets staked in our staking vaults, and assets in the liquidity pool.', } diff --git a/projects/hai/index.js b/projects/hai/index.js index 2aec69217440..9a2ba44a3caa 100644 --- a/projects/hai/index.js +++ b/projects/hai/index.js @@ -4,7 +4,7 @@ const config = { } module.exports = { - start: 1709780769, // globalDebtCeiling raised > 0 + start: '2024-03-07', // globalDebtCeiling raised > 0 }; Object.keys(config).forEach(chain => { diff --git a/projects/harmonix/index.js b/projects/harmonix/index.js index f0a7bb5b75a7..aff77b0e0e59 100644 --- a/projects/harmonix/index.js +++ b/projects/harmonix/index.js @@ -1,6 +1,6 @@ module.exports = { misrepresentedTokens: true, - start: 1709251200, // Friday, March 1, 2024 12:00:00 AM + start: '2024-03-01', // Friday, March 1, 2024 12:00:00 AM methodology: "Aggregates total value of each Harmonix vault" } diff --git a/projects/hectagon/index.js b/projects/hectagon/index.js index e4c49b25df1b..5f616dac6cf5 100644 --- a/projects/hectagon/index.js +++ b/projects/hectagon/index.js @@ -12,7 +12,6 @@ const HECTA_BUSD_ADDRESS = "0xc7cee4cea7c76e11e9f5e5e5cbc5e3b798a1c4d0"; module.exports = { methodology: "Total Value Lock in Hectagon protocol is calculated by sum of: Treasury locked value", - start: 20195418, bsc: { tvl: (_, _b, {[chain]: block}) => sumTokens2({ chain, block, owner: TREASURY_ADDRESS, tokens: [HECTA_BUSD_ADDRESS, BUSD_ADDRESS,]}), staking: staking(gHECTA, HECTA_ADDRESS, chain), diff --git a/projects/hedgefarm/index.js b/projects/hedgefarm/index.js index b207d74b5f57..badd044ae197 100644 --- a/projects/hedgefarm/index.js +++ b/projects/hedgefarm/index.js @@ -27,7 +27,6 @@ async function tvl(api) { module.exports = { methodology: 'Gets the total balance in the Alpha #1 contract from IOU total supply and price per share and in the Smart Farmooor (Alpha #2) from the total balance.', - start: 21220270, avax: { tvl, } diff --git a/projects/hodlify/index.js b/projects/hodlify/index.js index 563355f22450..0a7450f09200 100644 --- a/projects/hodlify/index.js +++ b/projects/hodlify/index.js @@ -51,7 +51,7 @@ const tvl = async (api) => { module.exports = { doublecounted: true, - start: 1693929600, // Tue Sep 05 2023 16:00:00 GMT+0000 + start: '2023-09-05', // Tue Sep 05 2023 16:00:00 GMT+0000 methodology: 'Hodlify TVL including total values of assets deposited in other protocols, and the petty cash in our earning vaults.', arbitrum: { tvl }, optimism: { tvl }, diff --git a/projects/huma/index.js b/projects/huma/index.js index fd27dc2d2253..a174d7192bdf 100644 --- a/projects/huma/index.js +++ b/projects/huma/index.js @@ -14,7 +14,7 @@ const config = { module.exports = { methodology: 'sum all tvls from all pools', - start: 1716248276, //2023-05-01 + start: '2024-05-21', //2023-05-01 } Object.keys(config).forEach(chain => { diff --git a/projects/hydt/index.js b/projects/hydt/index.js index 0b916251dffc..977fc48e64ab 100644 --- a/projects/hydt/index.js +++ b/projects/hydt/index.js @@ -42,7 +42,7 @@ async function staking(api) { module.exports = { misrepresentedTokens: true, methodology: "Retrieving the reserve BNB balance for TVL. Retrieving the staked amounts for HYDT from the earn (HYDT staking) contract and the LP Tokens from the farm contract for staking.", - start: 1693763345, + start: '2023-09-03', bsc: { tvl, staking, diff --git a/projects/illuminex/index.js b/projects/illuminex/index.js index e4f0b39cd6e6..33f62411553b 100644 --- a/projects/illuminex/index.js +++ b/projects/illuminex/index.js @@ -7,7 +7,7 @@ const ixToken = "0x08Fe02Da45720f754e6FCA338eC1286e860d2d2f"; module.exports = { methodology: "Counts liquidity on illumineX Exchange, as well as IX token single staking together with liquidity mining locked LP", misrepresentedTokens: true, - start: 1706475600, + start: '2024-01-28', sapphire: { tvl: getUniTVL({ factory: '0x045551B6A4066db850A1160B8bB7bD9Ce3A2B5A5', useDefaultCoreAssets: true,}), staking: stakingPricedLP(stakingFarmingContractAddress, ixToken, "sapphire", "0xf0f7c4e8edb9edcbe200a4eaec384e8a48fc7815", "oasis-network", true), diff --git a/projects/increment-protocol/index.js b/projects/increment-protocol/index.js index 0d30a34cf2fa..108d63ca2a0a 100644 --- a/projects/increment-protocol/index.js +++ b/projects/increment-protocol/index.js @@ -4,5 +4,5 @@ const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { methodology: "Counting the value of all tokens locked in the contracts to be used as collateral to trade or provide liquidity.", era: { tvl: sumTokensExport({ owner: '0xfc840c55b791a1dbaf5c588116a8fc0b4859d227', tokens: [ADDRESSES.era.USDC] }) }, - start: 1710004200 // 2024-03-09 09:10 + start: '2024-03-09' // 2024-03-09 09:10 } \ No newline at end of file diff --git a/projects/insuredefi/index.js b/projects/insuredefi/index.js index ab7335ad8e4e..d58c575df8f2 100644 --- a/projects/insuredefi/index.js +++ b/projects/insuredefi/index.js @@ -36,7 +36,7 @@ async function tvl(timestamp, block) { module.exports = { - start: 1513566671, // 2020/10/21 6:34:47 (+UTC) + start: '2017-12-18', // 2020/10/21 6:34:47 (+UTC) ethereum: { tvl } }; diff --git a/projects/invar-finance/index.js b/projects/invar-finance/index.js index 5ebb73cc6654..7b1f51ad20a8 100644 --- a/projects/invar-finance/index.js +++ b/projects/invar-finance/index.js @@ -10,5 +10,4 @@ module.exports = { tvl: sumTokensExport({ owner:INVARIA2222, token: ADDRESSES.ethereum.USDC}), }, deadFrom: '2023-11-12', - start: 15389792, }; diff --git a/projects/inverse-finance-firm/index.js b/projects/inverse-finance-firm/index.js index 3ea79f394346..cb1ee47c3005 100644 --- a/projects/inverse-finance-firm/index.js +++ b/projects/inverse-finance-firm/index.js @@ -50,6 +50,6 @@ module.exports = { [1707177600, "Launch of sDOLA"], [1718236800, "CRV liquidation"] ], - start: 1670701200, // Dec 10 2022 + start: '2022-12-10', // Dec 10 2022 ethereum: { tvl } }; diff --git a/projects/inverse/index.js b/projects/inverse/index.js index bc6051005421..c4e11e6c61fb 100644 --- a/projects/inverse/index.js +++ b/projects/inverse/index.js @@ -51,6 +51,6 @@ module.exports = { [1648771200, "INV price hack"], [1655380800, "Inverse Frontier Deprecated"] ], - start: 1607731200, // Dec 12 2020 00:00:00 GMT+0000 + start: '2020-12-12', // Dec 12 2020 00:00:00 GMT+0000 ethereum: { tvl } }; diff --git a/projects/ion-dao/index.js b/projects/ion-dao/index.js index f60d837fa3a7..1beb1eee81fc 100644 --- a/projects/ion-dao/index.js +++ b/projects/ion-dao/index.js @@ -11,7 +11,6 @@ async function tvl() { module.exports = { timetravel: false, // need to add code to fetch osmosis block - start: 5887991, osmosis: { tvl, }, diff --git a/projects/ip/index.js b/projects/ip/index.js index f9f78c593fd5..1844ce849030 100644 --- a/projects/ip/index.js +++ b/projects/ip/index.js @@ -83,7 +83,6 @@ async function op_tvl(api) { } module.exports = { - start: 14962974, ethereum: { tvl: eth_tvl }, diff --git a/projects/ironbank/index.js b/projects/ironbank/index.js index d1c485f53aa4..ece02f5062b6 100644 --- a/projects/ironbank/index.js +++ b/projects/ironbank/index.js @@ -1,7 +1,7 @@ const { compoundExports2 } = require("../helper/compound"); module.exports = { - start: 1599552000, // 09/08/2020 @ 8:00am (UTC) + start: '2020-09-08', // 09/08/2020 @ 8:00am (UTC) ethereum: compoundExports2({ comptroller: '0xAB1c342C7bf5Ec5F02ADEA1c2270670bCa144CbB', blacklistedTokens: [ diff --git a/projects/ithaca/index.js b/projects/ithaca/index.js index 201b6181ee7e..33eb0d72feb9 100644 --- a/projects/ithaca/index.js +++ b/projects/ithaca/index.js @@ -13,7 +13,6 @@ module.exports = { timetravel: true, misrepresentedTokens: false, methodology: 'counts the number of WETH and USDC in Ithaca Fundlock contract', - start: 176036233, arbitrum: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/ithil/index.js b/projects/ithil/index.js index 8f083e0f5532..aaf2d8765688 100644 --- a/projects/ithil/index.js +++ b/projects/ithil/index.js @@ -19,7 +19,6 @@ const config = { } module.exports = { methodology: 'We calculate the TVL as the sum of (deposits + loans + locked profits - losses) for each vault available', - start: 171730567, hallmarks: [ [1691649008, "private mainnet launch"] ], diff --git a/projects/juicebox-v1/index.js b/projects/juicebox-v1/index.js index 693c5e83697f..8f9403b7da84 100644 --- a/projects/juicebox-v1/index.js +++ b/projects/juicebox-v1/index.js @@ -11,7 +11,7 @@ module.exports = { methodology: "Count the value of the Ether in the Juicebox V1 terminals", ethereum: { - start: 1626369243, // 2021-06-15 17:14:03 (UTC) + start: '2021-07-15', // 2021-06-15 17:14:03 (UTC) tvl: async (_, block) => sumTokens2({ block, tokensAndOwners: [ diff --git a/projects/juicebox-v2/index.js b/projects/juicebox-v2/index.js index 8ccfde45aafe..f9bf57d75960 100644 --- a/projects/juicebox-v2/index.js +++ b/projects/juicebox-v2/index.js @@ -10,7 +10,7 @@ module.exports = { methodology: "Count the value of the Ether in the Juicebox V2 terminal", ethereum: { - start: 1653853643, // 2022-05-29 19:47:23 (UTC) + start: '2022-05-29', // 2022-05-29 19:47:23 (UTC) tvl: async (_, block) => sumTokens2({ block, tokensAndOwners: [ diff --git a/projects/juicebox-v3/index.js b/projects/juicebox-v3/index.js index 552146788079..b109c4c410f8 100644 --- a/projects/juicebox-v3/index.js +++ b/projects/juicebox-v3/index.js @@ -13,7 +13,7 @@ module.exports = { methodology: "Count the value of the Ether in the Juicebox V3 terminals", ethereum: { - start: 1663679075, // 2022-10-20 15:04:35(UTC) + start: '2022-09-20', // 2022-10-20 15:04:35(UTC) tvl: async (_, block) => sumTokens2({ block, tokensAndOwners: [ diff --git a/projects/kaiafun/index.js b/projects/kaiafun/index.js index 9d220060dad0..c045193c9223 100644 --- a/projects/kaiafun/index.js +++ b/projects/kaiafun/index.js @@ -4,7 +4,6 @@ const { sumTokensExport } = require('../helper/unwrapLPs'); const WKLAY = '0x19aac5f612f524b754ca7e7c41cbfa2e981a4432'; module.exports.klaytn = { - start: 165171284, methodology: 'TVL counts Canonical WKLAY coins in KaiaFun\'s Core Contract.', tvl: sumTokensExport({ owners: ["0x080f8b793fe69fe9e65b5ae17b10f987c95530bf"], diff --git a/projects/keeper-dao/index.js b/projects/keeper-dao/index.js index 0220bd0596ec..6b1b9b7fcd3b 100644 --- a/projects/keeper-dao/index.js +++ b/projects/keeper-dao/index.js @@ -142,7 +142,7 @@ async function tvl(api) { } module.exports = { - start: 1611991703, // 01/30/2021 @ 07:28:23 AM +UTC + start: '2021-01-30', // 01/30/2021 @ 07:28:23 AM +UTC ethereum: { tvl } diff --git a/projects/kewl/index.js b/projects/kewl/index.js index 2a18513e6055..0b7693686cc0 100644 --- a/projects/kewl/index.js +++ b/projects/kewl/index.js @@ -2,7 +2,7 @@ const { getUniTVL } = require("../helper/unknownTokens"); module.exports = { methodology: "We count liquidity of all paris through Factory Contract and Pools (single tokens) seccions through Factory Contract.", - start: 1701478462, //Dec-2-2023 3:54:26 PM +UTC + start: '2023-12-02', //Dec-2-2023 3:54:26 PM +UTC misrepresentedTokens: true, chz: { diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index 057ded5fa8fa..a48f89d696a8 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -11,7 +11,7 @@ const bsquared_owners = ["0xA2E2F3726DF754C1848C8fd1CbeA6aAFF84FC5B2", "0x1EbEd4 const base_owners = ["0x43E3E6FFb2E363E64cD480Cbb7cd0CF47bc6b477", "0x7BC8D56cC78cF467C7230B77De0fcBDea9ac44cE","0xdf5ACC616cD3ea9556EC340a11B54859a393ebBB"]; module.exports = { - start: 1690971144, + start: '2023-08-02', bsc: { tvl: sumTokensExport({ owners, tokens: [ ADDRESSES.bsc.USDT, ADDRESSES.ethereum.FDUSD, ADDRESSES.scroll.STONE, ADDRESSES.bsc.WBNB, //WBNB diff --git a/projects/lavarage/index.js b/projects/lavarage/index.js index 1c6db59d14fa..5f204743a399 100644 --- a/projects/lavarage/index.js +++ b/projects/lavarage/index.js @@ -10,8 +10,8 @@ const TOKEN_PROGRAM_ID = new PublicKey("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ const SPL_ASSOCIATED_TOKEN_PROGRAM_ID = new PublicKey("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"); const edgeCaseTimestamps = [ - { start: 1713880000, end: 1713885480 }, // 10:32 AM - 10:58 AM ET on April 23, 2024 - { start: 1713874500, end: 1713876060 }, // 8:15 AM - 8:41 AM ET on April 23, 2024 + { start: '2024-04-23', end: 1713885480 }, // 10:32 AM - 10:58 AM ET on April 23, 2024 + { start: '2024-04-23', end: 1713876060 }, // 8:15 AM - 8:41 AM ET on April 23, 2024 ]; const idleAccount = new PublicKey("bkhAyULeiXwju7Zmy4t3paDHtVZjNaofVQ4VgEdTWiE"); diff --git a/projects/lien/index.js b/projects/lien/index.js index ff7c6e0b8959..f311d8a05cb7 100644 --- a/projects/lien/index.js +++ b/projects/lien/index.js @@ -27,6 +27,6 @@ async function tvl(timestamp, block) { } module.exports = { - start: 1619798400, // 30/4/2021 @ 04:00PM (UTC) + start: '2021-04-30', // 30/4/2021 @ 04:00PM (UTC) ethereum: { tvl } }; diff --git a/projects/lightning-network/index.js b/projects/lightning-network/index.js index 6aeb3aa7d32f..179cc4a6d774 100644 --- a/projects/lightning-network/index.js +++ b/projects/lightning-network/index.js @@ -53,7 +53,7 @@ async function tvl({ timestamp }) { } module.exports = { - start: 1516406400, + start: '2018-01-20', bitcoin: { tvl }, }; diff --git a/projects/liqee/index.js b/projects/liqee/index.js index 624c99e19c66..795ccdb36469 100644 --- a/projects/liqee/index.js +++ b/projects/liqee/index.js @@ -127,5 +127,5 @@ module.exports = { bsc: { tvl: bsc }, - start: 1629776276, // Aug-24-2021 11:37:56 AM +UTC + start: '2021-08-24', // Aug-24-2021 11:37:56 AM +UTC } diff --git a/projects/liquidity-slicing/index.js b/projects/liquidity-slicing/index.js index 4737eeb06712..0928513e44ea 100644 --- a/projects/liquidity-slicing/index.js +++ b/projects/liquidity-slicing/index.js @@ -50,7 +50,6 @@ async function tvl(api) { module.exports = { arbitrum: { - start: 224198345, tvl, } } diff --git a/projects/liquity/index.js b/projects/liquity/index.js index 2cdcb367d91f..835ba9c1ca54 100644 --- a/projects/liquity/index.js +++ b/projects/liquity/index.js @@ -7,7 +7,7 @@ const STAKING_ADDRESS = "0x4f9Fbb3f1E99B56e0Fe2892e623Ed36A76Fc605d"; const LQTY_ADDRESS = "0x6DEA81C8171D0bA574754EF6F8b412F2Ed88c54D" module.exports = { - start: 1617607296, + start: '2021-04-05', ethereum: { tvl: getLiquityTvl(TROVE_MANAGER_ADDRESS), staking: staking(STAKING_ADDRESS, LQTY_ADDRESS) diff --git a/projects/llamalend/index.js b/projects/llamalend/index.js index 42a4f8ebdf93..47a846a397c7 100644 --- a/projects/llamalend/index.js +++ b/projects/llamalend/index.js @@ -37,7 +37,7 @@ async function tvl(api) { } module.exports = { - start: 1666638251, + start: '2022-10-24', methodology: 'TVL is calculated by adding up all the ETH in the pools and the totalBorrowed of every pool', ethereum: { tvl: tvl, diff --git a/projects/lobster-protocol/index.js b/projects/lobster-protocol/index.js index f136ccff46ab..140567d5740a 100644 --- a/projects/lobster-protocol/index.js +++ b/projects/lobster-protocol/index.js @@ -18,7 +18,7 @@ async function tvl(api) { module.exports = { misrepresentedTokens: true, - start: 1704067199, // Sunday 31 December 2023 23:59:59 + start: '2024-01-01', // Sunday 31 December 2023 23:59:59 methodology: "Aggregates total value of Lobster protocol vaults on Arbitrum", arbitrum: { diff --git a/projects/loopfi/index.js b/projects/loopfi/index.js index 496e556f1674..9def15476cac 100644 --- a/projects/loopfi/index.js +++ b/projects/loopfi/index.js @@ -36,7 +36,7 @@ const tokensYieldnest = { module.exports = { methodology: "Counts the number of WETH, WBTC and LRT tokens in the LoopFi Prelaunch Contracts in Ethereum and Scroll networks.", - start: 1718390875, + start: '2024-06-14', ethereum: { tvl: sumTokensExport({ ownerTokens: [[Object.values(tokens), LOOP_PRELAUNCH], [Object.values(tokensBtc), LOOP_PRELAUNCH_BTC], [Object.values(tokensYieldnest), LOOP_PRELAUNCH_YNETH]], diff --git a/projects/louverture/index.js b/projects/louverture/index.js index 5dd697417280..9d39b7ee95f0 100644 --- a/projects/louverture/index.js +++ b/projects/louverture/index.js @@ -21,7 +21,7 @@ async function staking(timestamp, ethBlock, chainBlocks) { module.exports = { - start: 1639872000, // 19/12/2021 @ 00:00am (UTC) + start: '2021-12-19', // 19/12/2021 @ 00:00am (UTC) avax:{ staking, tvl: async()=>({}) diff --git a/projects/love/index.js b/projects/love/index.js index e0587f6593ac..ec0391bcc385 100644 --- a/projects/love/index.js +++ b/projects/love/index.js @@ -2,7 +2,6 @@ module.exports = { methodology: "The liquidity on these three pools + the tokens staked on all three chains (PulseChain, Ethereum, and Binance Smart Chain)", - start: 1000235, }; const config = { diff --git a/projects/lsdx/index.js b/projects/lsdx/index.js index 9e6484c7b847..fdc0114b3d6b 100644 --- a/projects/lsdx/index.js +++ b/projects/lsdx/index.js @@ -24,7 +24,6 @@ async function tvl(api) { } module.exports = { - start: 16831303, ethereum: { tvl, pool2: staking(['0x1D31755E03119311c7F00ae107874dddEC7573f3', '0xE05630Da82604591F002b61F7116429CfDC4B542'], LSD_LPs), diff --git a/projects/lucidly/index.js b/projects/lucidly/index.js index 2934990891b3..34df9999c12a 100644 --- a/projects/lucidly/index.js +++ b/projects/lucidly/index.js @@ -13,6 +13,6 @@ async function tvl(api) { module.exports = { - start: 1693971707, + start: '2023-09-06', ethereum: { tvl } }; diff --git a/projects/lumin-finance/index.js b/projects/lumin-finance/index.js index c39a9bc6ff98..16a8afa88130 100644 --- a/projects/lumin-finance/index.js +++ b/projects/lumin-finance/index.js @@ -41,7 +41,6 @@ async function staking(api) { module.exports = { methodology: 'Gets v1 total deposits, and v2 staking statistics on-chain.', - start: 194344665, arbitrum: { staking, tvl, borrowed, diff --git a/projects/lusd-chickenbonds/index.js b/projects/lusd-chickenbonds/index.js index d93510fdcd75..d7caf1c27c64 100644 --- a/projects/lusd-chickenbonds/index.js +++ b/projects/lusd-chickenbonds/index.js @@ -23,7 +23,6 @@ async function tvl(_, block) { module.exports = { methodology: 'counts the amount of LUSD tokens in the 3 buckets of the LUSD ChickenBonds protocol.', - start: 15674057, ethereum: { tvl, }, diff --git a/projects/lybra-v2/index.js b/projects/lybra-v2/index.js index c8acd6af6f91..18d8cdd058ac 100644 --- a/projects/lybra-v2/index.js +++ b/projects/lybra-v2/index.js @@ -8,7 +8,6 @@ const wbETHvault = "0xB72dA4A9866B0993b9a7d842E5060716F74BF262"; const rETHvault = "0x090B2787D6798000710a8e821EC6111d254bb958" module.exports = { - start: 17990141, ethereum: { tvl: sumTokensExport({ tokensAndOwners2: [[ADDRESSES.ethereum.STETH, ADDRESSES.ethereum.WSTETH, "0xa2e3356610840701bdf5611a53974510ae27e2e1", ADDRESSES.ethereum.RETH], [stETHvault, wstETHvault, wbETHvault, rETHvault]] }), } diff --git a/projects/lybra/index.js b/projects/lybra/index.js index 848b7bf64d0f..bee2811b23f3 100644 --- a/projects/lybra/index.js +++ b/projects/lybra/index.js @@ -5,7 +5,7 @@ const { sumTokensExport } = require("../helper/unwrapLPs"); const LYBRA_CONTRACT = "0x97de57eC338AB5d51557DA3434828C5DbFaDA371"; module.exports = { - start: 1682265600, + start: '2023-04-23', ethereum: { tvl: sumTokensExport({ owner: LYBRA_CONTRACT, tokens: [ADDRESSES.ethereum.STETH]}), } diff --git a/projects/lyve/index.js b/projects/lyve/index.js index b3dc27950d84..ce53e42837b8 100644 --- a/projects/lyve/index.js +++ b/projects/lyve/index.js @@ -15,7 +15,7 @@ async function tvl(api) { module.exports = { methodology: "Adds up the total value locked as collateral on the Lyve platform", - start: 1699459200, + start: '2023-11-08', }; Object.keys(ADMIN_ADDRESSES).forEach(chain => { diff --git a/projects/maker-rwa/index.js b/projects/maker-rwa/index.js index e1f80c3b05f6..33a025a5e064 100644 --- a/projects/maker-rwa/index.js +++ b/projects/maker-rwa/index.js @@ -72,7 +72,7 @@ const tvl = async (api) => { module.exports = { methodology: `Counts all the tokens being used as collateral of CDPs. On the technical level, we get all the collateral tokens by fetching events, get the amounts locked by calling balanceOf() directly, unwrap any uniswap LP tokens and then get the price of each token from coingecko`, - start: 1513566671, // 12/18/2017 @ 12:00am (UTC) + start: '2017-12-18', // 12/18/2017 @ 12:00am (UTC) ethereum: { tvl }, diff --git a/projects/maker/index.js b/projects/maker/index.js index d50414d7c735..c78a981db228 100644 --- a/projects/maker/index.js +++ b/projects/maker/index.js @@ -93,7 +93,7 @@ async function unwrapGunis({ api, toa, }) { module.exports = { methodology: `Counts all the tokens being used as collateral of CDPs. On the technical level, we get all the collateral tokens by fetching events, get the amounts locked by calling balanceOf() directly, unwrap any uniswap LP tokens and then get the price of each token from coingecko`, - start: 1513566671, // 12/18/2017 @ 12:00am (UTC) + start: '2017-12-18', // 12/18/2017 @ 12:00am (UTC) ethereum: { tvl }, diff --git a/projects/mangrove/index.js b/projects/mangrove/index.js index 4063ddd38040..476dbded11e0 100644 --- a/projects/mangrove/index.js +++ b/projects/mangrove/index.js @@ -55,7 +55,7 @@ module.exports = { misrepresentedTokens: false, methodology: "TVL is calculated by getting the total promised liquidity on the orderbook on a specific block.", - start: 1708992000, + start: '2024-02-27', }; for (const chain in mgvReaders) { diff --git a/projects/meme-dollar/index.js b/projects/meme-dollar/index.js index ea585d4dc224..7d1df3a40d48 100644 --- a/projects/meme-dollar/index.js +++ b/projects/meme-dollar/index.js @@ -10,7 +10,7 @@ const PINA_MEME_LP_CONTRACT = "0x713afa49478f1a33c3194ff65dbf3c8058406670"; module.exports = { methodology: "counts the number of tokens in Pina pool", - start: 1673928000, + start: '2023-01-17', ethereum: { tvl: () => 0, staking: staking( diff --git a/projects/merlin/index.js b/projects/merlin/index.js index d668ed0d98a1..b01220edeaa7 100644 --- a/projects/merlin/index.js +++ b/projects/merlin/index.js @@ -1,5 +1,5 @@ module.exports = { - start: 1682899200, + start: '2023-05-01', era: { tvl: () => 0, }, diff --git a/projects/metastreet-v2/index.js b/projects/metastreet-v2/index.js index d8c8c0c05d70..67291bb75638 100644 --- a/projects/metastreet-v2/index.js +++ b/projects/metastreet-v2/index.js @@ -70,5 +70,4 @@ module.exports = { }, methodology: "TVL is calculated by summing the value of token balances and NFTs across all MetaStreet pools. Total borrowed is calculated by subtracting the tokens available from the total value of all liquidity nodes across all pools.", - start: 17497132, // Block number of PoolFactory creation }; diff --git a/projects/metastreet/index.js b/projects/metastreet/index.js index 7c0b8877d84a..46ca4656aea8 100644 --- a/projects/metastreet/index.js +++ b/projects/metastreet/index.js @@ -90,5 +90,4 @@ module.exports = { borrowed: getMetaStreetTVL(true), }, methodology: 'TVL is calculated by getting the ERC20 balance of each vault, which counts tokens deposited into contracts for earning yield but not the value of any NFT loan note collateral the vault has purchased. Borrowed tokens are also not counted towards TVL.', - start: 14878205 }; \ No newline at end of file diff --git a/projects/metronome/index.js b/projects/metronome/index.js index 93f566c8cfae..13da3f99cbf0 100644 --- a/projects/metronome/index.js +++ b/projects/metronome/index.js @@ -5,7 +5,7 @@ const met = '0x2Ebd53d035150f328bd754D6DC66B99B0eDB89aa'; const proceeds = '0x68c4b7d05fae45bcb6192bb93e246c77e98360e1'; module.exports = { - start: 1527076766, // block 5659904 + start: '2018-05-23', // block 5659904 hallmarks: [ [1661257318,"Metronome V1 Sunset"] ], diff --git a/projects/milkomeda-djed/index.js b/projects/milkomeda-djed/index.js index 499b345b1e31..105dc0cfa677 100644 --- a/projects/milkomeda-djed/index.js +++ b/projects/milkomeda-djed/index.js @@ -9,7 +9,6 @@ async function tvl(api) { module.exports = { methodology: 'The TVL of each Djed deployment on Milkomeda C1.', milkomeda: { - start: 10440400, tvl, }, }; diff --git a/projects/milkyway/index.js b/projects/milkyway/index.js index d1884ee3f22d..f88570fc88ae 100644 --- a/projects/milkyway/index.js +++ b/projects/milkyway/index.js @@ -3,7 +3,7 @@ const { compoundExports } = require("../helper/compound"); module.exports = { deadFrom: '2023-12-15', timetravel: false, // milkomeda api's for staked coins can't be queried at historical points - start: 1599552000, // 09/08/2020 @ 8:00am (UTC) + start: '2020-09-08', // 09/08/2020 @ 8:00am (UTC) milkomeda: compoundExports("0x0Dd4E2B7E0E8a2Cd1258a9023D3a5062381554Cf"), }; diff --git a/projects/minerPepe/index.js b/projects/minerPepe/index.js index 60b718f9800a..e2bf7b8abba6 100644 --- a/projects/minerPepe/index.js +++ b/projects/minerPepe/index.js @@ -6,7 +6,6 @@ const TOKENS = ["0x6d306C2C9CD931160763D99376a68C14D33DC954"] module.exports = { methodology: "MinerPepe the first mining PEPE Meme Coin on Binance Smart Chain. Miners enjoy 12% daily returns in BNB and MPEPE tokens", - start: 35011373, bsc: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/mobius/index.js b/projects/mobius/index.js index dab40934c357..3c5873c7ebda 100644 --- a/projects/mobius/index.js +++ b/projects/mobius/index.js @@ -230,6 +230,5 @@ async function tvl(_, _b, {[chain]: block }) { } module.exports = { - start: 8606077, // January 19, 2021 11:51:30 AM celo: { tvl } }; diff --git a/projects/mojitoswap/index.js b/projects/mojitoswap/index.js index d8a21cd90166..47c140bb5f38 100644 --- a/projects/mojitoswap/index.js +++ b/projects/mojitoswap/index.js @@ -13,5 +13,4 @@ module.exports = { tvl: getUniTVL({ useDefaultCoreAssets: true, factory: '0x79855a03426e15ad120df77efa623af87bd54ef3', }), staking: stakings([masterchefAddress, masterchefV2Address], mjtAddress), }, - start: 3000000, }; diff --git a/projects/mole/index.js b/projects/mole/index.js index 3fe52bf72bca..acc470cf84e8 100644 --- a/projects/mole/index.js +++ b/projects/mole/index.js @@ -24,7 +24,7 @@ async function suiTvl() { // run command: node test.js projects/mole/index.js module.exports = { timetravel: false, - start: 1653840000, + start: '2022-05-29', // avax: { // tvl: avaxTvl, // staking: avaxStaking, diff --git a/projects/monroeprotocol/index.js b/projects/monroeprotocol/index.js index 1e80fd1868b5..33cdc7bd7854 100644 --- a/projects/monroeprotocol/index.js +++ b/projects/monroeprotocol/index.js @@ -59,7 +59,7 @@ async function tvl(api) { module.exports = { methodology: "Adds up the total value locked as collateral in Monroe vaults", - start: 1710288000, // March 13, 2024 00:00 GMT + start: '2024-03-13', // March 13, 2024 00:00 GMT hallmarks: [ [1722000000, "V2 Launch"] ], diff --git a/projects/monster/index.js b/projects/monster/index.js index 848b287c2795..54c3631c7849 100644 --- a/projects/monster/index.js +++ b/projects/monster/index.js @@ -10,7 +10,6 @@ const LP_STAKING_2 = "0xc13926C5CB2636a29381Da874b1e2686163DC226"; module.exports = { methodology: "counts the number of MST tokens in the ve contract and the pairs in the staking pool", - start: 22569995, fantom: { tvl: async () => ({}), pool2: pool2([LP_STAKING_1, LP_STAKING_2], [LP_POOL_1, LP_POOL_2]), diff --git a/projects/moret/index.js b/projects/moret/index.js index 19ab8d9dd683..10751b6868a0 100644 --- a/projects/moret/index.js +++ b/projects/moret/index.js @@ -13,7 +13,7 @@ const tvlTokens = [ADDRESSES.polygon.WETH_1, // WETH module.exports = { methodology: 'counts all USDC/WBTC/WETH/GHST balances of market contracts.', - start: 1677225600, // 24 Feb 2023 08:00:00 UTC + start: '2023-02-24', // 24 Feb 2023 08:00:00 UTC polygon: { tvl: sumTokensExport({ owners: markets, tokens: tvlTokens, }), } diff --git a/projects/mountain-protocol/index.js b/projects/mountain-protocol/index.js index c17297e731a9..644c20547c2d 100644 --- a/projects/mountain-protocol/index.js +++ b/projects/mountain-protocol/index.js @@ -20,7 +20,6 @@ async function tvl(api) { module.exports = { misrepresentedTokens: true, methodology: "Calculates the total USDM Supply", - start: 16685700, ethereum: { tvl, }, diff --git a/projects/mstable/index.js b/projects/mstable/index.js index 9ddee7f25a9e..011e5e45260e 100644 --- a/projects/mstable/index.js +++ b/projects/mstable/index.js @@ -127,7 +127,7 @@ const ethereumTvl = tvlForChain('ethereum') const polygonTvl = tvlForChain('polygon') module.exports = { - start: 1590624000, // May-28-2020 00:00:00 + start: '2020-05-28', // May-28-2020 00:00:00 polygon: { tvl: polygonTvl, }, diff --git a/projects/nayms/index.js b/projects/nayms/index.js index de6cd8b4111f..f2cf054f719e 100644 --- a/projects/nayms/index.js +++ b/projects/nayms/index.js @@ -21,7 +21,7 @@ const ownerBase = "0x546Fb1621CF8C0e8e3ED8E3508b7c5100ADdBc03"; module.exports = { methodology: "Sum assets on Nayms", - start: 1681990619, // Thu Apr 20 13:36:59 2023 GMT + start: '2023-04-20', // Thu Apr 20 13:36:59 2023 GMT hallmarks: [[1681990619, "Nayms V3 Launch"]], ethereum: { tvl: sumTokensExport({ owner, tokens }), diff --git a/projects/neptune-mutual/index.js b/projects/neptune-mutual/index.js index 87fdb23f5b2a..41dbb0d85396 100644 --- a/projects/neptune-mutual/index.js +++ b/projects/neptune-mutual/index.js @@ -39,7 +39,7 @@ async function tvl(api) { module.exports = { methodology: "TVL consists of the total liquidity available in the cover pools", - start: 1667260800, // Nov 01 2022 @ 12:00am (UTC) + start: '2022-11-01', // Nov 01 2022 @ 12:00am (UTC) ethereum: { tvl }, arbitrum: { tvl }, bsc: { tvl }, diff --git a/projects/nerve/index.js b/projects/nerve/index.js index 2a3aba64d53b..1c1d957045fc 100644 --- a/projects/nerve/index.js +++ b/projects/nerve/index.js @@ -24,7 +24,7 @@ const ownerTokens = [ module.exports = { misrepresentedTokens: true, - start: 1614556800, // March 1, 2021 00:00 AM (UTC) + start: '2021-03-01', // March 1, 2021 00:00 AM (UTC) bsc:{ tvl: sumTokensExport({ ownerTokens }), staking:staking(xnrvAddress, nrv) diff --git a/projects/nexus/index.js b/projects/nexus/index.js index 7a63c3a30703..2e46140c939b 100644 --- a/projects/nexus/index.js +++ b/projects/nexus/index.js @@ -9,6 +9,6 @@ async function tvl(api) { module.exports = { misrepresentedTokens: true, - start: 1558569600, // 05/23/2019 @ 12:00am (UTC) + start: '2019-05-23', // 05/23/2019 @ 12:00am (UTC) ethereum: { tvl } } diff --git a/projects/nomad/index.js b/projects/nomad/index.js index a9b18f894b41..6c7b0dfc7f97 100644 --- a/projects/nomad/index.js +++ b/projects/nomad/index.js @@ -87,6 +87,5 @@ module.exports = { [1659312000,"trusted root exploit"] ], methodology: 'counts the total amount of assets locked in the Nomad token bridge.', - start: 13983843, ...chainExports(tvl, Object.keys(HOME_CHAINS)) }; diff --git a/projects/nsure/index.js b/projects/nsure/index.js index 7c2172a23d55..5f6fcc9ef851 100644 --- a/projects/nsure/index.js +++ b/projects/nsure/index.js @@ -101,7 +101,7 @@ async function tvl(timestamp, block) { } module.exports = { - start: 1619081169, // Thu Apr 22 2021 16:46:35 + start: '2021-04-22', // Thu Apr 22 2021 16:46:35 ethereum: { tvl } }; diff --git a/projects/olympus/index.js b/projects/olympus/index.js index f3713bd1ac6a..7db910491fc3 100644 --- a/projects/olympus/index.js +++ b/projects/olympus/index.js @@ -176,7 +176,7 @@ async function ownTokens(api) { } module.exports = { - start: 1616569200, // March 24th, 2021 + start: '2021-03-24', // March 24th, 2021 timetravel: false, methodology: "TVL is the sum of the value of all assets held by the treasury (excluding pTokens). Please visit https://app.olympusdao.finance/#/dashboard for more info.", diff --git a/projects/onsenswap/index.js b/projects/onsenswap/index.js index 2e76f4eeae30..3aa9ea655a0d 100644 --- a/projects/onsenswap/index.js +++ b/projects/onsenswap/index.js @@ -2,7 +2,7 @@ const { getUniTVL } = require("../helper/unknownTokens"); module.exports = { misrepresentedTokens: true, - start: 1682168400, + start: '2023-04-22', era: { tvl: getUniTVL({ factory: "0x0E15a1a03bD356B17F576c50d23BF7FC00305590", diff --git a/projects/optionBlitz/index.js b/projects/optionBlitz/index.js index 6d58fb2e7ba8..c17184fb24ec 100644 --- a/projects/optionBlitz/index.js +++ b/projects/optionBlitz/index.js @@ -6,7 +6,6 @@ const BLX = "0x220251092F8B63efD0341F69f6ca907Bd6f271Bf"; // BLX const assets = [nullAddress, ADDRESSES.arbitrum.USDC_CIRCLE] // ETH, USDC module.exports = { - start: 194784191, arbitrum: { tvl: sumTokensExport({ owners: [treasury], tokens: assets }), staking: sumTokensExport({ owners: [treasury], tokens: [BLX] }), diff --git a/projects/opulous/index.js b/projects/opulous/index.js index 1148a46c8874..677c89f7fd08 100644 --- a/projects/opulous/index.js +++ b/projects/opulous/index.js @@ -33,7 +33,7 @@ const arbitrumTVL = async (api) => { } module.exports = { - // // start: 1660827158, + // // start: '2022-08-18', methodology: `Counts the number of OPUL tokens locked in the staking pool.`, algorand: { tvl: () => ({}), diff --git a/projects/orange-finance/index.js b/projects/orange-finance/index.js index 110b87f8f8fb..2bd434f3256b 100644 --- a/projects/orange-finance/index.js +++ b/projects/orange-finance/index.js @@ -23,7 +23,6 @@ async function tvl(api) { module.exports = { doublecounted: true, - start: 154577707, arbitrum: { tvl, }, diff --git a/projects/ottopia/index.js b/projects/ottopia/index.js index 0a07f498cdac..f0bf14740dde 100644 --- a/projects/ottopia/index.js +++ b/projects/ottopia/index.js @@ -32,7 +32,6 @@ async function tvl({timestamp}, block, chainBlocks) { module.exports = { methodology: "This adapter uses otterclam's subgraph to fetch tvl data.", - start: 30711580, polygon: { tvl, staking: staking(PearlBank, CLAM), diff --git a/projects/pairex/index.js b/projects/pairex/index.js index 03e88224b0cf..d13fdb5d8dc0 100644 --- a/projects/pairex/index.js +++ b/projects/pairex/index.js @@ -16,7 +16,7 @@ const tokens = [ ] module.exports = { - start: 1678852800, // 15/03/2023 @ 04:00am (UTC) + start: '2023-03-15', // 15/03/2023 @ 04:00am (UTC) arbitrum: { tvl: sumTokensExport({ tokens, owners: contracts }), }, diff --git a/projects/paladinfinance-dullahan/index.js b/projects/paladinfinance-dullahan/index.js index 8002d640968c..4d39425d9008 100644 --- a/projects/paladinfinance-dullahan/index.js +++ b/projects/paladinfinance-dullahan/index.js @@ -12,5 +12,4 @@ module.exports = { ethereum: { tvl, }, - start: 17824291 }; diff --git a/projects/paladinfinance-warlord/index.js b/projects/paladinfinance-warlord/index.js index e95d48981828..f3719aa0e44c 100644 --- a/projects/paladinfinance-warlord/index.js +++ b/projects/paladinfinance-warlord/index.js @@ -40,5 +40,4 @@ module.exports = { ethereum: { tvl: ethTvl, }, - start: 17368026 }; diff --git a/projects/pangolin/index.js b/projects/pangolin/index.js index 5bd5ebe240ab..2efca3ea2b10 100644 --- a/projects/pangolin/index.js +++ b/projects/pangolin/index.js @@ -56,5 +56,5 @@ module.exports = { return toUSDTBalances(data.pangolinFactory.totalLiquidityUSD) } }, - start: 1612715300, // 7th-Feb-2021 + start: '2021-02-07', // 7th-Feb-2021 }; diff --git a/projects/papparico-finance/index.js b/projects/papparico-finance/index.js index 2858568558fe..1b8ba46e9b99 100644 --- a/projects/papparico-finance/index.js +++ b/projects/papparico-finance/index.js @@ -14,7 +14,6 @@ const LP_MINING_CONTRACT_V2 = "0x2490AFBf1609119bB76E5e936f4ce4cBed815947"; const lps = [PPFT_MAIN_LP, XPPFT_LP]; module.exports = { - start: 13406569, cronos: { tvl: () => ({}), staking: sumTokensExport({ diff --git a/projects/peakdefi/index.js b/projects/peakdefi/index.js index 620d1692173e..00aa69d40caa 100644 --- a/projects/peakdefi/index.js +++ b/projects/peakdefi/index.js @@ -23,7 +23,7 @@ async function tvl(api) { return sumTokens2({ api, owners: Object.values(funds), tokens }) } module.exports = { - start: 1607405152, // Dec-08-2020 05:25:52 PM +UTC + start: '2020-12-08', // Dec-08-2020 05:25:52 PM +UTC bsc: { staking: staking(stakingContracts.bsc, peakAddress, "bsc", peakAddress), }, diff --git a/projects/peardao/index.js b/projects/peardao/index.js index 60be1953c535..c3e34d0038bb 100644 --- a/projects/peardao/index.js +++ b/projects/peardao/index.js @@ -22,7 +22,6 @@ const tokens = [ module.exports = { methodology: 'Counts the value of LP tokens and PEX tokens in the staking contracts, assets locked in the P2P escrow contract, and assets in the treasury contract.', - start: 15966251, // Mar-11-2022 01:00:01 PM +UTC bsc: { tvl: sumTokensExport({ tokens, owner: DOTC_CONTRACT, }), staking: stakings([TREASURY_ADDRESS, PEX_STAKING_POOL_CONTRACT], PEX_TOKEN_CONTRACT), diff --git a/projects/perfect-pool/index.js b/projects/perfect-pool/index.js index 3eabd8a9c758..712c80696bc7 100644 --- a/projects/perfect-pool/index.js +++ b/projects/perfect-pool/index.js @@ -5,7 +5,7 @@ const NFT_ACE8 = '0x21F3ea812734b6492D88D268622CF068e9E6D596' const NFT_ACE16 = '0x70A254c8201adbD88d88D17937d5e8aBb8B8095F' module.exports = { - start: 1725311445, + start: '2024-09-02', base: { tvl: sumTokensExport( { owners: [NFT_ACE8, NFT_ACE16], token: ADDRESSES.base.USDC }, diff --git a/projects/perlinx/index.js b/projects/perlinx/index.js index caf7253f5c61..3ae833fcdd08 100644 --- a/projects/perlinx/index.js +++ b/projects/perlinx/index.js @@ -97,6 +97,6 @@ async function tvl(timestamp, block) { ==================================================*/ module.exports = { - start: 1600905600, + start: '2020-09-24', ethereum: { tvl } } diff --git a/projects/perp88/index.js b/projects/perp88/index.js index 58521b33fa05..4864b7cab5ce 100644 --- a/projects/perp88/index.js +++ b/projects/perp88/index.js @@ -20,7 +20,7 @@ async function blastTvl(api) { } module.exports = { - start: 1668684025, + start: '2022-11-17', polygon: { tvl: sumTokensExport({ owner: POOL_DIAMOND_CONTRACT, diff --git a/projects/phission-finance/index.js b/projects/phission-finance/index.js index af8f50d52886..ff14977390ff 100644 --- a/projects/phission-finance/index.js +++ b/projects/phission-finance/index.js @@ -8,7 +8,7 @@ const STAKING_CONTRACT = '0x569a157eac744b87a42314e8fc03a2e648ea33a2' module.exports = { methodology: 'Total amount of WETH split, plus the value of Pool2', - start: 1661851416, + start: '2022-08-30', ethereum: { tvl: sumTokensExport({ owner: SPLIT_CONTRACT, tokens: [WETH] }), pool2: sumTokensExport({ owner: STAKING_CONTRACT, tokens: [GOV_POOL], useDefaultCoreAssets: true }), diff --git a/projects/phoenix/index.js b/projects/phoenix/index.js index 21c4ed56d542..91dafc430e28 100644 --- a/projects/phoenix/index.js +++ b/projects/phoenix/index.js @@ -1,7 +1,7 @@ const tvl = () => ({}) module.exports = { - start: 1631376000, // beijing time 2021-9-11 0:0: + start: '2021-09-11', // beijing time 2021-9-11 0:0: deadFrom: '2022-09-15', hallmarks: [ [Math.floor(new Date('2022-09-15')/1e3), 'Project is dead: https://twitter.com/Phoenix__PHX/status/1570389804734640129'], diff --git a/projects/piggy/index.js b/projects/piggy/index.js index de62d6ac6857..0045af831726 100644 --- a/projects/piggy/index.js +++ b/projects/piggy/index.js @@ -4,7 +4,7 @@ const TROVE_MANAGER_ADDRESS = "0xb283466d09177c5C6507785d600caFDFa538C65C"; module.exports = { deadFrom: 1648765747, - start: 1623145388, + start: '2021-06-08', bsc: { tvl: getLiquityTvl(TROVE_MANAGER_ADDRESS) }, diff --git a/projects/pingu/index.js b/projects/pingu/index.js index a766ef060efe..c2ae572bd8e8 100644 --- a/projects/pingu/index.js +++ b/projects/pingu/index.js @@ -6,7 +6,7 @@ const PINGU = "0x83E60B9F7f4DB5cDb0877659b1740E73c662c55B"; // PINGU const assets = [nullAddress, ADDRESSES.arbitrum.USDC_CIRCLE] // ETH, USDC module.exports = { - start: 1704844800, + start: '2024-01-10', arbitrum: { tvl: sumTokensExport({ owners: [fundStore], tokens: assets }), staking: sumTokensExport({ owners: [fundStore], tokens: [PINGU] }), diff --git a/projects/pizzax/index.js b/projects/pizzax/index.js index 13dcd1e11205..e99bf6008501 100644 --- a/projects/pizzax/index.js +++ b/projects/pizzax/index.js @@ -6,7 +6,6 @@ const TOKENS = ["0x488739D593DC2BC13Fd738CBaa35498bad5F8556"] module.exports = { methodology: "PizzaX is a Defi Miners. A fun platform to generate 15%/Day ROI for Lifetime — Pool as a Service (PAAS)", - start: 35011373, bsc: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/planar-finance/index.js b/projects/planar-finance/index.js index 85b875589993..f565087795ae 100644 --- a/projects/planar-finance/index.js +++ b/projects/planar-finance/index.js @@ -2,7 +2,7 @@ const { getUniTVL } = require("../helper/unknownTokens"); module.exports = { misrepresentedTokens: true, - start: 1715328951, + start: '2024-05-10', blast: { tvl: getUniTVL({ factory: '0xdC401B87Ee940F5050f6a17f49763635653eb496', useDefaultCoreAssets: true,}), } diff --git a/projects/plenty/index.js b/projects/plenty/index.js index a7b90f1d5244..2e72d1b4737e 100644 --- a/projects/plenty/index.js +++ b/projects/plenty/index.js @@ -13,7 +13,7 @@ async function getDexes() { module.exports = { timetravel: false, misrepresentedTokens: true, - start: 1672531200, + start: '2023-01-01', tezos: { tvl, }, diff --git a/projects/polygon/index.js b/projects/polygon/index.js index 4af516fc7fe1..51ec3af37d21 100644 --- a/projects/polygon/index.js +++ b/projects/polygon/index.js @@ -90,7 +90,7 @@ async function tvl(_, block, _c) { } module.exports = { - start: 1590824836, // Sat May 30 13:17:16 2020 + start: '2020-05-30', // Sat May 30 13:17:16 2020 polygon: { tvl } diff --git a/projects/polytrade/index.js b/projects/polytrade/index.js index a9701231e622..1f335e9916f4 100644 --- a/projects/polytrade/index.js +++ b/projects/polytrade/index.js @@ -5,7 +5,7 @@ const chain = 'polygon' module.exports = { methodology: 'gets the amount in liquidity pool', - start: 1657074185, + start: '2022-07-06', polygon: { tvl: async (_,_b , {polygon: block}) => { const strategy = await sdk.api2.abi.call({ diff --git a/projects/ponyswap/index.js b/projects/ponyswap/index.js index a7edc1e19a9b..f887d0f8c9b7 100644 --- a/projects/ponyswap/index.js +++ b/projects/ponyswap/index.js @@ -1,6 +1,6 @@ const { uniTvlExport } = require("../helper/calculateUniTvl"); module.exports = { - start: 1678790700, + start: '2023-03-14', arbitrum: { tvl: uniTvlExport("0x66020547Ce3c861dec7632495D86e1b93dA6542c", "arbitrum", true), }, diff --git a/projects/popcorn/index.js b/projects/popcorn/index.js index 876ecf8c7a14..acc9a0e21b7b 100644 --- a/projects/popcorn/index.js +++ b/projects/popcorn/index.js @@ -41,7 +41,6 @@ const VCX = "0xce246eea10988c495b4a90a905ee9237a0f91543"; module.exports = { ethereum: { - start: 12237585, staking: stakings([stVCX, veVCX], [VCX, WETH_VCX_BAL_LP_TOKEN]), tvl, }, diff --git a/projects/powerindex/index.js b/projects/powerindex/index.js index 124247dac27f..faa31c0c4797 100644 --- a/projects/powerindex/index.js +++ b/projects/powerindex/index.js @@ -45,7 +45,7 @@ async function eth(api) { } module.exports = { - start: 1606768668, // 11/30/2021 @ 08:37am (UTC) + start: '2020-11-30', // 11/30/2021 @ 08:37am (UTC) bsc:{ tvl: getBscTvl, }, diff --git a/projects/prime-staked/index.js b/projects/prime-staked/index.js index 9e3574985778..0fffd6deec9b 100644 --- a/projects/prime-staked/index.js +++ b/projects/prime-staked/index.js @@ -12,7 +12,6 @@ module.exports = { doublecounted: true, methodology: "Returns the total assets owned by primeETH", - start: 19128047, ethereum: { tvl, }, diff --git a/projects/primitive/index.js b/projects/primitive/index.js index 92c9ae42a13b..52bd9b6b0949 100644 --- a/projects/primitive/index.js +++ b/projects/primitive/index.js @@ -4,7 +4,7 @@ const v1TVL = require('./v1') module.exports = { ethereum: { - start: 1647932400, // unix timestamp (utc 0) specifying when the project began, or where live data begins + start: '2022-03-22', // unix timestamp (utc 0) specifying when the project began, or where live data begins tvl: sdk.util.sumChainTvls([rmmTVL, v1TVL, ]), // }, } \ No newline at end of file diff --git a/projects/promethium/index.js b/projects/promethium/index.js index 01082b6a958b..a0a1e3010218 100644 --- a/projects/promethium/index.js +++ b/projects/promethium/index.js @@ -25,7 +25,7 @@ async function tvl(api) { module.exports = { methodology: "TVL displays the total amount of assets stored in the Promethium contracts, excluding not claimed fees.", - start: 1696164866, + start: '2023-10-01', arbitrum: { tvl }, hallmarks: [[1696164866, "Profitable pools deployment"]], }; diff --git a/projects/psy/index.js b/projects/psy/index.js index 654c5997cd71..4ad1141bcdf2 100644 --- a/projects/psy/index.js +++ b/projects/psy/index.js @@ -13,7 +13,7 @@ async function tvl(api) { module.exports = { methodology: "Adds up the total value locked as collateral on the Gravita platform", - start: 1689519600, // Sun Jul 16 2023 15:00:00 GMT+0000 + start: '2023-07-16', // Sun Jul 16 2023 15:00:00 GMT+0000 arbitrum: { tvl, }, diff --git a/projects/puffer/index.js b/projects/puffer/index.js index f246b75efdb5..db4fa9387943 100644 --- a/projects/puffer/index.js +++ b/projects/puffer/index.js @@ -7,7 +7,6 @@ async function tvl(api) { module.exports = { doublecounted: true, methodology: 'Returns the total assets owned by the Puffer Vault on Ethereum.', - start: 19128047, ethereum: { tvl, } diff --git a/projects/pumpxy/index.js b/projects/pumpxy/index.js index 2358b7bb8fef..7e6d27d2a72e 100644 --- a/projects/pumpxy/index.js +++ b/projects/pumpxy/index.js @@ -2,7 +2,7 @@ const { sumTokens2, nullAddress } = require('../helper/unwrapLPs') module.exports = { methodology: "TVL is calculated by retrieving the ETH balance of all meme coin contracts deployed by the Zircuit factory contract. The factory contract dynamically manages meme coins, and their ETH holdings are summed up to calculate the total TVL.", - start: 1726030293, + start: '2024-09-11', zircuit: { tvl, }, diff --git a/projects/pv01/index.js b/projects/pv01/index.js index 8f64d3c0e835..caa377dcf847 100644 --- a/projects/pv01/index.js +++ b/projects/pv01/index.js @@ -14,7 +14,6 @@ async function tvl(api) { module.exports = { methodology: "Counts the total supply of rTBL (Rolling T-bill) tokens across all PV01 perpetual bond vaults.", - start: 20377028, ethereum: { tvl, }, diff --git a/projects/qian/index.js b/projects/qian/index.js index 976713a687d9..4567ff4bf0d4 100644 --- a/projects/qian/index.js +++ b/projects/qian/index.js @@ -9,6 +9,6 @@ async function tvl(api) { } module.exports = { - start: 1513566671, // 2020/10/21 6:34:47 (+UTC) + start: '2017-12-18', // 2020/10/21 6:34:47 (+UTC) ethereum: { tvl }, }; diff --git a/projects/quadrat/index.js b/projects/quadrat/index.js index 703470dfbe1a..5bae25dfad1a 100644 --- a/projects/quadrat/index.js +++ b/projects/quadrat/index.js @@ -4,7 +4,7 @@ const sdk = require('@defillama/sdk') module.exports = { doublecounted: true, methodology: 'Counts the tokens locked in Strategy Vaults in Uniswap v3 Pools.', - start: 1667197843, // Mon Oct 31 2022 06:30:43 GMT+0000 + start: '2022-10-31', // Mon Oct 31 2022 06:30:43 GMT+0000 }; const config = { diff --git a/projects/range/index.js b/projects/range/index.js index f9f28e581c31..22e3e82055c5 100644 --- a/projects/range/index.js +++ b/projects/range/index.js @@ -51,7 +51,7 @@ const config ={ module.exports = { methodology: 'assets deployed on DEX as LP + asset balance of vaults', doublecounted: true, - start: 1683965157, + start: '2023-05-13', }; // vaults that were deployed through factory but are uninitialized and unused diff --git a/projects/rari/index.js b/projects/rari/index.js index 38e025c3e7e5..5e10de9ff716 100644 --- a/projects/rari/index.js +++ b/projects/rari/index.js @@ -60,7 +60,7 @@ async function fuseTvl(api) { module.exports = { doublecounted: true, - start: 1596236058, // July 14, 2020 + start: '2020-08-01', // July 14, 2020 ethereum: { tvl, pool2: pool2(rariGovernanceTokenUniswapDistributorAddress, RGTETHSushiLPTokenAddress), diff --git a/projects/ray/index.js b/projects/ray/index.js index 0dffad302ea2..382c9afb8135 100644 --- a/projects/ray/index.js +++ b/projects/ray/index.js @@ -51,7 +51,7 @@ const allPortfolioManagers = [ owners.push(allPortfolioManagers[0].address) module.exports = { - start: 1568274392, // 09/12/2019 @ 7:46am (UTC) + start: '2019-09-12', // 09/12/2019 @ 7:46am (UTC) ethereum: { tvl: sumTokensExport({ owners, diff --git a/projects/rebalance/index.js b/projects/rebalance/index.js index 1ba5accb8104..d30421003ad3 100644 --- a/projects/rebalance/index.js +++ b/projects/rebalance/index.js @@ -13,7 +13,7 @@ const abi = "function getDepositBalance(address user, address vault) view return module.exports = { methodology: "TVL displays the total amount of assets stored in the REBALANCE vault contracts.", - start: 1712143874, + start: '2024-04-03', hallmarks: [[1712143874, "Profitable vaults deployment"]], }; diff --git a/projects/reflexer/index.js b/projects/reflexer/index.js index 8c696fd367df..6765cd88cf63 100644 --- a/projects/reflexer/index.js +++ b/projects/reflexer/index.js @@ -32,6 +32,6 @@ async function tvl(timestamp, block) { ==================================================*/ module.exports = { - start: 1613520000, + start: '2021-02-17', ethereum: { tvl }, }; diff --git a/projects/revault/index.js b/projects/revault/index.js index 3806a085a7aa..3417ee4d61b8 100644 --- a/projects/revault/index.js +++ b/projects/revault/index.js @@ -10,7 +10,7 @@ async function tvl(api) { } module.exports = { - start: 1634150000, // 13th of October, 2021 + start: '2021-10-13', // 13th of October, 2021 bsc: { tvl, }, diff --git a/projects/reyield-finance/index.js b/projects/reyield-finance/index.js index 41e228a59ae4..cc74e3224127 100644 --- a/projects/reyield-finance/index.js +++ b/projects/reyield-finance/index.js @@ -41,7 +41,7 @@ const chains = [ ] module.exports = { - start: 1695873578, // Sep-28-2023 03:59:38 AM +UTC + start: '2023-09-28', // Sep-28-2023 03:59:38 AM +UTC doublecounted: true, methodology: "TVL is equal to users' running positions' liquidity value plus uncollected fees.", }; diff --git a/projects/risq.js b/projects/risq.js index dd250a7dae17..cf25fdac0b0f 100644 --- a/projects/risq.js +++ b/projects/risq.js @@ -32,7 +32,6 @@ async function tvl(api) { } module.exports = { - start: 10340221, // Aug-25-2021 03:12:42 PM +UTC bsc: { tvl, } diff --git a/projects/rize/index.js b/projects/rize/index.js index e5aacc173311..386369069e17 100644 --- a/projects/rize/index.js +++ b/projects/rize/index.js @@ -104,7 +104,7 @@ async function naviSui(coinSymbol) { } module.exports = { - start: 1716599207, + start: '2024-05-25', timetravel: false, ethereum: { tvl diff --git a/projects/rosy-burnt-steak/index.js b/projects/rosy-burnt-steak/index.js index bdbfad1d95db..47462e0e9fbc 100644 --- a/projects/rosy-burnt-steak/index.js +++ b/projects/rosy-burnt-steak/index.js @@ -5,7 +5,7 @@ const STEAK_CONTRACT = '0x3e7ab819878bEcaC57Bd655Ab547C8e128e5b208'; module.exports = { methodology: 'counts the number of ROSY tokens in the Steak contract.', - start: 1711020000, + start: '2024-03-21', sapphire: { tvl: () => ({}), staking: staking(STEAK_CONTRACT, ROSY_TOKEN_CONTRACT) diff --git a/projects/rumi/index.js b/projects/rumi/index.js index 737b047b6459..6837416e2baa 100644 --- a/projects/rumi/index.js +++ b/projects/rumi/index.js @@ -16,7 +16,6 @@ async function tvl(api) { module.exports = { methodology: 'Total asset value held in the Rumi lend vault and Rumi strategies', - start: 143884813, arbitrum: { tvl: () => ({}), }, diff --git a/projects/sablier/index.js b/projects/sablier/index.js index 853d27aa1a0f..4a1894a2d146 100644 --- a/projects/sablier/index.js +++ b/projects/sablier/index.js @@ -40,7 +40,7 @@ module.exports = { hallmarks: [ [Math.floor(new Date('2022-10-03') / 1e3), 'Vesting tokens are not included in tvl'], ], - start: 1573582731, + start: '2019-11-12', timetravel: false, ronin: { tvl: sumTokensExport({ diff --git a/projects/saltyio/index.js b/projects/saltyio/index.js index 5e93dfba868b..db13807632eb 100644 --- a/projects/saltyio/index.js +++ b/projects/saltyio/index.js @@ -10,7 +10,7 @@ const SALT_CONTRACT = '0x0110B0c3391584Ba24Dbf8017Bf462e9f78A6d9F' const STAKING_CONTRACT = '0x7c6f5E73210080b093E724fbdB3EF7bcdd6D468b' module.exports = { - start: 1713700739, + start: '2024-04-21', } Object.keys(config).forEach(chain => { diff --git a/projects/salvor/index.js b/projects/salvor/index.js index ca1f4c2d3044..645cf13c0a2b 100644 --- a/projects/salvor/index.js +++ b/projects/salvor/index.js @@ -3,7 +3,7 @@ const { sumTokensExport, nullAddress } = require("../helper/unwrapLPs"); const { staking } = require("../helper/staking"); module.exports.avax = { - start: 1683411200, + start: '2023-05-07', hallmarks: [ [1702501200, "Salvor Lending Launch"] ], diff --git a/projects/sandclock/index.js b/projects/sandclock/index.js index 985f49fa9cfb..8e1aff64ce7d 100644 --- a/projects/sandclock/index.js +++ b/projects/sandclock/index.js @@ -62,7 +62,6 @@ async function tvl(api) { module.exports = { methodology: 'add underlying asset balances in all the vaults together.', doublecounted: true, - start: 15308000, // The first vault YEARN_VAULT was deployed ethereum: { tvl, staking: staking("0x0a36f9565c6fb862509ad8d148941968344a55d8", "0xba8a621b4a54e61c442f5ec623687e2a942225ef") diff --git a/projects/scientixfinance/index.js b/projects/scientixfinance/index.js index 3d79d2528ce1..12013268de50 100644 --- a/projects/scientixfinance/index.js +++ b/projects/scientixfinance/index.js @@ -15,7 +15,6 @@ const ScixBusd = "0xe8Efb51E051B08614DF535EE192B0672627BDbF9"; const scUsdBusd = "0x53085B02955CFD2F884c58D19B8a35ef5095E8aE"; module.exports = { - start: 10880500, // 09/16/2020 @ 12:00am (UTC+8) bsc: { tvl, staking: staking(VotingEscrow, SCIX), diff --git a/projects/scoreplay/index.js b/projects/scoreplay/index.js index 1ddddeb1a61b..b10b7d1d5b2b 100644 --- a/projects/scoreplay/index.js +++ b/projects/scoreplay/index.js @@ -2,6 +2,6 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { - start: 1717958404, + start: '2024-06-09', base: { tvl: sumTokensExport({ owner: '0xFcab8B765FB0BCB05407d16173941e2d1F09DE12', tokens: [ADDRESSES.base.WETH] }) }, } \ No newline at end of file diff --git a/projects/seashell/index.js b/projects/seashell/index.js index e78ce9261067..82d85d1232a4 100644 --- a/projects/seashell/index.js +++ b/projects/seashell/index.js @@ -6,7 +6,6 @@ const BLUEBERRY_GLP_COMPOUNDER_CONTRACT = module.exports = { methodology: "Total assets in Seashell's Blueberry GLP Compounder contract", - start: 66190371, arbitrum: { tvl: sumTokensExport({ owner: BLUEBERRY_GLP_COMPOUNDER_CONTRACT, tokens: [SGLP_TOKEN]}), }, diff --git a/projects/set-protocol/index.js b/projects/set-protocol/index.js index c92c8e6a0b7e..c6c5dd84742c 100644 --- a/projects/set-protocol/index.js +++ b/projects/set-protocol/index.js @@ -25,6 +25,6 @@ } module.exports = { - start: 1554848955, // 04/09/2019 @ 10:29pm (UTC) + start: '2019-04-10', // 04/09/2019 @ 10:29pm (UTC) ethereum: { tvl } } diff --git a/projects/sfinance/index.js b/projects/sfinance/index.js index 284e9d3dcb93..48e8d9fbfeb1 100644 --- a/projects/sfinance/index.js +++ b/projects/sfinance/index.js @@ -109,10 +109,10 @@ module.exports = { // #1 susdv2 pool started - // start: 1600758000, // 09/22/2020 @ 03:00:00pm +UTC + // start: '2020-09-22', // 09/22/2020 @ 03:00:00pm +UTC // #2 dfi pool started - // start: 1602345600, // 10/10/2020 @ 04:00:00pm +UTC - start: 1602374400, // 10/11/2020 @ 00:00:00am +UTC + // start: '2020-10-10', // 10/10/2020 @ 04:00:00pm +UTC + start: '2020-10-11', // 10/11/2020 @ 00:00:00am +UTC ethereum: { tvl } diff --git a/projects/shell/index.js b/projects/shell/index.js index acfc263df7ed..10fa59cdf36a 100644 --- a/projects/shell/index.js +++ b/projects/shell/index.js @@ -21,7 +21,6 @@ const TOKEN_CONTRACTS = [ module.exports = { methodology: 'Sums up the value of all tokens wrapped into Shell v2', - start: 24142587, arbitrum: { tvl: sumTokensExport({ owner: OCEAN_CONTRACT, tokens: TOKEN_CONTRACTS}) }, diff --git a/projects/sherlock/index.js b/projects/sherlock/index.js index 7c11bbbd088a..f64a94533d04 100644 --- a/projects/sherlock/index.js +++ b/projects/sherlock/index.js @@ -34,6 +34,6 @@ async function tvl(timestamp, block) { module.exports = { methodology: 'We count USDC that has been staked into the contracts (staking pool). Periodically USDC is swept into Aave, so we also count the aUSDC that is held (in a separate contract from the main contract).', - start: 1632861292, // 9/28/2020 @ 8:00pm (UTC) + start: '2021-09-28', // 9/28/2020 @ 8:00pm (UTC) ethereum: { tvl } // tvl adapter } diff --git a/projects/shibui/index.js b/projects/shibui/index.js index f3f16e929cd6..81d51e4c5641 100644 --- a/projects/shibui/index.js +++ b/projects/shibui/index.js @@ -9,8 +9,6 @@ const Boba_SHIBUI_USDT = "0x3f714fe1380ee2204ca499d1d8a171cbdfc39eaa"; module.exports = { - start: 394825, - boba: { tvl: () => ({}), pool2: pool2s([ diff --git a/projects/shield/index.js b/projects/shield/index.js index 526c871f47c8..9b1b1ac0749b 100644 --- a/projects/shield/index.js +++ b/projects/shield/index.js @@ -1,19 +1,13 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens2 } = require('../helper/unwrapLPs') -const USDT = ADDRESSES.bsc.USDT; +const { sumTokensExport } = require('../helper/unwrapLPs') const publicPool = "0x65081C21228dc943f47b1Cdb394Eb8db022bc744"; const privatePool = "0xFa4e13EfAf2C90D6Eaf5033A4f3cB189ee4eF189"; const pools = [publicPool, privatePool]; -async function tvl(timestamp, _, { bsc: block }) { - return sumTokens2({ chain: 'bsc', block, owners: pools, tokens: [USDT]}) -} - module.exports = { methodology: 'Dual liquidity pool is an innovation by Shield that allows the private pool to hedge the market making risk, while the low-risk public pool can accommodate liquidity to guarantee abundant liquidity on the market. TVL on Shield should combine liquidity from both public pool and private pool.', - start: 11160281, // Sep-23-2021 08:37:45 AM +UTC bsc: { - tvl, + tvl: sumTokensExport({ owners: pools, token: ADDRESSES.bsc.USDT}), }, } diff --git a/projects/shprd/index.js b/projects/shprd/index.js index 843600e621af..a3073bf82923 100644 --- a/projects/shprd/index.js +++ b/projects/shprd/index.js @@ -21,7 +21,7 @@ async function tvl(api) { module.exports = { - start: 1688162400, + start: '2023-07-01', hallmarks: [ [1695396647, "Fees distribution #1"], [1705582439, "Fees distribution #2"], diff --git a/projects/single/index.js b/projects/single/index.js index 54da257086eb..b573175c5fdb 100644 --- a/projects/single/index.js +++ b/projects/single/index.js @@ -101,7 +101,7 @@ const getHelpers = (chain) => { } module.exports = { - start: 1643186078, + start: '2022-01-26', // if we can backfill data with your adapter. Most SDK adapters will allow this, but not all. For example, if you fetch a list of live contracts from an API before querying data on-chain, timetravel should be 'false'. //if you have used token substitutions at any point in the adapter this should be 'true'. misrepresentedTokens: true, diff --git a/projects/singularx/index.js b/projects/singularx/index.js index 4d26f2eaa77c..fe58897ede0d 100644 --- a/projects/singularx/index.js +++ b/projects/singularx/index.js @@ -17,6 +17,6 @@ const ethereumTokens = [ ]; module.exports = { - start: 1685817000, + start: '2023-06-03', ethereum: { tvl: sumTokensExport({ owners: ethereumContracts, tokens: ethereumTokens, }) }, }; \ No newline at end of file diff --git a/projects/sirius-finance/index.js b/projects/sirius-finance/index.js index 225505524509..26479ea7aecc 100644 --- a/projects/sirius-finance/index.js +++ b/projects/sirius-finance/index.js @@ -26,7 +26,7 @@ module.exports = { misrepresentedTokens: true, methodology: "All locked tokens includes stable and crypto assets in Sirius's pools.", astar: { - start: 1650117600, // 2022/04/16 14:00 UTC + start: '2022-04-16', // 2022/04/16 14:00 UTC tvl, // tvl adapter staking: staking(VotingEscrow, SRS, Chain, CoinGeckoID, 18), }, diff --git a/projects/skale/index.js b/projects/skale/index.js index f8ddabb789f2..786f3ce63884 100644 --- a/projects/skale/index.js +++ b/projects/skale/index.js @@ -3,7 +3,7 @@ const depositBoxETH = '0x49F583d263e4Ef938b9E09772D3394c71605Df94'; const depositBoxERC20 = '0x8fB1A35bB6fB9c47Fb5065BE5062cB8dC1687669'; module.exports = { - start: 1626697290, // Mon July 19 06:38:20 PM UTC 2021 + start: '2021-07-19', // Mon July 19 06:38:20 PM UTC 2021 ethereum: { tvl: sumTokensExport({ owners: [depositBoxETH, depositBoxERC20], fetchCoValentTokens: true, permitFailure: true }), } diff --git a/projects/skcs/index.js b/projects/skcs/index.js index 34cf3944b00a..e7d1d478a42e 100644 --- a/projects/skcs/index.js +++ b/projects/skcs/index.js @@ -16,7 +16,6 @@ async function tvl(timestamp, ethBlock, {kcc: block}) { module.exports = { methodology: 'Staked token and staking rewards are counted as TVL', - start: 12145436, kcc:{ tvl:tvl, } diff --git a/projects/slsd/index.js b/projects/slsd/index.js index 021ba9014f95..965083da50a6 100644 --- a/projects/slsd/index.js +++ b/projects/slsd/index.js @@ -24,7 +24,6 @@ async function tvl(api) { } module.exports = { - start: 17142918, ethereum: { tvl, pool2: staking('0xBE13DC5235a64d090E9c62952654DBF3c65199d9', SLSD_LP) diff --git a/projects/smbswap/index.js b/projects/smbswap/index.js index 4b7503b6b360..101e2d460b73 100644 --- a/projects/smbswap/index.js +++ b/projects/smbswap/index.js @@ -6,5 +6,5 @@ module.exports = { bsc: { tvl: getUniTVL({ factory: '0x2Af5c23798FEc8E433E11cce4A8822d95cD90565', useDefaultCoreAssets: true }), }, - start: 1645285089, // Sat Feb 19 2022 15:38:09 + start: '2022-02-19', // Sat Feb 19 2022 15:38:09 }; diff --git a/projects/smilee-finance/index.js b/projects/smilee-finance/index.js index 4c61403965df..733958cdfe23 100644 --- a/projects/smilee-finance/index.js +++ b/projects/smilee-finance/index.js @@ -1,6 +1,5 @@ module.exports = { methodology: 'Sum of balances from vault contracts associated with each DVP retrieved by the registry.', - start: 190367425, } const config = { diff --git a/projects/solid-world/index.js b/projects/solid-world/index.js index c3160daef4fa..5383c2e4a1bb 100644 --- a/projects/solid-world/index.js +++ b/projects/solid-world/index.js @@ -47,7 +47,7 @@ async function pool2(api) { } module.exports = { - start: 1684477800, // Fri May 19 2023 06:30:00 GMT+0000 + start: '2023-05-19', // Fri May 19 2023 06:30:00 GMT+0000 methodology: `TVL is a measure of the health of the Solid World ecosystem. The TVL can be looked at from 2 perspectives. The 1st perspective, "RWA" valuation, represents the total value of the tokenized forward carbon credits, and is computed as the present value of the on-chain forward credits (ERC1155), based on their exchange rate to CRISP tokens (ERC20) and subsequent USDC value, summed-up.The 2nd perspective, "pool2", represents the total value locked up in our staking contract, and it's calculated by adding up the value of all the LP tokens that are staked. The LP tokens represent the amount of liquidity that has been provided to the Solid World platform.`, polygon: { tvl, diff --git a/projects/sommelier/index.js b/projects/sommelier/index.js index 33421b9bf46d..84e3a658cd17 100644 --- a/projects/sommelier/index.js +++ b/projects/sommelier/index.js @@ -65,7 +65,7 @@ function filterActiveCellars(cellars, block) { module.exports = { methodology: "TVL is calculated as the sum of deposits invested into the strategy, deposits waiting to be invested, and yield waiting to be reinvested or redistributed across all Cellars.", - start: 1656652494, + start: '2022-07-01', ["ethereum"]: { tvl: ethereum_tvl }, ["arbitrum"]: { tvl: arbitrum_tvl }, ["optimism"]: { tvl: optimism_tvl }, diff --git a/projects/spacewhale/index.js b/projects/spacewhale/index.js index 4d7113270456..0d5c8a4e23ca 100644 --- a/projects/spacewhale/index.js +++ b/projects/spacewhale/index.js @@ -6,7 +6,7 @@ const SPACEWHALE = "0xf5961a2441fC68E38300cd8ae8d6a172b12D7E7A"; // SPACEWHALE const assets = [nullAddress, ADDRESSES.arbitrum.USDC_CIRCLE] // ETH, USDC module.exports = { - start: 1712109600, + start: '2024-04-03', arbitrum: { tvl: sumTokensExport({ owners: [fundStore], tokens: assets }), staking: sumTokensExport({ owners: [fundStore], tokens: [SPACEWHALE] }), diff --git a/projects/spiral-dao/index.js b/projects/spiral-dao/index.js index 31eb0be0df7b..6e6da8c31448 100644 --- a/projects/spiral-dao/index.js +++ b/projects/spiral-dao/index.js @@ -19,7 +19,6 @@ async function tvl(api) { module.exports = { methodology: 'Information is retrieved from both the blockchain and the SpiralDAO API. "https://api.spiral.farm".', - start: 16991020, ethereum: { tvl, staking: staking(STAKING, COIL), diff --git a/projects/stCelo/index.js b/projects/stCelo/index.js index 5fd621a142c4..bdf3c8e18a6d 100644 --- a/projects/stCelo/index.js +++ b/projects/stCelo/index.js @@ -31,7 +31,6 @@ async function tvl(timestamp, ethBlock, chainBlocks) { module.exports = { methodology: 'TVL counts Celo staked by the protocol.', - start: 14330000, celo: { tvl } diff --git a/projects/stake-ly/index.js b/projects/stake-ly/index.js index cb3098ab7b1d..9fe6de935c70 100644 --- a/projects/stake-ly/index.js +++ b/projects/stake-ly/index.js @@ -7,7 +7,7 @@ async function tvl(api) { module.exports = { methodology: "TVL is KLAY staked by the users and rewards accrued from node staking", - start: 1663585837, + start: '2022-09-19', klaytn: { tvl, }, diff --git a/projects/stakedotlink/index.js b/projects/stakedotlink/index.js index 29c957dca07b..107c8aa2023e 100644 --- a/projects/stakedotlink/index.js +++ b/projects/stakedotlink/index.js @@ -24,7 +24,7 @@ async function staking(api) { module.exports = { methodology: "Queries LINK staking/priority pools and SDL staking pool for the total amount of tokens staked", - start: 1670337984, + start: '2022-12-06', ethereum: { tvl, staking, diff --git a/projects/stakestone-btc/index.js b/projects/stakestone-btc/index.js index 1a0bf4984b5f..9d7ce6adfba3 100644 --- a/projects/stakestone-btc/index.js +++ b/projects/stakestone-btc/index.js @@ -16,7 +16,6 @@ const ethTvl = async (api) => { } module.exports = { - start: 42326440, bsc: { tvl: bscTvl, }, diff --git a/projects/stakestone/index.js b/projects/stakestone/index.js index 224ba93e6dd3..fa1927707089 100644 --- a/projects/stakestone/index.js +++ b/projects/stakestone/index.js @@ -18,7 +18,6 @@ const mantaTvl = async (api) => { } module.exports = { - start: 18182242, ethereum: { tvl: ethTvl }, diff --git a/projects/steakHut/index.js b/projects/steakHut/index.js index a2f6e7f8d4e4..5f2678b7bfc8 100644 --- a/projects/steakHut/index.js +++ b/projects/steakHut/index.js @@ -12,7 +12,6 @@ async function tvl(api) { const steakToken = "0xb279f8DD152B99Ec1D84A489D32c35bC0C7F5674" module.exports = { - start: 14003811, methodology: 'Counts the value of JLP tokens staked into SteakMasterChef.', avax: { tvl, diff --git a/projects/stealthpad/index.js b/projects/stealthpad/index.js index ccf9e75aa02a..459476d0934c 100644 --- a/projects/stealthpad/index.js +++ b/projects/stealthpad/index.js @@ -3,7 +3,6 @@ const abi = require('./abi.js') module.exports = { misrepresentedTokens: true, - start: 17996063, methodology: `Counts liquidity in lp lock contracts`, } diff --git a/projects/stream/index.js b/projects/stream/index.js index b873277d1569..844ab5c3cb8a 100644 --- a/projects/stream/index.js +++ b/projects/stream/index.js @@ -31,7 +31,6 @@ async function tvl(api) { module.exports = { misrepresentedTokens: true, methodology: "Calculates the TVL of all Stream vaults", - start: 16685700, ethereum: { tvl, }, diff --git a/projects/suzaku/index.js b/projects/suzaku/index.js index a70624952415..c1e3b9fef9c6 100644 --- a/projects/suzaku/index.js +++ b/projects/suzaku/index.js @@ -8,7 +8,7 @@ async function tvl(api) { } module.exports = { - start: 1727654400, + start: '2024-09-30', avax: { tvl, }, diff --git a/projects/swaap-earn/index.js b/projects/swaap-earn/index.js index f9be8debc38d..dc7fe7876731 100644 --- a/projects/swaap-earn/index.js +++ b/projects/swaap-earn/index.js @@ -3,7 +3,7 @@ const { cachedGraphQuery } = require('../helper/cache') const query = `query FundsTVL{ funds { id } }` module.exports = { - start: 1713312000, // Apr 17 2024 00:00:00 GMT+0000 + start: '2024-04-17', // Apr 17 2024 00:00:00 GMT+0000 } const config = { diff --git a/projects/swaap/index.js b/projects/swaap/index.js index 0744bbe62cd6..d1af4e2f7746 100644 --- a/projects/swaap/index.js +++ b/projects/swaap/index.js @@ -29,7 +29,7 @@ async function tvl(api) { } module.exports = { - start: 1655130642, // Jun-13-2022 02:30:42 PM +UTC + start: '2022-06-13', // Jun-13-2022 02:30:42 PM +UTC polygon: { tvl, }, diff --git a/projects/swapsicle/index.js b/projects/swapsicle/index.js index 5a4174c92b4f..cebbb79fa3ea 100644 --- a/projects/swapsicle/index.js +++ b/projects/swapsicle/index.js @@ -157,5 +157,4 @@ module.exports = { stakedTLOSIceBox ]) }, - //start: 15434772, } diff --git a/projects/symbiotic/index.js b/projects/symbiotic/index.js index fbc2c2c3169c..6944033af254 100644 --- a/projects/symbiotic/index.js +++ b/projects/symbiotic/index.js @@ -8,7 +8,7 @@ async function tvl(api) { } module.exports = { - start: 1718088924, + start: '2024-06-11', ethereum: { tvl, }, diff --git a/projects/symmetry-trade/index.js b/projects/symmetry-trade/index.js index 5979d08122b7..916c06b3b66f 100644 --- a/projects/symmetry-trade/index.js +++ b/projects/symmetry-trade/index.js @@ -12,7 +12,6 @@ const TOKENS = [ module.exports = { methodology: 'counts the token deposited in market contract', - start: 923000, scroll: { tvl: sumTokensExport({ owner: MARKET_CONTRACT, tokens: TOKENS}), } diff --git a/projects/synthetix/api.js b/projects/synthetix/api.js index 1e5cc6072de6..f242ddf26acc 100644 --- a/projects/synthetix/api.js +++ b/projects/synthetix/api.js @@ -136,7 +136,7 @@ async function SNXHolders(snxGraphEndpoint, block, chain) { } module.exports = { - start: 1565287200, // Fri Aug 09 2019 00:00:00 + start: '2019-08-08', // Fri Aug 09 2019 00:00:00 optimism: { tvl: chainTvl("optimism") }, diff --git a/projects/synthetix/apiCache.js b/projects/synthetix/apiCache.js index 92809152547b..7e0e2f728aa3 100644 --- a/projects/synthetix/apiCache.js +++ b/projects/synthetix/apiCache.js @@ -149,7 +149,7 @@ async function SNXHolders(snxGraphEndpoint, block, chain) { } module.exports = { - start: 1565287200, // Fri Aug 09 2019 00:00:00 + start: '2019-08-08', // Fri Aug 09 2019 00:00:00 optimism: { tvl: chainTvl("optimism") }, diff --git a/projects/synthex/index.js b/projects/synthex/index.js index 88364890f128..fc0626477716 100644 --- a/projects/synthex/index.js +++ b/projects/synthex/index.js @@ -14,7 +14,6 @@ const DAI = ADDRESSES.optimism.DAI; module.exports = { methodology: "counts value of assets in the PoolC and PoolF", - start: 82762407, arbitrum: { tvl: sumTokensExport({ ownerTokens: [ diff --git a/projects/t-protocol-v2/index.js b/projects/t-protocol-v2/index.js index 864c3d641974..3916b2b061de 100644 --- a/projects/t-protocol-v2/index.js +++ b/projects/t-protocol-v2/index.js @@ -8,7 +8,7 @@ const USTP = '0xed4d84225273c867d269f967cc696e0877068f8a' module.exports = { methodology: "counts value of assets in the Treasury", - start: 1677913260, + start: '2023-03-04', ethereum: { tvl, }, diff --git a/projects/t-protocol/index.js b/projects/t-protocol/index.js index dad6f75eeaed..14501bfd3f9e 100644 --- a/projects/t-protocol/index.js +++ b/projects/t-protocol/index.js @@ -7,7 +7,7 @@ const STBT = '0x530824DA86689C9C17CdC2871Ff29B058345b44a' module.exports = { methodology: "counts value of assets in the Treasury", - start: 1677913260, + start: '2023-03-04', ethereum: { tvl: sumTokensExport({ owner: TREASURY_CONTRACT, tokens: [USDC_TOKEN_CONTRACT, STBT] }), }, diff --git a/projects/taidog/index.js b/projects/taidog/index.js index b7a89476a5fd..2657a16651c7 100644 --- a/projects/taidog/index.js +++ b/projects/taidog/index.js @@ -79,7 +79,6 @@ module.exports = { misrepresentedTokens: true, methodology: "TVL counts user deposits of assets like (ETH, USDC, TAIKO) into protocol, counts pool2 (lp tokens) in staking contract 0xD664c3b22c60b4927ab1e0035b99F157bc2d8F1B, and counts the number of TAIDOG tokens in the staking contract 0x9b4484D5A2665930702d09f74086CAD86d96b25E", - start: 84000, taiko: { tvl: sumTokensExport({ tokensAndOwners: [ diff --git a/projects/tcv_platform/index.js b/projects/tcv_platform/index.js index 9a2da61ba615..73b6ac13c206 100644 --- a/projects/tcv_platform/index.js +++ b/projects/tcv_platform/index.js @@ -11,7 +11,7 @@ async function tvl(api) { module.exports = { methodology: "Calculates total liquidity from all NFT ranges in the given pools.", - start: 1717239410, + start: '2024-06-01', arbitrum: { tvl, }, diff --git a/projects/tetu/index.js b/projects/tetu/index.js index 950ba99fb880..17cc363f819a 100644 --- a/projects/tetu/index.js +++ b/projects/tetu/index.js @@ -17,7 +17,7 @@ const EXCLUDED_VAULTS = { } module.exports = { - start: 1628024400, //Tue Aug 03 2021 21:00:00 GMT+0000 + start: '2021-08-03', //Tue Aug 03 2021 21:00:00 GMT+0000 misrepresentedTokens: true, }; diff --git a/projects/thala-vethl/index.js b/projects/thala-vethl/index.js index 8c9c0fa07770..1d24a5f4187d 100644 --- a/projects/thala-vethl/index.js +++ b/projects/thala-vethl/index.js @@ -8,7 +8,7 @@ const thlDecimals = 8; module.exports = { timetravel: false, - start: 1692598825, + start: '2023-08-21', methodology: `TVL data is pulled from the Thala's API "https://app.thala.fi/api/vethl-tvl".`, aptos: { diff --git a/projects/tholgar/index.js b/projects/tholgar/index.js index e79f638b014f..01cebefd2afc 100644 --- a/projects/tholgar/index.js +++ b/projects/tholgar/index.js @@ -60,5 +60,4 @@ module.exports = { ethereum: { tvl: ethTvl, }, - start: 17368026 }; diff --git a/projects/thorn-protocol/index.js b/projects/thorn-protocol/index.js index 7778a25348a3..fb2544c228f3 100644 --- a/projects/thorn-protocol/index.js +++ b/projects/thorn-protocol/index.js @@ -11,7 +11,7 @@ async function tvl(api) { module.exports = { methodology: "Uses factory(0x888099De8EA8068D92bB04b47A743B82195c4aD2) address and whitelisted tokens address to find and price Liquidity Pool pairs", - start: 1729159200, + start: '2024-10-17', sapphire: { tvl, }, diff --git a/projects/tlx/index.js b/projects/tlx/index.js index c66b8892914f..b092c4e06e14 100644 --- a/projects/tlx/index.js +++ b/projects/tlx/index.js @@ -41,7 +41,7 @@ async function tvl(api) { } module.exports = { - start: 1712731500, + start: '2024-04-10', methodology: "Total TLX locked in the genesis locker contract and total TLX staked in the staking contract. TVL is computed as the total margin deposited across the protocol's leveraged tokens.", optimism: { diff --git a/projects/toros/index.js b/projects/toros/index.js index 2b418308179a..bdc0efe517f0 100644 --- a/projects/toros/index.js +++ b/projects/toros/index.js @@ -31,7 +31,7 @@ async function tvl(api) { module.exports = { misrepresentedTokens: true, - start: 1627776000, // Sunday, August 1, 2021 12:00:00 AM + start: '2021-08-01', // Sunday, August 1, 2021 12:00:00 AM methodology: "Aggregates total value of each Toros vault both on Polygon and Optimism", polygon: { diff --git a/projects/toucan-protocol/index.js b/projects/toucan-protocol/index.js index 441843bc51d2..909485c2db20 100644 --- a/projects/toucan-protocol/index.js +++ b/projects/toucan-protocol/index.js @@ -54,7 +54,7 @@ const getRegenCredits = () => { }; module.exports = { - start: 1634842800, + start: '2021-10-21', base: { tvl: getCalculationMethod("base") }, diff --git a/projects/tranche/index.js b/projects/tranche/index.js index 6796d3d525d7..3912c836fd66 100644 --- a/projects/tranche/index.js +++ b/projects/tranche/index.js @@ -93,7 +93,7 @@ function tvl(chain) { } module.exports = { - start: 1621340071, + start: '2021-05-18', ethereum: tvl('ethereum'), fantom: tvl('fantom'), avax: tvl('avax'), diff --git a/projects/treasury/betswirl.js b/projects/treasury/betswirl.js index 2a43dc69bdfc..1ecf614b3070 100644 --- a/projects/treasury/betswirl.js +++ b/projects/treasury/betswirl.js @@ -74,7 +74,7 @@ module.exports = { methodology: "BetSwirl has no users TVL yet. However, it includes the bankrolls amounts (each tokens amount in the bank allowing players to bet).", // The first Bank was deployed on Polygon at tx 0x6b99f617946d2f8c23adcd440cd3309d2da750e52d135853f38a0da11cdc3233 - start: 1648344312, // new Date(Date.UTC(2022, 2, 27, 1, 25, 12)).getTime() / 1e3, + start: '2022-03-27', // new Date(Date.UTC(2022, 2, 27, 1, 25, 12)).getTime() / 1e3, bsc: { tvl: treasury("bsc"), ownTokens: staking('0xa475f643aa480a3df3e9872b6e80e75ae99b19db', '0x3e0a7C7dB7bB21bDA290A80c9811DE6d47781671'), diff --git a/projects/treasury/perfect-pool.js b/projects/treasury/perfect-pool.js index d902784660b6..bc0039ffdebd 100644 --- a/projects/treasury/perfect-pool.js +++ b/projects/treasury/perfect-pool.js @@ -4,7 +4,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const TREASURY = '0xFe4559392aF0E6988F2d7A4E6447a2E702Ff215d' module.exports = { - start: 1725311445, + start: '2024-09-02', base: { tvl: sumTokensExport({ owner: TREASURY, token: ADDRESSES.base.USDC }), } diff --git a/projects/treasury/shibui.js b/projects/treasury/shibui.js index d12d8955f9b4..fd0559b1815b 100644 --- a/projects/treasury/shibui.js +++ b/projects/treasury/shibui.js @@ -6,8 +6,6 @@ const Boba_SHIBUI_WETH = "0xcE9F38532B3d1e00a88e1f3347601dBC632E7a82"; const Boba_SHIBUI_USDT = "0x3f714fe1380ee2204ca499d1d8a171cbdfc39eaa"; module.exports = { - start: 394825, - boba: { tvl: async (api) => { return api.sumTokens({ owners: [ diff --git a/projects/treehouse/index.js b/projects/treehouse/index.js index 449f13ba0b60..7e4fc0214c10 100644 --- a/projects/treehouse/index.js +++ b/projects/treehouse/index.js @@ -49,7 +49,7 @@ async function tvlMantle(api) { module.exports = { methodology: 'Token balance in vault and strategy contracts', - start: 1725926400, // Tuesday, September 10, 2024 12:00:00 AM, + start: '2024-09-10', // Tuesday, September 10, 2024 12:00:00 AM, hallmarks: [[1727218691, "TVL Cap Raise 1"],[1729045223, "TVL Cap Raise 2"]], ethereum: { tvl, diff --git a/projects/truefi/index.js b/projects/truefi/index.js index 87aef85eb869..a9256659a015 100644 --- a/projects/truefi/index.js +++ b/projects/truefi/index.js @@ -81,7 +81,7 @@ async function tvlArbitrum(api) { } module.exports = { - start: 1605830400, // 11/20/2020 @ 12:00am (UTC) + start: '2020-11-20', // 11/20/2020 @ 12:00am (UTC) ethereum: { tvl, staking: staking(stkTRU, TRU), diff --git a/projects/twtstake/index.js b/projects/twtstake/index.js index d9f6c3aa4353..cb11610db3d5 100644 --- a/projects/twtstake/index.js +++ b/projects/twtstake/index.js @@ -7,7 +7,6 @@ module.exports = { [1681948800, "TWTStake Flagged on Twitter"] ], methodology: 'Counts the number of TWT tokens in the TWT Stake contract.', - start: 1000235, bsc: { tvl: () => 0, staking: staking(TWT_STAKE_CONTRACT,TWT_TOKEN_CONTRACT) diff --git a/projects/umamifinance/index.js b/projects/umamifinance/index.js index 4e1f1da2fe94..5e8053f319c5 100644 --- a/projects/umamifinance/index.js +++ b/projects/umamifinance/index.js @@ -32,7 +32,7 @@ const gmVaultsAvax = [ module.exports = { doublecounted: true, - start: 1657027865, // UMAMI deployment block ts + start: '2022-07-05', // UMAMI deployment block ts arbitrum: { staking: stakings([mUMAMI, OHM_STAKING_sUMAMI], UMAMI), tvl: sumERC4626VaultsExport({ vaults: glpVaults.concat(gmVaultsArbitrum), isOG4626: true }), diff --git a/projects/unbk/index.js b/projects/unbk/index.js index a3014df2808c..53a9da7f90f4 100644 --- a/projects/unbk/index.js +++ b/projects/unbk/index.js @@ -46,7 +46,6 @@ async function tvl(timestamp, block, chainBlocks) { module.exports = { methodology: "Accross different vaults, counts the total number of assets accumulated on each of them", - start: 33000000, fantom: { tvl, }, diff --git a/projects/unitus/index.js b/projects/unitus/index.js index 16a937ec8d66..fd04c5bf504e 100644 --- a/projects/unitus/index.js +++ b/projects/unitus/index.js @@ -64,5 +64,5 @@ function chainTvl(chain) { module.exports = { ...generalizedChainExports(chainTvl, Object.keys(allControllers)), - start: 1564165044, // Jul-27-2019 02:17:24 AM +UTC + start: '2019-07-26', // Jul-27-2019 02:17:24 AM +UTC } diff --git a/projects/universe/index.js b/projects/universe/index.js index 69951205154c..383b607ecbb5 100644 --- a/projects/universe/index.js +++ b/projects/universe/index.js @@ -97,5 +97,5 @@ module.exports = { tvl, pool2, }, - start: 1621939189, // May-25-2021 10:39:49 AM +UTC + start: '2021-05-25', // May-25-2021 10:39:49 AM +UTC }; \ No newline at end of file diff --git a/projects/uniwhale/index.js b/projects/uniwhale/index.js index d384ff2f869c..ab0ef6fccdd3 100644 --- a/projects/uniwhale/index.js +++ b/projects/uniwhale/index.js @@ -5,7 +5,7 @@ const UNIWHALE_MARGIN_POOL = "0xBB1B941aB76fAE4e9F552B860eFaC1F367AC9bCc"; const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { - start: 1677833673, + start: '2023-03-03', bsc: { tvl: sumTokensExport({ owners: [UNIWHALE_LIQUIDITY_POOL, UNIWHALE_MARGIN_POOL, ], tokens: [USDT]}), }, diff --git a/projects/uno-farm/index.js b/projects/uno-farm/index.js index 0e8326095935..a3921a64405f 100644 --- a/projects/uno-farm/index.js +++ b/projects/uno-farm/index.js @@ -90,7 +90,7 @@ async function tvl(api) { } module.exports = { - start: 1656018000, + start: '2022-06-23', polygon: { tvl, }, diff --git a/projects/unore/index.js b/projects/unore/index.js index 2e173218aacd..344334bc9224 100644 --- a/projects/unore/index.js +++ b/projects/unore/index.js @@ -43,7 +43,7 @@ const config = { } module.exports = { - start: 1626100000, // Sep-20-2021 07:27:47 AM +UTC + start: '2021-07-12', // Sep-20-2021 07:27:47 AM +UTC kava: { tvl: async () => ({})}, }; diff --git a/projects/uplift/index.js b/projects/uplift/index.js index 5eff4a593156..c1bdce87f706 100644 --- a/projects/uplift/index.js +++ b/projects/uplift/index.js @@ -28,7 +28,7 @@ async function tvl(timestamp, block, chainBlocks) { module.exports = { methodology: "Counts the number of LIFT tokens in the Staking contract", - start: 1637191200, + start: '2021-11-18', bsc: { tvl: () => ({}), staking: tvl, diff --git a/projects/valleyswap/index.js b/projects/valleyswap/index.js index 93f82ef8a9b0..2d58db67a499 100644 --- a/projects/valleyswap/index.js +++ b/projects/valleyswap/index.js @@ -1,7 +1,6 @@ const { getUniTVL } = require('../helper/unknownTokens') module.exports = { - start: 411656, oasis: { tvl: getUniTVL({ factory: '0xa25464822b505968eEc9A45C43765228c701d35f', diff --git a/projects/valueliquid/index.js b/projects/valueliquid/index.js index 587419935192..72dd06ab5a78 100644 --- a/projects/valueliquid/index.js +++ b/projects/valueliquid/index.js @@ -2,6 +2,6 @@ const { v1Tvl } = require('../helper/balancer') module.exports = { - start: 1601440616, // 09/30/2020 @ 4:36am (UTC) + start: '2020-09-30', // 09/30/2020 @ 4:36am (UTC) ethereum: { tvl: v1Tvl('0xebc44681c125d63210a33d30c55fd3d37762675b', 10961776) } }; diff --git a/projects/varen/index.js b/projects/varen/index.js index f62fe68570f6..7fe71195fe3d 100644 --- a/projects/varen/index.js +++ b/projects/varen/index.js @@ -4,7 +4,7 @@ const { getUniTVL } = require('../helper/unknownTokens') const stakingRewards = "0x25a25e2f0d2c211a96fa35e8c670ef6f5b3aba57" module.exports = { - start: 1606392528, // 11/26/2020 @ 12:08:48am (UTC) + start: '2020-11-26', // 11/26/2020 @ 12:08:48am (UTC) ethereum:{ staking: staking(stakingRewards, "0x72377f31e30a405282b522d588aebbea202b4f23"), pool2: pool2(stakingRewards, "0x88024deacdc2e9eda02a3051377ed635381faa54"), diff --git a/projects/vectorreserve/index.js b/projects/vectorreserve/index.js index 3ccda43a60e3..c26d674ee056 100644 --- a/projects/vectorreserve/index.js +++ b/projects/vectorreserve/index.js @@ -10,7 +10,6 @@ async function tvl(api) { module.exports = { methodology: 'Value of ETH and LSD tokens in VETH contract', - start: 19067821, ethereum: { tvl, pool2: staking(['0x2dd568028682ff2961cc341a4849f1b32f371064'], ['0xB6B0C651C37EC4ca81C0a128420e02001A57Fac2', '0x6685fcFCe05e7502bf9f0AA03B36025b09374726']), diff --git a/projects/vela-exchange/index.js b/projects/vela-exchange/index.js index 4e70f94995a1..e8e148734e17 100644 --- a/projects/vela-exchange/index.js +++ b/projects/vela-exchange/index.js @@ -32,7 +32,6 @@ module.exports = { staking: async (api) => velaStaking(api,arbitrumEndpoint) }, base: { - start: 3566528, tvl: staking("0xC4ABADE3a15064F9E3596943c699032748b13352", ADDRESSES.base.USDbC), staking: async (api) => velaStaking(api,baseEndpoint) }, diff --git a/projects/vendor-finance-v2/index.js b/projects/vendor-finance-v2/index.js index 8190c9b908b9..31214b2f1696 100644 --- a/projects/vendor-finance-v2/index.js +++ b/projects/vendor-finance-v2/index.js @@ -45,7 +45,6 @@ const config = { module.exports = { doublecounted: true, methodology: 'The sum of the balance of all listed collateral and lend tokens in all deployed pools.', - start: 88774917, }; Object.keys(config).forEach(chain => { diff --git a/projects/vendor-finance/index.js b/projects/vendor-finance/index.js index 6a649225e6dd..93c3d8f6ce3d 100644 --- a/projects/vendor-finance/index.js +++ b/projects/vendor-finance/index.js @@ -30,7 +30,6 @@ const config = { module.exports = { methodology: 'The sum of the balance of all listed collateral and lend tokens in all deployed pools.', - start: 20274088, deadFrom: '2024-08-30' }; diff --git a/projects/vesper/index.js b/projects/vesper/index.js index bb1fd9204710..715fdc145723 100644 --- a/projects/vesper/index.js +++ b/projects/vesper/index.js @@ -54,6 +54,6 @@ function getChainExports(chain) { } module.exports = { - start: 1608667205, // December 22 2020 at 8:00 PM UTC + start: '2020-12-22', // December 22 2020 at 8:00 PM UTC ...['ethereum', 'avax', 'polygon', 'optimism', 'base'].reduce((acc, chain) => ({ ...acc, ...getChainExports(chain) }), {}) }; diff --git a/projects/vest/index.js b/projects/vest/index.js index 7187a502c5fa..d32ec4257976 100644 --- a/projects/vest/index.js +++ b/projects/vest/index.js @@ -3,7 +3,7 @@ const ADDRESSES = require('../helper/coreAssets.json') module.exports = { methodology: "Total USDC locked in the Vest Exchange.", - start: 1710709200, + start: '2024-03-17', era: { tvl: staking([ "0xf7483A1464DeF6b8d5A6Caca4A8ce7E5be8F1F68", diff --git a/projects/vesta/index.js b/projects/vesta/index.js index ddeaf78332d7..d80dd26384dd 100644 --- a/projects/vesta/index.js +++ b/projects/vesta/index.js @@ -57,7 +57,7 @@ module.exports = { tvl, pool2, }, - start: 1644339600, + start: '2022-02-08', methodology: "Total Value Locked includes all stability pools, troves, and vst pairs", }; diff --git a/projects/vine/index.js b/projects/vine/index.js index db87fd3aaa64..686ef8c3789b 100644 --- a/projects/vine/index.js +++ b/projects/vine/index.js @@ -1,7 +1,7 @@ const { sumTokensExport, nullAddress } = require('../helper/unwrapLPs') module.exports = { - start: 1706475600, + start: '2024-01-28', sapphire: { tvl: sumTokensExport({ owner: '0x1882560361578F2687ddfa2F4CEcca7ae2e614FD', tokens: [nullAddress] }), }, diff --git a/projects/visor/index.js b/projects/visor/index.js index e2e8bfe84638..e18edc2971f7 100644 --- a/projects/visor/index.js +++ b/projects/visor/index.js @@ -9,7 +9,7 @@ const { sumTokens2 } = require('../helper/unwrapLPs') module.exports = { doublecounted: true, - start: 1616679762, // (Mar-25-2021 01:42:42 PM +UTC) + start: '2021-03-25', // (Mar-25-2021 01:42:42 PM +UTC) }; Object.keys(config).forEach(chain => { diff --git a/projects/w3bank/index.js b/projects/w3bank/index.js index dc623b8d9869..8edfb7866477 100644 --- a/projects/w3bank/index.js +++ b/projects/w3bank/index.js @@ -2,7 +2,7 @@ const { lendingMarket } = require("../helper/methodologies"); const { compoundExports2 } = require("../helper/compound"); module.exports = { - start: 1693843200, + start: '2023-09-04', pg: compoundExports2({ comptroller: '0x697bc9fd98ddafd1979c3e079033698ca93af451'}), methodology: `${lendingMarket}`, }; diff --git a/projects/warp/index.js b/projects/warp/index.js index d9f6c370dff6..dae8d74ff2dc 100644 --- a/projects/warp/index.js +++ b/projects/warp/index.js @@ -27,7 +27,7 @@ async function tvl(api) { } module.exports = { - start: 1610650220, + start: '2021-01-14', ethereum: { tvl }, } diff --git a/projects/waterfalldefi/index.js b/projects/waterfalldefi/index.js index e4f68b7560c9..b093f5478389 100644 --- a/projects/waterfalldefi/index.js +++ b/projects/waterfalldefi/index.js @@ -135,7 +135,6 @@ async function tvl(chain, block) { module.exports = { methodology: 'Counts Waterfall DeFi tranche products TVL and staking TVL', - start: 16343128, bsc: { tvl: bscTVL, staking: bscStaking diff --git a/projects/weave/index.js b/projects/weave/index.js index 763b0ef49741..a2691b0457ff 100644 --- a/projects/weave/index.js +++ b/projects/weave/index.js @@ -15,7 +15,6 @@ async function tvl(api) { module.exports = { methodology: 'gets the balance of the strategy contract', - start: 5793963, kava: { tvl, } diff --git a/projects/winr-protocol/index.js b/projects/winr-protocol/index.js index f743a7e34c3a..243db35d0ca7 100644 --- a/projects/winr-protocol/index.js +++ b/projects/winr-protocol/index.js @@ -2,7 +2,6 @@ const { gmxExports } = require('../helper/gmx') const WINR_VAULT_CONTRACT = "0x8c50528F4624551Aad1e7A265d6242C3b06c9Fca"; module.exports = { - start: 67057671, arbitrum: { tvl: gmxExports({ vault: WINR_VAULT_CONTRACT }), }, diff --git a/projects/wowswap/index.js b/projects/wowswap/index.js index c5b9da94b0b0..2d618234b821 100644 --- a/projects/wowswap/index.js +++ b/projects/wowswap/index.js @@ -40,7 +40,7 @@ function tvl(chain) { } module.exports = { - start: 1618218000, // Mon Apr 12 2021 09:00:00 + start: '2021-04-12', // Mon Apr 12 2021 09:00:00 misrepresentedTokens: true, }; diff --git a/projects/xdai/index.js b/projects/xdai/index.js index 6cab74c42c17..87cae71d7740 100644 --- a/projects/xdai/index.js +++ b/projects/xdai/index.js @@ -27,5 +27,5 @@ module.exports = { ethereum: { tvl: eth, }, - start: 1539028166, + start: '2018-10-08', }; diff --git a/projects/xfai/index.js b/projects/xfai/index.js index cc4a44c4254b..c8578d09a0b4 100644 --- a/projects/xfai/index.js +++ b/projects/xfai/index.js @@ -3,7 +3,7 @@ const FACTORY_ADDRESS = "0xa5136eAd459F0E61C99Cec70fe8F5C24cF3ecA26"; module.exports = { methodology: `Sums on-chain tvl by getting pools using xfai factory`, - start: 1692347965 , // Aug-18-2023 08:39:25 AM +UTC + start: '2023-08-18' , // Aug-18-2023 08:39:25 AM +UTC linea: { tvl: async (api) => { const pools = await api.fetchList({ lengthAbi: "uint256:allPoolsLength", itemAbi: "function allPools(uint256) external view returns (address)", target: FACTORY_ADDRESS}) diff --git a/projects/y24/index.js b/projects/y24/index.js index a2ae49cc6f24..86bbc580323e 100644 --- a/projects/y24/index.js +++ b/projects/y24/index.js @@ -6,7 +6,6 @@ const StakingContract2 = '0xe0Ceee33e1CE1EF4EA322B50D55d99E714B7BB6d'; module.exports = { methodology: 'This is the total value locked in y24 staking', - start: 35011373, bsc: { tvl: () => ({}), staking: sumTokensExport({owners: [StakingContract1, StakingContract2], tokens: [TOKEN_ADDRESS], lps: ['0x44628669C0F888b2884d20b94C22af465AA11f05'], useDefaultCoreAssets: true,}) diff --git a/projects/yamato/index.js b/projects/yamato/index.js index 2cde39faa4b5..345d87ca22c1 100644 --- a/projects/yamato/index.js +++ b/projects/yamato/index.js @@ -21,7 +21,7 @@ async function tvl(_, block) { } module.exports = { - start: 1690387200, + start: '2023-07-26', ethereum: { tvl, } diff --git a/projects/yamfore/index.js b/projects/yamfore/index.js index 9a5e32faa3c1..29919f2cb891 100644 --- a/projects/yamfore/index.js +++ b/projects/yamfore/index.js @@ -19,6 +19,6 @@ module.exports = { cardano: { tvl }, - start: 1728878400, + start: '2024-10-14', methodology: "TVL is equal to all ADA, CBLP and USDM (USDM by Moneta) held in the treasury and unlent funds, collected fees and loan collateral held by the V1 script.", }; diff --git a/projects/yaxis/index.js b/projects/yaxis/index.js index 99e18a06ed1d..dbc480845229 100644 --- a/projects/yaxis/index.js +++ b/projects/yaxis/index.js @@ -26,5 +26,5 @@ module.exports = { staking: staking_, pool2: staking(constants.UNISWAP_LPS.map(i => i.staking), constants.UNISWAP_LPS.map(i => i.address)) }, - start: 1600185600, // 09/16/2020 @ 12:00am (UTC+8) + start: '2020-09-15', // 09/16/2020 @ 12:00am (UTC+8) }; diff --git a/projects/yay-staking/index.js b/projects/yay-staking/index.js index c228def2f68d..779c772e8c6a 100644 --- a/projects/yay-staking/index.js +++ b/projects/yay-staking/index.js @@ -11,6 +11,6 @@ const tvl = async (api) => { } module.exports = { - start: 1722488340, + start: '2024-08-01', ethereum: { tvl }, } \ No newline at end of file diff --git a/projects/yearn-ether/index.js b/projects/yearn-ether/index.js index 2077e35232b6..43b1cbaae9e4 100644 --- a/projects/yearn-ether/index.js +++ b/projects/yearn-ether/index.js @@ -7,6 +7,6 @@ async function tvl(api) { module.exports = { methodology: 'counts the total amount of ETH underlying the LSTs deposited into the yETH pool.', - start: 1693971707, + start: '2023-09-06', ethereum: { tvl } }; diff --git a/projects/yetiFinance/index.js b/projects/yetiFinance/index.js index cae094cbd648..6b04ffa4fdbd 100644 --- a/projects/yetiFinance/index.js +++ b/projects/yetiFinance/index.js @@ -1,7 +1,7 @@ // https://yetifinance.medium.com/yeti-finance-wind-down-55913bbf6aed module.exports = { misrepresentedTokens: true, - start: 1650027587, + start: '2022-04-15', deadFrom: '2324-02-10', hallmarks: [ [Math.floor(new Date('2023-12-28')/1e3), 'Protocol decides to wind down'], diff --git a/projects/yfii/index.js b/projects/yfii/index.js index 202195c85d5f..4c9d659208f6 100644 --- a/projects/yfii/index.js +++ b/projects/yfii/index.js @@ -105,6 +105,6 @@ async function tvl(timestamp, block) { module.exports = { doublecounted: true, - start: 1600185600, // 09/16/2020 @ 12:00am (UTC+8) + start: '2020-09-15', // 09/16/2020 @ 12:00am (UTC+8) ethereum: { tvl } }; diff --git a/projects/yiedl-vaults/index.js b/projects/yiedl-vaults/index.js index 3659a661167f..300d674eaf10 100644 --- a/projects/yiedl-vaults/index.js +++ b/projects/yiedl-vaults/index.js @@ -90,6 +90,6 @@ module.exports = { optimism: { tvl, }, - start: 1703073600, // 2023-12-20 12:00:00 UTC + start: '2023-12-20', // 2023-12-20 12:00:00 UTC methodology: 'Calculates the total value of positions held by the YIEDL Vaults in Synthetix Perpetuals.' }; diff --git a/projects/yieldfields/index.js b/projects/yieldfields/index.js index 67ee07a603f1..3caa7cd4bcc5 100644 --- a/projects/yieldfields/index.js +++ b/projects/yieldfields/index.js @@ -6,5 +6,5 @@ module.exports = { bsc: { tvl: getUniTVL({ factory: '0x0A376eE063184B444ff66a9a22AD91525285FE1C', useDefaultCoreAssets: true }), }, - start: 1621263282, // May-17-2021 03:54:42 PM + start: '2021-05-17', // May-17-2021 03:54:42 PM }; diff --git a/projects/yieldyak-staked-avax/index.js b/projects/yieldyak-staked-avax/index.js index c283738089de..98651d7aa56e 100644 --- a/projects/yieldyak-staked-avax/index.js +++ b/projects/yieldyak-staked-avax/index.js @@ -22,7 +22,7 @@ async function avax(api) { } module.exports = { - start: 1658869201, + start: '2022-07-26', methodology: "Total Supply and Underlying Price of the derivative is multiplied, resulting in number of staked Avax tokens.", doublecounted: true, avax: { diff --git a/projects/yldr/index.js b/projects/yldr/index.js index b601e17d0e2c..50187d6585f1 100644 --- a/projects/yldr/index.js +++ b/projects/yldr/index.js @@ -3,7 +3,7 @@ const { getLogs } = require('../helper/cache/getLogs') module.exports = { methodology: 'Get available liquidity for all reserves and include Uniswap V3 positions', - start: 1702931986, + start: '2023-12-18', }; const config = { diff --git a/projects/zeno/index.js b/projects/zeno/index.js index 541525055a30..d76d60bba66b 100644 --- a/projects/zeno/index.js +++ b/projects/zeno/index.js @@ -16,7 +16,7 @@ async function metisTvl(api) { } module.exports = { - start: 1710294153, + start: '2024-03-13', metis: { tvl: metisTvl, }, diff --git a/projects/zeroswap/index.js b/projects/zeroswap/index.js index 17163c26daab..aa538efc9a3d 100644 --- a/projects/zeroswap/index.js +++ b/projects/zeroswap/index.js @@ -10,7 +10,6 @@ const AVAX_STAKING_ADDRESS = '0xa4751EAa89C5D6ff61384766268cabf25aCD1011' module.exports = { methodology: 'Counts tvl of all the tokens staked through Staking Contracts', - start: 1000235, ethereum: { tvl:() => ({}), staking: staking(ETH_STAKING_ADDRESS, ETH_TOKEN_ADDRESS), diff --git a/projects/zkUSD/index.js b/projects/zkUSD/index.js index 7082b7732396..b9a17333fbe8 100644 --- a/projects/zkUSD/index.js +++ b/projects/zkUSD/index.js @@ -6,7 +6,7 @@ const TROVE_MANAGER_ADDRESS = { } module.exports = { - start: 1700000000, // Tuesday, November 14, 2023 10:13:20 PM + start: '2023-11-14', // Tuesday, November 14, 2023 10:13:20 PM }; Object.keys(TROVE_MANAGER_ADDRESS).forEach(chain => { diff --git a/projects/zkdx/index.js b/projects/zkdx/index.js index 2b75c223b56c..4ccd02f99ba9 100644 --- a/projects/zkdx/index.js +++ b/projects/zkdx/index.js @@ -3,7 +3,6 @@ const {staking} = require("../helper/staking"); module.exports = { methodology: 'zkDX counts the staking values as tvl', - start: 3744214, era: { tvl: staking( ["0x79033C597B7d8e752a7511cF24512f4A7217C0B8", "0xd6cce119B45Efcb378a4735a96aE08826A37ca1c", diff --git a/projects/zkswap/index.js b/projects/zkswap/index.js index d9033052013f..267a7a92a828 100644 --- a/projects/zkswap/index.js +++ b/projects/zkswap/index.js @@ -8,7 +8,7 @@ const configs = [ ] module.exports = { - start: 1613135160, // 02/12/2021 @ 01:06pm UTC + start: '2021-02-12', // 02/12/2021 @ 01:06pm UTC ethereum: { tvl: sdk.util.sumChainTvls(configs.map(i => { return async function tvl(api) { diff --git a/utils/scripts/stringTimestamp.js b/utils/scripts/stringTimestamp.js new file mode 100644 index 000000000000..41708cffb2be --- /dev/null +++ b/utils/scripts/stringTimestamp.js @@ -0,0 +1,96 @@ +const fs = require('fs'); +const path = require('path'); + +// Function to convert Unix timestamp to 'YYYY-MM-DD' format +function convertTimestamp(unixTimestamp) { + const date = new Date(unixTimestamp * 1000); + const year = date.getFullYear(); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const day = String(date.getDate()).padStart(2, '0'); + return `${year}-${month}-${day}`; +} + +// Function to process files in the given directory +function processFiles(dir) { + if (['node_modules', 'raindex', 'helper', 'exactly'].some(name => dir.includes(name))) { + return; + } + fs.readdir(dir, (err, files) => { + if (err) { + console.error(`Error reading directory ${dir}:`, err); + return; + } + + files.forEach(file => { + const filePath = path.join(dir, file); + fs.stat(filePath, (err, stats) => { + if (err) { + console.error(`Error stating file ${filePath}:`, err); + return; + } + + if (stats.isFile()) { + fs.readFile(filePath, 'utf8', (err, data) => { + if (err) { + console.error(`Error reading file ${filePath}:`, err); + return; + } + + const regex = /start:\s*(\d+)/g; + const newData = data.replace(regex, (match, p1) => { + if (!/^\d{10}$/.test(p1)) { + console.error(`Invalid Unix timestamp ${p1} in file ${filePath}`); + return match; + } + + const year = new Date(parseInt(p1, 10) * 1000).getFullYear(); + if (year < 2005 || year > 2055) { + console.error(`Year ${year} out of range for timestamp ${p1} in file ${filePath}`); + return match; + } + const newTimestamp = convertTimestamp(parseInt(p1, 10)); + return `start: '${newTimestamp}'`; + }); + + if (newData !== data) { + fs.writeFile(filePath, newData, 'utf8', err => { + if (err) { + console.error(`Error writing file ${filePath}:`, err); + } else { + console.log(`Updated file ${filePath}`); + } + }); + } + }); + } else if (stats.isDirectory()) { + processFiles(filePath); + } + }); + }); + }); +} + +// Get the directory two levels up +const baseDir = path.resolve(__dirname, '../../projects'); + +// Process all directories two levels up +fs.readdir(baseDir, (err, dirs) => { + if (err) { + console.error(`Error reading base directory ${baseDir}:`, err); + return; + } + + dirs.forEach(dir => { + const dirPath = path.join(baseDir, dir); + fs.stat(dirPath, (err, stats) => { + if (err) { + console.error(`Error stating directory ${dirPath}:`, err); + return; + } + + if (stats.isDirectory()) { + processFiles(dirPath); + } + }); + }); +}); \ No newline at end of file From 5888991bebd5e52bf618763bcda6430c6b28810b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:57:07 +0100 Subject: [PATCH 486/787] fix elixir --- projects/elixir/index.js | 2 +- projects/helper/coreAssets.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/elixir/index.js b/projects/elixir/index.js index 14febf5d5be4..04681dee2bf0 100644 --- a/projects/elixir/index.js +++ b/projects/elixir/index.js @@ -39,7 +39,7 @@ module.exports = { tvl: async (api) => { // const deusdSupply = await api.call({ target: deUSD, abi: "erc20:totalSupply" }) // api.add(deUSD, deusdSupply); - await api.sumTokens({ owners: [COMMITS, FOUNDATION, FOUNDATION_2], tokens: [ADDRESSES.ethereum.STETH, ADDRESSES.null, ADDRESSES.ethereum.SDAI] }) + await api.sumTokens({ owners: [COMMITS, FOUNDATION, FOUNDATION_2], tokens: [ADDRESSES.ethereum.STETH, ADDRESSES.null, ADDRESSES.ethereum.SDAI, ADDRESSES.ethereum.sUSDS] }) }, pool2: sumTokensExport({ owner: DEUSD_LP_STAKING, tokens: LP_TOKENS }) }, diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 8201ef6787cd..22548e838cc4 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -43,6 +43,7 @@ "sUSD_OLD": "0x57ab1e02fee23774580c119740129eac7081e9d3", "sUSD": "0x57Ab1ec28D129707052df4dF418D58a2D46d5f51", "sUSDe": "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497", + "sUSDS": "0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD", "SUSHI": "0x6b3595068778dd592e39a122f4f5a5cf09c90fe2", "cbETH": "0xBe9895146f7AF43049ca1c1AE358B0541Ea49704", "FDUSD": "0xc5f0f7b66764f6ec8c8dff7ba683102295e16409", From c85b4365c331e59f7b2e752aecd8aa679bb93061 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:18:14 +0100 Subject: [PATCH 487/787] ignore unreachable code --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 73cae073d2f7..bb9d6c8514c2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,5 +16,6 @@ module.exports = { "no-unused-vars": "off", "no-useless-escape": "warn", "no-prototype-builtins": "off", + "no-unreachable": "off", } } From 08306109778837d563de91d5b0404e0a065d7dd7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:20:34 +0100 Subject: [PATCH 488/787] tempfix fluid tokens --- projects/fluidtokens/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/fluidtokens/index.js b/projects/fluidtokens/index.js index 9f5649485c0f..e17151a6f184 100644 --- a/projects/fluidtokens/index.js +++ b/projects/fluidtokens/index.js @@ -59,7 +59,8 @@ async function tvl() { const boosted=parseInt(boosted_tvl.bs_available_volume)+parseInt(boosted_tvl.bs_active_volume); return { - cardano: (SC_offers_tvl+repay_tvl+pools_tvl+boosted) / 1e6, + // cardano: (SC_offers_tvl+repay_tvl+pools_tvl+boosted) / 1e6, + cardano: (SC_offers_tvl+pools_tvl+boosted) / 1e6, }; } From 7411c72faaaeab823eb3d560abaf3d7d7ff0e6c3 Mon Sep 17 00:00:00 2001 From: CardanoTokenIO <163329108+CardanoTokenIO@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:29:48 +0100 Subject: [PATCH 489/787] Include another script address for TVL (#12454) --- projects/danzo-arena/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/danzo-arena/index.js b/projects/danzo-arena/index.js index 95b91240b0d8..6d896b7e831d 100644 --- a/projects/danzo-arena/index.js +++ b/projects/danzo-arena/index.js @@ -3,6 +3,7 @@ const { sumTokensExport } = require("../helper/chain/cardano"); const scriptAdresses = [ "addr1vx4caaf06swdn7cdfc7pu3sw235zvuhd02tw2np4uac9mwcp2vt4y", //Danzo Tokens locked inside the address for the DeFi game DANZO ARENA: https://danzo.gg/arena/ "addr1q8wu9v2wn8hkzq2g7q3ez8a99thw0gwmlhgpc2crmfk982xr2rqrszevgfwunrxu8ajh7pfhmaf6ppj60nj8rnhqhl4srgnekp", //Danzo Tokens locked inside the address for the DeFi game DANZO Game: https://danzo.gg + "addr1vxherk6ug9235v0mrrmywsr2493sxsydmaylzajs7xavd9q30593r", //Sugar tokens locked inside the address for the DeFi game Sugar Factory: https://sugar.systems/factory ]; module.exports = { From ae0cdd3e87ab767553a4e900e2157ab4dd3b5a81 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:32:51 +0100 Subject: [PATCH 490/787] Update: RocketPool (#12451) --- projects/rocketpool/index.js | 66 +++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 19 deletions(-) diff --git a/projects/rocketpool/index.js b/projects/rocketpool/index.js index 3553ad32c4be..8b5631eb2339 100644 --- a/projects/rocketpool/index.js +++ b/projects/rocketpool/index.js @@ -1,4 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') +const sdk = require('@defillama/sdk') const ETH = ADDRESSES.null const RPL = '0xd33526068d116ce69f19a9ee46f0bd304f21a51f' @@ -7,6 +8,7 @@ const rocketVault = '0x3bDC69C4E5e13E52A65f5583c23EFB9636b469d6' const rocketRewardsPool = '0xEE4d2A71cF479e0D3d0c3c2C923dbfEB57E73111' const trustedNodeManager = '0xb8e783882b11Ff4f6Cef3C501EA0f4b960152cc9' const rocketNodeStaking = '0xF18Dc176C10Ff6D8b5A17974126D43301F8EEB95' +const backfill_node_first_block = 21060563 const abi = { getNodeCount: "function getNodeCount() view returns (uint256)", @@ -21,14 +23,17 @@ const abi = { getNodeETHProvided: "function getNodeETHProvided(address _nodeAddress) view returns (uint256)", }; -const tvl = async (api) => { - const [nodeLength, pendingETHRewards, depositPoolBalance] = await Promise.all([ - api.call({ target: rocketNodeManager, abi: abi.getNodeCount }), - api.call({ target: rocketRewardsPool, abi: abi.getPendingETHRewards }), - api.call({ target: rocketVault, abi: abi.balanceOf, params: ['rocketDepositPool'] }), - ]) +const nodeBalances = async (api) => { + /** + Small hack for backfilling: the following code uses a recent contract deployed just 180 days ago. It allows retrieving all the nodeAddresses, + even those prior to this date. If the backfill api's timestamp is earlier than the contract's creation date, we use the creation date as the limit + to continue making calls. We'll then apply a filter to exclude nodeAddresses with registrationTime > api.timestamp + */ - const addresses = await api.call({ target: rocketNodeManager, abi: abi.getNodeAddresses, params: [0, nodeLength] }); + const block = await api.getBlock() < backfill_node_first_block ? backfill_node_first_block : await api.getBlock() + const nodeApi = new sdk.ChainApi({ chain: api.chain, block }) + const nodeLength = await nodeApi.call({ target: rocketNodeManager, abi: abi.getNodeCount }) + const addresses = await nodeApi.call({ target: rocketNodeManager, abi: abi.getNodeAddresses, params: [0, nodeLength] }); const batchSize = 100; const batchedAddresses = []; @@ -36,18 +41,34 @@ const tvl = async (api) => { batchedAddresses.push(addresses.slice(i, i + batchSize)); } - const results = await Promise.all( - batchedAddresses.map(async (batch) => { - const details = await api.multiCall({ calls: batch.map((address) => ({ target: rocketNodeManager, params: [address] })), abi: abi.getNodeDetails, permitFailure: true }) - const ethProvided = await api.multiCall({ calls: batch.map((address) => ({ target: rocketNodeStaking, params: [address] })), abi: abi.getNodeETHProvided, permitFailure: true }) - return { details: details ? details.filter((result) => result && result.exists) : [], ethProvided: ethProvided || [] }; - }) - ) - + const results = []; + for (const batch of batchedAddresses) { + const details = await nodeApi.multiCall({ calls: batch.map((address) => ({ target: rocketNodeManager, params: [address] })), abi: abi.getNodeDetails, permitFailure: true }); + const ethProvided = await nodeApi.multiCall({ calls: batch.map((address) => ({ target: rocketNodeStaking, params: [address] })), abi: abi.getNodeETHProvided, permitFailure: true }); + + const filteredResults = []; + if (details) { + for (let i = 0; i < details.length; i++) { + const detail = details[i]; + if (detail && detail.exists && detail.registrationTime <= api.timestamp) { + filteredResults.push({ + detail, + ethProvided: ethProvided[i] || 0, + }); + } + } + } + + results.push({ + details: filteredResults.map((result) => result.detail), + ethProvided: filteredResults.map((result) => result.ethProvided), + }); + } + const flattenedDetails = results.flatMap((result) => result.details); const flattenedEthProvided = results.flatMap((result) => result.ethProvided); - const { minipoolCount, ethMatched, nodeEthProvided } = flattenedDetails.reduce( + const { minipoolCount, ethMatched, nodeEthProvided} = flattenedDetails.reduce( (acc, curr, index) => { if (!curr) return acc; acc.minipoolCount += Number(curr.minipoolCount) || 0; @@ -55,10 +76,16 @@ const tvl = async (api) => { acc.nodeEthProvided += Number(flattenedEthProvided[index]) || 0; return acc; }, - { minipoolCount: 0, ethMatched: 0, nodeEthProvided: 0 } + { minipoolCount: 0, ethMatched: 0, nodeEthProvided: 0} ); - api.add(ETH, [pendingETHRewards, depositPoolBalance, ethMatched, nodeEthProvided]) + api.add(ETH, [ethMatched, nodeEthProvided]) +} + +const tvl = async (api) => { + await nodeBalances(api) + const depositPoolBalance = await api.call({ target: rocketVault, abi: abi.balanceOf, params: ['rocketDepositPool'] }) + api.add(ETH, depositPoolBalance) } const staking = async (api) => { @@ -68,6 +95,7 @@ const staking = async (api) => { } module.exports = { - methodology: 'TVL represents the total ETH from the minipools as well as the staking rewards pending distribution', + start: 1633046400, + methodology: 'TVL represents the total ETH from the minipools', ethereum: { tvl, staking } } \ No newline at end of file From d257cac8443631f45828f57c3395782d72425661 Mon Sep 17 00:00:00 2001 From: usr-icon-foundation <111794534+usr-icon-foundation@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:33:12 +0100 Subject: [PATCH 491/787] Add SOL and XLM tracking for Balanced (#12450) --- projects/balanced/helper.js | 2 ++ projects/balanced/index.js | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/projects/balanced/helper.js b/projects/balanced/helper.js index 1f2e07b1de8e..a0cc5fb5a6fe 100644 --- a/projects/balanced/helper.js +++ b/projects/balanced/helper.js @@ -43,6 +43,8 @@ const networkIdentifiers = { "0xa4b1.arbitrum": "arbitrum", "0x2105.base": "base", "sui/0000000000000000000000000000000000000000000000000000000000000002::sui::SUI": "sui", + "solana/11111111111111111111111111111111" : "solana", + "stellar/CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA" : "stellar" } // Get decimals of cross-chain Balanced assets in balancedAssetManagerContract diff --git a/projects/balanced/index.js b/projects/balanced/index.js index 7ccfd8a3bc44..ef9b6cbbf4ce 100644 --- a/projects/balanced/index.js +++ b/projects/balanced/index.js @@ -44,4 +44,10 @@ module.exports = { sui: { tvl: async () => await computeTVL("sui"), }, + solana: { + tvl: async () => await computeTVL("solana"), + }, + stellar: { + tvl: async () => await computeTVL("stellar"), + } }; From fabdd28744118afb4f96b20957dc51a421de10d4 Mon Sep 17 00:00:00 2001 From: Ss5h Date: Wed, 27 Nov 2024 20:33:54 +0900 Subject: [PATCH 492/787] add cbBTC in btcfi-cdp (#12449) --- projects/btcfi-cdp/index.js | 3 ++- projects/helper/coreAssets.json | 3 ++- projects/helper/tokenMapping.js | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/btcfi-cdp/index.js b/projects/btcfi-cdp/index.js index 887b1469872b..8886bd5226df 100644 --- a/projects/btcfi-cdp/index.js +++ b/projects/btcfi-cdp/index.js @@ -6,7 +6,8 @@ const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const chainPools = { bfc: { WBTC: { pool: '0xA84F9F42dF222da491571Fb70cCc11AC84B7F29D', token: ADDRESSES.bfc.WBTC }, - BTCB: { pool: '0xee66D8C40282439F2eE855D8a3666FB73257D349', token: ADDRESSES.bfc.BTCB } + BTCB: { pool: '0xee66D8C40282439F2eE855D8a3666FB73257D349', token: ADDRESSES.bfc.BTCB }, + cbBTC: { pool: '0xED00a5201607aa26CDDcdcf1583845e7435a2F39', token: ADDRESSES.bfc.cbBTC } }, } diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 22548e838cc4..c7a0e7a61507 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1607,7 +1607,8 @@ "WBTC": "0x7b8FAC5F29E101BaaB33c5f9c39d4F85ba2cc7C1", "BTCB": "0xd267F821F1b8344B5A63626c8c824697194A173E", "BitcoinUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555", - "BtcUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555" + "BtcUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555", + "cbBTC": "0x74B73Fd2eE237e9219dF30dfFDB206D237cbFC00" }, "scroll": { "WETH": "0x5300000000000000000000000000000000000004", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index fcca5c170502..c358488c5e64 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -73,6 +73,9 @@ const fixBalancesTokens = { }, hela: { '0x3a035615e101373fa9ba21c5bea7fe4026fc40b4': { coingeckoId: "hela-usd", decimals: 18 }, + }, + bfc: { + '0x74B73Fd2eE237e9219dF30dfFDB206D237cbFC00': { coingeckoId: "coinbase-wrapped-btc", decimals: 8 }, } } From 8386a39c6294da06fd470dde06e6a2c263277aef Mon Sep 17 00:00:00 2001 From: aredtabora <165096994+aredtabora@users.noreply.github.com> Date: Wed, 27 Nov 2024 14:35:14 +0300 Subject: [PATCH 493/787] add ShardingDAO tvl (#12448) Co-authored-by: aredtabora --- projects/shardingdao/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/shardingdao/index.js diff --git a/projects/shardingdao/index.js b/projects/shardingdao/index.js new file mode 100644 index 000000000000..c54a72193929 --- /dev/null +++ b/projects/shardingdao/index.js @@ -0,0 +1,14 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); +const coreAssets = require("../helper/coreAssets.json"); + +const tokens = [ + coreAssets.null, + coreAssets.ethereum.WBTC +]; + +module.exports = { + ethereum: { + tvl: sumTokensExport({ owner: "0x0feCcB11C5B61B3922C511d0f002c0b72D770dCE", tokens: tokens }) + }, + methodology: "Currently TVL is calculated as the sum of the assets locked inside the staking pool, including WBTC and native Ethereum on the contract." +}; From 3551dd446421270feacc0c7082f5fc6bc0fa1155 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 27 Nov 2024 12:53:44 +0100 Subject: [PATCH 494/787] track levva #12443 --- projects/levva/config.js | 67 +++++++++++++++++++++++++++++++ projects/levva/index.js | 85 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 projects/levva/config.js create mode 100644 projects/levva/index.js diff --git a/projects/levva/config.js b/projects/levva/config.js new file mode 100644 index 000000000000..e30bd8d4606a --- /dev/null +++ b/projects/levva/config.js @@ -0,0 +1,67 @@ +module.exports = { + arbitrum: { + factories: [ + { + factory: "0x1e36749E00229759dca262cB25Ad8d9B21bEB3F5", + fromBlock: 144171029, + version: "v1", + }, + { + factory: "0x537A3417Fe03e28F4E9640Bece70887a6938ff92", + fromBlock: 208756175, + version: "v1.5", + }, + { + factory: "0x4a805A6dbaCF824D5A39b9f3559aeFb831C1df95", + fromBlock: 220673210, + version: "v1.5", + }, + ], + contractRegistries: [ + { + fromBlock: 257563019, + address: "0x7a923e412B934ceC16042AA28244eE4881f9B722", + } + ] + }, + blast: { + factories: [ + { + factory: "0x1768Faee0A63927FeB81100046f5D63BfE0f08dB", + fromBlock: 501400, + version: "v1.5", + }, + ], + contractRegistries:[], + }, + ethereum: { + factories: [ + { + factory: "0xF8D88A292B0afa85E5Cf0d1195d0D3728Cfd7070", + fromBlock: 19824726, + version: "v1.5", + }, + { + factory: "0xc1aC50D46783387F4236a8364435b5CCEaDd9fe2", + fromBlock: 20725907, + version: "v1.5" + } + ], + contractRegistries: [ + { + fromBlock: 21027804, + address: "0x8Dbc09C0BD6D99AF01B8254432A13E6FF1b214Bd", + } + ] + }, + linea: { + factories: [ + { + factory: "0xF97305253804e7A7796f79aB4f8c8908492A8402", + fromBlock: 9312068, + version: "v1.5" + } + ], + contractRegistries:[], + } +}; diff --git a/projects/levva/index.js b/projects/levva/index.js new file mode 100644 index 000000000000..d22299f7a673 --- /dev/null +++ b/projects/levva/index.js @@ -0,0 +1,85 @@ +const { getLogs2 } = require("../helper/cache/getLogs"); +const { sumTokens2 } = require("../helper/unwrapLPs"); +const config = require("./config"); + +module.exports = { + methodology: + "Counts the number of base and quote tokens in every marginly pool and underlying tokens in every levva vaults", +}; + +Object.keys(config).forEach((chain) => { + const { factories, contractRegistries } = config[chain]; + + module.exports[chain] = { + tvl: async (api) => { + await getPoolTvl(api, factories); + await getVaultTvl(api, contractRegistries); + }, + }; +}); + + +async function getPoolTvl(api, factories){ + const ownerTokens = []; + + for (const { factory, fromBlock, version } of factories) { + let logs; + if (version === "v1") { + // v1.0 contract + logs = await getLogs2({ + api, + target: factory, + eventAbi: + "event PoolCreated(address indexed quoteToken, address indexed baseToken, address uniswapPool, bool quoteTokenIsToken0, address pool)", + fromBlock, + }); + } else { + // v1.5 contract + logs = await getLogs2({ + api, + target: factory, + eventAbi: + "event PoolCreated(address indexed quoteToken, address indexed baseToken, address indexed priceOracle, uint32 defaultSwapCallData, address pool)", + fromBlock, + }); + } + + logs.forEach((i) => + ownerTokens.push([[i.quoteToken, i.baseToken], i.pool]) + ); + } + + await sumTokens2({ api, ownerTokens }); +} + +async function getVaultTvl(api, contractRegistries) { + const LEVVA_VAULT_CONTRACT_TYPE = 2000; + + const vaults = []; + // Retrieve logs from each contract registry to identify vaults + for (const { address, fromBlock } of contractRegistries) { + const logs = await getLogs2({ + api, + target: address, + eventAbi: "event ContractRegistered(uint64 contractType, address contractAddress, bytes data)", + fromBlock, + }); + + // Filter logs to find levva vault contracts + logs.forEach((l) => { + if (Number.parseInt(l.contractType) === LEVVA_VAULT_CONTRACT_TYPE) + vaults.push(l.contractAddress); + }); + } + + const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults}) + const marginlyLent = await api.multiCall({ abi: 'function getLentAmount(uint8 protocol) view returns (uint256)', calls: vaults.map((i) => ({ target: i, params: 0})) }) + const totalLent = await api.multiCall({ abi: 'uint256:getTotalLent', calls: vaults }) + // Add total lent amount to balances + api.add(tokens, totalLent) + // Subtract marginlyLent from balances since it is counted as marginly pool TVL + api.add(tokens, marginlyLent.map(i => i * -1)) + + // Add free amount in ERC4626 + await api.erc4626Sum({ calls: vaults, tokenAbi: 'asset', balanceAbi: 'getFreeAmount' }); +} From 793d62464b64be92a1c881ec87b220e6d89b0e26 Mon Sep 17 00:00:00 2001 From: Yasir Ejaz <105588724+yasir7ca@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:01:18 +0400 Subject: [PATCH 495/787] Bluefin AMM TVL Listing (#12447) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/bluefin-amm/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/bluefin-amm/index.js diff --git a/projects/bluefin-amm/index.js b/projects/bluefin-amm/index.js new file mode 100644 index 000000000000..47c79bb91426 --- /dev/null +++ b/projects/bluefin-amm/index.js @@ -0,0 +1,19 @@ +const sui = require("../helper/chain/sui"); +const { getConfig } = require('../helper/cache'); + +async function suiTvl(api) { + const pools = (await getConfig('bluefin/amm-sui', 'https://swap.api.sui-prod.bluefin.io/api/v1/pools/info')).map(i => i.address) + const res = await sui.getObjects(pools) + res.forEach((i) => { + const [coinA, coinB] = i.type.split('<')[1].split('>')[0].split(', ') + api.add(coinA, i.fields.coin_a) + api.add(coinB, i.fields.coin_b) + }) +} + + +module.exports = { + sui: { + tvl: suiTvl + }, +} \ No newline at end of file From 73abdb12e25589ffafbcdbb2c6ce27dbe74bbf28 Mon Sep 17 00:00:00 2001 From: yongjun925 Date: Wed, 27 Nov 2024 20:45:26 +0800 Subject: [PATCH 496/787] Add DODO Zircuit Mainnet pool data. (#12455) --- projects/dodo/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/dodo/index.js b/projects/dodo/index.js index f2fd2fac38df..af0026414ca7 100644 --- a/projects/dodo/index.js +++ b/projects/dodo/index.js @@ -25,6 +25,7 @@ const config = { scroll: { dvmFactory: '0x5a0C840a7089aa222c4458b3BE0947fe5a5006DE', fromBlock: 83070, dspFactory: '0x7E9c460d0A10bd0605B15F0d0388e307d34a62E6', dppFactory: '0x31AC053c31a77055b2ae2d3899091C0A9c19cE3a' }, manta: { dvmFactory: '0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83', fromBlock: 384137, dspFactory: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1', dppFactory: '0xa71415675F68f29259ddD63215E5518d2735bf0a' }, mantle: { dvmFactory: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1', fromBlock: 21054048, dspFactory: '0x7dB214f2D46d94846936a0f8Bd9044c5C5Bd2b93', dppFactory: '0x46AF6b152F2cb02a3cFcc74014C2617BC4F6cD5C' }, + zircuit: { dvmFactory: '0xA909314363840f7c28b8EC314028e21722dd8Cb6', fromBlock: 1455081, dspFactory: '0xA312D73C1b537168f1C8588bDcaB9278df98Cd32', dppFactory: '0xb770C37F3A9eC6f25b791D9c791aDE09B0fb1AB8' }, // okexchain: { dvmFactory: '0x9aE501385Bc7996A2A4a1FBb00c8d3820611BCB5', fromBlock: 4701083, dspFactory: '0x44D5dF24d5Ef52A791D6436Fa45A8D426f6de34e' }, } From 78a16f910f41d3f331dbc3a01d382ca88928a685 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Wed, 27 Nov 2024 13:44:21 +0000 Subject: [PATCH 497/787] pendle bsc --- projects/pendle/v2.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/pendle/v2.js b/projects/pendle/v2.js index 93db46e33423..5f6a47bdd07b 100644 --- a/projects/pendle/v2.js +++ b/projects/pendle/v2.js @@ -36,6 +36,8 @@ const config = { "0x5ec2ae0afdec891e7702344dc2a31c636b3627eb", "0x70c1138b54ba212776d3a9d29b6160c54c31cd5d", "0x04eb6b56ff53f457c8e857ca8d4fbc8d9a531c0c", + "0x541b5eeac7d4434c8f87e2d32019d67611179606", + "0x5d1735b8e33bae069708cea245066de1a12cd38d" ], }, optimism: { @@ -118,7 +120,9 @@ Object.keys(config).forEach((chain) => { }); data.forEach((v, i) => { - let value = supply[i] * 10 ** (v.decimals - decimals[i]); + let value = supply[i] * 10 ** (v.decimals - + (sy[i].toLowerCase() == '0x7b5a43070bd97c2814f0d8b3b31ed53450375c19' // case for vbnb + ? 18 : decimals[i])); let index = tokenAssetTypeSy.indexOf(sy[i]); if (index !== -1) { value = (value * exchangeRates[index]) / 10 ** 18; From 8843b16a3b9bafb546e8196a10521c32cc0edc85 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 27 Nov 2024 16:40:59 +0100 Subject: [PATCH 498/787] pendle: add base --- projects/pendle/v2.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/pendle/v2.js b/projects/pendle/v2.js index 5f6a47bdd07b..d1eb41e6cecd 100644 --- a/projects/pendle/v2.js +++ b/projects/pendle/v2.js @@ -56,6 +56,11 @@ const config = { { factory: "0xcb02435716b0143d4ac1bdf370302d619e714126", fromBlock: 67661738 }, // v5 ], }, + base: { + factories: [ + { factory: "0x5202F7477685686284b3F47B0A5334b15ea0393D", fromBlock: 22350099 }, // v3 + ], + } }; module.exports = {}; @@ -153,4 +158,4 @@ async function filterWhitelistedSY(api, sys) { module.exports.ethereum.staking = staking( contracts.v2.vePENDLE, contracts.v2.PENDLE -); +); \ No newline at end of file From 3bf204da907f806eb8092382f178b7d23226726d Mon Sep 17 00:00:00 2001 From: GooGrand <55867268+GooGrand@users.noreply.github.com> Date: Wed, 27 Nov 2024 22:58:49 +0600 Subject: [PATCH 499/787] Add new cytonic chains (#12452) --- projects/cytonic/index.js | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/projects/cytonic/index.js b/projects/cytonic/index.js index cb9e01c15f72..ab4ac254cfc0 100644 --- a/projects/cytonic/index.js +++ b/projects/cytonic/index.js @@ -36,7 +36,6 @@ const idl = { "errors": [] } - const BRIDGE_DEPOSITOR_EVM = '0xaEA5Bf79F1E3F2069a99A99928927988EC642e0B'; const BRIDGE_DEPOSITOR_SOL = 'HYDqq5GfUj4aBuPpSCs4fkmeS7jZHRhrrQ3q72KsJdD4'; @@ -143,6 +142,30 @@ module.exports = { ], }), }, + manta: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // ETH + ADDRESSES.manta.WETH, // WETH + ADDRESSES.manta.USDC, // USDC + ADDRESSES.manta.USDT, // USDT + "0x1468177dbcb2a772f3d182d2f1358d442b553089", // Manta mBTC + "0xaccbc418a994a27a75644d8d591afc22faba594e", // Manta mETH + "0x649d4524897ce85a864dc2a2d5a11adb3044f44a", // Manta mUSD + ], + }) + }, + bsquared: { + tvl: sumTokensExport({ + owner: BRIDGE_DEPOSITOR_EVM, + tokens: [ + ADDRESSES.null, // BTC + ADDRESSES.bsquared.WBTC, // WBTC + ADDRESSES.bsquared.USDT, // USDT + ], + }) + }, solana: { tvl: sol_tvl } From 537796e63ef48df74f13edba515196fa6194e9fd Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 28 Nov 2024 01:04:59 +0000 Subject: [PATCH 500/787] add hallmark --- projects/hydrometer/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/hydrometer/index.js b/projects/hydrometer/index.js index 759955785b4f..9a59ad55e962 100644 --- a/projects/hydrometer/index.js +++ b/projects/hydrometer/index.js @@ -2,6 +2,9 @@ const { uniTvlExport } = require('../helper/calculateUniTvl.js') module.exports = { misrepresentedTokens: true, + hallmarks: [ + [1732734407,"Rug Pull"] + ], base: { tvl: uniTvlExport("0xF60caCf0A3daa5B6a79ca6594BEF38F85391AE0A", undefined, undefined, { allPairsLength: 'uint256:allPoolsLength', From bdd3bd154ad211484e91d496817783eeddd91c13 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:45:02 +0100 Subject: [PATCH 501/787] track dexodus #12473 --- projects/dexodus/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/dexodus/index.js diff --git a/projects/dexodus/index.js b/projects/dexodus/index.js new file mode 100644 index 000000000000..890dabbf6e45 --- /dev/null +++ b/projects/dexodus/index.js @@ -0,0 +1,9 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require('../helper/unwrapLPs'); + +module.exports = { + methodology: 'Counts the USDC and WETH tokens in the Dexodus liquidity pool on Base.', + base: { + tvl: sumTokensExport({ owner: '0x1A84d7E27e7f0e93Da74b93095e342b6e8dBd50A', tokens: [ADDRESSES.base.USDbC, ADDRESSES.base.WETH] }), + }, +}; From 024eb65ffff3c0053771c5901f3f3d9c5411f11d Mon Sep 17 00:00:00 2001 From: usr-icon-foundation <111794534+usr-icon-foundation@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:45:48 +0100 Subject: [PATCH 502/787] Refactor helper.js (#12471) --- projects/balanced/helper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/balanced/helper.js b/projects/balanced/helper.js index a0cc5fb5a6fe..6e487e64654e 100644 --- a/projects/balanced/helper.js +++ b/projects/balanced/helper.js @@ -42,9 +42,9 @@ const networkIdentifiers = { "injective-1/inj": "injective", "0xa4b1.arbitrum": "arbitrum", "0x2105.base": "base", - "sui/0000000000000000000000000000000000000000000000000000000000000002::sui::SUI": "sui", - "solana/11111111111111111111111111111111" : "solana", - "stellar/CAS3J7GYLGXMF6TDJBBYYSE3HQ6BBSMLNUQ34T6TZMYMW2EVH34XOWMA" : "stellar" + "sui": "sui", + "solana" : "solana", + "stellar" : "stellar" } // Get decimals of cross-chain Balanced assets in balancedAssetManagerContract From 204d096ec42a70767b9d5a4a21dfba6b881d664b Mon Sep 17 00:00:00 2001 From: Roy <42067944+royvardhan@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:21:49 +0530 Subject: [PATCH 503/787] feat: add vapordex apechain (#12467) --- projects/vapordex-v2/index.js | 4 ++++ projects/vapordex/index.js | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/projects/vapordex-v2/index.js b/projects/vapordex-v2/index.js index 4e6f81e8e62a..1d7f24353025 100644 --- a/projects/vapordex-v2/index.js +++ b/projects/vapordex-v2/index.js @@ -9,4 +9,8 @@ module.exports = uniV3Export({ factory, fromBlock: 312329030, }, + apechain: { + factory, + fromBlock: 2671998, + }, }); diff --git a/projects/vapordex/index.js b/projects/vapordex/index.js index a1f5a2e57bd0..a999bd25113d 100644 --- a/projects/vapordex/index.js +++ b/projects/vapordex/index.js @@ -2,6 +2,7 @@ const { getUniTVL } = require("../helper/unknownTokens"); const FACTORY_TELOS = "0xDef9ee39FD82ee57a1b789Bc877E2Cbd88fd5caE"; const FACTORY_AVAX = "0xc009a670e2b02e21e7e75ae98e254f467f7ae257"; +const FACTORY_APECHAIN = "0xc009a670e2b02e21e7e75ae98e254f467f7ae257"; module.exports = { telos: { tvl: getUniTVL({ @@ -17,6 +18,13 @@ module.exports = { }), }, + apechain: { + tvl: getUniTVL({ + factory: FACTORY_APECHAIN, + useDefaultCoreAssets: true, + }), + }, + methodology: "TVL comes from the DEX liquidity pools, and is pulled from the factory contract:", }; From c1faaa7019ddb92877712eea38b2f0ae6a3fe897 Mon Sep 17 00:00:00 2001 From: Deploydon <96504831+Deploydon@users.noreply.github.com> Date: Thu, 28 Nov 2024 04:58:33 -0500 Subject: [PATCH 504/787] Added Jade.Money (#12464) --- projects/jademoney/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/jademoney/index.js diff --git a/projects/jademoney/index.js b/projects/jademoney/index.js new file mode 100644 index 000000000000..9a592c31730b --- /dev/null +++ b/projects/jademoney/index.js @@ -0,0 +1,16 @@ +const { queryContract } = require("../helper/chain/cosmos"); + +const jadeContract = "neutron1mdy5fhtwdjagp5eallsdhlx6gxylm8rxqk72wjzg6y5d5kt44ysqprkduw"; +const usdcDenom = "ibc/B559A80D62249C8AA07A380E2A2BEA6E5CA9A6F079C912C3A9E9B494105E4F81"; + +async function tvl(api) { + const data = await queryContract({ contract: jadeContract, chain: "neutron", data: "{\"value\":{}}" }); + api.add(usdcDenom, data); +} + +module.exports = { + methodology: "Queries the Jade.Money contract for the total value of USDC deposits.", + neutron: { + tvl + } +} \ No newline at end of file From 9c344ab8ce9666a7ca73cbb059f80cae0944c545 Mon Sep 17 00:00:00 2001 From: marakitio Date: Thu, 28 Nov 2024 13:10:16 +0300 Subject: [PATCH 505/787] Create Tonyielding (#12462) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/tonyielding/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/tonyielding/index.js diff --git a/projects/tonyielding/index.js b/projects/tonyielding/index.js new file mode 100644 index 000000000000..640619f60573 --- /dev/null +++ b/projects/tonyielding/index.js @@ -0,0 +1,10 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens } = require("../helper/chain/ton"); +const TONYIELDING = 'EQAN0yTLUz7gGuM41LniwcdoKKLPYV0BCDPSxTSoqrlRSTAR'; + +module.exports = { + methodology: 'Counts the number of TON in the Tonyielding contract.', + ton: { + tvl: (api) => sumTokens({ api, owners: [TONYIELDING], tokens: [ADDRESSES.null] }), + } +}; From 63d24d66c85781cc182d9fcb3c8632dda827aaba Mon Sep 17 00:00:00 2001 From: muhammedea Date: Thu, 28 Nov 2024 13:10:42 +0300 Subject: [PATCH 506/787] add ubeswap-v3 (#12461) Co-authored-by: Kadir Ay --- projects/ubeswap-v3/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/ubeswap-v3/index.js diff --git a/projects/ubeswap-v3/index.js b/projects/ubeswap-v3/index.js new file mode 100644 index 000000000000..fe4a7bb7b518 --- /dev/null +++ b/projects/ubeswap-v3/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + celo: { factory: '0x67FEa58D5a5a4162cED847E13c2c81c73bf8aeC4', fromBlock: 25639915, }, +}) \ No newline at end of file From 22269f05b0f90d6fb5c75be23c8d3ea13ddfd049 Mon Sep 17 00:00:00 2001 From: 0xSacha <90143060+0xSacha@users.noreply.github.com> Date: Thu, 28 Nov 2024 10:12:33 +0000 Subject: [PATCH 507/787] ADD nimbora liquid staking (#12459) --- projects/nimbora_lst/erc4626abi.js | 20 ++++++++++++++++++++ projects/nimbora_lst/index.js | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 projects/nimbora_lst/erc4626abi.js create mode 100644 projects/nimbora_lst/index.js diff --git a/projects/nimbora_lst/erc4626abi.js b/projects/nimbora_lst/erc4626abi.js new file mode 100644 index 000000000000..8da32a0d8cb4 --- /dev/null +++ b/projects/nimbora_lst/erc4626abi.js @@ -0,0 +1,20 @@ +const ERC4626Abi = [ + { + "name": "total_assets", + "type": "function", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u256" + } + ], + "state_mutability": "view" + } +] + +const ERC4626AbiMap = {} +ERC4626Abi.forEach(i => ERC4626AbiMap[i.name] = i) + +module.exports = { + ERC4626AbiMap +} \ No newline at end of file diff --git a/projects/nimbora_lst/index.js b/projects/nimbora_lst/index.js new file mode 100644 index 000000000000..1a7a7d50108c --- /dev/null +++ b/projects/nimbora_lst/index.js @@ -0,0 +1,24 @@ +const {multiCall} = require("../helper/chain/starknet"); +const ADDRESSES = require('../helper/coreAssets.json'); +const { ERC4626AbiMap } = require('./erc4626abi') + +const LiquidStakingData = [{ + address: "0x076c4b7bb1ce744e4aae2278724adedd4906ab89998623fe1715877ecb583bde", + token: ADDRESSES.starknet.STRK +}] + +async function tvl(api) { + const totalAssets = await multiCall({ + calls: LiquidStakingData.map(c => c.address), + abi: ERC4626AbiMap.total_assets + }); + api.addTokens(LiquidStakingData.map(c => c.token), totalAssets); +} + +module.exports = { + doublecounted: true, + methodology: "The TVL is the total staked STRK managed by Nimbora Lst", + starknet: { + tvl, + }, +}; \ No newline at end of file From 3e919af0229a622b28eb3ce4ea4f5614a4269568 Mon Sep 17 00:00:00 2001 From: Strategic Reserve Date: Thu, 28 Nov 2024 02:18:02 -0800 Subject: [PATCH 508/787] Add Panko and Kim (#12457) --- projects/visor/config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/visor/config.js b/projects/visor/config.js index 4b8d6af40f6e..cd8f232c71fe 100644 --- a/projects/visor/config.js +++ b/projects/visor/config.js @@ -90,6 +90,7 @@ const HYPE_REGISTRY = { ["0xf1DF4F17e34Ba710DfFC487F73f1e19476E815a6", 8743213], // Thick ["0xe1cd1c2d2e4B44dE211D554649BC7dc49eF07784", 15063294], // Kinetix ["0x6809f4881707459Ad0287C6467365E3C910e9373", 19631061], // Aerodrome + ["0x392007E4a40236c656548b4655c372bD327A6096", 22026482], // Kim ], kava: [ ["0x683292172E2175bd08e3927a5e72FC301b161300", 6384272], // Kinetix @@ -135,6 +136,7 @@ const HYPE_REGISTRY = { ], taiko: [ ["0xc27ddd78fc49875fe6f844b72bbf31dfbb099881", 57600], // Uniswap + ["0x1E97925c365cd96D74Ec55A04569915c4D65e5e0", 606236], // Panko ], rsk: [ ["0x683292172E2175bd08e3927a5e72FC301b161300", 6414342], // Uniswap From acfd62860bb47cd30bdb622c1eb826307547f849 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:31:29 +0100 Subject: [PATCH 509/787] Compx CDP & streaming (#12479) Co-authored-by: Ronan Co-authored-by: Ronan <73086339+clooneyr@users.noreply.github.com> Co-authored-by: Xxiled <93330009+xxiled-plastic-cat@users.noreply.github.com> Co-authored-by: Garrett Vorce --- projects/compx-cdp/index.js | 70 +++++++++++++++++++++++++++++++ projects/compx-streaming/index.js | 65 ++++++++++++++++++++++++++++ projects/compx/index.js | 2 +- projects/helper/chain/algorand.js | 31 ++++++++++++-- 4 files changed, 163 insertions(+), 5 deletions(-) create mode 100644 projects/compx-cdp/index.js create mode 100644 projects/compx-streaming/index.js diff --git a/projects/compx-cdp/index.js b/projects/compx-cdp/index.js new file mode 100644 index 000000000000..6ca472a18620 --- /dev/null +++ b/projects/compx-cdp/index.js @@ -0,0 +1,70 @@ +const { sumTokens } = require("../helper/chain/algorand"); + + +module.exports = { + algorand: { + tvl: getCDPVaultTokens, + staking, + }, +}; + +const stakingPools = [ + // NIKO + 'XZOKYETGUQKIJJG4LSBAFYLDQRKCT6PQUO5CZJQ37VUD2VYMWRHH2LK7MI', + // TinymanPool2.0 xMcRib-ALGO + 'RNL5YCWQDLYX4WXMM43ARQVFVNO4PSGWCLNKORUUVFCXQLR2LIURETDCDI' +]; + + +const vaults = [ + // Minting wallet + "XN4OX5OFLZFLDBI4J36EGOIMKGR4NISEVFCQRXDTC4WT35GPBM5EJI7IOA", + + // gAlgo Vault + "ABU4ZY2UAPJWIZPE5FZP6GWVXTIP77YNAF3KBWBNW6KNBZALKRKPZL6HLM", + + // Link Vault + "YVQRJKC7TUD3XB3XCAA7SMY5OG7AHOTU465DI7HIOL4NQZMG52NXLBOMYA", + + // AVAX Vault + "RQ4MNDFSG4CCCWEJMRNGE5ZRNV3F2PHZSDJZ5X266MXA65HMLRFFXNAW5Y", + + // Sol Vault + "ODJPJKPAHL7NPRJC5XF42SWFHB37ECCQEGFJIA4TFWOXGKJQA6M7S5NL2M", + + // goBTC Vault + "UVSJVQXX3KYYWTQVXPRTIA5QXYAM6Y26JI2P2NZP25RSJTVMP3X7ODNC5Q", + + // goETH Vault + "DMVBFMMH3RIKCS3V77DCETWJDA2HW4LPEBURBUD7RQNVK5SKH5QZG6ZF4Q", + + // Silver Vault + "H4437RZ3W2Q7JXIRPDIEFO65QNNTH4SICMNWT4SSEHNQ4UPIMAO63DNZGI", + + // Gold Vault + "MJET3QJDM5MXC5ZREAPW5PUK4HN73VRYMAFGMPWG7VEIRQIHFQPSMA6CUQ", + + // mAlgo Vault + "XXLNQOR5XNJU57W2TQ3WEJTL2RGQ2ABCSAU2CX4NSZZGPHB5WSOTT6BZXA", + + // Chips Vault + "RJQNFSLZWSZ3W6N5TJCS2F6KNEWTXUQDFI7GXDXXCOC5UDIPYYN3W665YE", + + // Coop Vault + "QTFSX7MJLUBP4TLCRNGMEQCOCG6Z2O5A7RAUREW5S5RYIGMGYDLDYYSMAQ", + + // Algo Vault + "HVDIX7FCCJGH3XFJNTEAQZ22CQTD2LUD7NKN7JCY37SGFA2763A4NHUHRQ", + + // Deprecated Algo Vault + "I4O4APZDX7R7GL26JA2G6ENO5KZHIN4ZLRJR4DANXJC6GU7A2SI6VNY6LA" +]; + +async function getCDPVaultTokens() { + // Don't count xUSD + return sumTokens({ owners: vaults, blacklistedTokens: ['760037151'] }); +} + +async function staking() { + return sumTokens({ owners: stakingPools, tinymanLps: [['2525037707', '2518721081'] ]}); +} diff --git a/projects/compx-streaming/index.js b/projects/compx-streaming/index.js new file mode 100644 index 000000000000..9b1a6d45f482 --- /dev/null +++ b/projects/compx-streaming/index.js @@ -0,0 +1,65 @@ +const { lookupTransactionsByID, sumTokens } = require("../helper/chain/algorand"); + +module.exports = { + algorand: { + tvl: getAlgoStreamTVL, + vesting: getASAStreamTVL, + }, +}; + +async function getAlgoStreamTVL() { + const { transactions } = await lookupTransactionsByID({ + 'tx-type': 'pay', + 'address': 'KYYHXY5CANPEOH4WA4ZSISEMD5QYYBP6DOG3HNWJJIJNNKARYF5JYCNSNE', + 'address-role': 'sender', + 'exclude-close-to': 'true', + }); + + const uniqueRecipients = new Set(transactions.map((txn) => txn["inner-txns"][0]["inner-txns"][0]["payment-transaction"]["receiver"])); + + const algoRecipients = Array.from(uniqueRecipients); + return sumTokens({ owners: algoRecipients, }); +} + +async function getASAStreamTVL() { + const asaFeeRecipients = await getASARecipients(); + return sumTokens({ owners: asaFeeRecipients, }); +} + +async function getASARecipients() { + let transactions = []; + let nextToken = null; + + do { + let query = { + 'tx-type': 'axfer', + 'address': 'JBV23ATJIL4MWXIJXZ6L2EJSJZOMP7YENNGUNQZAUTEN7QYSPC5ZHPR6SY', + 'address-role': 'sender', + 'exclude-close-to': 'true', + }; + + if (nextToken) { + query['next'] = nextToken; + } + + const response = await lookupTransactionsByID(query); + + transactions = transactions.concat(response.transactions); + + nextToken = response['next-token']; + + } while (nextToken); + + const uniqueRecipients = new Set(); + + transactions.forEach((txn) => { + const innerTxns = txn["inner-txns"][0]["inner-txns"]; + if (innerTxns && innerTxns.length >= 2) { + uniqueRecipients.add(innerTxns[2]["asset-transfer-transaction"]["receiver"]); + } else if (!innerTxns && txn["inner-txns"][0]["asset-transfer-transaction"]) { + uniqueRecipients.add(txn["inner-txns"][0]["asset-transfer-transaction"]["receiver"]); + } + }); + + return Array.from(uniqueRecipients); +} diff --git a/projects/compx/index.js b/projects/compx/index.js index b36986987ba9..afbd9e9468aa 100644 --- a/projects/compx/index.js +++ b/projects/compx/index.js @@ -17,4 +17,4 @@ module.exports = { algorand: { tvl, }, -}; +}; \ No newline at end of file diff --git a/projects/helper/chain/algorand.js b/projects/helper/chain/algorand.js index af9476fc014b..cd9ca10181b8 100644 --- a/projects/helper/chain/algorand.js +++ b/projects/helper/chain/algorand.js @@ -64,11 +64,14 @@ const withLimiter = (fn, tokensToRemove = 1) => async (...args) => { return fn(...args); } -async function sumTokens({ owner, owners = [], tokens = [], token, balances = {}, blacklistedTokens = [], tinymanLps = [], blacklistOnLpAsWell = false, tokensAndOwners = [], }) { +async function sumTokens({ owner, owners = [], tokens = [], token, balances, api, blacklistedTokens = [], tinymanLps = [], blacklistOnLpAsWell = false, tokensAndOwners = [], }) { + if (!balances) { + balances = api ? api.getBalances() : {} + } if (owner) owners = [owner] if (token) tokens = [token] if (tokensAndOwners.length) owners = tokensAndOwners.map(i => i[1]) - const accounts = await Promise.all(owners.map(getAccountInfo)) + const accounts = await Promise.all(owners.map(limitedGetAccountInfo)) accounts.forEach(({ assets }, i) => { if (tokensAndOwners.length) tokens = [tokensAndOwners[i][0]] assets.forEach(i => { @@ -89,7 +92,7 @@ async function getAssetInfo(assetId) { async function _getAssetInfo() { const { data: { asset } } = await axiosObj.get(`/v2/assets/${assetId}`) - const reserveInfo = await getAccountInfo(asset.params.reserve) + const reserveInfo = await limitedGetAccountInfo(asset.params.reserve) const assetObj = { ...asset.params, ...asset, reserveInfo, } assetObj.circulatingSupply = assetObj.total - reserveInfo.assetMapping[assetId].amount assetObj.assets = { ...reserveInfo.assetMapping } @@ -98,6 +101,17 @@ async function getAssetInfo(assetId) { } } +async function getAssetInfoWithoutReserve(assetId) { + if (!assetCache[assetId]) assetCache[assetId] = _getAssetInfo() + return assetCache[assetId] + + async function _getAssetInfo() { + const { data: { asset } } = await axiosObj.get(`/v2/assets/${assetId}`) + const assetObj = { ...asset.params, ...asset, } + return assetObj + } +} + async function resolveTinymanLp({ balances, lpId, unknownAsset, blacklistedTokens, }) { const lpBalance = balances['algorand:' + lpId] if (lpBalance && lpBalance !== '0') { @@ -200,15 +214,24 @@ async function getPriceFromAlgoFiLP(lpAssetId, unknownAssetId) { throw new Error('Not mapped with any whitelisted assets') } +async function lookupTransactionsByID(searchParams = {}) { + const urlParams = new URLSearchParams(searchParams).toString(); + return (await axiosObj.get(`/v2/transactions?${urlParams}`)).data +} + +const limitedGetAccountInfo = withLimiter(getAccountInfo) + module.exports = { tokens, getAssetInfo: withLimiter(getAssetInfo), + getAssetInfoWithoutReserve: withLimiter(getAssetInfoWithoutReserve), searchAccountsAll, - getAccountInfo, + getAccountInfo: limitedGetAccountInfo, sumTokens, getApplicationAddress, lookupApplications: withLimiter(lookupApplications), lookupAccountByID: withLimiter(lookupAccountByID), + lookupTransactionsByID: withLimiter(lookupTransactionsByID), searchAccounts: withLimiter(searchAccounts), getAppGlobalState: getAppGlobalState, getPriceFromAlgoFiLP, From bc526326b0060d7b0ac534ace6e3a5ad79300bc1 Mon Sep 17 00:00:00 2001 From: Five Stars <146636499+fivestarsfi@users.noreply.github.com> Date: Thu, 28 Nov 2024 18:40:56 +0300 Subject: [PATCH 510/787] syde adapter - update addr and logo (#12483) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/syde/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/syde/index.js b/projects/syde/index.js index 8becae7d9a13..35f7dbfc4818 100644 --- a/projects/syde/index.js +++ b/projects/syde/index.js @@ -1,13 +1,14 @@ + const { sumTokensExport } = require("../helper/chain/ton"); const ADDRESSES = require("../helper/coreAssets.json"); -const sydeBtcPool = "EQA2J0WCTdYdG-XeyMpPBTeu2dWB2f0oFiV4KVRfV0gewF4E" -const sydeEthPool = "EQD-7ycFO3yeh0EeT2wgXoOQmu64rdDBXqGm4nHDInPfCxJG" -const sydeEurPool = "EQDXvkuKPZahcTDRHSybwiU0E5VpiGFP2QS2iHr082JmtTT9" +const sydeBtcPool = "EQBm9Ns0p98h74liNdYn-jOnJ79BT5cm--LIAeoYlfeWzQOk" +const sydeEthPool = "EQCo4FcMyezTvv2xOY-6iW4AAGahV2u8tkMxVT90gDz0sk5t" +const sydeEurPool = "EQC9H5G-VrnnwFa60pn08t5EqNMREW8NscnqL13W2jl9je4P" module.exports = { methodology: 'Counts Syde smartcontract balance as TVL.', ton: { tvl: sumTokensExport({ owners: [sydeBtcPool, sydeEthPool, sydeEurPool], tokens: [ADDRESSES.null]}), } -} +} \ No newline at end of file From 11a74bb15cfc36c2a94f590e911482f15b732ca9 Mon Sep 17 00:00:00 2001 From: Lucas Date: Thu, 28 Nov 2024 12:41:25 -0300 Subject: [PATCH 511/787] feat: add incaswap (#12482) --- projects/incaswap/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/incaswap/index.js diff --git a/projects/incaswap/index.js b/projects/incaswap/index.js new file mode 100644 index 000000000000..5a6ad6704a64 --- /dev/null +++ b/projects/incaswap/index.js @@ -0,0 +1,5 @@ +const { uniTvlExports } = require('../helper/unknownTokens'); + +module.exports = uniTvlExports({ + matchain: '0x1d9e11881Fca0e692B09AF0C0cbE70A643CB06FB' +}) From f2de67f216f83eed1a7ff4e0ac111bb4b1a151b7 Mon Sep 17 00:00:00 2001 From: Crumbs <97379465+0xCrumb@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:41:57 +0000 Subject: [PATCH 512/787] Add ApeChain TVL for Gains Network (#12481) --- projects/gainsNetwork.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/projects/gainsNetwork.js b/projects/gainsNetwork.js index 46b86f0da03e..e8e99abbf5ee 100644 --- a/projects/gainsNetwork.js +++ b/projects/gainsNetwork.js @@ -1,7 +1,7 @@ const ADDRESSES = require('./helper/coreAssets.json') const { pool2 } = require("./helper/pool2"); const { staking } = require("./helper/staking"); -const { sumTokens2 } = require("./helper/unwrapLPs"); +const { sumTokens2, nullAddress } = require("./helper/unwrapLPs"); const tokens = { polygon: { @@ -48,12 +48,19 @@ async function baseTvl(api) { ]; return sumTokens2({ api, tokensAndOwners }); } + +async function apeTvl(api) { + // `0x00000000000f7e000644657dC9417b185962645a` is gTrade's own version of wAPE + // All trading and depositing happens in native tokens and held in custom non-rebasing wAPE + return sumTokens2({ owner: '0x00000000000f7e000644657dC9417b185962645a', tokens: [nullAddress], api}); +} // node test.js projects/gainsNetwork.js module.exports = { hallmarks: [ [1672531200,"Launch on Arbitrum"], [1705553229,"Launched gETH and gUSDC"], [1727650801,"Launch on Base"], + [1732233600,"Launch on ApeChain"], ], polygon: { tvl: polyTvl, @@ -72,4 +79,8 @@ module.exports = { tvl: baseTvl, staking: staking(['0x28efAa11199DAF45AA8fBf95f920e5bc090DCbF3'], '0xFB1Aaba03c31EA98A3eEC7591808AcB1947ee7Ac'), }, + apechain: { + tvl: apeTvl, + staking: staking(['0x6dCD75474F9BDE2793cb3Da00b8959fb27BFa9d5'], '0xe31C676d8235437597581b44c1c4f8A30e90b38a'), + }, }; From 0e6da5074a3ee183fc08217cb929554881285a00 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:52:36 +0100 Subject: [PATCH 513/787] track wagmi #12478 --- projects/wagmi/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/wagmi/index.js diff --git a/projects/wagmi/index.js b/projects/wagmi/index.js new file mode 100644 index 000000000000..c53c149e50b3 --- /dev/null +++ b/projects/wagmi/index.js @@ -0,0 +1,15 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const { sumTokens } = require("../helper/chain/ton"); +const { getConfig } = require('../helper/cache') + +async function fetchTvl(api) { + const res = await getConfig('wagmi-ton', 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=wagmi') + await sumTokens({ api, tokens: [ADDRESSES.ton.TON], owners: res, onlyWhitelistedTokens: true, }) +} + +module.exports = { + timetravel: false, + ton: { + tvl: fetchTvl + } +} From eb15d42d2f1d197e862ac782cb1a752f00fa5b13 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:07:52 +0100 Subject: [PATCH 514/787] Taraswap (#12484) Co-authored-by: DevZi1la --- projects/helper/chains.json | 1 + projects/helper/tokenMapping.js | 7 ++++++- projects/taraswap/index.js | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 projects/taraswap/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 06c355b3f3bd..b69948ef6507 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -314,6 +314,7 @@ "sx", "syscoin", "taiko", + "tara", "telos", "tenet", "terra", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index c358488c5e64..3f638cfe4aee 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -76,7 +76,12 @@ const fixBalancesTokens = { }, bfc: { '0x74B73Fd2eE237e9219dF30dfFDB206D237cbFC00': { coingeckoId: "coinbase-wrapped-btc", decimals: 8 }, - } + }, + tara: { + [ADDRESSES.null]: { coingeckoId: "taraxa", decimals: 18 }, + '0x5d0fa4c5668e5809c83c95a7cef3a9dd7c68d4fe': { coingeckoId: "taraxa", decimals: 18 }, + '0xc26b690773828999c2612549cc815d1f252ea15e': { coingeckoId: "mountain-protocol-usdm", decimals: 18 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/taraswap/index.js b/projects/taraswap/index.js new file mode 100644 index 000000000000..08675afca638 --- /dev/null +++ b/projects/taraswap/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3'); + +module.exports = uniV3Export({ + tara: { factory: '0x5EFAc029721023DD6859AFc8300d536a2d6d4c82', fromBlock: 10674828 }, +}) \ No newline at end of file From db05da06be12d4918a0b20af0b401a80f0b2ed45 Mon Sep 17 00:00:00 2001 From: CodingPeter <42434849+zhaowei666@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:11:05 +0800 Subject: [PATCH 515/787] feat: Add Chakra chain (#12476) --- projects/chakra/index.js | 10 ++ projects/helper/bitcoin-book/chakra.js | 199 +++++++++++++++++++++++++ projects/helper/bitcoin-book/index.js | 2 + 3 files changed, 211 insertions(+) create mode 100644 projects/chakra/index.js create mode 100644 projects/helper/bitcoin-book/chakra.js diff --git a/projects/chakra/index.js b/projects/chakra/index.js new file mode 100644 index 000000000000..565631fb6d43 --- /dev/null +++ b/projects/chakra/index.js @@ -0,0 +1,10 @@ +const {sumTokensExport} = require("../helper/sumTokens"); +const sdk = require("@defillama/sdk"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + + +module.exports = { + // methodology: `Total amount of BTC in ${bitcoinAddressBook.chakra.join(", ")}. Restaked on babylon`, + doublecounted: true, + bitcoin: {tvl: sdk.util.sumChainTvls([sumTokensExport({owners: bitcoinAddressBook.chakra})])}, +}; diff --git a/projects/helper/bitcoin-book/chakra.js b/projects/helper/bitcoin-book/chakra.js new file mode 100644 index 000000000000..ea6ecd148eb4 --- /dev/null +++ b/projects/helper/bitcoin-book/chakra.js @@ -0,0 +1,199 @@ +module.exports = [ + 'bc1pxl0qkdw4a3k9pmuj4nmq4ukx0vjl08trglj8t7cu47yel5zq2sdsyg2wmx', + 'bc1pnftjkef9uzqzzxh67370jd9hwyceq29z77flla46nuxml3ca9k2qt8mdk2', + 'bc1pp9jsp9gd42z0209jenkp60lh5ejgfxgjwxp3tfexcfqu5pcfzw8qsen4x2', + 'bc1pj8mqr8rkufs4lahnplfqsvpwly8d0uy7cfamx8e69xwwnklk2jqqcaradk', + 'bc1przagcuq9w7g82ct60vfkgkugn7pfc99m8254ejl84pajhvd6q0qsn20mcv', + 'bc1p4zq63urdn0kwazluez8ahur6pfrgyztwn2vpjyy8350j8fc9zj7qssxqz3', + 'bc1pj2ft77hjanus5sp5upv20hdv35yajnh8txzct7n2ydg3pd3a6rdqpcn4ug', + 'bc1pp7rtha88ja0fmy200vzml26gztjm96sy0cu8fr5ncquy7g8dv4zqpkl2w9', + 'bc1p7pg8yvkc2qz8d05734lhcm629khel40p3l0x44tuuj0dwgcazzqq30pegg', + 'bc1p7tvenf74kyrnwfn5rhrgky5f8m5dk2hs78m47yxejtn7xjslk80ssxxar3', + 'bc1pqa00um7l0vxe6a082vx6vqtv2zj7e5pmagtr9z7aumgpyha0yces56vyq6', + 'bc1p8ql5x9s4jfcysqrfdy4dz37v27n33rzk84hs2qyvsr4wc0qhg9qshmu6ds', + 'bc1pvyupae6aahseapcpwzudx9ztmcve8ajqeveumvzypjssemzuvczsespanu', + 'bc1pd5w73c9w2cfaktxfytd5lysnk5dasrp6snndrkgzkwah03mmy8ussg5w4f', + 'bc1pa5tnchz4hud3nez59u074l955syk09r6s2s7u6udl9hlc0tydjjqp8gvdf', + 'bc1p9lhx0a6ush7c8f3zvneyvu9cs4a5uhpeah9tu7tpn8qd0r040zsq8dq5x2', + 'bc1psa5w6puzv9tvqssqelu028khjwzqgtmd5hnjxdxssrce2ktjzs4qu3jcpv', + 'bc1pnyzmddgj8u7v9uxhjc0hd0nn2086s34aeq6m8tanljlh6saxcvfqtxmr3k', + 'bc1p6yc3sezasphs2ttp0eafypvj8ltq09lpjq508k2jwlxl244zdavq6l0k3x', + 'bc1pv8kpr3y93j4j9nvl6te2qvlqfce8zaw242tx4crzz45cq6m279jsdwhess', + 'bc1ptp4rkf58rcv0984qt8vlprkf9hfda7x6gde5gwgm3nmpejl6c4dsg9jkgx', + 'bc1pqhrhrl76qfyamanpptk76wd068wm2dakw843cvy4zll6wd9q9t5qremauq', + 'bc1pgfvr4mdcs6p2packv4demptah7ljjkgew2q0mykknhrdgn3s8lyq4vu3vv', + 'bc1pevu8e9dw86tcst69j3y0nmxfjk4ravjln2xf8yca9q99w4z9jgqsxux8ju', + 'bc1pqm4nnug236ux3057qjwpw9hapjzg2enhh0dqpujn5hdssthtwdpszj7u3z', + 'bc1pk238q3jm4ghsq4lafyvcy5mze0ufsm5d42haqekp0gak5cflsv9qnx0puc', + 'bc1ptag678du7exrv34pc4d47y98tzegse7n3njmv4k9grpjcxjckd7stn0ka3', + 'bc1pu0h93g6cvsua7ggmccqg2z0nm2ycrjwnuyndp37synyxvncmh0zqlk0sz5', + 'bc1pe8zfmgxtcf7ktv8n6276zr0ysr3w4lm9cauq7eu4vfgyem6mnxesxcuse5', + 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', + 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', + 'bc1q4nard6ndnh57xev095hqnrfh5lxxycwuewcwcc', + 'bc1qak5ch78tcpfmztcldgr5tlgnd4t59p6cuqjcnf', + 'bc1qn8gnv8y7u92tnqyzdnmtdvzyzszahn7js97jjj', + 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', + 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', + 'bc1q397395pz4ktvucdq7uj3jv424sx7ygm94kvfr6', + 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', + 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', + 'bc1pa7hk6q3sp66euxtvdvfe6xjskjsll7mpp3alm920xnr6jhy08dfscc6nrj', + 'bc1p7a4hwvvy44wt0mltkv4fmhuz5lt587ruqeyhvt5wp320304lhmdskkzh9u', + 'bc1pj2h9dgwn6lkgnhh4pckaj7a44mh6rnjcvnfpv76jlqh9hmltt8qq87qrsw', + 'bc1psqjef0lqvp7dvl3nr4dntk7m9yng4mp22yvkgqsl7utr7z4u9cwqffs44e', + 'bc1pnpv6gj9ufmq62jepc9uqey6yfzuzuksegkrt8ftnmh3fk42jdsksm7s0hq', + 'bc1p874e3rk8xs62pzsrpzxy986yf50k82ytcrdnrsvltdprcj3yp9rsz498je', + 'bc1pjthg04x7wvvq56znwkvfdw79vplprczp5dctpsnqx08jmurk7nuqtjx8an', + 'bc1p4pfgf8v540ay4297jwa07mnel85utw6slnjy94ax7h4j8t4zurys9hstqw', + 'bc1p2rd4z0avhftxxrwqgczwyr4jlr2exypdp9cnjup3wamwcm609zssv8znqg', + 'bc1pl3aff7d04ukpeeef2662rjf444ncf4g0u2mnepljddzz2jzw5yxsrjjyvc', + 'bc1pne6mtsu2f83yg9pdttpne095tnf3ekvrlx3wlajwn98tdv8xu79qmxmvpf', + 'bc1pzgwkmkkh0qdw6t67pasp49ydhmxekg385trdt529le32srk8zrdqrejtne', + 'bc1puhrvwrfjryfjq86lcx099d4lcdamml6snyqkqh7hfpn2rzdzc6fqzrkejj', + 'bc1phqgr25tert9u42glk22tgfqflw3vjfp5g54a8cu67japy0re96fsxd4er7', + 'bc1p77e4h9f3scelzut6tnq7lht85lqddcz4g0fu2zgrrr5yk4z4qlsq5f0a6v', + 'bc1pdxt4pr6y5cmzg6yd2e2fw9kwkguea33a9drqevdcz3mhmmjq08ls355all', + 'bc1pl0k0lggxhsnza2rm35enjy57f4tnqdcun7yuluw5p5vchlwdgt0sm3juyt', + 'bc1pmc8yrng60gmpa5uzm5d6hefwkeqgk2yr73mskuq8a6tu985cmt8sapm45p', + 'bc1pv869cl4sm6f0z5cdmfx4ndunzf3x2matgxhm9hmjuv2ntm4cpl2sa3qqvp', + 'bc1pd9e7njc90mdv7jxffq9kjs4mzqhpcl497p4qf48uuw0qc4jx5vgqlql5l0', + 'bc1pwam7788m42tqku5xg6nkntety4fe72turs2h3m8sh7dct3jeqlhq3pf0wf', + 'bc1pwzqwvzsw7260sxxu0pmqwjv2z0dgv6urqv3ya5rgequqlf8ltxusk7jntv', + 'bc1pp4ktfjves5e323pkrd4d50lcrl558u7afdfe6awtmeucvcyrv6dquugft7', + 'bc1p6rp4yszvcd5c2ntkzt6xejr2zv45y0n92j6kfm3u66vdzhg6gu2sq8g3ax', + 'bc1pacacjt6js4n65qwwms0x0u6u8htwdxe3tmwfvpehypzp08js88rsl48zve', + 'bc1p4xuceqfytlqrt2clsm6v2pe6uuvxsy5xu320mhtld8xa3jvj9x2shj8agr', + 'bc1pvur07pveccdu6a5rqh7u0dv2pg2aa8zktlelwslg6krm32a0h7hq28075u', + 'bc1pdstx9stfytpu52cj4el3ex6hl22n8yrlc803kxcs5ztrqf479wzqaqzzx2', + 'bc1p75xmu0gc3j0wxx8ve2r6004q9m5jskmu8tszdh28d2v0n8ldewzqhjrtnr', + 'bc1p63dm73sfg8qx7eadmqpj92pjfgg8fpfz6vjnr34sd8lrhqtwx8es68nrrz', + 'bc1pt46ngxcvhx96pr2pr2efxdjrez92jzgfqyml7sj69d6cl87q709slmkj3g', + 'bc1py48jd2xlxz2xk9a0tga4f03velnd6xffg5tnkldlkku4ud356r3q0fpjk8', + 'bc1pny0uj4f2hn2hgfz86jhvzj0nr98sz5senrcfgf4g3mugy3r3zl5sywhkgy', + 'bc1pgemhw9xx493wl9h2eqwgvr732ewe9dk9zfq3exzkaua0hj33a5rsu928nx', + 'bc1px5s3v0rpsuh2msuj6eft24jhkqkyxj0jpzw4vs52ude46nf6q7qsrkxavv', + 'bc1pfchlhr0rl5ruhtjst99ft9vdsjhuegz3j3hvqk3e3lnmwwzk32eq6tj2mw', + 'bc1pu9h2vwp4a5jta9r760msfta73mrep7d8gc75xwawjxx8nhvmluuqywg58k', + 'bc1p64w0hxsppgpmewk80fy5c7p9f652v3plxjf8kpkan5nl0tykeyzqerqjkk', + 'bc1ps0enq83ssc5xflgddh7w7usyapn80r9r62c8zhezx5gcwkd95g6sq5zff3', + 'bc1pz7f9mfhym4qts7uj8yucpcwu34xz44v5khemanl89g3c0r3sa6jqkvczrx', + 'bc1pnfn5x283red2kfthg42682wrmsm8lcgznfszhz52hmele906ejsqu2m6cx', + 'bc1p2duk8yuuxy70kclyupm968mll5ep5drmfa0umtmz3aymq5gu6avqgt9rcm', + 'bc1pqfhjgytf39urds4z5ptp2a5upmtlz0lux05wq480rvcvx9k94kts9qmedv', + 'bc1pl6zy43j8me89c9jqygsahu4sq89yge9ve2kz0asumwnkmk4373ws0h3tt7', + 'bc1pvaazyyuwk04fq6skxnkyh3crxfeepzzctuznzmtzyjp6x3klq6lsfa8ma4', + 'bc1p3g8n3aj52225dym3jmypg8u4cf3x3s49c5rzjvj6ygtl82v42qaq76qqa6', + 'bc1pgs95cjhpq5uedepr6ghvhx9upwdmrq3c67xt2drhkv2etjjlqnsqvxsu69', + 'bc1p8r84f5a6vvtl0gedshjzp4rv5mx88ra3etqch9du65fmqwglu0zst80e44', + 'bc1p348nh5crmn6zj66a9k4cjmrlrkszj4vaq33sgr6jzhtpyh2qcezspgep7h', + 'bc1pane2m0z8ymreh67xkathhrst8jm4ljw53nkq3da23fmmf6gm522sf03t55', + 'bc1pdhc4g25eysun4st2rhhfsusnk4ekhxp85xr2x4uq859tyxnap94sua2k4h', + 'bc1phzxznmd5yqp7x07kkes6q7sjcalnyd9pjddrfhywwv23ca7994jquww9fx', + 'bc1p7ekf7lt6f3alzzh8gkyjrv0xthp8r9gz28qa4wpam4lv432wn8nquwpuan', + 'bc1p7laa0uystmcyaekgmfy2767ndj6s4y86szdm6m8fta7nv4plywmsx5ln58', + 'bc1pa0xe6ahttju3kfr63fq4vmg67xy9sdw2enwsvmmjk8aem70mc5esh7k8et', + 'bc1pv98t2u3tx493ly278hdrkh4spdxe6a8hk9ev94ku5kf062eh7rwswdqm5g', + 'bc1pyzw7rk30ttw3yc36azwmmyfekyw8vpx7cj09has5xy76sv8gzleqdatxdg', + 'bc1pyjcncf6jsz5xcqmw6jhdvay025gygle6r6arhpu7dkpqufh9c9wqyvprju', + 'bc1pu5wre7gar0d8tgslaeu5epj62yvx667wuaun2n589nx55xzf42csg34qsq', + 'bc1plpjxvkkhj9qfuqnrjtnyvwxfm9j4rdq4jtwhu34anm8etzkyfc2s94vzw3', + 'bc1p0tnltsu0qz29xluwntvvcr29aw230tdhqygwg5mru8qqhdvw580sqlznpx', + 'bc1pswxs924q5t24yvvemauja7dvwlduz0nutkq6eu0ug9ptm74kcyys4hrwpe', + 'bc1pdcgcjztkqgnrhnm9xqdv87qtqhtr7vxdvpmpux8xzefeypqw39vs9a5z9j', + 'bc1pkkn0trywnslz5datc3lz087rgzd8z9644svwykpl2983lzkw9xyqspd2d5', + 'bc1pl30rp47rlxrfrtlplzz94kt7g2cr9lhjcygwfjp3tqqt0td7arwq5e25wg', + 'bc1pp05cfg3xdueaqvrl3kdcw3p83e7jy8tm8l0taxzhssmrv9tjlhqq5qkjm8', + 'bc1p3puq5p5yuz0jpy6equy7rwd2t28wzau8s5s7cwqm9n4w4nhd0tqqn6jjtj', + 'bc1p57j2tjs0ypujgjkdufur6xecmcvdte8k8tn9y6sxu0retxrn7hqqj6ncdf', + 'bc1pqhewzz5mgu4c90lkekp40ncnxtn9eleuvyk92u4l7djq69nwqyuqluwzcj', + 'bc1prx9e9mcwgp4zy9vwcp8dypgmgmese5rjhjeg9y5kxty3ez3lmk8s409uc3', + 'bc1ps0266nkjsz8wu97c927hntcmavzt6xfjve4uzehql9vh7un6cr4q6r06jh', + 'bc1p5337zpuhtpeccnq2ky7lgwzz4m8uwrvs785l4afflj2722x0e5hq5sjdn5', + 'bc1pjnv5znssndchjz3qst7ln0lvsqpyw3eml5pczavd465de9uktzgsvvftwr', + 'bc1pmq3y9hctw5w0j4382kh92j5yckjpuy66vy2u8q8vq425rk03x6qqpzdvh4', + 'bc1prx5de0k5hzgn85yq9mumv9pxnygey55v5fj3qd0234av38d0ek3sjk5k4m', + 'bc1pz63qe35d25ve7nztqdfy4x764zv9dfa33qqym3050p6yh6mk7xfsyk036w', + 'bc1pt4e9zqn3ulhztv5zv2xdsuen64mgn0krry27m7l5t6jsqaj33puq76yswh', + 'bc1pmf6sk2vlrjxrk0mm45q8dg78600czek4g38py9mt53gqt7dduvaqaacks5', + 'bc1pfh7yx8ks4e40rzsg6c5qdkax56ar9mpc7jflxkj8qgkgf6qnqtys32qylh', + 'bc1pzjsy40ch0yrh88ugdxnxd3za79qjkl077vdp4tazpjalsulzqy0qfx4t9n', + 'bc1pmqe4pz8em9djs55rtwupm63ksphlea7fpresr7vhwdgfwq9dln9spl07c7', + 'bc1pq6wxqycalncq6uskj47s5azx7sjl9q5gegfzyyunhu6qn66gppwslu3jwk', + 'bc1p4mv3p55y55jsqtx68dg7swu676mg4vk0zxatvddekyqjdf99lh6qw746z4', + 'bc1psuv33g5ae2alnyxngp36ucaf99q858d8kqwjl2zx2gz2dfh4gtaqz4r0an', + 'bc1pmavfsx7wthpr534paphewspktgkzjvg8986atg5lwsj0h5yjvw8qvlmckh', + 'bc1p5y9m4fhrwh2aruaf92vqamp296p376n7zd50hfll0glmf58detdsh47n7n', + 'bc1pudw3zmahe2qk43gquwja24dw5jj08sem2pjqtwqwddzrfhkw2djqhrjfkp', + 'bc1pdps6wc5aesqp496lpum78tvk03v7a0sx6jutj3raev7hc2gd4rtqyl8mr8', + 'bc1pa38cglkzzskdch4ax6z6vl5da90ca0lv5zt6lfqasljec60hh7mqvade8n', + 'bc1ps9xkycj4yv0fmsnql02zhf45ymkfays3p795ljpydp50qrwdl83s930nzq', + 'bc1psgt2v7r78zcuyhnr4n5p77zrnvf8eej3knkqg5dm62nzx4rxwftqyajluu', + 'bc1pxyhz7uky9jc62uahcyw932hx4cayk7vmy40axhctypqhee7xqtssx2tn0s', + 'bc1pqx2yk4kjp4vavadptf0vuk0qy9l6xejwkhsjcgmp4d6jpz9xq48s8murmc', + 'bc1p4jjzjylj5j9z0kznpgf8n37grrax9q7hch9zweclm54zjtk3t4jq9lmjty', + 'bc1pj7f85h0905m4k4s9k3u3pnderhh3kqqscmzpxsss4prm2v2x7upquezlk7', + 'bc1ppgqr4p8x9j0falssfppv3t9lc6e3zm464vs3sps7hqqguplxsh8qa2uww8', + 'bc1pne6n0a62cefy82wrwlkg3nasl6p0edtteh2vtpyjs8epe9tfqtjqfy5tdt', + 'bc1pzgc3djs00crekqlpm5nrfefydhkwx9k7n7dd8ldk4y09jcdush9svt3gt3', + 'bc1ph02t9cy6xdqtq3y8eeu33mfqkcdnhd7x72mwmxfwlhg2v4rn6a2qnsprrg', + 'bc1pm6ygunqn5frxs4rfcars6fhyx3ekh2aetucvsdp6sq9ktary2veq63lyrh', + 'bc1p4pzz9755vuty5u0w82d9k398h08dlm97nr67vp4pj0c2vr7kvzcs7lvt6h', + 'bc1p6p9wsa4xgxffem4pecnsv9xqdnkwfglq9nmz23a55dcvjahpylasn4x405', + 'bc1p7uc7yqew82fzlhfrx06pcfntavza7n8kr0mk4dl0y8vc2vjngzfqacu2jn', + 'bc1pkze8ew0fmr55ldwerc0nf8u78h5fryg0c8ft7k9eh8vwtt604f3sd2d9ls', + 'bc1p7csnymmm29h45r25lw28vjq6nvdu9245fyzlm9ls8kdxz65p7n0q5h7lzs', + 'bc1pkfjen0lj4t4tp0ff4x3vsj03yxye98c5zk60ju559rmcned8nw3q4vtqeh', + 'bc1pmdfv4u5m53ad66ewz4jm6dphgvf9x0sdaxqeygdszwht67r6yc2qtyuz94', + 'bc1p8u9nu5tqdwj2agler7yfxyjvwawpg99qq57yxgkl6uzalr4mtems47te9z', + 'bc1pysf2ulajuh668agfglzc7hxl4hgng6suk5u27cgadvvf2hx7ckuq0ka3d7', + 'bc1p50jtsv2jjnsf62sepmksa43pc07feg8v8ez5q62yskdkly3ukqtqvktt8c', + 'bc1prd5ltcsu4rhmwe3wawpeudtzpt5f7xcnp8yla3fxt5g2l5sz7f7sr8p9t5', + 'bc1p3r59km6mg760jgcpzftz3ckve6w8g5qv0nnte3ajw0j6epxhhhhqzqkmym', + 'bc1p5qp8dsa3mg7q2jxudmez6q83ceu86nduwrddfy0slu6ze3dcrq4qfhp0yv', + 'bc1pq6wxqycalncq6uskj47s5azx7sjl9q5gegfzyyunhu6qn66gppwslu3jwk', + 'bc1p83ggjdaaj6dc8davgc8kykdj43l6dppa255eskc0k9k7uczaegts3hvtns', + 'bc1pgrt28ph0vky6yhrjqcv74kckfkd753qms26lncdvvlkn4xudzgts9d0kqp', + 'bc1pthefst3f4fqnx6ux6klspat7cz43srganhmcsv6jkmua3gjx0jzsvfye0g', + 'bc1pe5yl3ps0q2k53t8td8fsc2d9f8jy47qa0tsk3fnpfp3ws8r92flsz276we', + 'bc1pxxmf0hm674e8k4ck0ej4thf2v4t2879qdkh28x8ncrgkxgxjhzxss3mdnf', + 'bc1pmnvhxwmghhcl5ucn4y4706eenn4t8sls80wul6r8lpamvz7nmgas7a7yjl', + 'bc1pfxzh6826f7m58fv2cw88eh3h4247rst6wmadrguaqu6cz3ahkelqgtvwc8', + 'bc1pfdcwmlwd6uf0v2xqu9mv6ngn643xvjnvl6x98upc2q62u234mr3qeqm8dq', + 'bc1pqs8u7mggrmu9w674wwm0vutvvj6fn6ptajwes03n7enshfq44s8sd0thfq', + 'bc1pqykt8748q4tkhggyqf0qgj63nupfxf0cu0c39gv7gyfu4sxkz5xqfpxlm0', + 'bc1px76g80nknyqd7jtt5028l02r0wa3dcn6m4za9hqsmjv20l3enqwqjw3wpy', + 'bc1pn9ch7e7rnsdea82jkmtdw7yn65wqarvgd46cvu5kzpxprmkvsq2qkfrtja', + 'bc1p5zq0ds0zz0yjpn39u4klj7na99wqc6v2ks6xe3c29c4r5d47yx8svn6djm', + 'bc1pefv4crs72muveu2zepwtjvh0nt7kz8f8lgatfvmvd0uskcng76zsmjqnyl', + 'bc1p5fu4x8yavvnqnk8a7tladh00f950l4y3xssgh6fj9qmdgh56aulsvee6eu', + 'bc1pfshdwlsaxa8eawtjjwr7wgpy3m0ta3y5m467mhtwkpv0afw3cvhq5alnj9', + 'bc1pkujnjxlyt5amwt0mru4nkhc8zgdf9evlyrqxtuc7qjwhrysqvy6q6khlw5', + 'bc1p73cyqn7ktdgukgap6h0w9dt4su0npquv2er8t6mwswty2040u9nsfa650f', + 'bc1punshkj7yqdmega5uw4tktun0nqnhzalu4g3l598u4gz0xxfuv2vsqr5ua2', + 'bc1pgn6ge3wnp345rmlkyzpakw48gvm66skywrmdhfg36mp5agpjrfksf45crf', + 'bc1pxa8pjexjhkn9hxf7s3n94m5jkdpazl228x62marwnwpc4r984avqfxhaet', + 'bc1ppwleazev9hquk5dy3ald46st8qjcy5v5x9a2gwm26tmdy5jheyvs66j0n5', + 'bc1p2pmrvmqqjzqwfq756cwnkj26244zqqysce3200syku4jasv7zcks6seq03', + 'bc1pw9htynya2wwgnaw04un9aceq8vlk84dnx7ajgpudy4mkl63fvllsyyxej3', + 'bc1p4npude5v5s6ru2dm670j8rt6g0f94vve8ug3nfa7yd2qrdqhqtwsxgkuan', + 'bc1p2du775tr8e9qg8jv983nj4vr86k43vmt4zehlr9dswe52xreulpsyjnyup', + 'bc1pgrdzruuv3ncnx5g66w6sxrztf8lkz3ns9k3kl5cdvpqj9vq0mjkq62ala2', + 'bc1pzzrraenqjjx9xkpjjq7plcek83dr3ys4fhvhx00488dy7snndursf2lwg0', + 'bc1pckplra3ysgdax8uc3ctw7whqj6y9jsn82ssrg538vl49v7zp384qpc8h0j', + 'bc1pn65nupzatpdqz5prfew5u5zkjplrr4dlr9666f5da9whju6027nqpeyy7y', + 'bc1pmenfjywpsp3n83zv2sq4402m4cad27rq3zcawrylv7jpsgxt8f0q52cvak', + 'bc1pl9f5vdkhutd9ksv3aehq84s7c626l33ukmsndlhjlcv7naejczqs3vamlz', + 'bc1p6veqam82ks6t8lnh9rmwh8c6p6qhfc6rnhd0809nq4j6n887payqy3x2da', + 'bc1py37ux5zjt5g8q3h7qx0vs6rw9gxtdj5se3m76szs8wwqf33hxels7hclld', + 'bc1pqh5fzeaghuas5y79z6cg2kg6sqj25ty8az93m65a8pmtcskmlcss47zfun', + 'bc1pxgw4nmrqarqg6cfk87zzxdvrcq3g35en8dve8sdsjtcpkpsar0rs2yf0qg', + 'bc1p8fudewhlw54rzhgw27nltk8y3xl2kq3m7xxjtp2js4xy6dv7p3vsmhzdaw', + 'bc1pxn9whp33rs4x46yv8rux8049ehc6e0ks7ganntjc4n6u4q7k7uasv9avn3', + 'bc1p26f6f3k4dlzarvelzypuvxfvn90le0svry05l878ztf8rukup0yq793tzt', + 'bc1p0nahvgu0e46mtg40eddverknurtjnrufxduzmm2emek8nmksstpqdyelw3', + 'bc1pe05ahukeuq9kg9evg9fvs34kquku4dmetack79k8l8srlm2r9x6sm0caz2', + 'bc1pkpk5fzr9enyc8zyasl3g3y7fyz5asrqg56ycsfpgw0w3x7p954xsdqfs4p', + 'bc1p942zmt4gmc0j6uaemy90zn0cxfr27zs8s8u2ln3ctu7sdcrvplesv0kqpw', + 'bc1pr8e0qy7ms9vu8k3g9ldqsudhmqedsdmd74yxgphgs29gf0nges7q26f5mg', +] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index ed023233e10d..67c0ba8f201a 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -85,6 +85,7 @@ const indiaCovid = require('./india-covid.js') const wooCEX = require('./woo-cex.js') const bitlayerBridge = require('./bitlayer-bridge.js') const arkhamExchange = require('./arkham-exchange.js') +const chakra = require('./chakra.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -185,4 +186,5 @@ module.exports = { wooCEX, p2pb2b, arkhamExchange, + chakra, } From 004c0006caa9bf650a96163b862cb583359c6b31 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:14:19 +0100 Subject: [PATCH 516/787] minor fix --- projects/chakra/index.js | 7 ++----- projects/pstake-btc/index.js | 5 ++--- projects/xlink-btc-lst/index.js | 3 +-- projects/xlink/index.js | 3 +-- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/projects/chakra/index.js b/projects/chakra/index.js index 565631fb6d43..da04fa52990d 100644 --- a/projects/chakra/index.js +++ b/projects/chakra/index.js @@ -1,10 +1,7 @@ -const {sumTokensExport} = require("../helper/sumTokens"); -const sdk = require("@defillama/sdk"); +const { sumTokensExport } = require("../helper/sumTokens"); const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') - module.exports = { - // methodology: `Total amount of BTC in ${bitcoinAddressBook.chakra.join(", ")}. Restaked on babylon`, doublecounted: true, - bitcoin: {tvl: sdk.util.sumChainTvls([sumTokensExport({owners: bitcoinAddressBook.chakra})])}, + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.chakra }) }, }; diff --git a/projects/pstake-btc/index.js b/projects/pstake-btc/index.js index 5d93995322c5..3afcdbefe264 100644 --- a/projects/pstake-btc/index.js +++ b/projects/pstake-btc/index.js @@ -1,9 +1,8 @@ const { sumTokensExport } = require("../helper/sumTokens"); -const sdk = require("@defillama/sdk"); const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { - methodology: `Total amount of BTC in ${ bitcoinAddressBook.pstakeBTC.join(", ")}. Restaked on babylon`, + methodology: `Total amount of BTC restaked on babylon`, doublecounted:true, - bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: bitcoinAddressBook.pstakeBTC })]) }, + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.pstakeBTC }) }, }; diff --git a/projects/xlink-btc-lst/index.js b/projects/xlink-btc-lst/index.js index 2092d3811a04..cb798ae1e1e4 100644 --- a/projects/xlink-btc-lst/index.js +++ b/projects/xlink-btc-lst/index.js @@ -1,9 +1,8 @@ -const sdk = require("@defillama/sdk"); const { sumTokensExport } = require("../helper/sumTokens"); const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Staking tokens via Babylon counts as TVL", doublecounted:true, - bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: bitcoinAddressBook.xlinkLST })]) } + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.xlinkLST }) } } \ No newline at end of file diff --git a/projects/xlink/index.js b/projects/xlink/index.js index e309a6e27223..f031befd7d1c 100644 --- a/projects/xlink/index.js +++ b/projects/xlink/index.js @@ -1,11 +1,10 @@ const ADDRESSES = require("../helper/coreAssets.json"); -const sdk = require("@defillama/sdk"); const { sumTokensExport } = require("../helper/sumTokens"); const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') module.exports = { methodology: "Staking tokens via AlexLab counts as TVL", - bitcoin: { tvl: sdk.util.sumChainTvls([sumTokensExport({ owners: bitcoinAddressBook.xlink })]) }, + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.xlink }) }, ethereum: { tvl: sumTokensExport({ owners: [ From c4084ef7a7e6bc31a4223beb8f81af434d1cd364 Mon Sep 17 00:00:00 2001 From: Joel Mun Date: Fri, 29 Nov 2024 01:19:51 +0900 Subject: [PATCH 517/787] feat: add STRK staking to zkLend (#12466) --- projects/zklend-strk-staking/abi.js | 19 +++++++++++++++++++ projects/zklend-strk-staking/index.js | 17 +++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 projects/zklend-strk-staking/abi.js create mode 100644 projects/zklend-strk-staking/index.js diff --git a/projects/zklend-strk-staking/abi.js b/projects/zklend-strk-staking/abi.js new file mode 100644 index 000000000000..c15975632df8 --- /dev/null +++ b/projects/zklend-strk-staking/abi.js @@ -0,0 +1,19 @@ +const strkStaking = [ + { + "type": "function", + "name": "get_total_stake", + "inputs": [], + "outputs": [ + { + "type": "core::integer::u128" + } + ], + "state_mutability": "view" + }, +] +const strkStakingAbi = {} +strkStaking.forEach(i => strkStakingAbi[i.name] = i) + +module.exports = { + strkStakingAbi, +} \ No newline at end of file diff --git a/projects/zklend-strk-staking/index.js b/projects/zklend-strk-staking/index.js new file mode 100644 index 000000000000..ef463027bd7d --- /dev/null +++ b/projects/zklend-strk-staking/index.js @@ -0,0 +1,17 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { call } = require('../helper/chain/starknet') +const { strkStakingAbi } = require('./abi'); + +const stakingContract = '0x00ca1702e64c81d9a07b86bd2c540188d92a2c73cf5cc0e508d949015e7e84a7' + +async function tvl(api) { + const stakedAmount = await call({ target: stakingContract, abi: strkStakingAbi.get_total_stake }) + api.add(ADDRESSES.starknet.STRK, stakedAmount) +} + +module.exports = { + methodology: 'The TVL is calculated as a sum of total STRK deposited into zkLend\'s staking contract', + starknet: { + tvl, + }, +} From b3940abf29e4372d009a34f3ceb9ebf9c9da8a36 Mon Sep 17 00:00:00 2001 From: fico23 Date: Thu, 28 Nov 2024 18:51:23 +0100 Subject: [PATCH 518/787] AERA Finance: add esXAI & esXAI staking support (#12460) --- projects/aera/index.js | 65 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/projects/aera/index.js b/projects/aera/index.js index 270e3e3b4ae6..0b7c7ccc6a01 100644 --- a/projects/aera/index.js +++ b/projects/aera/index.js @@ -7,6 +7,7 @@ const AAVE_ORACLE_NAME = 'AaveV3PositionOracle' const LLAMAPAY_ROUTER_ORACLE_NAME = 'LlamaPayRouterOracle' const GEARBOX_TOKEN_PREFIX = 'Farming of' const ARRAKIS_TOKEN_PREFIX = 'Arrakis Vault V2' +const ESXAI_POSITION_ORACLE_NAME = 'EsXai Position Oracle' const config = { polygon: { @@ -92,6 +93,9 @@ const config = { ], cometReward: '0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae', arrakisHelper: '0x89E4bE1F999E3a58D16096FBe405Fc2a1d7F07D6', + esXaiPoolFactory: '0xF9E08660223E2dbb1c0b28c82942aB6B5E38b8E5', + xai: '0x4Cb9a7AE498CEDcBb5EAe9f25736aE7d428C9D66', + esXai: '0x4C749d097832DE2FEcc989ce18fDc5f1BD76700c', vaultFactories: [ { address: "0xaF2762E1F75DeCdb8d240576e7A2CEc1A365cD46", @@ -131,7 +135,7 @@ const config = { }, } -module.exports.methodology = 'Counts tokens held directly in vaults, as well as aave and compound positions.' +module.exports.methodology = 'Counts tokens held directly in vaults, as well as all managed DeFi positions.' module.exports.start = 1682619377 Object.keys(config).forEach(chain => { @@ -143,6 +147,9 @@ Object.keys(config).forEach(chain => { const COMET_REWARD = config[chain].cometReward const ARRAKIS_HELPER = config[chain].arrakisHelper const vaultFactories = config[chain].vaultFactories + const ESXAI_POOL_FACTORY = config[chain].esXaiPoolFactory + const XAI = config[chain].xai + const ESXAI = config[chain].esXai const vaultCreateds = [] for (const { address, fromBlock } of vaultFactories) { @@ -177,6 +184,8 @@ Object.keys(config).forEach(chain => { const llamapayRouters = [] const gearboxFarmingPools = [] const arrakisVaults = [] + const xaiPositionVaults = [] + const esXaiVaults = [] for (let i = 0; i < vaults.length; ++i) { const vault = vaults[i] @@ -187,22 +196,37 @@ Object.keys(config).forEach(chain => { if (assetName) { if (assetName === COMPOUND_ORACLE_NAME) { compoundVaults.push(vault) + continue } if (assetName === AAVE_ORACLE_NAME) { aaveVaults.push(vault) + continue } if (assetName === LLAMAPAY_ROUTER_ORACLE_NAME) { llamapayRouters.push(assetInfo.asset) + continue } if (assetName.startsWith(GEARBOX_TOKEN_PREFIX)) { gearboxFarmingPools.push([vault, assetInfo.asset]) + continue } if (assetName.startsWith(ARRAKIS_TOKEN_PREFIX)) { arrakisVaults.push(assetInfo.asset) + continue + } + if (assetName === ESXAI_POSITION_ORACLE_NAME) { + xaiPositionVaults.push(vault) + continue } } + if (ESXAI && assetInfo.asset.toLowerCase() === ESXAI.toLowerCase()) { + esXaiVaults.push(vault) + continue + } + + if (assetInfo.isERC4626) { if (!erc4626UnderylingMap[assetInfo.asset]) erc4626UnderylingMap[assetInfo.asset] = null erc4626sAndOwners.push([assetInfo.asset, vault]) @@ -212,16 +236,23 @@ Object.keys(config).forEach(chain => { } } - const [underlyingTokens, vaultErc4626Balances] = await Promise.all([ + const [underlyingTokens, vaultErc4626Balances, esXaiVaultBalances] = await Promise.all([ api.multiCall({ abi: 'address:asset', calls: Object.keys(erc4626UnderylingMap) }), api.multiCall({ abi: 'erc20:balanceOf', calls: erc4626sAndOwners.map(x => ({ target: x[0], params: x[1] })) }), + api.multiCall({ abi: 'erc20:balanceOf', calls: esXaiVaults.map(x => ({target: ESXAI, params: [x]}))}) ]) + + esXaiVaultBalances.forEach(x => { + api.addToken(XAI, x) + }) + await Promise.all([ processAaveTvl(aaveVaults, api, AAVE_POOL, AAVE_POOL_DATA_PROVIDER), processCompoundTvl(compoundVaults, api, COMETS, vaults, COMET_REWARD), processLlamaPayTvl(llamapayRouters, api), processGearboxTvl(gearboxFarmingPools, api), - processArrakisTvl(arrakisVaults, api, ARRAKIS_HELPER) + processArrakisTvl(arrakisVaults, api, ARRAKIS_HELPER), + processXaiTvl(xaiPositionVaults, api, ESXAI_POOL_FACTORY, XAI) ]) Object.keys(erc4626UnderylingMap).forEach((erc4626Asset, i) => erc4626UnderylingMap[erc4626Asset] = underlyingTokens[i]) @@ -238,6 +269,28 @@ Object.keys(config).forEach(chain => { } }) +async function processXaiTvl(xaiPositionVaults, api, ESXAI_POOL_FACTORY, XAI) { + if (xaiPositionVaults.length === 0) return + + const pools = await api.multiCall({ abi: abi.getPoolIndicesOfUser, calls: xaiPositionVaults.map(x => ({target: ESXAI_POOL_FACTORY, params: [x]}))}) + const vaultPools = xaiPositionVaults.flatMap((vault, i) => pools[i].map(pool => ([vault, pool]))) + + const [bucketTrackers, stakedAmounts] = await Promise.all([ + api.multiCall({ abi: abi.esXaiStakeBucket, calls: vaultPools.map(x => x[1]) }), + api.multiCall({ abi: abi.getStakedAmounts, calls: vaultPools.map(x => ({target: x[1], params: [x[0]]}))}) + ]) + + stakedAmounts.forEach(x => { + api.addToken(XAI, x) + }) + + const bucketWithdrawables = await api.multiCall({ abi: abi.withdrawableDividendOf, calls: vaultPools.map((x, i) => ({target: bucketTrackers[i], params: [x[0]]}))}) + + bucketWithdrawables.forEach(x => { + api.addToken(XAI, x) + }) +} + async function processArrakisTvl(arrakisVaults, api, arrakisHelper) { if (arrakisVaults.length === 0) return @@ -377,5 +430,9 @@ const abi = { "strategy": "function stakerStrategyShares() returns (address)", "underlyingToken": "function underlyingToken() returns (address)", "sharesToUnderlyingView": "function sharesToUnderlyingView(uint256) returns (uint256)", - "queuedWithdrawals": "function queuedWithdrawals(uint256) returns (bytes32 root, uint256 shares)" + "queuedWithdrawals": "function queuedWithdrawals(uint256) returns (bytes32 root, uint256 shares)", + "getPoolIndicesOfUser": "function getPoolIndicesOfUser(address user) returns (address[])", + "esXaiStakeBucket": "function esXaiStakeBucket() returns (address)", + "getStakedAmounts": "function getStakedAmounts(address) returns (uint256)", + "withdrawableDividendOf": "function withdrawableDividendOf(address) returns (uint256)" } \ No newline at end of file From 79f7c734a0d24b9c33386067b9e1d4681fc897bf Mon Sep 17 00:00:00 2001 From: Deploydon <96504831+Deploydon@users.noreply.github.com> Date: Thu, 28 Nov 2024 14:53:14 -0500 Subject: [PATCH 519/787] Added NFA.Zone TVL Adapter (#12486) --- projects/nfazone/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 projects/nfazone/index.js diff --git a/projects/nfazone/index.js b/projects/nfazone/index.js new file mode 100644 index 000000000000..af8175520106 --- /dev/null +++ b/projects/nfazone/index.js @@ -0,0 +1,21 @@ +const { queryContract, sumTokens } = require("../helper/chain/cosmos"); + +const nfaContract = "neutron1pwjn3tsumm3j7v7clzqhjsaukv4tdjlclhdytawhet68fwlz84fqcrdyf5"; + +async function tvl(api) { + const baseDenoms = await queryContract({ contract: nfaContract, chain: "neutron", data: "{\"get_base_denoms\":{}}" }); + const assets = baseDenoms.map(({ denom }) => denom); + return await sumTokens({ + owners: [nfaContract], + chain: "neutron", + tokens: assets, + api, + }); +} + +module.exports = { + methodology: "Queries the NFA.zone contract to get the supported base assets. The sum of all these base assets held by the contract is returned.", + neutron: { + tvl + } +} \ No newline at end of file From f07b6daaa71ca8f7aa41fb868f343302f0d655ed Mon Sep 17 00:00:00 2001 From: rohatin-codemelt <128687400+rohatin-codemelt@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:56:36 +0200 Subject: [PATCH 520/787] Beam-Dex Adapter (#12475) --- projects/beam-dex/index.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/beam-dex/index.js diff --git a/projects/beam-dex/index.js b/projects/beam-dex/index.js new file mode 100644 index 000000000000..98f9d2a3c5ee --- /dev/null +++ b/projects/beam-dex/index.js @@ -0,0 +1,4 @@ +const { uniV3Export } = require('../helper/uniswapV3') +module.exports = uniV3Export({ + zeta: { factory: '0x28b5244B6CA7Cb07f2f7F40edE944c07C2395603', fromBlock: 5320498, isAlgebra: true } +}) From 970fd510f3f93d03b628c984156ecacdae248744 Mon Sep 17 00:00:00 2001 From: Deploydon <96504831+Deploydon@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:21:33 -0500 Subject: [PATCH 521/787] Added NGMI.Zone TVL Adapter (#12488) --- projects/ngmizone/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/ngmizone/index.js diff --git a/projects/ngmizone/index.js b/projects/ngmizone/index.js new file mode 100644 index 000000000000..732eec07a180 --- /dev/null +++ b/projects/ngmizone/index.js @@ -0,0 +1,23 @@ +const { sumTokens } = require("../helper/chain/cosmos"); + +const ngmiContract = "neutron1xcjn7d2f6p2kjqdxtvm4dzeqay98hcmtts92uugw7efnz4zc05csyhhvq6"; + +const supportedAssets = [ + "untrn", +]; + +async function tvl(api) { + return await sumTokens({ + owners: [ngmiContract], + chain: "neutron", + tokens: supportedAssets, + api, + }); +} + +module.exports = { + methodology: "Totals the $NTRN balance held by the NGMI.zone contract.", + neutron: { + tvl + } +} \ No newline at end of file From 4cfe076bf4c73febe18fc80bd731e74a59824348 Mon Sep 17 00:00:00 2001 From: GiMa-Maya <128942712+GiMa-Maya@users.noreply.github.com> Date: Thu, 28 Nov 2024 21:35:08 +0100 Subject: [PATCH 522/787] Update Maya provider (need help) (#12446) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/mayachain/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mayachain/index.js b/projects/mayachain/index.js index d793d9602dc0..92ee702771d1 100644 --- a/projects/mayachain/index.js +++ b/projects/mayachain/index.js @@ -119,7 +119,7 @@ async function tvl(api) { } } else { // e.g KUJI.KUJI - if (chainStr === baseToken) { + if (['KUJI'].includes(baseToken)) { sdk.util.sumSingleBalance(balances, chain, assetDepth / 1e8); } else if (tokenGeckoMapping[pool]) { sdk.util.sumSingleBalance( From f30cf122d8c94a08197295b8b3e96a854f9e71ca Mon Sep 17 00:00:00 2001 From: techbless1 Date: Fri, 29 Nov 2024 02:17:42 +0400 Subject: [PATCH 523/787] feat: bigpump (#12434) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/bigpump/index.js | 15 +++++++++++++++ projects/helper/chain/ton.js | 32 +++++++++++++++++++++++--------- 2 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 projects/bigpump/index.js diff --git a/projects/bigpump/index.js b/projects/bigpump/index.js new file mode 100644 index 000000000000..76927102a37f --- /dev/null +++ b/projects/bigpump/index.js @@ -0,0 +1,15 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const { sumTokens } = require("../helper/chain/ton"); +const { getConfig } = require("../helper/cache"); + +async function fetchTvl(api) { + const res = await getConfig('bigpump', 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=bigpump') + await sumTokens({ api, tokens: [ADDRESSES.ton.TON], owners: res, onlyWhitelistedTokens: true }) +} + +module.exports = { + timetravel: false, + ton: { + tvl: fetchTvl + } +} \ No newline at end of file diff --git a/projects/helper/chain/ton.js b/projects/helper/chain/ton.js index e9f9e10cfd51..63367bb45013 100644 --- a/projects/helper/chain/ton.js +++ b/projects/helper/chain/ton.js @@ -4,7 +4,7 @@ const plimit = require('p-limit') const _rateLimited = plimit(1) const rateLimited = fn => (...args) => _rateLimited(() => fn(...args)) -const { getUniqueAddresses, sleep } = require('../utils') +const { getUniqueAddresses, sleep, sliceIntoChunks } = require('../utils') async function getTonBalance(addr) { const res = await get(`https://toncenter.com/api/v3/account?address=${addr}`) @@ -14,7 +14,7 @@ async function getTonBalance(addr) { async function getJettonBalances(addr) { const response = await get(`https://tonapi.io/v2/accounts/${addr}/jettons?currencies=usd`) - const res = { } + const res = {} response.balances.forEach(val => { res[val.jetton.address] = { balance: val.balance, price: val.price.prices.USD, decimals: val.jetton.decimals } }) @@ -23,10 +23,7 @@ async function getJettonBalances(addr) { } async function _sumTokensAccount({ api, addr, tokens = [], onlyWhitelistedTokens = false }) { - if (tokens.includes(ADDRESSES.null)) { - const balance = await getTonBalance(addr) - api.add(ADDRESSES.null, balance) - } + if (onlyWhitelistedTokens && tokens.length === 1 && tokens.includes(ADDRESSES.ton.TON)) return; const { balances } = await get(`https://tonapi.io/v2/accounts/${addr}/jettons?currencies=usd`) await sleep(1000 * (3 * Math.random() + 3)) balances.forEach(({ balance, price, jetton }) => { @@ -43,16 +40,16 @@ async function getTokenRates({ tokens = [] }) { const { rates } = await get(`https://tonapi.io/v2/rates?` + ( new URLSearchParams({ tokens: tokens.join(','), currencies: "usd" }) ).toString()); - + const tokenPrices = {}; - + tokens.forEach(tokenAddress => { if (rates[tokenAddress]) { const usdPrice = rates[tokenAddress].prices.USD; tokenPrices[tokenAddress] = usdPrice; } }); - + return tokenPrices } @@ -63,6 +60,9 @@ async function sumTokens({ api, tokens, owners = [], owner, onlyWhitelistedToken if (owner) owners.push(owner) owners = getUniqueAddresses(owners, api.chain) + + if (tokens.includes(ADDRESSES.null)) await addTonBalances({ api, addresses: owners }) + for (const addr of owners) { await sumTokensAccount({ api, addr, tokens, onlyWhitelistedTokens }) } @@ -96,7 +96,21 @@ async function call({ target, abi, params = [] }) { return stack } +async function addTonBalances({ api, addresses }) { + const chunks = sliceIntoChunks(addresses, 399) + for (const chunk of chunks) { + const { accounts } = await get('https://toncenter.com/api/v3/accountStates?address=' + encodeURIComponent(chunk.join(',')) + '&include_boc=false') + accounts.forEach(({ balance }) => { + api.add(ADDRESSES.null, balance) + }) + if (addresses.length > 199) { + await sleep(3000) + } + } +} + module.exports = { + addTonBalances, getTonBalance, getTokenRates, sumTokens, From fccfc324cfbda2ccea1d9f58f1f298b7e84fd877 Mon Sep 17 00:00:00 2001 From: "Jasmin@AvalonLabs" Date: Thu, 28 Nov 2024 15:24:56 -0700 Subject: [PATCH 524/787] Feat: Zetachain PumpBTC Market, Taiko USDa Market (#12465) --- projects/avalon-finance/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index 18c7ed309d7a..bfbd46483678 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -33,6 +33,7 @@ const solvMarkets = { const pumpBTCMarkets = { ethereum: aaveExports('', '0xE00A3FE97714765A1a2054E850724Fd1320FaCc0', undefined, ['0x2eE0438BCC1876cEA2c6fc43dD21417cF3D1c2eF'], { v3: true }), bsc: aaveExports('', '0xb1C93Ba1286b6CCA1496C266f0eBfCe94b0C0cc0', undefined, ['0x58c937fa2D147117dB43d187f9411151edfFf03c'], { v3: true }), + zeta: aaveExports('', '', undefined, ['0xC5b05b7092257Ee3eEAf013198d30F1E8179B6C9'], { v3: true }), } const unibtcMarkets = { @@ -74,7 +75,13 @@ const listaMarkets = { bsc: aaveExports('', '', undefined, ['0x5157f63bE7808DEB090Eee7762e917745896A09E'], { v3: true }), // BSC - ListaDAO } +// @note USDa Defi Lending Markets, not USDaLend +const usdaDefiLendingMarkets = { + taiko: aaveExports('', '', undefined, ['0x5EcDC2432ED77cD8E2cE6183712c5cc712c40ec0'], { v3: true }), +} + module.exports = mergeExports( mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets, listaMarkets, + usdaDefiLendingMarkets, ) module.exports.methodology = methodologies.lendingMarket From fe2ac6b366e0a071b38d3774eb6a49c71d2a5f5b Mon Sep 17 00:00:00 2001 From: santino <83203265+santinoYoung@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:17:00 +0800 Subject: [PATCH 525/787] [UPDATE] update add bsquared onchain (#12493) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/desyn-farm/helper.js | 2 +- projects/desyn-farm/index.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/desyn-farm/helper.js b/projects/desyn-farm/helper.js index e4c51906f273..a75adfcfa3a0 100644 --- a/projects/desyn-farm/helper.js +++ b/projects/desyn-farm/helper.js @@ -1,6 +1,6 @@ const { getConfig } = require('../helper/cache') -const chains = ["ethereum", "arbitrum", "btr", "mode", "zklink", "core", "ailayer", "linea", "merlin", "scroll"]; +const chains = ["ethereum", "arbitrum", "btr", "mode", "zklink", "core", "ailayer", "linea", "merlin", "scroll", "bsquared"]; const abi = { getBalance: "function getBalance(address) view returns (uint256)" diff --git a/projects/desyn-farm/index.js b/projects/desyn-farm/index.js index 37d3e2839d29..07add1a91de6 100644 --- a/projects/desyn-farm/index.js +++ b/projects/desyn-farm/index.js @@ -1,6 +1,11 @@ const { getTvlFunction, chains } = require("./helper"); module.exports = { + hallmarks: [ + [1719734400, "Launched on Merlin Chain"], + [1718092800, "DeSyn KelpDAO Restaking Fund Launched"], + [1713340800, "Restaking Fund Series Launched"] + ], methodology: 'Focused on airdrops from DeSyn and new chains.', } From d832893ed327c8048e3c4b58085382b8b8b0ae6c Mon Sep 17 00:00:00 2001 From: thi-investax <118243127+thi-investax@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:23:46 +0700 Subject: [PATCH 526/787] Track tokenized fund TVL on ethereum for ixswap (#12490) Co-authored-by: anhthii --- projects/ixswap/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/ixswap/index.js b/projects/ixswap/index.js index eb5fafd74b26..03f249014754 100644 --- a/projects/ixswap/index.js +++ b/projects/ixswap/index.js @@ -1,5 +1,6 @@ const {getUniTVL} = require("../helper/unknownTokens"); const {staking} = require('../helper/staking') +const { sumTokensExport } = require('../helper/unwrapLPs') const IXS_POLYGON = "0x1BA17C639BdaeCd8DC4AAc37df062d17ee43a1b8" const IXS_BASE = "0xfe550bffb51eb645ea3b324d772a19ac449e92c5" @@ -7,6 +8,11 @@ const STAKING_CONTRACTS = [ "0xad644F3cC768bc6dceF97096790e2210D5191cec", // stake bank ] + +const FUNDS = [ + '0x9546a22c244497b6fb5338e4ff7c74c5accb3ddd', // CKGP +] + module.exports = { polygon: { tvl: getUniTVL({factory: '0xc2D0e0bc81494adB71Ce9Aa350cC875DaE12D81D', blacklistedTokens: [IXS_POLYGON]}), @@ -16,4 +22,7 @@ module.exports = { tvl: getUniTVL({factory: '0x2eE28d1Bbc2EcB1fFDB83E8055d585E9F0fb757f'}), staking: staking(['0x44F07B446e14127136f3554A16014b49BC67D9E6'], IXS_BASE), }, + ethereum: { + tvl: sumTokensExport({ owners: FUNDS, fetchCoValentTokens: true }) + } } From 928333efa5090dda728781148fd4eaad23238be6 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:09:08 +0100 Subject: [PATCH 527/787] temp fix: forlend --- projects/forlend/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/forlend/index.js b/projects/forlend/index.js index 987c129486a6..c65238e474cd 100644 --- a/projects/forlend/index.js +++ b/projects/forlend/index.js @@ -1,5 +1,5 @@ const { compoundExports2 } = require('../helper/compound') module.exports = { - findora: compoundExports2({ comptroller: '0x3b056De20d662B09f73bDb28Ea6fa7b7aC82259C', cether: '0xbd4eeda5062605f3c3b86039c5f2c5880f9ecd95'}), + findora: compoundExports2({ comptroller: '0x3b056De20d662B09f73bDb28Ea6fa7b7aC82259C', cether: '0xbd4eeda5062605f3c3b86039c5f2c5880f9ecd95', blacklistedTokens: ['0x0000000000000000000000000000000000000000']}), } From fd607e1c5d79d4da647089c5fd792117a2a5eb4c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:10:42 +0100 Subject: [PATCH 528/787] fix forlend --- projects/forlend/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/forlend/index.js b/projects/forlend/index.js index c65238e474cd..9d64a9f4cdb5 100644 --- a/projects/forlend/index.js +++ b/projects/forlend/index.js @@ -1,5 +1,5 @@ const { compoundExports2 } = require('../helper/compound') module.exports = { - findora: compoundExports2({ comptroller: '0x3b056De20d662B09f73bDb28Ea6fa7b7aC82259C', cether: '0xbd4eeda5062605f3c3b86039c5f2c5880f9ecd95', blacklistedTokens: ['0x0000000000000000000000000000000000000000']}), + findora: compoundExports2({ comptroller: '0x3b056De20d662B09f73bDb28Ea6fa7b7aC82259C', }), } From 8bdad3696dcfe3bf13508221c02ca667816557c3 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:19:51 +0100 Subject: [PATCH 529/787] track sacra #12458 --- projects/sacra/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/sacra/index.js diff --git a/projects/sacra/index.js b/projects/sacra/index.js new file mode 100644 index 000000000000..9281dc90b843 --- /dev/null +++ b/projects/sacra/index.js @@ -0,0 +1,12 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require('../helper/unwrapLPs') +const tresury = "0x146dd6E8f9076dfEE7bE0b115bb165d62874d110"; +const rewardPool = '0x8E629C4301871d2A07f76366FE421e86855DC690'; + + +module.exports = { + methodology: `We count the WFTM on treasuty and reward pool`, + fantom: { + tvl: sumTokensExport({ token: ADDRESSES.fantom.WFTM, owners: [tresury, rewardPool] }) + } +} \ No newline at end of file From 9f7ce1ba0b445e27a4ad9c4f9b261c67a286831f Mon Sep 17 00:00:00 2001 From: atoumbre Date: Fri, 29 Nov 2024 13:21:21 +0000 Subject: [PATCH 530/787] fix weft v2 tvl (#12495) --- projects/helper/chain/radixdlt.js | 14 +++++++------- projects/weft-finance-v2/index.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/helper/chain/radixdlt.js b/projects/helper/chain/radixdlt.js index eaafd8f80c89..feb784d83e7c 100644 --- a/projects/helper/chain/radixdlt.js +++ b/projects/helper/chain/radixdlt.js @@ -30,9 +30,9 @@ async function sumTokens({ owner, owners = [], api, transformLSU = false, }) { return fixBalances(api.getBalances()) } -async function queryAddresses({ addresses = [], miscQuery = {}}) { +async function queryAddresses({ addresses = [], miscQuery = {} }) { let items = [] - const chunks = sliceIntoChunks(addresses, 20) + const chunks = sliceIntoChunks(addresses, 20) for (const chunk of chunks) { const body = { ...miscQuery, @@ -70,7 +70,7 @@ async function queryLiquidStakeUnitDetails(addresses = []) { addresses = addresses.filter(i => i !== ADDRESSES.radixdlt.XRD) let lsuRedemptionValues = {} - const chunks = sliceIntoChunks(addresses, 20) + const chunks = sliceIntoChunks(addresses, 20) for (const chunk of chunks) { let body = { "addresses": chunk, @@ -82,7 +82,7 @@ async function queryLiquidStakeUnitDetails(addresses = []) { let validators = [] for (const lsuResource of data.items) { let v = lsuResource.metadata.items.filter(metadataItem => metadataItem.key === "validator") - if (v !== undefined) { + if (v !== undefined && v.length > 0) { let validator = v[0] if (validator.value.typed.type === "GlobalAddress" && validator.value.typed.value.startsWith("validator_")) { lsuRedemptionValues[lsuResource.address] = { @@ -112,10 +112,10 @@ async function queryLiquidStakeUnitDetails(addresses = []) { let xrdStakeVaultBalance = new BigNumber(xrdStakeVault[0].amount) let totalSupplyOfStakeUnits = new BigNumber(lsuRedemptionValues[stakeUnitResourceAddress]["totalSupplyOfStakeUnits"]) - let xrdRedemptionValue = xrdStakeVaultBalance / totalSupplyOfStakeUnits + let xrdRedemptionValue = xrdStakeVaultBalance / totalSupplyOfStakeUnits lsuRedemptionValues[stakeUnitResourceAddress]["xrdRedemptionValue"] = xrdRedemptionValue } - } catch(error) { + } catch (error) { console.log("There was an error getting the xrd redemption value. Check that all addressed used are LSU resource addresses") return {} } @@ -123,7 +123,7 @@ async function queryLiquidStakeUnitDetails(addresses = []) { return lsuRedemptionValues } -function sumTokensExport({...args}) { +function sumTokensExport({ ...args }) { return async (api) => sumTokens({ ...args, api, }) } diff --git a/projects/weft-finance-v2/index.js b/projects/weft-finance-v2/index.js index 7c338cbab63a..619127b84986 100644 --- a/projects/weft-finance-v2/index.js +++ b/projects/weft-finance-v2/index.js @@ -12,7 +12,7 @@ const lendingMarket = 'component_rdx1cpy6putj5p7937clqgcgutza7k53zpha039n9u5hkk0 const resourcePoolsKVS = 'internal_keyvaluestore_rdx1kzjr763caq96j0kv883vy8gnf3jvrrp7dfm9zr5n0akryvzsxvyujc' async function tvl(api) { - return sumTokens({ owners: [lendingPool, lendingMarket], api }); + return sumTokens({ owners: [lendingPool, lendingMarket], api, transformLSU: true }); } async function borrowed(api) { From 2988e34448cd54654850d79484d041ad8d27f827 Mon Sep 17 00:00:00 2001 From: MoonSeoHyeong <49308460+ddis1004@users.noreply.github.com> Date: Fri, 29 Nov 2024 22:24:13 +0900 Subject: [PATCH 531/787] Added Nexton Adapter (#12361) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/nexton/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/nexton/index.js diff --git a/projects/nexton/index.js b/projects/nexton/index.js new file mode 100644 index 000000000000..0c5a3dde02e9 --- /dev/null +++ b/projects/nexton/index.js @@ -0,0 +1,14 @@ +const { call } = require("../helper/chain/ton"); + +const contractAddress = "EQBED_4VLQC-SRdrVCtmcmwO7PtnvdLSRFRYNaGIZBqpaQHQ"; + +const tvl = async (api) => { + const tonStaked = (await call({ target: contractAddress, abi: "tonStaked" }))[0]; + api.addGasToken(tonStaked) +} + +module.exports = { + ton: { + tvl + } +} From 5f11fa835e9ddb3b8b096db7d5dab8414cbd3ac5 Mon Sep 17 00:00:00 2001 From: Davidutro <40721951+Davidutro@users.noreply.github.com> Date: Sat, 30 Nov 2024 14:13:37 -0500 Subject: [PATCH 532/787] Update Ajna-v2 to include new chain deployments (#12506) --- projects/ajna-v2/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/ajna-v2/index.js b/projects/ajna-v2/index.js index f4cfaf18945e..609ed669b1d7 100644 --- a/projects/ajna-v2/index.js +++ b/projects/ajna-v2/index.js @@ -6,7 +6,12 @@ const poolFactories = { arbitrum: '0x595c823EdAA612972d77aCf324C11F6284B9f5F6', base: '0x154FFf344f426F99E328bacf70f4Eb632210ecdc', optimism: '0x43cD60250CBBC0C22663438dcf644F5162988C06', - polygon: '0x3D6b8B4a2AEC46961AE337F4A9EBbf283aA482AA' + polygon: '0x3D6b8B4a2AEC46961AE337F4A9EBbf283aA482AA', + blast: '0xcfCB7fb8c13c7bEffC619c3413Ad349Cbc6D5c91', + filecoin: '0x0E4a2276Ac259CF226eEC6536f2b447Fc26F2D8a', + linea: '0xd72A448C3BC8f47EAfFc2C88Cf9aC9423Bfb5067', + mode: '0x62Cf5d9075D1d6540A6c7Fa836162F01a264115A', + rari: '0x10cE36851B0aAf4b5FCAdc93f176aC441D4819c9' }; async function getTvl(poolFactory, api) { @@ -33,4 +38,4 @@ module.exports = Object.keys(poolFactories).reduce((acc, chain) => { borrowed: (api) => getBorrowed(poolFactories[chain], api) }; return acc; -}, { misrepresentedTokens: true }); \ No newline at end of file +}, { misrepresentedTokens: true }); From 7d66da2cc1cf52d2f4ad528691358e1e3bbfad07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=A3o=20Pinto?= <87367287+Sk1mer12@users.noreply.github.com> Date: Sun, 1 Dec 2024 02:32:02 +0700 Subject: [PATCH 533/787] Add support to ynETHx (#12505) --- projects/yieldnest/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/yieldnest/index.js b/projects/yieldnest/index.js index b0658cbde4c6..0383bef2b986 100644 --- a/projects/yieldnest/index.js +++ b/projects/yieldnest/index.js @@ -2,6 +2,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const YN_ETH = '0x09db87a538bd693e9d08544577d5ccfaa6373a48' +const yn_ETHx = '0x657d9ABA1DBb59e53f9F3eCAA878447dCfC96dCb' module.exports = { ethereum: { @@ -12,6 +13,9 @@ module.exports = { const lsds = await api.call({ abi: 'address[]:getAssets', target: lsdRegistry }) const bals = await api.call({ abi: 'function getAllAssetBalances() view returns (uint256[])', target: lsdRegistry }) api.add(lsds, bals) + const maxethBalance = await api.call({ abi: 'uint256:totalAssets', target: yn_ETHx }) + api.add(ADDRESSES.null, maxethBalance) + } }, bsc: { @@ -21,4 +25,4 @@ module.exports = { api.add(ADDRESSES.null, ynBnbBalance) } }, -} \ No newline at end of file +} From d6c16ce9533904962db40f4871a71788b0ae0d8e Mon Sep 17 00:00:00 2001 From: Ayush Shaw <41021590+shawayush@users.noreply.github.com> Date: Sun, 1 Dec 2024 01:13:18 +0530 Subject: [PATCH 534/787] Added EclipseFi TVL Adapter (#12504) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/eclipse/index.js | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 projects/eclipse/index.js diff --git a/projects/eclipse/index.js b/projects/eclipse/index.js new file mode 100644 index 000000000000..dc53a7cf912b --- /dev/null +++ b/projects/eclipse/index.js @@ -0,0 +1,68 @@ +const { queryContract } = require('../helper/chain/cosmos') + +const tokens = { + "ASTRO": "factory/neutron1ffus553eet978k024lmssw0czsxwr97mggyv85lpcsdkft8v9ufsz3sa07/astro", + "ECLIP": "factory/neutron10sr06r3qkhn7xzpw3339wuj77hu06mzna6uht0/eclip" +} + +async function singleSideStaking(api){ + const astroStakingBalance = await queryContract({ + contract: "neutron1qk5nn9360pyu2tta7r4hvmuxwhxj5res79knt0sntmjcnwsycqyqy2ft9n", + chain: 'neutron', + data: { + total_staking: {} + } + }); + + api.add(tokens["ASTRO"], (astroStakingBalance)) +} + +async function lpStaking(api){ + const astroStakingBalance = await queryContract({ + contract: "neutron1d5p2lwh92040wfkrccdv5pamxtq7rsdzprfefd9v9vrh2c4lgheqvv6uyu", + chain: 'neutron', + data: { + total_staking: {} + } + }); + + const totalDeposit = await queryContract({ + contract: "neutron1zlf3hutsa4qnmue53lz2tfxrutp8y2e3rj4nkghg3rupgl4mqy8s5jgxsn", + chain: 'neutron', + data: { + total_deposit: {} + } + }); + + const totalShares = await queryContract({ + contract: "neutron1zlf3hutsa4qnmue53lz2tfxrutp8y2e3rj4nkghg3rupgl4mqy8s5jgxsn", + chain: 'neutron', + data: { + total_shares: {} + } + }); + + const conversionRate = Number(totalDeposit) / Number(totalShares); + + api.add(tokens["ASTRO"], (2 * conversionRate * astroStakingBalance)) +} + +async function eclipStaking(api){ + const eclipStakingBalance = await queryContract({ + contract: "neutron19q93n64nyet24ynvw04qjqmejffkmyxakdvl08sf3n3yeyr92lrs2makhx", + chain: 'neutron', + data: { + query_state: {} + } + }); + + api.add(tokens["ECLIP"], ((Number(eclipStakingBalance.stake_state.total_bond_amount) ))); +} + +module.exports = { + neutron: { + tvl: singleSideStaking, + pool2: lpStaking, + staking: eclipStaking, + }, +} \ No newline at end of file From 694b7f84cf6ed01afb63bce89a604702fe61b79d Mon Sep 17 00:00:00 2001 From: TJ <58812386+TJ-2@users.noreply.github.com> Date: Sun, 1 Dec 2024 03:44:46 +0800 Subject: [PATCH 535/787] Add Meridian on Taraxa (#12503) --- projects/meridian-lend/index.js | 2 ++ projects/meridian/index.js | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/meridian-lend/index.js b/projects/meridian-lend/index.js index df360e037e56..1fe6dcc8ff0c 100644 --- a/projects/meridian-lend/index.js +++ b/projects/meridian-lend/index.js @@ -17,4 +17,6 @@ module.exports = { meter: v2("meter", "0x64Be9ee529E555860DA0705819138F41247e76E6"), fuse: v2("fuse", "0xbdD3d2f93cc1c6C951342C42Ef0795323CE83719"), taiko: v2("taiko", "0x8Cf3E0e7aE4eB82237d0931388EA72D5649D76e0"), + tara: v2("tara", "0x96a52CdFE64749C146E13F68641073566275433e"), + } \ No newline at end of file diff --git a/projects/meridian/index.js b/projects/meridian/index.js index 9c2d836b9fc3..a666c742bb25 100644 --- a/projects/meridian/index.js +++ b/projects/meridian/index.js @@ -1,8 +1,10 @@ const { getLiquityTvl } = require('../helper/liquity') module.exports = { - methodology: "Deposited ETH and TLOS on the Base and Telos network", + methodology: "Deposited Collateral on Meridian Mint", base: { tvl: getLiquityTvl("0x56a901FdF67FC52e7012eb08Cfb47308490A982C") }, telos: { tvl: getLiquityTvl("0xb1F92104E1Ad5Ed84592666EfB1eB52b946E6e68") }, fuse: { tvl: getLiquityTvl("0xCD413fC3347cE295fc5DB3099839a203d8c2E6D9") }, -}; \ No newline at end of file + tara: { tvl: getLiquityTvl("0xd2ff761A55b17a4Ff811B262403C796668Ff610D") }, +}; + From 041a637cdd1096f035f8f17d17392fcf2b0d2fad Mon Sep 17 00:00:00 2001 From: Joel Mun Date: Sun, 1 Dec 2024 04:45:10 +0900 Subject: [PATCH 536/787] fix: zkLend staking contract address (#12502) --- projects/zklend-strk-staking/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/zklend-strk-staking/index.js b/projects/zklend-strk-staking/index.js index ef463027bd7d..b1a2d0afc5fc 100644 --- a/projects/zklend-strk-staking/index.js +++ b/projects/zklend-strk-staking/index.js @@ -2,7 +2,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { call } = require('../helper/chain/starknet') const { strkStakingAbi } = require('./abi'); -const stakingContract = '0x00ca1702e64c81d9a07b86bd2c540188d92a2c73cf5cc0e508d949015e7e84a7' +const stakingContract = '0x057ea05c22d6b162d0f2ef4b3d1e1edf3c065d81cf0f41950f716a71e9ad6bae' async function tvl(api) { const stakedAmount = await call({ target: stakingContract, abi: strkStakingAbi.get_total_stake }) From 4dc45eab9ca217c466578122bea83791e03ef778 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:49:57 +0100 Subject: [PATCH 537/787] code refactor --- projects/helper/chain/sui.js | 2 +- projects/springsui-ecosystem/index.js | 36 ++++++++++++++------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/projects/helper/chain/sui.js b/projects/helper/chain/sui.js index 7bfd9a9c8bfd..97ff648317e8 100644 --- a/projects/helper/chain/sui.js +++ b/projects/helper/chain/sui.js @@ -48,7 +48,7 @@ async function getObjects(objectIds) { "showContent": true, }], }) - return objectIds.map(i => result.find(j => j.data.objectId === i)?.data?.content) + return objectIds.map(i => result.find(j => j.data?.objectId === i)?.data?.content) } async function getDynamicFieldObject(parent, id, { idType = '0x2::object::ID' } = {}) { diff --git a/projects/springsui-ecosystem/index.js b/projects/springsui-ecosystem/index.js index 7f8178a58f73..0a924af55910 100644 --- a/projects/springsui-ecosystem/index.js +++ b/projects/springsui-ecosystem/index.js @@ -2,29 +2,31 @@ const sui = require('../helper/chain/sui') const CREATE_EVENT_TYPE = '0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::events::Event<0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CreateEvent>'; const EXCLUDE_POOL_IDS = [ - '0x15eda7330c8f99c30e430b4d82fd7ab2af3ead4ae17046fcb224aa9bad394f6b', + '0x15eda7330c8f99c30e430b4d82fd7ab2af3ead4ae17046fcb224aa9bad394f6b', ] async function tvl() { - const poolIds = (await sui.queryEvents({ - eventType: CREATE_EVENT_TYPE, - transform: (i) => i.event.liquid_staking_info_id, - })).filter((id) => !EXCLUDE_POOL_IDS.includes(id)); + const poolIds = (await sui.queryEvents({ + eventType: CREATE_EVENT_TYPE, + transform: (i) => i.event.liquid_staking_info_id, + })).filter((id) => !EXCLUDE_POOL_IDS.includes(id)); - let suiAmount = 0; - for (const poolId of poolIds) { - const pool = await sui.getObject(poolId); - suiAmount += pool.fields.storage.fields.total_sui_supply / 10 ** 9 - } - return { - sui: suiAmount, - } + let suiAmount = 0; + const data = await sui.getObjects(poolIds); + + data.forEach((pool) => { + if (!pool) return; + suiAmount += pool.fields.storage.fields.total_sui_supply / 10 ** 9; + }); + return { + sui: suiAmount, + } } module.exports = { - methodology: "Calculates the amount of SUI staked in ecosystem SpringSui LSTs.", - sui: { - tvl, - } + methodology: "Calculates the amount of SUI staked in ecosystem SpringSui LSTs.", + sui: { + tvl, + } } From 215c321add0d857d13342a4aa0ffe1efd792f635 Mon Sep 17 00:00:00 2001 From: reikodoteth <149171651+reikodoteth@users.noreply.github.com> Date: Sat, 30 Nov 2024 20:56:03 +0100 Subject: [PATCH 538/787] Update Goat Protocol (#12500) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/goat-protocol/index.js | 36 ++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/projects/goat-protocol/index.js b/projects/goat-protocol/index.js index c8aa49e7ae8e..c56d280878b1 100644 --- a/projects/goat-protocol/index.js +++ b/projects/goat-protocol/index.js @@ -1,24 +1,28 @@ -const { yieldHelper } = require("../helper/unknownTokens"); const { getConfig } = require('../helper/cache'); const { staking } = require('../helper/staking') -const chain = "arbitrum"; -const tokenAPI = "address:want"; const GOA_TOKEN_CONTRACT = '0x8c6Bd546fB8B53fE371654a0E54D7a5bD484b319'; const REWARD_POOL_CONTRACT = '0xAD9CE8580a1Cd887038405275cB02443E8fb88aC'; +const config = { + arbitrum: {} +} + module.exports = { - timetravel: false, - doublecounted: true, - [chain]: { - tvl: async (_, _b, { [chain]: block }) => { - const pools = await getConfig('goat-protocol', 'https://raw.githubusercontent.com/goatfi/goat-address-book/main/vault-registry/arbitrum.json'); - const vaults = []; - for(var i = 0; i < pools.length; i++) - if(pools[i].platformId != 'goatfi') - vaults.push(pools[i].earnedTokenAddress); - return yieldHelper({ vaults, chain, block, tokenAPI, useDefaultCoreAssets: true, }) - }, - staking: staking(REWARD_POOL_CONTRACT, GOA_TOKEN_CONTRACT) + doublecounted: true, + hallmarks: [ + [1732186800, "Multistrategies Launch"] + ], +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: async (api) => { + const multistrategies = await getConfig('goat-protocol', `https://api.goat.fi/multistrategies`); + const calls = multistrategies.filter(multistrategy => multistrategy.chain === api.chain).map(multistrategy => multistrategy.address); + return api.erc4626Sum({ calls, isOG4626: true, }) + } } -} \ No newline at end of file +}) + +module.exports.arbitrum.staking = staking(REWARD_POOL_CONTRACT, GOA_TOKEN_CONTRACT) \ No newline at end of file From 3e33a5a717b8c421e442f391cea74f1dcfec57d4 Mon Sep 17 00:00:00 2001 From: Samster91 <37342443+samster91@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:04:25 +0100 Subject: [PATCH 539/787] IdleDAO - New vault added (#12498) Co-authored-by: Samster91 Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/idle/index.js | 53 +++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/projects/idle/index.js b/projects/idle/index.js index e15ae60c793e..1b0c925d00f4 100644 --- a/projects/idle/index.js +++ b/projects/idle/index.js @@ -58,6 +58,11 @@ const contracts = { }, optimism: { + }, + arbitrum: { + cdos: [ + "0x3919396Cd445b03E6Bb62995A7a4CB2AC544245D" // Bastion Credit Vault + ] } } @@ -119,32 +124,32 @@ async function tvl(api) { fromBlock, }) cdos.push(...logs.map(i => i.proxy)) - - const [strategyToken, token, aatrances, bbtrances, aaprices, bbprices] = await Promise.all(['address:strategyToken', "address:token", "address:AATranche", "address:BBTranche", "uint256:priceAA", "uint256:priceBB"].map(abi => api.multiCall({ abi, calls: cdos }))) - blacklistedTokens.push(...cdos) - blacklistedTokens.push(...aatrances) - blacklistedTokens.push(...bbtrances) - - // Get CDOs contract values - const contractValue = await api.multiCall({ abi: 'uint256:getContractValue', calls: cdos }) - cdos.forEach((cdo, i) => { - const tokenDecimals = tokensDecimals[token[i]] || 18 - trancheTokensMapping[aatrances[i]] = { - token: token[i], - decimals: tokenDecimals, - price: BigNumber(aaprices[i]).div(`1e${tokenDecimals}`).toFixed() - } - trancheTokensMapping[bbtrances[i]] = { - token: token[i], - decimals: tokenDecimals, - price: BigNumber(bbprices[i]).div(`1e${tokenDecimals}`).toFixed() - } - - // Get CDOs underlying tokens balances - sdk.util.sumSingleBalance(balances, token[i], contractValue[i], api.chain) - }) } + const [cdoToken, aatrances, bbtrances, aaprices, bbprices] = await Promise.all(["address:token", "address:AATranche", "address:BBTranche", "uint256:priceAA", "uint256:priceBB"].map(abi => api.multiCall({ abi, calls: cdos }))) + blacklistedTokens.push(...cdos) + blacklistedTokens.push(...aatrances) + blacklistedTokens.push(...bbtrances) + + // Get CDOs contract values + const contractValue = await api.multiCall({ abi: 'uint256:getContractValue', calls: cdos }) + cdos.forEach((cdo, i) => { + const tokenDecimals = tokensDecimals[cdoToken[i]] || 18 + trancheTokensMapping[aatrances[i]] = { + token: cdoToken[i], + decimals: tokenDecimals, + price: BigNumber(aaprices[i]).div(`1e${tokenDecimals}`).toFixed() + } + trancheTokensMapping[bbtrances[i]] = { + token: cdoToken[i], + decimals: tokenDecimals, + price: BigNumber(bbprices[i]).div(`1e${tokenDecimals}`).toFixed() + } + + // Get CDOs underlying tokens balances + sdk.util.sumSingleBalance(balances, cdoToken[i], contractValue[i], api.chain) + }) + const trancheTokensBalancesCalls = [] allTokens.forEach((tokens, i) => { From 26ece794bf81d639bf7537d837fb8c345568ace4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 30 Nov 2024 21:38:03 +0100 Subject: [PATCH 540/787] track hlp --- projects/hyperliquid-hlp/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/hyperliquid-hlp/index.js diff --git a/projects/hyperliquid-hlp/index.js b/projects/hyperliquid-hlp/index.js new file mode 100644 index 000000000000..4ee18f085389 --- /dev/null +++ b/projects/hyperliquid-hlp/index.js @@ -0,0 +1,13 @@ +const { get } = require("../helper/http"); + +async function tvl(api) { + const data = await get("https://stats-data.hyperliquid.xyz/Mainnet/vaults"); + const hlp = data.find((d) => d.summary?.vaultAddress?.toLowerCase() === "0xdfc24b077bc1425ad1dea75bcb6f8158e10df303"); + api.addUSDValue(+hlp.summary.tvl) +} + +module.exports = { + hyperliquid: { tvl }, + misrepresentedTokens: true, + doublecounted: true, +} \ No newline at end of file From 4b3e8710f65e5e0e9cec26600ee490d11a144ac3 Mon Sep 17 00:00:00 2001 From: nikitariabukhin <108471336+nikitariabukhin@users.noreply.github.com> Date: Sat, 30 Nov 2024 16:09:02 -0500 Subject: [PATCH 541/787] Create index.js (#12507) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/bitomato/index.js | 21 +++++++++++++++++++++ projects/helper/bitcoin-book/index.js | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 projects/bitomato/index.js diff --git a/projects/bitomato/index.js b/projects/bitomato/index.js new file mode 100644 index 000000000000..e23999051adc --- /dev/null +++ b/projects/bitomato/index.js @@ -0,0 +1,21 @@ +const { cexExports } = require('../helper/cex'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js'); + +const config = { + bitcoin: { + owners: bitcoinAddressBook.bitomato, + }, + ethereum: { + owners: [ + '0x0b8b4EB21787d5a07AbAF6BC35E15CD5C59Cbb94', // Ethereum address for Bitomato + ], + }, + bsc: { + owners: [ + '0x0b8b4EB21787d5a07AbAF6BC35E15CD5C59Cbb94', // BSC address for Bitomato + ], + }, +}; + +module.exports = cexExports(config); +module.exports.methodology = 'We are tracking part of their cold wallets for Bitomato. The addresses were provided based on public information and verified activity.'; diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index 67c0ba8f201a..a27a76b17cf7 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -95,9 +95,13 @@ const teleswap = [ '31uHNFfbejkbUD2B26o2CARfU1ALJ6x6Ag', // BOB_LOCKER '3LNsey3ceG9ZHkQ7bcfAjwnew7KVujHt29', // BRC20_LOCKER ] +const bitomato = [ + 'bc1qgmtx3caf8rlxmzw703ga2sljv3rkkj39e4ysk9', +] module.exports = { ...fetchers, + bitomato, bitlayerBridge, teleswap, ainn, From 018a3d2bb938cda270fb847ccf0b15da8796f881 Mon Sep 17 00:00:00 2001 From: Adolf998 <154962952+Adolf998@users.noreply.github.com> Date: Sun, 1 Dec 2024 05:10:39 +0800 Subject: [PATCH 542/787] add bouncebit-cedefi project (#12230) --- projects/bouncebit-cedefi/index.js | 62 ++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 projects/bouncebit-cedefi/index.js diff --git a/projects/bouncebit-cedefi/index.js b/projects/bouncebit-cedefi/index.js new file mode 100644 index 000000000000..100eebb045f5 --- /dev/null +++ b/projects/bouncebit-cedefi/index.js @@ -0,0 +1,62 @@ +const { cachedGraphQuery } = require('../helper/cache') + +const config = { + ethereum: { + subgraphUrl: 'https://api.studio.thegraph.com/query/96517/bb-defillama-eth/v0.0.4' + }, + bsc: { + subgraphUrl: 'https://api.studio.thegraph.com/query/96517/bb-defillama-bsc/v0.0.2' + }, + bouncebit: { + main: { url: 'https://bitswap-subgraph.bouncebit.io/subgraphs/name/bb-defillama-bb' }, + boyya: { url: 'https://bitswap-subgraph.bouncebit.io/subgraphs/name/bb-defillama-boyya-bb' } + } +} + +const query = `{ + tokens { + id + tvl + } +}` + +// stbbtc to bbtc +const TOKEN_MAPPINGS = { + '0x7f150c293c97172c75983bd8ac084c187107ea19': '0xf5e11df1ebcf78b6b6d26e04ff19cd786a1e81dc', // stBBTC -> bbtc +} + +async function fetchTokens(chain, subgraphUrl) { + const prefix = chain === 'bouncebit' ? `bouncebit-cedefi${subgraphUrl.includes('boyya') ? '-boyya' : ''}` : 'bouncebit-cedefi' + return cachedGraphQuery(`${prefix}/${chain}`, subgraphUrl, query) +} + +async function tvl(api) { + const chain = api.chain + + const tokenLists = await Promise.all( + chain === 'bouncebit' + ? [ + fetchTokens(chain, config[chain].main.url), + fetchTokens(chain, config[chain].boyya.url) + ] + : [fetchTokens(chain, config[chain].subgraphUrl)] + ) + + const allTokens = tokenLists.flatMap(result => result.tokens) + + allTokens.forEach(token => { + if (token.tvl <= 0) return + const targetToken = TOKEN_MAPPINGS[token.id] || token.id + api.add(targetToken, token.tvl) + }) + + return api.getBalances() +} + +module.exports = { + methodology: "Calculate TVL by querying BounceBit Cedefi subgraph" +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { tvl } +}) \ No newline at end of file From d7358c2897aa1793ab1d8136394cc7121cadaba2 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 30 Nov 2024 23:56:49 +0100 Subject: [PATCH 543/787] minor fix --- projects/helper/tokenMapping.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 3f638cfe4aee..ad04634ac943 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -82,6 +82,9 @@ const fixBalancesTokens = { '0x5d0fa4c5668e5809c83c95a7cef3a9dd7c68d4fe': { coingeckoId: "taraxa", decimals: 18 }, '0xc26b690773828999c2612549cc815d1f252ea15e': { coingeckoId: "mountain-protocol-usdm", decimals: 18 }, }, + xlayer: { + [ADDRESSES.null]: { coingeckoId: "okb", decimals: 18 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 1d48f4aea70befe57412a307ff4b0ae6d44785bd Mon Sep 17 00:00:00 2001 From: atoumbre Date: Sun, 1 Dec 2024 12:00:55 +0000 Subject: [PATCH 544/787] fix Weft V2 tvl (#12509) --- projects/helper/chain/radixdlt.js | 5 +++++ projects/weft-finance-v2/index.js | 1 + 2 files changed, 6 insertions(+) diff --git a/projects/helper/chain/radixdlt.js b/projects/helper/chain/radixdlt.js index feb784d83e7c..7c8cbf2335bb 100644 --- a/projects/helper/chain/radixdlt.js +++ b/projects/helper/chain/radixdlt.js @@ -98,6 +98,11 @@ async function queryLiquidStakeUnitDetails(addresses = []) { } } + + if (validators.length == 0) { + continue + } + let validatorsDetailsBody = { "addresses": validators, "aggregation_level": "Vault" diff --git a/projects/weft-finance-v2/index.js b/projects/weft-finance-v2/index.js index 619127b84986..41e84af0972c 100644 --- a/projects/weft-finance-v2/index.js +++ b/projects/weft-finance-v2/index.js @@ -12,6 +12,7 @@ const lendingMarket = 'component_rdx1cpy6putj5p7937clqgcgutza7k53zpha039n9u5hkk0 const resourcePoolsKVS = 'internal_keyvaluestore_rdx1kzjr763caq96j0kv883vy8gnf3jvrrp7dfm9zr5n0akryvzsxvyujc' async function tvl(api) { + // return sumTokens({ owners: [lendingPool, lendingMarket], api, transformLSU: true }); } From b159d1645d42c15d8eeda9e141c5f68e8e3b9cf2 Mon Sep 17 00:00:00 2001 From: cairo Date: Sun, 1 Dec 2024 22:30:30 +0100 Subject: [PATCH 545/787] Fix TVL for Elixir (#12485) --- projects/elixir/index.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/projects/elixir/index.js b/projects/elixir/index.js index 04681dee2bf0..88e31f9f7519 100644 --- a/projects/elixir/index.js +++ b/projects/elixir/index.js @@ -6,10 +6,10 @@ const MANAGER_ABI = { } const DEUSD_LP_STAKING = "0xC7963974280261736868f962e3959Ee1E1B99712"; -const COMMITS = "0x4265f5D6c0cF127d733EeFA16D66d0df4b650D53"; -const FOUNDATION = "0x4B4EEC1DDC9420a5cc35a25F5899dC5993f9e586"; -const FOUNDATION_2 = "0x738744237b7Fd97AF670d9ddF54390c24263CeA8"; -const deUSD = "0x15700b564ca08d9439c58ca5053166e8317aa138" +const COMMITS_CONTRACT = "0x4265f5D6c0cF127d733EeFA16D66d0df4b650D53"; +const COMMITS_VAULT = "0x4B4EEC1DDC9420a5cc35a25F5899dC5993f9e586"; +const COMMITS_VAULT_2 = "0x704377f719651C3eE6902Ff3C9D5522e5054d429"; +const deUSD = "0x15700b564ca08d9439c58ca5053166e8317aa138"; const LP_TOKENS = [ "0xb478Bf40dD622086E0d0889eeBbAdCb63806ADde", // DEUSD/DAI Curve LP @@ -37,9 +37,9 @@ const integration = async (api, manager, poolIds, tokens) => { module.exports = { ethereum: { tvl: async (api) => { - // const deusdSupply = await api.call({ target: deUSD, abi: "erc20:totalSupply" }) - // api.add(deUSD, deusdSupply); - await api.sumTokens({ owners: [COMMITS, FOUNDATION, FOUNDATION_2], tokens: [ADDRESSES.ethereum.STETH, ADDRESSES.null, ADDRESSES.ethereum.SDAI, ADDRESSES.ethereum.sUSDS] }) + const deusdSupply = await api.call({ target: deUSD, abi: "erc20:totalSupply" }) + api.add(deUSD, deusdSupply); + await api.sumTokens({ owners: [COMMITS_CONTRACT, COMMITS_VAULT, COMMITS_VAULT_2], tokens: [ADDRESSES.ethereum.STETH, ADDRESSES.null] }) }, pool2: sumTokensExport({ owner: DEUSD_LP_STAKING, tokens: LP_TOKENS }) }, From 3252f7797e839319e4234a32248b78066e95de98 Mon Sep 17 00:00:00 2001 From: leifu Date: Mon, 2 Dec 2024 00:51:25 +0200 Subject: [PATCH 546/787] Update Thales TVL calculation across chains (#12508) --- projects/thales/abi.json | 3 +- projects/thales/addresses.js | 25 +++++ projects/thales/chainConfig.js | 63 +++++++++++++ projects/thales/constants.js | 66 +++++++++++++ projects/thales/index.js | 168 +++++---------------------------- projects/thales/utils.js | 70 ++++++++++++++ 6 files changed, 249 insertions(+), 146 deletions(-) create mode 100644 projects/thales/addresses.js create mode 100644 projects/thales/chainConfig.js create mode 100644 projects/thales/constants.js create mode 100644 projects/thales/utils.js diff --git a/projects/thales/abi.json b/projects/thales/abi.json index fff29c16a54f..f6307863a367 100644 --- a/projects/thales/abi.json +++ b/projects/thales/abi.json @@ -3,5 +3,6 @@ "totalDeposited": "uint256:totalDeposited", "tradingAllocation": "uint256:tradingAllocation", "getUnderlyingBalance": "function getUnderlyingBalances() view returns (uint256 amount0Current, uint256 amount1Current)", - "activeParlayMarkets": "function activeParlayMarkets(uint index, uint pageSize) external view returns (address[] memory)" + "activeParlayMarkets": "function activeParlayMarkets(uint index, uint pageSize) external view returns (address[] memory)", + "getActiveTickets": "function getActiveTickets(uint _index, uint _pageSize) external view returns (address[] memory)" } diff --git a/projects/thales/addresses.js b/projects/thales/addresses.js new file mode 100644 index 000000000000..db1148e4be03 --- /dev/null +++ b/projects/thales/addresses.js @@ -0,0 +1,25 @@ +const ADDRESSES = require('../helper/coreAssets.json') + +const CHAIN_TOKENS = { + optimism: { + USDC: ADDRESSES.optimism.USDC_CIRCLE, + ETH: ADDRESSES.optimism.WETH_1, + WETH: ADDRESSES.optimism.WETH, + THALES: '0x217d47011b23bb961eb6d93ca9945b7501a5bb11' + }, + arbitrum: { + USDC: ADDRESSES.arbitrum.USDC, + WETH: ADDRESSES.arbitrum.WETH, + THALES: '0xE85B662Fe97e8562f4099d8A1d5A92D4B453bF30' + }, + polygon: { + USDC: ADDRESSES.polygon.USDC + }, + base: { + USDC: ADDRESSES.base.USDbC, + WETH: ADDRESSES.base.WETH, + THALES: '0xf34e0cff046e154cafcae502c7541b9e5fd8c249' + } +} + +module.exports = CHAIN_TOKENS diff --git a/projects/thales/chainConfig.js b/projects/thales/chainConfig.js new file mode 100644 index 000000000000..8a0ce49bd6a0 --- /dev/null +++ b/projects/thales/chainConfig.js @@ -0,0 +1,63 @@ +const CHAIN_TOKENS = require('./addresses') +const CONTRACTS = require('./constants') + +const CHAIN_CONFIG = { + optimism: { + tokens: CHAIN_TOKENS.optimism, + staking: { + contract: CONTRACTS.optimism.STAKING_CONTRACT, + token: CHAIN_TOKENS.optimism.THALES + }, + speedMarkets: CONTRACTS.optimism.SPEED_MARKETS, + managers: CONTRACTS.optimism.MANAGERS, + liquidityPools: { + sports: [ + { address: CONTRACTS.optimism.SPORTS_POOLS.USDC, token: 'USDC' }, + { address: CONTRACTS.optimism.SPORTS_POOLS.WETH, token: 'WETH' }, + { address: CONTRACTS.optimism.SPORTS_POOLS.THALES, token: 'THALES' } + ], + digitalOptions: [ + { address: CONTRACTS.optimism.DIGITAL_POOLS.USDC, token: 'USDC' } + ] + } + }, + arbitrum: { + tokens: CHAIN_TOKENS.arbitrum, + staking: { + contract: CONTRACTS.arbitrum.STAKING_CONTRACT, + token: CHAIN_TOKENS.arbitrum.THALES + }, + speedMarkets: CONTRACTS.arbitrum.SPEED_MARKETS, + managers: CONTRACTS.arbitrum.MANAGERS, + liquidityPools: { + sports: [ + { address: CONTRACTS.arbitrum.SPORTS_POOLS.USDC, token: 'USDC' }, + { address: CONTRACTS.arbitrum.SPORTS_POOLS.WETH, token: 'WETH' }, + { address: CONTRACTS.arbitrum.SPORTS_POOLS.THALES, token: 'THALES' } + ], + digitalOptions: [ + { address: CONTRACTS.arbitrum.DIGITAL_POOLS.USDC, token: 'USDC' } + ] + } + }, + polygon: { + tokens: CHAIN_TOKENS.polygon, + speedMarkets: CONTRACTS.polygon.SPEED_MARKETS + }, + base: { + tokens: CHAIN_TOKENS.base, + staking: { + contract: CONTRACTS.base.STAKING_CONTRACT, + token: CHAIN_TOKENS.base.THALES + }, + speedMarkets: CONTRACTS.base.SPEED_MARKETS, + managers: CONTRACTS.base.MANAGERS, + liquidityPools: { + digitalOptions: [ + { address: CONTRACTS.base.DIGITAL_POOLS.USDC, token: 'USDC' } + ] + } + } +} + +module.exports = CHAIN_CONFIG diff --git a/projects/thales/constants.js b/projects/thales/constants.js new file mode 100644 index 000000000000..adba7771b816 --- /dev/null +++ b/projects/thales/constants.js @@ -0,0 +1,66 @@ +const CONTRACTS = { + optimism: { + LP_TOKEN: '0xdff90e4a6c229565f25337b1db9fa12f6d8cb118', + STAKING_CONTRACT: '0xc392133eea695603b51a5d5de73655d571c2ce51', + SPEED_MARKETS: [ + '0xE16B8a01490835EC1e76bAbbB3Cadd8921b32001', + '0xFf8Cf5ABF583D0979C0B9c35d62dd1fD52cce7C7' + ], + MANAGERS: { + digital: ['0x7f9e03e40d8b95419C7BdF30D256d08f2Ec11Dba'], + sports: ['0x2367FB44C4C2c4E5aAC62d78A55876E01F251605'] + }, + SPORTS_POOLS: { + USDC: '0x0fe1044Fc8C05482102Db14368fE88791E9B8698', + WETH: '0x4f2822D4e60af7f9F70E7e45BC1941fe3461231e', + THALES: '0xE59206b08cC96Da0818522C75eE3Fd4EBB7c0A47' + }, + DIGITAL_POOLS: { + USDC: '0x47Da40be6B617d0199ADF1Ec3550f3875b246124' + } + }, + arbitrum: { + LP_TOKEN: '0x447f7bbfb5192ed5d6f815afb171f3f004ee94ac', + STAKING_CONTRACT: '0x160Ca569999601bca06109D42d561D85D6Bb4b57', + SPEED_MARKETS: [ + '0x02D0123a89Ae6ef27419d5EBb158d1ED4Cf24FA3', + '0xe92B4c614b04c239d30c31A7ea1290AdDCb8217D' + ], + MANAGERS: { + digital: ['0x95d93c88c1b5190fA7FA4350844e0663e5a11fF0'], + sports: ['0xB155685132eEd3cD848d220e25a9607DD8871D38'] + }, + SPORTS_POOLS: { + USDC: '0x22D180F39A0eB66098cf839AF5e3C6b009383B6A', + WETH: '0xcB4728a1789B87E05c813B68DBc5E6A98a4856bA', + THALES: '0x9733AB157f5A89f0AD7460d08F869956aE2018dA' + }, + DIGITAL_POOLS: { + USDC: '0xea4c2343Fd3C239c23Dd37dd3ee51AEc84544735' + } + }, + polygon: { + SPEED_MARKETS: [ + '0x4B1aED25f1877E1E9fBECBd77EeE95BB1679c361', + '0x14D2d7f64D6F10f8eF06372c2e5E36850661a537' + ] + }, + base: { + LP_TOKEN: '0x3f386acc3a8e9194cf6279c219df8dd3c5b71974', + STAKING_CONTRACT: '0x84aB38e42D8Da33b480762cCa543eEcA6135E040', + SPEED_MARKETS: [ + '0x85b827d133FEDC36B844b20f4a198dA583B25BAA', + '0x6848F001ddDb4442d352C495c7B4a231e3889b70' + ], + MANAGERS: { + digital: ['0xc62E56E756a3D14ffF838e820F38d845a16D49dE'], + sports: [] + }, + DIGITAL_POOLS: { + USDC: '0x5713ab44042D92C642444bd2F0fee9c2336F9E3b' + } + } + } + + module.exports = CONTRACTS + \ No newline at end of file diff --git a/projects/thales/index.js b/projects/thales/index.js index de61108e8413..f8ce1812012e 100644 --- a/projects/thales/index.js +++ b/projects/thales/index.js @@ -1,152 +1,30 @@ -const { sumTokens2 } = require('../helper/unwrapLPs') const { staking } = require('../helper/staking') -const abi = require('./abi.json') -const ADDRESSES = require('../helper/coreAssets.json') - -const ethMarketsManager = "0x5ed98Ebb66A929758C7Fe5Ac60c979aDF0F4040a" - -const opMarketsManager = "0xBE086E0A2c588Ad64C8530048cE4356190D6a6F3" -const OP_SUSD = ADDRESSES.optimism.sUSD -const opThalesStaking = "0xc392133eea695603b51a5d5de73655d571c2ce51" -const opThalesAmm = "0x278b5a44397c9d8e52743fedec263c4760dc1a1a" -const opRangedAmm = "0x2d356b114cbCA8DEFf2d8783EAc2a5A5324fE1dF" -const opParlayAmm = "0x82B3634C0518507D5d817bE6dAb6233ebE4D68D9" -const opSportsLp = "0x842e89b7a7eF8Ce099540b3613264C933cE0eBa5" -const opSportsVault = ["0x43d19841d818b2ccc63a8b44ce8c7def8616d98e", "0x5e2b49c68f1fd68af1354c377eacec2f05632d3f", "0x8285047f33c26c1bf5b387f2b07f21a2af29ace2", "0xbaac5464bf6e767c9af0e8d4677c01be2065fd5f", "0xc922f4CDe42dD658A7D3EA852caF7Eae47F6cEcd"] -const opAmmVault = ["0xb484027CB0c538538Bad2bE492714154f9196F93", "0x6c7Fd4321183b542E81Bcc7dE4DfB88F9DBca29F", "0x43318DE9E8f65b591598F17aDD87ae7247649C83"] -const opThalesLpToken = "0xac6705BC7f6a35eb194bdB89066049D6f1B0B1b5"; -const opThalesToken = "0x217d47011b23bb961eb6d93ca9945b7501a5bb11" -const opSportsMarketsManager = "0xFBffEbfA2bF2cF84fdCf77917b358fC59Ff5771e" - -const polygonMarketsManager = "0x85f1B57A1D3Ac7605de3Df8AdA056b3dB9676eCE" -const polygon_USDC = ADDRESSES.polygon.USDC -const polygonThalesAmm = "0xd52B865584c25FEBfcB676B9A87F32683356A063" -const polygonRangedAMM = "0xe8e022405505a9F2b0B7452C844F1e64423849fC" - -const arbitrumMarketsManager = "0x95d93c88c1b5190fA7FA4350844e0663e5a11fF0" -const arbitrum_USDC = ADDRESSES.arbitrum.USDC -const arbThalesStaking = "0x160Ca569999601bca06109D42d561D85D6Bb4b57" -const arbitrumThalesAMM = "0x2b89275efB9509c33d9AD92A4586bdf8c4d21505" -const arbSportsMarketsManager = "0x72ca0765d4bE0529377d656c9645600606214610" -const arbParlayAmm = "0x2Bb7D689780e7a34dD365359bD7333ab24903268" -const arbSportsLp = "0x8e9018b48456202aA9bb3E485192B8475822B874" -const arbSportsVault = ["0xfF7AEA98740fA1e2a9eB81680583e62aaFf1e3Ad", "0xE26374c7aFe71a2a6AB4A61080772547C43B87E6", "0xA852a651377fbE23f3d3acF5919c3D092aD4b77d", "0x31c2947c86412A5e33794105aA034DD9312eb711"] -const arbAmmVault = ["0x640c34D9595AD5351Da8c5C833Bbd1AfD20519ea", "0x0A29CddbdAAf56342507574820864dAc967D2683", "0x008A4e30A8b41781F5cb017b197aA9Aa4Cd53b46"] -const arbThalesToken = "0xE85B662Fe97e8562f4099d8A1d5A92D4B453bF30" - - -const baseMarketManager = "0xc62E56E756a3D14ffF838e820F38d845a16D49dE" -const baseSportsMarketManager = "0xB0EE5C967F209f24f7eF30c2C6Da38346a87E089" -const baseParlayAMM = "0x5625c3233b52206a5f23c5fC1Ce16F6A7e3874dd" -const baseSportsAMM = "0xAFD339acf24813e8038bfdF19A8d87Eb94B4605d" -const baseRangedAMM = "0xB8109ac56EE572990e6d2C6b4648042bB1C33317" -const baseThalesAMM = "0xe41cD3A25CBdeDA0BC46D48C380393D953bD2034" - - -const bscMarketManager = "0xc62E56E756a3D14ffF838e820F38d845a16D49dE" -const bscRangedAMM = "0xda5Bd4aBAFbE249bdC5684eAD594B0ac379687fd" -const bscThalesAMM = "0x465B66A3e33088F0666dB1836652fBcF037c7319" - -async function guniPool2(api) { - const [lp, token0, token1] = await api.batchCall([ - { target: opThalesLpToken, abi: abi.getUnderlyingBalance, }, - { target: opThalesLpToken, abi: 'address:token0', }, - { target: opThalesLpToken, abi: 'address:token1', }, - ]) - api.add(token0, lp[0]) - api.add(token1, lp[1]) -} - -async function getMarkets(api, manager) { - return api.call({ target: manager, abi: abi.activeMarkets, params: [0, 1000] }) -} +const CHAIN_CONFIG = require('./chainConfig') +const helpers = require('./utils') + +// Create module for each chain +const createChainModule = (chain) => { + const config = CHAIN_CONFIG[chain] + const module = { + tvl: (api) => helpers.calculateChainTVL(api, chain) + } -async function addSportsLPTvl(api, contract, token) { - api.add(token, await api.call({ target: contract, abi: abi.totalDeposited, })) -} + // Add staking if configured + if (config.staking) { + module.staking = staking( + config.staking.contract, + config.staking.token + ) + } -const speedMarkets = { - arbitrum: ['0x02D0123a89Ae6ef27419d5EBb158d1ED4Cf24FA3'], - polygon: ['0x4B1aED25f1877E1E9fBECBd77EeE95BB1679c361'], - optimism: ['0xE16B8a01490835EC1e76bAbbB3Cadd8921b32001'], - base: ['0x85b827d133FEDC36B844b20f4a198dA583B25BAA'], - bsc: ['0x72ca0765d4bE0529377d656c9645600606214610'], + return module } +// Export configuration for each chain module.exports = { - methodology: "sUSD/USDC locked on markets", - ethereum: { - tvl: async (api) => { - return sumTokens2({ api, owners: await getMarkets(api, ethMarketsManager), tokens: [ADDRESSES.ethereum.sUSD] }) - }, - pool2: dodoPool2("0x136829c258e31b3ab1975fe7d03d3870c3311651", "0x031816fd297228e4fd537c1789d51509247d0b43"), - }, - polygon: { - tvl: async (api) => { - const markets = await getMarkets(api, polygonMarketsManager) - markets.push(polygonThalesAmm, polygonRangedAMM) - if (speedMarkets[api.chain]) markets.push(...speedMarkets[api.chain]) - return sumTokens2({ api, owners: markets, tokens: [polygon_USDC] }) - }, - }, - optimism: { - tvl: async (api) => { - await addSportsLPTvl(api, opSportsLp, OP_SUSD) - const markets = (await Promise.all([opMarketsManager, opSportsMarketsManager,].map(i => getMarkets(api, i)))).flat() - markets.push(opThalesAmm, opParlayAmm, opRangedAmm, ...opSportsVault, ...opAmmVault) - if (speedMarkets[api.chain]) markets.push(...speedMarkets[api.chain]) - return sumTokens2({ api, tokens: [OP_SUSD], owners: markets }) - }, - staking: staking(opThalesStaking, opThalesToken), - pool2: guniPool2, - }, - arbitrum: { - tvl: async (api) => { - await addSportsLPTvl(api, arbSportsLp, arbitrum_USDC) - const markets = (await Promise.all([arbitrumMarketsManager, arbSportsMarketsManager,].map(i => getMarkets(api, i)))).flat() - markets.push(arbitrumThalesAMM, arbParlayAmm, ...arbSportsVault, ...arbAmmVault) - if (speedMarkets[api.chain]) markets.push(...speedMarkets[api.chain]) - return sumTokens2({ api, tokens: [arbitrum_USDC], owners: markets }) - }, - staking: staking(arbThalesStaking, arbThalesToken), - }, - base: { - tvl: async (api) => { - const markets = (await Promise.all([baseMarketManager, baseSportsMarketManager,].map(i => getMarkets(api, i)))).flat() - markets.push(baseParlayAMM, baseRangedAMM, baseSportsAMM, baseThalesAMM) - if (speedMarkets[api.chain]) markets.push(...speedMarkets[api.chain]) - return sumTokens2({ api, tokens: [ADDRESSES.base.USDbC], owners: markets }) - }, - staking: staking('0x84aB38e42D8Da33b480762cCa543eEcA6135E040', '0xf34e0cff046e154cafcae502c7541b9e5fd8c249'), - }, - bsc: { - tvl: async (api) => { - const markets = (await Promise.all([bscMarketManager,].map(i => getMarkets(api, i)))).flat() - markets.push(bscRangedAMM, bscThalesAMM) - if (speedMarkets[api.chain]) markets.push(...speedMarkets[api.chain]) - return sumTokens2({ api, tokens: [ADDRESSES.bsc.BUSD], owners: markets }) - }, - }, -} - - -function dodoPool2(stakingContract, lpToken) { - return async (api) => { - const [baseToken, quoteToken, totalSupply] = await Promise.all(["address:_BASE_TOKEN_", "address:_QUOTE_TOKEN_", "erc20:totalSupply"].map(abi => api.call({ - target: lpToken, - abi - }))) - const [baseTokenBalance, quoteTokenBalance, stakedLPBalance] = await api.multiCall({ - calls: [ - [baseToken, lpToken], [quoteToken, lpToken], [lpToken, stakingContract] - ].map(token => ({ - target: token[0], - params: [token[1]], - })), - abi: 'erc20:balanceOf' - }) - const ratio = stakedLPBalance/totalSupply - api.add(baseToken, baseTokenBalance * ratio) - api.add(quoteToken, quoteTokenBalance * ratio) - } + methodology: "Calculate TVL for liquidity pools, markets, staking and pool2", + optimism: createChainModule('optimism'), + arbitrum: createChainModule('arbitrum'), + polygon: createChainModule('polygon'), + base: createChainModule('base') } diff --git a/projects/thales/utils.js b/projects/thales/utils.js new file mode 100644 index 000000000000..86f2d6b6e679 --- /dev/null +++ b/projects/thales/utils.js @@ -0,0 +1,70 @@ +const { sumTokens2 } = require('../helper/unwrapLPs') +const abi = require('./abi.json') +const CHAIN_CONFIG = require('./chainConfig') + +const utils = { + // Get token address from chain config + getTokenAddress: (chain, symbol) => CHAIN_CONFIG[chain].tokens[symbol], + + // Add LP TVL + addLPTvl: async (api, contract, token) => { + const tokenAddress = utils.getTokenAddress(api.chain, token) + api.add(tokenAddress, await api.call({ + target: contract, + abi: abi.totalDeposited + })) + }, + + // Get markets from manager + getMarketsFromManager: async (api, manager, abiMethod) => { + return api.call({ + target: manager, + abi: abi[abiMethod], + params: [0, 1000] + }) + }, + + // Get all markets for a chain + getAllMarkets: async (api, chain) => { + const config = CHAIN_CONFIG[chain] + if (!config.managers) return [] + + const [digitalMarkets, sportsMarkets] = await Promise.all([ + Promise.all((config.managers.digital || []).map(manager => + utils.getMarketsFromManager(api, manager, 'activeMarkets') + )), + Promise.all((config.managers.sports || []).map(manager => + utils.getMarketsFromManager(api, manager, 'getActiveTickets') + )) + ]) + + return [...digitalMarkets.flat(), ...sportsMarkets.flat()] + }, + + // Calculate chain TVL + calculateChainTVL: async (api, chain) => { + const config = CHAIN_CONFIG[chain] + + // Add LP TVLs + for (const poolType in config.liquidityPools || {}) { + for (const pool of config.liquidityPools[poolType]) { + await utils.addLPTvl(api, pool.address, pool.token) + } + } + + // Get all markets + const markets = [ + ...await utils.getAllMarkets(api, chain), + ...(config.speedMarkets || []) + ] + + // Calculate TVL for all markets and tokens + return sumTokens2({ + api, + owners: markets, + tokens: Object.values(config.tokens) + }) + } +} + +module.exports = utils From 8cf47e86ae7af1308ad61375616c730a5986bced Mon Sep 17 00:00:00 2001 From: sk-blum Date: Sun, 1 Dec 2024 23:52:09 +0100 Subject: [PATCH 547/787] Blum adapter (#12497) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/blum/index.js | 17 +++++++++++++++++ projects/helper/chain/ton.js | 3 +++ 2 files changed, 20 insertions(+) create mode 100644 projects/blum/index.js diff --git a/projects/blum/index.js b/projects/blum/index.js new file mode 100644 index 000000000000..004fb2f81041 --- /dev/null +++ b/projects/blum/index.js @@ -0,0 +1,17 @@ +const ADDRESSES = require("../helper/coreAssets.json") + +const { sumTokens } = require("../helper/chain/ton") +const { getConfig } = require("../helper/cache") + +async function fetchTvl(api) { + const res = await getConfig('blum', 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=blum') + console.log(res) + await sumTokens({ api, tokens: [ADDRESSES.ton.TON], owners: res, onlyWhitelistedTokens: true, }) +} + +module.exports = { + timetravel: false, + ton: { + tvl: fetchTvl + } +} diff --git a/projects/helper/chain/ton.js b/projects/helper/chain/ton.js index 63367bb45013..e606ac5b84a1 100644 --- a/projects/helper/chain/ton.js +++ b/projects/helper/chain/ton.js @@ -97,8 +97,11 @@ async function call({ target, abi, params = [] }) { } async function addTonBalances({ api, addresses }) { + api.log('Fetching TON balances', { addresses: addresses.length }) const chunks = sliceIntoChunks(addresses, 399) + let i = 0 for (const chunk of chunks) { + api.log('Fetching TON balances', { chunk: i++, chunks: chunks.length }) const { accounts } = await get('https://toncenter.com/api/v3/accountStates?address=' + encodeURIComponent(chunk.join(',')) + '&include_boc=false') accounts.forEach(({ balance }) => { api.add(ADDRESSES.null, balance) From f2745ad8b69c9468e6bcba7b9917dffd3f6d0bb4 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sun, 1 Dec 2024 20:03:39 -0600 Subject: [PATCH 548/787] keep ethereum historical tvl --- projects/thales/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/thales/index.js b/projects/thales/index.js index f8ce1812012e..1ae4a8587b2a 100644 --- a/projects/thales/index.js +++ b/projects/thales/index.js @@ -26,5 +26,6 @@ module.exports = { optimism: createChainModule('optimism'), arbitrum: createChainModule('arbitrum'), polygon: createChainModule('polygon'), - base: createChainModule('base') + base: createChainModule('base'), + ethereum: {tvl: async ()=>({})}, } From c03f138f17bf858365c04ae4252d6144205a282e Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sun, 1 Dec 2024 20:20:47 -0600 Subject: [PATCH 549/787] keep bsc historical tvl --- projects/thales/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/thales/index.js b/projects/thales/index.js index 1ae4a8587b2a..20c1f843fbb2 100644 --- a/projects/thales/index.js +++ b/projects/thales/index.js @@ -28,4 +28,5 @@ module.exports = { polygon: createChainModule('polygon'), base: createChainModule('base'), ethereum: {tvl: async ()=>({})}, + bsc: {tvl: async ()=>({})}, } From 24d3d846f89708e52c89630e75bd3dcf68255c89 Mon Sep 17 00:00:00 2001 From: lilchizh <55549631+lilchizh@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:14:45 +0700 Subject: [PATCH 550/787] change TONCO TVL calculation (#12511) --- projects/tonco/index.js | 48 ++++++----------------------------------- 1 file changed, 6 insertions(+), 42 deletions(-) diff --git a/projects/tonco/index.js b/projects/tonco/index.js index 6d54f1109db8..6e5a974fedfb 100644 --- a/projects/tonco/index.js +++ b/projects/tonco/index.js @@ -1,48 +1,12 @@ -const { cachedGraphQuery } = require('../helper/cache'); -const { post } = require('../helper/http') -const { transformDexBalances } = require('../helper/portedTokens') -const sdk = require('@defillama/sdk') -const { ethers } = require("ethers") +const { sumTokensExport } = require("../helper/chain/ton"); +const ADDRESSES = require('../helper/coreAssets.json') -const API_URL = 'https://indexer.tonco.io'; - -const poolsQuery = ` - { - pools { - address - jetton0 { - bounceableAddress - decimals - } - jetton1 { - bounceableAddress - decimals - } - totalValueLockedJetton0 - totalValueLockedJetton1 - } - } -` +const router = "EQC_-t0nCnOFMdp7E7qPxAOCbCWGFz-e3pwxb6tTvFmshjt5" +const wtTOn = "EQCHHakhWxSQIWbw6ioW21YnjVKBCDd_gVjF9Mz9_dIuFy23" module.exports = { - misrepresentedTokens: true, - timetravel: false, + timetravel: true, ton: { - tvl: async () => { - - const result = await cachedGraphQuery('tonco-swap', API_URL, poolsQuery) - - sdk.log(result) - - return transformDexBalances({ - chain: 'ton', - data: result.pools.map(pool => ({ - token0: pool.jetton0.bounceableAddress, - token1: pool.jetton1.bounceableAddress, - token0Bal: Number(ethers.parseUnits(String(pool.totalValueLockedJetton0.toFixed(pool.jetton0.decimals)), parseInt(pool.jetton0.decimals))), - token1Bal: Number(ethers.parseUnits(String(pool.totalValueLockedJetton1.toFixed(pool.jetton1.decimals)), parseInt(pool.jetton1.decimals))), - })) - }) - } + tvl: sumTokensExport({ owners: [router, wtTOn], tokens: [ADDRESSES.null], }), } } From f13169658daefa52d903ba96503c28857d40a133 Mon Sep 17 00:00:00 2001 From: MIMIEYES Date: Mon, 2 Dec 2024 17:15:49 +0800 Subject: [PATCH 551/787] add tvl of bitcoin (#12513) --- projects/helper/bitcoin-book/index.js | 2 ++ projects/helper/bitcoin-book/nervenetworkbridge.js | 4 ++++ projects/nervenetworkbridge/index.js | 4 ++++ 3 files changed, 10 insertions(+) create mode 100644 projects/helper/bitcoin-book/nervenetworkbridge.js diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index a27a76b17cf7..404a3146664f 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -86,6 +86,7 @@ const wooCEX = require('./woo-cex.js') const bitlayerBridge = require('./bitlayer-bridge.js') const arkhamExchange = require('./arkham-exchange.js') const chakra = require('./chakra.js') +const nerveNetworkBridge = require('./nervenetworkbridge.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -191,4 +192,5 @@ module.exports = { p2pb2b, arkhamExchange, chakra, + nerveNetworkBridge, } diff --git a/projects/helper/bitcoin-book/nervenetworkbridge.js b/projects/helper/bitcoin-book/nervenetworkbridge.js new file mode 100644 index 000000000000..0e2d9ef953cf --- /dev/null +++ b/projects/helper/bitcoin-book/nervenetworkbridge.js @@ -0,0 +1,4 @@ +module.exports = [ + 'bc1q7l4q8kqekyur4ak3tf4s2rr9rp4nhz6axejxjwrc3f28ywm4tl8smz5dpd', + 'bc1qzhwyexqzfz4d0mu7ktdad63wfssg08cek9sgjp' +] diff --git a/projects/nervenetworkbridge/index.js b/projects/nervenetworkbridge/index.js index 633d888b889d..afa9e5429841 100644 --- a/projects/nervenetworkbridge/index.js +++ b/projects/nervenetworkbridge/index.js @@ -3,6 +3,8 @@ const sdk = require("@defillama/sdk"); const { getConfig } = require('../helper/cache') const { get } = require('../helper/http') const { BigNumber } = require("bignumber.js"); +const { sumTokensExport } = require("../helper/sumTokens"); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js'); const getBridgeContract = { 'ethereum': '0xC707E0854DA2d72c90A7453F8dc224Dd937d7E82', @@ -87,6 +89,8 @@ async function tronTvl(api) { module.exports = { methodology: "Assets staked in the pool and trading contracts", + doublecounted: true, + bitcoin: { tvl: sumTokensExport({ owners: bitcoinAddressBook.nerveNetworkBridge }) }, tron: { tvl: tronTvl }, From a925a5cd22ac17e9d3d3a358cc50cb30d344f7c9 Mon Sep 17 00:00:00 2001 From: MIMIEYES Date: Mon, 2 Dec 2024 17:16:25 +0800 Subject: [PATCH 552/787] add staking of BTC (#12516) --- projects/pocm-staking/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/pocm-staking/index.js b/projects/pocm-staking/index.js index cc5ff2e55118..5203531f7df5 100644 --- a/projects/pocm-staking/index.js +++ b/projects/pocm-staking/index.js @@ -1,12 +1,15 @@ const http = require("../helper/http"); async function staking() { + const data = (await http.get("https://pocm.nuls.io/api/pocm/info")).data; return { - 'nuls': Number((await http.get("https://pocm.nuls.io/api/pocm/info")).data.totalStaking).toFixed(0) + 'nuls': Number(data.totalStaking).toFixed(0), + 'bitcoin': Number(data.totalStakingBTC).toFixed(8) }; } module.exports = { + doublecounted: true, timetravel: false, nuls: { tvl: async ()=> ({}), From a62f2662deac0dd5a5a3934c90285c1be31a2406 Mon Sep 17 00:00:00 2001 From: irlpotato <166589843+irlpotato@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:16:51 +0800 Subject: [PATCH 553/787] feat: remove hallmarks (#12517) --- projects/treehouse/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/treehouse/index.js b/projects/treehouse/index.js index 7e4fc0214c10..62478f3126fc 100644 --- a/projects/treehouse/index.js +++ b/projects/treehouse/index.js @@ -50,7 +50,6 @@ async function tvlMantle(api) { module.exports = { methodology: 'Token balance in vault and strategy contracts', start: '2024-09-10', // Tuesday, September 10, 2024 12:00:00 AM, - hallmarks: [[1727218691, "TVL Cap Raise 1"],[1729045223, "TVL Cap Raise 2"]], ethereum: { tvl, }, From c1e411e5cde5faf0160d285c249ad39920e5c30f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:19:08 +0100 Subject: [PATCH 554/787] Hyperlock (#12520) Co-authored-by: 0xGlider Co-authored-by: 0xGlider <165306420+0xConwayGlider@users.noreply.github.com> --- projects/hyperlock/index.js | 46 +++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/projects/hyperlock/index.js b/projects/hyperlock/index.js index 5c0497aae552..1d7a76babb3c 100644 --- a/projects/hyperlock/index.js +++ b/projects/hyperlock/index.js @@ -1,30 +1,42 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens2 } = require("../helper/unwrapLPs"); -const { cachedGraphQuery } = require('../helper/cache') -const v2Deposits = "0xC3EcaDB7a5faB07c72af6BcFbD588b7818c4a40e"; -const v3Deposits = "0xc28EffdfEF75448243c1d9bA972b97e32dF60d06"; +const { sumTokens2 } = require("../helper/unwrapLPs") +const { staking } = require('../helper/staking') + +const HYPER = "0xEC73284E4EC9bcea1A7DDDf489eAA324C3F7dd31"; +const THRUST = "0xE36072DD051Ce26261BF50CD966311cab62C596e"; +const HYPER_THRUST = "0x569FcbDa292f1a69AB14e401bAD13Cc0E1DEC790"; + +const BOOSTER = "0x08d46dC9E455c9B97E671b6291a54ba5668B94AC"; +const VOTER_PROXY = "0x70A8075C73A9Ff9616CB5aF6BB09c04844718F27"; +const LOCKER = "0xc1De2d060a18CFfAB121E90118e380629d11977E"; + +const abi = { + "poolLength": "uint256:poolLength", + "poolInfo": "function poolInfo(uint256) view returns (address lptoken, address token, address gauge, address crvRewards, address stash, bool shutdown)" +} // https://docs.hyperlock.finance/developers/hyperlock-contracts module.exports = { doublecounted: true, blast: { tvl, + staking: staking(LOCKER, HYPER) }, } -const query = `{ - pools(where:{type: V2}) { id type } -}` +// node test.js projects/hyperlock/index.js +async function tvl(api) { + // THRUST + const totalSupply = await api.call({ target: HYPER_THRUST, abi: 'erc20:totalSupply' }); + api.add(THRUST, totalSupply); -async function tvl(api) { - const { pools } = await cachedGraphQuery('hyperlock/v2', 'https://graph.hyperlock.finance/subgraphs/name/hyperlock/points-blast-mainnet', query) - const tokens = pools.map(i => i.id) - await sumTokens2({ api, owner: v2Deposits, tokens: pools.map(i => i.id), resolveLP: true, }) - await sumTokens2({ api, tokensAndOwners: [ - [ADDRESSES.blast.USDB, '0x390b781BAf1e6Db546cF4e3354b81446947838d2'], - [ADDRESSES.blast.WETH, '0x1856c7e0b559e9d7287473cb4b4786398db4032a'], - ] }) - return sumTokens2({ api, owner: v3Deposits, resolveUniV3: true }) + // v2 pools + const pools = await api.fetchList({ target: BOOSTER, itemAbi: abi.poolInfo, lengthAbi: abi.poolLength, }); + pools.shift(); // remove the first pool, which is hyperTHRUST/THRUST stable pool + const tokensAndOwners = pools.map(p => [p.lptoken, p.gauge]); + await sumTokens2({ tokensAndOwners, resolveLP: true, api}); + + // v3 pools + await sumTokens2({ api, owners: [VOTER_PROXY], resolveUniV3: true }); } \ No newline at end of file From 782aa8359928b157b0f088b481d8977e8a34a762 Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 2 Dec 2024 16:43:27 +0300 Subject: [PATCH 555/787] Update Gluon Gold's contract address (#12521) --- projects/gluon-gold/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/gluon-gold/index.js b/projects/gluon-gold/index.js index 04e44f05a728..2dea38f0f5d5 100644 --- a/projects/gluon-gold/index.js +++ b/projects/gluon-gold/index.js @@ -5,9 +5,9 @@ module.exports = { ergo: { tvl: sumTokensExport({ owners: [ - 'E81MR2gGkYE1vDkdcGYns4wYehfJLdX6hpwHMGrhwKEirNBZ6JRUKopeU1i7jT4NkgdM8GpL8bhFCyXFJuSaj8tiWSs28rq6Go3H5regcwr67yWiAy97RmXh94ierf8YuELivuMfwkEZd4X81RrfFJ2GDKzxmSdqUP6D4mXqepnxWcCvqGgk7DR1tKKuBJNroWaDSuDwrKASw68KuGspCbd1pgHs2iWzxirT4NTXq2rfPqmSJ7cqUQnd1mamB583H2ZC4esNzjqyMcvsQi6QFePSg8bwYbCTs4e8Nz42bZoUNQktFpteqwhcA5NRwXN7vDVQBGgHXr8KY3fDKmhoQiwTbrZLB5qzJ1UpCoAd4h88CERG7VbH4z5nyJC5c3j1SuEE5dSXPNtYR6yiGhNq2TCHNb24f5eZcBpBUQ6qviecoDtxPb78qnR2gBn4HcHGBWBZxfXJ3ZC7NPtNWreWWPuGMF5QF7EgswjALFHNDzRdkJpbsbrdaVbFNq9vC6Adug2P5NXnBjsr7wYTQrB4neWFNLS4vWQqgTYu3Cuap1V7mc13u7tK6X3s1wod6psy6cTWak1SEYtUcjwwvjHhQqn8R2D9G81jiH7efpCt9JdgCYoamioDfLaTFx7S2Su55bjLaD8JLsUyNL1LkDcmcUfhtiTAkM1mUDGswAHk6wDtoVUEuR59T94LUv9SFddZ2p1vJYi32AUAEZu66UiGkGeBDnNSq38mgiwta1X6SsNtv1mgZjkLx45Vun538ekYwWZ51EcvRgMScogtZ5xBDk1RRPn3HkXQLWGKr4yEFSwjuDNy8d4LbWUJ8n4prMvxQ8G5h7rUj9dJ5kz7YzKZRNF5VBmCAacYocgUUnEwQbVbkvFDDt7FQAQnNmY7tyjDQEJaeAviWp2Gtoewh7ShDDLgX69gB9XcAjuYn9Tbfvm6FLnfNE9qusqL76GnaPeJRf6LNR6JczQVBGhS4NUy6sBSSfq4oWFYbShUGTe3zLG9JFMcdAKZR7NwyHyKBM5Zj5w5kXroL1xLPahxBz6hiQmz9xcJGGWNQsNR2Acirx3PmQ1V23sSqjhLmDMRVYquStc8o86JUH7KzBjm12nAfdq4pN6LAfKdCvLwdQQn9MQxmcquog9EiQccdURgF9NJK1CwWgcgrfXLtSkm5JwbTPgQjd5HFR9y26DtLJr36RWZHrbv9zvv9GawT3J2jWQEk9Ue41zMRp9jjMP57S4JdWdVvPuxYSJf2e7y4diN9w3XxQYZv21Eq91DduD9dWE7aYbdJiXu2DpM8VRdTpC9K3xXhzSkczHWKpftYZyNQq8KQsQBPHLc5pQFfi7Fqr4YCPk4ZFmRSiY6MsnkJc2rtzYAi9BKh9wAGZteAE8oWqphhiTBbEwHUiZdXAKe1BSPrQFsrc2Q6oizcgwm4rjmESMv3PGoQCpCAuvQL1kd9TULwsng7vRyMsUUh2KvCFSHrpqaDEpXEXH5rjFRzzwL2FBU6VATpeDj2BBS5NcxwrDqCcbEBerq3QYHSkQr1dd3MeATt5HzaGyA8xLvfohHdgZ4rWGT9zQf7rCk2xPeh1G8KRqSEDE4SUtBZxZbxF34dPxJDr4xqzjG2FKPtptkmXrBWNV3DVxPn5V8WL8bCo6HraLdUcmDJN7kn8dYSEgFhr4nwtCt4yKdsVtmAHEMhaMmGVRd92kiE5Xtc2ey3ZsHuWHRQX1T5Dw8xCCJngGcas3eMMr2J2N8cYFJkqCzuNPn8JZM9wqQBNay7ygsSR8Jj2ffo6veKRZSkcLzpCLWrxYj7LhMRxLkxLGY64GmWXL1aoyjQar3mFph6ZYmYUD3G934YTRKkUpV56VsNmSVxrNFbRCEotZ2s5Xzn5UJDU3NtaqDE4WqckKK7AXXB7DTLKfwT39RxjFep7xep6HThP7TfhL15KwB1RhgYF8cmExFwWoiMKsGkF9P3Jy6PZBVa4pWEXGCF8pUfprjKUffUm8wa8c4UQXNKSGd19y9sscamFqa5iEsxmDFXti6bqcGmG58ggneM8k9P91QBzoMy1JZFxv955n9CQV27wWJmaWRErjrpbtgJQmVx1fhQDCmQJvTHduSYmZBjYRi7TrYkjfBc1pheMgH6uzxJ6LJ92T7B1kPqvMTwiDareuW7mcR9rNwUNorWZMvH8uACNd1sqoERGtfVLkNTirmWJ6nfnqw1WPPgiCQ5nBcixusHy26btdvEVmjDjx9iNb3RPJKCiDbQLBq1yZEbyTCu8T9yRXvCexFqz4DPN5NmjFFPvPtgmvpds1DEdGVVTfwAY4THxLTVyD4z87FEk5gGzn1Csod1ZDNctHpYpPpfk9CVgzXwp3z2D75KJvNu9jUVvMyVBS53WdnELYwcEsWdappt9y2fmefQmYuAww3ekvFGDA4KnxfpCCixHMcrSZX6khifCuqn6prTDFDAT7ssCt7QJKB7KpGreh9tE7SHqSAAkPUuiJNHqn6xPHVKFGmrV5fjy1zNMGLdpebEL5f37jXzPGCpmRXJ9ZCz3REznoZNNg1o4UJoACKuvcfbcg91CMZS6ZvhNp6WXYMNSZqgCcGpkTSS5Dvy5hHTy71bJhSoQPvusCP8v5C5ammcpiDSHeKoKyUJy5JghCnAiAYqZoN9MMATR64YmBqmzFxVqHdE9WqYYwkt7EerA2szprVoh5UwWfUFMkyCiAUUxmYdPodLpYaVZwBcMv5SiZuWEnX51H1oowEVj7qhr3SGRapBpYZmiLDdVSKtqru11XfQJfbCiG4uYk3U9ZsvzcZv5oXTmKCB4XEKFv7bK8w3wbpmgBCYJMZZ5JrTE8iZKKgL3TmiM9q2v1ggxtVq932axuw4ncELjL6oJ4Bo7Uck2zogD11KvhTGuSHwBk84cUpqCMSsauFiVSaZ47uYXKdAXNZKF3JRvzNjGePgDRnPMMruyztbNfNgRM3fz39s6NYRVGMth6MS5jbw1PYkYhp4nv66bjPpU7tGXuy6JhsT3iAZ52nKzNN88pPKJVMhi9mtA5hQtmTNfzQGZtC7EfVz5yd7TKXgPhUaCYD4KQSKASvi66nwkee1NUDPPA6kYU12ppV6PCzXg3Q6AX5mWPQv8eAg5PxUVCvAvRpuvZNUZWRCbJxgQEgNRfCYbsdT27z4MFttDw54bPDNZfWcNBP7Q6FRq5iJ6EcaXGof3sWPvjKXQ3G3VGBBJ4JhkzAFMcv274tnCMvfE6xQt4DDHFsWjTHbR4Mp8UZ49gDnUWqtMPH1KVXFQKJdDBUTmDrBSM3u33Ed3dKefqzeqWvhLvXVnfdSrUJhqa3bFsKzwMyeGjxdyuide5rZRff4JsT5Hb8erq4qUwckcWErv6L4kgJZc6MWREswrQn4KbrDHNUU1RxXzCKnhQfYMsKQT11XKB2uwHnF4b1CTkTJhafQSxiHFGA4KTP1qpftK3HtJaDRnw7wGoJqVoptAgBC6hmbWd1SdqDHC2e5dQUvXDciqkAv8vwWMxK6UWXzPkv4MMf11Dnmh1PFtbnZ26sJmoPwp4gWmWsidqtGvKRYdFiadMSAWfkpTQnWmQV5tBU51SbFMihDhSYHc835fVvEHZWzZUj2FhqSazJaoCgPiaQN38zeJ4SE2rZ8vhXy4m2UXuB1ZjsvHVqLJvmbgC33CqEMicoT4P4vjuhHUsVuwspcWYkW87ZaCj5qMfqxt4ZnygnGssjsQfXK6GMtNeR4iDJK9qHncBbJ5ye5Lih2tyU1JFB2FcZYB7dQSHGpUS6bMFktFNgPhCZ5CGjgCiKQAYBe4jx6TJDinLjWQ9P', + 'U2Jtp6oeBTnbGS7ed2PvkudukZYRBBSfi557aCmzQtYxoQzbYeTw82vRjtVCke3FQ7iK8PjEFwjBjFDH8ZAXhqjCZ33kZDrRS92kUJPGe1zZsSeJcMz6y4QVsVrhpnmgxmmCKo9ut2bQa96ExLUBojZznoW56qGbKut9U58QeowdtgMuHPxnUF4Srgucn3kUvd2aWVydGjNdRFzDVCArz9iqBNejbcfcJNSqyzJX88KBTTQwYKcxkNtkBF5ZzUMiAZVmymzmAnHUob8HRzVhD19sTEdKF3TEaiPhyWVUKgtUApXuAwwygxH8FCfrknESQFWXQdeniVs3aHPxeqPRyaeqAhkUjBRSSsZqjXYaXfoCbVN7mkQyYNMPcQ9qptQY1yBZBEh2EFZHbWuYBeCYFGb1R64HPinTkyEPAT76xhUCrqPCcejzLNAfHffZj3G7nB83jPewAi8Jzf9ApT73R8FnzEwJeWWznKYKViyB357W28NNGThwZDgJu7VxxnJf1X2HYfE6yywCfidhUwwstcBUT1yFDXHxSzF84eWwufTKCoA36ZRgjct3FvvM2A4pnQCzDjwLGVFPapHJK15JVgGFXCmYNxtAnhhEZTfSJXemVuBQ9HceB88WRPJzQ8bvvUdDWJzAxdseLVseZec1nzufW6uj1MS7F9ri2hCfzwxJmGA42ycWcaqdmCFSmuJAQtbnAbEaYKaWXi1Rw3ksiuiWPfWCyGmdKTXALA8wb5LrJz5oRgxQ9mmcWmg38nRMMqepHmhSEEFVjFQTP6GdQ7sq2Smke3g26yEzTJrySEbBxDUey2gytnuhLhff3e2dWpDeUbpgHsBw3TWMriYKZrUNDFBTr6ii6efPrjiPphZx1RsMuUYhKucbTviPq4q71nm15wpySA1rC2M4vuNRMwMmMLfepAFPh4nH63mNixDnTJrcdETBDhZr8Km62cpj3BGWHtbcMYyk7NmshwvpD3Eym6PCDLrdLAjCDN6MtSCAHvfRQS4Sm49aCmHt7r17kAfNt8GccWDUErhhtNymRUff8wya5Grrrfzx7Ynp54HuDJ9EcR6aaE6buNzfqxrnuaLGedcBwWkaoAMrKoLDAmyPcYskEcNMrENLk3JRdSdRpXERVjAQs6hCZV65mVYVgnYx9YgcvatKnMNGu3sHgQUBdxgHHfzDNqdxhrwfuUZ38xPGv8soo7yvz8ahhnEddLhvwdm9x73SM6Cb1CXupy1gNz8dgkDP6TVshDPGbtcAqCXpsdUL9ZzzWQPUv67dzMEAcHaz7deo8wgrhGc6qtG2Vfg3bnAWk5JtUV5bV9v4zRdLKrvEiqCCxXgoztAh9DhgeMFr5RAGWwmUBJbrn5jMBK6ijj9MEoRdfcymDJtpbbU1uTUkjSAw2gnpAeXLsmbgL4wTZWBhqBRGWyEk6Xw4oKFwV4KKVvfYEXiDg9vSQqF2xbxeGh5w5s6KvqyWKjn9EWMHeRWX5xhrwsAUMXKDAn2eX4e74zNovGprUTDF6tpQYeeqrhxgqnLJ4PgnTkeJT7XxJANZCnqbdt2jnWiKsKUyv6WMHiZeuGFzFxjg8Kvj1DVrmtM347tE9xufxteMECTXiRHHDM1r9VXsdZuRBsHsdmY9i5K2uHCLwXproCHu4TyP3NS7PXjY6Rz1Ltk1PEuqabUc1Gr59vs6MB3dqxKZjRKVu7aSRCxamFaUhSuCdy8raqpaX7tCHmD8zTPTLEQgzZnNq9bFePiuNfGXCZMVrw1wcnjrs39uh1kL1j7nYAAGRE79b4rnAJwRxZdpL7X9Jr7MuQrsVSjwFhFpvUfoZ1yY7hj6uKxPvZwQMVVrmqfFxEJNrCfgUabNZQLvRA6UuZbsg9BGLYtkfNJjLEpRJWiwJqKhnYC28DKmq4a7s29UN1wyePnKHNwAxDv7dzhdhZJa1XS7p4PgKKKzu24mDSKrHC1qnfcgTHQDbebNyveX8UEB2wwRgXLxoHsGmbWgTnnoW1P2x5m1nQomtU82W544iB1i48qc28wXLjdDk3x3P11VZVphRupHUa7y7F5KiG6UsnA87tHs6UB4K6C3dp59YvSdUCNW9khhHkT8mg4VVpLSvihwy8B2FBBTsXDaSnhNAmgx2SyHGXLTfZAdfhw8CSZRHxgeGif5upYSTxzfbH1QRUm6g4CwGScfyKM9D5nXKewfXrb6VZPJpDPXUxQnMaQ8wM1AgUMw3sX7TJJmYmfeWrnR8uhaLY7RFh3gAWfGCRr6SLMoKyez32DKH7gTGsj1ymM39JRuDKugMt5TW1LhhYuiAGX8zH5GnyPqMSNfVZiJYsh1ZPqF3AVkmTgd7VGR8ZBGyFUcrrw98kDMsQ3vBpYgCAwBGRvoA8cs4hvCF3udSRoqiPVXyDG8sS49GV74Jr4VHV7TTTBBdY8V6WPhL9cxHbzoMGYDFE9DN86b5jPK8Avu7Tjw9gKYUaUWmFbvr7xS1oG5fWHSmQ9uXeBzfi2kGBZDCiqcpBymBqzphePVFkvRHhAQiERMwF5LSZwo67joCHiPDNLV1uFG4wXCR5RxVpdjE2jxd8qCqJSub691AWWVDdRBK2i9zXByh5QAQtUTFPRuNHTyTcpA7Yaz1usgGSfQFPe2meQjjwkYy6Gnz53ynboPmP83v2BSwFZFNnubA55nVJPdqfJDUY4bRspJYMASWUzDECQKipgxeFjUtnZVAhNaDj7iCmPZ6WGFBgF4pULYqY1AoP33hcooQ8rdRDdJ7iidRowYVNMgb8QHC7XgHYFRrUDPBDQ6aefp58rYHv2BJrVdz3z1Jn8dAsyhx2eW6kf9URqB5ygAwTWSiogSfsQxye4eSF9o7pA5eDLQRsgN41Qm6M1ZfVkEktYLb7WSKxLesggCgPng8S7CKqp98WYf2h3FyTPukDSkc84SSfxFg6DQKRkdKhcGYd7aNBgNG3H4AkFgBe62Cjtor2QDJCYmTDnfb92adShmDdGvqZw2Tsj8XEw1TfCSH2ZqMUYNbGbATc2ZQK5daXHXwviqo4DjrEURWXUiepNifVHLt8W1WvAYLfKJHwPa3aBq9qQX7ik51KrLmLAdXhFofrmoAAuN6E9rULFUsTcp7xMHEKyAL7WjfwRGgortnMyhhtVfVqHAtiZmvGuppFHjYw7zFg6Shy6GhTPinzcPLwuiYSCLxU4SzvoANLvhMDRDgHuph8C3BVB3UjunEazhu1ctvTnoRLwqAQELDBsgW6bwQo7kLj2Lfrc88WUnDyxjsDphRsbJAaSWTAcNA3aYhKYjrxS5uhMa9C77NYRKPJPuQGw5MtiSjSojXtyfcWuyJAyvs9Cvra41FqiMhqtummsMbhUMZttfe5nGQcvnDUZZorR9TJXphpQn4GaGbRskU1g6HMdfCtAvhBbyccMjfk8LAJm7XPhsh1fGKC2Y8xKfRxhbystVmjzZ9Zt7XQdafhDKfHt21d7mw4pLPzEZoNNtgHwK3BKZv3b7AS2hsrBu6ct8cPnCcm4Y2iVNrpcZ6x7TLMupJRoyYwrPw9d3XNcDWMDMrqHEsM5d54hee1mQZk7Pyo6mEk4J6DNFh3u7GjfPtZwz9t6L7hUex93nqbvVcF5uTHpX8iw2kZdYgp9bH2HbNrMnL1Myx9XCLybzadAmRhGGRKVz9QtpoUGrNWcfYR5SAdvAUiKmudnakqzUe2F1Y45G1HbkQjbWfFHtDqTXcWoVdL3rzNzekZybbGjobSUoJyCwTEh3cSZJditQAQhQ9P93YW6MkpFQ2FtmS8SWZKy2PxMMec7i2ugCU5zBKPkNrugSgZr2TWejUE74Vr4MHvs5U7pS6b7obrVLkEuDWGCdnR4BDcvBFVPTNKPUUUXBw291nqEMoAWTxWYYSZhwkY6p9ftcx2y1Kq7P2RPiDZg1HYciuDdfGFNgmTYv', ], tokens: [ADDRESSES.null], }) } -} \ No newline at end of file +} From dd777e002e63c8ed385a5d09b92e9efbf65fd353 Mon Sep 17 00:00:00 2001 From: Divljo31 <71217620+Divljo31@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:43:49 +0100 Subject: [PATCH 556/787] Added usd0 in Polynomial tvl calculationg (#12522) Co-authored-by: Divljo31 --- projects/helper/coreAssets.json | 3 ++- projects/polynomial-liquidity-layer/index.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index c7a0e7a61507..0a0ee2e5af2d 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1946,7 +1946,8 @@ "polynomial": { "USDC": "0x17C9D8Cef7Ef072844EEaEdE1F9f54C7E3fa8743", "SDAI": "0x615172e47c0C5A6dA8ea959632Ac0166f7a59eDc", - "sUSDe": "0x2A06DEAc3E863c23DD6a89Eeacd80aBA9E08B77B" + "sUSDe": "0x2A06DEAc3E863c23DD6a89Eeacd80aBA9E08B77B", + "USD0": "0x6224dC817dC4D5c53fcF3eb08A4f84C456F9f38f" }, "cronos_zkevm": { "wzkCRO": "0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d", diff --git a/projects/polynomial-liquidity-layer/index.js b/projects/polynomial-liquidity-layer/index.js index dda769ab1fa6..c5780e43ce22 100644 --- a/projects/polynomial-liquidity-layer/index.js +++ b/projects/polynomial-liquidity-layer/index.js @@ -4,6 +4,6 @@ const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { polynomial: { - tvl: sumTokensExport({ owner: '0xc133983D6d9140923b5eaE52664221d9099cf119', tokens: [ADDRESSES.polynomial.USDC,ADDRESSES.polynomial.SDAI, ADDRESSES.polynomial.sUSDe]}) + tvl: sumTokensExport({ owner: '0xc133983D6d9140923b5eaE52664221d9099cf119', tokens: [ADDRESSES.polynomial.USDC,ADDRESSES.polynomial.SDAI, ADDRESSES.polynomial.sUSDe, ADDRESSES.polynomial.USD0]}) } } \ No newline at end of file From 9a05f2aa057455ad0d2939aa88dbf1f1a5307961 Mon Sep 17 00:00:00 2001 From: kavsky02 <95619352+kavsky02@users.noreply.github.com> Date: Mon, 2 Dec 2024 14:44:43 +0100 Subject: [PATCH 557/787] Update Pools' addresses to new ones (#12524) --- projects/deltaprime/index.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/projects/deltaprime/index.js b/projects/deltaprime/index.js index 0d50cd626b6f..a297a8128db2 100644 --- a/projects/deltaprime/index.js +++ b/projects/deltaprime/index.js @@ -18,20 +18,20 @@ const assetToAddressMappingAvalanche = require('./mappings/assetToAddressMapping const assetToAddressMappingArbitrum = require('./mappings/assetToAddressMappingArbitrum.json') // Avalanche -const USDC_POOL_TUP_CONTRACT = '0x2323dAC85C6Ab9bd6a8B5Fb75B0581E31232d12b'; -const USDT_POOL_TUP_CONTRACT = '0xd222e10D7Fe6B7f9608F14A8B5Cf703c74eFBcA1'; -const WAVAX_POOL_TUP_CONTRACT = '0xD26E504fc642B96751fD55D3E68AF295806542f5'; -const BTC_POOL_TUP_CONTRACT = '0x475589b0Ed87591A893Df42EC6076d2499bB63d0'; -const ETH_POOL_TUP_CONTRACT = '0xD7fEB276ba254cD9b34804A986CE9a8C3E359148'; +const USDC_POOL_TUP_CONTRACT = '0x8027e004d80274FB320e9b8f882C92196d779CE8'; +const USDT_POOL_TUP_CONTRACT = '0x1b6D7A6044fB68163D8E249Bce86F3eFbb12368e'; +const WAVAX_POOL_TUP_CONTRACT = '0xaa39f39802F8C44e48d4cc42E088C09EDF4daad4'; +const BTC_POOL_TUP_CONTRACT = '0x70e80001bDbeC5b9e932cEe2FEcC8F123c98F738'; +const ETH_POOL_TUP_CONTRACT = '0x2A84c101F3d45610595050a622684d5412bdf510'; const SMART_LOANS_FACTORY_TUP_AVALANCHE = '0x3Ea9D480295A73fd2aF95b4D96c2afF88b21B03D'; // Arbitrum -const USDC_POOL_TUP_ARBI_CONTRACT = '0x8FE3842e0B7472a57f2A2D56cF6bCe08517A1De0'; -const ETH_POOL_TUP_ARBI_CONTRACT = '0x0BeBEB5679115f143772CfD97359BBcc393d46b3'; -const BTC_POOL_TUP_ARBI_CONTRACT = '0x5CdE36c23f0909960BA4D6E8713257C6191f8C35'; -const ARB_POOL_TUP_ARBI_CONTRACT = '0x2B8C610F3fC6F883817637d15514293565C3d08A'; -const DAI_POOL_TUP_ARBI_CONTRACT = '0xd5E8f691756c3d7b86FD8A89A06497D38D362540'; +const USDC_POOL_TUP_ARBI_CONTRACT = '0x8Ac9Dc27a6174a1CC30873B367A60AcdFAb965cc'; +const ETH_POOL_TUP_ARBI_CONTRACT = '0x788A8324943beb1a7A47B76959E6C1e6B87eD360'; +const BTC_POOL_TUP_ARBI_CONTRACT = '0x0ed7B42B74F039eda928E1AE6F44Eed5EF195Fb5'; +const ARB_POOL_TUP_ARBI_CONTRACT = '0xC629E8889350F1BBBf6eD1955095C2198dDC41c2'; +const DAI_POOL_TUP_ARBI_CONTRACT = '0xFA354E4289db87bEB81034A3ABD6D465328378f1'; const SMART_LOANS_FACTORY_TUP_ARBITRUM = '0xFf5e3dDaefF411a1dC6CcE00014e4Bca39265c20'; From cc23771146c3d0dac8d4af288900d4a55f2f1826 Mon Sep 17 00:00:00 2001 From: Emu Meme Date: Mon, 2 Dec 2024 13:49:38 +0000 Subject: [PATCH 558/787] Add Emu (#12523) --- projects/emumeme/index.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 projects/emumeme/index.js diff --git a/projects/emumeme/index.js b/projects/emumeme/index.js new file mode 100644 index 000000000000..9f1efb3dd1a6 --- /dev/null +++ b/projects/emumeme/index.js @@ -0,0 +1,3 @@ +const { masterchefExports } = require('../helper/unknownTokens') + +module.exports = masterchefExports({ chain: 'bsc', masterchef: '0x99e1F72d10ad66906e18b02501e3395B8C4470FF', nativeToken: '0x0dfbB60c53d9226E8D70AA94eac614D8294D7Fa2', useDefaultCoreAssets: true, }) \ No newline at end of file From 33b023469dccebc0ab9077c157a5f16cbb1d5a48 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Mon, 2 Dec 2024 13:51:04 +0000 Subject: [PATCH 559/787] Remove duplicates + list nexusBTC (#12527) --- projects/helper/bitcoin-book/chakra.js | 6 ------ projects/helper/bitcoin-book/index.js | 2 ++ projects/helper/bitcoin-book/nexusbtc.js | 10 ++++++++++ projects/nexusbtc/index.js | 11 +++++++++++ 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 projects/helper/bitcoin-book/nexusbtc.js create mode 100644 projects/nexusbtc/index.js diff --git a/projects/helper/bitcoin-book/chakra.js b/projects/helper/bitcoin-book/chakra.js index ea6ecd148eb4..c9085c2ea566 100644 --- a/projects/helper/bitcoin-book/chakra.js +++ b/projects/helper/bitcoin-book/chakra.js @@ -29,15 +29,10 @@ module.exports = [ 'bc1pu0h93g6cvsua7ggmccqg2z0nm2ycrjwnuyndp37synyxvncmh0zqlk0sz5', 'bc1pe8zfmgxtcf7ktv8n6276zr0ysr3w4lm9cauq7eu4vfgyem6mnxesxcuse5', 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', - 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', 'bc1q4nard6ndnh57xev095hqnrfh5lxxycwuewcwcc', 'bc1qak5ch78tcpfmztcldgr5tlgnd4t59p6cuqjcnf', 'bc1qn8gnv8y7u92tnqyzdnmtdvzyzszahn7js97jjj', - 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', - 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', 'bc1q397395pz4ktvucdq7uj3jv424sx7ygm94kvfr6', - 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', - 'bc1pyuzcl3alwq3dmkvqk7fnzvn6zwu62rjs6vzqe7pzpm88fgpxhg9qmzqeuw', 'bc1pa7hk6q3sp66euxtvdvfe6xjskjsll7mpp3alm920xnr6jhy08dfscc6nrj', 'bc1p7a4hwvvy44wt0mltkv4fmhuz5lt587ruqeyhvt5wp320304lhmdskkzh9u', 'bc1pj2h9dgwn6lkgnhh4pckaj7a44mh6rnjcvnfpv76jlqh9hmltt8qq87qrsw', @@ -151,7 +146,6 @@ module.exports = [ 'bc1prd5ltcsu4rhmwe3wawpeudtzpt5f7xcnp8yla3fxt5g2l5sz7f7sr8p9t5', 'bc1p3r59km6mg760jgcpzftz3ckve6w8g5qv0nnte3ajw0j6epxhhhhqzqkmym', 'bc1p5qp8dsa3mg7q2jxudmez6q83ceu86nduwrddfy0slu6ze3dcrq4qfhp0yv', - 'bc1pq6wxqycalncq6uskj47s5azx7sjl9q5gegfzyyunhu6qn66gppwslu3jwk', 'bc1p83ggjdaaj6dc8davgc8kykdj43l6dppa255eskc0k9k7uczaegts3hvtns', 'bc1pgrt28ph0vky6yhrjqcv74kckfkd753qms26lncdvvlkn4xudzgts9d0kqp', 'bc1pthefst3f4fqnx6ux6klspat7cz43srganhmcsv6jkmua3gjx0jzsvfye0g', diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index 404a3146664f..1d9b806e8d52 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -87,6 +87,7 @@ const bitlayerBridge = require('./bitlayer-bridge.js') const arkhamExchange = require('./arkham-exchange.js') const chakra = require('./chakra.js') const nerveNetworkBridge = require('./nervenetworkbridge.js') +const nexusbtc = require('./nexusbtc') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -193,4 +194,5 @@ module.exports = { arkhamExchange, chakra, nerveNetworkBridge, + nexusbtc } diff --git a/projects/helper/bitcoin-book/nexusbtc.js b/projects/helper/bitcoin-book/nexusbtc.js new file mode 100644 index 000000000000..a1162d38c9ef --- /dev/null +++ b/projects/helper/bitcoin-book/nexusbtc.js @@ -0,0 +1,10 @@ +module.exports = [ + '31oxjGsmepoq2cipeGQ2zKZRRBCf1m3kAC', + 'bc1pe9sgyavfjphc7pgxfc9kvjfx5hkkjtzfsz2yqtfgddekcgngx0cqx8lt7m', + 'bc1pq8nu54gwcwgkdnav6gpwylcyhpmnza4tks5cagx6t0730g8jecaqu308s8', + 'bc1padqwaxlk6gfw2ceeq3caxrn95ygp7fs64x8fxmj829vahw22qu7sql0ga8', + 'bc1p5xukglzfcelarf7jtegfwxzsfquc4wt8dpulrgwhtmqtpmwg8hxq0t7ett', + 'bc1pgwfwpkx8rqp2p4lpcztkweqrhnyk973crm5a3c8hw4d2mdpksq3syhpldc', + 'bc1pu9pzaaywpggum9024zdqzer3u8cuc7pcunrsj0sgskqf2dd4fw4q0k9g38' + ] + \ No newline at end of file diff --git a/projects/nexusbtc/index.js b/projects/nexusbtc/index.js new file mode 100644 index 000000000000..5c9d73b3dcf2 --- /dev/null +++ b/projects/nexusbtc/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require('../helper/sumTokens'); +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + +//https://www.matrixport.com/nexusbtcReserve + +module.exports = { + methodology: 'The total value locked (TVL) is calculated by summing up the balances of BTC wallets specified in the NexusBTC address list within the bitcoin address book', + bitcoin: { + tvl: sumTokensExport({ owners: bitcoinAddressBook.nexusbtc }), + }, +}; \ No newline at end of file From be27e92c8736ff8eb7771198b9d87762bba888d2 Mon Sep 17 00:00:00 2001 From: Greg Nazario Date: Mon, 2 Dec 2024 08:51:59 -0500 Subject: [PATCH 560/787] [emojicoin] Add TVL with emoji coins (#12463) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/emojicoin/index.js | 27 ++++++++++++++++ projects/helper/chain/aptos.js | 58 ++++++++++++++++++++++++++++------ projects/helper/env.js | 2 +- 3 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 projects/emojicoin/index.js diff --git a/projects/emojicoin/index.js b/projects/emojicoin/index.js new file mode 100644 index 000000000000..16ab75319038 --- /dev/null +++ b/projects/emojicoin/index.js @@ -0,0 +1,27 @@ +const { function_view, timestampToVersion } = require("../helper/chain/aptos"); + +async function getAllMarkets(ledgerVersion) { + // This function will get all markets and the associated TVL in APT + const registry = await function_view({ + functionStr: "0xface729284ae5729100b3a9ad7f7cc025ea09739cd6e7252aff0beb53619cafe::emojicoin_dot_fun::registry_view", + args: [], + type_arguments: [], + ledgerVersion, + }) + return registry.total_quote_locked.value +} + +async function tvl(api) { + // const version = await timestampToVersion(api.timestamp, 1962588495); // this query is not working + const tvl_amount = await getAllMarkets(); + api.add("0x1::aptos_coin::AptosCoin", tvl_amount); +} + +module.exports = { + timetravel: false, + methodology: + "Aggregates TVL in all pools in Emojicoin.fun", + aptos: { + tvl, + }, +}; \ No newline at end of file diff --git a/projects/helper/chain/aptos.js b/projects/helper/chain/aptos.js index da5bffe902b6..b3fe6f453e3c 100644 --- a/projects/helper/chain/aptos.js +++ b/projects/helper/chain/aptos.js @@ -1,4 +1,3 @@ - const sdk = require('@defillama/sdk') const http = require('../http') @@ -6,6 +5,7 @@ const { getEnv } = require('../env') const coreTokensAll = require('../coreAssets.json') const { transformBalances } = require('../portedTokens') const { log, getUniqueAddresses } = require('../utils') +const { GraphQLClient } = require("graphql-request"); const coreTokens = Object.values(coreTokensAll.aptos) @@ -14,6 +14,7 @@ const endpoint = () => getEnv('APTOS_RPC') async function aQuery(api) { return http.get(`${endpoint()}${api}`) } + async function getResources(account) { const data = [] let lastData @@ -36,11 +37,6 @@ async function getResource(account, key) { return data } -async function getCoinInfo(address) { - if (address === '0x1') return { data: { decimals: 8, name: 'Aptos' } } - return http.get(`${endpoint()}/v1/accounts/${address}/resource/0x1::coin::CoinInfo%3C${address}::coin::T%3E`) -} - function dexExport({ account, poolStr, @@ -101,8 +97,10 @@ async function getTableData({ table, data }) { return response } -async function function_view({ functionStr, type_arguments = [], args = [] }) { - const response = await http.post(`${endpoint()}/v1/view`, { "function": functionStr, "type_arguments": type_arguments, arguments: args }) +async function function_view({ functionStr, type_arguments = [], args = [], ledgerVersion = undefined }) { + let path = `${endpoint()}/v1/view` + if (ledgerVersion !== undefined) path += `?ledger_version=${ledgerVersion}` + const response = await http.post(path, { "function": functionStr, "type_arguments": type_arguments, arguments: args }) return response.length === 1 ? response[0] : response } @@ -126,11 +124,52 @@ function sumTokensExport(options) { return async (api) => sumTokens({ ...api, api, ...options }) } +const VERSION_GROUPING = 1000000 + +// If I can get this timestampQuery to work... everything will work seamlessly +async function timestampToVersion(timestamp, start_version = 1962588495, end_version = 1962588495 + VERSION_GROUPING) { + // eslint-disable-next-line no-constant-condition + while (true) { + let closestTransactions = await findClosestTransaction(timestamp, start_version, end_version) + if (closestTransactions.length < 1) { + start_version += VERSION_GROUPING + end_version += VERSION_GROUPING + } else { + return closestTransactions[0].version + } + } +} + +const graphQLClient = new GraphQLClient("https://api.mainnet.aptoslabs.com/v1/graphql") +const timestampQuery = `query TimestampToVersion($timestamp: timestamp, $start_version: bigint, $end_version: bigint) { +block_metadata_transactions( + where: {timestamp: {_gte: $timestamp }, version: {_gte: $start_version, _lte: $end_version}} + limit: 1 + order_by: {version: asc} +) { + timestamp + version + } +}`; +async function findClosestTransaction(timestamp, start_version, end_version) { + let date = new Date(timestamp * 1000).toISOString() + + const results = await graphQLClient.request( + timestampQuery, + { + timestamp: date, + start_version, + end_version, + } + ) + + return results.block_metadata_transactions +} + module.exports = { endpoint: endpoint(), dexExport, aQuery, - getCoinInfo, getResources, getResource, coreTokens, @@ -139,4 +178,5 @@ module.exports = { getTableData, function_view, hexToString, + timestampToVersion }; diff --git a/projects/helper/env.js b/projects/helper/env.js index b665d9001b1e..62f91c5eb02e 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -9,7 +9,7 @@ const DEFAULTS = { COVALENT_KEY: 'ckey_72cd3b74b4a048c9bc671f7c5a6', SOLANA_RPC: 'https://mainnet.helius-rpc.com/?api-key=0109717a-77b4-498a-bc3c-a0b31aa1b3bf', ECLIPSE_RPC: 'https://eclipse.lgns.net', - APTOS_RPC: 'https://aptos-mainnet.pontem.network', + APTOS_RPC: 'https://fullnode.mainnet.aptoslabs.com', SUI_RPC: 'https://fullnode.mainnet.sui.io/', SUI_GRAPH_RPC: 'https://sui-mainnet.mystenlabs.com/graphql', FLOW_RPC: 'https://rest-mainnet.onflow.org', From 6a892d69aebdcd111994a58842f5824855e2ab4f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:16:05 +0100 Subject: [PATCH 561/787] mark exsat as doublecounted --- projects/exsat-credit-staking/index.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/projects/exsat-credit-staking/index.js b/projects/exsat-credit-staking/index.js index ab4402f2f6cd..ba7b48d24cc4 100644 --- a/projects/exsat-credit-staking/index.js +++ b/projects/exsat-credit-staking/index.js @@ -1,12 +1,13 @@ const { sumTokens } = require("../helper/chain/bitcoin"); -const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js'); async function tvl() { - return sumTokens({ owners: await bitcoinAddressBook.exsatCreditStaking() }) - } + return sumTokens({ owners: await bitcoinAddressBook.exsatCreditStaking() }) +} module.exports = { - methodology: 'TVL is based on Bitcoin addresses in the exSat credit staking contract, summing their associated Bitcoin balances.', - start: '2024-10-23', - bitcoin: { tvl }, + doublecounted: true, + methodology: 'TVL is based on Bitcoin addresses in the exSat credit staking contract, summing their associated Bitcoin balances.', + start: '2024-10-23', + bitcoin: { tvl }, }; From 016d67f40ea6e17ba3fb1f1017b8505894cb44eb Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Mon, 2 Dec 2024 12:09:13 -0600 Subject: [PATCH 562/787] add cmeth --- projects/mitosis/index.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/projects/mitosis/index.js b/projects/mitosis/index.js index 885708245cbe..354bdfa26765 100644 --- a/projects/mitosis/index.js +++ b/projects/mitosis/index.js @@ -39,6 +39,13 @@ const uniBTC_ADDRESS = { }, }; +const cmETH_ADDRESS = { + mantle: { + asset: "0xE6829d9a7eE3040e1276Fa75293Bde931859e8fA", + vault: "0x6FF000453a9c14f7d3bf381925c8cde565DbCe55", + } +}; + const ezETH_ADDRESS = { ethereum: { asset: "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110", @@ -199,5 +206,12 @@ module.exports = { { type: 'vault', data: uniBTC_ADDRESS.bsc }, ] ) - } + }, + mantle: { + tvl: chainTVL( + [ + { type: 'vault', data: cmETH_ADDRESS.mantle }, + ] + ) + }, }; From 9aaffdf6f278faea66394005da7b8dfa4029da24 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:53:19 +0100 Subject: [PATCH 563/787] Bountive (#12528) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: “TeddyNotBear” Co-authored-by: Teddy Not Bear <106410805+TeddyNotBear@users.noreply.github.com> --- projects/bountive/index.js | 78 +++++++++++++++++++++------------ projects/helper/coreAssets.json | 3 +- projects/helper/tokenMapping.js | 5 ++- 3 files changed, 57 insertions(+), 29 deletions(-) diff --git a/projects/bountive/index.js b/projects/bountive/index.js index 74d80582d483..b3a4c89b4976 100644 --- a/projects/bountive/index.js +++ b/projects/bountive/index.js @@ -1,41 +1,65 @@ const ADDRESSES = require('../helper/coreAssets.json') const { bountiveTokenAbi } = require("./abi"); -const { multiCall } = require('../helper/chain/starknet') +const { multiCall } = require('../helper/chain/starknet'); +const { sumTokens2 } = require('../helper/unwrapLPs'); const bountiveTokens = [ - // BoSTRK: Bountive STRK - "0x018e009bbb035c506234e7a8eca6a7229adfd59a278ba3845285d28b03ed6d53", - // BoETH: Bountive ETH - "0x02fcaebd41710024e25b6dc646a62acb6560125a699a3f695b6adb54a180aaee", - // BoUSDC: Bountive USDC - "0x028a88bf75f1b10dc8552051a56fbdc732084af514f6065f4c67ea6d50204720", - // BoUSDT: Bountive USDT - "0x0243d9a1cffc0b5ebbf549efd1232a96b1ef392fe595e91dd72103d5a8e7d847", + // BoSTRK: Bountive STRK + "0x018e009bbb035c506234e7a8eca6a7229adfd59a278ba3845285d28b03ed6d53", + // BoETH: Bountive ETH + "0x02fcaebd41710024e25b6dc646a62acb6560125a699a3f695b6adb54a180aaee", + // BoUSDC: Bountive USDC + "0x028a88bf75f1b10dc8552051a56fbdc732084af514f6065f4c67ea6d50204720", + // BoUSDT: Bountive USDT + "0x0243d9a1cffc0b5ebbf549efd1232a96b1ef392fe595e91dd72103d5a8e7d847", + // BoDAI: Bountive DAI + "0x00c359a6eb59a7cd68bfc3d7a44d05b15ba3fbbb4eebc2d59d52d37f123bea00", ] const underlyingsTokens = [ - // STRK - ADDRESSES.starknet.STRK, - // ETH - ADDRESSES.starknet.ETH, - // USDC - ADDRESSES.starknet.USDC, - // USDT - ADDRESSES.starknet.USDT, + // STRK + ADDRESSES.starknet.STRK, + // ETH + ADDRESSES.starknet.ETH, + // USDC + ADDRESSES.starknet.USDC, + // USDT + ADDRESSES.starknet.USDT, + // DAI + ADDRESSES.starknet.DAI, ] async function tvl(api) { - const supplied = await multiCall({ - calls: bountiveTokens, - abi: bountiveTokenAbi.total_supply, - }); - api.addTokens(underlyingsTokens, supplied) + const supplied = await multiCall({ + calls: bountiveTokens, + abi: bountiveTokenAbi.total_supply, + }); + api.addTokens(underlyingsTokens, supplied) +} + +async function staking(api) { + const bountiveTokens = [ + // BoBROTHER: Bountive BROTHER + "0x067c176764a49143e405fadb3e35b2a18a16cc00527e53fed92267c1be1c53a5", + ] + const underlyingsTokens = [ + // BROTHER + ADDRESSES.starknet.BROTHER, + ] + + const supplied = await multiCall({ + calls: bountiveTokens, + abi: bountiveTokenAbi.total_supply, + }); + api.addTokens(underlyingsTokens, supplied) + return sumTokens2({ api }) } - + module.exports = { - methodology: 'TVL is the total tokens deposited on Bountive', - starknet: { - tvl, - } + doublecounted: true, + methodology: 'TVL is the total tokens deposited on Bountive', + starknet: { + tvl, staking, + } }; \ No newline at end of file diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 0a0ee2e5af2d..d8dc410aa127 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1298,7 +1298,8 @@ "UNO": "0x0719b5092403233201aa822ce928bd4b551d0cdb071a724edd7dc5e5f57b7f34", "NSTSTRK": "0x04619e9ce4109590219c5263787050726be63382148538f3f936c22aa87d2fc2", "ZEND": "0x00585c32b625999e6e5e78645ff8df7a9001cf5cf3eb6b80ccdd16cb64bd3a34", - "NSTR": "0x00c530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007" + "NSTR": "0x00c530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007", + "BROTHER": "0x03b405a98c9e795d427fe82cdeeeed803f221b52471e3a757574a2b4180793ee" }, "ton": { "TON": "0x0000000000000000000000000000000000000000", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index ad04634ac943..efa1ae4460d7 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -84,7 +84,10 @@ const fixBalancesTokens = { }, xlayer: { [ADDRESSES.null]: { coingeckoId: "okb", decimals: 18 }, - } + }, + starknet: { + [ADDRESSES.starknet.BROTHER]: { coingeckoId: "starknet-brother", decimals: 18 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 3bfa1ca7a218b4993cffb2a366f32150db0ade69 Mon Sep 17 00:00:00 2001 From: Artem Date: Tue, 3 Dec 2024 10:54:41 +0200 Subject: [PATCH 564/787] Add Ethereum TVL calculation to Grafun project (#12529) --- projects/grafun/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/grafun/index.js b/projects/grafun/index.js index 92cbfbc58555..fcbeaadee989 100644 --- a/projects/grafun/index.js +++ b/projects/grafun/index.js @@ -3,5 +3,8 @@ module.exports = { methodology: "TVL is calculated by aggregating the market value of BNB tokens held within the Token Sale Factory smart contract.", bsc: { tvl: sumTokensExport({ owner: '0x8341b19a2A602eAE0f22633b6da12E1B016E6451', token: nullAddress }) + }, + ethereum: { + tvl: sumTokensExport({ owner: '0xb8540a7d74Cc4912443e8c4B2064B640FC763c4f', token: nullAddress }) } }; From d0a492d4cdec300b4eef8084622abe3f55e3ba13 Mon Sep 17 00:00:00 2001 From: MD Date: Tue, 3 Dec 2024 09:55:07 +0100 Subject: [PATCH 565/787] feat: add blast network for `impermax-finance` (#12530) --- projects/impermax/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/impermax/index.js b/projects/impermax/index.js index 1d78ec640be2..0b5d8d34165c 100644 --- a/projects/impermax/index.js +++ b/projects/impermax/index.js @@ -77,6 +77,12 @@ const config = { '0x3b1f3a48a70e372144307a4b126a5cda46e169ad', '0x2944e1544cE201ae19e6385490bBA13DaA5f44e4' ] + }, + blast: { + factories: [ + '0x7b816c1ccafa7d3e71e279ed9dc3226484f6ef87', + '0xb3c80cfcdd177e3fce2e66870e4768d1ead89f6c' + ] } } @@ -163,7 +169,8 @@ const blacklistedPools = { base: [], mantle: [], optimism: [], - real: [] + real: [], + blast: [] } module.exports = {} From a5635a4bf5f919d73052cd0b0de8f34e0c4b364e Mon Sep 17 00:00:00 2001 From: rav <85165079+rav-ipor@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:57:16 +0100 Subject: [PATCH 566/787] Fix IPOR Derivatives TVL calculations (#12532) Co-authored-by: adam Co-authored-by: kris-ipor <98769272+kris-ipor@users.noreply.github.com> --- projects/ipor-fusion/index.js | 2 +- projects/ipor/index.js | 30 +++++++++++++++++------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/projects/ipor-fusion/index.js b/projects/ipor-fusion/index.js index edef674d2cf9..224ae04aedca 100644 --- a/projects/ipor-fusion/index.js +++ b/projects/ipor-fusion/index.js @@ -1,6 +1,6 @@ const { getConfig } = require('../helper/cache') -const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/main/mainnet/addresses.json"; +const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/refs/heads/defillama/mainnet/addresses.json"; async function tvl(api) { const config = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); diff --git a/projects/ipor/index.js b/projects/ipor/index.js index 11b43e51c901..245d0fbab8f3 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -1,7 +1,7 @@ const { abi } = require("./abi"); const { getConfig } = require('../helper/cache') -const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/main/mainnet/addresses.json"; +const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/refs/heads/defillama/mainnet/addresses.json"; const V2DeploymentBlockNumber = 18333744 async function tvlEthereum(api) { @@ -15,22 +15,26 @@ async function tvlEthereum(api) { } async function calculateTvlForV2(api) { - const chain = api.chain - const {[chain]: { IporProtocolRouter, pools, vaults }} = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL) + const chain = api.chain; + const {[chain]: { IporProtocolRouter, pools }} = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); - let assets = vaults.map(i => i.asset) - assets = [...new Set(assets)] + // pools with swaps + const poolsWithSwaps = pools.filter(pool => pool.swapsAvailable); + const assets = [...new Set(poolsWithSwaps.map(pool => pool.asset))]; - const res = await api.multiCall({ abi: abi.getBalancesForOpenSwap, calls: assets, target: IporProtocolRouter }) - const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: assets }) + const [balances, decimals] = await Promise.all([ + api.multiCall({ abi: abi.getBalancesForOpenSwap, calls: assets, target: IporProtocolRouter }), + api.multiCall({ abi: 'erc20:decimals', calls: assets }) + ]); - res.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, }, i) => { - const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool - const decimal = 18 - decimals[i] - api.add(assets[i], balance / (10 ** decimal)) + balances.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool }, i) => { + const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool; + api.add(assets[i], balance / (10 ** (18 - decimals[i]))); }); - const tokensAndOwners = pools.map(pool => [pool.asset, pool.AmmTreasury]); - return api.sumTokens({ tokensAndOwners, blacklistedTokens: assets }); + + // pools without swaps + const tokensAndOwners = pools.filter(pool => !pool.swapsAvailable).map(pool => [pool.asset, pool.AmmTreasury]); + return api.sumTokens({ tokensAndOwners }); } async function calculateTvlForV1(api) { From 3be74166e513ce22e891bcf569aec946e137b4fc Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:08:04 +0100 Subject: [PATCH 567/787] Renec lend (#12536) Co-authored-by: anhoangphuc --- projects/helper/solana.js | 15 +++++----- projects/renec-lend/index.js | 55 ++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 7 deletions(-) create mode 100644 projects/renec-lend/index.js diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 67fbc7ca8aab..3f09416a984b 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -135,8 +135,9 @@ async function getTokenAccountBalances(tokenAccounts, { individual = false, allo return individual ? balancesIndividual : balances } -async function getMultipleAccounts(accountsArray) { - const connection = getConnection() +async function getMultipleAccounts(accountsArray, {api} = {}) { + const chain = api?.chain ?? 'solana' + const connection = getConnection(chain) if (!accountsArray.length) return [] accountsArray.forEach((val, i) => { if (typeof val === 'string') accountsArray[i] = new PublicKey(val) @@ -219,7 +220,7 @@ async function sumTokens2({ if (owners.length) tokensAndOwners = tokens.map(t => owners.map(o => [t, o])).flat() } if (!tokensAndOwners.length) { - const _owners = getUniqueAddresses([...owners, owner].filter(i => i), 'solana') + const _owners = getUniqueAddresses([...owners, owner].filter(i => i), chain) if (_owners.length) { const data = await getOwnerAllAccounts(_owners) @@ -248,18 +249,18 @@ async function sumTokens2({ } if (tokenAccounts.length) { - tokenAccounts = getUniqueAddresses(tokenAccounts, 'solana') + tokenAccounts = getUniqueAddresses(tokenAccounts, chain) const tokenBalances = await getTokenAccountBalances(tokenAccounts, { allowError, chain }) await transformBalances({ tokenBalances, balances, chain, }) } if (solOwners.length) { - const solBalance = await getSolBalances(solOwners, { chain }) - sdk.util.sumSingleBalance(balances, 'solana:' + ADDRESSES.solana.SOL, solBalance) + const solBalance = await getSolBalances(solOwners) + sdk.util.sumSingleBalance(balances, `${chain}:` + ADDRESSES.solana.SOL, solBalance) } - blacklistedTokens.forEach(i => delete balances['solana:' + i]) + blacklistedTokens.forEach(i => delete balances[`${chain}:` + i]) return balances diff --git a/projects/renec-lend/index.js b/projects/renec-lend/index.js new file mode 100644 index 000000000000..0258572a8bd4 --- /dev/null +++ b/projects/renec-lend/index.js @@ -0,0 +1,55 @@ +const { sumTokens2, decodeAccount, getMultipleAccounts, getConnection, } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); + +const RENEC_LEND_SOLANA_PROGRAM_ID = new PublicKey("9L193MV4yakKcgNT2tN4Kvf1ypn9c1sVMvsRn1Amw2Au"); +const RENEC_LEND_RENEC_PROGRAM_ID = new PublicKey("AqR1WSUwNeVsz66ayH2J8iTyiGMgouRwPqzzMaxx49ba"); + +const getProgram = (api) => api.chain === 'solana' ? RENEC_LEND_SOLANA_PROGRAM_ID : RENEC_LEND_RENEC_PROGRAM_ID; + +async function borrowed(api) { + const connection = await getConnection(api.chain); + const programId = getProgram(api); + const reserves = await connection.getProgramAccounts( + programId, + { + filters: [{ + dataSize: 619, + }], + } + ); + const reserveAddresses = reserves.map((account) => account.pubkey.toBase58()); + + const infos = await getMultipleAccounts(reserveAddresses, { api }) + infos.forEach(i => { + const decoded = decodeAccount('reserve', i); + if (decoded === null) return; + const { info: { liquidity } } = decoded; + const amount = liquidity.borrowedAmountWads.toString() / 1e18 + api.add(liquidity.mintPubkey.toString(), amount) + }) +} + +async function tvl(api) { + const connection = await getConnection(api.chain); + const programId = getProgram(api); + + const marketAccounts = await connection.getProgramAccounts( + programId, + { + filters: [{ + dataSize: 290, + }], + } + ); + const marketAuthorities = marketAccounts.map((account) => PublicKey.findProgramAddressSync([account.pubkey.toBytes()], programId)[0]); + return sumTokens2({ owners: marketAuthorities, api }); +} + +module.exports = { + timetravel: false, + solana: { tvl, borrowed, }, + renec: { tvl, borrowed, }, + methodology: + "TVL consists of deposits made to the protocol and like other lending protocols, borrowed tokens are not counted. Coingecko is used to price tokens.", +}; + From cfa4b336bac093d00dbd7bf2d68bbc8f27c58c69 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:19:24 +0100 Subject: [PATCH 568/787] update avalon usdalend #12534 --- projects/avalon-finance-usdalend/index.js | 6 ++++-- projects/avalon-finance/index.js | 6 ------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/projects/avalon-finance-usdalend/index.js b/projects/avalon-finance-usdalend/index.js index 25cc7ba8ce1c..daad08e4b9ab 100644 --- a/projects/avalon-finance-usdalend/index.js +++ b/projects/avalon-finance-usdalend/index.js @@ -4,11 +4,13 @@ const methodologies = require('../helper/methodologies') const { mergeExports } = require('../helper/utils') //@note Main & Innovative Markets +const getExports = address => aaveExports(address, '', undefined, [address], { v3: true }) const mainMarket = { - iotex: aaveExports('', '', undefined, ['0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'], { v3: true }), + iotex: getExports('0xDB52DD393e3a5e95d3B7C7e1C42cC06bb807A369'), + taiko: getExports('0x5EcDC2432ED77cD8E2cE6183712c5cc712c40ec0'), + zircuit: getExports('0x5EcDC2432ED77cD8E2cE6183712c5cc712c40ec0'), } - module.exports = mergeExports( mainMarket, ) diff --git a/projects/avalon-finance/index.js b/projects/avalon-finance/index.js index bfbd46483678..457adca3f782 100644 --- a/projects/avalon-finance/index.js +++ b/projects/avalon-finance/index.js @@ -75,13 +75,7 @@ const listaMarkets = { bsc: aaveExports('', '', undefined, ['0x5157f63bE7808DEB090Eee7762e917745896A09E'], { v3: true }), // BSC - ListaDAO } -// @note USDa Defi Lending Markets, not USDaLend -const usdaDefiLendingMarkets = { - taiko: aaveExports('', '', undefined, ['0x5EcDC2432ED77cD8E2cE6183712c5cc712c40ec0'], { v3: true }), -} - module.exports = mergeExports( mainMarket, innovativeMarket, solvMarkets, pumpBTCMarkets, unibtcMarkets, stbtcMarkets, otherProtocolTokenMarkets, obtcMarkets, ubtcMarkets, xaumMarkets, lbtcMarkets, listaMarkets, - usdaDefiLendingMarkets, ) module.exports.methodology = methodologies.lendingMarket From 2ba06da763095766beef826b3a7e65b815c5d60f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 10:26:26 +0100 Subject: [PATCH 569/787] update sacra #12531 --- projects/helper/coreAssets.json | 3 ++- projects/sacra/index.js | 22 ++++++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index d8dc410aa127..4fac20d48645 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1917,7 +1917,8 @@ "USDC_e": "0xfbda5f676cb37624f28265a144a48b0d6e87d3b6" }, "real": { - "RWA": "0x4644066f535ead0cde82d209df78d94572fcbf14" + "RWA": "0x4644066f535ead0cde82d209df78d94572fcbf14", + "USDC": "0xc518A88c67CECA8B3f24c4562CB71deeB2AF86B7" }, "saakuru": { "WOAS": "0x557a526472372f1F222EcC6af8818C1e6e78A85f", diff --git a/projects/sacra/index.js b/projects/sacra/index.js index 9281dc90b843..e9391e979e02 100644 --- a/projects/sacra/index.js +++ b/projects/sacra/index.js @@ -1,12 +1,22 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') -const tresury = "0x146dd6E8f9076dfEE7bE0b115bb165d62874d110"; -const rewardPool = '0x8E629C4301871d2A07f76366FE421e86855DC690'; +const ADDRESSES = require('../helper/coreAssets.json') + +// fantom contracts +const controllerFantom = '0xE5365c31c08d6ee44fdd33394ba279b85557c449'; +const tresuryFantom = "0x146dd6E8f9076dfEE7bE0b115bb165d62874d110"; +const rewardPoolFantom = '0x8E629C4301871d2A07f76366FE421e86855DC690'; +// real contracts +const controllerReal = '0x6ce857d3037e87465b003aCbA264DDF2Cec6D5E4'; +const tresuryReal = '0xd0C1378c177E961D96c06b0E8F6E7841476C81Ef'; +const rewardPoolReal = '0xb35E67FD20070C3d3dC5EEa29D62e95b707471cA'; module.exports = { - methodology: `We count the WFTM on treasuty and reward pool`, + methodology: `We count the WFTM and USDC on treasuty, reward pool and controller contracts`, fantom: { - tvl: sumTokensExport({ token: ADDRESSES.fantom.WFTM, owners: [tresury, rewardPool] }) - } + tvl: sumTokensExport({ token: ADDRESSES.fantom.WFTM, owners: [controllerFantom, tresuryFantom, rewardPoolFantom] }) + }, + real: { + tvl: sumTokensExport({ token: ADDRESSES.real.USDC, owners: [controllerReal, tresuryReal, rewardPoolReal] }) + }, } \ No newline at end of file From 4506f899b7f434addbf833c11bdd3dac08a5e0c9 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:00:17 +0000 Subject: [PATCH 570/787] remove duplicated wallet (#12537) --- projects/helper/bitcoin-book/bitlayer-bridge.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/helper/bitcoin-book/bitlayer-bridge.js b/projects/helper/bitcoin-book/bitlayer-bridge.js index 85e16abf14ed..9d8065ff19a2 100644 --- a/projects/helper/bitcoin-book/bitlayer-bridge.js +++ b/projects/helper/bitcoin-book/bitlayer-bridge.js @@ -4,7 +4,6 @@ module.exports = [ "33uhW878fbvVxZuZ216q2XvgdajLdG4rN4", "32a7u8tM45GPSdjzy7PbRvuncEvHFxnYR4", "3D3a4fPJ5HKw43Qd6QHtoJ6RvMUL7UBDT5", - "19M7Z1E8Bs4pkXmHJrrJtngmVMUmgFu4K2", "bc1p87c2auxxj372evzhd5f5huddtrladtkn3z4p94ew32qvwcsgujestjj45r", "bc1puqn6dw6etk6yg8zruvf2s94cmhxkfncsaumwhtfhu5qy3e6m94sq37eq66", "bc1pvnh3zy48ml3nhzhqrtc7endhj9rrtrv5puy2775p3jwka8y99aqsz78uu2", From 5abbea6c40dae63f31a4b9000a206fa40c5848b1 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 3 Dec 2024 11:52:40 +0000 Subject: [PATCH 571/787] Fix nexus btc (#12538) --- projects/helper/bitcoin-book/nexusbtc.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/projects/helper/bitcoin-book/nexusbtc.js b/projects/helper/bitcoin-book/nexusbtc.js index a1162d38c9ef..4b7500ca6e97 100644 --- a/projects/helper/bitcoin-book/nexusbtc.js +++ b/projects/helper/bitcoin-book/nexusbtc.js @@ -1,10 +1,4 @@ module.exports = [ '31oxjGsmepoq2cipeGQ2zKZRRBCf1m3kAC', - 'bc1pe9sgyavfjphc7pgxfc9kvjfx5hkkjtzfsz2yqtfgddekcgngx0cqx8lt7m', - 'bc1pq8nu54gwcwgkdnav6gpwylcyhpmnza4tks5cagx6t0730g8jecaqu308s8', - 'bc1padqwaxlk6gfw2ceeq3caxrn95ygp7fs64x8fxmj829vahw22qu7sql0ga8', - 'bc1p5xukglzfcelarf7jtegfwxzsfquc4wt8dpulrgwhtmqtpmwg8hxq0t7ett', - 'bc1pgwfwpkx8rqp2p4lpcztkweqrhnyk973crm5a3c8hw4d2mdpksq3syhpldc', - 'bc1pu9pzaaywpggum9024zdqzer3u8cuc7pcunrsj0sgskqf2dd4fw4q0k9g38' ] \ No newline at end of file From c5369ed29a6f75945ac999e75cf1ff22dd8e5325 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:09:36 +0000 Subject: [PATCH 572/787] Divide Resolv products (#12540) --- projects/resolv-usr/index.js | 15 +++++++++++++++ projects/resolv/index.js | 2 -- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 projects/resolv-usr/index.js diff --git a/projects/resolv-usr/index.js b/projects/resolv-usr/index.js new file mode 100644 index 000000000000..a44f7f9e767f --- /dev/null +++ b/projects/resolv-usr/index.js @@ -0,0 +1,15 @@ +const USR = "0x66a1E37c9b0eAddca17d3662D6c05F4DECf3e110"; + +const erc20 = { + "totalSupply": "uint256:totalSupply" +}; + +async function ethTvl(api) { + api.add(USR, await api.call({ abi: erc20.totalSupply, target: USR })); +} + +module.exports = { + ethereum: { + tvl: ethTvl + } +}; \ No newline at end of file diff --git a/projects/resolv/index.js b/projects/resolv/index.js index 95ba4c23870c..705a1cb9bb38 100644 --- a/projects/resolv/index.js +++ b/projects/resolv/index.js @@ -1,4 +1,3 @@ -const USR = "0x66a1E37c9b0eAddca17d3662D6c05F4DECf3e110"; const RLP = "0x4956b52aE2fF65D74CA2d61207523288e4528f96"; const erc20 = { @@ -6,7 +5,6 @@ const erc20 = { }; async function ethTvl(api) { - api.add(USR, await api.call({ abi: erc20.totalSupply, target: USR })); api.add(RLP, await api.call({ abi: erc20.totalSupply, target: RLP })); } From 6fb57b939b7cfc9e86a6006f82a60294dfbc2907 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:24:32 +0100 Subject: [PATCH 573/787] fix stargaze --- projects/stargaze/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/stargaze/index.js b/projects/stargaze/index.js index db843560ea41..5fd6ce24600f 100644 --- a/projects/stargaze/index.js +++ b/projects/stargaze/index.js @@ -2,7 +2,6 @@ const sdk = require("@defillama/sdk"); const { get } = require('../helper/http') async function tvl() { - throw new Error('Api response include NFT value') const balances = {}; /** From 9c4d4e64682a9b3b6f2cf07260525aad8b4df189 Mon Sep 17 00:00:00 2001 From: Steven Enamakel <31011319+senamakel@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:03:13 +0400 Subject: [PATCH 574/787] Added the new staking contracts and new PSM module for ZAI (#12539) --- projects/mahaxyz/index.js | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/projects/mahaxyz/index.js b/projects/mahaxyz/index.js index cc8cae18c1b7..ce02152c2710 100644 --- a/projects/mahaxyz/index.js +++ b/projects/mahaxyz/index.js @@ -1,20 +1,21 @@ -const ADDRESSES = require('../helper/coreAssets.json'); -const { sumTokensExport } = require('../helper/unwrapLPs.js'); +const ADDRESSES = require("../helper/coreAssets.json"); +const { sumTokensExport } = require("../helper/unwrapLPs.js"); +const { staking } = require("../helper/staking"); const eth = { // tokens dai: ADDRESSES.ethereum.DAI, maha: "0x745407c86df8db893011912d3ab28e68b62e49b0", usdc: ADDRESSES.ethereum.USDC, - susde: '0x9D39A5DE30e57443BfF2A8307A4256c8797A3497', + susde: ADDRESSES.ethereum.sUSDe, usdt: ADDRESSES.ethereum.USDT, weth: ADDRESSES.ethereum.WETH, zai: "0x69000dFD5025E82f48Eb28325A2B88a241182CEd", szai: "0x69000195D5e3201Cf73C9Ae4a1559244DF38D47C", // peg stability modules - psmUSDC: '0x69000052a82e218ccb61fe6e9d7e3f87b9c5916f', - psmsUSDe: '0xEEc58Cd30D88c70894B331b2fe0ECc2BF535656B', + psmUSDC: "0x69000052a82e218ccb61fe6e9d7e3f87b9c5916f", + psmsUSDe: "0x7DCdE153e4cACe9Ca852590d9654c7694388Db54", // pools zaiUsdcCurve: "0x4a0c954d0f19269f4fc5c217821c6150a8870ad4", @@ -27,26 +28,29 @@ const eth = { zaiSzaiCurveStaking: "0xfDAeB792FF19e7bd4f7ED5d6ce2ef7925d002A19", }; - const base = { usdc: ADDRESSES.base.USDC, - maha: '0x554bba833518793056CF105E66aBEA330672c0dE', + maha: "0x554bba833518793056CF105E66aBEA330672c0dE", + mahax: "0x7DF7505aa7cfAb3AC1A8D1EC225f2fafe5f04c74", zai: "0x69000dFD5025E82f48Eb28325A2B88a241182CEd", szai: "0x69000195D5e3201Cf73C9Ae4a1559244DF38D47C", // pools zaiUsdcAerodrome: "0x93EdC603D7A2eA03518Ac55219cAD320010a58e4", zaiMahaAerodrome: "0x96A0EC12A9F3bEabFf9Bb59c3F33EE439dAF2a85", + zaiMahaV3Aerodrome: "0xebF0D2faC88448874947550FA9B2A75f22FF571F", // staking contracts zaiUsdcStaking: "0xD87ECeF739161be77bbe9891dBA80F14275BBE34", zaiMahaStaking: "0xe77b404e934c1d97f179061349F459847f70Cd8C", -} + + gnosis: "0x7202136d70026DA33628dD3f3eFccb43F62a2469", +}; Object.keys(eth).forEach((k) => (eth[k] = eth[k].toLowerCase())); -const collaterals = [eth.usdc, eth.usdt, eth.dai, eth.usdc, eth.susde]; -const pegStabilityModules = [eth.psmUSDC, eth.psmsUSDe] +const collaterals = [eth.usdc, eth.susde]; +const pegStabilityModules = [eth.psmsUSDe]; module.exports = { ethereum: { @@ -54,7 +58,7 @@ module.exports = { tokensAndOwners: [ [eth.zaiMahaCurve, eth.zaiMahaCurveStaking], [eth.zaiUsdcCurve, eth.zaiUsdcCurveStaking], - [eth.zaiSzaiCurve, eth.zaiSzaiCurveStaking] + [eth.zaiSzaiCurve, eth.zaiSzaiCurveStaking], ], resolveLP: true, }), @@ -68,5 +72,6 @@ module.exports = { ], resolveLP: true, }), - } + staking: staking(base.mahax, base.maha), + }, }; From 9c13b2e82a3422bbc256151049f456b2cda3901f Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:04:46 +0100 Subject: [PATCH 575/787] Fix: Xrpl-dex, using cache (#12541) --- projects/xrpl-dex/api.js | 191 ++++++++++++++++++++++++++++++++++ projects/xrpl-dex/app.js | 203 ------------------------------------- projects/xrpl-dex/index.js | 38 +++---- projects/xrpl-dex/run.sh | 2 +- 4 files changed, 211 insertions(+), 223 deletions(-) create mode 100644 projects/xrpl-dex/api.js delete mode 100644 projects/xrpl-dex/app.js diff --git a/projects/xrpl-dex/api.js b/projects/xrpl-dex/api.js new file mode 100644 index 000000000000..4fa292adaf1f --- /dev/null +++ b/projects/xrpl-dex/api.js @@ -0,0 +1,191 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const rippleCodec = require("ripple-binary-codec"); +const { PromisePool } = require("@supercharge/promise-pool"); +const { getCache, setCache } = require("../helper/cache"); +const axios = require('axios') + +const NODE_URL = "https://xrplcluster.com"; +const API_XRP = "https://api.xrpscan.com/api/v1/amm/" +const RATE_LIMIT_DELAY_MS = 500; +const getTimeNow = () => Math.floor(Date.now() / 1000); +const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) + +const retry = async (fn, retries = 3, delay = 1000) => { + let attempts = 0; + while (attempts < retries) { + try { + return await fn(); + } catch (error) { + attempts++; + console.error(`Attempt ${attempts} failed. Retrying...`); + if (attempts >= retries) throw error; + await sleep(delay); + } + } +}; + +const getLedgerDatas = async (binary, marker, atLedgerIndex) => { + const payload = { + method: "ledger_data", + params: [ + { + ledger_index: atLedgerIndex ?? "validated", + binary, + type: "amm", + ...(marker && { marker }), + }, + ], + }; + + return await retry(async () => { + const { data } = await axios.post(NODE_URL, payload); + + if (data.result && data.result?.state) { + return { + state: data.result.state, + marker: data.result.marker, + }; + } + + throw new Error("Invalid response format from XRPL"); + }); +}; + +const getPools = async (nextMarker, isBinary, atLedgerIndex, poolsFound = []) => { + try { + console.log(`Fetching pools... Marker: ${nextMarker || 'start'}, Pools found so far: ${poolsFound.length}`); + const { state, marker } = await getLedgerDatas(isBinary, nextMarker, atLedgerIndex); + + if (!state || state.length === 0) { + console.log("No more pools to fetch."); + return poolsFound; + } + + if (state && state.length > 0) { + const decodedState = isBinary + ? state.map((entry) => rippleCodec.decode(entry.data)) + : state; + + poolsFound.push( + ...decodedState.map((entry) => ({ + account: entry.Account, + asset1: { currency: entry.Asset.currency, issuer: entry.Asset.issuer }, + asset2: { currency: entry.Asset2.currency, issuer: entry.Asset2.issuer }, + })) + ); + + await setCache('xrpl-dex', 'pools', { pools: poolsFound, marker }); + } + + if (marker) { + await sleep(RATE_LIMIT_DELAY_MS); + return getPools(marker, isBinary, atLedgerIndex, poolsFound); + } + + return poolsFound; + } catch (error) { + console.error("Failed to fetch pools:", error.message); + } +}; + +const parseReserve = (reserveData) => { + if (!reserveData) return null; + + const isXrp = typeof reserveData === "string"; + return { + currency: isXrp ? ADDRESSES.ripple.XRP : reserveData.currency, + issuer: isXrp ? null : reserveData.issuer, + amount: isXrp ? reserveData : reserveData.value, + }; +}; + +const getReserveDatas = async (pool) => { + return await retry(async () => { + const { data } = await axios.get(API_XRP + pool.account); + + return { + token0: parseReserve(data?.amount), + token1: parseReserve(data?.amount2) + } + }); +}; + +const getAllReservesDatas = async (poolAddresses, atLedgerIndex) => { + const poolsWithReserves = []; + + const { errors } = await PromisePool.withConcurrency(4) + .for(poolAddresses) + .process(async (pool) => { + try { + await sleep(RATE_LIMIT_DELAY_MS); + + const { token0, token1 } = await getReserveDatas(pool, atLedgerIndex); + poolsWithReserves.push({ + pool: pool.account, + token0Reserve: token0, + token1Reserve: token1, + }); + } catch (error) { + console.error("Errors occurred while fetching reserves:", errors); + } + }); + + return poolsWithReserves; +}; + +const getXrplPools = async () => { + const timeNow = getTimeNow() + const startOfDay = Math.floor(new Date().setUTCHours(0, 0, 0, 0) / 1000); + const { pools: cachedPools = [], marker: lastMarker = null, lastUpdate = 0 } = await getCache('xrpl-dex', 'pools'); + + if (lastUpdate >= startOfDay) { + console.log(`Pools have already been updated today. Last update: ${new Date(lastUpdate * 1000).toISOString()}`); + return; + } + + console.time("xrpl-dex fetch pool list") + + try { + const pools = await getPools(lastMarker, false, undefined, cachedPools); + console.timeEnd("xrpl-dex fetch pool list"); + console.log("Total pools fetched:", pools.length); + const finalMarker = pools.marker || lastMarker + + await setCache('xrpl-dex', 'pools', { pools, marker: finalMarker, lastUpdate: timeNow }); + } catch (error) { + console.error("Error during XRPL pool fetching:", error.message); + console.timeEnd("xrpl-dex fetch pool list"); + } +} + +const getXrplBalances = async (pools) => { + const timeNow = getTimeNow(); + const startOfDay = Math.floor(new Date().setUTCHours(0, 0, 0, 0) / 1000); + const { balances: cachedBalances = [], lastUpdate = 0 } = await getCache('xrpl-dex', 'balances') || {}; + + if (lastUpdate >= startOfDay) { + console.log(`Balances have already been updated today. Last update: ${new Date(lastUpdate * 1000).toISOString()}`); + return cachedBalances; + } + + console.time("Fetching balances for pools"); + + try { + const balances = await getAllReservesDatas(pools); + console.timeEnd("Fetching balances for pools"); + await setCache('xrpl-dex', 'balances', { balances, lastUpdate: timeNow }); + return balances; + } catch (error) { + console.error("Error during balances fetching:", error.message); + } +}; + +const main = async () => { + await getXrplPools(); + const { pools = [] } = await getCache('xrpl-dex', 'pools'); + const seen = new Set(); + const uniquePools = pools.filter(pool => seen.has(JSON.stringify(pool)) ? false : seen.add(JSON.stringify(pool))); + await getXrplBalances(uniquePools) +}; + +main().catch(console.error).finally(() => process.exit(0)); \ No newline at end of file diff --git a/projects/xrpl-dex/app.js b/projects/xrpl-dex/app.js deleted file mode 100644 index c802dd38fb2f..000000000000 --- a/projects/xrpl-dex/app.js +++ /dev/null @@ -1,203 +0,0 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const rippleCodec = require("ripple-binary-codec"); -const { PromisePool } = require("@supercharge/promise-pool"); -const { getCache, setCache } = require("../helper/cache"); -const { transformDexBalances } = require("../helper/portedTokens"); -const xrpl = require("xrpl"); - - -const NODE_URL = "https://xrplcluster.com"; -// const xrpTBILL = 'rJNE2NNz83GJYtWVLwMvchDWEon3huWnFn' - -const fetchLedgerData = async (binary, marker, atLedgerIndex) => { - const xrplResponse = await fetch(NODE_URL, { - method: "POST", - body: JSON.stringify({ - method: "ledger_data", - params: [ - { - ledger_index: atLedgerIndex ?? "validated", - binary, - type: "amm", - ...(marker && { marker: marker }), - }, - ], - }), - }); - const xrplResponseJson = await xrplResponse.json(); - return { - state: xrplResponseJson.result.state, - marker: xrplResponseJson.result.marker, - }; -}; - -const fetchPoolReserves = async (pool, atLedgerIndex) => { - const xrplResponse = await fetch(NODE_URL, { - method: "POST", - body: JSON.stringify({ - method: "amm_info", - params: [ - { - ledger_index: atLedgerIndex ?? "validated", - asset: pool.asset1, - asset2: pool.asset2, - }, - ], - }), - }); - const xrplResponseJson = await xrplResponse.json(); - return { - token0: parseReserve(xrplResponseJson.result.amm?.amount), - token1: parseReserve(xrplResponseJson.result.amm?.amount2), - }; -}; - -let lastPrinted = 0 -const discoverPools = async (nextMarker, isBinary, atLedgerIndex, poolsFound = []) => { - const { state, marker } = await fetchLedgerData( - isBinary, - nextMarker, - atLedgerIndex - ); - if (state && state.length != 0) { - const decodedState = isBinary - ? state.map((entry) => rippleCodec.decode(entry.data)) - : state; - poolsFound.push( - ...decodedState.map((entry) => ({ - account: entry.Account, - asset1: { - currency: entry.Asset.currency, - issuer: entry.Asset.issuer, - }, - asset2: { - currency: entry.Asset2.currency, - issuer: entry.Asset2.issuer, - }, - })) - ); - } - - if (poolsFound.length % 10 === 0 && lastPrinted !== poolsFound.length) { - console.log(new Date(), "Pools found so far ", poolsFound.length); - lastPrinted = poolsFound.length; - } - if (marker) - return discoverPools( - marker, - isBinary, - atLedgerIndex, - poolsFound - ) - return poolsFound; -}; - -const parseReserve = (reserveData) => { - if (!reserveData) return null; - const reserveIsXrp = typeof reserveData === "string"; - return { - currency: reserveIsXrp ? [ADDRESSES.ripple.XRP]: reserveData.currency, - issuer: reserveIsXrp ? null : reserveData.issuer, - amount: reserveIsXrp ? reserveData : reserveData.value, - }; -}; - -const getAllPoolsReserves = async (poolAddresses, atLedgerIndex) => { - const poolsWithReserves = []; - - const { errors } = await PromisePool.withConcurrency(14) - .for(poolAddresses) - .process(async (pool) => { - const { token0, token1 } = await fetchPoolReserves(pool, atLedgerIndex); - poolsWithReserves.push({ - pool: pool.account, - token0Reserve: token0, - token1Reserve: token1, - }); - }); - if (errors.length > 0) - throw new Error(errors[0]) - return poolsWithReserves -} - -main().catch(console.error).then(() => { - console.log("done"); - process.exit(0) -}) - -function getTimeNow() { - return Math.floor(Date.now() / 1000); -} - -async function xrplDex () { - const timeNow = getTimeNow() - const aDayInSeconds = 60 * 60 * 24; - const projectKey = 'xrpl-dex' - const cacheKey = 'cache' - let { allPools, lastPoolUpdate, lastDataUpdate, tvl } = await getCache(projectKey, cacheKey) - if (!lastPoolUpdate || timeNow - lastPoolUpdate > 3 * aDayInSeconds) { - // try { - console.time("xrpl-dex fetch pool list"); - allPools = await discoverPools(null, 1); - console.timeEnd("xrpl-dex fetch pool list"); - lastPoolUpdate = getTimeNow(); - await setCache(projectKey, cacheKey, { allPools, lastPoolUpdate, lastDataUpdate, tvl }) - // } catch (e) { - // console.error(e) - // } - } - if (lastDataUpdate && timeNow - lastDataUpdate < 2 * 60 * 60) { - // data was updated recently, no need to update - return - } - const poolsWithReserves = await getAllPoolsReserves(allPools); - - tvl = await transformDexBalances({ - chain: 'ripple', - data: poolsWithReserves - .filter(i => i.token0Reserve && i.token1Reserve) - .map(i => ({ - token0: i.token0Reserve.currency, - token0Bal: i.token0Reserve.amount, - token1: i.token1Reserve.currency, - token1Bal: i.token1Reserve.amount, - })), - }) - await setCache(projectKey, cacheKey, { - allPools, lastPoolUpdate, lastDataUpdate: getTimeNow(), tvl, - }) -} - -async function openedenRippleTvl() { - const timeNow = getTimeNow() - const aDayInSeconds = 60 * 60 * 24; - const projectKey = 'openeden-tbill' - const cacheKey = 'cache' - let { lastDataUpdate, tvl } = await getCache(projectKey, cacheKey) - if (!lastDataUpdate || timeNow - lastDataUpdate > aDayInSeconds) { - lastDataUpdate = getTimeNow() - - const client = new xrpl.Client('wss://xrplcluster.com/'); - await client.connect(); - - const issuerAddress = "rJNE2NNz83GJYtWVLwMvchDWEon3huWnFn"; - const subscriptionOperatorAddress = "rB56JZWRKvpWNeyqM3QYfZwW4fS9YEyPWM"; - - const issuerAccountInfo = await client.request({ - command: 'gateway_balances', - account: issuerAddress, - hotwallet: [subscriptionOperatorAddress], - }); - - tvl = Math.round(Number(issuerAccountInfo.result.obligations?.TBL)) || 0; - await setCache(projectKey, cacheKey, { lastDataUpdate, tvl }) - client.disconnect(); - } -} - -async function main() { - return Promise.allSettled([ - // openedenRippleTvl(), - xrplDex() - ]) -} \ No newline at end of file diff --git a/projects/xrpl-dex/index.js b/projects/xrpl-dex/index.js index 2d20b6ce86ab..f460a28da680 100644 --- a/projects/xrpl-dex/index.js +++ b/projects/xrpl-dex/index.js @@ -1,25 +1,25 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { getCache, } = require("../helper/cache"); +const { getCache } = require("../helper/cache"); +const { transformDexBalances } = require("../helper/portedTokens"); +const tvl = async (api) => { + const { balances = [] } = await getCache('xrpl-dex', 'balances'); + + const tvl = await transformDexBalances({ + chain: 'ripple', + data: balances + .filter(i => i.token0Reserve && i .token1Reserve) + .map(i => ({ + token0: i.token0Reserve.currency, + token0Bal: i.token0Reserve.amount, + token1: i.token1Reserve.currency, + token1Bal: i.token1Reserve.amount, + })) + }) + api.addCGToken('ripple', tvl?.XRP / Math.pow(10, 6)) +} module.exports = { methodology: "Finds all AMM pools on XRPL, checks their reserves, calculates TVL (in XRP) for each pool and sums them up.", ripple: { tvl }, misrepresentedTokens: true, -}; - -function getTimeNow() { - return Math.floor(Date.now() / 1000); -} - -async function tvl(api) { - const timeNow = getTimeNow() - const aDayInSeconds = 60 * 60 * 24; - const projectKey = 'xrpl-dex' - const cacheKey = 'cache' - let { lastDataUpdate, tvl } = await getCache(projectKey, cacheKey) - const val = tvl?.XRP - if (!lastDataUpdate || timeNow - lastDataUpdate > aDayInSeconds || !val) - throw new Error("stale/missing tvl data"); - api.addCGToken('ripple', val/1e6) -} \ No newline at end of file +}; \ No newline at end of file diff --git a/projects/xrpl-dex/run.sh b/projects/xrpl-dex/run.sh index 83626d02a0e2..6f1fe596c7f9 100644 --- a/projects/xrpl-dex/run.sh +++ b/projects/xrpl-dex/run.sh @@ -1,3 +1,3 @@ npm i cd .. && npm i && cd xrpl-dex -node app.js \ No newline at end of file +node api.js \ No newline at end of file From 2c53541d02369c9351c558ab56f49d2f5caea598 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:39:20 +0100 Subject: [PATCH 576/787] xrpl dex: bugfix --- projects/xrpl-dex/api.js | 38 ++++++++++++++++++++------------------ projects/xrpl-dex/index.js | 6 ++++-- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/projects/xrpl-dex/api.js b/projects/xrpl-dex/api.js index 4fa292adaf1f..4c2c76cf9d5e 100644 --- a/projects/xrpl-dex/api.js +++ b/projects/xrpl-dex/api.js @@ -7,10 +7,11 @@ const axios = require('axios') const NODE_URL = "https://xrplcluster.com"; const API_XRP = "https://api.xrpscan.com/api/v1/amm/" const RATE_LIMIT_DELAY_MS = 500; +const MIN_POOL_SIZE = 3600 const getTimeNow = () => Math.floor(Date.now() / 1000); const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) -const retry = async (fn, retries = 3, delay = 1000) => { +const retry = async (fn, retries = 7, delay) => { let attempts = 0; while (attempts < retries) { try { @@ -18,8 +19,10 @@ const retry = async (fn, retries = 3, delay = 1000) => { } catch (error) { attempts++; console.error(`Attempt ${attempts} failed. Retrying...`); + const currentDelay = delay ? delay : attempts * 1000; if (attempts >= retries) throw error; - await sleep(delay); + + await sleep(currentDelay); } } }; @@ -51,16 +54,12 @@ const getLedgerDatas = async (binary, marker, atLedgerIndex) => { }); }; +let poolIndex = 0; const getPools = async (nextMarker, isBinary, atLedgerIndex, poolsFound = []) => { try { - console.log(`Fetching pools... Marker: ${nextMarker || 'start'}, Pools found so far: ${poolsFound.length}`); + console.log(`${++poolIndex} Fetching pools... Marker: ${nextMarker || 'start'}, Pools found so far: ${poolsFound.length}`); const { state, marker } = await getLedgerDatas(isBinary, nextMarker, atLedgerIndex); - if (!state || state.length === 0) { - console.log("No more pools to fetch."); - return poolsFound; - } - if (state && state.length > 0) { const decodedState = isBinary ? state.map((entry) => rippleCodec.decode(entry.data)) @@ -74,7 +73,6 @@ const getPools = async (nextMarker, isBinary, atLedgerIndex, poolsFound = []) => })) ); - await setCache('xrpl-dex', 'pools', { pools: poolsFound, marker }); } if (marker) { @@ -82,10 +80,11 @@ const getPools = async (nextMarker, isBinary, atLedgerIndex, poolsFound = []) => return getPools(marker, isBinary, atLedgerIndex, poolsFound); } - return poolsFound; } catch (error) { console.error("Failed to fetch pools:", error.message); } + + return poolsFound; }; const parseReserve = (reserveData) => { @@ -130,23 +129,26 @@ const getAllReservesDatas = async (poolAddresses, atLedgerIndex) => { } }); + if (errors?.length) console.log(errors) + if (errors.length > 0) throw errors[0] + return poolsWithReserves; }; const getXrplPools = async () => { const timeNow = getTimeNow() const startOfDay = Math.floor(new Date().setUTCHours(0, 0, 0, 0) / 1000); - const { pools: cachedPools = [], marker: lastMarker = null, lastUpdate = 0 } = await getCache('xrpl-dex', 'pools'); - - if (lastUpdate >= startOfDay) { + let { pools: cachedPools = [], marker: lastMarker = null, lastUpdate = 0 } = await getCache('xrpl-dex', 'pools'); + + if (lastUpdate >= startOfDay && cachedPools?.length > MIN_POOL_SIZE) { console.log(`Pools have already been updated today. Last update: ${new Date(lastUpdate * 1000).toISOString()}`); return; } - + console.time("xrpl-dex fetch pool list") try { - const pools = await getPools(lastMarker, false, undefined, cachedPools); + const pools = await getPools(null, 1); console.timeEnd("xrpl-dex fetch pool list"); console.log("Total pools fetched:", pools.length); const finalMarker = pools.marker || lastMarker @@ -161,11 +163,11 @@ const getXrplPools = async () => { const getXrplBalances = async (pools) => { const timeNow = getTimeNow(); const startOfDay = Math.floor(new Date().setUTCHours(0, 0, 0, 0) / 1000); - const { balances: cachedBalances = [], lastUpdate = 0 } = await getCache('xrpl-dex', 'balances') || {}; + const { balanaces: _preBalances, lastUpdate = 0 } = await getCache('xrpl-dex', 'balances') || {}; - if (lastUpdate >= startOfDay) { + if (lastUpdate >= startOfDay && _preBalances?.length > MIN_POOL_SIZE) { console.log(`Balances have already been updated today. Last update: ${new Date(lastUpdate * 1000).toISOString()}`); - return cachedBalances; + return; } console.time("Fetching balances for pools"); diff --git a/projects/xrpl-dex/index.js b/projects/xrpl-dex/index.js index f460a28da680..394027010b09 100644 --- a/projects/xrpl-dex/index.js +++ b/projects/xrpl-dex/index.js @@ -3,11 +3,13 @@ const { transformDexBalances } = require("../helper/portedTokens"); const tvl = async (api) => { const { balances = [] } = await getCache('xrpl-dex', 'balances'); + console.log('balances', balances.length) + if (balances.length < 3600) throw new Error('No balances found') const tvl = await transformDexBalances({ chain: 'ripple', data: balances - .filter(i => i.token0Reserve && i .token1Reserve) + .filter(i => i.token0Reserve && i.token1Reserve) .map(i => ({ token0: i.token0Reserve.currency, token0Bal: i.token0Reserve.amount, @@ -15,7 +17,7 @@ const tvl = async (api) => { token1Bal: i.token1Reserve.amount, })) }) - api.addCGToken('ripple', tvl?.XRP / Math.pow(10, 6)) + api.addCGToken('ripple', tvl?.XRP / 1e6) } module.exports = { From 6014ac1a2bd2de4b19d1777cb08de72f9558a862 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:42:18 +0100 Subject: [PATCH 577/787] xrpl dex: bugfix --- projects/xrpl-dex/api.js | 2 +- projects/xrpl-dex/index.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/xrpl-dex/api.js b/projects/xrpl-dex/api.js index 4c2c76cf9d5e..998f4ac1bec6 100644 --- a/projects/xrpl-dex/api.js +++ b/projects/xrpl-dex/api.js @@ -7,7 +7,7 @@ const axios = require('axios') const NODE_URL = "https://xrplcluster.com"; const API_XRP = "https://api.xrpscan.com/api/v1/amm/" const RATE_LIMIT_DELAY_MS = 500; -const MIN_POOL_SIZE = 3600 +const MIN_POOL_SIZE = 9500 const getTimeNow = () => Math.floor(Date.now() / 1000); const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) diff --git a/projects/xrpl-dex/index.js b/projects/xrpl-dex/index.js index 394027010b09..6e789599aacc 100644 --- a/projects/xrpl-dex/index.js +++ b/projects/xrpl-dex/index.js @@ -3,8 +3,7 @@ const { transformDexBalances } = require("../helper/portedTokens"); const tvl = async (api) => { const { balances = [] } = await getCache('xrpl-dex', 'balances'); - console.log('balances', balances.length) - if (balances.length < 3600) throw new Error('No balances found') + if (balances.length < 9500) throw new Error('No balances found') const tvl = await transformDexBalances({ chain: 'ripple', From 007887f0b2ce8046e49308eaaed2790316072fd9 Mon Sep 17 00:00:00 2001 From: Jon Greenwood <81202085+0xJonHoldsCrypto@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:39:20 -0600 Subject: [PATCH 578/787] Add Base (#12543) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/metronome-synth/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/projects/metronome-synth/index.js b/projects/metronome-synth/index.js index b8c57da68454..569412e57558 100644 --- a/projects/metronome-synth/index.js +++ b/projects/metronome-synth/index.js @@ -34,5 +34,18 @@ module.exports = { "0x539505dde2b9771debe0898a84441c5e7fdf6bc0", ] }), + }, + base: { + tvl: sumTokensExport({ + owner: '0xAeDF96597338FE03E8c07a1077A296df5422320e', + tokens: [ + ADDRESSES.base.USDC, + ADDRESSES.base.WETH, + "0x1e41238aCd3A9fF90b0DCB9ea96Cf45F104e09Ef", + "0x82562507429876486B60AF4F32390ef0947b3d13", + "0x82562507429876486B60AF4F32390ef0947b3d13", + "0x46fb68Eb2b1Fc43654AbaE5691D39D18D933E4b4", + ] + }), } } From 937dc84ba8787d7aa6551320f16f8ddb998e5605 Mon Sep 17 00:00:00 2001 From: NicholasDotSol Date: Wed, 4 Dec 2024 16:41:06 +0700 Subject: [PATCH 579/787] duality-adaptor (#12546) Co-authored-by: Mona Lisa --- projects/Duality/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/Duality/index.js diff --git a/projects/Duality/index.js b/projects/Duality/index.js new file mode 100644 index 000000000000..0e14068a0ad1 --- /dev/null +++ b/projects/Duality/index.js @@ -0,0 +1,18 @@ +const { sumTokens } = require('../helper/chain/cosmos') + +const chain = 'neutron' + +async function tvl(api) { + return sumTokens({ + chain, + owner: 'neutron1n58mly6f7er0zs6swtetqgfqs36jaarqlplf59', + }) +} + +module.exports = { + timetravel: false, + methodology: 'TVL in Duality module.', + neutron: { + tvl + } +} \ No newline at end of file From 978d1569dc0466ed1cd9de4d5f1edbc60052a9c2 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:57:32 +0100 Subject: [PATCH 580/787] update steer #12547 --- projects/helper/cache.js | 10 +++++----- projects/helper/utils/graphql.js | 4 ++-- projects/steer/index.js | 12 +++++++++++- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/projects/helper/cache.js b/projects/helper/cache.js index 356371460456..04df9aec6116 100644 --- a/projects/helper/cache.js +++ b/projects/helper/cache.js @@ -104,7 +104,7 @@ async function configPost(project, endpoint, data) { } -async function cachedGraphQuery(project, endpoint, query, { api, useBlock = false, variables = {}, fetchById, safeBlockLimit, } = {}) { +async function cachedGraphQuery(project, endpoint, query, { api, useBlock = false, variables = {}, fetchById, safeBlockLimit, headers, } = {}) { if (!project || !endpoint) throw new Error('Missing parameters') endpoint = sdk.graph.modifyEndpoint(endpoint) const key = 'config-cache' @@ -120,9 +120,9 @@ async function cachedGraphQuery(project, endpoint, query, { api, useBlock = fals variables.block = await api.getBlock() } if (!fetchById) - json = await graphql.request(endpoint, query, { variables }) + json = await graphql.request(endpoint, query, { variables, headers }) else - json = await graphFetchById({ endpoint, query, params: variables, api, options: { useBlock, safeBlockLimit } }) + json = await graphFetchById({ endpoint, query, params: variables, api, options: { useBlock, safeBlockLimit, headers } }) if (!json) throw new Error('Empty JSON') await _setCache(key, project, json) return json @@ -135,7 +135,7 @@ async function cachedGraphQuery(project, endpoint, query, { api, useBlock = fals } -async function graphFetchById({ endpoint, query, params = {}, api, options: { useBlock = false, safeBlockLimit = 500 } = {} }) { +async function graphFetchById({ endpoint, query, params = {}, api, options: { useBlock = false, safeBlockLimit = 500, headers } = {} }) { if (useBlock && !params.block) params.block = await api.getBlock() - safeBlockLimit endpoint = sdk.graph.modifyEndpoint(endpoint) @@ -144,7 +144,7 @@ async function graphFetchById({ endpoint, query, params = {}, api, options: { u let lastId = "" let response; do { - const res = await graphql.request(endpoint, query, { variables: { ...params, lastId }}) + const res = await graphql.request(endpoint, query, { variables: { ...params, lastId }, headers }) Object.keys(res).forEach(key => response = res[key]) data.push(...response) lastId = response[response.length - 1]?.id diff --git a/projects/helper/utils/graphql.js b/projects/helper/utils/graphql.js index e9a2c82f81e7..8860b580cd23 100644 --- a/projects/helper/utils/graphql.js +++ b/projects/helper/utils/graphql.js @@ -1,7 +1,7 @@ const axios = require("axios"); -async function request(endpoint, query, { variables, withMetadata = false } = {}) { - const { data: result } = await axios.post(endpoint, { query, variables }) +async function request(endpoint, query, { variables, withMetadata = false, headers } = {}) { + const { data: result } = await axios.post(endpoint, { query, variables }, { headers }) if (result.errors) throw new Error(result.errors[0].message) return withMetadata ? result : result.data } diff --git a/projects/steer/index.js b/projects/steer/index.js index 32ad3085db13..ff409d3ae88e 100644 --- a/projects/steer/index.js +++ b/projects/steer/index.js @@ -178,15 +178,25 @@ const supportedChains = [ chainId: 314, identifier: 'filecoin' }, + { + name: 'Zircuit', + subgraphEndpoint: 'https://app.sentio.xyz/api/v1/graphql/rakesh/steer-protocol-zircuit', + headers: {'api-key': 'yu0Dep8seTmFjvlmAXN1ILNggARnx74MB' + }, + chainId: 48900, + identifier: 'zircuit' + }, ] // Fetch active vaults and associated data @todo limited to 1000 per chain const query = `{vaults(first: 1000, where: {totalLPTokensIssued_not: "0", lastSnapshot_not: "0"}) {id}}` +const z_query = `{ vaults(first: 1000, where: {lastSnapshot_gte: "0", totalLPTokensIssued_gt: "0"}) { id }}` supportedChains.forEach(chain => { module.exports[chain.identifier] = { tvl: async (api) => { - const data = await cachedGraphQuery('steer/' + chain.identifier, chain.subgraphEndpoint, query,) + let _query = api.chain === 'zircuit' ? z_query : query + const data = await cachedGraphQuery('steer/' + chain.identifier, chain.subgraphEndpoint, _query, { headers: chain.headers }) const vaults = data.vaults.map((vault) => vault.id) const bals = await api.multiCall({ abi: "function getTotalAmounts() view returns (uint256 total0, uint256 total1)", calls: vaults, permitFailure: true, }) From fcdf54db0f315268ce0437e146496cd77baefa32 Mon Sep 17 00:00:00 2001 From: krishnafractol <137801527+krishnafractol@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:34:43 +0530 Subject: [PATCH 581/787] Add Upshift to Defi Listing (#12545) Co-authored-by: krishna7860 Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/upshift/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/upshift/index.js diff --git a/projects/upshift/index.js b/projects/upshift/index.js new file mode 100644 index 000000000000..7dd6c00a84c1 --- /dev/null +++ b/projects/upshift/index.js @@ -0,0 +1,17 @@ +const { sumERC4626VaultsExport } = require('../helper/erc4626') +const config = { + ethereum: ["0xB7858b66dFA38b9Cb74d00421316116A7851c273", "0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42", "0x18a5a3D575F34e5eBa92ac99B0976dBe26f9F869", "0xEBac5e50003d4B17Be422ff9775043cD61002f7f"], + avax: ["0x3408b22d8895753C9A3e14e4222E981d4E9A599E"], + base: ["0x4e2D90f0307A93b54ACA31dc606F93FE6b9132d2"] +} + +module.exports = { + doublecounted: true, + methodology: "TVL is the sum of tokens deposited in erc4626 vaults", +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: sumERC4626VaultsExport({ vaults: config[chain], isOG4626: true }) + } +}) \ No newline at end of file From 37ea1d41b690a7e3ff1a8ed2fe2a7d6760404922 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Soares?= <77671016+FSoaresDev@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:35:31 +0000 Subject: [PATCH 582/787] update astrovault adapter to include nibiru chain (#12552) --- projects/astrovault/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/astrovault/index.js b/projects/astrovault/index.js index 9d3ab70cf716..9a548444208d 100644 --- a/projects/astrovault/index.js +++ b/projects/astrovault/index.js @@ -19,6 +19,15 @@ const data = { hybridFactory: "neutron16yn2gcz24s9qwpuxvrhl3xed0pmhrgwx2mz40zrazfc0pt5kq0psucs6xl", }, + + nibiru: { + stableFactory: + "nibi143hmeallpaasdyull3gjcmasrcg63yl8f4cumah7xmcmjnqewa9s5jkan2", + standardFactory: + "nibi1gmw5eqnergfdx5qp4w53vwaywg63dwnvqeus3g6a2926pz2axyqshrlh2m", + hybridFactory: + "nibi1gwsrmpkkcl82aqs3vk4vy2lt0dm3kr3sshmruzhxhsqh8xglxrtsglzpqj", + }, }; async function tvl(api) { @@ -86,4 +95,7 @@ module.exports = { neutron: { tvl, }, + nibiru: { + tvl, + }, } \ No newline at end of file From f4b597aa61394b3158813016ea6f6f04979228fc Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:48:34 +0100 Subject: [PATCH 583/787] binance: bnb chain is sunset https://www.bnbchain.org/en/blog/final-sunset-plan-of-bnb-beacon-chain --- projects/binance/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/binance/config.js b/projects/binance/config.js index f58740a565ac..d0cf26973221 100644 --- a/projects/binance/config.js +++ b/projects/binance/config.js @@ -656,8 +656,8 @@ module.exports = { ], }, bep2: { - geckoId: 'binancecoin', - owners: getAddresses('BEP2'), + // geckoId: 'binancecoin', + // owners: getAddresses('BEP2'), }, tron: { owners: getOwners('TRX'), From 27bcf26bed5cfa42aa77dea0bfdcf00eec7edb0b Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Wed, 4 Dec 2024 14:33:33 +0000 Subject: [PATCH 584/787] apechain bridge --- projects/apechain/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/apechain/index.js diff --git a/projects/apechain/index.js b/projects/apechain/index.js new file mode 100644 index 000000000000..662f72c521c1 --- /dev/null +++ b/projects/apechain/index.js @@ -0,0 +1,13 @@ +const { sumTokensExport } = require('../helper/unwrapLPs'); + +module.exports = { + ethereum: { + tvl: sumTokensExport({ + tokensAndOwners: [ + ['0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', '0xc8a12b1DB09ec5a43919906d94Fa7eeAef1131D1'], // wstETH + ['0x83F20F44975D03b1b09e64809B757c47f942BEeA', '0xf33D21137cD0B878f3A18Cc60cD74F842c59cb00'], // sDAI + ['0x4d224452801ACEd8B2F0aebE155379bb5D594381', '0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9'], // APE + ] + }), + }, +}; \ No newline at end of file From ea72ba3c1a2bc561ccd7444e451878d6c4a676d6 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Wed, 4 Dec 2024 14:37:03 +0000 Subject: [PATCH 585/787] staking --- projects/apechain/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/apechain/index.js b/projects/apechain/index.js index 662f72c521c1..cfd7dead9e3e 100644 --- a/projects/apechain/index.js +++ b/projects/apechain/index.js @@ -1,4 +1,5 @@ const { sumTokensExport } = require('../helper/unwrapLPs'); +const { staking } = require('../helper/staking') module.exports = { ethereum: { @@ -6,8 +7,8 @@ module.exports = { tokensAndOwners: [ ['0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', '0xc8a12b1DB09ec5a43919906d94Fa7eeAef1131D1'], // wstETH ['0x83F20F44975D03b1b09e64809B757c47f942BEeA', '0xf33D21137cD0B878f3A18Cc60cD74F842c59cb00'], // sDAI - ['0x4d224452801ACEd8B2F0aebE155379bb5D594381', '0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9'], // APE ] }), + staking: staking('0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9', '0x4d224452801ACEd8B2F0aebE155379bb5D594381') }, }; \ No newline at end of file From 468769ee4e4db6e2e05e58bfa0eedd2b5bd3a67b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:10:30 +0100 Subject: [PATCH 586/787] astrovault: minor fix --- projects/astrovault/index.js | 10 ++++++---- projects/helper/tokenMapping.js | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/projects/astrovault/index.js b/projects/astrovault/index.js index 9a548444208d..57fe9e1ffad8 100644 --- a/projects/astrovault/index.js +++ b/projects/astrovault/index.js @@ -19,7 +19,7 @@ const data = { hybridFactory: "neutron16yn2gcz24s9qwpuxvrhl3xed0pmhrgwx2mz40zrazfc0pt5kq0psucs6xl", }, - + nibiru: { stableFactory: "nibi143hmeallpaasdyull3gjcmasrcg63yl8f4cumah7xmcmjnqewa9s5jkan2", @@ -32,7 +32,7 @@ const data = { async function tvl(api) { const { chain } = api - for (const factory of [ + for (const factory of [ data[chain].stableFactory, data[chain].standardFactory, data[chain].hybridFactory, @@ -72,7 +72,7 @@ async function tvl(api) { }) await PromisePool - .withConcurrency(20) + .withConcurrency(3) .for(allPools) .process(getPoolAssetsState) @@ -98,4 +98,6 @@ module.exports = { nibiru: { tvl, }, -} \ No newline at end of file +} + +module.exports = { nibiru: { tvl } } \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index efa1ae4460d7..e280e99149ef 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -18,7 +18,7 @@ coreAssets = JSON.parse(JSON.stringify(coreAssets)) // orbit brige: https://bridge.orbitchain.io/open/v1/api/monitor/rawTokenList -const ibcChains = ['ibc', 'terra', 'terra2', 'crescent', 'osmosis', 'kujira', 'stargaze', 'juno', 'injective', 'cosmos', 'comdex', 'umee', 'orai', 'persistence', 'fxcore', 'neutron', 'quasar', 'chihuahua', 'sei', 'archway', 'migaloo', 'secret', 'aura', 'xpla', 'bostrom', 'joltify'] +const ibcChains = ['ibc', 'terra', 'terra2', 'crescent', 'osmosis', 'kujira', 'stargaze', 'juno', 'injective', 'cosmos', 'comdex', 'umee', 'orai', 'persistence', 'fxcore', 'neutron', 'quasar', 'chihuahua', 'sei', 'archway', 'migaloo', 'secret', 'aura', 'xpla', 'bostrom', 'joltify', 'nibiru'] const caseSensitiveChains = [...ibcChains, 'solana', 'tezos', 'ton', 'algorand', 'aptos', 'near', 'bitcoin', 'waves', 'tron', 'litecoin', 'polkadot', 'ripple', 'elrond', 'cardano', 'stacks', 'sui', 'ergo', 'mvc', 'renec', 'doge', 'stellar', 'massa', 'eclipse', ] @@ -88,6 +88,9 @@ const fixBalancesTokens = { starknet: { [ADDRESSES.starknet.BROTHER]: { coingeckoId: "starknet-brother", decimals: 18 }, }, + nibiru: { + 'unibi': { coingeckoId: "nibiru", decimals: 6 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 3eeba60b4fe15016bb6f382595cd0952ecfa4e75 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:45:57 +0100 Subject: [PATCH 587/787] update skale #12549 --- projects/skale/index.js | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/projects/skale/index.js b/projects/skale/index.js index 786f3ce63884..d68954776258 100644 --- a/projects/skale/index.js +++ b/projects/skale/index.js @@ -1,10 +1,39 @@ -const { sumTokensExport } = require('../helper/unwrapLPs') +const { sumTokens2 } = require('../helper/unwrapLPs') +const ADDRESSES = require('../helper/coreAssets.json') + const depositBoxETH = '0x49F583d263e4Ef938b9E09772D3394c71605Df94'; const depositBoxERC20 = '0x8fB1A35bB6fB9c47Fb5065BE5062cB8dC1687669'; module.exports = { start: '2021-07-19', // Mon July 19 06:38:20 PM UTC 2021 ethereum: { - tvl: sumTokensExport({ owners: [depositBoxETH, depositBoxERC20], fetchCoValentTokens: true, permitFailure: true }), + tvl, + } +} + +async function tvl(api) { + const ownerTokens = [[[ADDRESSES.null], depositBoxETH]] + const chains = ["elated-tan-skat"] + let tokens = [] + for (const chain of chains) { + const tokenCount = await api.call({ abi: abi.getSchainToAllERC20Length, target: depositBoxERC20, params: chain }) + + for (let i = 0; i < tokenCount; i += 10) { + let remainingTokens = tokenCount - i; + const res = await api.call({ + abi: abi.getSchainToAllERC20, + target: depositBoxERC20, + params: [chain, i, remainingTokens >= 10 ? i + 10 : i + remainingTokens], + }); + + tokens.push(...res); + } } + ownerTokens.push([tokens, depositBoxERC20]) + return sumTokens2({ api, ownerTokens }) +} + +const abi = { + "getSchainToAllERC20Length": "function getSchainToAllERC20Length(string schainName) view returns (uint256)", + "getSchainToAllERC20": "function getSchainToAllERC20(string schainName, uint256 from, uint256 to) view returns (address[])" } \ No newline at end of file From ea6bae21b784b6a2afebaddb16f280f2b10185fd Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:56:55 +0100 Subject: [PATCH 588/787] update seafi #12555 --- projects/ggpVault/index.js | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/projects/ggpVault/index.js b/projects/ggpVault/index.js index 2fe134cd3afe..e5f37a28eeca 100644 --- a/projects/ggpVault/index.js +++ b/projects/ggpVault/index.js @@ -1,16 +1,7 @@ -const GGPVAULT_CONTRACT = "0xdF34022e8a280fc79499cA560439Bb6f9797EbD8"; -const GGP = "0x69260B9483F9871ca57f81A90D91E2F96c2Cd11d"; - -async function tvl(api) { - const bal = await api.call({ - abi: "uint256:totalAssets", - target: GGPVAULT_CONTRACT, - }); - api.add(GGP, bal); -} +const { sumERC4626VaultsExport } = require('../helper/erc4626') module.exports = { avax: { - tvl, + tvl: sumERC4626VaultsExport({ vaults: ['0xdF34022e8a280fc79499cA560439Bb6f9797EbD8', '0x36213ca1483869c5616be738Bf8da7C9B34Ace8d'], isOG4626: true }) }, }; From 6a7cf5c21faeda6a5df2d095773732ecbcb41a5f Mon Sep 17 00:00:00 2001 From: rav <85165079+rav-ipor@users.noreply.github.com> Date: Wed, 4 Dec 2024 16:58:59 +0100 Subject: [PATCH 589/787] IPOR - switch back to main branch in config after transition period (#12554) Co-authored-by: adam Co-authored-by: kris-ipor <98769272+kris-ipor@users.noreply.github.com> --- projects/ipor-fusion/index.js | 2 +- projects/ipor/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ipor-fusion/index.js b/projects/ipor-fusion/index.js index 224ae04aedca..bbb66ccef0b6 100644 --- a/projects/ipor-fusion/index.js +++ b/projects/ipor-fusion/index.js @@ -1,6 +1,6 @@ const { getConfig } = require('../helper/cache') -const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/refs/heads/defillama/mainnet/addresses.json"; +const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/refs/heads/main/mainnet/addresses.json"; async function tvl(api) { const config = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); diff --git a/projects/ipor/index.js b/projects/ipor/index.js index 245d0fbab8f3..2a506a631e37 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -1,7 +1,7 @@ const { abi } = require("./abi"); const { getConfig } = require('../helper/cache') -const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/refs/heads/defillama/mainnet/addresses.json"; +const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/refs/heads/main/mainnet/addresses.json"; const V2DeploymentBlockNumber = 18333744 async function tvlEthereum(api) { From a85c144087350889c1aec833e5ba2a7687e391a5 Mon Sep 17 00:00:00 2001 From: mo Date: Wed, 4 Dec 2024 19:54:15 +0100 Subject: [PATCH 590/787] TVL Curve: add ng-factories + taiko deployment (#12556) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/curve/abi.json | 3 +- projects/curve/contracts.json | 68 +++++++++++++++++++++++++-------- projects/curve/index.js | 15 +++++--- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 5 ++- 6 files changed, 71 insertions(+), 22 deletions(-) diff --git a/projects/curve/abi.json b/projects/curve/abi.json index 4925ec11820d..1e5a53712a8b 100644 --- a/projects/curve/abi.json +++ b/projects/curve/abi.json @@ -18,6 +18,7 @@ "cryptoFactory": "function get_coins(address _pool) view returns (address[2])", "triCryptoFactory": "function get_coins(address _pool) view returns (address[3])", "CurveStableswapFactoryNG": "function get_coins(address _pool) view returns (address[])", - "CurveL2TricryptoFactory": "function get_coins(address _pool) view returns (address[3])" + "CurveTwocryptoFactoryNG": "function get_coins(address _pool) view returns (address[2])", + "CurveTricryptoFactoryNG": "function get_coins(address _pool) view returns (address[3])" } } \ No newline at end of file diff --git a/projects/curve/contracts.json b/projects/curve/contracts.json index bdbd6ed78e65..20f177d9e6ca 100644 --- a/projects/curve/contracts.json +++ b/projects/curve/contracts.json @@ -36,7 +36,12 @@ "currency": "KRW" } }, - "CurveStableswapFactoryNG": "0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf" + "blacklist": [ + "0x69000dFD5025E82f48Eb28325A2B88a241182CEd" + ], + "CurveStableswapFactoryNG": "0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963" }, "polygon": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -52,7 +57,9 @@ "0xa7fd7d83e2d63f093b71c5f3b84c27cff66a7802", "0xacfbe6979d58b55a681875fc9adad0da4a37a51b" ], - "CurveStableswapFactoryNG": "0x1764ee18e8B3ccA4787249Ceb249356192594585" + "CurveStableswapFactoryNG": "0x1764ee18e8B3ccA4787249Ceb249356192594585", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0xC1b393EfEF38140662b91441C6710Aa704973228" }, "arbitrum": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -62,7 +69,8 @@ "2CRV": "0xbf7e49483881c76487b0989cd7d9a8239b20ca41" }, "CurveStableswapFactoryNG": "0x9AF14D26075f142eb3F292D5065EB3faa646167b", - "CurveL2TricryptoFactory": "0xbc0797015fcfc47d9c1856639cae50d0e69fbee8" + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0xbC0797015fcFc47d9C1856639CaE50D0e69FbEE8" }, "aurora": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -71,7 +79,9 @@ "metapoolBases": { "3CRV": "0xbf7e49483881c76487b0989cd7d9a8239b20ca41" }, - "CurveStableswapFactoryNG": "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E" + "CurveStableswapFactoryNG": "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0xC1b393EfEF38140662b91441C6710Aa704973228" }, "avax": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -80,7 +90,9 @@ "metapoolBases": { "av3CRV": "0xb0d2eb3c2ca3c6916fab8dcbf9d9c165649231ae" }, - "CurveStableswapFactoryNG": "0x1764ee18e8B3ccA4787249Ceb249356192594585" + "CurveStableswapFactoryNG": "0x1764ee18e8B3ccA4787249Ceb249356192594585", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a" }, "fantom": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -99,8 +111,9 @@ "scFUSDT": "0x02224765bc8d54c21bb51b0951c80315e1c263f9", "scMIM": "0x90b7c21be43855afd2515675fc307c084427404f" }, - "yearnTokens": {}, - "CurveStableswapFactoryNG": "0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b" + "CurveStableswapFactoryNG": "0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0x9AF14D26075f142eb3F292D5065EB3faa646167b" }, "harmony": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -120,11 +133,12 @@ "base": { "wrapped": "0x4200000000000000000000000000000000000006", "registriesMapping": { - "triCryptoFactory": "0xa5961898870943c68037f6848d2d866ed2016bcb", "stableFactory": "0x3093f9B57A428F3EB6285a589cb35bEA6e78c336", "cryptoFactory": "0x5EF72230578b3e399E6C6F4F6360edF95e83BBfd" }, - "CurveStableswapFactoryNG": "0xd2002373543Ce3527023C75e7518C274A51ce712" + "CurveStableswapFactoryNG": "0xd2002373543Ce3527023C75e7518C274A51ce712", + "CurveTwocryptoFactoryNG": "0xc9Fe0C63Af9A39402e8a5514f9c43Af0322b665F", + "CurveTricryptoFactoryNG": "0xa5961898870943c68037f6848d2d866ed2016bcb" }, "optimism": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -133,7 +147,9 @@ "metapoolBases": { "3CRV": "0x1337bedc9d22ecbe766df105c9623922a27963ec" }, - "CurveStableswapFactoryNG": "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E" + "CurveStableswapFactoryNG": "0x5eeE3091f747E60a045a2E715a4c71e600e31F6E", + "CurveTricryptoFactoryNG": "0xc6C09471Ee39C7E30a067952FcC89c8922f9Ab53", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F" }, "xdai": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -153,7 +169,9 @@ "fraxtal": { "gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "metapoolBases": {}, - "CurveStableswapFactoryNG": "0xd2002373543ce3527023c75e7518c274a51ce712" + "CurveStableswapFactoryNG": "0xd2002373543Ce3527023C75e7518C274A51ce712", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0xc9Fe0C63Af9A39402e8a5514f9c43Af0322b665F" }, "kava": { "addressProvider": "0x0000000022D53366457F9d5E68Ec105046FC4383", @@ -165,16 +183,36 @@ "xlayer": { "gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "metapoolBases": {}, - "CurveStableswapFactoryNG": "0x5eee3091f747e60a045a2e715a4c71e600e31f6e" + "CurveStableswapFactoryNG": "0x5eee3091f747e60a045a2e715a4c71e600e31f6e", + "CurveTwocryptoFactoryNG": "0x0c59d36b23f809f8b6c7cb4c8c590a0ac103baef", + "CurveTricryptoFactoryNG": "0xd3b17f862956464ae4403ccf829ce69199856e1e" }, "bsc": { "gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "metapoolBases": {}, - "CurveStableswapFactoryNG": "0xd7e72f3615aa65b92a4dbdc211e296a35512988b" + "CurveStableswapFactoryNG": "0xd7e72f3615aa65b92a4dbdc211e296a35512988b", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0xc55837710bc500F1E3c7bb9dd1d51F7c5647E657" }, "mantle": { "gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "metapoolBases": {}, - "CurveStableswapFactoryNG": "0x5eee3091f747e60a045a2e715a4c71e600e31f6e" + "CurveStableswapFactoryNG": "0x5eee3091f747e60a045a2e715a4c71e600e31f6e", + "CurveTwocryptoFactoryNG": "0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F", + "CurveTricryptoFactoryNG": "0x0C9D8c7e486e822C29488Ff51BFf0167B4650953" + }, + "taiko": { + "gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "wrapped": "0xA51894664A773981C6C112C43ce576f315d5b1B6", + "CurveStableswapFactoryNG": "0x06452f9c013fc37169B57Eab8F50A7A48c9198A3", + "CurveTwocryptoFactoryNG": "0xFAbC421e3368D158d802684A217a83c083c94CeB", + "CurveTricryptoFactoryNG": "0x0C9D8c7e486e822C29488Ff51BFf0167B4650953" + }, + "corn": { + "gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", + "wrapped": "0xda5dDd7270381A7C2717aD10D1c0ecB19e3CDFb2", + "CurveStableswapFactoryNG": "0xd7E72f3615aa65b92A4DBdC211E296a35512988B", + "CurveTwocryptoFactoryNG": "0x5Ea9DD3b6f042A34Df818C6c1324BC5A7c61427a", + "CurveTricryptoFactoryNG": "0x7Ca46A636b02D4aBC66883D7FF164bDE506DC66a" } -} \ No newline at end of file +} \ No newline at end of file diff --git a/projects/curve/index.js b/projects/curve/index.js index 3424f2ea1d3d..0d7b871d2746 100644 --- a/projects/curve/index.js +++ b/projects/curve/index.js @@ -26,7 +26,9 @@ const chains = [ "fraxtal", "xlayer", "bsc", - "mantle" + "mantle", + "taiko", + "corn", ]; // Object.keys(contracts); const registryIds = { stableswap: 0, @@ -106,8 +108,11 @@ async function getPools(block, chain) { if (contracts[chain].CurveStableswapFactoryNG) { registriesMapping.CurveStableswapFactoryNG = contracts[chain].CurveStableswapFactoryNG } - if (contracts[chain].CurveL2TricryptoFactory) { - registriesMapping.CurveL2TricryptoFactory = contracts[chain].CurveL2TricryptoFactory + if (contracts[chain].CurveTricryptoFactoryNG) { + registriesMapping.CurveTricryptoFactoryNG = contracts[chain].CurveTricryptoFactoryNG + } + if (contracts[chain].CurveTwocryptoFactoryNG) { + registriesMapping.CurveTwocryptoFactoryNG = contracts[chain].CurveTwocryptoFactoryNG } const poolList = {} await Promise.all(Object.entries(registriesMapping).map(async ([registry, addr]) => { @@ -165,7 +170,7 @@ async function unwrapPools({ poolList, registry, chain, block }) { const callParams = { target: registryAddress, calls: poolList.map(i => ({ params: i.output })), chain, block, } const { output: coins } = await sdk.api.abi.multiCall({ ...callParams, abi: abi.get_coins[registry] }) let nCoins = {} - if (!['cryptoFactory', 'triCryptoFactory', 'CurveL2TricryptoFactory'].includes(registry)) + if (!['cryptoFactory', 'triCryptoFactory', 'CurveL2TricryptoFactory', 'CurveTricryptoFactoryNG', 'CurveTwocryptoFactoryNG'].includes(registry)) nCoins = (await sdk.api.abi.multiCall({ ...callParams, abi: abi.get_n_coins[registry] })).output let { wrapped = '', metapoolBases = {}, blacklist = [] } = contracts[chain] @@ -254,7 +259,7 @@ module.exports = chainTypeExports(chains); module.exports.ethereum["staking"] = staking( contracts.ethereum.veCRV, contracts.ethereum.CRV -); +); module.exports.harmony = { tvl: async (api) => { diff --git a/projects/helper/chains.json b/projects/helper/chains.json index b69948ef6507..0075d0f0391e 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -69,6 +69,7 @@ "concordium", "conflux", "core", + "corn", "cosmos", "coti", "crab", diff --git a/projects/helper/env.js b/projects/helper/env.js index 62f91c5eb02e..5f22b5e188a1 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -30,6 +30,7 @@ const DEFAULTS = { RPC_PROXY_URL: "https://rpc-proxy.llama.fi", UNIT0_RPC: "https://rpc.unit0.dev", RBN_RPC: "https://governors.mainnet.redbelly.network", + CORN_RPC: "https://rpc.ankr.com/corn_maizenet", ACE_RPC_MULTICALL: "0x025A2B4fCE1E0bD736D5cebe6C8a52229795376B", } diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index e280e99149ef..ac9c1d35e9a0 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -88,9 +88,12 @@ const fixBalancesTokens = { starknet: { [ADDRESSES.starknet.BROTHER]: { coingeckoId: "starknet-brother", decimals: 18 }, }, + corn:{ + '0xda5ddd7270381a7c2717ad10d1c0ecb19e3cdfb2': { coingeckoId: "bitcoin", decimals: 18 }, + }, nibiru: { 'unibi': { coingeckoId: "nibiru", decimals: 6 }, - } + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 68e930105af538a9eef1a15d63c02aa7f2a8c8ab Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 4 Dec 2024 22:34:50 +0100 Subject: [PATCH 591/787] remove duplicate --- projects/metronome-synth/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/metronome-synth/index.js b/projects/metronome-synth/index.js index 569412e57558..490198487d79 100644 --- a/projects/metronome-synth/index.js +++ b/projects/metronome-synth/index.js @@ -43,7 +43,6 @@ module.exports = { ADDRESSES.base.WETH, "0x1e41238aCd3A9fF90b0DCB9ea96Cf45F104e09Ef", "0x82562507429876486B60AF4F32390ef0947b3d13", - "0x82562507429876486B60AF4F32390ef0947b3d13", "0x46fb68Eb2b1Fc43654AbaE5691D39D18D933E4b4", ] }), From cbf5f2545cb0ffbbfcefc9764015aff6922e6766 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:38:53 +0100 Subject: [PATCH 592/787] track lpETH #12550 --- projects/lpeth/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/lpeth/index.js diff --git a/projects/lpeth/index.js b/projects/lpeth/index.js new file mode 100644 index 000000000000..2b2ba1f53229 --- /dev/null +++ b/projects/lpeth/index.js @@ -0,0 +1,14 @@ + +async function tvl(api) { + const LPETH_CONTRACT = "0xF3a75E087A92770b4150fFF14c6d36FB07796252" + const liabilities = await api.call({ abi: 'uint256:liabilities', target: LPETH_CONTRACT, }) + api.addGasToken(liabilities) +} + +module.exports = { + methodology: 'Counts the amount of deposited ETH in the LPETH contract.', + doublecounted: true, + ethereum: { + tvl + } +} \ No newline at end of file From b6478d83a9fd54ca0fe5c2bc73a02acb562427c7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:48:38 +0100 Subject: [PATCH 593/787] track biquid #12558 --- projects/biquid/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/biquid/index.js diff --git a/projects/biquid/index.js b/projects/biquid/index.js new file mode 100644 index 000000000000..d162546b12c4 --- /dev/null +++ b/projects/biquid/index.js @@ -0,0 +1,11 @@ + +async function tvl(api) { + const totalSupply = await api.call({ target: '0xEff8378C6419b50C9D87f749f6852d96D4Cc5aE4', abi: "erc20:totalSupply", }); + api.addGasToken(totalSupply); +} + +module.exports = { + bfc: { + tvl, + } +} \ No newline at end of file From 3acd527aaecb6743223e60518d86d38851c3bb65 Mon Sep 17 00:00:00 2001 From: Wayne Kuo <95527849+WayneAl@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:50:45 +0800 Subject: [PATCH 594/787] Update Typus DOV, add refund vaults TVL (#12561) --- projects/typus-finance/index.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/projects/typus-finance/index.js b/projects/typus-finance/index.js index ba5f173d8072..50a954951399 100644 --- a/projects/typus-finance/index.js +++ b/projects/typus-finance/index.js @@ -1,6 +1,7 @@ const sui = require("../helper/chain/sui"); const SINGLE_DEPOSIT_VAULT_REGISTRY = "0xd67cf93a0df61b4b3bbf6170511e0b28b21578d9b87a8f4adafec96322dd284d"; +const REFUND_VAULT_REGISTRY ="0xf9acfc0a06094f6515c4392ffef84d40cd5f1d72bc74cbde3ee99dd7bca6cf3f" const fud_token = "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD"; const V1_SINGLE_DEPOSIT_VAULT_REGISTRY = "0x4ae62c4d67f9f5d7077626fcc6d450535c4df710da455a0a2bd2226558832629"; const V1_SINGLE_BID_VAULT_REGISTRY = "0x2c8cdd00ced47e717420cd2fc54990b3b38e115e34a9209271063a59ddeeb059"; @@ -37,10 +38,7 @@ async function tvl(api) { parent: V1_SINGLE_DEPOSIT_VAULT_REGISTRY, }); - const v1depositVaultIds = v1depositVaultFields.map((item) => item.fields.id.id); - const v1depositVaults = await sui.getObjects(v1depositVaultIds); - - v1depositVaults.forEach( + v1depositVaultFields.forEach( ({ type, fields: { @@ -59,11 +57,7 @@ async function tvl(api) { parent: V1_SINGLE_BID_VAULT_REGISTRY, }); - const v1bidVaultIds = v1bidVaultFields.map((item) => item.fields.id.id); - - const v1bidVaults = await sui.getObjects(v1bidVaultIds); - - v1bidVaults.forEach( + v1bidVaultFields.forEach( ({ type, fields: { @@ -76,6 +70,16 @@ async function tvl(api) { api.add(coin, fields.performance_fee_sub_vault.fields.balance); } ); + + // Add Refund Vaults TVL + const refundVaultFields = await sui.getDynamicFieldObjects({ + parent: REFUND_VAULT_REGISTRY, + }); + + refundVaultFields.forEach(({ fields }) => { + const token = "0x" + fields.token.fields.name; + api.add(token, fields.share_supply); + }); } module.exports = { From 57af2719382dfc6e095b2e746f367c1226763e1d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:22:22 +0100 Subject: [PATCH 595/787] matrixdock: track xau #12562 --- projects/matrixdock/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/projects/matrixdock/index.js b/projects/matrixdock/index.js index 1a1c8b7c05c0..466547b81dc1 100644 --- a/projects/matrixdock/index.js +++ b/projects/matrixdock/index.js @@ -1,11 +1,14 @@ -const ADDRESSES = require('../helper/coreAssets.json') +const config = { + ethereum: ['0x530824DA86689C9C17CdC2871Ff29B058345b44a', '0x2103E845C5E135493Bb6c2A4f0B8651956eA8682'], + bsc: ['0x23AE4fd8E7844cdBc97775496eBd0E8248656028'] +} -module.exports = { - misrepresentedTokens: true, - ethereum: { +Object.keys(config).forEach(chain => { + const tokens = config[chain] + module.exports[chain] = { tvl: async (api) => { - const STBT = '0x530824DA86689C9C17CdC2871Ff29B058345b44a' - api.add(ADDRESSES.ethereum.USDT, await api.call({ target: '0xad4A9bED9a5E2c1c9a6E43D35Db53c83873dd901', abi: 'uint256:latestAnswer'}) / 1e12) + const supplies = await api.multiCall({ abi: 'uint256:totalSupply', calls: tokens }) + api.add(tokens, supplies) } } -} \ No newline at end of file +}) \ No newline at end of file From 2706726be9209a5a67b5207adfc2a9232be62e0f Mon Sep 17 00:00:00 2001 From: cmdevbc <89685615+cmdevbc@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:36:41 +0300 Subject: [PATCH 596/787] PRDT: Add Solana Contract (#12565) Co-authored-by: PRDT Finance <87976805+PRDTfinance@users.noreply.github.com> Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/prdt/index.js | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/projects/prdt/index.js b/projects/prdt/index.js index e7100be91e91..14134bd4ef48 100644 --- a/projects/prdt/index.js +++ b/projects/prdt/index.js @@ -1,5 +1,7 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokensExport, } = require("../helper/unwrapLPs"); +const ADDRESSES = require("../helper/coreAssets.json"); +const { sumTokensExport } = require("../helper/unwrapLPs"); +const { sumTokensExport: solExports } = require("../helper/solana"); + const config = { ethereum: { @@ -14,7 +16,11 @@ const config = { predictionPROV2: "0x062EB9830D1f1f0C64ac598eC7921f0cbD6d4841", predictionPROV3: "0xe2ca0a434effea151d5b2c649b754acd3c8a20f0", }), - tokens: [ADDRESSES.null, ADDRESSES.arbitrum.USDT, ADDRESSES.arbitrum.USDC_CIRCLE], + tokens: [ + ADDRESSES.null, + ADDRESSES.arbitrum.USDT, + ADDRESSES.arbitrum.USDC_CIRCLE, + ], }, bsc: { owners: Object.values({ @@ -26,7 +32,12 @@ const config = { predictionclassicV3: "0x00199E444155f6a06d74CF36315419d39b874f5c", predictionPROV3: "0x49eFb44831aD88A9cFFB183d48C0c60bF4028da8", }), - tokens: [ADDRESSES.null, ADDRESSES.bsc.USDT, ADDRESSES.bsc.USDC, ADDRESSES.bsc.ETH], + tokens: [ + ADDRESSES.null, + ADDRESSES.bsc.USDT, + ADDRESSES.bsc.USDC, + ADDRESSES.bsc.ETH, + ], }, polygon: { owners: Object.values({ @@ -37,11 +48,21 @@ const config = { predictionclassicv3: "0x9f9564BE7b566dfE4B091a83a591752102aF3F33", predictionPROV3: "0x0b9c8c0a04354f41b985c10daf7db30bc66998f5", }), - tokens: [ADDRESSES.null, ADDRESSES.polygon.USDT, ADDRESSES.polygon.USDC_CIRCLE, ADDRESSES.polygon.WETH], + tokens: [ + ADDRESSES.null, + ADDRESSES.polygon.USDT, + ADDRESSES.polygon.USDC_CIRCLE, + ADDRESSES.polygon.WETH, + ], }, + solana: {}, }; +Object.keys(config).forEach((chain) => { + module.exports[chain] = { tvl: sumTokensExport(config[chain]) }; +}); -Object.keys(config).forEach(chain => { - module.exports[chain] = { tvl: sumTokensExport(config[chain]) } -}) +const solOwners = ["CcccPbvfmpNE5q4JFS5qU3mszP8obUy5Fp2BQ6Hm9Mnp"] +module.exports.solana = { + tvl: solExports({ owners: solOwners, solOwners }) +} \ No newline at end of file From 19546a1732c36c02324fb813a0ba109dbfdb40a7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 5 Dec 2024 11:37:00 +0100 Subject: [PATCH 597/787] change default sol rpc address --- projects/helper/env.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/helper/env.js b/projects/helper/env.js index 5f22b5e188a1..7f7164448856 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -7,7 +7,8 @@ const DEFAULTS = { EVMOS_MULTICALL_CHUNK_SIZE: "3", // evmos reduced gas limit, this is a workaround to make multicall work STARKNET_RPC: 'https://starknet-mainnet.public.blastapi.io', COVALENT_KEY: 'ckey_72cd3b74b4a048c9bc671f7c5a6', - SOLANA_RPC: 'https://mainnet.helius-rpc.com/?api-key=0109717a-77b4-498a-bc3c-a0b31aa1b3bf', + // SOLANA_RPC: 'https://mainnet.helius-rpc.com/?api-key=0109717a-77b4-498a-bc3c-a0b31aa1b3bf', + SOLANA_RPC: "https://api.mainnet-beta.solana.com", ECLIPSE_RPC: 'https://eclipse.lgns.net', APTOS_RPC: 'https://fullnode.mainnet.aptoslabs.com', SUI_RPC: 'https://fullnode.mainnet.sui.io/', From e78b966fdbc2278256313d01dd175961cabd98ec Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Thu, 5 Dec 2024 10:40:35 +0000 Subject: [PATCH 598/787] add more addresses bitlayer bridge (#12566) --- projects/bitlayer-btc/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/bitlayer-btc/index.js b/projects/bitlayer-btc/index.js index 5a6957f6e997..c282ab582aa8 100644 --- a/projects/bitlayer-btc/index.js +++ b/projects/bitlayer-btc/index.js @@ -1,8 +1,18 @@ const { sumTokensExport } = require("../helper/sumTokens"); const { bitlayerBridge } = require("../helper/bitcoin-book"); +const ADDRESSES = require('../helper/coreAssets.json') module.exports = { bitcoin: { tvl: sumTokensExport({ owners: bitlayerBridge }) }, + ethereum: { + tvl: sumTokensExport({ + ownerTokens: [ + [[ADDRESSES.ethereum.USDT], "0x92221E8Bc4E1D9a3E5D1cC39A524E90Cd4bdF8b1",], //USDT + [[ADDRESSES.ethereum.USDT], "0x6bc2b644A0D124F1e5dDf5a9BDd922e65a961343",],//usdt + [[ADDRESSES.null],"0x0CA2a8900b8140E1e70dc96F32857732f5F67B31",], //eth + [[ADDRESSES.ethereum.WSTETH],"0x6ac1108461189F1569e1D4dEdc9940a0395d3423",]] //eth + }), + }, }; From 5a676917d2fe71c64e9518337514806433f65270 Mon Sep 17 00:00:00 2001 From: Efrain9502 <137243819+Efrain9502@users.noreply.github.com> Date: Thu, 5 Dec 2024 19:46:47 +0800 Subject: [PATCH 599/787] Add Echo LSD Adapter (#12569) --- projects/echo-lsd/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/echo-lsd/index.js diff --git a/projects/echo-lsd/index.js b/projects/echo-lsd/index.js new file mode 100644 index 000000000000..fb5940957aed --- /dev/null +++ b/projects/echo-lsd/index.js @@ -0,0 +1,14 @@ +const { function_view } = require("../helper/chain/aptos"); + +async function getTVL() { + const totalTVL = await function_view({ functionStr: "0xa0281660ff6ca6c1b68b55fcb9b213c2276f90ad007ad27fd003cf2f3478e96e::lsdmanage::total_staked_apt", }) + return { + aptos: +totalTVL / 1e8 + } +} + +module.exports = { + aptos: { + tvl: getTVL + }, +}; From b5bbe0ec8ee5a3e19c5bb5f3b43aad0528370cda Mon Sep 17 00:00:00 2001 From: Winson Cheng <83229800+0xKMG@users.noreply.github.com> Date: Thu, 5 Dec 2024 20:09:10 +0800 Subject: [PATCH 600/787] feat(Adapter): Add TVL adapter for Vectis protocol on Solana (#12564) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/vectis/helpers.js | 56 +++++++++++++ projects/vectis/index.js | 85 ++++++++++++++++++++ projects/vectis/spotMarkets.js | 140 +++++++++++++++++++++++++++++++++ 3 files changed, 281 insertions(+) create mode 100644 projects/vectis/helpers.js create mode 100644 projects/vectis/index.js create mode 100644 projects/vectis/spotMarkets.js diff --git a/projects/vectis/helpers.js b/projects/vectis/helpers.js new file mode 100644 index 000000000000..40ee00803cdf --- /dev/null +++ b/projects/vectis/helpers.js @@ -0,0 +1,56 @@ +function deserializeUserPositions(accountInfo) { + if (!accountInfo) { + throw new Error('User account not found'); + } + + const buffer = accountInfo.data; + + // Deserialize spot positions + const spotPositions = []; + let offset = 104; // Anchor discriminator (8) + Skip authority(32) + delegate(32) + name(32) + + for (let i = 0; i < 8; i++) { + const spotPosition = { + scaled_balance: buffer.readBigUInt64LE(offset), + market_index: buffer.readUInt16LE(offset + 32), + balance_type: buffer.readUInt8(offset + 34), + }; + + // Only push non-empty positions + if (spotPosition.scaled_balance > 0n) { + spotPositions.push(spotPosition); + } + offset += 40; // Size of SpotPosition struct + } + + // Deserialize perp positions + const perpPositions = []; + for (let i = 0; i < 8; i++) { + const lastCumulativeFundingRate = buffer.readBigInt64LE(offset); + const baseAssetAmount = buffer.readBigInt64LE(offset + 8); + const quoteAssetAmount = buffer.readBigInt64LE(offset + 16); + + // Skip empty positions + if (baseAssetAmount === 0n && quoteAssetAmount === 0n) { + offset += 96; + continue; + } + + const perpPosition = { + last_cumulative_funding_rate: lastCumulativeFundingRate, + base_asset_amount: baseAssetAmount, + quote_asset_amount: quoteAssetAmount, + market_index: buffer.readUInt16LE(offset + 92) + }; + + perpPositions.push(perpPosition); + offset += 96; // Size of PerpPosition struct + } + + return { + spotPositions, + perpPositions + }; +} + +module.exports = { deserializeUserPositions }; \ No newline at end of file diff --git a/projects/vectis/index.js b/projects/vectis/index.js new file mode 100644 index 000000000000..1e82e546f255 --- /dev/null +++ b/projects/vectis/index.js @@ -0,0 +1,85 @@ +const { PublicKey } = require("@solana/web3.js"); +const { getTokenMintFromMarketIndex, processSpotPosition, processPerpPosition, getPerpTokenMintFromMarketIndex, getVaultPublicKey } = require("./spotMarkets"); +const { deserializeUserPositions } = require("./helpers"); +const { getPerpMarketFundingRates } = require("./spotMarkets"); +const { getMultipleAccounts } = require('../helper/solana') + + +module.exports = { + timetravel: false, + doublecounted: true, + methodology: "Calculate sum of spot positions", + solana: { + tvl, + }, +}; + + +const vaultAddresses = [ + new PublicKey("9Zmn9v5A2YWUQj47bkEmcnc37ZsYe83rsRK8VV2j1UqX"), + new PublicKey("4KvPuh1wG8j1pLnZUC5CuqTm2a41PWNtik1NwpLoRquE") +]; +/** + * Vault Equity Calculation Formula: + * VaultEquity = NetSpotValue + UnrealizedPnL + * + * Where: + * 1. NetSpotValue = Σ(spotPosition.scaledBalance * spotMarketPrice * direction) + * - spotPosition.scaledBalance: The size of the spot position + * - spotMarketPrice: Current market price of the asset + * - direction: 1 for deposits (longs), -1 for borrows (shorts) + * + * 2. UnrealizedPnL = Σ(perpPosition.baseAssetAmount * oraclePrice + perpPosition.quoteAssetAmount + fundingPnL) + * For each perpetual position: + * - baseAssetAmount * oraclePrice: Current value of the base asset position (e.g., BTC, ETH, SOL) + * - quoteAssetAmount: Amount of quote currency (USDC) in the position + * - fundingPnL: (market.amm.cumulativeFundingRate - position.lastCumulativeFundingRate) * position.baseAssetAmount / FUNDING_RATE_PRECISION + * + */ +async function tvl(api) { + const accounts = await getMultipleAccounts(vaultAddresses) + const deserializedData = accounts.map(deserializeUserPositions) + const perpIndices = deserializedData.map(data => data.perpPositions.map(position => position.market_index)).flat() + const perpKeys = perpIndices.map(index => getVaultPublicKey('perp_market', index)) + const perpAccounts = await getMultipleAccounts(perpKeys) + const perpAccountMap = {} + perpIndices.forEach((v, i) => perpAccountMap[v] = perpAccounts[i]) + + + for (const { spotPositions, perpPositions } of deserializedData) { + // + // Process spot positions + if (spotPositions?.length) { + spotPositions.forEach(position => { + const tokenMint = getTokenMintFromMarketIndex(position.market_index); + const adjustedBalance = processSpotPosition(position); + + api.add(tokenMint, adjustedBalance); + }); + } + + // Process perp positions + if (perpPositions?.length) { + + perpPositions.map(async position => { + // Handle base asset + const baseTokenMint = getPerpTokenMintFromMarketIndex(position.market_index); + const { baseBalance, quoteBalance } = processPerpPosition(position); + api.add(baseTokenMint, baseBalance); + // + // Handle quote asset (always USDC) + const quoteTokenMint = getTokenMintFromMarketIndex(0); + // + api.add(quoteTokenMint, quoteBalance); + + const { cumulativeFundingRateLong, cumulativeFundingRateShort, } = getPerpMarketFundingRates(perpAccountMap[position.market_index]); + const currentCumulativeFundingRate = position.base_asset_amount > 0n ? cumulativeFundingRateLong : cumulativeFundingRateShort; + const difference = (currentCumulativeFundingRate - BigInt(position.last_cumulative_funding_rate)) / BigInt(10 ** 6); + const fundingRatePnl = (difference * (position.base_asset_amount) / BigInt(10 ** 6)); + + api.add(quoteTokenMint, fundingRatePnl); + }) + } + } +} + diff --git a/projects/vectis/spotMarkets.js b/projects/vectis/spotMarkets.js new file mode 100644 index 000000000000..2f73d714c383 --- /dev/null +++ b/projects/vectis/spotMarkets.js @@ -0,0 +1,140 @@ +const anchor = require('@coral-xyz/anchor'); +const { PublicKey } = require("@solana/web3.js"); +const DRIFT_PROGRAM_ID = new PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH') + +const SPOT_MARKETS = { + 0: { + name: 'USDC', + mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', + decimals: 6 + }, + 1: { + name: 'SOL', + mint: 'So11111111111111111111111111111111111111112', + decimals: 9 + }, + 19: { + name: 'JLP', + mint: '27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4', + decimals: 6 + }, + 28: { + name: 'USDS', + mint: 'USDSwr9ApdHk5bvJKMjzff41FfuX8bSxdKcR81vTwcA', + decimals: 6 + } +}; + +const PERP_MARKETS = { + 0: { + name: 'SOL-PERP', + mint: 'So11111111111111111111111111111111111111112', + baseDecimals: 9, + quoteDecimals: 6 + }, + 1: { + name: 'BTC-PERP', + mint: "3NZ9JMVBmGAqocybic2c7LQCJScmgsAZ6vQqTDzcqmJh", + baseDecimals: 8, + quoteDecimals: 6 + }, + 2: { + name: 'ETH-PERP', + mint: "7vfCXTUXx5WJV5JADk17DUJ4ksgau7utNKj4b963voxs", + baseDecimals: 8, + quoteDecimals: 6 + }, +}; + +function getTokenMintFromMarketIndex(marketIndex) { + if (!SPOT_MARKETS[marketIndex]) { + throw new Error(`Market index ${marketIndex} not found`); + } + return SPOT_MARKETS[marketIndex].mint; +} + +function getPerpTokenMintFromMarketIndex(marketIndex) { + if (!PERP_MARKETS[marketIndex]) { + throw new Error(`Perp market index ${marketIndex} not found`); + } + return PERP_MARKETS[marketIndex].mint; +} + +function getDecimalsByMarketIndex(marketIndex, isPerp = false) { + if (isPerp) { + if (!PERP_MARKETS[marketIndex]) { + throw new Error(`Perp market index ${marketIndex} not found`); + } + return PERP_MARKETS[marketIndex].baseDecimals; + } + + if (!SPOT_MARKETS[marketIndex]) { + throw new Error(`Spot market index ${marketIndex} not found`); + } + return SPOT_MARKETS[marketIndex].decimals; +} + +function processSpotPosition(position) { + const decimals = getDecimalsByMarketIndex(position.market_index); + const decimalAdjustment = 9 - decimals; + let balance = position.scaled_balance; + + // Apply decimal adjustment + if (decimalAdjustment > 0) { + balance /= BigInt(10 ** decimalAdjustment); + } + + // Apply sign based on balance_type + return position.balance_type === 1 ? -balance : balance; +} + +function processPerpPosition(position) { + + //if perp market 0, amount needs to mul by 10 + let baseBalance = position.market_index === 0 ? position.base_asset_amount : position.base_asset_amount / BigInt(10); + + let quoteBalance = position.quote_asset_amount; + + return { baseBalance, quoteBalance }; +} + + + +function getPerpMarketFundingRates(accountInfo) { + if (!accountInfo) { + throw new Error(`No account info found for market ${marketIndex}`); + } + let factorToPrecision = 1n; + + + const CUMULATIVE_FUNDING_OFFSET = 8 + 48 + 32 + 256 + (16 * 15) + 24; + + const cumulativeFundingRateLong = accountInfo.data.readBigInt64LE(CUMULATIVE_FUNDING_OFFSET); + const cumulativeFundingRateShort = accountInfo.data.readBigInt64LE(CUMULATIVE_FUNDING_OFFSET + 16); + + return { + cumulativeFundingRateLong, + cumulativeFundingRateShort, + factorToPrecision + }; +} + +module.exports = { + getTokenMintFromMarketIndex, + getDecimalsByMarketIndex, + processSpotPosition, + processPerpPosition, + SPOT_MARKETS, + PERP_MARKETS, + getPerpMarketFundingRates, + getPerpTokenMintFromMarketIndex, + getVaultPublicKey, +}; + +function getVaultPublicKey(seed, marketIndex) { + return PublicKey.findProgramAddressSync( + [ + Buffer.from(anchor.utils.bytes.utf8.encode(seed)), + new anchor.BN(marketIndex).toArrayLike(Buffer, 'le', 2), + ], DRIFT_PROGRAM_ID)[0] +} \ No newline at end of file From ba3ab8fcac28a621c80456ce150ce3f32764842a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:46:07 +0100 Subject: [PATCH 601/787] lint fix --- projects/vectis/spotMarkets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/vectis/spotMarkets.js b/projects/vectis/spotMarkets.js index 2f73d714c383..92bb6f31919e 100644 --- a/projects/vectis/spotMarkets.js +++ b/projects/vectis/spotMarkets.js @@ -102,7 +102,7 @@ function processPerpPosition(position) { function getPerpMarketFundingRates(accountInfo) { if (!accountInfo) { - throw new Error(`No account info found for market ${marketIndex}`); + throw new Error(`No account info found for market`); } let factorToPrecision = 1n; From 1ff6f81730ac7b21e3eac3f097ebb97047a0767e Mon Sep 17 00:00:00 2001 From: Jarekkkkk <86938582+Jarekkkkk@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:46:57 +0800 Subject: [PATCH 602/787] [Bucket] add new collateral - sbETH (#12571) --- bun.lockb | Bin 0 -> 148570 bytes projects/bucket-protocol/index.js | 4 ++-- projects/helper/coreAssets.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100755 bun.lockb diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..3105ecafcefd07843b61227bc3eb2b78fc5f908b GIT binary patch literal 148570 zcmeFac{r6_`v$y)kXfZ7WQ@vCWJog0ER-q9w9WGrQHdr)hEymO8p)7oGK3?DB&TIqD`Ox-bb$hoCz2l z;uPfVM-B-M@{#uP_w);J^7cn$2Qa`6^`?MafFATD5*wfcAmYEHq7nl|HzY_w5%JWa zJtx#NFjDvnsX7XPtWb{gxIRGI$J5s{gfs^2QTM*i1@faxPLBC&I{$P{vj~l zBoaONi|jf32L*coe z0?Ic-IU3hMD&n}^f*_%O;k+HxBfq-9Kahxa4s~;bX+ZKMlgUcU6-cw^QgrT6`vnWi z)zi;Cm>D{a`d>rs*9pj@e)?1v?E+)#=l=spdju)>gBP#h!yQNDaJ>{ft_mr&Yk zLivw4OHk(DQs5(hgQQ6$F+hIEqjkXs?I4uV6*43egd{o_5b1q`atJ}R6;)>pbdY~} zfXL2AIf|Wds7JclODT39Q`^0eC6S=3(GlX5c5Lz#JCC5f2$VbfZwf~9sS5HC`sgEo zsC^xkkJrN<$U{h@Hv^*hI|8Ehq)%<91c>4#2#EaFQ=;fE21I_o0Q;z4Ta`&9Q9vdY zO1mIH#G{9Lq+1JlG;jYY{#DQph9o)*5c!h=h}H`k5SC)JJ|OCcBp~VsHy|3fUI;eo z?^`uWJ8Q@z|Fc(7;&~17D9$GUk)MfxD9(X^$bUIN2u(CEAmY7+PM~}%AmZf%Lf4~x zv?$}S8}jfI?Mg*$K;-X!9g6>=kVo@I5fJSc=XELbHaH~6FVq*-0+b{BAHZoee;xxO zyZ;myv(;2T0g*o;Udgb6A=0JR+~ERU`M1EPM#LOq&~4uCNA zqP>EpBb;DMg#HFN1qGAWKsjpX87%GYOjf6`8b7ykX=bU zU1!;zzQ&J=r#T`21&z$wH-8k}?SaPskn`nOPy;_KlQ zEDb)oKZ88dx#UV|KOIESJaF>*(H&A~kmry4mVi*d2p5>Z2cRDL5ebOaTNU_$=2ame zil>`Xa7ZB72_lCEd%8uC%wQVNgz^R8B%24kRMkZ zJ#b7sddcFQWal8+oKViYySij9n6k}$@4&h@P~@p2og-t56o1!%{-GDqcB&4EZ{j|@ z$l^4v7*0a!0JZBU*vPfIej6h8IwzK{aC^fW_G)uMh(i64R)1oVgnr`r=p!DI(vEAt9p%>v z`r;x|BaocA+T%TczN{==TDn7%)7bU;6YnN&ob)r>wCLFKw&KZI;amB|vY%$%DI_mD zE`2rrl0tZKiQT@M?W#(0-eQ}L;DaPZFIZtc`mS-ZUw7t~a6e{lbjXFOJ7_YIegEV19W zEwX*slv_%YrE#O!cvhmMxyv$@6Oq%CmJJHayfh81+UO~zFUmjP>F8VX2H`GQhlLKp zF9nCL-YwN@Sw~Xe&>&}RDH-8dZm7S?)k^u?L`p+r=EtOR_Lql_XLI9z^NY|QGtX9d z-dbAvoa{MQgLNdVjB&8)^PbUxyHZ2+M^@-2??1U>{%E?^E=GZ+ylV9?#1xnY1K0XCl<`HD##-8-N24@Ns*GBRY!-^zcL zU2SM=>ot|Hb~@?@&3wLIjvuwQJIC{-F}81Df{|=hQnsAADNy!O@0e?8^ZjKHI8^+2 zW*ZqCZ_0=`=5^N-$Bo5*<&D?ohbnMB&(1uK`}x_xS8s}+Rgc}btvAp~l-yjKyklMH zq=k^qCu@r=(&XDOw`@Fn!lpTC6r|@Lz8M@g#vC0sc;DJk@tfSCmdUi*YyTloQI54OYuCpGu|>%Hm+8q zu;F5c=*d02cNBs<#~$q;meRRrD?S;awVQFDWS44JSMAWZlgV@{e3{nkxO?Ic6=OS< zx8v%z7);*2))ZKO#rXNUzA#_1hb)iswq`eV=4H&Q%DcU`3YG;PIPZS(lC$sPeB9rO zaTD`v1N|IHu_T3FzFRjwBy~u=zLPcX7+iPq9Ct+Y!yp$u@sH-Mh3kEtJj~O3;@R@q zO?n)Z#>V!S7{tZz?B5)n8zE~Q9lLR$$iK=vrTgfx z*+@NSZGKXr(3g#-SGKatzn5C2IdM^0n~v_o2N8w_>GIyI+izrBZt7GmUNj`_>fT>? z`sCTs0-4?K^)05KI<__M_71Tq=Yw0O9artpG%4F2U6rU^GDGF=%CZCEkHlLoXBCAk zaqOElLuk4El9UyAJ&et)?|-_ZCtcj~6IWo~_t3g%wVs0Uz6^CNfLie_MBHDdc$7ZiT;E)x6=XFW=rl9iWf_72JPOr zmdEK@)x^hnk29I?72JEC)g!NYOWtjt%=dqa|6POi$JnLg2S3!U*&k+K;jr~M-#ORt z5jqWWeam{M2Xo$Za$Zi^cX}dev|p=Ci{WfxpZ_5qiQ!!LrXzLJpPV1Q=5V68S^A2A ztl&ZwpBlMc%l-McE^Rk%UHVY1j1<&9Z|}Pcow>#9=a|;93|hYwux{I?R+JE<5LWN} zd2J&XyW>ph*Y=D7%MN^Sm*U#2w?$HIiHGP5rR{s(sUB)w$tZQt?9>@yr$@`G3znL0 zYv_ErRk>PVSkfiEa@B+ir*_ui);!bp@5UMxYgC^J*3s|iX&F>CdCs*gp^tnb*2*k1 zDZ005(x@SB&R2!7yGxQ9)NMzDUmYwazuF&^*|;iuU#Y}D#pUGfS9;Cq87j%8hA9Vn zviK$VPe#kQ7`eFaQ=9g9V#D({7iaL$8TpcCwBA%?sUd4lgtFJfIdC#Nbl!;;Wa-e` zGC1wvi^I1|uAR?FJtcXx@1N}8b&l7gp@mcnTXTl>4jV-`?wd~>nr@VTFwrR1yumiw z|AoJLi>HzIY}tKr(F5UO_xBpd@x5<&#G+_pBFk1U(qW!%E+Skx>!sNX_3VcqlU>WR zpS@#JWABMSu~N<^^5gTF+X^eUCYLq~aqx-g_NmoZX7!iPQ=2hOktt$E1dLOcdga#7 z++^=bh1;2q1}>~3aqAvkSsNW$%ys6|x`(}sd4!BM3yAcJ*06|Nv7^iC())NUU_qGS zxu98wHOdF2_X}U=X)JBrwol8wKwO?#+{D0meSG+paV5qT24^3N-WK1X|3>4o#<4p_ zq{{KxTqPBoll?M;ru8|P4-W^}Ru3~~JsFa0+#AI)XIgu>wfTLM4euL!{XVOFGV!wD zx8l=p6M9$LnDj7#^Yih7Y124|+pVrWxiKr@QQx}e`jeY>xV?}u3tc|rNbjQ^O#Sk* zoXpNbsim)9Tij^uB%kuCvz7ZeBk^Lg%+<>>TFWHw*7B&1Z#3T5baYpR_L&KeQyecm zIruJ^2d|Ernd9uxd)msp$<&Fftf516CDYD`-Mg0gl#bqN@o;aD+8Dj5*Nrpp(`KLX zB%_UP)_aHfY)y6Rn_geoy3siB<~gm*jBuwJby*MZEQ|{K%6;hdoVh*s-DjU%a&54$ z^*-av1B!kbMQoD;B4ZyzW@q|J2|DNRcQ$Lw?zvxdQ7C`j%~Y1|o#)PmFM7%!Ra58p zKz@9Hy;PFyt+szp;JwEUr{?H-@mB6x_Od7<)w(b6W5#}sy8D-H<{r)zyK0hldd%sX zaQ*6xdE-er=hsbaX;~M)PD)R@_4@Fdtv;2HOG*oxeUm;OH+!#lW{LG9OP<#q8nb&c zR#Y=@neob6Ks`J0%iZAW$##pCEG_-p<&1glJ9V$SxZGYi8kF|fqnzEQ>z1kPwcL5P zuFrA~6jRe+`=eYZ`gWs_4#>1Mzu3VnW~o@ex$l?u3=c8;XOIiy&E{ibl0jMSYm&h&E&q_g|||> znWT=I96x_rRY>1q^FBkP1lRo~m5&;GRxCAI%eTF!K+QBDLSW~$m81ek*y|3z?S;%8Kvd-2rC+eG1yayfJ@BT@e zMkTv|&`P*}W`sOF^+k&=<{tyT8SoJY`2^1zG$qU*29gTZK0J5-@PQTq%=d;j%D`u! zl8_IyB+Ne!Z{&cF^0ac1KIY$pH`-J_DxYfqc_HZfz(=v4O2YO-fT&63PX_^bcB3g_ z{srKp@ke?jsxcZsr^6g|5b2U5&TE7 zqjl_246y&-fxn76e!s(4gGIA~%Kx45+XQ^%Kl0~y>{kIFt$&z?H1B=H{xia&#r`v+ z3K|oRpE`k$<_@iW!2Af{>-~ZMPl1o-FPs(q__T7W_UAySQUCGUohsi8_;4itbNoc7 z7{AlN$LmjlMlNcG+@L?IDbHXXl-xT0W10UIi&tay_ZwJ0E@X^{q39>XL z+tVh%@X`9^fd+7H{9_FN-uA!cG5=4mKYx1tO9lVY{R>*ZXzcMi z{%<}L%dr35z=wU~$NWQcnAU{(+%W02fRA~99|v6icf@>4;G^+J^{^GwoG?EF_@>nU zBQh@kl@MJr9VmWy|EF~y!uHnzAMHPA{i3p|+D`*Mir??@>w%B% zACTSOvHunL8o)>W#v1VUmkIY@6&4-xA92z6<8kw8ee6Hdp(Ww|mjWMMKhXR^WmC2P4*1Ldz`iIi<^BuVhEPs<|8W4mJlMy3 z|5VpcD)7;m}l(Y9DFR>Ib&J7WjDmqu5WCp9Fj@ zs(r+r>iD$+Uzy6Mm5XAC{hte82GOVTQ8}#%^BsY&1AH|0zhl1`_-Ov1z9Y@4#%~Dt zOMs8L*sovp1Gk$8i^h=ZKjKW)z6i`2)a5*Kd?ZdpIutdw>6)$L;t8Df=Jp|5WW;03YrDzsuhT zeAIvJ55~Xy`}aI{nv!;FA%2ef5?Bde;^H766U)CUk&V|JhDAi`#Hcz`zPYldhd$-!}bS(PrUxp zItMX-j>v!Be<5vJ66Tu#AMGC~Zpijjv2A%YP+- z+jRne1=T*Su|wLJ&m%=5t)cRfee|LwVZJl)wWxerc(@JbR}$>wI$99(MHf+?f2Y!S zq>uT5z}F-6pH>~rZv{Sj{-BkI`-b@u5pD_W(Y&kH&7Q^S2%NRs{cP?FY86 z1&bG*KhVm2>5HM_EFhX`!55BM>sD z!zUwx|7^67p$+Dn10U~yh&omObAXT6&+p7%j-~&(ex_>Q9{7JUf6IZ7*U#_tp93zQ ze-b|j;5$;s5044*<5vl{y$XEd{xj9}BMFCZc>Vm!Cb1sdj|M*Z59aT4;G^ePq{m7$ z@Qe4@J|7%j*%9pjg7&i-^Fx5|_y_#^z&9uGr@DT{q4ThWetv&})-{CvUk7|=g8iwE z|0UoPpFgL%{zifSC+lZ5JUrs{gZhs9^>d*9;SFw=4ty;_|EKEzL*NtdAF%E}nEhFd z+j+o&uPed+&j!DEgZa(C$NT3mDF0E7`66(5iLYO%!BnsRIly-#_&-(t0+m0DUo7y^ z^DCOSxKIDl(SOL`wr#*i&u?hlop9klaEQgYDF-|}p!xs1_6>or1$?AO>)bi#nce3*hi{71HNzi73u z2!m%pwf{TgzYX~7seCtDjT8KQ1bnAIu&)Y}*X$4M#{-{C<@^1H|Mal<^ns7oJ+0Rs zG&b0j5%Aajf&I(C$Jb9~EQ$>LBH^Yi>VMro|IYY%0DlA3e;+LR3)`p~H?0Rg_WyV0 zAFl?9Wc>&BeSz=)2mHst$K&@q{x8-1%l_~1vw@GFe|{(a-+}M@2mRlwMIu26etZAF z3VioJurIFtXZ%FqyHM@_&iPxF4v7>@<@@4EP5O1hP33ecpTD5J`*-Yb0zO;wH@%sNA{|^Bl`H$>kO(?jXLl=JAzB=4I zc~bdk|HbRzS91{0zcax9lm4^7;V0g|e&_zh2l&|j@A!Wk_~`uc|F7$39vmKOK>yKr z3&Lxv;~xloxP|*|elhUT^9z{%E&GKqc<>1QNl()+iB+r^nsK7T{&7xjIr z{l5Twe13uKO_k3Gok!1~h=+Wbjznlk*ndsn%K;x<`%uE=l-xi6#_a-uuS2!}Tm1*V z4AnmF!#`X7s|MTe2R`aQGgRR*_^Z`Fzr%b)^ zl?LW#{*6CX`yIfCM~I*HQ6FeY*gh{zKBE6<4bYM>e=YFQ^%HT>7~nXd{J$m4uLC{| zVKi!s`aV_rI&kr`r1l@ho)Zbtkg)x9;G@sa@Z6cI|HHtCBg`N32hJgAPS}1uIFIHp zBH}VyL~vU=I6OssyzZy!zZ#W~?^~zJkD&6A&uHwXI)C32_-OoSO}PIu@bHQEKU6kV z|Gj{Z_CI77*`F%^5b)s^DjNHP#{ud6Tf*)8fDcE=(Wou5O=}D=e=Z#UqWO!ssBEhC zoq?}M<10IXMhh!h(Fg4_6xQ7w}jih13tR{ME;}KRQInnu=(KigX|#t`yqiF_~Mqw!;h!nvq|#)SPp3w(5bf@rhgh09U?-x6;30{AF? zc;CV0|HegixSbdro}>ATuRp)y;d;yu06wx$>$v@$Uqt0&|8f1V5ZiwPd=&rR^ZpXyq@3!*g`~ z#QnxdD?bAG$o}uHpFH5B{$sniU$olq20j{p%%gQ4;`Xy0D12-m&jVWRn*blpf6V_C z57%S+3BX73Lw=(p zY9HsP%D+hEBimEi1F*dhz(?yBacQ-U`h@w*94Ye`#SP7!sm9+Q_~`iy*+yees}I)jT_d${Q1t5^^5wC(p1;~cHqNTxT3KhMvB@$|Hkb~|Hl7k#(&me{&V1?^@sES z+3KHjxV^H=e}4bwpBevIgZZ0*kK<1VP0)*$g!$)zkK%{s58~qTUuocW6TsI2KAyk7 z;^BJC*L0=$kL*t+VSWVg(f*J4^ivSP{5s%k0Uzh58b2;FW&gslr?ns0o-y!c!9JSz z=)0#=o&R~jN7rv;7rmzHe>d>)^&7=+s{Gk*l>Gy!zh$2ce7J@B5r0~3BU?CrwZMlX zz-Yw9WvKpF3Ag2P|Lgn^m7y~{S`y|v10S8ABKusl5UFi2{{ZmO^&j_rs`IA___~Dn zG1BM*w!g%KMAGH}Yc8b4%vs`KYG@bUc*;!oB8ajJbZ?zE0Q zH2t|&O}#1p)9N?kqJ-m}1bnSO82^XBNB2)t+53q0XZldSKZpFEfhuTB*nfNAqwmim z{#0Us`HjF=0X|wcXzZrCex~_S_76OFrn>)G0w2W>O#irk(P|&HpHF?^_ZXSrjVQ`M z`frH(F8-sIf+)WbUI?YAc)ZQD2u(^9WI1nwm$5@-oys5m7l@tAC{bhG_iY zTJR$wL~{!E_8)pmKT3am*7_q4*W4fJzag>%WBTLoAvFMz|61@u<=XH<2_eespbVsc zL)1?9N2~vi$WMK0JwnvpfQp9H@_$3bH=(vei1P4E@gort%`F>hIYLf&!R6~mLWt%L zOy?hoh-^?24lfjk%~Xs6MCrdF@_);ZS_-24R%-sgA*$a7FND$XLMi&kZwjLF?bJL% zi?!Y?$B1gUxS{|6$z z2q2n23#s`<)cVDMNKcwtzl>VHoLa9)&8q;Sc&Y)S_UcsB1VsJS2SoierIxRumRnQv zwt&bF^glQvz5^8<0g+#1DtZCJ56PRF4?r162+`X>Dh2_vKt2)`QW5EIg*?LTfXGfP zHNOiG`5#ZkBx-#MApDS0;TPiVr(!xFYJZrTKMIKSvZ?vw)ci>*o(6;;(iv(#9}wvk z0;2J_KrO!ni27Rzi1cfySO`wWCw^6LR23E zi1c;>BArA)_#q`xF$ECuQmMF)ifMqT{UJcquWUdGz#D+beiI<_rvnh#e+r2FeFliy zzXpUK(iwLY1ODb#jQ^}qXDh=DQ+1SBG&c>eGH_D5KL-0%MH{`P@xS|9N*vIAFS>tlq~2#CL~s9he@lr&G&L?n{D0^Ec9L@v4aEOt zf*Wc&5=ECN&2Ta_tFXZM?i&rGL6cUxYK9GIxAJzYnuNQXj#*sWdSZR&m09^CIo~+Q zc}Ffhxtq$#7W&XS(4OwRYy7f^?6!sLK@97ndv=@{77FBc3j{fouxT|sex!Polr$dy z`Mr^nLsikfI8pVJ9RbO8x896vFp7RD{ge@?pg$N`BBnomnM<7gJ;UsIhqVd1)Uf}M zW~kN~_UKUC)3rMEJooJ_Umq#83ax+I;5EV!Lcc8cGRK)le>$C+=^nAQXI_`&lGjzd z)b`R9KkI%m=d74XaM&Ak_JjRJ&qz2iB$;g0n9P(YNQ&=e9;4&c{4_in5T?$t;$8a-@3J1f^SCvU`}VuDQm&FwuijO9K6rjP@5EkB1G$Xzb-@ucO1^zNcp!96?NGOg z*5S7nMSB#>3A*Un7AFRV3E5-)dd}aj$G!4rJh;iadOxCgV|nseoso$W1N8>80W z?RnzSQO~SXb`4Ql7GlpArC)Y^YCd8bYp~bV2Av7vIH0o>oEY-QrE8A#zb;rZC%ox~ zUgV?f?8N2*b-A914VPO}`{o@cDeww>(v+##>Oa&mxUgNSl||vrsvGm9rtc8Gm(TgR zhM`r8sBe6?&$wOJcvQ;QXgNIKSo zS;pb*2hMV>5D5HmxY%~=V!Tvm0lIg={-QO96GQNJ^DPF|p_h2wFRW_!Dx)WzpH+S7 zX!qfn>?*b2ELxsEIO#2Nk!9cZxbqM13#=E3=_n58Dt*1IrSrDV-s8)LMhLnyuqYry zNsh{JWZn(a;>Tf1F9$}Mrt{rBzpqKRZDfCm>$e3mSKpUv(cR%L-ow7lL^Dpt^+0}$ zlz;2O%II{S{@pT%I?V{W=qwH=hR&3QJ?f;@`TdLQPQ8zBW7Xg0+qjJ*_v?k3-Sdtz z--D=vJnEW+4vZdtZ)_Jq&_&NSI58-NCZ2zNU@*_J zN8_yhgSuqF=`&e8u19_;x+=la^ySo*o@=wp9$Z;))7oWatIehdgKx^MtvBvCB(OXx z;&rFHV=+OO9g6}oEG;T;%nb0(8oQgT;?b8X3EuG+H!ei zqK%%s%_ftZc`3175iVqojmy}VzWCVqW|E(v%kdw&Ybv=Iq~0{u1^JFiIkEF9bAM`- z*!FaMw7t<(Q$Kx%uw{ll?bM?F|`QZ+Cj%YexTPBc5kmSQL<9`sE2;;fw1nxi!UVyEbI39rF&n{H!{eF(;$C zB5vF5F7>!)-uX8pJy(BWt`wVAbRqlX;6$e79jg_ur`=2rsW&0$qO(Mt{xALI!J>c+ zOaJfUJCmqu5_>4?_6R?{UP)S5;M&fWGe-K4Ek@Q^Dt{+Bj+{6j~N|5og>%u6kZ%o)XJCamaf#^;J3Wnnd{Ya zg6>?Ru9~+*#Jh3{LxKFBqiU+Pu40M2^pP{H#rAe{3^!d8HQT=4mDhZk$sHAG!RDd4 zm)!#6nWp*4vcOFrf$5HdtN1NS~b8a-=Z>-?-;y4hm-I>)rcA=+O z%WRkE<~*<2I{ZD^rkZ7*p@F7yUfTP=#4A1!8UCvJ^oq^80^)U(kEr`-GDp)Uu4=JJ zR8iRgi*vrHbG+hs1!LZ;ITgosEN^Zr(pCLlabeM64`tpJ)iTrdn;A5F>TG$&HD^8J zSocs9ea3>%c4JmQy$CEXZT0-=n%uepBDSk5D%I0#T$&*2TrX_RI<6S*+?^gHv5p)Hx zC?JEY;wqodS8glRe~#BGU{uR0oE06Np{B-lLCu8hKE+Djp|Dfy<;oGOv69~G3MBQ`a%2yn^o!1Z9WCdL3zTWyZcc-QE%(C}%Whw?f z+RQ?3<_ULV%DGghb7}M?FRa<)V|IaiIeA6Qg*DQrEyL$tCFlwfb!XFuFP$?i-rF-& zv!3Cat^?0Lj^c|cq{Y*1Q>TBFon@-YWd2Yp(qa}v?9PY5ALTQy&yCuz>FA*qRQrywC*-;+8uI;p3gwj%it}szoWuQuVtF)fL+&q&TH)ekwzo&kf(Xr~H zfv2dQp4s8^^F-TZ?4vdw7#Q0bJ zvNN^M)widKC(U-hc+&Wob{~tNm#LY`>om(1iwORT5p{Ro4V(YQ@%#KOZ?04cv>r@* zqQ>}Pk&{=@_2lnw>vC)Qp3*HjR?sCMRnN}kF|bJWhWTS*fe*QIwYs&ZXIsUzjS+Ok ziMp>s7^^~_`HpkA_QfwK(Yrr#tFyJWbXTbqOV}&5xkf1^dCpHaoas_KmeV)gAtfvI z%(|7QK6lYweDgizsm`~n^9Z`=voD+&+)v9lmtU@EXi;4fX=0k*-F2V5en7&#Z_NKyAn?tRuMgT!`pmHsEMNBV?&-CH`69afr3XHm z6Z~C7)a8G2h4<9SbC1uiI>RuxKQb#ZG;;I+*Zu50TJkq#F6}(YRzB)pvxhmcN#)Tz zOXf4K)1xZrT~ZaTJI4=SO>#QXPS8c)3&M#(X-KR**)Zk;SG&~rxRH+YpA<|~9MsEi zHYMI+aGF-f;*$U6SpNQ=76GpN?Sdf#B|0@5Bgr{Ct5jYUDF%8gqR+1JzP<#D0{&m# z??@AM{}1mc@%NpOJj2IRVGAZ+I6H+puxD}j3q4@mwe8*gbuZUEwiMaoAjUu1+Aqxc z(q8)l7sJ-sCYRE`SFA8eO&zgi-5)d@J5anMjSvS}qQ4@g-5XfNI(bJc7w9oOdyy&p z*>Ja8UYhSy9Sv8NgHOdK%c^Hz{B-*45*gBiofW(8EcF!W$a}qQ_2q17F5&D!bnbxT zD@WAzp7&u*?ZSQYW7mu))mm&{Y9VjHc5(C45B1#VJ7!e2KT55cVI7s&<73h*yk(xw z8vXb=-z8VXcO0XarQ@lHp3yI$vqa(37h8;6EIq4k zZXQ(&5?@|^pj3maP@+)ZuQ=qvth|nuPabk5xbKeI7xsI10xy2%6!_BG~zcMKFD}CqCTK+hAcrBzFYn?F$kSs`+C7@lf2NFqnkbQ z`Mke(T5|J|o{Kbg4O)NEm&s+?pz2jGMKXSMo!j*jJZdI{O~D{58hG%g_09%m#uk`o0}b3=tvzLd(xPj`%UfYBsHwaALj@-@f=_ z0smF|mdAbvc!SOTZmbcVwY>GiEy>8J?Z+C{k9>cd^oV0)O3I4t$0t~c*JJ$sJ*3T` z8Ome7w{>01Q?Xiw5I*a|Gs{ye@0^jmwy~w_W!#XGc=>r%kF$KKX+ifgqaI1@iR_SH z!Y0}LHL2g|LSIeKE3`A9cJ}@oo7SY24(ki1@6<{r zmoLy8o+}(8t8)L-2OH+~114>+s(szmI~MUi?frV{)9F0oISl%I6(TQc z=RVDRh`xh`*BkoI7ETPDZ=R`e9j5OXztEn#SjUb<;Kr)Skbq|U;#G6rn;Myj)8AK- z>%S5&rng4%)y)gDo~>t=_S8AkK3i93dlfl+r!zrU6^jBga4!`*Ae{T6n``OeT!(0N z?X!=M&0*D;^bZ^0IrVf|!ifWX(pmdQUwxg+u&bYMzHBKU%g6ht!+H)}dOq23%Yg4X zL3brlx7KCz!mvx~i>-@hRl9X-U3ap_g;@L{+K+J71}}_kS+V zyxz9Jroc|F?G|gvtf6hbUTO`knkfpU`_6jQ1iZL3b0s+{l75h&3xCV%Fv2-AM^@Gd4%xx{Q+g`=6>@m&s>3rCIZr<6^;_e~d_rZ5ha-=Tc zOgP?M`YwY_iHD#I-?9Ih7*bt}mOQEI?@LRoJL^1>Uo&wqh(R=mD|gPpPa3Mv($pCa zktRJInFD)wN?s#{Ic+?0XSA?7C@aNahJsQ{1ZO51i#i2DqOR zpEos$x>+C3(dSiV3Ut3VeUN&LeRPGT?Z?xzw!Hq3qPWT^*PVyGxb+s3|K)phT-)?Z zj@8@o^+k@5HpjUX8s1&?eY+u<;I9@@S469GZ$WZ(uH=a9y%3SlvCQ(DY;;?^Uoal( zm*>2@Qg`5``OFpbMz_mwHKiU*a9*QSa!a77eBri>hbDxgJGZ?h=xP&nKRsCTkSTG! z>@FM29fu#gAIrJMaYTHGq&@5z)qFu>;oD8xX}YbC=JQ+`NmZG%*3x<7ww@C*hqlPl z@2q~>QWm+HpsPdFeb2g^G3DH%KqsfR!LG$Jx=xGDm_3xp-|V&84weO+a)09D(SJod z{K5&g60KY2cFPw>zjfPKc8cl!@x@FxJ{J?$u`W?}buQUoVAGu|DbKe?Z9K7z71<%$uC)Ht8SHhaI8fBR6sC&p{vKt`l96I&Vs=|1Z;kNo)D66vbIv@^M~9$mMAV(m<*(#I zchdEd{w6Ek>aN-c2JLP~cd{qk&wH98B_yr6^R6Q=otlrP4qt#l%H8G9=5Ri4Uf!~t zA>qYP^`Z)S;(e4cQI~H~(5m`7?Rlf#8XV-u1UtXA9p|vpTNoH8RuQmV z;=|R-&O${Ny)tr+edMW)hj;3wF*WA~UVlsZjs)fNA@n_SoETVNZZ_|l%V8qE^hLvR zL7vXXhc&J*jHW-WI-O2S;ZFPn+rAiMb?s%>J+n_Ns|`xOmdW$(rd`HP*=td~>}Pkx z5uamCu_z$J{FECF>2~#fvh}TjmA+a2oyuiKBO)e!qpx~58t*EM%d}K{7RJftqg1@} zY3+NakndlUlXoxYW^mX8W<*`xUb;nELXnAw`YXlNc7Kl-} zsm7wYU;bm9h~51)Rr|Pnm5=Uf91(nf*Cw+yY_>yQ!qGRoLqqb%&JuLj5Ow(uxMsA- z&hc)w(ElLw!HsjPL4BX;k|iwT^hFMB2!@QQ{fepbP1T{WB6N_pNU~xV{7Rq*7|dd!6vfYrdt}n zuf0hYx~TnViThh$%RTIm!xF5%ZBFq@cH7G@IzImC{08smnMYrBBoh!?Oi53Kc)GzUuHY8s1c={N-YA_Rf<|)9(}KFZ|8g&&06!Y^utH z5oe1G`;535MjHJ~n%Z}f79V%qdQGAFb6TwEExY>h89^cTW3fAJjwV%Hm{;d2?eZ+APxjgv|HaLF+QZhnN3Mz~Uw_;fA;e;J zFHe>Gg>7MhVSCnJ>$QoRUqfPd!aXJVMG9CPBa?==bA`FiUE z%Wei{)ahDGJN7t#GNnFMWy{NvrOj&Y9&@CXE^-Xs>XZM(s;{V8@~GKgRyb#b-gz)z znV@U)Qx*ITZO-4J+HqfI#epz;tL(hRy}nCl%?^oW9~|jU%r3Bv#xYEtL)*Ieep44;a4l@ z-+y>pcsWJluxeEHy?rY5#WKee4DUvxyu+_Ba^NJzEd)&=3^@lQC zRgTfST1&94t0bJ4z(1q%Gcla@s=o9&=W74)iPZ@Q9Ig!J#7?rFxn?)EBT8%kUfvIW z&9-r@_csX3B$v^>@fizAo^e0aAVk4ftywO=gM6locn)s=Qx)Rdc6e)P(ARYn>k}9= zyBEm9ZVJT~lwiaBGFWHg(?O<+Bk#+XN zJr%b`nYZ1}2=dH7xNYsbjb1hSagl^^b0F&SI*e5%_>io=vzjKG$Zl}uQ;p{>`m9>b z)_UUGo83EKlnu!q3a`(bWjo6=#O~euRR%ZKb0rIGSrXuKd8zyT=ye3$jYQpZo}3NO zU6wtJ9;p8?9IZTyTW86dO!pm^9Zv632`C@v2!{W9~t9?R$&G3p2_R+o}(R z>eN+LEMKX&yNjUfNYtHaA)y>i|De@&_8gb+JL;zu`iy62wbF0rXNz7cBUBSFz~Z>L z`N(zKN5b!}m4sU=Mj5!)%?+D&*604rYduwi#Lsb@h`QDm2JNnG7C8+C&vITq={29j zmS=HbZuJxI2-&*~r@6Zr+|4GfMW61tO_poRx@Y{Ad52`-;;u!9yvrDuX4-EP+?T!NG!UrHQLKrou|Qf zW2xlYpjzF-UJYqq9+*22;^0EmRrFpt&^}mldjE$HwPJaFuNnKe!@^nYY^;}xvTd{Q zZ+hV#DxSPx`8?6M^vQ&|qm^7i!}=Rne@Zm55AJwJ*VsqUbtUSC#`OvcER={9I;!V0 z;CX6??Lv~Px2(#Yip+^V%xANbUNq?-Nfr%KNqEZTFz{HNuSA2&TVJua-&x4S!spzB7|En4F|-XnVIyTvwJ@m2C0XR#jSSe8(`jAh|? z;Kdyy!h$(Rvh2B@O><*Ev!JTkhF9*H*IKsYJF;58N{4ib>{p=tZ4Bjp$DOFV)Y_4h zo6ysxQ)&>kcSu<3WRr%~SKW@Tws1w6rM8={^@J8Yi!E?A>XD&4RJZ8EnK|K?<)1ht z+z$%V+{4yzrib9K2T`|eZA$B-?J7k&7wzWwJhyQ_nO9MhpuU+;`J|<%HqXX)9X&#ZFI>gTyE_6DXLeTXh z>fX4tKcH84w2w>5WxK_>TjJ;C9)9)IwLi>j&S`b=?*6A*ewSkG%2eJSoqnlvb>Nb5o$dYmT=rQ?KuHFiR!=vFuJdESSp`;`8uW&dZ3UiH4< z{rlXxLj8hnZ^-(5gN1H&e@{R8}vWyU4KcX&4Z>dms|6I$L6NR~J*?31U_^pZKzQ1m* zq~KR2ddA@ZOAd{}LiL7IJvR$PLNvpzx-Q>iP!f86Q1$u==RA2i;^*D|MBPP`?u%?T zH}Z8Cc)trja`dJ2QC&k_wKx znsZIAl9~O)`5Qpg-AZDAvNU@4Gmm=BOaXlvE6KRN4a^`2J!hFh9B<`;t)vG9r}DJJy>H-`!S`Hm&9Hjd;VzT zq+R;kYrfgeo9IuLd7pAWa8J2|{g`#ir;mm{l51Zr?OJJkSa71ZY1Vr7`QZ&Q1l=H_ zZu)|Gt=h{HRc2SK^Qt^|zbyJzYK?V3(|G#+180VUSW8FEW?Y|4>yI4K*S(OlEcQwN z*8QLNp60yt*~dO)U(Y_`z8*}}TaDv`=w6*@O7orWy-w#Z#M$BE}$Aw*rp;uz&UbsZZ%o0T8S z>a9CgqHuQGdQIgyOKey6R1Zd5mkX{wH}1kZ)ceNhm4%~P-s3(yQ*jOfxkV4m-}mG* z6Q8?7iMr>fUy=*oa-M;`>$SnS)x573Ew#ZVmw7blGY3~68;JTiyeCEH(Y*eW<54AV zS?&a%np+xnI@v7pfcnJ;$AVfO5%1T-h`N_0LT(Hy%xG?1875>iBi`t+oYA_aRsF-G zn>pq@dvMY~Fzh-xHb3n2uG0E63&Vmr{$1&EHcNN)(`|h8(P2+n6=B>q5p@q)`51F< zsEd9%VSe#Ue)-wf^&(RI&vg@qT=%@SFwtpkY~xn<2~WLxKp{rek^5@F)hC|T8Eqvl zd-v8QtGJ6N5p=_ex}AQrD~|8Jo}6x49!YYZue`eS#5+l=3)!9fZ$0?_q)uy}bbOJU zuE3^Omv8ocoY33stNe8rd8Eiqe*M+$S?5lO6Lcepx)b8n%>N<2;mF>Npg!=D70KvU3Do{P*EVp5fKWRjXMATR7TR zx4gXdKCPin%4VBx;SG@u5nil`pEn(7Wl-?CaOsVn$_W3W!wKO6AzfC2y<%fe*)0-` zy7J>K3A$T|{tnm%Uny&H^=*7ue0%Kz@o;^YJ4GHh=-zvXt2OR?8&DyeW3^kN_|41N zHwVW%)XxSF2?de{S053rz7VO~?P`hsCKsQd;lEG+;V*sn1}CLGOvgR!{gdkzq?i|6 zKl1L)`iJxH<-R>NWXb*3@yL_R*#p~iW>!gjtE(iPxmL`oT7 zi@bX<&-~8zZ58}quPJmo>}K1TO3;nQqJRvQh64uMrTvb&ceMnTu)LhcQxY2zq2S5C z825%g z(}ogGp~{u-q9w(oHcjS~knFVh4&F8uK6AW5DLrphv!UPkOc4oYft7ZPo>Zsk<*(%P zn|%3pOL1_d)krU9YXS{&BG-p!x!&PI6rJ@o2^`^oSgqZ)_7(ufE`Grz*>H z`+!n~1%2^rYW8Zc*(-PKiSQT6wpl$^7w#yxF}G{%ZTBzTCw$j`Is42G+Y1EU9Yo#2 z)oC4W?|3(p9hE9OQq%p42NJla3ykUVcFdd;Ccq)v=%KAIe`=poOk-nPWw&;)^rlqN zeU+XU1-{qiP0%Z(5OjAEbv?9q&zNyV*J-`_bNW@I1DE`Eh=t!_ebE-vaD~2p(`>Pv zyeB%(wZrr7jHa>5ijCG-HGJ)6n;Q@uI?1}N={IEYpWdjhaO_NHR^b8%ye*ZCQ|GJf}R!>ND}Y zWH(WFR>F7Rx%&IrwAxJH$*R2rt*%~VjOvk+Y$Y!4K{)y#tE4R55AM7eS7)sc zJT5Hr_$B%`2=M+8Pt^TvP!hAmaYglenfj#xTDyc+H!olBAZC6dbDpoG`AddIk67Ui zr&T_%&Nz5@=GmxJ)}0$ZRqO6MkiV30>>6~o46|1I|n{ackynoF=*rZ@)#%|`Kv`vfhZ`U+6 zX(vZ+V0PK@EvS9NC8=TJ{mx#ZZpgTYzz)UQ+JS8H)5m2ZC528xt1mYhYJ}cvj(E-) zzi)Y&cD`)3vXa@2p;J%J_Elc1nk3ZM7x)Pfg+!?AI- zwiy>@A9e~mk@$Jl=rZql4Fb&5$M+w*WZ2zV`cU}g8-C?bx}6+mQu|duzRi%|95A3X zql0*zPbTV;>{sntvHrpusXJ-fJ1^hnPt$l}d}i65w+;GBVmuAzB&=#uvpw*7L*)60 z(G~hS2?BdtjvnIE5MHSUbgZq8XSzBCdThcLMTcBP2ZDP7=%43cblQ}CrC&=ed%N?$c^(4%PRHCl#GtSo8 zxjVM67clF!qZ&s3K%X)|`nJicw#`4;zft)ZI!eAq>NcASlaTBYIq>BTdN0tl3t5H{FICjfO1MY4dWm zhE{Si$|c`=#us%)e8tA}iFb~Hlbf3BKKH)PmfIIf&`l%io@ut|0s`}u?megPxpV&W&t3nzb7qEGJgd9k zs(!or>+Y(q-kaSzv^*)3k$oZ+b4@8~z9|YK#zOtH2WsQ0$g$riNW%KQyyq!z5O^r; z=`HFjzXw}Y!k%a~a$C-5iqZSbcNMH;QSJD!V=&^Q)CI%bgI?RquU|0rQJRi5IUmVY zX`<7?f&Jb}GS>IvP~6!^+JWwZ@zUE$K5{Eu{O{mIV5X7>5#tsE^%&7VxJ3p zn^Kc^t+&sA)NrEAORzic5&M%_nXtb~9utQfSl{M>+C4*3p6_hAMNbjOeB$FQ4!=op zXy{o&xc|uOrnc0hNo5Az8)SrR$LzJ2Ok`&-*6(#Fdmu98Ul$qJp7?J*r&iM6-UwaB>-2}N4{~!13H?h87#Z01d!kg(%ZkzXeeq52e@Kmjp#oLdXvYj7n%v9))2k{69Y)>LM)-py+F}`V7 z-@7!u73s!<)d$LQJIfwyJQ>M-Qou5y_xu(^uED@3SE5JXi#Yh6rZy8!?cgq+s*rlN z>Sv)m@!?>~nX4z|goWlYzUf%sm-lq~48#Yb#$R0+QEN@Nj%vM_W%q{f+2)9nYt7My zQ?*^^U0qG6nP*oBWnAvfo91dvo8D5USO_04=Mi0!!H!!pu)g_U*q+yZknFQl3m)1F^LomKsSYK_88gb^&TCt|b#C|FCH=P^a2rXx}=6`qVOv!@r zghR-fH)$4W5iAkOw;19jL{Ch z5{eyXF`1Nt*BlMT*s zu=TEAw$m0!4(Ad3eT*@|)8k^?S4*R%X`4^4zOMF`=godjnTdtV>CKOtK1ENm>Z*x#F%W4i)D{m^Ds{@8 z;&qw$$bxMjZex8ts@uyfWp7sQDR4!`DYRv9e8)k(f}HXTnE2*lecfiv zcTKoxcGq&GIkxoNdH?H%yls?wOn>gsTz5IYQCPBEa?D-kpG}EQRWWsuW&+;)&IP`L zZ%4fjA3YPtTvdwk&ByxkJd~z(c+|#q*W=sr%cN4NxC`o;(vNf3{5sA(6{FgBexspp zQon=uQFD6u+l!0(OBHtYf?_A`(iOWb_%SLKG+=!1Vto~Vgv8mo=Q(BFxVibAXXas^ z`D8N zmq*!L{PzTn+BnCJk>m!2k9te%{Cc)L#2Q`J(>iD0@1WUBTj*rRm~@oVci9lGse{1Z~DAM{VAEF z$ptRTb7-r4IAN3@bo)wGdz11n{^Nw^aSpcn1W(ClCNaJRSl@vc2h9^Z*+$WE!@;?Z>#`0lm2DUh1#f0Y``F2Jlo#(ZiSD?mA&7krUWD~EkQb!9T%Y&3L^`JZYL*er>Vq&Ff%Q45r&G%Y zX7>GOo{%?RmB`bmv^S!eS>3s!ROEc4Xi1aP_hK>EtaQc=^xIkZ`>0~9@57q6>LUEi zT8w&^@=94kQs3LD3npaO-F?#cFd)4qDaK#pAP?7UM3Xf8y}eck1+&XoG=H`{xnEIAteY-8s zJh^_v|wlQ@|4?=#=*HJC%h6kK%4r$yEROqFwO|))Qd?e6HD+~9VGNFDhtd6=8 z`?cTSSNrgwW9h)4;DEdYt-K7-?54Hd8xIM!9t|;7%9F~c+9xgu0X|d}k zb9?ONfQm|-Tvb!#YEb{x><{dpLetL?i6@dpYd6<1GV_FZ&#}we5Yw**`Vjy(44r9 z2jg3b^<}YHR(wlJ=PJfJ%50@Ie?+$N@YVYcg5*v;`NT~%b&LAK`YqHYlg^tz3RVmE zO8so@+Ii4!ZF8?;Fm-0kLRUD(w+ibkYw#{+>gFAXseM09H7NFuoVhrh^CDn(bE&b( z`NogD@U80Mqbq#`%aZge{MVKWhcZLf(Z;Ef_28Z5ud1>YBn~A%XFIg7xi>-)*O& zls8G9RdSN?lBfd}v#z&?T#dpTIbGk>U|rQC<6%dBD5QVM5^ir02>5U}z3*~x_F)6^ z!tF}GuV|B#V0>$_zClr4CnsXha=dgHl^dcSTAn2$4MwYt(PKq>5(&{&S~t;6~@7H9ZYv~gdR9=*E9_;(?j=FG|0 z2Y4m?Gfr$g;P6yz;45>?=19}nt0XT67-`~!T8o=eTA#c za)0V}k+dF`kG8Fv-q_5I(zpLyEp}G&^MW09t2a-4tZzlIyMrZlTfFpG4a z&D5@(K6^l5^kQI5mx_MQ#x;W*M;k0MXJ*C6R$JO0WO!If9r>|m?>Pm5<XMdodz&|;yc~XnxnRGq(Tw%2mB^C3_|a?e?dx2v6AEhYSrT-v?5b5SVp!_s;%$2q zN)u#3o}nE-UcDjSbw8pJdhB{JdkGun3$h%)lmgC;W9r+2^>zL6*neO{=tcC1bGl93 z^3y@?zWZERH`>iMXG83U!j7!ZE4J*QYhB@|e(J}bp?<-)`KBk6Lxi)|)PmZuhwE>Q z?^CQVYf@O>tBpOKJLTo_4GS**qzH4oe9?_h<58p0RMXAtyH0#owUPZzu=(P^Lx#$uFKKf^t5<& zkJ#n5LQ^JZSIdjZ7an2;SK<@}m+oXn?OX}4U1gLw|0^%ZAN!p48P+$8+vjLygz))> z+s3=5q6vPB++(K8A&gogk-nSL_xRRyXz>Ykx(}&l_G9gHBVBKEZuYWjIx4dEIz>I! z5lo}Nj)&T?zDJ9b28OF+8ppOB>li2VGiER|l_(ZhVz=Qv-RAs2Is7S==6zAk?_zu9 zNc`l~)?CLZ`d2T74{xpolSS|~#nxcr`yA`rrpTEqFVbmumi6SP6OIBZ<*yF&c#3_E z;o2M3`|Fr^m(r=_v!25QZ61shBSXY*RidAN^}6Ts>(tnbR&i2!k{=k~cC4?#3w?$R zA?rsJ8<%$lE{Vw6D=TMv-060bqI`5x`wIV}Z&|LzJ)UGU zJ9I*3$Fr2+!x-NVtZ&fphOFykd~uP{^xljatxi_4FKu+Iug=;!#OwSL7T|jIa!2hr zwN>p^**X&6mQSS|rxj1#7>d|Y>ayo^rPr@x7~dCI-__mei}{hFp@nh_@veIqIQMF6 zIG($m{Kf7dVdMUHvYUA?l9DZ5%NQdl&a;nv;r!nI>E{$Joe1l4QJ{xcJp;CV=*0RS zJRiTkd8D1@X9nR5*Ih3vbp^O3>r~6wayM*vS2IphzKWY;$s{)~l)FOG{=zbh?rJ%1D_P*~W*4NMa#T(b?VfUfoQKI&#)0SWEb7bd;#WMMCr@FB1(K|PB z-OH1*`wFbtqb4TIcXltv;lBWZ$-?<=hDJtZOqEz>87BTj^iHFUXO zA3kjh&f3YCSstV47+!Y8iOk!i^P=7&5A#Kxw1|sW7R3R4~=5{hw)zA`8kQLM?G4Xv5Bq%Ap6L;|HmT(t|7$En zpFkxc;WW)i^@=^Ax3lv?XnpwVGq!sc7hZ(MX({z2)h5Afx1q8@e zbYpzGvA)l=UR`MWD&WLeIxXsu_G=sM+J$rD26mbyP7fb` z&?ksKoZwQ{n7-&LBFAe|lXcfSI<#9>kZ_|j(BOjIxdpQa1G2j?zHhO_~ zZ)G(fyDK!2r>q}EDRi*jhwx$fOT&FSQ55gOs?7rBo=9&$b0z)=Tl^iDeDyu;lsQE| zo@m#JFJtecda=IS4d^>&Klsjy1ue4v8qeGr-=;8OSA6$OC7!MrZRam%`%w zYHa5o`d91`ijg3tGHKhRe@=3p+~>@-T1 zpM7`Meb3kG4lC6T9UU*atPpV4VBA^d@{B~Kxc)vZ(-n=^LHBig%TBWvVto6tzW>5; zz&ot(zi=Edfc5q6WDmq=vKyI7rR+UTp8_zq!xqp08B8Ymw+y=~-tsCWN7 z&&Vco{U#4Vi}tI4=ugCslb4H64czW)JZnZH{BX9I{f5Y6jXu8qS+c$o$xr^*Z|=nS z4r6`i)CMjeUQVeJEkDXLO2assR#i}%xUq30STKOOR@N%v+*gI=obSW6QXaQ|vUnc! z8g*6q%yQUy#74MtThbe4RgCX@tnV!~(ZW3n;@#xu*@{*&eWt{MGy9$t1sttodRR_m zCR*618?tzwZQxP&9y!7rx?jvvUrJgyQc_%7JARqzpwpNp#`go(H%FDIM5IWyy^YtH z=5Be*H)V%c6p?|U<&`#sk`uye5scBPDCilvY(5K`_Wp(x$eE;EeymuE(bQJ zv$JyQis~`-{fPBtVviEZED&`)tvERv_tvI|CFE*CV*ef6xysqv@4r2tUQAHUPF5K; zQ!3M#o9&DW*HzM)9sK?5Q=PRM(sy8w2zWDp**gKLYQ0j^T*e3o?2hQ{{P!&tna_D z-T8v`{TH@7<5=H+VY~Ac>l-55nq%(BMdf_OolPvm^Ay8-sxE?N^39Nk&u`xqZYUK> zf4@f2e`<~UaYWSGK`uAPQTl^W`+g zcLMACqg~jkf2Cc_BdVe>rMEC&;aU-C(E7P}RrfEh?yO|O-`En1-m2ctk+@@|$ENPa z>dR|Q-uas0v`6q9x6qM6u)jV$clBLc{m|0%I``54-5T%kM|RcPekI z37x?BPGfzWO5R=HO%~AS5ORI4ym&hYanKEd=BG@}9frninbJ?PHM(xxV(T$JTigZ&Lr0+QoaR6l#6B=1Cp99{k7{rl4`{ z*q2?u$6#JwRL(t)TQ~XquQN;e;*9ExoIH_rQ_>$K8%R#R+pU$2@twu`er>mZdM9L* z$x~b6rK#-Q1f|&ZwV|~9qty5KqcoX0|6GNvxVzHOyLF^U3 z5qqMh`Od)XC%yDSCo0W@A5968ofq+Z)wrvAd)dMKlPe>>9^XHl@EeW9-bXE9ef3CL zFGWw^izQSRh%XG~TU-LfW z;_nEH44Y=!rsIaG?;_UMX7Eiwd`)cgH73>QtIybP$@23(B4H{ela^4?b|rjtjOKEA zy}Ptv2=f_b6`!1}SJl~8mT?|m-`cox7-l^Tz>ep?V|^P~3|@o=r0jik)nkoV-Y2i$ zZ`j((Hh4zGg=^o_uN7opG&mKY0kp z7B3~=BIZ1QPi{dyFK~H(3FjoM&27JyaGpbvTxQ`siIR2#*V+UL?~z?$B@|{eOX**@ zhdFM`SYO`fy1{pKKfd`UaboXgS@?WKYJZj(ht+zIc*aeJBc+CJ-CcVbII^jR zn}Tk&3J*q|6}U+%{v?92)xS3kwl?s{9T_)a>3)fgY{ve(i9P+o4ykXSFz7ERB1uI?5Kh$fg} zb}}N%pmt!qi>dEA*4HL@hcfSQ!9i!Lc!xtnvqvrzJf2#~^}2e;A#ozN@PYq6)-Kg# zqsP0L-)fECbz_LIwP@(RN-3p=p5qTx0|5Tk!Fixk2|a>m`xk6UY6PjHy{Z zcCcl!2z)C$k^YM0ZRr`N7yA@-1bugTwR3x|-#8+5a%V%(#b)%fa-fEWE@3p}PlK(xCm>VbMcDXj%O~$$~JE;#4xpcZ4UHG0&PwYI` zW+?oXkt2G?bCo&jjANsRQw>Ir7ESgS_?qt8u~zRiOEuSX?;@tYgjnBtP2vOPr*9ju ziq@>CKfIn#*LO2qVZ30c2{W1C=Fpc(yM)7q7Dwv3I-DpA{nAbroM^rOeCTG#Os}TU zJ5G^)>~mW5n>qMIvQoZO9Ypf^VfZZf*Y{JyN7v|+lAG^b_3v<_J(Xo{{NVAlqEO1> zpwofLUG$=ZwIjI?R#X`-Mbdw4GuEkcqQ~|_#8}^LyJx>ej@@q;nUT}B@mRPU@VMaS zsV{t|(<)+UA7wCXzh-93DYZkHkFLwQcClqGZ%I0;gOg_TrKpRTRqi__?Ek5u&oc0d zBq!{9LVIG^_0AH3G)tTMTN*9;wKLhj_c5lsZGL0q?co$^cI=)d3JlZO^}BwIFQ!^3 zqQylrgDy$^`M#=W4d=iM|M@W~*0(omdO)~yVc!=9?pJi@X|L_LA%A0Ko~C$?N_{}w zIAAAJ)Rmw!r;f4Pe|ix%`}TS`(XrT*GKVbpX*3#b7y3Dj{rrs#>nm?_XyIFxQIFaZ zSMQW|cCdGH?!&3&525-Lk~P&*2QLYRxp_x+d%I4DQ}i6U$V!@?PJ4F$1$HxkjSyL{ zXFAyDJLFj3y^sArY_}#-l9iE^Xfb>e9kfBtCoFGMV@5*oGP75{`G?YQdUMLS@ptd9 zlB!)K%Ev{*J%WngAF3C=Q9w!@#f^yr`i?w4kwgh!=a954@>%0{e#*b$aaURKC2v!Y z`ov?Z+|+2pn=OyOTI`|vtdlcNn*4?^MN9VklkD63Ot?s|dR#J{GKs)GKcmF@t_#hL z4N0^U9}J2*d{@PBB4U|cxw}|(k|fAk@7rO`%G^q$cS1fME%wdZpW4OdC^C2qnq^Cr zo_F*%9ZF!#FTm873hVnJJnPsDlcf2R@b{{z71P2oY4`PJuJL|x+kVJ)QuB3Q-LJhV zW96z&fdtv?-c_72B}q=EBy1`~yLovjFJG3&jyI{XzOM^x?t2^7S4vT}{wyO2Hj^r^ zD@j&U-}bG=aeDQ}T&ZUag(D%o62ofO+YbkXPTXDyFSk=I)=+tO;+vL_Mw6M3IFvbkHJ^2zzGUXuLtCt{mR zlK1D6B~jN-3ltd%tzzp-gY|9BI9=A`*m~m%1K(lZq{VHAZ|0kk3i2G-&TXpoDHHGY;4o5&pm>GA^jf5S?Ox?93g1`5-9Ooy@E*M&RN=DOCKiPr( zo(&z=cgF`Ff}I=fO(8c6#1=krmkZz57FtQ>I2#-hwz2H(u3X@C=|xZ3ZOW-gsRoAI zA@?Njh6+e{|5m*uZ+KguR9qQTUwW)>>%<9X-nNl^OQuSrh*MAU&ixASdzsR5yCESt zP3_P}dNaCZYFPWPNg~e08XNl6oy!<2||1*;?6vELX2nPZbEG zYeg46_Z4e*oZ(M)G^uMl&4ay9MSU|qkq|M}9Mt4rJnigqPWg(X{z*&Uo=~4>ULVBU z=~GRFwL9yz_y2sP&%-a^@1f1XX7x*4LoA%gbCpp?opw(M?H+7DkDmSE6N&6x7Sq)q z8@un`*>>oAX4x=Z>}&Q5>LZ(SQtle>lec^9c_1PgoIY)T%1`sY^)vHJYuh##M)I9x zLgLubS5F@Gr6kYeZEdtu@;L){Gu!IA!iL1jnuE^yBKwZ9Ip@$C1C zKV$W&Wc9+cptsdJTCsqbU9nI=MZ%HZ#`}+$;^gkricoI}&2V)Eadn-;n`hKn`$=dY(vn-4+E7td{ z{;?NHim?$(rsP~N;+^VguI7-d*hU@IDoY@2Hz_~uMZbG7zCWmw$UWz>Bas(89UZj^tMgKjwI6S^_^S}OyAu- z3bu6^Tu=O5Z|iliSLwY=vre{HW{1Bj+lT&*f#8Ezt8^m6Cj&I|Z+v_A@KM^s8f-g> zt`U49nLg{X?(-=1(dPl8cfw&_cUlUqrFp$$jH{y;2MAn5^zyDvatbZmnsg1{6-eJLYJWFK6vXr&T!v?|;yn%C}9SWY_9p&c7P z&GIfm)!cd1)KNe-&E?pa4;+IG#NzrV+L(kT#)o;tR!>>gi(|*fTv*@Tsg#nb1T4q( zRqTb#lDk~mb;zhCJM}5VUhS5+yg3+4{ZrNb$K1OQ*Gie`KK=|H%xk4IrAm*!!1*-n zJ#}#+_P&H0>ziTV-TByHAS6wbLx3Xv#l+EOZflL_hFT3IFG?eq-cm;Eg-3 z#T(D=%S@-9ALQc~%&I?>wBG_g3%~w0d-;aGfy8$I(h){|C5e^m7b}R=Fute{#V3-a zzAGWuD-R_zsIqdnt3~P(Uw1lh@XYr#qXCm$?6w`MVvgEbZ}nq4esOj!MLmD_*r7*S zF~#j|@ZPUo&*&eYU&HwFVSQ7=@Bfx@@xQv>SRYsnxL*Ss9f9UrygG+_ zf85tUddA>k=Iq=ey<&`HMbp8tYC+W>XEeQu>ZZFqFuwd)-^8_NPC+WxMpdRtF;qWZ z%lmTiT%6or=x~qO^`+#*t0dM=>RkfQPrrK*p23nJJ^V~Nl+>@oSa@f(Ph=`DRaO(m z7kw6oPb7)&qt@$`3S-1~wlPyYnG9-bE>UQm6G(YT9cA=WeR@RBG&rpwWA^xK)1Vz0 zFBVQ~2LIwC{~|>ct?;6Y_F*XU!k@qBJKXq0vVTU9+ev$(nAhH&^X#lvm1Gxxfx(SM z#h6xyR&|CdT7gEh(!_SXBl$Bd5{W98a!P1oT%7t8dw&a?`mHR)puQdNy9eugdxvJ6 zcQAd*5=HM<)9pu1@8?Wsgi>mfy;f9bvtIJ-6?pso%5pIQxa1Ug&lA1#rlp_Tp<17n|AlLPHMezy1sJ%hJAW&RCG@@!G*APj$*IWJekcy z+jeMJdNu_*zN*h-{Pf->z}+#`{)cNmzccp{Onn8gz9U5sX@fMU$4;vmm2XHMNqt16 z+o!5}VU+Ug;b;7N?({#keJSFtnYiL0ElTxCIA`s){jKMf#92Brnx5KksDEl;e9_nl zpGboJdrseRuyY+!J zR;O)zJT&);jb82}lnEHa_zGct<4rm4U)aB2$bVsvx33n7;Hk%(&u@?DQjyxW7Y1Hm z@8dcxQz{&5)UITb^xpiirMyG$_TLrjbPtWR?E>Z!2(g*EBn*K{rgYd0(uL^N9S&a5L?~f_YS!`nkYW zyB@nh{WaqLSe&r0H8-)+@FZUnSZ}xg>k}Y31$Tzw0Ih3k--a)w&y+ApgC1-g&~I(v6N%p78JWy}Vx{wJ4@6FLv^yEyKKxS5m|o73 zlGE+f_`nsqu1k;oNlA%$_GPEf&_|dDtjM1(*>3iz#_yA|laYgg<;>wspOh$C z$GRA^wzPY3*ze29V0~-M;^b|XGF_%$*vH&`7JsGM`saWbbNpyzQluld-WAF4=Q1C6 zWjySjuIVLx-)=uc;N|Lkx&5VDhO<|hpyqk(^L1IQFUg~QdS)k0z2;Ktc8>^E*_80D z6bUx@7qRTznV=n0>DwP#M!Y7lRMI1H(!kA+M4yy&^}FjG$zLT?#KGh&1LRnKhqYt@?q4Z zu(3rm%=IaAF}cJOJL23_8Hx-K&WZ9uvv=VyBp$Hq4Sc%H;$5D5S|_C{QKf_9x4$O) zTa2$f*7uft);{gbHBtUDNzvSEN)HZwC`@seI6{%cUot^!@#(ZhLML-|;i(c90lkE; z&m+mxUAIRR1$|M-e|M$3v08ls1!-FJ)4z36q)+=lqJGs`nVLqv-WAtUu8GQXw24yIirYc``5;yGg* z_-krj6XUCd^<@&I)c+wXB-7_P=oAvd6Ubj)p66<(H5StGb5=X?vCZyp`3LJlFS!-FT zPjj5(^l*ebork~Nu&G%RQI_|uw>6T#LcU$@`LZ*!a)?w_B+A@2i4l#7@#n(=I%y)Fy0r93Gj);d%Av@`o{a>QrSvPzE7-q`*>oUqff3~5?@RAh!2$a zZMoexGCC(^lyxvzGyCX^@Z78Ng_k^L`jiz&$jk{uR58A29-m0ApYIi;?zx@$zKSG*J$KqOVBTle)W3+|SEh4ZLvTr*v%@ILM`bU^=P9>?CC}0~Z1^~-t(S@E z)?Uf0FIQpjAJnnFH<*JPEus@g$nC?MD-E3;FIq$am;yKmbpk^G%~9*u$U^+oq;_(byRi`mXH%B!Pc2M-awBn$g? zYia)Z*Mi#t=I%mK+I30;4dMJfS`JfZ__Ldp9a}$on*B<{hU5wo4~vS2|IayuH?Dl6SP0`2VGdx*h!z~FsA;pUF=T$`TfQRHrf|A z1cGIGyN&G{%T7DI^5@XT_@ZkXpGdCE-*dW1T+(KHTG3i2dF6>@%cH7YUzA1!a)zsq zpX7Ty{Cj)(TtNNI2^HuCZBqH?x!E)}&_woM*m&=nwt2bnIh`-?fA6PER(br5r0xPAtt( zlPq>&e9=8NK9STHSCbVlrpG^3I~OY;wA}7KANy)fuZih0{nv!dFyTR;$G6`6lAJAZ zdnvCVBjDO*>7(eMrfsj>*^w_M!Mr+%@kKGgCz5gV9qma0-ztNXluqk%-M-gAuw6Id z^`)Z{>yHVmr$vtuKRs_nzAVFflzdHe{rLQ?_ru@kCyrIG+;vQh$&q}Gy`MzS+VP1* zZanr#Np{kmmECu49+GlQ)T4YU^^<}&jg5V!c(HHzmk{wMIV!f(YVJgf+4;2M$Ie^vWev_<^CM0Z z=Pz|lWD%WiU8@-;coH!BcAucKu5g!+Vej6wf~EbxFuuB2UpMv-#+L&cZm@qmPpYdt zr7XZoGO3oZucJpyz|inWV|19ob{!i3u6FOE%Uyh53IfynzCJ(5e|n|HMAg1x`9%Q6 zR}bsEo9B=ePsdT29a-dWV!mpa6Ivt~rSON=WjyrzL7h8v+Md+*C{OW5tE8~5Vx&}iaUR$u#8QS4qN-a{nlpd$Lu{Xc*q~c^BP5rUQ1s6 zSYrPT<9i(IJM`f6NDt!_>5Fr(n#9NHJtt<2b8oz#Ou4Uq72}JZrQs7v-8jo- zvU)lLLSgy2%Lf?WW5qr5-YPEZ&UeH$A-lEyZ@4xj5Ztg_p#LjWs3- zCpM=>?F)%mZrpDWr+H6Tefyz%ec|=p?E^DArLg^*A=a0bCj2zpG2^apzqTn^7h2dQ zj>zsvwLbjOTiX4mhu8%k!2uii%IEIz)cu)h6k1Y^U(o%B){ zwCN{fOu{|$i_@nwN^{1T7fgLMSe)YG`Hv}`JZk(piQa&&pIhC^qvv*-f9t!`(kIQA zvKz72G5RhVK9Lw-i|tXOQa3-=qsltDqj;bC?+~Z3<9X7ew&ENn^6mT2851=a?7h1q zcHYeBRc-%ZjJAvJk8Pu2fr-ohmo$urG4(aU`l?L^lPC6x&M7>Tzed%G4f)@xpteDG6=?KgH&4&2L5E|I`Se^BqCZx@cc{)|$N%$j<3HH#t*n0{0w~U*r?%RpebP*KOt!Ekkbh!RY7esxxll7nW zJ;V#9TYdL`>BF^Ex&I#{zyaIR{0H|Gs2$u&TM^ibz*YpdBCr*Ktq5#IU@HP!5!i~r zRs^;puoZ!=2y8`QD*{^)*oweb1hyiu6@je?Y(-!z0$UN-iojL`wj!_76!#Q5o-}OMh1CHLufi(Ed8v-r>CG=hbv@RWR7YUHi`zla5df*Kb zAfb0npmJ#cyO971z0Uz@@UzhbJxG9r-kE^bMKO7c1W4#mB5ga+iv&pMT?I(n0rVjO z5_-=7(slyn=<1}>I!5;x9@Byb;<1`ez5u9d&)3{-I6sOtZG#*$U!)bOnjTe?b;xv1l z#s|xvaGC>7$XIL#5K?SkbmIPLFyDhLR6!}2&zJBur~2bRC$G-sT)7nZ-_w7>6; zBOnlf~r}^MCNmyRQX}&m33YNd)wDUMk8kT?HG(Vgs1Is^g z+69~@3(HG5%^#=9!SXUry9gRO$M*rha9SX)+RkKh2XiPOSynhIJ*nUF5yG*y@<#Ay*Y z?I37GI4u&Vsewj})1q+NA<)pfl2E#W)6`*}6sP@t4-EkU{QM;W8BUAFl{*X?IZlhg zX_}x>;IvqrrUe=$PP>NFj)2w%pmZHH6nkypJ`y0s!D**KI4uvSnS(}z)ADhe1!yEV?JiEU1g!w( zQM!lItYBUYr`^YC)}W#D2_;k>&7%Geolhtg;xt>BN9Qa`ML5k4=J{~i-*>XXZ?l4i ze-};(uABpC?6`6daGE1%g#b#WIL!&>QQXkE^bn_=h51R?H+0@S!fDPh9|IaXZ_03* z3(R-HJWAy_?HtS};^I<)(_BGI!fBN_%?)X|b*pfiJ80d#UCjrwcU zKcoH_^}ndUMg1%4Pp`v9t^qrMod7ey0;d)y z0)QYO1PB8nfG8jahyxOUBp?My12TXtAP4LN_5<>O0ze250mJ|aKnjontpD0dxUv;0T}v90Jq<4L}J{1`Ys< z03(3f^}E0upd07`-U7WqAJ7lH0|tOWUx`gd;=zc zNni??24;X+U=ElE7JxMK#-i26d* z_o2QH^=+sxLw#2p6ukmm2Eu?)0JQ_?8b{Z(JKzC$0$zYO-~;#qy8+a;ptfWepbO{$ z`oI;4<5j>PxCmSTd;xdB4R8URf#bjl;3S|290oK2CSW^o1ibD8sINqQBkBuLpN9G{ zV*vGAsGmap66%Lgzk~W2)UTj^1oa!JpFsTr>IYD}kJ|Zq*mu-cqqZEi-KecbZ8N%e zL+vqYe^Gne0o(2bUIF1iAm9&N1oi>~z#(8CAO}Q4odW<5z#K3D3PDHh>S@?6YD-bu ziQ398&0 zcnqNazzIP82kPTcABpZ|Bms2abOk{7ccDNCfbK<&fC~V+f3*Pg0VQA$AOh$Dw16qV z3!r;*bkFVvXaf5I8GsXD1ZaR4unRANA|L_w1@(!yfOwckeIe@mPQmgU;1kS`0KGs5 zkP7SpY#~n-H~_o{&I0HjhZ^#B!1M+n2*d%`f$ac2Ug9{+vYT3~F!1 z0d$?R18e{*zyj<9P``-!NI3P-p-0WfpT3hGrZfOKfcjlhfCQifC;%z|J)zhJQ)++? zpvA!m)9nB=zz^^N=-fry=LNU{P5|HbBTq3v6hP;%Fo4cqbRMI&23>1=0Ce3UP#JX1 zNdr=V3?K`j>jYgd=(@pf#}Sqt06RbxKruq=s{m;KYyfM(3a|vs022U}K`}(zF$RnP z4FJ_w4LAs>1BU=?Jq=;m05}dD1M~r1KnFMqXakx6TJJD`-@hX;uLU44J>Udz5;r{! z(^G&ca0W03EC5t5RBu}V?T0FW>Wy@?f2b`%^Jf7k+`KAG@%xYFk&ZmjJlYP*L;H-@ z_X79pcdtYq*LLlD{z@Ov0V4eve z0xke(TfsmO5C{YSNb?6S0w_+OfIgrXcniD+-T<$Fmp~`b0ki|pfi~b7&6 z72q~-3&;VIfq39L5DA0>mjJZSVE|eW%_H#hmvPGxm^@TBv^`V?Z3C5w0+1hmeWc-+ zkvFPaG=TR-(-;6>9x6c#WWSbmPvpJFIqgj)}-kB>W=e}K_TG4l^`^XRyv za%I3H+&q4pXt^AxRp6$TxGBD#|9%_Ta~tgwc7L(!Aa8suk&gNlq@iu&i%#|y2~1SA0Xb@BB=#}R)mp=}^gc~lnpV~;b^(Y24? z7QQUL9w;B32l#Cu9e<9XynnPF)&pA(9j6xnS|7Wg_bk1>k(5Jnq>`F;TH z%RAh305?S%o)0kp9ze(9KRUM9A3!n_5puB|1;+@iYfBA2B3Zr#RHuq z`11qbkKnh1Kj;5_+&{xQD865C({bDsX%oOVzzR?W zLS<1oRbUxd0)7HNfbYN}umH>hbHFSx155)`0BTE7Isx;9z%O7GSOL%&$QU>d90T+K zG~PN4XaH#ZqX3}sRWOv7hN%=F0idz7C?E`=u?-pvaR4j;Gl0fOXiUTepm7-*8_@x1 ze6|fB0;mD>JOVwJ*aZJ|;5V=Vkb;JuTMz@NEFpk)08R1p=s5-&2U7xQjK~1&1kkqF z09F8vP6q_rL-qDkW1XIWwRA@By^ke}Dce z`EMUU+dvsc7^c^~XDVhqId4coXf7!xBPRRz3D7pk`5M@xeyG=K5prb3B*i3PY~|(R zK@Ro2Z#n5y-O8VJWW?YyM6Dq!E}(y|8nn*j?6>#s$}M;PtRpQZ1!G6iKWh>EG&>fv?$sd#InsZR0(@)2)7jO| zTdYEF8`GjWHRM3t(4j+Z6BD?3is$;!bw>>Saf9Riw-uv;ob25pBEpyLtpBX@CkA_o z{zkO8&SEA|BRh|XFh~-P0@PXta;RaQegz?spw0s~VI4`RfixUS$U$e-?OgR6Ea}=@ zunwG~XdOMsp@*FD3_6`BvzA1#4(KSy9Jiei6Giiw=_^Z+16x6LbGLGKgM&@bCCEPX zO)G62mjlPt$J0ghtecZ-tOwtyC7~rLfr)Bo6(vjvUHC&%n`{ zI6HW4ytHbg8giuJI)$7C+&T=bttl+8_xC}L?BBZCx!SndI=MQ8$0i$$UXHKXj*jV{ zE7;pp26Z?D3ie~~QY*p_{n=C4S7_Tv{;Kl?mjFmn9e>Z_0TONyMS`p#3d*qe z0?M%-cyJ0H2qHQ=)4Mw`JF`sB?CuaGt71f=pavBcBSF!Kq9EQ!L;@awh>Af0CEzWJ zMo~Nh`F>UJ^>k0qyzXJ$@1O5*C7JH7SM}=EtEyM;z5*Obu9qDyYN7o4m8VpE(Ydx+ z4zz_j%yrUqhAt@PB@4`(UtL(iUFEXOh9Dl1>*)*uJ-U zyPP3|NwEt($AB?{^!&%17yokaj5u-I3{z|(P5b_j&3n2EtGziNYBhTH`>sWXS ziY>{0(tQXZEK$1;IaKLG01+<4GZ9KnTt6^z>~-xwdT<)@q4u<>$dm5*s*sjiifQuq zp7je7cTagU2%P@FL5n_JLjKWaV7SAPBhCe+uwNlbJD`Pp36$r_oqGc-H*78hggAg6 zTn!x3-k)B*de^7>57SJDme6#P!Ou_4`F8xoKm9*k$eHuMJuE>?GvZ zQ2ykI;mw!MWDeL)V^z^eyt2wuI=9Vx*L>7Yr9>}NhA{d{S~T9T6NKi z$4XkPpGNIA$)E`H13)B**=89y>(DS#3w1z2jN5r-&^}QFUsZBaaqbj~}@R4iG$j1fv!h8 zaL`b@d-M3=rT?bZnbp8^FCfJANYC}pUlHH?p-HV;7bU*;u{Cc$zGWV@KNMSnTDon| zl*XOztE3b29Mx55NUNorHl1?l!YWW>Ys~j#^oa-^N;3QFLbC0QzKT6XI&X&GQTyxk zUJkN%De09E4jhc7M>*rS!lviomt@_!#hpbHJME>&8!a$(S<-pqJ`?KnaZsb!-{?_7 zuVE$Ba4Sj*kEAY7Mrx(Rftt7Unqxc7z#D4_Q_HBM+&ZhdR<{_6@}Q*My9ryk_OP3K zZ##7x^}tF+=&g>tdjp5`y3d(!P3UzXaXNF&;kw%UEBZ{Z?IKVkzi`R9SCoG_@}`xb zM$ra*Z{}8}1fW=?Iz$$9^!l>E+@J3tuPh@J=$qG%NNwYHuYdj6cY~={AgQItuxxYS zARJ*7Pw}NsEau zGN-%H#M{ST*nY>HJ03wv^ZTJkr|fSxx$dYfOJP6YP3;fP$`$?X@8@pm^ZCYw-?3H| z=fn413<&k-R1tJE-{xc|FRV^@FrK^s71 zg4})TsE^te{t+A)IA;KYA~g)zKd|i?3-8=yLIQx`U&DYGy6x%h zzYTpe!l9yGD(o0o4LYpPTP9=^ATY>=!F{WGe%$}c z*(T&GKu!eY`^rA;rk{01Z-(TPp>{rANT;Ls^GS!*6hhX>havfZ5YF22A1`>dUF*wD zYU3qN-mxbR46VxlgMg54}SQMR~2JS$l&^VKoG(;j9zoZ?(v^=8*k=w zFCcKt4LAJj@pl$Ka>-F9&T2rYJO%F#e#{eny9-0mW6AgI1O%1WP`UoDHHW|dC_Fjk zLmV8^OGF*Fw|MKJw?109!_22WAV&db*{;YP9ZuM@*re7Q5SUQI+;2ZP{jt*zebB@? z2M{!M4PU&|_Ng0hzJI@oqXB~8xS>p2`}!rme+aHwZV8#sL;bG(=A3bd-v{lb)~p1p z4*;RKcji6EEDzLwox^&~y{UzOkcND}=Dhi}lb)Sy;ye#XA3)wb_maC?d*>h~XKJvy zj{zaM^?Yg48NNgAohl));6tGvr12L7I)C$B-{Pwn0((SyKoH=fU-InOGq<01D?`|T z`U67o+vKs41y^tFah93SIe<{jRrcI=)lDbvq_GVeBZkpkF7sK_FnGr+WsgJS4c?{$ zLjAd3=l{@d+5`WIn~>RnP)YZ8T>HU4XYII6LLi+703qF(yR7?9myLd!`XzEKdJQ1N zL8q48OD6Tb@f3+uQ0&<*A?Me+O{u}N1|GQ+*(1Y5t24E zpR@F~ucBW-4>%u4r#B!Zoi7f3a>6%FB^W2R(L6udTgIoUMS6mE3wo zvwKe6a@r^ff!zKL2wB#y&8zk_e>sQ|O_mNIU3-gm?nm#E4}v#V(>M~vNT{CzK#1#R zi*~l}a8Z>g4|9D6AjI_)ZDj?uCH0L zynUiU;y|l1wiuxYqda&%0YG2jZ+hE&Vb7<$(vQ|@5LmETvUKlCyws-IR73W?z z=Nhx5>U>(ELrfm&gXs;66M5sK+2E+DsjXhE*Xok0HBnvCCs7`hh=|Y7QEck6NqLR{zY&!dHEJ__ROW*uu9_)*QTxTB7RmsBup2D>P*Gjpsdl z)9UM6{4xzu=cDGWX=R|+Dm4dDFR!6)crVdm_u7Y!e)E5qtkvy8W8}8DpRk4Yw~soy zM`WSVEi9sd@oKrLTR=5$YHDg6b-bgNbz}5R9ii+)y;7Uiy6Bre zLr&ZOglUaxt{YR*MQGJ2hJD%l%+9}E`O+dYpTU>(k zD^Wyz_sj=gn|1t*aw%)nbYp5;&6`>Vjj{UjNS#hIYL8vn@ci{>tY`_YF&IEWxtfE< zK-3addkS@%)tHj1Ye5~8t4o?;o=L8vQkO@qJL-JYIE{(Y)YSg_95ih_dNSr+sUQ5) z++Lq+!7eLIYdi}O>dzHMmpwJ==ee6rNMoeam{?3L>zM<@NLG8_ErAW^x2H8`)ZcDo zRMUK*h@MKHSouoy+M6$6YCPu9n36_8je4OSe5;?|zpu-7bDU32P2HDK%iu-i(+>F* zowly1;^uz;0oQV-OiIZ*4)SA)e^^yO!B5Kk6NOOhKMn{l1SH?1#ge!d6^QPr&a50(}H%zb}7&bPJj1v9!;d%mXi@s062O&cq#OWL%xpw6dh+Y+@V zs{N?ie!er~54&6}D7bzcCz)0X3TCS@POvXKlD`0e1BAdj(oZnk~@r5`bbSN^J_L3K?2-|rPPEeH11 z>7u_t;%VBp@z>bjY0dVpvA@%dz^^T!(~9W~KK>WXWBgBfzQ&9r{r@vsq>fP3ZI;@H zsH0AGZ8vQ^s-9<3x9IAUs=02=h}o~Pm{Z?*!Uz#P4IkI%^;R1ej7MyVeHwHSM#ep> z3~9`MXZ7C8Uw1VtPDS)-m!E2ve z_`x%P&`1f^inW)Jne$d|=-%d-9wy{C3Ay-p`#$RU`(@a7XzcMUkdWqsTkn{2@1T4M z!R{NMKN1aN%;w#F^8(K-`tVv+!1i1mB2vndToy_ zV{aQv9LSXkBY;CY#J+iX>k*|FkD_xU=-e-qClIWtAe>L@Yd7C8@;W+aj!u*SwFxqx z;E1V5=G}Z9#*r8Y5I-QDK<%Yg-+u5@*B7n;gxXU;62vn8*1z=3_oK=l;n@mi%~J=Q zBY<_O-zn`(de=r^8sWmiqE@{lDpP-Gy5v*I13)2N3EV{@7lddZ75V z+qtBW9QL1%6T1iW=PrEk;bv{A7I1_M$?Y^ix&UYA>}|0Xqu0@1kzyP(2N_HRq#YpI z%+Kng6L#JY2yL6i+Po=%P|bBdY(lru-L8I>PJ$|-E$p5cAjHAo(KU%~*Q_1{9LN)r zE1Cxg?O!;hV8jK-T)9J>n8UJOCi8ir@10vuz3}Maz=6KgNkh*AaujeL?b3b3iyeD5 zmk{LRn^H^FM|Pe>d*MhAfU_CY=q!Wt zW`>^IzG5YDfU|FChnQklGeIK$STq>c=3Ln4Ebpej)82m>aqR##(w(_~dGx~lSMUje zGM{e&q5Yb7-hTYwM*Zo2Ix7sP6Hz{NuxCd=K6yBC)A(J}_Axc=pQh6oYjD9JPSZVV z*p$xC&88D(28vqH^l5P|n(+Li=(|r_uk5V>LWhBXnx@BN!I18$Kk1)cXRKNi284S2 zfOI%tjGT6P<)$OvyJk6drh;qUS$7;DRHucZmEW#=y{ZxrI@klXU4c_iyzv@On~#HS zj(L2n4v0MCrT{o3w?F^k*)#sSzYXn7B^=~a8H$wqz(K#iJ=O2@!rrvUhW55&UGN~_ zkd>^NkiW0x^-s(r2)ITq(4C1#hqotX%>K)lU(0RQD!)I67kPyMJu^<2?^G zV;uGrlYxUxuniX-bIu#x|Fsg@3*J};A+46}zNkg7QRj}lWDX!$i%QbD8aPy^;U5S7 zFlx#;8pRlwqJ)QPwvot#B|1Cxse?ZwTU?kx1F`` zZsLGy4qQKefw1kT%I@Ac!t>mBfRJS&pMa*-c!Rp<-JY-Ynsv?>WlW7VWFv4$L+YRY zuK!`DoJ+bxT2+dZB9+p4A2`Ip%2$7X^XZij^^*C3gHI)7z^&f-$Njwn$(kezJy7GQ zA?eg+N@}|<60)A~!k)txzW*h5s-vU@x1WwDlc5a>3{DUHfaKo^8qR@jE zJDmF6Wg~B14+w08%tWERsD+7_2+O)??E2BZc8|Rb9I9Rk!pU)cl&nwSNGPv{S_y5YW-kB*FE|eJ*RL+gZ^TIAkTouzDQR8q)%vHx}*K z{O}XqmolV~nwhCuf?e!^PkZd$7dw*L5<2?~Tt|b|Q6Jjc2Y#3y`fl!s%Oo}F4@es; z#^12#mnHtK9^$Osi9cp{+ z`p+MqdD+NmCI@vmX|*PSvmh3}yYa*swU{#kA^uZSQ{y~4S(LQ8&#~o8=a-M6F-W0R zUtA_?Vd~)dv!}haooXAW{19&$VV|{{}Z}o9&&tA}l{DC}kF(Ys6UDObD`%~kKRe7O6Z|W}`czfKSBan~WlRvRs z*lF33I~JVsLJNwx$g&`Vx~ibR3R2%tJ$K(dW4^(f62s<#x>iq>`q#eWx1QhO^DQRM z$$qg{zU61*yA54*{ZE_^Q~MAQYO_Y?tzO(^-QPO_A|uGJ0HGFR*x&vB*G~MFc2ARz zf`clb?u9*6{%L#FGp#S)wvKU_+LHm1Px-Xt2bcY(?EpZeKR6tWkq>#};-#C;-Fx>( ze8wlYS&B9o_47O6P;JZ_y1DD{O|P6SseyxA0OviyI|-oeJ3%5t+5>{ryZ#MF))9{ zb6a1NQq{Q#n{7Uw0dSi9Svrr#`dF#xF7>{RHKevW=|0^c>jq9+xo{XS%mV? zZdTNsIu6NL9`5PQ2Q{j>G0Wbl`*KScig(Cm<5{Atqo)Hx zweZCc@Dr5gSX3hI3yx_dtatm z&PmV#`a8Q?a4_Ngzs&fzZ%&m7$=!@@4*nY67Qd-?Z0lNetrqP!tRBZuhkc>*Dd4Ug zf|GiaN1YEak2+^MF&##Xzg0hXS`wXqW2f?9IFG)yegB?8d%8_~CZ=PHA820sR_>MK zDn|T3=jM}aW(_FWkW=60fc=D7;P<1`a8F*bb=wJBa&GAj*KrimFW&NayA^N!cIHsL z<6px~+n&DTw+pZ9G#oEfKVLrBqQkW6kAA)s?^G+Fj9d5elx;`U*-ud4KSJQ&@{Z2=`lbwt{ef-Ag>VflmNceyw1}6?50yzH`*Rz>lCB;GfC zwqy10D*v?ZTD+4+Tu^brq?WTDTYV$m=`4`n-+9WGPgjq+Z@H|e!DlpMIpeM~oIPKV ztPji4^9=We^`JMZRciGC4Y#F-eAPa$FW{>|h3cBWDw2C*G#<|F5w5Aujn@PayyTW8 z6XxlGsXcOo6}gE>Jh#plj^&2nop5w~E&#dc&4nv9{lwg|SfWPL^Y~m`WEG1hF*Wh~;4 zg!06z7fh7t@fs}(PNJ1s9^lnzki0dKNT?kCAYNS#-JPQQ<50N5l9Gaf@YC|_Y4C}@ zn;xqQdg(;rqC)rry~G>0p^sipTFw~KECTAS~ z4jRTI*r4;@39&33DGzCREGozwzgiv%Mm`!CK|N9(iPj(<@K$Ise^n@=>mdjRf{lb7 z%3_?zj?9fmFS$TBrs=#w;Lwkk1~~Fv3Yo$W5L4bk0Xe#5X)hwE*gtvMM-wY_8H12S zU6n6ZS1Fzy1Yu1E%GOsyL!ttMyL5-9Qs;*|!Hz{ps{ z3;!0^9BR#y3Pdb#>`&adPP$3pCZAd4ZlaR6S^!TznU*~zuE)G^=2}A#Jf~LvgrV3@)?-aadfUaTN?y?+ZU5_e-s{8conTa7WJW_ zL@Tc8Bq1-FYo9~WBvA`_+){!gE?u}wk_KY(*|c4Mq#BK%7Vx5}(|px@#{xHV4xE^Y zK+}BTiZ60gba{(|ff*==RnaXDF2%6%33S^RkfCZuRq+|($r3q~BQ+sNrhZ_GZhRTn z2LRi6gwjxB=&Up;)eq#9cQ2jy;6}lsOC$|bv)FU6Bpk{v4mhQZ`Cc3^#`MYIfax+{ z0E12yi99V#*ApRN3I(TYG6tk3iaR^raxLcTSK^REoet{QFf6XFAj;x6X&Oq8$11!7 zytSZAF{%TR)Px|I`hi#xKH1TMCMU8PiKo zfIBdiiVCJuKfv7G-Hj;=;F~WTM!D4;PwxYbe_?g*+9oa`0g8CwT=HcVx+top;*F9T zSDUzDW>h2)Nl`3V8C|>LLQ9-@4qWj7rJ~_mXA?{5C;&C(9Y#uK>P&&}kpL$D0z<}R zF&L}YxGl)b8tI@d8B&8}hOg{z+?rdOxF?SA!?oxpIB~%WVem~W?Dz*#v2|aC23w&^ zFC3V+qyi1g8+A5ZYmIx1ls9$yv%?Vggb|K-f>5%^$I?9{RLd(|DN%5)XTH%4i2REj z>GB3(R766dNFDl?fnXGUT1*^9>J#1y^h;6uwGL8CO$frNA4uh0wKv&T13mdH4A-SJ zcD9*7YDtI#T$tlRNZB11B}(?rvvNV|UO%XrLjc@(iau;jB36Y9&gvr3sd@fT5Jz4U z4H`%gYU{;SA(43Uqh1s8#v)U-a0=9+mQvDziIjKNJ2$;C_>lt}pdp`tJrFnekbKL^ zedSsx55qDs++W2fcTdHXAez2fbg3$FGoZ9W8Y)H<=0nGwf-#KDVR$%N-W&fQEsiQm+`BLj73A66$msH8HEsOWtz$`C~?(&ylr*NQ_9SKXo?T zS~Zg*3SquL<8Vn0NrJfGIaONUf^mf0K}8OE%PVC-OFqGvi-hJnU?uY)K^pln3vTUE z1{p~jHpz+5jtb_K_|R0wVp8dAOE5rS=KYstwFDSD^XXDY~_!N+G3z zbu7zqDLnU9fXBaP)(+xI>M*d9&!}(=Q@IYzh*4ovRg2L|I#*7H$PpPq!MR}Kb^)(j zU(=clTw7l$pun}G2hRlz8;q1>i77n-i;R5(VkitnxYbTZcMc*Mzr%FgJA9&j0twkr zQ3TA@MxkA4F$QfNs$O2g1Z??)EVBr#49b+N@eEA&L6MZEjj*jv9Vobuh{2=tWFB&!R(o`)*#%K=Qq2%_YplAOCy6)mnZMs1v^#e?nhFi%b;%F$)W%gD(Rfr`O zXj$ICjC;jYlhdl!VY}|ptr4Z9#5X`sdC$sODo0e^d!Q*Z639F`qM8M2N(2R58A~A& zp_>RvxB_8GwRV@;R$U#ooJxk95~ZBioc} zMAj+q+~0ExDaz6#ZO{=RH)$A+MnTB5$_j%yV%VU-G7-q#V+VQLlM<73LnCBE*NnM2 zaQloS(8biFz?TehSnKyyYazO+${$VCz%|g2zaGZb(|i||1B-O`73k7WRwA=R)j+en zQGJ)VHcBQ>gq>uNvvwPlu#f&=mdQne#`Rsu%XrKxCwYYz(BzYeg?_OXbrY(Y2qerG zs1z#Rg=b3z0@?Bg_vk(ikkkXhHFN@FobH$zC$K@q)HpftBxV;1OG+KIDwzfZlF!f( zX;2QBPA20%@|8L#kIXT*F5>BYc4lRCkR!esHm(7WC)IUtRNI9^Q$;j0ngo zg#Zoy8pFy40;WB}dQBwi)P+s5lS~ZC$!AcdZW~+@3>{P3JY9`2081boI2NHJ=*Son z(Ie3Tl`@LS(3ykl)XO6Y2O74NASO__9d>Ic(wGH$+BZ;=ql^x0SX+O$z+K)JhP>nx z#}{r+msfKEhkp?pP{<2OIq;OOQ$Uw(h+YKG!G}|^xWzG|AgNCW;m$|r?01!3v* z9j4^~!7>uN66+CfBpC3geUDj^VnMtK$G{#2FoIalg8qDM5Pf^hcLdA?)xkg@q}BPL zVdZfefWfd|pawV5$C5NGNwoSJTKIzQLM#}LXQWaQ(&~dWzT>ab{8ROKwaJ->}mF9*y?D6Ov%rKkv2VvrSMdsv*11XCuy7+H61v9~%Nit)N9E3e#j zOs1!4rDXk>a^=rv?kO5Y9?%X?QGj|x13W1NzI2RpRVC1E4yUl2{0zmC&pbkfn!$7` zErY_65<|h22^3V*DKUGJ3@_R7l1U=Y2}4tpOj6k6Eyq3%d(I57(%=u0SL^p+m?!6; zAvMr>%ylG;(p3ja;BS*}riqZ^!<@WW+f^B>%8(#wJd%HlMu}x+>EBs=8AxH6)Q{C- zqDqKwG6t#_!;n*8nM8zyy!wpgXQUPcy~bd(ATQKR=0&S&xS>hPniWX&jSVv5QzVd( zvar`e8r&**24c;g4=S&FtEp@@^~sPTjesHRWJNJjikSI}sQMJfF`qRchyh+F z*KY`iOi-kT?`Qhr4c=dNQw_pCbO3~}jAD`{E9znZ3Sj^(PXxs*VmZl|Ju@(8|HK@+ zHQ)yGTrv`qQA&CS1=(jyNhW(^G-;Hr1T82=29{6h`C!+JFBTGrTWo zrF{cmv>T6tOeq51V+i@60X5o|EHcZ0h3qnXWkICNoQBFY-S4Y$ijWN!g?=Y73>ld; z4occ7o))xH-Vs{5PlXzMr8jsWm;Mpl(V7UCaMh}j>=%t<@=LlHX>oASuX(j-6oX8D zbeFJwBZ&QB2uZT2KqqwM>;yJ>$s!-FyQKFw%9Q-TeQ(!+Zz&trW?RDwikUuxN1L9b znlV`!OQbc)2<;JgdxPO1uYJQNJBoC(C|YJj5?)4%CQDh+PU9A2)4nl9xBix)tXvVP z?Kla}sF8FCS2N~kExrOP*VB3^!Rmn1u(FZ8s6rXakc>E(k?&j(%z|WRB9=If<1SFM ze`4OVm5c@1(92Yk##d&Od#XmMSg0m`78Ps5FvM@tI4IW5@Q(;3V?mRK!Kl?Ui+C{$ zUel3~OZrDMw=8H{3d+HBs-*eTLD5sGBAC$Z-do zakKTP>AiK(N&k3IH0>h;plJUDdfCiAif(jr=)oYwVFU%-*_M(iSVuJsO4e^CPli4E ztK#9Q2sk(u24!eiO$Im_KwbGPFdK~ zQe_biEmeW0Q)p*NLjKr|8jVrfM?OmPvzS1#%^F--$1`Y=TDJ6T!xSKA`+^2Bdumoq5Rs5A)&PCiG^~`_y0CO=W<#ljaSquw zBbY3wJ_h|j7VgU{ljG->v2Ng7-jIFP3a1)T2SuSw5VM#D;F%U8jgZH+_DPpBkv4^A zr!FCl;@#+e&=MP_oBVLF{3_=#Kv@Z+Oz7fCYe&$UI19tICbwsm)qsm3a7$%5L1tr{+fU8L20YkoGL4DIUbhOwS;!D8**a%Rj6Fz>a1w)K z0t~@A!Z85q$7v9bX>>i}2*>6XFIHAyO+?IbVU6MUG8NQHgS9GsRMeV;1(?OCNHR;_ zTZHWg)ZiN{RxtNU?Qj;MZjy{8^0J`vdT$D+#4w;9^-~`7Kj)1qHaxIq`+}(xxeCfb z-!ajIgHwPk9U`zA{y1tS;MSfnGr9E^xk7xqjcS<6K}a%*5#QD7<+GyapL zjIb}+%VFI#km5D8>`bQ(Rnk=@RhPpRaonG`4hzpCbq+#xz(T3gNkL3m$1Q4JNnq(E zI5_8;$+}>{RI?eT8UV4@aI)BjjaW>dH{KoO`ve#w&ea z8BU+$2_c?_F37jN7uw#je={Y0DIeL1MM|NmFhB6gCx>BscQtJi;2NkMfY`pehRW~v zVWFls6f7^(>(FeYf#-)hpYF7nClN-m5@BdMZF6#NYcpjA>`b3Q&)vD0#Q+uag%{1c zZTF^g-GN0vyc@`EemGTtz)bysJl)HWliq-c|L27uZo_D12o}BVi;UKRR8srt>FUVV1 zP~;+F+8Aj4EVv{m;yOoQA!fr$mNrQT5<~#*8ckbBTKEGw%bV#dNQ1?Zpw13dqyZK2 z0282V0azgN3vKYl)JY5n`RE}!W`F`yy(|q%``+qnY9v4=j{1#vto7y1iFH*GlAdnN z$Mcdy8wjga<8Yh7YKpTl%|=E7@0nMj_al#677thYYN#uM0}QaTJAmaV5$v|-ql@$! zUtL%%QIk8t;hKpv$uQh_jV7OKgL;s*`r+VXoqI)m$U2UI^o4k9C%T)_gz(;U#4L5a z@QDx5(yDRNb#*+7e>9(n=>tAOIf!#L1Df2No_YiW`UA15NIb^7Ot4EN6bS&aALvx# z?1OL+2TJ;@c&R!z5>U&5%;Y&k;E`7P)p+UHPCoI4k9Tk|05cJ3Je@Nm4uqf$Q*Iq3 zGb_^7WWLz;Y07%npzPj&g1)VE3ejj!P?TDM8Nm1?=EI5g7PzaEu=whpiP6Bw|zwD;?x! zCIV&i1u}Ox3Eb6T$&NTn`2fb;cR*VG3@BJ%5iGgy`pn9ifpAvonB!!Kg%KON@x!@= zl8HD6PR=2on|2r%LIBNpWZQ7Fu~bJ6?9>k&JiCQjK%wSBAalb(euS|Af-|OX4jN-7 z5+o!B_;(M4Eo~AZn=MpUHjcR)G5RPT;I`cdE|bk6@=HEvWx*r{Tt-89;>n9mp4f`d zb<2LZg3e;baDu}*$~XlR2L?&MP0uJOPUUdxba1tZ_FU#KTX$~e+_2@gNE4kDntOMpv1S(%Tx(F7Rcf%9-HwsAuXu#87`i*9{S z@MWR5pyfL<$deV(HK%*ZRLy6do!R?G#_~Rft;wF2^z z9b#Erx5Ikq*2}eZAqbn!Vlz7xpyEDAATMbFwtV6Wa%*$srDKf6OT8grd5#QxV$?^g z>YS9=OvEG%jI3G!aWMzuAp+KLR3c7+rGQ-wtxVDD9V#kASBxofSJT=-gYe|3^bXXL zIf6#=nG3;|AuemmoiQVqFOtjWCptPL-+`vJ<7l$R{YW}GMl>~=E>d!I}+KH9g&CROSFfPdh4dapR!p$HpU2LFQ-XI9vI7W4j!_>=h0|fP8>6|-W zoy#``(TIfk<{)oQ4f6cU%J1sc=)NIf@V!Hf;Z_hEm%z1sF{u~;9z}3qJ0+ckAme2v zU2Zkt?0{@Mvd3`qR(ydXkoXt%FBemD_ZvN6x{1M<@WVYB5vM&;sR^kRDVVJ9ZnDLA z2;a&CY~wL2rL^!1RLh%bBFsKii>@DV3Jg=ykz}aY1|C-}%T#<0<6swudNmUz2@wYT zt9zdr*Bnt%rqm)D!agZB5N;DPc9z6POcmfV7Q+EMFh=_*dH!2GKuYfO_{QB+;L3P} zIH*~2o?pns8fawtjQHD~548|LRSg8MSuDuNJUj@(Xb4kA3{i*f(WQO#kr))?kc=)4 zXSIw_Vs|V~nR7BSD&I6&&S|7a?kDlcTfTrKpMd6m?zEM4$(G<=zOXoX;5j8_%m+E~ zic25%)H^LLwgO5)^G;n5bJQWG{;>GD^jk?>f+) zI!tXFiv}^<7p@66`>_ph!-LT&6Fl|}iq==^r$Z&UkT$GHxwsOEJ%oc8ozRe53K{2LrKwr|S+ngaa za>(#Ct0vUS2gq1ofiD9zF5sjlt9h;$_*N`mMLr>GT1F{m*>XX z507_0F;pU2ZY~37mN$rlrr)FPBNzB~dOZEWMQOfGadF<+EJ^*An-~8Tg(Y No}n=~`9J9Qe*qis;fVkM literal 0 HcmV?d00001 diff --git a/projects/bucket-protocol/index.js b/projects/bucket-protocol/index.js index c4e070763b5a..444f203a04bb 100644 --- a/projects/bucket-protocol/index.js +++ b/projects/bucket-protocol/index.js @@ -107,9 +107,10 @@ function convertUnderlyingAssets(coin){ // sSUI if(coin === SCALLOP_sSUI) return ADDRESSES.sui.SUI // sbETH - if(coin === SCALLOP_sSB_ETH) return ADDRESSES.sui.WETH + if(coin === SCALLOP_sSB_ETH) return ADDRESSES.sui.ETH // sSCA if(coin === SCALLOP_sSCA) return SCA_ADDRESS + return coin } @@ -168,7 +169,6 @@ async function tvl(api) { /// Since we're unable to fetch the price of Scallop's sCOIN, we'll regard sCOIN as underlying assets const coin = convertUnderlyingAssets(coin_address) - api.add(coin, bucket.fields.collateral_vault); } diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 4fac20d48645..c7f16e8294aa 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1418,7 +1418,8 @@ "USDC_BNB": "0x909cba62ce96d54de25bec9502de5ca7b4f28901747bbf96b76c2e63ec5f1cba::coin::COIN", "BUCK": "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK", "SUI": "0x2::sui::SUI", - "USDC_CIRCLE": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC" + "USDC_CIRCLE": "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC", + "ETH": "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH" }, "grove": { "WGRV": "0xE85f139488c689038028a3EB8fC38dcC29D4C340" From a4c0462cd11f461e9c57f7334800c0ace3cff7a6 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:47:47 +0100 Subject: [PATCH 603/787] Feat: Hyperliquid_Spot (#12570) --- projects/hyperliquid-spot/index.js | 38 ++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/projects/hyperliquid-spot/index.js b/projects/hyperliquid-spot/index.js index ce0db61f4725..fd4550ff1d2d 100644 --- a/projects/hyperliquid-spot/index.js +++ b/projects/hyperliquid-spot/index.js @@ -1,12 +1,40 @@ -const { post } = require('../helper/http') +const ADDRESSES = require('../helper/coreAssets.json') +const axios = require('axios') -async function tvl(api) { - let data= await post('https://api.hyperliquid.xyz/info', {"type":"tvlBreakdown"}) - data = data.find(i => i.protocol === "Hyperliquid Spot DEX") - data.tokens.forEach(i => api.addCGToken('tether', +i.usdcValue)) +const USDC = ADDRESSES.ethereum.USDC +const API_URL = 'https://api.hyperliquid.xyz/info' + +const assetsInfos = async () => { + const payload = { "type": "spotMetaAndAssetCtxs" } + const { data } = await axios.post(API_URL, payload) + + return data[0].tokens.map((token) => { + const ctxToken = data[1].find((item) => item.coin.replace("@", "") == token.index); + return { ...token, ...ctxToken }; + }); +} + +const tvl = async (api) => { + const assets = await assetsInfos() + const payload = { "type": "spotClearinghouseState", "user": "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF" } + const { data } = await axios.post(API_URL, payload) + + const tokens = data.balances.map((token) => { + const tokenHold = assets.find((item) => item.index == token.token) + return { ...token, ...tokenHold } + }) + + const totalBalance = tokens.reduce((sum, token) => { + const total = parseFloat(token.hold || 0); + const markPx = parseFloat(token.markPx || 0); + return sum + (total * markPx); + }, 0); + + return api.add(USDC, totalBalance * 1e6, { skipChain: true }) } module.exports = { + methodology: 'TVL represents assets locked in limit order on the spot order book', misrepresentedTokens: true, hyperliquid: { tvl } } \ No newline at end of file From 8e51816c53a87dfc6e51268c606baf76808f1175 Mon Sep 17 00:00:00 2001 From: Beem Date: Thu, 5 Dec 2024 16:01:34 +0000 Subject: [PATCH 604/787] Radix: RadLock (Token Locker) (#12551) --- projects/radlock/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/radlock/index.js diff --git a/projects/radlock/index.js b/projects/radlock/index.js new file mode 100644 index 000000000000..582eddf4ba34 --- /dev/null +++ b/projects/radlock/index.js @@ -0,0 +1,13 @@ +const { get } = require('../helper/http') + +async function tvl(api) { + const tokensLockedInXrdList = await get('https://api.radlock.io/token/locked?format=list&lpOnly=true') + return { + 'radix': tokensLockedInXrdList.reduce((acc, token) => acc + +token.xrd, 0) + } +} + +module.exports = { + timetravel: false, + radixdlt: { tvl } +} From c49f1f5700a356aa7a9f4a43acf86826d92e807c Mon Sep 17 00:00:00 2001 From: tyler-tsai Date: Thu, 5 Dec 2024 11:03:40 -0500 Subject: [PATCH 605/787] feat: add PSM TVL and new collaterals (#12474) Co-authored-by: Tyler Tsai --- projects/helio-money/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/projects/helio-money/index.js b/projects/helio-money/index.js index 94e1253e48de..a52349426013 100644 --- a/projects/helio-money/index.js +++ b/projects/helio-money/index.js @@ -89,9 +89,25 @@ module.exports = { "0x26c5e01524d2E6280A48F2c50fF6De7e52E9611C", "0xf8Ca8D2B59A97125751af1069d4a5C4F7eB7A677", ], + //solvBTC.BBNB + ["0x1346b618dC92810EC74163e4c27004c921D446a5","0x03DB750d6212C6a0BCa9258E8cB7cf46dfD63067"], + + // USDT +["0x55d398326f99059ff775485246999027b3197955", "0xAd406CcF75f9E6216fA4349635B0cD77D0059b1f"], + + //FDUSD + ["0xc5f0f7b66764f6ec8c8dff7ba683102295e16409","0x2202a491752Fee0E616F06A89E2eF416E2Fcd7e9"], + + + + // vUSDT, PSM - LSR + // ["0x55d398326f99059ff775485246999027b3197955", "0x5763DDeB60c82684F3D0098aEa5076C0Da972ec7"], + ["0xfd5840cd36d94d7229439859c0112a4185bc0255","0xf76D9cFD08dF91491680313B1A5b44307129CDa9"] ], }), pool2, staking: staking('0xd0C380D31DB43CD291E2bbE2Da2fD6dc877b87b3','0xFceB31A79F71AC9CBDCF853519c1b12D379EdC46') }, }; + +// execute with `node test.js projects/helio-money` \ No newline at end of file From 73c8b729596d85494cad1f68d44126eab917be45 Mon Sep 17 00:00:00 2001 From: krishnafractol <137801527+krishnafractol@users.noreply.github.com> Date: Fri, 6 Dec 2024 02:46:10 +0530 Subject: [PATCH 606/787] Defi Listing - Upshift Updated Vault Addresses (#12573) Co-authored-by: krishna7860 --- projects/upshift/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/upshift/index.js b/projects/upshift/index.js index 7dd6c00a84c1..982cb10fab32 100644 --- a/projects/upshift/index.js +++ b/projects/upshift/index.js @@ -1,6 +1,6 @@ const { sumERC4626VaultsExport } = require('../helper/erc4626') const config = { - ethereum: ["0xB7858b66dFA38b9Cb74d00421316116A7851c273", "0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42", "0x18a5a3D575F34e5eBa92ac99B0976dBe26f9F869", "0xEBac5e50003d4B17Be422ff9775043cD61002f7f"], + ethereum: ["0xB7858b66dFA38b9Cb74d00421316116A7851c273", "0x80E1048eDE66ec4c364b4F22C8768fc657FF6A42", "0x18a5a3D575F34e5eBa92ac99B0976dBe26f9F869", "0xEBac5e50003d4B17Be422ff9775043cD61002f7f", "0xd684AF965b1c17D628ee0d77cae94259c41260F4"], avax: ["0x3408b22d8895753C9A3e14e4222E981d4E9A599E"], base: ["0x4e2D90f0307A93b54ACA31dc606F93FE6b9132d2"] } From 807d15caf167f8446714b7d5226b1333c7e48597 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 6 Dec 2024 04:46:59 +0000 Subject: [PATCH 607/787] add lisk and fraxtal --- projects/velodrome-v2/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/velodrome-v2/index.js b/projects/velodrome-v2/index.js index eba9afb904b8..1edd9132b8fe 100644 --- a/projects/velodrome-v2/index.js +++ b/projects/velodrome-v2/index.js @@ -20,6 +20,18 @@ module.exports = { allPairs: 'function allPools(uint256) view returns (address)', }, { useDefaultCoreAssets: true, hasStablePools: true, permitFailure: true, }), }, + lisk: { + tvl: uniTvlExport("0x31832f2a97Fd20664D76Cc421207669b55CE4BC0", undefined, undefined, { + allPairsLength: 'uint256:allPoolsLength', + allPairs: 'function allPools(uint256) view returns (address)', + }, { useDefaultCoreAssets: true, hasStablePools: true, permitFailure: true, }), + }, + fraxtal: { + tvl: uniTvlExport("0x31832f2a97Fd20664D76Cc421207669b55CE4BC0", undefined, undefined, { + allPairsLength: 'uint256:allPoolsLength', + allPairs: 'function allPools(uint256) view returns (address)', + }, { useDefaultCoreAssets: true, hasStablePools: true, permitFailure: true, }), + }, hallmarks: [ [1687465883, "v2 Migration on OP Mainnet"], // https://twitter.com/VelodromeFi/status/1671979216039202816 ] From 761a9dd4e12ec648ea4932b85cf3cf22a91b75eb Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 6 Dec 2024 05:02:45 +0000 Subject: [PATCH 608/787] add lisk and fraxtal and mode --- projects/velodrome-CL/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/velodrome-CL/index.js b/projects/velodrome-CL/index.js index f2b1fc3dc233..4747c74e656a 100644 --- a/projects/velodrome-CL/index.js +++ b/projects/velodrome-CL/index.js @@ -1,7 +1,12 @@ +const factory = require('../helper/abis/uniswap.js') const {getUniTVL} = require('../helper/unknownTokens.js') const config = { optimism: { factory: '0x548118C7E0B865C2CfA94D15EC86B666468ac758'}, + lisk: { factory: '0x04625B046C69577EfC40e6c0Bb83CDBAfab5a55F'}, + fraxtal: { factory: '0x04625B046C69577EfC40e6c0Bb83CDBAfab5a55F'}, + //bob: { factory: '0x04625B046C69577EfC40e6c0Bb83CDBAfab5a55F'}, + mode: { factory: '0x04625B046C69577EfC40e6c0Bb83CDBAfab5a55F'} } Object.keys(config).forEach(chain => { From 9b2f953cfd2c1fae099e46b856f28a4ea2ae70e3 Mon Sep 17 00:00:00 2001 From: 0xLight <109751758+0xLightt@users.noreply.github.com> Date: Fri, 6 Dec 2024 08:48:41 +0000 Subject: [PATCH 609/787] Hermes V2 - Maia V2 - TALOS (#12574) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/hermes-v2/index.js | 13 +++++++++++++ projects/hermes/abi.json | 7 ------- projects/maia-dao/api.js | 5 ++++- 3 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 projects/hermes-v2/index.js delete mode 100644 projects/hermes/abi.json diff --git a/projects/hermes-v2/index.js b/projects/hermes-v2/index.js new file mode 100644 index 000000000000..2ebf35d431c6 --- /dev/null +++ b/projects/hermes-v2/index.js @@ -0,0 +1,13 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') +const { staking } = require('../helper/staking'); + +const stakerAddress = '0x54De3b7b5D1993Db4B2a93C897b5272FBd60e99E' + +module.exports = { + doublecounted: true, + methodology: 'The sum of All staked Uniswap V3 NFTs and burnt Hermes for staked TVL.', + arbitrum: { + tvl: sumTokensExport({ owner: stakerAddress, resolveUniV3: true}), + staking: staking('0x3A0000000000E1007cEb00351F65a1806eCd937C', '0x45940000009600102A1c002F0097C4A500fa00AB'), + }, +}; diff --git a/projects/hermes/abi.json b/projects/hermes/abi.json deleted file mode 100644 index f1669f797da1..000000000000 --- a/projects/hermes/abi.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "poolInfo": "function poolInfo(uint256) view returns (address lpToken, uint256 allocPoint, uint256 lastRewardBlock, uint256 accIrisPerShare, uint16 depositFeeBP, uint256 lpSupply)", - "balance": "uint256:balance", - "balanceof": "function balanceOf(address) view returns (uint256)", - "token0": "address:token0", - "token1": "address:token1" -} \ No newline at end of file diff --git a/projects/maia-dao/api.js b/projects/maia-dao/api.js index 55e19de8f535..71364f816661 100644 --- a/projects/maia-dao/api.js +++ b/projects/maia-dao/api.js @@ -4,5 +4,8 @@ module.exports = { metis: { tvl: () => 0, staking: staking('0xD7a586CE5250bEfaB2cc2239F7226B9602536E6A', '0x72c232D56542Ba082592DEE7C77b1C6CFA758BCD') - } + }, + arbitrum: { + staking: staking('0x000000f0C01c6200354f240000b7003668B4D080', '0x00000000ea00F3F4000e7Ed5Ed91965b19f1009B'), // v2 + }, } \ No newline at end of file From 3c6c7e8b2f4f2263f48eb660afc833dc7923b1ef Mon Sep 17 00:00:00 2001 From: Yuyin <106600353+yuyin-zhang@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:50:43 +1100 Subject: [PATCH 610/787] Add Agdex Adapter (#12572) Co-authored-by: liuxieric123 --- projects/agdex/index.js | 82 +++++++++++++++++++++++++++++++++++++++++ projects/helper/http.js | 1 + 2 files changed, 83 insertions(+) create mode 100644 projects/agdex/index.js diff --git a/projects/agdex/index.js b/projects/agdex/index.js new file mode 100644 index 000000000000..fe7f5b05adce --- /dev/null +++ b/projects/agdex/index.js @@ -0,0 +1,82 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { function_view } = require("../helper/chain/aptos"); + +const primary_fungible_asset_balance = "0x1::primary_fungible_store::balance" +const AGDEX = + "0xfa69897532f069bc0806868eaeec3328727d90c0cec710a17dde327e0bfab44f"; +const lzUSDC = + ADDRESSES.aptos.USDC_2; +const USDT = + ADDRESSES.aptos.USDT_2; +const APT = + ADDRESSES.aptos.APT; +const BTC = + ADDRESSES.aptos.CELER_WBTC; +const ETH = + ADDRESSES.aptos.CELER_ETH; + +const usdc_resource_account = "0x19fb80bd79fa8f7538404af85196396973e3fbbda1503495598172c8813f7ca5"; +const usdc_metadata = "0x2b3be0a97a73c87ff62cbdd36837a9fb5bbd1d7f06a73b7ed62ec15c5326c1b8"; + +const usdt_resource_account = "0xbb3c1b88599c563062e2b08fe3a92ab048d700f9aa44617c680d59a4aa69b23f"; +const usdt_metadata = "0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b"; + +const eth_resource_account = "0x38bca0c288df1e13d9a30d33c4ce8ee778333c52bd4e730b49c6c9379be39b10"; +const eth_metadata = "0xae02f68520afd221a5cd6fda6f5500afedab8d0a2e19a916d6d8bc2b36e758db"; + +const btc_resource_account = "0x70d303ed5dbfbae1f5ac76d50d5073f69a7115dfdfa737e82bb7c3c9364b3d17"; +const btc_metadata = "0xa64d2d6f5e26daf6a3552f51d4110343b1a8c8046d0a9e72fa4086a337f3236c"; + +const apt_resource_account = "0x8afc7aaa4616c0defbe655f3928a72ff849ef9a6889178f1c18c7c3ad006ebf7"; +const apt_metadata = "0xa"; + +async function tvl(api) { + const usdc_value = + await function_view({ + "functionStr": primary_fungible_asset_balance, + "type_arguments": ["0x1::fungible_asset::Metadata"], + "args": [usdc_resource_account, usdc_metadata] + }); + api.add(lzUSDC, usdc_value); + + const usdt_value = + await function_view({ + "functionStr": primary_fungible_asset_balance, + "type_arguments": ["0x1::fungible_asset::Metadata"], + "args": [usdt_resource_account, usdt_metadata] + }); + api.add(lzUSDC, usdc_value); + + const eth_value = + await function_view({ + "functionStr": primary_fungible_asset_balance, + "type_arguments": ["0x1::fungible_asset::Metadata"], + "args": [eth_resource_account, eth_metadata] + }); + api.add(lzUSDC, eth_value); + + const btc_value = + await function_view({ + "functionStr": primary_fungible_asset_balance, + "type_arguments": ["0x1::fungible_asset::Metadata"], + "args": [btc_resource_account, btc_metadata] + }); + api.add(lzUSDC, btc_value); + + const apt_value = + await function_view({ + "functionStr": primary_fungible_asset_balance, + "type_arguments": ["0x1::fungible_asset::Metadata"], + "args": [apt_resource_account, apt_metadata] + }); + api.add(lzUSDC, usdc_value); + api.add(BTC, btc_value); + api.add(ETH, eth_value); + api.add(USDT, usdt_value); + api.add(APT, apt_value); +} + +module.exports = { + timetravel: false, + aptos: { tvl }, +}; diff --git a/projects/helper/http.js b/projects/helper/http.js index e682d45ac452..2f9d9d485250 100644 --- a/projects/helper/http.js +++ b/projects/helper/http.js @@ -44,6 +44,7 @@ async function post(endpoint, body, options) { return data } catch (e) { sdk.log(e.message) + console.log(e) throw new Error(`Failed to post ${endpoint}`) } } From f3ccfaf26005cc9837ac5b709ad66118a363245a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:55:29 +0100 Subject: [PATCH 611/787] remove log messages --- projects/2pi/index.js | 1 - projects/atrix.js | 279 +-------------------------- projects/blum/index.js | 1 - projects/cellana/index.js | 3 +- projects/helper/http.js | 1 - projects/hub3-ee/index.js | 73 +------ projects/lifinity-v2/index.js | 1 - projects/limitless/index.js | 1 - projects/liquix/index.js | 1 - projects/lyra-v2/index.js | 1 - projects/mira-ly/index.js | 1 - projects/openeden-tbill/index.js | 1 - projects/platypus-finance/index.js | 1 - projects/shadeprotocol-lend/index.js | 1 - projects/solar-studios/index.js | 1 - projects/tangible/index.js | 1 - projects/zombie-network/index.js | 1 - 17 files changed, 4 insertions(+), 365 deletions(-) diff --git a/projects/2pi/index.js b/projects/2pi/index.js index 81f8967c2833..4ce6d7fc0c0a 100644 --- a/projects/2pi/index.js +++ b/projects/2pi/index.js @@ -27,7 +27,6 @@ const tvl = async (api) => { tokens.push(res[i][j].want) } } - console.log(res, api.chain) const bals = await api.multiCall({ abi: archimedesAbi.balance, calls}) api.add(tokens, bals) } diff --git a/projects/atrix.js b/projects/atrix.js index b1a9202997ad..fcb5249d9d27 100644 --- a/projects/atrix.js +++ b/projects/atrix.js @@ -1,29 +1,7 @@ -const { sumTokens2, getConnection , getProvider} = require('./helper/solana') -// const { getConfig } = require('./helper/cache') -// const { PublicKey, } = require("@solana/web3.js"); -// const { TokenAmountLayout, } = require("./helper/utils/solana/layouts/raydium-layout"); -// const { Program } = require('@project-serum/anchor'); +const { sumTokens2, } = require('./helper/solana') async function tvl() { - // previously we were incorrectly counting all tokens in serum pools as atrix tvl return sumTokens2({ owner: '3uTzTX5GBSfbW7eM9R9k95H7Txe32Qw3Z25MtyD2dzwC', }) -/* const connection = getConnection() - const provider = getProvider() - const program = new Program(idl, 'HvwYjjzPbXWpykgVZhqvvfeeaSraQVnTiQibofaFw9M7', provider) - - const acc = await program.account.poolAccount.all() - const tokenAccounts = acc.map(({ account:i}) => [i.poolCoinAccount, i.poolPcAccount, ]).flat() - - console.log(tokenAccounts, tokenAccounts.length) - return sumTokens2({ tokenAccounts }) - return {} - const auth = 'CmiPgGfWeteicRisWRuJzn7L649zWpw9Qya8g3ey9cZt' - - console.time('raydium: ammV4Tvl fetching vault balances') - const allPoolVaultAmount = await connection.getProgramAccounts(new PublicKey('TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'), { filters: [{ dataSize: 165 }, { memcmp: { offset: 32, bytes: auth } }], dataSlice: { offset: 64, length: TokenAmountLayout.span } }) - console.timeEnd('raydium: ammV4Tvl fetching vault balances') - console.log(allPoolVaultAmount.length, 'fetched vault amounts') - return {} */ } @@ -34,257 +12,4 @@ module.exports = { [1665521360, "Mango Markets Hack"], [1667865600, "FTX collapse"] ], -} -/* -const idl = { - "version": "0.0.0", - "name": "atrix", - "instructions": [], - "accounts": [ - { - "name": "ProtocolAccount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "authority", - "type": "publicKey" - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "lpFeeNumerator", - "type": "u16" - }, - { - "name": "protocolFeeNumerator", - "type": "u16" - }, - { - "name": "feeDenominator", - "type": "u16" - }, - { - "name": "maxCancelPerIx", - "type": "u8" - }, - { - "name": "maxPlacePerIx", - "type": "u8" - }, - { - "name": "maxPlacePostLiq", - "type": "u8" - }, - { - "name": "orderProportionNumerators", - "type": { - "array": [ - "u16", - 12 - ] - } - }, - { - "name": "orderProportionLen", - "type": "u8" - }, - { - "name": "orderProportionDenominator", - "type": "u16" - }, - { - "name": "crankSolAccount", - "type": "publicKey" - }, - { - "name": "poolInitCrankFee", - "type": "u64" - }, - { - "name": "solBond", - "type": "u64" - } - ] - } - }, - { - "name": "PoolAccount", - "type": { - "kind": "struct", - "fields": [ - { - "name": "coinMint", - "type": "publicKey" - }, - { - "name": "pcMint", - "type": "publicKey" - }, - { - "name": "market", - "type": "publicKey" - }, - { - "name": "openOrders", - "type": "publicKey" - }, - { - "name": "poolCoinAccount", - "type": "publicKey" - }, - { - "name": "poolPcAccount", - "type": "publicKey" - }, - { - "name": "poolLpAccount", - "type": "publicKey" - }, - { - "name": "lpMint", - "type": "publicKey" - }, - { - "name": "firstPlaced", - "type": "bool" - }, - { - "name": "orderIndex", - "type": "u8" - }, - { - "name": "lpFee", - "type": "u64" - }, - { - "name": "stableFee", - "type": "u64" - }, - { - "name": "ixi", - "type": "u8" - }, - { - "name": "icx", - "type": "u8" - }, - { - "name": "clientOrderId", - "type": "u64" - }, - { - "name": "orderProportionNumerators", - "type": { - "array": [ - "u16", - 12 - ] - } - }, - { - "name": "poolType", - "type": "u8" - }, - { - "name": "stableswapAmpCoef", - "type": "u64" - }, - { - "name": "coinDecimals", - "type": "u8" - }, - { - "name": "pcDecimals", - "type": "u8" - }, - { - "name": "lastAskCoin", - "type": "u64" - }, - { - "name": "lastAskPc", - "type": "u64" - }, - { - "name": "lastBidCoin", - "type": "u64" - }, - { - "name": "lastBidPc", - "type": "u64" - }, - { - "name": "version", - "type": "u64" - }, - { - "name": "placedAsks", - "type": { - "array": [ - { - "defined": "PlacedOrder" - }, - 12 - ] - } - }, - { - "name": "placedBids", - "type": { - "array": [ - { - "defined": "PlacedOrder" - }, - 12 - ] - } - }, - { - "name": "pca", - "type": "u64" - }, - { - "name": "ppca", - "type": "u64" - }, - { - "name": "mmActive", - "type": "bool" - } - ] - } - } - ], - "types": [ - { - "name": "PlacedOrder", - "type": { - "kind": "struct", - "fields": [ - { - "name": "limitPrice", - "type": "u64" - }, - { - "name": "coinQty", - "type": "u64" - }, - { - "name": "maxNativePcQtyIncludingFees", - "type": "u64" - }, - { - "name": "clientOrderId", - "type": "u64" - } - ] - } - } - ], - "events": [], - "errors": [] -} - */ +} \ No newline at end of file diff --git a/projects/blum/index.js b/projects/blum/index.js index 004fb2f81041..53d9ebd14c22 100644 --- a/projects/blum/index.js +++ b/projects/blum/index.js @@ -5,7 +5,6 @@ const { getConfig } = require("../helper/cache") async function fetchTvl(api) { const res = await getConfig('blum', 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=blum') - console.log(res) await sumTokens({ api, tokens: [ADDRESSES.ton.TON], owners: res, onlyWhitelistedTokens: true, }) } diff --git a/projects/cellana/index.js b/projects/cellana/index.js index c4627078cd7d..ff92478766dc 100644 --- a/projects/cellana/index.js +++ b/projects/cellana/index.js @@ -34,7 +34,7 @@ module.exports = { "Counts the lamports in each coin container in the Cellena contract account.", aptos: { - tvl: async (_, _1, _2, { api }) => { + tvl: async (api) => { const data = await _getResources() const coinContainers = data.filter(reserveContrainerFilter) @@ -48,7 +48,6 @@ module.exports = { }); //get funible asset balance await getfungibleAssetBalances(api) - console.log(api) } } } \ No newline at end of file diff --git a/projects/helper/http.js b/projects/helper/http.js index 2f9d9d485250..e682d45ac452 100644 --- a/projects/helper/http.js +++ b/projects/helper/http.js @@ -44,7 +44,6 @@ async function post(endpoint, body, options) { return data } catch (e) { sdk.log(e.message) - console.log(e) throw new Error(`Failed to post ${endpoint}`) } } diff --git a/projects/hub3-ee/index.js b/projects/hub3-ee/index.js index 1ae76f86a86c..369792591d7f 100644 --- a/projects/hub3-ee/index.js +++ b/projects/hub3-ee/index.js @@ -1,19 +1,6 @@ const { PublicKey } = require("@solana/web3.js"); -const { sumTokens2, getProvider, getConnection, } = require("../helper/solana"); -const { Program } = require("@project-serum/anchor"); -const sdk = require('@defillama/sdk') +const { getConnection, } = require("../helper/solana"); -async function _tvl() { - const provider = getProvider(); - const programId = new PublicKey("2pi53pUUC5S4zyUU6Wrbe6EfYXS9LNcpikpwPFahtQQw"); - const program = new Program(sharesIDL, programId, provider); - let accounts = await program.account.issuer.all(); - accounts = accounts.filter(i => +i.account.holders > 0) - accounts.sort((a, b) => +b.account.holders - a.account.holders) - sdk.log(accounts.length) - console.log(accounts.slice(0, 10).map(i => i.account.span)) - return sumTokens2({ solOwners: accounts.map(i => i.publicKey) }) -} async function tvl() { const programId = new PublicKey("2pi53pUUC5S4zyUU6Wrbe6EfYXS9LNcpikpwPFahtQQw"); @@ -36,61 +23,3 @@ module.exports = { tvl, }, }; - -const sharesIDL = { - version: '0.1.0', - name: 'shares', - instructions: [], - accounts: [ - { - name: 'issuer', - type: { - kind: 'struct', - fields: [ - { - name: 'issuerKey', - type: 'publicKey' - }, - { - name: 'price', - type: 'u64' - }, - { - name: 'totalShares', - type: 'u64' - }, - { - name: 'totalFees', - type: 'u64' - }, - { - name: 'bump', - type: 'u8' - }, - { - name: 'holders', - type: 'u32' - }, - { - name: 'migration', - type: 'bool' - }, - { - name: 'a', - type: 'u64' - }, - { - name: 'b', - type: 'u64' - }, - { - name: 'd', - type: 'u64' - } - ] - } - }, - ], - errors: [] -} -//test it diff --git a/projects/lifinity-v2/index.js b/projects/lifinity-v2/index.js index 846353ac456f..7debe1a2d3ee 100644 --- a/projects/lifinity-v2/index.js +++ b/projects/lifinity-v2/index.js @@ -3,7 +3,6 @@ const { Program } = require("@project-serum/anchor"); async function getTokenAccounts(programId, idl, chain) { const provider = getProvider(chain) - console.log(programId, chain) const program = new Program(idl, programId, provider) const data = await program.account.amm.all() return data.map(({ account: { tokenAAccount, tokenBAccount }}) => ([tokenAAccount, tokenBAccount,])).flat() diff --git a/projects/limitless/index.js b/projects/limitless/index.js index da315123fc9b..04cd5775160d 100644 --- a/projects/limitless/index.js +++ b/projects/limitless/index.js @@ -108,7 +108,6 @@ Object.keys(config).forEach(chain => { } }) - console.log(provided.length, withdrawn.length) const pools = getUniqueAddresses(provided.map(entry => entry.pool).concat(withdrawn.map(entry => entry.pool))) const token0s = await api.multiCall({ abi: 'address:token0', calls: pools}) const token1s = await api.multiCall({ abi: 'address:token1', calls: pools}) diff --git a/projects/liquix/index.js b/projects/liquix/index.js index 9df6fa82d202..5f699b26c41b 100644 --- a/projects/liquix/index.js +++ b/projects/liquix/index.js @@ -46,7 +46,6 @@ Object.keys(config).forEach((chain) => { fromBlock, }); const vaults = logs.map(i => i.proxyAddress) - console.log(vaults.length) const _balances = await api.multiCall({ abi: 'function totalUnderlying(address vault_) external view returns ((address,uint256)[] memory)', target: helper, calls: vaults, permitFailure: true, }) for (const balances of _balances) { if (!balances) continue; diff --git a/projects/lyra-v2/index.js b/projects/lyra-v2/index.js index cc0875f99323..1c119dda7ac3 100644 --- a/projects/lyra-v2/index.js +++ b/projects/lyra-v2/index.js @@ -21,7 +21,6 @@ chains.forEach(chain => { tvl: async (api) => { const oldToA = await getOldToA(api) const toa = await getToA(api) - console.log(chain, oldToA.concat(toa)) return sumTokens2({ tokensAndOwners: oldToA.concat(toa), api }) } } diff --git a/projects/mira-ly/index.js b/projects/mira-ly/index.js index 83252fe01dd2..d59f9d69b473 100644 --- a/projects/mira-ly/index.js +++ b/projects/mira-ly/index.js @@ -8,7 +8,6 @@ async function tvl(api) { // const provider = await fuels.Provider.create('https://mainnet.fuel.network/v1/graphql') // const contract = new fuels.Contract(contractId, abi, provider) // const { value } = await contract.functions.total_assets().get() - // console.log(contract.functions, +value) return sumTokens({ api, owner: contractId, }) } diff --git a/projects/openeden-tbill/index.js b/projects/openeden-tbill/index.js index b917bf45ccc1..60db9f3ded91 100644 --- a/projects/openeden-tbill/index.js +++ b/projects/openeden-tbill/index.js @@ -16,7 +16,6 @@ async function evmTvl(api) { async function solTvl (api) { const res = await getTokenSupplies([solTbill]) - console.log(res) Object.entries(res).forEach(([token, balance]) => { api.add(token, balance) }) diff --git a/projects/platypus-finance/index.js b/projects/platypus-finance/index.js index cf16de413e2c..829b2a02dd65 100644 --- a/projects/platypus-finance/index.js +++ b/projects/platypus-finance/index.js @@ -15,7 +15,6 @@ const query = `{ async function tvl(api) { if (api.timestamp > +new Date("2023-02-17") / 1e3) blacklistedTokens.push("0xdaCDe03d7Ab4D81fEDdc3a20fAA89aBAc9072CE2") // USP was hacked const { pools } = await cachedGraphQuery("platypus-finance", sdk.graph.modifyEndpoint('Bu5QPRWGnZB6NxU4S7kAKQZJpY4pHmAq3TV69V1W2Qqw'), query) - console.log(pools) const tokensAndOwners = pools.map(i => i.assetsList.map(v => [v.token.id, v.id])).flat() return sumTokens2({ api, tokensAndOwners, blacklistedTokens }); } diff --git a/projects/shadeprotocol-lend/index.js b/projects/shadeprotocol-lend/index.js index a1ab55b5cd97..3a83ae9401ff 100644 --- a/projects/shadeprotocol-lend/index.js +++ b/projects/shadeprotocol-lend/index.js @@ -3,7 +3,6 @@ const { post } = require("../helper/http") async function getData(api) { const isoTimestamp = new Date((api.timestamp - 5 * 60 * 60) * 1000).toISOString() const { data: { lendStatsHistories } } = await post('https://prodv1.securesecrets.org/graphql', { "operationName": "getLendHistory", "variables": { "intervalIso": isoTimestamp }, "query": "query getLendHistory($intervalIso: String!) {\n lendStatsHistories(\n query: {where: {time: {gte: $intervalIso}}, orderBy: {time: \"desc\"}}\n ) {\n averageLtv\n collateralUsd\n debtAmount\n debtUsd\n time\n __typename\n }\n}" }) - console.log(lendStatsHistories.length) return lendStatsHistories[0] } diff --git a/projects/solar-studios/index.js b/projects/solar-studios/index.js index c519ab923f3a..d82c37f8b966 100644 --- a/projects/solar-studios/index.js +++ b/projects/solar-studios/index.js @@ -9,7 +9,6 @@ async function tvl(api) { const idl = await Program.fetchIdl(programId, provider) const program = new Program(idl, programId, provider) const data = await program.account.poolState.all() - console.log(data.length) const tokenAccounts = data.map(({ account: { token0Vault, token1Vault }}) => ([token0Vault, token1Vault,])).flat() return sumTokens2({ tokenAccounts, api, }) } diff --git a/projects/tangible/index.js b/projects/tangible/index.js index bf48c1b3dedd..6faa980f3eb8 100644 --- a/projects/tangible/index.js +++ b/projects/tangible/index.js @@ -11,7 +11,6 @@ const realTvl = async (api) => { const basketManager = '0x5e581ce0472bF528E7F5FCB96138d7759AC2ac3f'.toLowerCase() // get all baskets in existance const baskets = await api.call({ abi: 'address[]:getBasketsArray', target: basketManager }) - console.log(baskets) const basketTVL = await api.multiCall({ abi: 'uint256:getTotalValueOfBasket', calls: baskets}) api.add(USTB, basketTVL) } diff --git a/projects/zombie-network/index.js b/projects/zombie-network/index.js index 2cc2b3a6154d..019f19b31c16 100644 --- a/projects/zombie-network/index.js +++ b/projects/zombie-network/index.js @@ -11,7 +11,6 @@ async function staking(api) { const bloodPrice = klayBalance / bldBalance const staking = stakingBalance * bloodPrice / 1e18 - console.log('staking', staking, klayBalance, bldBalance, stakingBalance, bloodPrice) api.addCGToken('klay-token', staking) } From 4fe47f6eeb42f949204e962493f5618fe3e4dcfb Mon Sep 17 00:00:00 2001 From: Zorag44 <75122924+Zorag44@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:26:45 +0530 Subject: [PATCH 612/787] added new pools (#12575) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/alphafi/index.js | 117 ++++++++++++++++++++++++++++---------- 1 file changed, 86 insertions(+), 31 deletions(-) diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index fa3f7404d659..e1ca78109153 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -1,68 +1,73 @@ const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui") const { addUniV3LikePosition } = require("../helper/unwrapLPs") +const { log } = require('../helper/utils') const ALPHAFI_CETUS_TVL_IDS = [ { - +//usdt wusdc poolID: "0x30066d9879374276dc01177fbd239a9377b497bcd347c82811d75fcda35b18e5", - cetusPoolID: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20", + parentPoolID: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20", investorID: "0x87a76889bf4ed211276b16eb482bf6df8d4e27749ebecd13017d19a63f75a6d5", token0Type: ADDRESSES.sui.USDT, token1Type: ADDRESSES.sui.USDC }, - { + { //usdy wusdc poolID: "0xa7239a0c727c40ee3a139689b16b281acfd0682a06c23531b184a61721ece437", - cetusPoolID: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d", + parentPoolID: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d", investorID: "0x1b923520f19660d4eb013242c6d03c84fdea034b8f784cfd71173ef72ece50e1", token0Type: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY", token1Type: ADDRESSES.sui.USDC }, - { + { //wusdc sui poolID: "0xee6f6392cbd9e1997f6e4cf71db0c1ae1611f1f5f7f23f90ad2c64b8f23cceab", - cetusPoolID: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630", + parentPoolID: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630", investorID: "0xb6ca8aba0fb26ed264a3ae3d9c1461ac7c96cdcbeabb01e71086e9a8340b9c55", token0Type: ADDRESSES.sui.USDC, token1Type: ADDRESSES.sui.SUI }, { + //wusdc wbtc poolID: "0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a", - cetusPoolID: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042", + parentPoolID: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042", investorID: "0x9ae0e56aa0ebc27f9d8a17b5a9118d368ba262118d878977b6194a10a671bbbc", token0Type: ADDRESSES.sui.USDC, token1Type: ADDRESSES.sui.WBTC }, { + // weth wusdc poolID: "0xbdf4f673b34274f36be284bca3f765083380fefb29141f971db289294bf679c6", - cetusPoolID: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df", + parentPoolID: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df", investorID: "0x05fa099d1df7b5bfb2e420d5ee2d63508db17c40ce7c4e0ca0305cd5df974e43", token0Type: ADDRESSES.sui.WETH, token1Type: ADDRESSES.sui.USDC }, - { + { //navx sui poolID: "0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0", - cetusPoolID: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703", + parentPoolID: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703", investorID: "0xdd9018247d579bd7adfdbced4ed39c28821c6019461d37dbdf32f0d409959b1c", token0Type: "0xa99b8952d4f7d947ea77fe0ecdcc9e5fc0bcab2841d6e2a5aa00c3044e5544b5::navx::NAVX", token1Type: ADDRESSES.sui.SUI }, { + // buck wusdc poolID: "0x59ff9c5df31bfd0a59ac8393cf6f8db1373252e845958953e6199952d194dae4", - cetusPoolID: "0x81fe26939ed676dd766358a60445341a06cea407ca6f3671ef30f162c84126d5", + parentPoolID: "0x81fe26939ed676dd766358a60445341a06cea407ca6f3671ef30f162c84126d5", investorID: "0x8051a9ce43f9c21e58331b1ba2b1925e4ae4c001b1400459236d86d5d3d2888b", token0Type: ADDRESSES.sui.BUCK, token1Type: ADDRESSES.sui.USDC }, - { + {//wsol wusdc poolID: "0xd50ec46c2514bc8c588760aa7ef1446dcd37993bc8a3f9e93563af5f31b43ffd", - cetusPoolID: "0x9ddb0d269d1049caf7c872846cc6d9152618d1d3ce994fae84c1c051ee23b179", + parentPoolID: "0x9ddb0d269d1049caf7c872846cc6d9152618d1d3ce994fae84c1c051ee23b179", investorID: "0x74308f0de7ea1fc4aae2046940522f8f79a6a76db94e1227075f1c2343689882", token0Type: ADDRESSES.sui.SOL, token1Type: ADDRESSES.sui.USDC }, { + //sca sui poolID: "0x6eec371c24ad264ced3a1f40b83d7d720aa2b0afa860a6af85436f6a769842e1", - cetusPoolID: "0xaa72bd551b25715b8f9d72f226fa02526bdf2e085a86faec7184230c5209bb6e", + parentPoolID: "0xaa72bd551b25715b8f9d72f226fa02526bdf2e085a86faec7184230c5209bb6e", investorID: "0x651acc1166023a08c17f24e71550982400e9b1f4950cc1324410300efc1af905", token0Type: "0x7016aae72cfc67f2fadf55769c0a7dd54291a583b63051a5ed71081cce836ac6::sca::SCA", token1Type: ADDRESSES.sui.SUI @@ -70,7 +75,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ // usdc sui { poolID: "0x727882553d1ab69b0cabad2984331e7e39445f91cb4046bf7113c36980685528", - cetusPoolID: "0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105", + parentPoolID: "0xb8d7d9e66a60c239e7a60110efcf8de6c705580ed924d0dde141f4a0e2c90105", investorID: "0xba6acd0350eab1c6bc433b6c869e5592fe0667ae96a3115f89d5c79dd78396ef", token0Type: ADDRESSES.sui.USDC_CIRCLE, token1Type: ADDRESSES.sui.SUI @@ -78,7 +83,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ // usdc usdt { poolID: "0xa213f04c6049f842a7ffe7d39e0c6138a863dc6e25416df950d23ddb27d75661", - cetusPoolID: "0x6bd72983b0b5a77774af8c77567bb593b418ae3cd750a5926814fcd236409aaa", + parentPoolID: "0x6bd72983b0b5a77774af8c77567bb593b418ae3cd750a5926814fcd236409aaa", investorID: "0xe553be450b7290025d5810da45102abdbaa211c5735e47f6740b4dd880edc0bd", token0Type: ADDRESSES.sui.USDC_CIRCLE, token1Type: ADDRESSES.sui.USDT @@ -86,7 +91,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ // usdc wusdc { poolID: "0x568a47adf2b10219f0973a5600096822b38b4a460c699431afb6dad385614d66", - cetusPoolID: "0x1efc96c99c9d91ac0f54f0ca78d2d9a6ba11377d29354c0a192c86f0495ddec7", + parentPoolID: "0x1efc96c99c9d91ac0f54f0ca78d2d9a6ba11377d29354c0a192c86f0495ddec7", investorID: "0x6cc5e671a2a6e9b8c8635ff1fb16ae62abd7834558c3a632d97f393c0f022972", token0Type: ADDRESSES.sui.USDC_CIRCLE, token1Type: ADDRESSES.sui.USDC @@ -94,7 +99,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ // usdc eth { poolID: "0xc04f71f32a65ddf9ebf6fb69f39261457da28918bfda5d3760013f3ea782a594", - cetusPoolID: "0x9e59de50d9e5979fc03ac5bcacdb581c823dbd27d63a036131e17b391f2fac88", + parentPoolID: "0x9e59de50d9e5979fc03ac5bcacdb581c823dbd27d63a036131e17b391f2fac88", investorID: "0xb0bff60783536f9dc0b38e43150a73b73b8a4f1969446f7721e187821915bd00", token0Type: ADDRESSES.sui.USDC_CIRCLE, token1Type: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH" @@ -102,7 +107,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ // deep sui { poolID: "0xff496f73a1f9bf7461882fbdad0c6c6c73d301d3137932f7fce2428244359eaa", - cetusPoolID: "0xe01243f37f712ef87e556afb9b1d03d0fae13f96d324ec912daffc339dfdcbd2", + parentPoolID: "0xe01243f37f712ef87e556afb9b1d03d0fae13f96d324ec912daffc339dfdcbd2", investorID: "0x5e195363175e4b5139749d901ddd5ef1ffc751777a7051b558c45fa12f24abc3", token0Type: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP", token1Type: ADDRESSES.sui.SUI @@ -110,7 +115,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ // buck sui { poolID: "0xeb44ecef39cc7873de0c418311557c6b8a60a0af4f1fe1fecece85d5fbe02ab5", - cetusPoolID: "0x59cf0d333464ad29443d92bfd2ddfd1f794c5830141a5ee4a815d1ef3395bf6c", + parentPoolID: "0x59cf0d333464ad29443d92bfd2ddfd1f794c5830141a5ee4a815d1ef3395bf6c", investorID: "0x9b7c9b6086d3baf413bccdfbb6f60f04dedd5f5387dee531eef5b811afdfaedc", token0Type: ADDRESSES.sui.BUCK, token1Type: ADDRESSES.sui.SUI @@ -118,13 +123,45 @@ const ALPHAFI_CETUS_TVL_IDS = [ // fud sui { poolID: "0x005a2ebeb982a1e569a54795bce1eeb4d88900b674440f8487c2846da1706182", - cetusPoolID: "0xfc6a11998f1acf1dd55acb58acd7716564049cfd5fd95e754b0b4fe9444f4c9d", + parentPoolID: "0xfc6a11998f1acf1dd55acb58acd7716564049cfd5fd95e754b0b4fe9444f4c9d", investorID: "0xaa17ff01024678a94381fee24d0021a96d4f3a11855b0745facbb5d2eb9df730", token0Type: "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD", token1Type: ADDRESSES.sui.SUI }, ] +const ALPHAFI_BLUEFIN_TVL_IDS = [ + { //sui usdc + poolID: "0x99b9bd1d07690a658b9723509278b83715f7c4bec2bc5983316c002b597dfabd", + parentPoolID: "0x3b585786b13af1d8ea067ab37101b6513a05d2f90cfe60e8b1d9e1b46a63c4fa", + investorID: "0x863909d3ced121e06053dec3fd2cb08ecda4c54607ad1b3f4fc8c75267c8012c", + token0Type: ADDRESSES.sui.SUI, + token1Type: ADDRESSES.sui.USDC_CIRCLE + }, + { //usdt usdc + poolID: "0x8d9220587b2969429c517e76b3695f01cb3749849d69937c4140a6715bf14c7f", + parentPoolID: "0x0321b68a0fca8c990710d26986ba433d06b351deba9384017cd6175f20466a8f", + investorID: "0x114bf16bd3504d6f491e35152d54f5340d66d7c6abaca7689b9081cd3af0cd93", + token0Type: ADDRESSES.sui.USDT, + token1Type: ADDRESSES.sui.USDC_CIRCLE + }, + { //sui BUCK + poolID: "0x58c4a8c5d18c61156e1a5a82811fbf71963a4de3f5d52292504646611a308888", + parentPoolID: "0xe63329f43a9474d421be85ff270bafc04667b811d215d4d4ee2512bcf2713896", + investorID: "0xc04ef6923ae5cf047cf853d2fa809ab56dbe712ca95f87c5f3c12dcfe66f7ecd", + token0Type: ADDRESSES.sui.SUI, + token1Type: ADDRESSES.sui.BUCK + }, + { //AUSD usdc + poolID: "0x8ed765497eeedf7960af787c0c419cb2c01c471ab47682a0619e8588c06a9aa6", + parentPoolID: "0x881639630836b703aa3e04898f8a3740584859838d986619d0ee0f63a784c078", + investorID: "0x1f9f325dfb23a3516679cd7bda58c26791b2a34c40ce5e1cd88ee6f8361a0ea6", + token0Type: "0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD", + token1Type: ADDRESSES.sui.USDC_CIRCLE + }, + +] + const ALPHAFI_NAVI_TVL_IDS = [ { poolID: "0x643f84e0a33b19e2b511be46232610c6eb38e772931f582f019b8bbfb893ddb3", @@ -173,12 +210,30 @@ const ALPHAFI_NAVI_TVL_IDS = [ }, ] const ALPHAFI_NAVI_LOOP_TVL_IDS = [ - { + { //sui vsui poolID: "0xd013a1a0c6f2bad46045e3a1ba05932b4a32f15864021d7e0178d5c2fdcc85e3", - investorID: "0x36cc3135c255632f9275a5b594145745f8344ce8f6e46d9991ffb17596195869", + investorID: "0x36cc3135c255632f9275a5b594145745f8344ce8f6e46d9991ffb17596195869", tokenType: "0x549e8b69270defbfafd4f94e17ec44cdbdd99820b33bda2278dea3b9a32d3f55::cert::CERT", expo: 9 }, + { //usdt usdc + poolID: "0xdd886dd4828a44b7ae48bb7eaceca1cecedd1dcc06174f66ee398dc0feb71451", + investorID: "0xe512e692f4d48a79abcfd5970ccb44d6f7f149e81bb077ccd58b89d4ab557d0e", + tokenType: ADDRESSES.sui.USDT, + expo: 6 + }, + { //usdc usdt + poolID: "0xb90c7250627e0113df2e60d020df477cac14ca78108e3c5968230f3e7d4d8846", + investorID: "0x3b9fe28a07e8dd5689f3762ba45dbdf10bd5f7c85a14432928d9108a61ef2dc2", + tokenType: ADDRESSES.sui.USDC_CIRCLE, + expo: 6 + }, + { //hasui sui + poolID: "0x4b22c2fc59c7697eea08c1cc1eadf231415d66b842875ba4730a8619efa38ced", + investorID: "0xa65eaadb556a80e4cb02fe35efebb2656d82d364897530f45dabc1e99d15a8a9", + tokenType: "0xbde4ba4c2e274a60ce15c1cfff9e5c42e41654ac8b6d906a57efa4bd3c29f47d::hasui::HASUI", + expo: 9 + }, ] const ALPHAFI_BUCKET_TVL_IDS = [ { @@ -189,21 +244,21 @@ const ALPHAFI_BUCKET_TVL_IDS = [ ] const ALPHAFI_POOL2_IDS = [{ poolID: "0x594f13b8f287003fd48e4264e7056e274b84709ada31e3657f00eeedc1547e37", - cetusPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720", + parentPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720", investorID: "0x46d901d5e1dba34103038bd2ba789b775861ea0bf4d6566afd5029cf466a3d88", token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA", token1Type: ADDRESSES.sui.SUI }, { poolID: "0x430986b53a787362e54fa83d0ae046a984fb4285a1bc4fb1335af985f4fe019d", - cetusPoolID: "0x0cbe3e6bbac59a93e4d358279dff004c98b2b8da084729fabb9831b1c9f71db6", + parentPoolID: "0x0cbe3e6bbac59a93e4d358279dff004c98b2b8da084729fabb9831b1c9f71db6", investorID: "0x705c560fd1f05c64e0480af05853e27e1c3d04e255cd6c5cb6921f5d1df12b5a", token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA", token1Type: ADDRESSES.sui.USDC }, { poolID: "0x4c0e42f1826170ad9283b321a7f9a453ef9f65aaa626f7d9ee5837726664ecdc", - cetusPoolID: "0x29e218b46e35b4cf8eedc7478b8795d2a9bcce9c61e11101b3a039ec93305126", + parentPoolID: "0x29e218b46e35b4cf8eedc7478b8795d2a9bcce9c61e11101b3a039ec93305126", investorID: "0xb43d1defd5f76ef084d68d6b56e903b54d0a3b01be8bb920ed1fa84b42c32ee1", token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA", token1Type: ADDRESSES.sui.USDC_CIRCLE @@ -217,16 +272,16 @@ function asIntN(int, bits = 32) { return Number(BigInt.asIntN(bits, BigInt(int))) } -async function addPoolTVL(api, alphafiCetusPools) { - for (const { poolID, cetusPoolID, investorID, token0Type, token1Type } of alphafiCetusPools) { +async function addPoolTVL(api, alphafiDoubleAssetPools) { + for (const { poolID, parentPoolID, investorID, token0Type, token1Type } of alphafiDoubleAssetPools) { let investorObject = await sui.getObject(investorID) let poolObject = await sui.getObject(poolID) - let cetusPoolObject = await sui.getObject(cetusPoolID) + let parentPoolObject = await sui.getObject(parentPoolID) addUniV3LikePosition({ api, tickLower: asIntN(investorObject.fields.lower_tick), tickUpper: asIntN(investorObject.fields.upper_tick), - tick: asIntN(cetusPoolObject.fields.current_tick_index.fields.bits), + tick: asIntN(parentPoolObject.fields.current_tick_index.fields.bits), liquidity: poolObject.fields.tokensInvested, token0: token0Type, token1: token1Type @@ -278,7 +333,7 @@ async function addPoolTVL4(api, alphafiBucketPools){ async function tvl(api) { - await Promise.all([addPoolTVL(api, ALPHAFI_CETUS_TVL_IDS), addPoolTVL2(api, ALPHAFI_NAVI_TVL_IDS), addPoolTVL3(api, ALPHAFI_NAVI_LOOP_TVL_IDS), addPoolTVL4(api, ALPHAFI_BUCKET_TVL_IDS)]) + await Promise.all([addPoolTVL(api, ALPHAFI_CETUS_TVL_IDS), addPoolTVL2(api, ALPHAFI_NAVI_TVL_IDS), addPoolTVL3(api, ALPHAFI_NAVI_LOOP_TVL_IDS), addPoolTVL4(api, ALPHAFI_BUCKET_TVL_IDS), addPoolTVL(api, ALPHAFI_BLUEFIN_TVL_IDS)]) } async function pool2(api) { From f92b6ede4efac76e7128d9c83c83fd73b4b1b617 Mon Sep 17 00:00:00 2001 From: Octopus <156575930+gguuttss@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:09:57 +0100 Subject: [PATCH 613/787] fix: STAB Protocol Remove duplicate LSULP TVL add (#12576) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chain/radixdlt.js | 4 +++- projects/stab-protocol/index.js | 39 +++++++------------------------ 2 files changed, 12 insertions(+), 31 deletions(-) diff --git a/projects/helper/chain/radixdlt.js b/projects/helper/chain/radixdlt.js index 7c8cbf2335bb..5ca6b9bba593 100644 --- a/projects/helper/chain/radixdlt.js +++ b/projects/helper/chain/radixdlt.js @@ -12,7 +12,8 @@ const chain = 'radixdlt' const ENTITY_DETAILS_URL = `https://mainnet.radixdlt.com/state/entity/details` -async function sumTokens({ owner, owners = [], api, transformLSU = false, }) { +async function sumTokens({ owner, owners = [], api, transformLSU = false, blacklistedTokens = [] }) { + const blacklistSet = new Set(blacklistedTokens.map(i => i.toLowerCase())) const fixBalances = getFixBalancesSync(chain) if (owner) owners.push(owner) @@ -23,6 +24,7 @@ async function sumTokens({ owner, owners = [], api, transformLSU = false, }) { let items = await queryAddresses({ addresses: owners }) items.forEach((item) => { item.fungible_resources.items.forEach(({ resource_address, amount }) => { + if (blacklistSet.has(resource_address.toLowerCase())) return; api.add(resource_address, +amount) }); }); diff --git a/projects/stab-protocol/index.js b/projects/stab-protocol/index.js index 20e6b505c0ee..679b44f4d56f 100644 --- a/projects/stab-protocol/index.js +++ b/projects/stab-protocol/index.js @@ -1,37 +1,16 @@ -const ADDRESSES = require('../helper/coreAssets.json') - -const { queryAddresses, sumTokens } = require('../helper/chain/radixdlt'); +const { sumTokensExport } = require('../helper/chain/radixdlt'); const STAB_COMPONENT = "component_rdx1cq70cjajtvllgk9z9wm9l8v6w8hsgtlw530cdgpraxprn4yevg89kf"; -const STAB_XRD_POOL_XRD_VAULT = "internal_vault_rdx1trk04c3sxffatj5h78w3266c8q07cvjlgq0zx44sask8wsam4q8rup"; -const ORACLE_COMPONENT = "component_rdx1cq7zsdqfh0mcwnutrevkz6wtml0vnav5fcmtf7rksmhk48urkyjg9c"; - -async function tvl(api) { - //get the token amounts of collaterals used in the STAB Protocol - const stabComponentTokens = await sumTokens({ owners: [STAB_COMPONENT], api }) - const xrdAmount = stabComponentTokens['radixdlt:resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd'] - const lsuLpAmount = stabComponentTokens['radixdlt:resource_rdx1thksg5ng70g9mmy9ne7wz0sc7auzrrwy7fmgcxzel2gvp8pj0xxfmf'] - - //calculate value of LSULP against XRD to get accurate price data - const [{ details: { state } }] = await queryAddresses({ addresses: [ORACLE_COMPONENT] } ) - const xrdPrice = state.fields[0].elements[0].fields[1].value - const lsuLpPrice = state.fields[0].elements[1].fields[1].value - const lsuLpMultiplier = lsuLpPrice / xrdPrice - - //add XRD and LSULP values to tvl - api.add('resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd', xrdAmount + lsuLpAmount * lsuLpMultiplier) - - //get the amount of XRD in the protocol native STAB/XRD pool (with 50/50 weights) - const stabXrdPoolXrdVault = await queryAddresses({ addresses: [STAB_XRD_POOL_XRD_VAULT] }); - const xrdAmountPool = stabXrdPoolXrdVault[0].details.balance.amount; - - //add only XRD value of pool to tvl (STAB value is excluded as backing of STAB tokens are already included in tvl) - api.add('resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd', xrdAmountPool) -} +const STAB_XRD_POOL = "pool_rdx1c4jj8lklg7edacflhk0tl202dzgawkujly4kqf0jfehyqd8watxw0r" module.exports = { methodology: 'Calculates TVL using the amount of collateral locked to borrow STAB using CDPs, and amount of STAB and XRD locked in the protocol-native STAB/XRD pool.', - radixdlt: { tvl }, - misrepresentedTokens: true, + radixdlt: { + //get the token amounts of collaterals used in the STAB Protocol and tokens locked in STAB/XRD pool + tvl: sumTokensExport({ + owners: [STAB_COMPONENT, STAB_XRD_POOL], + blacklistedTokens: ['resource_rdx1t40lchq8k38eu4ztgve5svdpt0uxqmkvpy4a2ghnjcxjtdxttj9uam'] + }) + }, timetravel: false, }; From befa0d9ed79ae7edec343d27afec7dc14097e0d6 Mon Sep 17 00:00:00 2001 From: yongjun925 Date: Fri, 6 Dec 2024 17:12:30 +0800 Subject: [PATCH 614/787] Add DODO GSP type pool (#12581) --- projects/dodo/index.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/dodo/index.js b/projects/dodo/index.js index af0026414ca7..095da410a3ee 100644 --- a/projects/dodo/index.js +++ b/projects/dodo/index.js @@ -2,13 +2,13 @@ const { getLogs } = require('../helper/cache/getLogs') const ADDRESSES = require('../helper/coreAssets.json') const config = { - ethereum: { dvmFactory: '0x72d220cE168C4f361dD4deE5D826a01AD8598f6C', dodoBirthFactory: '0x3a97247df274a17c59a3bd12735ea3fcdfb49950', fromBlock: 10613640, dspFactory: '0x6fddb76c93299d985f4d3fc7ac468f9a168577a4', dppFactory: ['0x5336ede8f971339f6c0e304c66ba16f1296a2fbe', '0xb5dc5e183c2acf02ab879a8569ab4edaf147d537', '0x6b4fa0bc61eddc928e0df9c7f01e407bfcd3e5ef'] }, - arbitrum: { dvmFactory: '0xDa4c4411c55B0785e501332354A036c04833B72b', fromBlock: 226578, dspFactory: '0xC8fE2440744dcd733246a4dB14093664DEFD5A53', dodoBirthFactory: '0xbcc3401e16c25eaf4d3fed632ce3288503883b1f', dppFactory: ['0xDdB13e6dd168E1a68DC2285Cb212078ae10394A9', '0xa6cf3d163358af376ec5e8b7cc5e102a05fde63d'] }, + ethereum: { dvmFactory: '0x72d220cE168C4f361dD4deE5D826a01AD8598f6C', dodoBirthFactory: '0x3a97247df274a17c59a3bd12735ea3fcdfb49950', fromBlock: 10613640, dspFactory: '0x6fddb76c93299d985f4d3fc7ac468f9a168577a4', dppFactory: ['0x5336ede8f971339f6c0e304c66ba16f1296a2fbe', '0xb5dc5e183c2acf02ab879a8569ab4edaf147d537', '0x6b4fa0bc61eddc928e0df9c7f01e407bfcd3e5ef'], gspFactory: '0x710409D2121B7C8EA4aCAdd6803FDE2D85DF6473' }, + arbitrum: { dvmFactory: '0xDa4c4411c55B0785e501332354A036c04833B72b', fromBlock: 226578, dspFactory: '0xC8fE2440744dcd733246a4dB14093664DEFD5A53', dodoBirthFactory: '0xbcc3401e16c25eaf4d3fed632ce3288503883b1f', dppFactory: ['0xDdB13e6dd168E1a68DC2285Cb212078ae10394A9', '0xa6cf3d163358af376ec5e8b7cc5e102a05fde63d'], gspFactory: '0x46E55A974c5995675b025f7F607C3278B36f0c29' }, bsc: { dvmFactory: ['0x790B4A80Fb1094589A3c0eFC8740aA9b0C1733fB', '0xf50bdc9e90b7a1c138cb7935071b85c417c4cb8e'], fromBlock: 726278, dspFactory: '0x0fb9815938Ad069Bf90E14FE6C596c514BEDe767', dppFactory: ['0xd9CAc3D964327e47399aebd8e1e6dCC4c251DaAE', '0x7737fd30535c69545deeea54ab8dd590ccaebd3c', '0x9b64c81ba54ea51e1f6b7fefb3cff8aa6f1e2a09', '0xafe0a75dffb395eaabd0a7e1bbbd0b11f8609eef'], dodoBirthFactory: '0xca459456a45e300aa7ef447dbb60f87cccb42828', blacklistedTokens: [ '0xcc7fc8666f6e62cb44aa781de841ee6be3bbe54c', '0xdb1e780db819333ea79c9744cc66c89fbf326ce8', - ] + ], gspFactory: '0x78d43a889F42a344Fe98C3fb9455791Dc8178d55' }, polygon: { dppFactory: ['0xd24153244066F0afA9415563bFC7Ba248bfB7a51', '0x95E887aDF9EAa22cC1c6E3Cb7f07adC95b4b25a8'], dvmFactory: '0x79887f65f83bdf15Bcc8736b5e5BcDB48fb8fE13', fromBlock: @@ -24,13 +24,13 @@ const config = { linea: { dvmFactory: '0xc0F9553Df63De5a97Fe64422c8578D0657C360f7', fromBlock: 91468, dspFactory: '0x2933c0374089D7D98BA0C71c5E02E1A0e09deBEE', dppFactory: '0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83' }, scroll: { dvmFactory: '0x5a0C840a7089aa222c4458b3BE0947fe5a5006DE', fromBlock: 83070, dspFactory: '0x7E9c460d0A10bd0605B15F0d0388e307d34a62E6', dppFactory: '0x31AC053c31a77055b2ae2d3899091C0A9c19cE3a' }, manta: { dvmFactory: '0x97bBF5BB1dcfC93A8c67e97E50Bea19DB3416A83', fromBlock: 384137, dspFactory: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1', dppFactory: '0xa71415675F68f29259ddD63215E5518d2735bf0a' }, - mantle: { dvmFactory: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1', fromBlock: 21054048, dspFactory: '0x7dB214f2D46d94846936a0f8Bd9044c5C5Bd2b93', dppFactory: '0x46AF6b152F2cb02a3cFcc74014C2617BC4F6cD5C' }, + mantle: { dvmFactory: '0x29C7718e8B606cEF1c44Fe6e43e07aF9D0875DE1', fromBlock: 21054048, dspFactory: '0x7dB214f2D46d94846936a0f8Bd9044c5C5Bd2b93', dppFactory: '0x46AF6b152F2cb02a3cFcc74014C2617BC4F6cD5C', gspFactory: '0xE6cecb7460c9E52aA483cb1f0E87d78D7085686F' }, zircuit: { dvmFactory: '0xA909314363840f7c28b8EC314028e21722dd8Cb6', fromBlock: 1455081, dspFactory: '0xA312D73C1b537168f1C8588bDcaB9278df98Cd32', dppFactory: '0xb770C37F3A9eC6f25b791D9c791aDE09B0fb1AB8' }, // okexchain: { dvmFactory: '0x9aE501385Bc7996A2A4a1FBb00c8d3820611BCB5', fromBlock: 4701083, dspFactory: '0x44D5dF24d5Ef52A791D6436Fa45A8D426f6de34e' }, } Object.keys(config).forEach(chain => { - const { dvmFactory, fromBlock, dspFactory, dppFactory, dodoBirthFactory, blacklistedTokens, } = config[chain] + const { dvmFactory, fromBlock, dspFactory, gspFactory, dppFactory, dodoBirthFactory, blacklistedTokens, } = config[chain] module.exports[chain] = { tvl: async (api) => { const ownerTokens = [] @@ -44,6 +44,7 @@ Object.keys(config).forEach(chain => { } builder(dvmFactory, 'event NewDVM (address baseToken, address quoteToken, address creator, address pool)'); builder(dspFactory, 'event NewDSP(address baseToken, address quoteToken, address creator, address pool)'); + builder(gspFactory, 'event NewGSP(address baseToken, address quoteToken, address creator, address pool)'); builder(dppFactory, 'event NewDPP (address baseToken, address quoteToken, address creator, address pool)'); builder(dodoBirthFactory, 'event DODOBirth (address pool, address baseToken, address quoteToken)'); From 2365f074fd9e919745db23e0fb34321381acde7a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:42:52 +0100 Subject: [PATCH 615/787] track tonpump #12580 --- projects/tonpump/index.js | 15 ++++++++++++++ utils/scripts/checkTonDupes.js | 37 ++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 projects/tonpump/index.js create mode 100644 utils/scripts/checkTonDupes.js diff --git a/projects/tonpump/index.js b/projects/tonpump/index.js new file mode 100644 index 000000000000..8737155ce944 --- /dev/null +++ b/projects/tonpump/index.js @@ -0,0 +1,15 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const { sumTokens } = require("../helper/chain/ton"); +const { getConfig } = require("../helper/cache"); + +async function fetchTvl(api,) { + const res = await getConfig('tonpump', 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=hot') + await sumTokens({ api, tokens: [ADDRESSES.ton.TON], owners: res, onlyWhitelistedTokens: true, }) +} + +module.exports = { + timetravel: false, + ton: { + tvl: fetchTvl + } +} diff --git a/utils/scripts/checkTonDupes.js b/utils/scripts/checkTonDupes.js new file mode 100644 index 000000000000..80652ac35a0d --- /dev/null +++ b/utils/scripts/checkTonDupes.js @@ -0,0 +1,37 @@ +const { get } = require("../../projects/helper/http"); + +const addressBook = { + bigpump: 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=bigpump', + blum: 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=blum', + wagmi: 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=wagmi', + tonpump: 'https://tonfunstats-eqnd7.ondigitalocean.app/api/v1/getServiceTokens?service=hot', +} + +console.log('project count: ', Object.keys(addressBook).length); +const addressProjectMap = {} + +async function run() { + + await Promise.all(Object.keys(addressBook).map(async project => { + let addresses = await get(addressBook[project]); + for (let address of addresses) { + if (addressProjectMap[address]) { + addressProjectMap[address].push(project); + } else { + addressProjectMap[address] = [project]; + } + } + })) + + const duplicates = {} + for (const [address, projects] of Object.entries(addressProjectMap)) { + if (projects.length > 1) { + duplicates[address] = projects.join(', '); + } + } + + console.log('Ton meme duplicates count: ', Object.keys(duplicates).length); + console.table(Object.entries(duplicates)); +} + +run().catch(console.error).then(() => process.exit(0)); \ No newline at end of file From ba5ff8f2bdb44a549a2b53dd30e1f214dfc1d1c3 Mon Sep 17 00:00:00 2001 From: Adolf998 <154962952+Adolf998@users.noreply.github.com> Date: Fri, 6 Dec 2024 17:43:41 +0800 Subject: [PATCH 616/787] update vip channel (#12579) --- projects/bouncebit-cedefi/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/bouncebit-cedefi/index.js b/projects/bouncebit-cedefi/index.js index 100eebb045f5..1ec098efdab4 100644 --- a/projects/bouncebit-cedefi/index.js +++ b/projects/bouncebit-cedefi/index.js @@ -5,7 +5,8 @@ const config = { subgraphUrl: 'https://api.studio.thegraph.com/query/96517/bb-defillama-eth/v0.0.4' }, bsc: { - subgraphUrl: 'https://api.studio.thegraph.com/query/96517/bb-defillama-bsc/v0.0.2' + subgraphUrl: 'https://api.studio.thegraph.com/query/96517/bb-defillama-bsc/v0.0.2', + subgraphUrl2: 'https://api.studio.thegraph.com/query/96517/bb-vip-defillama-bsc/v0.0.1' }, bouncebit: { main: { url: 'https://bitswap-subgraph.bouncebit.io/subgraphs/name/bb-defillama-bb' }, @@ -39,6 +40,11 @@ async function tvl(api) { fetchTokens(chain, config[chain].main.url), fetchTokens(chain, config[chain].boyya.url) ] + : chain === 'bsc' + ? [ + fetchTokens(chain, config[chain].subgraphUrl), + fetchTokens(chain, config[chain].subgraphUrl2) + ] : [fetchTokens(chain, config[chain].subgraphUrl)] ) From 5421e063b10fd5885ff679f7368be3935389cde3 Mon Sep 17 00:00:00 2001 From: Celeron Date: Fri, 6 Dec 2024 18:14:54 +0800 Subject: [PATCH 617/787] Add Celeron (#12578) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/celeron/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/celeron/index.js diff --git a/projects/celeron/index.js b/projects/celeron/index.js new file mode 100644 index 000000000000..6685e1a3d285 --- /dev/null +++ b/projects/celeron/index.js @@ -0,0 +1,23 @@ +const FARM_ADDRESS = "0x3384D85EC14163a9d35eeAb44261390aafD70f82"; +const FARM_IONIC_ADDRESS = "0x8D25067901B637D0eF1DF3163D782d89d53F403A"; +const CEL_ADDRESS = "0x8b83ECC4EF8FaEc5c05b7D6EC002B659BE137120"; + +async function tvl(api) { + let pools = await api.call({ abi: abiInfo.poolTvls, target: FARM_IONIC_ADDRESS }); + pools.forEach(i => api.add(i.assets, i.tvl)); +} + +async function staking(api) { + let pools = await api.call({ abi: abiInfo.poolTvls, target: FARM_ADDRESS }); + let target = pools.find((i) => i.assets === CEL_ADDRESS); + api.add(CEL_ADDRESS, target.tvl); +} + +module.exports = { + mode: { tvl, staking, }, +}; + +const abiInfo = { + poolTvls: + "function getPoolTotalTvl() view returns (tuple(uint256 pid, address assets, uint256 tvl)[])", +}; From 800ab143724caf1285233db91be097157c81b2c6 Mon Sep 17 00:00:00 2001 From: Winson Cheng <83229800+0xKMG@users.noreply.github.com> Date: Fri, 6 Dec 2024 18:15:32 +0800 Subject: [PATCH 618/787] Add borrow interest rate calculation to spot positions (#12577) --- projects/vectis/index.js | 23 ++++++++++++++++------- projects/vectis/spotMarkets.js | 27 ++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/projects/vectis/index.js b/projects/vectis/index.js index 1e82e546f255..d7bb8070a376 100644 --- a/projects/vectis/index.js +++ b/projects/vectis/index.js @@ -8,16 +8,20 @@ const { getMultipleAccounts } = require('../helper/solana') module.exports = { timetravel: false, doublecounted: true, - methodology: "Calculate sum of spot positions", + methodology: "Calculate sum of spot positions in vaults with unrealized profit and loss", solana: { tvl, }, }; +const vaultUserAddresses = [ + new PublicKey("9Zmn9v5A2YWUQj47bkEmcnc37ZsYe83rsRK8VV2j1UqX"), //Vault A + new PublicKey("4KvPuh1wG8j1pLnZUC5CuqTm2a41PWNtik1NwpLoRquE"), //Vault B + new PublicKey("Hcs63usAc6cxWccycrVwx1mrNgNSpUZaUgFm7Lw9tSkR"), //Vault C + new PublicKey("MzEPFp2LwCSMMPHLQsqfE7SN6xkPHZ8Uym2HfrH7g5P"), //Yield Compress A + new PublicKey("CMiyE7M98DSPBEhQGTA6CzNodWkNuuW4y9HoocfK75nG") //Yield Compress B + -const vaultAddresses = [ - new PublicKey("9Zmn9v5A2YWUQj47bkEmcnc37ZsYe83rsRK8VV2j1UqX"), - new PublicKey("4KvPuh1wG8j1pLnZUC5CuqTm2a41PWNtik1NwpLoRquE") ]; /** * Vault Equity Calculation Formula: @@ -37,7 +41,7 @@ const vaultAddresses = [ * */ async function tvl(api) { - const accounts = await getMultipleAccounts(vaultAddresses) + const accounts = await getMultipleAccounts(vaultUserAddresses) const deserializedData = accounts.map(deserializeUserPositions) const perpIndices = deserializedData.map(data => data.perpPositions.map(position => position.market_index)).flat() const perpKeys = perpIndices.map(index => getVaultPublicKey('perp_market', index)) @@ -50,10 +54,15 @@ async function tvl(api) { // // Process spot positions if (spotPositions?.length) { + const spotIndices = spotPositions.map(position => position.market_index) + const spotKeys = spotIndices.map(index => getVaultPublicKey('spot_market', index)) + const spotAccounts = await getMultipleAccounts(spotKeys) + const spotAccountMap = {} + spotIndices.forEach((v, i) => spotAccountMap[v] = spotAccounts[i]) + spotPositions.forEach(position => { const tokenMint = getTokenMintFromMarketIndex(position.market_index); - const adjustedBalance = processSpotPosition(position); - + const adjustedBalance = processSpotPosition(position, spotAccountMap[position.market_index]); api.add(tokenMint, adjustedBalance); }); } diff --git a/projects/vectis/spotMarkets.js b/projects/vectis/spotMarkets.js index 92bb6f31919e..95694c2a1f60 100644 --- a/projects/vectis/spotMarkets.js +++ b/projects/vectis/spotMarkets.js @@ -74,7 +74,7 @@ function getDecimalsByMarketIndex(marketIndex, isPerp = false) { return SPOT_MARKETS[marketIndex].decimals; } -function processSpotPosition(position) { +function processSpotPosition(position, spotMarketAccountInfo) { const decimals = getDecimalsByMarketIndex(position.market_index); const decimalAdjustment = 9 - decimals; let balance = position.scaled_balance; @@ -84,10 +84,31 @@ function processSpotPosition(position) { balance /= BigInt(10 ** decimalAdjustment); } - // Apply sign based on balance_type - return position.balance_type === 1 ? -balance : balance; + // For borrowed positions (balance_type === 1), apply interest rate + if (position.balance_type === 1) { + const cumulativeBorrowInterest = getSpotMarketCumulativeBorrowInterest(spotMarketAccountInfo); + // Apply interest rate to the balance + balance = (balance * cumulativeBorrowInterest) / BigInt(10 ** 10); + return -balance; // Return negative for borrows + } + + return balance; // Return positive for deposits } +function getSpotMarketCumulativeBorrowInterest(accountInfo) { + if (!accountInfo) { + throw new Error(`No account info found for market`); + } + + const CUMULATIVE_BORROW_INTEREST_OFFSET = 8 + 48 + 32 + 256 + (16 * 8) + 8; + + const lower64Bits = accountInfo.data.readBigInt64LE(CUMULATIVE_BORROW_INTEREST_OFFSET); + const upper64Bits = accountInfo.data.readBigInt64LE(CUMULATIVE_BORROW_INTEREST_OFFSET + 8); + + return (upper64Bits << 64n) + lower64Bits; + } + + function processPerpPosition(position) { //if perp market 0, amount needs to mul by 10 From acee95fdb13e13b5dbb1ac3c2d7f21b75300c179 Mon Sep 17 00:00:00 2001 From: thetis-market Date: Fri, 6 Dec 2024 18:19:57 +0700 Subject: [PATCH 619/787] Add Thetis Market (#12583) --- projects/helper/coreAssets.json | 5 ++- projects/thetis-market/index.js | 57 +++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 projects/thetis-market/index.js diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index c7f16e8294aa..39a843d9281c 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -809,7 +809,10 @@ "CELER_DAI": "0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::DaiCoin", "CELER_ETH": "0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::WethCoin", "CELER_WBTC": "0x8d87a65ba30e09357fa2edea2c80dbac296e5dec2b18287113500b902942929d::celer_coin_manager::WbtcCoin", - "amAPT": "0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::amapt_token::AmnisApt" + "amAPT": "0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a::amapt_token::AmnisApt", + "zWBTC": "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::WBTC", + "zWETH": "0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::WETH", + "USDt": "0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b" }, "dogechain": { "WWDOGE": "0xb7ddc6414bf4f5515b52d8bdd69973ae205ff101", diff --git a/projects/thetis-market/index.js b/projects/thetis-market/index.js new file mode 100644 index 000000000000..800362e625f0 --- /dev/null +++ b/projects/thetis-market/index.js @@ -0,0 +1,57 @@ +const ADDRESSES = require("../helper/coreAssets.json"); +const { getResource } = require("../helper/chain/aptos"); + +const POOL_TRADING_ACCOUNT = + "0x0c727553dd5019c4887581f0a89dca9c8ea400116d70e9da7164897812c6646e"; + +const APT_USDt_POOL = + "0x604440935157ff96d6e436220c708c410e1e1978bbefd6d714b70b1e5f1f11"; +const zWBTC_USDt_POOL = + "0x1166d5635ef8fd10e1aa2cb005c4a3fad91f3b452e35019d8ce90fa7634aeb"; +const zWETH_USDt_POOL = + "0x6366d76a364e565877e22f22807323ce630e3512eedf96570ae44312e4116565"; + +const Pools = [ + { + poolAddress: APT_USDt_POOL, + longToken: ADDRESSES.aptos.APT, + shortToken: ADDRESSES.aptos.USDt, + }, + { + poolAddress: zWBTC_USDt_POOL, + longToken: ADDRESSES.aptos.zWBTC, + shortToken: ADDRESSES.aptos.USDt, + }, + { + poolAddress: zWETH_USDt_POOL, + longToken: ADDRESSES.aptos.zWETH, + shortToken: ADDRESSES.aptos.USDt, + }, +]; + +async function tvl(api) { + const poolConfigs = await Promise.all([ + getResource(Pools[0].poolAddress, `${POOL_TRADING_ACCOUNT}::pool::Pool`), + getResource(Pools[1].poolAddress, `${POOL_TRADING_ACCOUNT}::pool::Pool`), + getResource(Pools[2].poolAddress, `${POOL_TRADING_ACCOUNT}::pool::Pool`), + ]); + const mergeArray = poolConfigs.map((p, i) => { + return { ...p, ...Pools[i] }; + }); + const tvlShortToken = mergeArray.map( + (p) => + Number(p.short_asset.pool_amount) + Number(p.short_asset.reserve_amount) + ); + api.add(ADDRESSES.aptos.APT, Number(mergeArray[0].long_asset.pool_amount)); + api.add(ADDRESSES.aptos.zWBTC, Number(mergeArray[1].long_asset.pool_amount)); + api.add(ADDRESSES.aptos.zWETH, Number(mergeArray[2].long_asset.pool_amount)); + api.add( + ADDRESSES.aptos.USDt, + tvlShortToken.reduce((acc, curr) => acc + curr, 0) + ); +} + +module.exports = { + timetravel: false, + aptos: { tvl }, +}; From 3be459335183dce99b389da8681836c3c6ad0ff4 Mon Sep 17 00:00:00 2001 From: LevenR <156494841+LevenR@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:52:06 +0800 Subject: [PATCH 620/787] Update lorenzo stBTC and enzoBTC vault bitcoin address (#12587) Co-authored-by: Leven Co-authored-by: 0xajing <163371347+0xajing@users.noreply.github.com> --- projects/helper/bitcoin-book/lorenzo-enzoBTC.js | 3 ++- projects/helper/bitcoin-book/lorenzo.js | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/helper/bitcoin-book/lorenzo-enzoBTC.js b/projects/helper/bitcoin-book/lorenzo-enzoBTC.js index bb7e56d6cbc9..976fbd51415e 100644 --- a/projects/helper/bitcoin-book/lorenzo-enzoBTC.js +++ b/projects/helper/bitcoin-book/lorenzo-enzoBTC.js @@ -1,4 +1,5 @@ module.exports = [ 'bc1qndzgrwj3y2lhcklme4t72jxq3df2h05vjdgzpp', - '19wFRSr3GYHmVQtnmbkx7Wkjw3jZdyYB9a' + '19wFRSr3GYHmVQtnmbkx7Wkjw3jZdyYB9a', + 'bc1qa4yfx2meqadqwpmqznlct0t2j6pt5tw5xrpz06' ] \ No newline at end of file diff --git a/projects/helper/bitcoin-book/lorenzo.js b/projects/helper/bitcoin-book/lorenzo.js index 13ccded61ae1..5af5737f5eeb 100644 --- a/projects/helper/bitcoin-book/lorenzo.js +++ b/projects/helper/bitcoin-book/lorenzo.js @@ -28,5 +28,7 @@ module.exports = [ "bc1pw8za3k5upa565n0kv55e89a8l0hkzpnfenj767j0cwfu7rn83yhqvuehcd", //cap2, Delegate to Lombard FP(609b4b8e27e214fd830e69a83a8270a03f7af356f64dde433a7e4b81b2399806) - "bc1pa56692v3hxguvu8vgu5d7dh9twlj7wm87qvzvxdru3rnluv8nmdqk58ewz" + "bc1pa56692v3hxguvu8vgu5d7dh9twlj7wm87qvzvxdru3rnluv8nmdqk58ewz", + //other vault bitcoin address + "bc1pu2e56xlz284s5lh9am2k2ys2lhtau5mgq6j9fgljxt7tegsgtp3spmvk0w" ] \ No newline at end of file From 74ccb2f24c3bb51bb96c75e09ab437da2abde46c Mon Sep 17 00:00:00 2001 From: LeeRyanj <138840879+LeeRyanj@users.noreply.github.com> Date: Fri, 6 Dec 2024 19:54:19 +0800 Subject: [PATCH 621/787] add token config (#12584) --- projects/kiloex/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index a48f89d696a8..5e12b5225eca 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -22,6 +22,7 @@ module.exports = { ADDRESSES.bsc.USDC, //usdc '0xf6718b2701d4a6498ef77d7c152b2137ab28b8a3', //stBTC '0x4aae823a6a0b376de6a78e74ecc5b079d38cbcf7', //SolvBTC + '0x2a3dc2d5daf9c8c46c954b8669f4643c6b1c081a', //uBTC ], }) }, op_bnb: { tvl: sumTokensExport({ owners: opbnb_owners, tokens: [ From 356240b9cdc1fedd170fba91135868415e54ad6e Mon Sep 17 00:00:00 2001 From: dmytro-horbatenko <148330112+dmytro-horbatenko@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:56:19 +0200 Subject: [PATCH 622/787] Midas RWA: add mTBILL TVL for Oasis Sapphire (#12586) --- projects/midas/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/midas/index.js b/projects/midas/index.js index 2377b64c49ff..af5e0aa3b66f 100644 --- a/projects/midas/index.js +++ b/projects/midas/index.js @@ -7,6 +7,9 @@ const config = { base: { mTBILL: '0xDD629E5241CbC5919847783e6C96B2De4754e438', mBASIS: '0x1C2757c1FeF1038428b5bEF062495ce94BBe92b2', + }, + sapphire: { + mTBILL: '0xDD629E5241CbC5919847783e6C96B2De4754e438', } } From 17aa078712f9ee89d04803da32d960debc78a0d4 Mon Sep 17 00:00:00 2001 From: garrett-vorce-compx Date: Fri, 6 Dec 2024 20:36:00 +0700 Subject: [PATCH 623/787] Feat/compx/add staking pools (#12582) Co-authored-by: Ronan Co-authored-by: Ronan <73086339+clooneyr@users.noreply.github.com> Co-authored-by: Xxiled <93330009+xxiled-plastic-cat@users.noreply.github.com> Co-authored-by: Garrett Vorce --- projects/compx-cdp/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/projects/compx-cdp/index.js b/projects/compx-cdp/index.js index 6ca472a18620..8c2002de7401 100644 --- a/projects/compx-cdp/index.js +++ b/projects/compx-cdp/index.js @@ -12,7 +12,15 @@ const stakingPools = [ // NIKO 'XZOKYETGUQKIJJG4LSBAFYLDQRKCT6PQUO5CZJQ37VUD2VYMWRHH2LK7MI', // TinymanPool2.0 xMcRib-ALGO - 'RNL5YCWQDLYX4WXMM43ARQVFVNO4PSGWCLNKORUUVFCXQLR2LIURETDCDI' + 'RNL5YCWQDLYX4WXMM43ARQVFVNO4PSGWCLNKORUUVFCXQLR2LIURETDCDI', + // JoeCoin + 'Y3CNVFHCAMWZP57R7S7URX366XRE6VKCHWDN57VMR7WL556OFTDXGAQZ3E', + // xUSD + 'EW6JAJOFRIXWURIIPCOCEXJ6SQ5QW2BQ7REE5CYEL4PSNYHUSIH2G55ZRI', + // cAlgo + 'ZKXS4SAXMCBVOHMWNGZZO7AXMRETLTLYLQRBO2KLSN2SPOGZCU4O3JABSA', + // Compx + 'DRZ2TY3YHPRCMD6MVWCHKFIDF4PCCQ3DOUW42MGMVOPTJVGRKORJBQTZS4', ]; From 468b4463103a23b833bbdda12d95611e2745c633 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:43:33 +0100 Subject: [PATCH 624/787] Update: Hashnote (add Near) (#12590) --- projects/hashnote/index.js | 40 +++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/projects/hashnote/index.js b/projects/hashnote/index.js index 61cacff40732..35bbcf0875df 100644 --- a/projects/hashnote/index.js +++ b/projects/hashnote/index.js @@ -1,29 +1,25 @@ -const ADDRESSES = require('../helper/coreAssets.json') +const { call } = require('../helper/chain/near') +const NEAR = '0x136471a34f6ef19fE571EFFC1CA711fdb8E49f2b' -const contracts = { - canto:{ - token: '0xfb8255f0de21acebf490f1df6f0bdd48cc1df03b', - oracle: '0x1d18c02bc80b1921255e71cf2939c03258d75470' - }, - ethereum:{ - token: '0x136471a34f6ef19fE571EFFC1CA711fdb8E49f2b', - oracle: '0x4c48bcb2160F8e0aDbf9D4F3B034f1e36d1f8b3e' - } +const CONFIG = { + canto: '0xfb8255f0de21acebf490f1df6f0bdd48cc1df03b', + ethereum: NEAR, + near: 'usyc.near' } -const tvl = async (api) => { - const totalSupply = await api.call({ target: contracts[api.chain].token, abi: 'uint256:totalSupply'}); - const rate = await api.call({ target: contracts[api.chain].oracle, abi: 'function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound)'}); +const evmTvl = async (api, token) => { + const supply = await api.call({ target: token, abi: 'erc20:totalSupply' }) + api.add(NEAR, supply, { skipChain: true }) +} - return { - [ADDRESSES.ethereum.USDC]: (totalSupply * rate.answer)/1e8 - }; +const nonEvmTvl = async (api, token) => { + const supply = await call(token, 'ft_total_supply', {}); + api.add(NEAR, supply, { skipChain: true }) } -module.exports = { - canto: { - tvl - }, - ethereum:{tvl} -}; +Object.entries(CONFIG).forEach(([chain, address]) => { + module.exports[chain] = { + tvl: async (api) => (chain === 'near' ? nonEvmTvl(api, address) : evmTvl(api, address)) + }; +}); From 212ae1e9ea1e27ca42479ed5d977ee1e90520f5f Mon Sep 17 00:00:00 2001 From: tonfarmix <164873385+tonfarmix@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:43:46 +0300 Subject: [PATCH 625/787] [Farmix] add new staking pools (#12589) Co-authored-by: Maktd --- projects/farmix/index.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/farmix/index.js b/projects/farmix/index.js index 559b765ffe31..4fa1c6baec38 100644 --- a/projects/farmix/index.js +++ b/projects/farmix/index.js @@ -9,15 +9,19 @@ const getPoolJettonsRateLimited = rateLimited(getPoolCurrentJettons); const POOLS = [ - 'EQC-jlX83DYZgSWRW5q_XuHLWWFQPp2xGmc8BCoeWckKpeHs', - 'EQD6gQSWCayHh0FvUnTXlpfizIWiq7UeE4gYvXGYtEhIYJ8q', - 'EQCE_6TevKEpj8OTz3rZt1D5bR6fENQbSN2bbW0jzxbWGGIo', + 'EQC-jlX83DYZgSWRW5q_XuHLWWFQPp2xGmc8BCoeWckKpeHs', // native TON + 'EQD6gQSWCayHh0FvUnTXlpfizIWiq7UeE4gYvXGYtEhIYJ8q', // USDT + 'EQCE_6TevKEpj8OTz3rZt1D5bR6fENQbSN2bbW0jzxbWGGIo', // NOT + 'EQDuM7dM6mw0vAMurdY0hTNREenlZR1yCurqqo99q3o42nCi', // stTON + 'EQC2HxXptnU7vstREZOHyheGTafnFNSlVus5Iwd8Ik89Q7dD' // tsTON ] const UNDERLYING_JETTONS = [ ADDRESSES.ton.TON, ADDRESSES.ton.USDT, ADDRESSES.ton.NOT, + ADDRESSES.ton.TON, + ADDRESSES.ton.TON, ] From 725b16a9e3eaaa5760dfc0db04ae692d9b6610bb Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:12:33 +0100 Subject: [PATCH 626/787] Feat: Opentrade RWA (Tbills+USD) (#12588) --- projects/opentrade/index.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 projects/opentrade/index.js diff --git a/projects/opentrade/index.js b/projects/opentrade/index.js new file mode 100644 index 000000000000..2e1a034024c0 --- /dev/null +++ b/projects/opentrade/index.js @@ -0,0 +1,27 @@ +const CONFIG = { + ethereum: [ + '0x3ee320c9f73a84d1717557af00695a34b26d1f1d', // XEVT + '0x0bbc2be1333575f00ed9db96f013a31fdb12a5eb', // TBV1 + '0x30c3115dca6370c185d5d06407f29d3ddbc4cfc4', // TBV2 + '0x7bfb97fe849172608895fd4c62237cb42a8607d2', // TBV3 + '0xa65446265517a29f7427abb1279165eb61624dd0', // TBV4 + '0x0f8cbdc544dc1d4bd1bdafe0039be07b825af82a', // XTBT + ], + avax: [ + '0xbb9360d57f68075e98d022784c12f2fda082316b', // XRV1 + '0xad6605f4987031fd2d6d6816be53eb7c5b764bf7', // XTBT + ] +} + + +const tvl = async (api, tokens) => { + const [assets, balances] = await Promise.all([ + api.multiCall({ calls: tokens, abi: 'address:liquidityAssetAddr' }), + api.multiCall({ calls: tokens, abi: 'uint256:totalAssets' }), + ]) + api.add(assets, balances) +} + +Object.entries(CONFIG).forEach(([chain, tokens]) => { + module.exports[chain] = { tvl: async (api) => tvl(api, tokens) } +}) \ No newline at end of file From 03de5f3801def3bc197c0846468364dacc0bc2fa Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 6 Dec 2024 18:40:56 +0000 Subject: [PATCH 627/787] add arena of faith stake mining --- projects/aof-stake-mining/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/aof-stake-mining/index.js diff --git a/projects/aof-stake-mining/index.js b/projects/aof-stake-mining/index.js new file mode 100644 index 000000000000..5f58b7ccb5e7 --- /dev/null +++ b/projects/aof-stake-mining/index.js @@ -0,0 +1,11 @@ +const { treasuryExports } = require("../helper/treasury"); +const { nullAddress } = require('../helper/tokenMapping'); + +module.exports = treasuryExports({ + metis: { + owners: ['0x946D86422775E7B32F3F8f0580504EADccF9b800'], + tokens: [ + nullAddress, + ], + }, + }) \ No newline at end of file From 7dd443184cca120232964ba850ac1b66d3454a2a Mon Sep 17 00:00:00 2001 From: David Lee Date: Sat, 7 Dec 2024 03:19:28 -0500 Subject: [PATCH 628/787] Add additional stablecoins (#12599) --- projects/level-money/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/level-money/index.js b/projects/level-money/index.js index d4876546097a..dd8bce06cbdd 100644 --- a/projects/level-money/index.js +++ b/projects/level-money/index.js @@ -33,6 +33,12 @@ const TOKEN_CONTRACTS = [ "0x5C5b196aBE0d54485975D1Ec29617D42D9198326", // stdeUSD AUSDC, AUSDT, + "0x437cc33344a0B27A429f795ff6B469C72698B291", // smart M + "0x8a60e489004ca22d775c5f2c657598278d17d9c2", // USDa (Avalon) + "0x2b66aade1e9c062ff411bd47c44e0ad696d43bd9", // staked USDa (Avalon) + "0x4956b52aE2fF65D74CA2d61207523288e4528f96", // RLP + "0x66a1E37c9b0eAddca17d3662D6c05F4DECf3e110", // USR + "0xfd03723a9a3abe0562451496a9a394d2c4bad4ab" // DYAD ]; module.exports = { From 93493cabf8bd9f414f9f9db0e449a115f17fe8a1 Mon Sep 17 00:00:00 2001 From: Five Stars <146636499+fivestarsfi@users.noreply.github.com> Date: Sat, 7 Dec 2024 11:19:46 +0300 Subject: [PATCH 629/787] Syde Update - Back to old upgrade Addresses (#12598) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/syde/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/syde/index.js b/projects/syde/index.js index 35f7dbfc4818..8becae7d9a13 100644 --- a/projects/syde/index.js +++ b/projects/syde/index.js @@ -1,14 +1,13 @@ - const { sumTokensExport } = require("../helper/chain/ton"); const ADDRESSES = require("../helper/coreAssets.json"); -const sydeBtcPool = "EQBm9Ns0p98h74liNdYn-jOnJ79BT5cm--LIAeoYlfeWzQOk" -const sydeEthPool = "EQCo4FcMyezTvv2xOY-6iW4AAGahV2u8tkMxVT90gDz0sk5t" -const sydeEurPool = "EQC9H5G-VrnnwFa60pn08t5EqNMREW8NscnqL13W2jl9je4P" +const sydeBtcPool = "EQA2J0WCTdYdG-XeyMpPBTeu2dWB2f0oFiV4KVRfV0gewF4E" +const sydeEthPool = "EQD-7ycFO3yeh0EeT2wgXoOQmu64rdDBXqGm4nHDInPfCxJG" +const sydeEurPool = "EQDXvkuKPZahcTDRHSybwiU0E5VpiGFP2QS2iHr082JmtTT9" module.exports = { methodology: 'Counts Syde smartcontract balance as TVL.', ton: { tvl: sumTokensExport({ owners: [sydeBtcPool, sydeEthPool, sydeEurPool], tokens: [ADDRESSES.null]}), } -} \ No newline at end of file +} From b75ffeb3300f1c80ea51082b1781e913e9eedf81 Mon Sep 17 00:00:00 2001 From: Oleh Kyslashko Date: Sat, 7 Dec 2024 10:25:55 +0200 Subject: [PATCH 630/787] update delea contracts (#12594) --- projects/Delea/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/Delea/index.js b/projects/Delea/index.js index 7e6d95799813..b285666eac27 100644 --- a/projects/Delea/index.js +++ b/projects/Delea/index.js @@ -1,9 +1,18 @@ const { sumTokensExport } = require("../helper/chain/ton"); const ADDRESSES = require("../helper/coreAssets.json"); +const ownersList = [ + "EQB6rkS8xt3Ey4XugdVqQDe1vt4KJDh813_k2ceoONTCBnyD", + "EQCwIIRKpuV9fQpQxdTMhLAO30MNHa6GOYd00TsySOOYtA9n", + "EQA2OzCuP8-d_lN2MYxLv5WCNfpLH1NUuugppOZBZgNYn-aa", + "EQCgGUMB_u1Gkrskw2o407Ig8ymQmfkxWuPW2d4INuQoPFJO", + "EQA6Xba1d30QeSTVW7-cIAq-WHD9ZBFg90dQ7CB8mQ2Cxx25", + "EQADnjMkZBCS7-zKAPGHwFXGdd8b85m3bRDm52AX__ORLey-" +]; + module.exports = { methodology: 'Counts Delea smartcontract balance as TVL.', ton: { - tvl: sumTokensExport({ owners: ["EQB6rkS8xt3Ey4XugdVqQDe1vt4KJDh813_k2ceoONTCBnyD", "EQCwIIRKpuV9fQpQxdTMhLAO30MNHa6GOYd00TsySOOYtA9n", "EQA2OzCuP8-d_lN2MYxLv5WCNfpLH1NUuugppOZBZgNYn-aa", "EQCgGUMB_u1Gkrskw2o407Ig8ymQmfkxWuPW2d4INuQoPFJO"], tokens: [ADDRESSES.null]}), + tvl: sumTokensExport({ owners: ownersList, tokens: [ADDRESSES.null]}), } } From a7667d9845d1e3220a8279022393d7fe8ec5343d Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Sat, 7 Dec 2024 09:26:08 +0100 Subject: [PATCH 631/787] Update: Franklin-Templeton (add Ethereum) (#12592) --- projects/franklinTempleton-finance/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/franklinTempleton-finance/index.js b/projects/franklinTempleton-finance/index.js index 01f33d2aabff..dfaa7d761489 100644 --- a/projects/franklinTempleton-finance/index.js +++ b/projects/franklinTempleton-finance/index.js @@ -5,7 +5,8 @@ const BENJI = { arbitrum: '0xb9e4765bce2609bc1949592059b17ea72fee6c6a', polygon: '0x408a634b8a8f0de729b48574a3a7ec3fe820b00a', avax: '0xe08b4c1005603427420e64252a8b120cace4d122', - base: '0x60cfc2b186a4cf647486e42c42b11cc6d571d1e4' + base: '0x60cfc2b186a4cf647486e42c42b11cc6d571d1e4', + ethereum: '0x3ddc84940ab509c11b20b76b466933f40b750dc9' } const stellarTvl = async (api) => { From 8233da81f8ed5d80db213313a99522de3dc8b73f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 7 Dec 2024 10:55:16 +0100 Subject: [PATCH 632/787] track plunderswap v3 --- projects/helper/env.js | 2 ++ projects/helper/tokenMapping.js | 8 +++++++- projects/plunderswap-v3/index.js | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 projects/plunderswap-v3/index.js diff --git a/projects/helper/env.js b/projects/helper/env.js index 7f7164448856..461d4435ed42 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -1,3 +1,4 @@ + const BOOL_KEYS = [ 'HISTORICAL', 'LLAMA_DEBUG_MODE', @@ -33,6 +34,7 @@ const DEFAULTS = { RBN_RPC: "https://governors.mainnet.redbelly.network", CORN_RPC: "https://rpc.ankr.com/corn_maizenet", ACE_RPC_MULTICALL: "0x025A2B4fCE1E0bD736D5cebe6C8a52229795376B", + ZILLIQA_RPC_MULTICALL: "0x38899efb93d5106d3adb86662c557f237f6ecf57", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index ac9c1d35e9a0..31fcf58c009b 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -88,12 +88,18 @@ const fixBalancesTokens = { starknet: { [ADDRESSES.starknet.BROTHER]: { coingeckoId: "starknet-brother", decimals: 18 }, }, - corn:{ + corn: { '0xda5ddd7270381a7c2717ad10d1c0ecb19e3cdfb2': { coingeckoId: "bitcoin", decimals: 18 }, }, nibiru: { 'unibi': { coingeckoId: "nibiru", decimals: 6 }, }, + zilliqa: { + '0x097c26f8a93009fd9d98561384b5014d64ae17c2': { coingeckoId: "stzil", decimals: 12 }, + '0x03a79429acc808e4261a68b0117acd43cb0fdbfa': { coingeckoId: "governance-zil", decimals: 15 }, + '0xccf3ea256d42aeef0ee0e39bfc94baa9fa14b0ba': { coingeckoId: "xcad-network", decimals: 18 }, + '0xe64ca52ef34fdd7e20c0c7fb2e392cc9b4f6d049': { coingeckoId: "kalijo", decimals: 18 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/plunderswap-v3/index.js b/projects/plunderswap-v3/index.js new file mode 100644 index 000000000000..6cedf4d7d76b --- /dev/null +++ b/projects/plunderswap-v3/index.js @@ -0,0 +1,14 @@ +const { getConfig } = require('../helper/cache') +const { sumTokens2 } = require('../helper/unwrapLPs') + +async function tvl(api) { + const data = await getConfig('plunderswap', 'https://static.plunderswap.com/PlunderswapPoolPrices.json') + const v3Pairs = data.filter(pair => pair.version === 'V3').map(pair => pair.address) + const token0s = await api.multiCall({ abi: 'address:token0', calls: v3Pairs }) + const token1s = await api.multiCall({ abi: 'address:token1', calls: v3Pairs }) + return sumTokens2({ api, tokensAndOwners2: [token0s.concat(token1s), v3Pairs.concat(v3Pairs)] }) +} + +module.exports = { + zilliqa: { tvl } +} \ No newline at end of file From 47d13242fcfbf4dded7b8b7111a7f3d2c7b845c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1?= <165295358+cybro-developer@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:01:54 +0000 Subject: [PATCH 633/787] Add more cybro vaults (#12604) --- projects/cybro/index.js | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 2472f233b571..0e9c8b243c51 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -1,23 +1,25 @@ const vaults = [ - '0xc9434fbee4ec9e0bad7d067b35d2329e5f1d8915', - '0xf56dab7b7b2954aa86a591f164205e6cdd33797e', - '0x4caec64454893c7912e6beb1e19b4714dd353748', - '0xb4e96a45699b4cfc08bb6dd71eb1276bfe4e26e7', + '0xe922bccf90d74f02a9d4203b377399314e008e41', + '0xdccde9c6800bea86e2e91cf54a870ba3ff6faf9f', + '0x0667ac28015ed7146f19b2d218f81218abf32951', '0x9c3d4e6f96d2c3ddd8afee3891b955283a920889', - '0x4f3da57dbfb2b85c96e3556c5f1859ef88f5d6b1', - '0x7458ac85593472ba501ee361449638ed180a7ee7', - '0x83eaed4393328f77d0e402018a369b8b82e501a4', - '0x18e22f3f9a9652ee3a667d78911bac55bc2249af', '0xd58826d2c0babf1a60d8b508160b52e9c19aff07', + '0x7458ac85593472ba501ee361449638ed180a7ee7', + '0xdb5e7d5ac4e09206fed80efd7abd9976357e1c03', '0x567103a40c408b2b8f766016c57a092a180397a1', - '0xe922bccf90d74f02a9d4203b377399314e008e41', - '0x0667ac28015ed7146f19b2d218f81218abf32951', - '0xdccde9c6800bea86e2e91cf54a870ba3ff6faf9f', - '0x9cc62ef691e869c05fd2ec41839889d4e74c3a3f', + '0xc66fc517c8bf1c34ae48529df53dd84469e21daa', '0x3500e1d4e93c9f45aa8198efda16842cb73fa1bc', - '0x6654cddf2a14a06307af6a8d7731dd4e059962a1', - '0xdb5e7d5ac4e09206fed80efd7abd9976357e1c03', + '0xb4e96a45699b4cfc08bb6dd71eb1276bfe4e26e7', '0x3db2bd838c2bed431dcfa012c3419b7e94d78456', + '0xf56dab7b7b2954aa86a591f164205e6cdd33797e', + '0x83eaed4393328f77d0e402018a369b8b82e501a4', + '0x4f3da57dbfb2b85c96e3556c5f1859ef88f5d6b1', + '0x9cc62ef691e869c05fd2ec41839889d4e74c3a3f', + '0xc9434fbee4ec9e0bad7d067b35d2329e5f1d8915', + '0x18e22f3f9a9652ee3a667d78911bac55bc2249af', + '0x6654cddf2a14a06307af6a8d7731dd4e059962a1', + '0x4caec64454893c7912e6beb1e19b4714dd353748', + '0x24e72c2c7be9b07942f6f8d3cdce995df699514d', ] async function tvl(api) { From b0908f33a5befa982cc354f968835f33e9391b3c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 7 Dec 2024 15:02:41 +0100 Subject: [PATCH 634/787] minor fix --- projects/helper/tokenMapping.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 31fcf58c009b..0a200e05665d 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -61,6 +61,7 @@ const fixBalancesTokens = { }, arbitrum: { '0xbbeb34F9d50e0BABe1bd03Fd4120296354510529': { coingeckoId: "ignition-fbtc", decimals: 8 }, + '0x211cc4dd073734da055fbf44a2b4667d5e5fe5d2': { coingeckoId: "ethena-staked-usde", decimals: 18 }, }, bsc: { '0x2B25f4F134a56054b2b6388C2750F1eA3877e02b': { coingeckoId: "ignition-fbtc", decimals: 8 }, From e34dcd25b494b0c451040ef3f01e141f5138d108 Mon Sep 17 00:00:00 2001 From: Kacper Bak <290936+kbak@users.noreply.github.com> Date: Sat, 7 Dec 2024 15:18:57 +0100 Subject: [PATCH 635/787] added gud.tech adapter (#12603) --- projects/gud-tech/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/gud-tech/index.js diff --git a/projects/gud-tech/index.js b/projects/gud-tech/index.js new file mode 100644 index 000000000000..450d69d2e8ee --- /dev/null +++ b/projects/gud-tech/index.js @@ -0,0 +1,17 @@ +const { getLogs2 } = require('../helper/cache/getLogs'); +const { sumTokens2 } = require('../helper/unwrapLPs'); + +const config = { + zircuit: { factory: '0xF9D8fC35C11cF6acd3D04CA1C3F7F4Fa65e20dCf', fromBlock: 6586739, missing: ['0xfd418e42783382e86ae91e445406600ba144d162']}, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock, missing = [] } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const logs = await getLogs2({ api, factory, eventAbi: 'event TokenStakabilityChanged(address token, bool enabled)', fromBlock, }) + const tokens = logs.map(i => i.token).concat(missing) + return sumTokens2({ api, owner: factory, tokens, permitFailure: true, }) + } + } +}) \ No newline at end of file From 39637c310ad2bfc4515953d0ebd678cf5b931147 Mon Sep 17 00:00:00 2001 From: CardanoTokenIO <163329108+CardanoTokenIO@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:23:23 +0100 Subject: [PATCH 636/787] Update sript address - Include more addresses related to the protocol (#12608) --- projects/danzo-arena/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/danzo-arena/index.js b/projects/danzo-arena/index.js index 6d896b7e831d..76cc62fb1035 100644 --- a/projects/danzo-arena/index.js +++ b/projects/danzo-arena/index.js @@ -3,7 +3,11 @@ const { sumTokensExport } = require("../helper/chain/cardano"); const scriptAdresses = [ "addr1vx4caaf06swdn7cdfc7pu3sw235zvuhd02tw2np4uac9mwcp2vt4y", //Danzo Tokens locked inside the address for the DeFi game DANZO ARENA: https://danzo.gg/arena/ "addr1q8wu9v2wn8hkzq2g7q3ez8a99thw0gwmlhgpc2crmfk982xr2rqrszevgfwunrxu8ajh7pfhmaf6ppj60nj8rnhqhl4srgnekp", //Danzo Tokens locked inside the address for the DeFi game DANZO Game: https://danzo.gg - "addr1vxherk6ug9235v0mrrmywsr2493sxsydmaylzajs7xavd9q30593r", //Sugar tokens locked inside the address for the DeFi game Sugar Factory: https://sugar.systems/factory + "addr1vxherk6ug9235v0mrrmywsr2493sxsydmaylzajs7xavd9q30593r", //Sugar tokens locked inside the address for the DeFi game Sugar Factory: https://sugarcardano.io/factory +"addr1vy3jm4p3s0ufyu4y7zv9jhzzf3uj0j5r9zegkge7gpdt7zgk33jxw", //Cock tokens locked inside the address for the DeFi game Cock Arena: https://cockcardano.io/arena +"addr1vxqnqk9vfxne3p3ecktnshjjjvyzfxc9pgyf9ux76nrukpq4j73z8", +"addr1vxh2lgfhrd65zer39d5a2lyfsmke9628n4fcu92yvq4ufgcuuy7th", +"addr1v8zyytsux8kg0ues0xd40m9yvghjs6s3vr92ndujq3lxqzscq75s0" ]; module.exports = { From c9d9c7672da035962106ab688be649fb3037ab0e Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:30:45 +0100 Subject: [PATCH 637/787] fix noble --- projects/helper/chain/cosmos.js | 2 +- projects/noble/index.js | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/projects/helper/chain/cosmos.js b/projects/helper/chain/cosmos.js index 404411154b83..7f2a9566aa3b 100644 --- a/projects/helper/chain/cosmos.js +++ b/projects/helper/chain/cosmos.js @@ -43,7 +43,7 @@ const endPoints = { nibiru: "https://lcd.nibiru.fi", bostrom: "https://lcd.bostrom.cybernode.ai", joltify: "https://lcd.joltify.io", - noble: "https://api.noble.xyz" + noble: "https://noble-api.polkachu.com" }; const chainSubpaths = { diff --git a/projects/noble/index.js b/projects/noble/index.js index ec6c78975283..1eaac5923554 100644 --- a/projects/noble/index.js +++ b/projects/noble/index.js @@ -1,26 +1,17 @@ const { queryV1Beta1 } = require('../helper/chain/cosmos'); -const { sumTokens2 } = require('../helper/unwrapLPs'); - -const NOBLE_DENOMS_URL = 'bank/v1beta1/denoms_metadata'; -const NOBLE_SUPPLY_URL = 'bank/v1beta1/supply/'; +const NOBLE_SUPPLY_URL = 'bank/v1beta1/supply'; const IGNORE_DENOMS = ['ufrienzies', 'ustake']; async function tvl(api) { - const { metadatas } = await queryV1Beta1({ api, url: NOBLE_DENOMS_URL }); - - for (const metadata of metadatas) { - const baseDenom = metadata.base; - - // ignore invalid denoms - if (IGNORE_DENOMS.includes(baseDenom)) - continue; - - // fetch supply for denom - const { amount } = await queryV1Beta1({ api, url: `${NOBLE_SUPPLY_URL}${baseDenom}` }); - api.add(baseDenom, amount.amount); - } - return sumTokens2({ api }); + let key + do { + const { supply, pagination } = await queryV1Beta1({ api, url: `${NOBLE_SUPPLY_URL}?pagination.key=${key || ''}` }) + key = pagination.next_key + console.log(key) + supply.forEach(i => api.add(i.denom, i.amount)) + } while (key); + IGNORE_DENOMS.forEach(denom => api.removeTokenBalance(denom)) } module.exports = { From 9893d5fd600d3a55c2989941a1d6d3589368f4e5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:48:12 +0100 Subject: [PATCH 638/787] echelon: disable isolated lending as it was not working --- projects/echelon/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/echelon/index.js b/projects/echelon/index.js index 9d8b9c12aa68..aabcafabefd1 100644 --- a/projects/echelon/index.js +++ b/projects/echelon/index.js @@ -4,7 +4,7 @@ const { transformBalances } = require("../helper/portedTokens"); const { get } = require("../helper/http"); const mainLendingContract = "0xc6bc659f1649553c1a3fa05d9727433dc03843baac29473c817d06d39e7621ba"; -const isolatedLendingContract = "0x024c90c44edf46aa02c3e370725b918a59c52b5aa551388feb258bd5a1e82271"; +const isolatedLendingContract = "0x5d22fc881144fb4bbaa40b2abf954348082e133fdcd01f7531574df421bde71d"; const coinAssetType = '300'; // main pool @@ -56,7 +56,7 @@ module.exports = { markets.forEach(({ cash, coin }) => { sdk.util.sumSingleBalance(balances, coin, cash); }); - +/* const isolatedPairAddresses = await getIsolatedPairAddresses(); const pairs = await Promise.all(isolatedPairAddresses.map(pairAddress => getPair(pairAddress))); pairs.forEach(({ collateral_token, total_collateral_amount, asset_token, total_supply_amount, total_borrow_amount }) => { @@ -64,7 +64,7 @@ module.exports = { sdk.util.sumSingleBalance(balances, collateral_token, total_collateral_amount); // isolated pair asset tvl (supply - borrow) sdk.util.sumSingleBalance(balances, asset_token, Number(total_supply_amount) - Number(total_borrow_amount)); - }); + }); */ return transformBalances("aptos", balances); }, @@ -77,11 +77,11 @@ module.exports = { sdk.util.sumSingleBalance(balances, coin, liability); }); - const isolatedPairAddresses = await getIsolatedPairAddresses(); + /* const isolatedPairAddresses = await getIsolatedPairAddresses(); const pairs = await Promise.all(isolatedPairAddresses.map(pairAddress => getPair(pairAddress))); pairs.forEach(({ asset_token, total_borrow_amount }) => { sdk.util.sumSingleBalance(balances, asset_token, total_borrow_amount); - }); + }); */ return transformBalances("aptos", balances); } From b42c228d99b192369a1907b4a455452e33ffa6ca Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:02:12 +0100 Subject: [PATCH 639/787] temp fix for orca --- projects/helper/solana.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/helper/solana.js b/projects/helper/solana.js index 3f09416a984b..c525e7cc96f5 100644 --- a/projects/helper/solana.js +++ b/projects/helper/solana.js @@ -175,6 +175,9 @@ function exportDexTVL(DEX_PROGRAM_ID, getTokenAccounts, chain = 'solana') { const tokenAccounts = [] programAccounts.forEach((account) => { + if (DEX_PROGRAM_ID === '9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP' && account.account.space < 324) { + return; + } const tokenSwap = decodeAccount('tokenSwap', account.account); tokenAccounts.push(tokenSwap.tokenAccountA.toString()) tokenAccounts.push(tokenSwap.tokenAccountB.toString()) From 81f17448b4ba1bb1cebd61932def35de2972d745 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:32:53 +0000 Subject: [PATCH 640/787] add tapbit cex (#12618) --- projects/helper/bitcoin-book/index.js | 4 +++- projects/helper/bitcoin-book/tapbit-cex.js | 4 ++++ projects/tapbit-cex/index.js | 13 +++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 projects/helper/bitcoin-book/tapbit-cex.js create mode 100644 projects/tapbit-cex/index.js diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index 1d9b806e8d52..2947a5084f7d 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -88,6 +88,7 @@ const arkhamExchange = require('./arkham-exchange.js') const chakra = require('./chakra.js') const nerveNetworkBridge = require('./nervenetworkbridge.js') const nexusbtc = require('./nexusbtc') +const tapbit = require('./tapbit-cex.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -194,5 +195,6 @@ module.exports = { arkhamExchange, chakra, nerveNetworkBridge, - nexusbtc + nexusbtc, + tapbit } diff --git a/projects/helper/bitcoin-book/tapbit-cex.js b/projects/helper/bitcoin-book/tapbit-cex.js new file mode 100644 index 000000000000..efd5be2de2ea --- /dev/null +++ b/projects/helper/bitcoin-book/tapbit-cex.js @@ -0,0 +1,4 @@ +module.exports = [ + "1HSRxFoxC7HYbNutGyxCNXmGT1FG3M2Bt3", + "1PUvhYpjgvgjzmiwSCuGNqKQjKde29eFbH" + ] \ No newline at end of file diff --git a/projects/tapbit-cex/index.js b/projects/tapbit-cex/index.js new file mode 100644 index 000000000000..b0a2fb0e96ee --- /dev/null +++ b/projects/tapbit-cex/index.js @@ -0,0 +1,13 @@ +const { cexExports } = require("../helper/cex"); +const bitcoinAddressBook = require("../helper/bitcoin-book/index.js"); + +const config = { + ethereum: { + owners: ["0x33b9b598fb490f17426da7b7d344ead1bc3915dd"], + }, + bitcoin: { + owners: bitcoinAddressBook.tapbit, + }, +}; + +module.exports = cexExports(config); From 6b8d707805bf92a75faee8050c69fc69e836cb66 Mon Sep 17 00:00:00 2001 From: velo-tech <57611908+velo-tech@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:38:06 +0700 Subject: [PATCH 641/787] Update index.js (#12616) --- projects/velo/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/velo/index.js b/projects/velo/index.js index 172b47fed802..30ae9353b302 100644 --- a/projects/velo/index.js +++ b/projects/velo/index.js @@ -12,7 +12,8 @@ const AprFixLockedAddresses = [ "0xDa000FA80C5E9cb4E24a66bFF6a56cC454422e78", "0xEfA6EAbcb5fa35827DDB236046B3DDB6d257022B", "0xc12A93bf62CfD50620BCfDDD903913903DF647B4", - "0xc322a2110958c1365e88D88aef65Ebdf335b6E67" + "0xc322a2110958c1365e88D88aef65Ebdf335b6E67", + "0x7dd617eacd7Fd35f69275f943Ff82218213796b7" ]; const AprFixLockWithChangeableRatioTvl = [ From 5e1b392f94b6e528b8874d9199a38036b13faf94 Mon Sep 17 00:00:00 2001 From: stakestone-scdev Date: Mon, 9 Dec 2024 19:41:08 +0800 Subject: [PATCH 642/787] Track StakeStone STONEBTC TVL (#12615) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/stakestone-stonebtc/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/stakestone-stonebtc/index.js diff --git a/projects/stakestone-stonebtc/index.js b/projects/stakestone-stonebtc/index.js new file mode 100644 index 000000000000..389449b04196 --- /dev/null +++ b/projects/stakestone-stonebtc/index.js @@ -0,0 +1,16 @@ +const vaultABI = { + "getUnderlyings": "function getUnderlyings() external view returns (address[])" +} + +const Vault = '0x1fC603779DC6b4866769A58067777D2C52628226'; + +const Tvl = async (api) => { + const btclist = await api.call({ abi: vaultABI.getUnderlyings, target: Vault }) + return api.sumTokens({ owner: Vault, tokens: btclist }) +} + +module.exports = { + ethereum: { + tvl: Tvl, + } +} From 2f765215f68b1b3b778be66f7ffb6bd19facbe50 Mon Sep 17 00:00:00 2001 From: Ss5h Date: Mon, 9 Dec 2024 20:46:28 +0900 Subject: [PATCH 643/787] add core btc (#12612) --- projects/btcfi-cdp/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/btcfi-cdp/index.js b/projects/btcfi-cdp/index.js index 8886bd5226df..74798ef459fb 100644 --- a/projects/btcfi-cdp/index.js +++ b/projects/btcfi-cdp/index.js @@ -9,6 +9,10 @@ const chainPools = { BTCB: { pool: '0xee66D8C40282439F2eE855D8a3666FB73257D349', token: ADDRESSES.bfc.BTCB }, cbBTC: { pool: '0xED00a5201607aa26CDDcdcf1583845e7435a2F39', token: ADDRESSES.bfc.cbBTC } }, + core: { + WBTC: { pool: '0x872b347cd764d46c127ffefbcaB605FFF3f3a48C', token: "0x7A6888c85eDBA8E38F6C7E0485212da602761C08" }, + BTCB: { pool: '0x872b347cd764d46c127ffefbcaB605FFF3f3a48C', token: "0x5832f53d147b3d6Cd4578B9CBD62425C7ea9d0Bd" } + } } async function bitcoinTvl() { From 163c9313716ec347b2cd3723a081f1377e27fda0 Mon Sep 17 00:00:00 2001 From: fightingm <417300459@qq.com> Date: Mon, 9 Dec 2024 19:47:18 +0800 Subject: [PATCH 644/787] feat: edit pionex config (#12611) Co-authored-by: KaiMing Xu --- projects/pionex-cex/index.js | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/projects/pionex-cex/index.js b/projects/pionex-cex/index.js index 7abac83d7025..5a5e2747f9f9 100644 --- a/projects/pionex-cex/index.js +++ b/projects/pionex-cex/index.js @@ -12,7 +12,11 @@ const config = { "0x5e483d7803a8b39f0d6792a0431176a91fde6e31", "0x7175a01564ac4a83dd396e288a2707dee86caf63", "0x4998cb57364531560f4048213ba9b529ec27f14f", - "0x02104cae462af17739cc4315ef9ac710a9ed22a7" + "0x02104cae462af17739cc4315ef9ac710a9ed22a7", + "0x3c22c17501047d862b3a98e296079966aefd8df7", + "0xbbb72ba600d8493fea284d5fe44919f7b60d53f5", + "0x67be8ce27ef8158d51d8593bb5b26eafacc955d9", + "0xee5b5b923ffce93a870b3104b7ca09c3db80047a" ], }, bitcoin: { @@ -28,9 +32,35 @@ const config = { "TJZj4RS6v6U3HCpTSJ7CwNycRcoi7BREGx", "TLK8GVBqJNmcyaN5mpSPSzQfTjsSxb7sC9", "TGgMNPxdyUgdYwMSbMkpTPvaSkrRakKqcK", - "TAA7sxJ259JgstGPjanb5sB6ZJuCPtCobs" + "TAA7sxJ259JgstGPjanb5sB6ZJuCPtCobs", + "TJDENsfBJs4RFETt1X1W8wMDc8M5XnJhCe", + "TKRksVBKDBATKcifm4FXFHcD1FmJQ2bp3x" ], }, + solana: { + owners:[ + "DGFW1Effv88XzXkgfgyoFfmefzEU5Pp9zWJACBmCSh8K", + "FXv8hUveo3Di254W5vycvouxrmTJG4oQ5QMm1tLhY3NF" + ] + }, + bsc: { + owners:[ + "0xF6D4E5a7c5215F91f59a95065190CCa24bf64554", + "0x67be8ce27ef8158d51d8593bb5b26eafacc955d9" + ] + }, + optimism:{ + owners: [ + "0xF6D4E5a7c5215F91f59a95065190CCa24bf64554" + ] + }, + arbitrum: { + owners: [ + "0xF6D4E5a7c5215F91f59a95065190CCa24bf64554", + "0x67be8ce27ef8158d51d8593bb5b26eafacc955d9" + ] + }, + } module.exports = cexExports(config) \ No newline at end of file From 75e14a897a77d08e1c3c6556835a66431c0fadbe Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:37:32 +0100 Subject: [PATCH 645/787] add zil CG tokens #12607 --- projects/helper/tokenMapping.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 0a200e05665d..2fed8c486e47 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -100,6 +100,10 @@ const fixBalancesTokens = { '0x03a79429acc808e4261a68b0117acd43cb0fdbfa': { coingeckoId: "governance-zil", decimals: 15 }, '0xccf3ea256d42aeef0ee0e39bfc94baa9fa14b0ba': { coingeckoId: "xcad-network", decimals: 18 }, '0xe64ca52ef34fdd7e20c0c7fb2e392cc9b4f6d049': { coingeckoId: "kalijo", decimals: 18 }, + '0xe9d47623bb2b3c497668b34fcf61e101a7ea4058': { coingeckoId: "lunr-token", decimals: 4 }, + '0x9c3fe3f471d8380297e4fb222efb313ee94dfa0f': { coingeckoId: "zilpepe", decimals: 18 }, + '0x7d2ff48c6b59229d448473d267a714d29f078d3e': { coingeckoId: "zilstream", decimals: 8 }, + '0x241c677d9969419800402521ae87c411897a029f': { coingeckoId: "web3war", decimals: 12 }, }, } From 40c7f3e6f6e9f3c9dea25019685bd4075493e6b6 Mon Sep 17 00:00:00 2001 From: Beem Date: Mon, 9 Dec 2024 13:34:26 +0000 Subject: [PATCH 646/787] Radix: rly.fun TVL (#12606) --- projects/rlyfun/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/rlyfun/index.js diff --git a/projects/rlyfun/index.js b/projects/rlyfun/index.js new file mode 100644 index 000000000000..21071e2932ec --- /dev/null +++ b/projects/rlyfun/index.js @@ -0,0 +1,14 @@ + +const { get } = require('../helper/http') + +async function tvl(api) { + const { tvl } = await get('https://api.radlock.io/tvl/rlyfun') + return { + 'radix': tvl + } +} + +module.exports = { + timetravel: false, + radixdlt: { tvl } +} From bf1836b325355b9391fa6ec0854fe8510355b066 Mon Sep 17 00:00:00 2001 From: Antoine <67124021+antoineborg@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:56:53 +0100 Subject: [PATCH 647/787] SwissBorg: Add new wallets (#12621) --- projects/swissborg/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index 052e2e97ac8f..ba5c888a264c 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -88,6 +88,7 @@ const config = { '0xcDE4c1b984F3F02f997ECfF9980B06316de2577d', '0x7153D2ef9F14a6b1Bb2Ed822745f65E58d836C3F', '0xFF4606bd3884554CDbDabd9B6e25E2faD4f6fc54', + '0x9531AA9883bF11f2a63d86caD7e826f37Acec3c4', ] }, polygon: { @@ -110,13 +111,9 @@ const config = { arbitrum: { owners: [ '0x8F0d8b27bF808976Fa94f03e2230b4bca95bf3C4', + '0x5509Be53b2dD0CD6fb8473B0EdA94e0a3059b73a', ] }, - // injective: { - // owners: [ - // 'inj1wvhk7xhzf9kus9a4tpa6v8vhuqvm265rz7zd6n', - // ] - // } } module.exports = cexExports(config) From 6728c82d8b7f578a4746ad0fac9dc46ba1727204 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:07:11 +0100 Subject: [PATCH 648/787] track hyperfluid #12622 --- projects/hyperfluid/index.js | 68 ++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 projects/hyperfluid/index.js diff --git a/projects/hyperfluid/index.js b/projects/hyperfluid/index.js new file mode 100644 index 000000000000..aea441231439 --- /dev/null +++ b/projects/hyperfluid/index.js @@ -0,0 +1,68 @@ +const { function_view } = require("../helper/chain/aptos"); + +async function _getPoolInfo(offset, limit) { + const poolInfo = await function_view({ + functionStr: "0x6cd504c269458a3a24ef21063c21bd222eb82cb75ac51f4622787a23558fa488::liquidity_pool::all_pools_with_info", + args: [String(offset), String(limit)], + type_arguments: [], + }); + + return poolInfo; +} + +async function _getCoinInfo(faType) { + const coinInfo = await function_view({ + functionStr: "0x1::coin::paired_coin", + args: [faType], + type_arguments: [], + }); + + if (coinInfo.vec.length > 0) { + const address = coinInfo.vec[0].account_address; + const module = Buffer.from(coinInfo.vec[0].module_name.replace('0x', ''), 'hex').toString('utf-8'); + const struct = Buffer.from(coinInfo.vec[0].struct_name.replace('0x', ''), 'hex').toString('utf-8'); + + return (address + "::" + module + "::" + struct); + } else { + return null; + } +} + +async function getPoolInfo() { + let offset = 0; + let limit = 100; + let poolInfo = []; + let [data, pager] = await _getPoolInfo(offset, limit); + + if (data.length !== 0) { + poolInfo = poolInfo.concat(data); + } + + while (offset + limit < pager.total) { + offset += limit; + [data, pager] = await _getPoolInfo(offset, limit); + poolInfo = poolInfo.concat(data); + } + + return poolInfo; +} + +module.exports = { + timetravel: false, + methodology: "Counts the total liquidity in all pools on Hyperfluid.", + aptos: { + tvl: async (api) => { + const poolInfo = await getPoolInfo(); + let balances = {}; + + for (const pool of poolInfo) { + const coin1 = await _getCoinInfo(pool.token_1.inner) || pool.token_1.inner; + const coin2 = await _getCoinInfo(pool.token_2.inner) || pool.token_2.inner; + + api.add(coin1, pool.token_1_reserve); + api.add(coin2, pool.token_2_reserve); + } + }, + }, +}; + From bf041db8d4a798b2f97526f417f6e8bd6ebe77c4 Mon Sep 17 00:00:00 2001 From: dunglv-smartosc <108668260+dunglv-smartosc@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:13:52 -0500 Subject: [PATCH 649/787] Update D2Finance (#12625) Co-authored-by: dunglv-smartosc --- projects/d2finance/index.js | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/projects/d2finance/index.js b/projects/d2finance/index.js index 79b1afe321b9..03e52d4bfd1a 100644 --- a/projects/d2finance/index.js +++ b/projects/d2finance/index.js @@ -6,11 +6,9 @@ const vaultTvlOnArbitrum = sumERC4626VaultsExport({ "0x183424d5ae5ec9fd486634bc566d0f75ad9c9109", "0x5b49d7fae00de64779ddcd6b067c8eb046bd9a0b", "0x291344FBaaC4fE14632061E4c336Fe3B94c52320", - "0xEd80C858D43a1D043E86Cf1F20384e189cf23BDA", - "0x4ada76cc8755f62508a2df65d7fafa4fd26e76c6", - "0x1c17a39B156189BF40905425170a3Ff62fb650DA", - "0x7348925D3C63e4E61e9F5308eEec0f06EaA3bB7b", + "0x0F76De33a3679a6065D14780618b54584a3907D4", "0xD1D64dAeED7504Ef3Eb056aa2D973bD064843A84", + "0x1c17a39B156189BF40905425170a3Ff62fb650DA", "0xB0730AA7d6e880F901B5d71A971096dB56895a0f", "0x5f44A7DD0a016A5Ec9682df36899A781442CAa43", "0x0215EdEecdABE3DfC5EC8D59337eC9b26d359088", @@ -19,8 +17,10 @@ const vaultTvlOnArbitrum = sumERC4626VaultsExport({ "0x57f467C9c4639B066F5A4D676Cd8Ed7D87C1791b", "0x7348925D3C63e4E61e9F5308eEec0f06EaA3bB7b", "0xCFBBea43Fd99126E4c0eF53e2344609D513f72b3", - "0x0F76De33a3679a6065D14780618b54584a3907D4", - "0x195a9e0f29f96d4ab2139ee1272380a4aa352890" + "0x195a9e0f29f96d4ab2139ee1272380a4aa352890", + '0x75288264FDFEA8ce68e6D852696aB1cE2f3E5004', + '0xaB2743a3A2e06d457368E901F5f927F271fa1374', + '0x91aCd32dA9beA6DA3751dc12Ee0fBe47169349C1' ], isOG4626: true, }); @@ -30,11 +30,19 @@ const vaultTvlOnAvalanche = sumERC4626VaultsExport({ isOG4626: true, }) +const vaultTvlOnBase = sumERC4626VaultsExport({ + vaults: ['0x6c05A7d2c24B48fC3C615D294fEc2eB068548897'], + isOG4626: true, +}) + module.exports = { arbitrum: { tvl: vaultTvlOnArbitrum, }, avax: { tvl: vaultTvlOnAvalanche, + }, + base: { + tvl: vaultTvlOnBase, } }; From 2fc045048c5caf7e0e148b9d4886896b7dcb7f7a Mon Sep 17 00:00:00 2001 From: 0xsign <99134502+0xsign@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:14:16 +0100 Subject: [PATCH 650/787] Mellow add hcETH vault (#12624) --- projects/mellow-protocol-v2/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mellow-protocol-v2/index.js b/projects/mellow-protocol-v2/index.js index 24a222d970a0..b933fa5b717c 100644 --- a/projects/mellow-protocol-v2/index.js +++ b/projects/mellow-protocol-v2/index.js @@ -17,6 +17,7 @@ const config = { '0x64047dD3288276d70A4F8B5Df54668c8403f877F', '0x7b31F008c48EFb65da78eA0f255EE424af855249', '0x4f3Cc6359364004b245ad5bE36E6ad4e805dC961', + '0x375A8eE22280076610cA2B4348d37cB1bEEBeba0', ], }, } From 203c48a95677ddc3d9857d4996660fc5a1773eb4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:17:52 +0100 Subject: [PATCH 651/787] update arcadia v2 #12626 --- projects/arcadia-finance-v2/index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/projects/arcadia-finance-v2/index.js b/projects/arcadia-finance-v2/index.js index e100b9808466..2fab62d8a9a6 100644 --- a/projects/arcadia-finance-v2/index.js +++ b/projects/arcadia-finance-v2/index.js @@ -9,6 +9,7 @@ const config = { cbbtcPool: "0xa37E9b4369dc20940009030BfbC2088F09645e3B" }, uniNFT: "0x03a520b32c04bf3beef7beb72e919cf822ed34f1", + alienBaseNFT: "0xb7996d1ecd07fb227e8dca8cd5214bdfb04534e5", slipNFT: "0x827922686190790b37229fd06084350e74485b72", wAeroNFT: "0x17B5826382e3a5257b829cF0546A08Bd77409270".toLowerCase(), sAeroNFT: "0x9f42361B7602Df1A8Ae28Bf63E6cb1883CD44C27".toLowerCase(), @@ -49,25 +50,26 @@ async function unwrapArcadiaAeroLP({ api, ownerIds, }) { wrappedData.forEach((data) => api.add(data.pool, data.amountWrapped)); stakedData.forEach((data) => api.add(data.pool, data.amountStaked)); - await uwrapStakedSlipstreamLP({api, sSlipNftIds, }); + await uwrapStakedSlipstreamLP({ api, sSlipNftIds, }); } -async function uwrapStakedSlipstreamLP( {api, sSlipNftIds, }) { +async function uwrapStakedSlipstreamLP({ api, sSlipNftIds, }) { const { slipNFT } = config[api.chain]; const balances = api.getBalances(); // Arcadia's staked slipstream NFT wrapper issues a position with the same ID as the wrapped NFT // -> fetch the values of the wrapped IDs by simply fetching the values of those IDs on the native slipstream NFT - await unwrapSlipstreamNFT({balances:balances, positionIds:sSlipNftIds, nftAddress:slipNFT, chain:'base', blacklistedTokens:[], whitelistedTokens:[], uniV3ExtraConfig:{} }); - } + await unwrapSlipstreamNFT({ balances: balances, positionIds: sSlipNftIds, nftAddress: slipNFT, chain: 'base', blacklistedTokens: [], whitelistedTokens: [], uniV3ExtraConfig: {} }); +} async function tvl(api) { - let { factory, pools, uniNFT, slipNFT, wAeroNFT, sAeroNFT, sSlipNFT } = - config[api.chain]; + let { factory, pools, uniNFT, slipNFT, wAeroNFT, sAeroNFT, sSlipNFT, alienBaseNFT } = config[api.chain]; pools = Object.values(pools); const uTokens = await api.multiCall({ abi: "address:asset", calls: pools }); await api.sumTokens({ tokensAndOwners2: [uTokens, pools] }); const accounts = await api.fetchList({ lengthAbi: 'allAccountsLength', itemAbi: 'allAccounts', target: factory, }); + if (alienBaseNFT) + await sumTokens2({ api, owners: accounts, uniV3ExtraConfig: { nftAddress: alienBaseNFT } }) const assetData = await api.multiCall({ abi: abi.assetData, calls: accounts, }); const ownerTokens = accounts.map((account, i) => [assetData[i].assets, account]) @@ -77,7 +79,7 @@ async function tvl(api) { account, ]); // add all simple ERC20s - await api.sumTokens({ ownerTokens, blacklistedTokens: [uniNFT, slipNFT, wAeroNFT, sAeroNFT, sSlipNFT], }); + await api.sumTokens({ ownerTokens, blacklistedTokens: [uniNFT, slipNFT, wAeroNFT, sAeroNFT, sSlipNFT, alienBaseNFT,], }); // add all Arcadia-wrapped LP positions await unwrapArcadiaAeroLP({ api, ownerIds }); From 6b14d149435fcf9ac464ae5a0d310fc500a53206 Mon Sep 17 00:00:00 2001 From: Da Sichuan <86024678+DaSichuan@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:23:22 -0800 Subject: [PATCH 652/787] Correctly price SpringSUI Ecosystem LSTs (#12605) --- projects/suilend/index.js | 45 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/projects/suilend/index.js b/projects/suilend/index.js index 3104286932ad..0b51d8d42223 100644 --- a/projects/suilend/index.js +++ b/projects/suilend/index.js @@ -1,23 +1,64 @@ const sui = require("../helper/chain/sui"); const SUILEND_LENDING_MARKET_ID = "0x84030d26d85eaa7035084a057f2f11f701b7e2e4eda87551becbc7c97505ece1"; +const LST_CREATE_EVENT_TYPE = '0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::events::Event<0xb0575765166030556a6eafd3b1b970eba8183ff748860680245b9edd41c716e7::liquid_staking::CreateEvent>'; +const SUI_COIN_TYPE = '0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI' +const SPRINGSUI_COIN_TYPE = '0x83556891f4a0f233ce7b05cfe7f957d4020492a34f5405b2cb9377d060bef4bf::spring_sui::SPRING_SUI'; async function tvl(api) { + const redemptionRates = await getRedemtionRates() + console.log(redemptionRates) const object = await sui.getObject(SUILEND_LENDING_MARKET_ID) + for (const reserve of object.fields.reserves) { const coinType = '0x' + reserve.fields.coin_type.fields.name; - api.add(coinType, reserve.fields.available_amount) + if (redemptionRates[coinType]) { + api.add(SUI_COIN_TYPE, redemptionRates[coinType] * reserve.fields.available_amount) + } else { + api.add(coinType, reserve.fields.available_amount) + } } } async function borrowed(api) { + const redemptionRates = await getRedemtionRates() const object = await sui.getObject(SUILEND_LENDING_MARKET_ID) for (const reserve of object.fields.reserves) { const coinType = '0x' + reserve.fields.coin_type.fields.name; - api.add(coinType, reserve.fields.borrowed_amount.fields.value / 1e18) + if (redemptionRates[coinType]) { + api.add(SUI_COIN_TYPE, redemptionRates[coinType] * reserve.fields.borrowed_amount.fields.value / 1e18) + } else { + api.add(coinType, reserve.fields.borrowed_amount.fields.value / 1e18) + } } } + +async function getRedemtionRates() { + const events = (await sui.queryEvents({ + eventType: LST_CREATE_EVENT_TYPE, + })) + const coinTypeToRate = {}; + for (const event of events) { + const coinType = '0x' + event.event.typename.name; + if (coinType === SPRINGSUI_COIN_TYPE) { + continue; + } + try { + const poolId = event.event.liquid_staking_info_id; + const data = await sui.getObject(poolId) + const totalSupply = parseInt(data.fields.lst_treasury_cap.fields.total_supply.fields.value) + const stakedSui = parseInt(data.fields.storage.fields.total_sui_supply); + coinTypeToRate[coinType] = stakedSui / totalSupply; + } catch(e) { + continue + } + } + return coinTypeToRate; +} + + + module.exports = { timetravel: false, sui: { From 5c9a098470017a8ce686f24fca616e51a5c77348 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:24:11 +0100 Subject: [PATCH 653/787] remove log message --- projects/suilend/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/suilend/index.js b/projects/suilend/index.js index 0b51d8d42223..2036be1070c7 100644 --- a/projects/suilend/index.js +++ b/projects/suilend/index.js @@ -7,7 +7,6 @@ const SPRINGSUI_COIN_TYPE = '0x83556891f4a0f233ce7b05cfe7f957d4020492a34f5405b2c async function tvl(api) { const redemptionRates = await getRedemtionRates() - console.log(redemptionRates) const object = await sui.getObject(SUILEND_LENDING_MARKET_ID) for (const reserve of object.fields.reserves) { From 758f29ef44b218ad78ffc18b8bc8cf8d500144fc Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:27:46 +0100 Subject: [PATCH 654/787] Feat: Anemoy fund (RWA) (#12595) --- projects/anemoy-capital/index.js | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 projects/anemoy-capital/index.js diff --git a/projects/anemoy-capital/index.js b/projects/anemoy-capital/index.js new file mode 100644 index 000000000000..8839a5b6d252 --- /dev/null +++ b/projects/anemoy-capital/index.js @@ -0,0 +1,30 @@ +const sdk = require('@defillama/sdk') +const ADDRESSES = require('../helper/coreAssets.json') + +const USDC = ADDRESSES.ethereum.USDC + +const LTF = { + ethereum: '0x8c213ee79581ff4984583c6a801e5263418c4b86', + base: '0x8c213ee79581ff4984583c6a801e5263418c4b86', + celo: '0x27e8c820d05aea8824b1ac35116f63f9833b54c8', +} + +const abi = 'function vault(address asset) view returns (address)' + +const getNav = async () => { + const chain = 'ethereum' + const ethApi = new sdk.ChainApi({ chain }) + const vault = await ethApi.call({ target: LTF[chain], params: [USDC], abi }) + return ethApi.call({ target: vault, abi: 'uint256:pricePerShare' }) +} + +const tvl = async (api) => { + const { chain } = api + const nav = await getNav() + const balance = await api.call({ target: LTF[chain], abi: 'erc20:totalSupply' }) + api.add(USDC, balance * nav / 1e6, { skipChain :true }) +} + +Object.keys(LTF).forEach((chain) => { + module.exports[chain] = { tvl } +}) From 2a8943419d6dfb11043c2a473c9b939784764790 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 17:31:01 +0100 Subject: [PATCH 655/787] minor fix --- projects/anemoy-capital/index.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/projects/anemoy-capital/index.js b/projects/anemoy-capital/index.js index 8839a5b6d252..6a7aeb34e348 100644 --- a/projects/anemoy-capital/index.js +++ b/projects/anemoy-capital/index.js @@ -11,16 +11,17 @@ const LTF = { const abi = 'function vault(address asset) view returns (address)' -const getNav = async () => { +const getNav = async (timestamp) => { const chain = 'ethereum' - const ethApi = new sdk.ChainApi({ chain }) + const ethApi = new sdk.ChainApi({ chain, timestamp }) + await ethApi.getBlock() const vault = await ethApi.call({ target: LTF[chain], params: [USDC], abi }) return ethApi.call({ target: vault, abi: 'uint256:pricePerShare' }) } const tvl = async (api) => { const { chain } = api - const nav = await getNav() + const nav = await getNav(api.timestamp) const balance = await api.call({ target: LTF[chain], abi: 'erc20:totalSupply' }) api.add(USDC, balance * nav / 1e6, { skipChain :true }) } @@ -28,3 +29,5 @@ const tvl = async (api) => { Object.keys(LTF).forEach((chain) => { module.exports[chain] = { tvl } }) + +module.exports.misrepresentedTokens = true \ No newline at end of file From 90b9a1315958fbe14a1ab4f8ded3f88160f9c867 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:21:16 +0100 Subject: [PATCH 656/787] update maia #12591 --- projects/hermes-protocol/index.js | 2 +- projects/maia-dao/api.js | 4 ++-- projects/maia-dao/index.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/hermes-protocol/index.js b/projects/hermes-protocol/index.js index 588585d64aff..af59abf701dd 100644 --- a/projects/hermes-protocol/index.js +++ b/projects/hermes-protocol/index.js @@ -5,6 +5,6 @@ module.exports = { misrepresentedTokens: true, metis:{ tvl: uniTvlExport("0x633a093C9e94f64500FC8fCBB48e90dd52F6668F", "metis", undefined, undefined, { hasStablePools: true, useDefaultCoreAssets: true, }), - staking: staking("0xa4C546c8F3ca15aa537D2ac3f62EE808d915B65b", "0xb27bbeaaca2c00d6258c3118bab6b5b6975161c8"), + staking: () => ({}), }, } diff --git a/projects/maia-dao/api.js b/projects/maia-dao/api.js index 71364f816661..64f900102d9c 100644 --- a/projects/maia-dao/api.js +++ b/projects/maia-dao/api.js @@ -2,8 +2,8 @@ const { staking } = require('../helper/staking') module.exports = { metis: { - tvl: () => 0, - staking: staking('0xD7a586CE5250bEfaB2cc2239F7226B9602536E6A', '0x72c232D56542Ba082592DEE7C77b1C6CFA758BCD') + tvl: () => ({}), + staking: () => ({}), }, arbitrum: { staking: staking('0x000000f0C01c6200354f240000b7003668B4D080', '0x00000000ea00F3F4000e7Ed5Ed91965b19f1009B'), // v2 diff --git a/projects/maia-dao/index.js b/projects/maia-dao/index.js index 596a9bd012e5..0f1290838c45 100644 --- a/projects/maia-dao/index.js +++ b/projects/maia-dao/index.js @@ -25,6 +25,6 @@ async function tvl(api) { module.exports = { metis: { - tvl, + tvl: () => ({}), } } From fc54285c493367483d72795f94b363c74edda0a9 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:24:46 +0100 Subject: [PATCH 657/787] update clober #12563 --- projects/clober-liquidity-vault/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clober-liquidity-vault/index.js b/projects/clober-liquidity-vault/index.js index 0ceb589677d9..7cb0e0bf6a5e 100644 --- a/projects/clober-liquidity-vault/index.js +++ b/projects/clober-liquidity-vault/index.js @@ -8,7 +8,7 @@ const abi = { const config = { base: { - rebalancer: '0x13f2Ff6Cc952f4181D6c316426e9CbdA957c6482', + rebalancer: '0x6A0b87D6b74F7D5C92722F6a11714DBeDa9F3895', bookManager: '0x382CCccbD3b142D7DA063bF68cd0c89634767F76', fromBlock: 21715410, }, From 64e36223fd3fa274b52b08d70d42ddc715671215 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:32:40 +0100 Subject: [PATCH 658/787] Fix: 21co (#12628) --- projects/21-co/index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/projects/21-co/index.js b/projects/21-co/index.js index 4254a70a3f12..d5cc8a5fab18 100644 --- a/projects/21-co/index.js +++ b/projects/21-co/index.js @@ -1,7 +1,6 @@ const { cexExports } = require('../helper/cex') const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') - const config = { bitcoin: { owners: bitcoinAddressBook.twentyOneCo @@ -37,9 +36,7 @@ const config = { ], }, bep2: { - owners: [ - 'bnb1k3ulpgw4wzl0e8qx80u87aq9w7ekfygruzs4dg' - ], + // owners: ['bnb1k3ulpgw4wzl0e8qx80u87aq9w7ekfygruzs4dg'], }, /* bitcoin_cash: { owners: [ From 2ab5d6d098e7ac954429009ed9130c7189dd5eb7 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:32:54 +0100 Subject: [PATCH 659/787] Fix: Astarter (#12629) --- projects/astarter/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/astarter/index.js b/projects/astarter/index.js index c1629d936fc1..13481cbf1ef6 100644 --- a/projects/astarter/index.js +++ b/projects/astarter/index.js @@ -8,7 +8,7 @@ async function tvl() { } async function getPoolStake(poolIds) { - const response = await axios.post('https://api.koios.rest/api/v0/pool_info', { + const response = await axios.post('https://api.koios.rest/api/v1/pool_info', { "_pool_bech32_ids": poolIds }); return response.data.reduce((a, b) => a + b.live_stake / 1e6, 0); From 5017454b57d693d050d86e6088a925cbb4c65c2f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:08:37 +0100 Subject: [PATCH 660/787] update polynomial #12620 --- projects/helper/coreAssets.json | 1 + projects/helper/tokenMapping.js | 4 ++++ projects/polynomial-liquidity-layer/index.js | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 39a843d9281c..346589bb8771 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1951,6 +1951,7 @@ }, "polynomial": { "USDC": "0x17C9D8Cef7Ef072844EEaEdE1F9f54C7E3fa8743", + "fxUSDC": "0x2369EB4a76d80fBeAa7Aa73e1e1f9EAeE88C07F4", "SDAI": "0x615172e47c0C5A6dA8ea959632Ac0166f7a59eDc", "sUSDe": "0x2A06DEAc3E863c23DD6a89Eeacd80aBA9E08B77B", "USD0": "0x6224dC817dC4D5c53fcF3eb08A4f84C456F9f38f" diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 2fed8c486e47..504ab1751cea 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -105,6 +105,10 @@ const fixBalancesTokens = { '0x7d2ff48c6b59229d448473d267a714d29f078d3e': { coingeckoId: "zilstream", decimals: 8 }, '0x241c677d9969419800402521ae87c411897a029f': { coingeckoId: "web3war", decimals: 12 }, }, + polynomial: { + '0x6224dc817dc4d5c53fcf3eb08a4f84c456f9f38f': { coingeckoId: "usual-usd", decimals: 18 }, + '0x2369eb4a76d80fbeaa7aa73e1e1f9eaee88c07f4': { coingeckoId: "ethereum:0x4f460bb11cf958606c69a963b4a17f9daeeea8b6", decimals: 0 }, + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/polynomial-liquidity-layer/index.js b/projects/polynomial-liquidity-layer/index.js index c5780e43ce22..50c406bcf8fd 100644 --- a/projects/polynomial-liquidity-layer/index.js +++ b/projects/polynomial-liquidity-layer/index.js @@ -4,6 +4,6 @@ const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { polynomial: { - tvl: sumTokensExport({ owner: '0xc133983D6d9140923b5eaE52664221d9099cf119', tokens: [ADDRESSES.polynomial.USDC,ADDRESSES.polynomial.SDAI, ADDRESSES.polynomial.sUSDe, ADDRESSES.polynomial.USD0]}) + tvl: sumTokensExport({ owner: '0xc133983D6d9140923b5eaE52664221d9099cf119', tokens: [ADDRESSES.polynomial.fxUSDC,ADDRESSES.polynomial.SDAI, ADDRESSES.polynomial.sUSDe, ADDRESSES.polynomial.USD0]}) } } \ No newline at end of file From 54f777bff41b3b1bd6a832f7b857a7145cb611b4 Mon Sep 17 00:00:00 2001 From: "salvor.io" <148768872+salvorio@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:01:01 +0300 Subject: [PATCH 661/787] Added tvl assets (#12631) --- projects/salvor/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/salvor/index.js b/projects/salvor/index.js index 645cf13c0a2b..64d279bc0188 100644 --- a/projects/salvor/index.js +++ b/projects/salvor/index.js @@ -7,7 +7,15 @@ module.exports.avax = { hallmarks: [ [1702501200, "Salvor Lending Launch"] ], - methodology: 'TVL counts AVAX coins in the Salvor Pool address:0xab4fe2d136efd7f8dfce3259a5e3c5e4c0130c80', + methodology: 'TVL counts AVAX coins in the Salvor Pool address:0xab4fe2d136efd7f8dfce3259a5e3c5e4c0130c80 and ERC20 assets in the Salvor Lending Pool address: 0x22e229d14dc80a1ea7ca7637173e8c6c36d60fe8', staking: staking("0x72b73fa1569dF9fF1aE9b29CD5b164Af6c02EbaA", "0xF99516BC189AF00FF8EfFD5A1f2295B67d70a90e"), - tvl: sumTokensExport({ owners: ["0xab4fe2d136efd7f8dfce3259a5e3c5e4c0130c80"], tokens: [ADDRESSES.avax.WAVAX, nullAddress] }), + tvl: sumTokensExport({ + owners: ["0xab4fe2d136efd7f8dfce3259a5e3c5e4c0130c80", "0x22e229d14dc80a1ea7ca7637173e8c6c36d60fe8"], + tokens: [ + ADDRESSES.avax.WAVAX, + ADDRESSES.avax.USDC, + ADDRESSES.avax.USDt, + nullAddress + ] + }), }; From c6e0c1808c0a36c8f8090f1f7ec39e4a93a62e50 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:01:44 +0100 Subject: [PATCH 662/787] Fix: Belt-finance (#12630) --- projects/belt/abi.json | 4 -- projects/belt/config.js | 101 +++++++++++++++++++++++++++++++++ projects/belt/index.js | 120 ++++++---------------------------------- 3 files changed, 119 insertions(+), 106 deletions(-) delete mode 100644 projects/belt/abi.json create mode 100644 projects/belt/config.js diff --git a/projects/belt/abi.json b/projects/belt/abi.json deleted file mode 100644 index 87d3b9f16253..000000000000 --- a/projects/belt/abi.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "calcPoolValueInToken": "uint256:calcPoolValueInToken", - "token": "address:token" -} \ No newline at end of file diff --git a/projects/belt/config.js b/projects/belt/config.js new file mode 100644 index 000000000000..04b388d8c3cb --- /dev/null +++ b/projects/belt/config.js @@ -0,0 +1,101 @@ +const CONFIG = { + bsc: [ + '0x51bd63f240fb13870550423d208452ca87c44444', + '0xa8bb71facdd46445644c277f9499dd22f6f0a30c', + '0xcb3346ad40c947a2228b2e224c3931a5224ba7ad', + '0xecb589831eefbdbbc48d1f86294724c76acd3314', + '0xaa20e8cb61299df2357561c2ac2e1172bc68bc25', + '0x9a144edd7309bcc4e106a1a04e7fc402115a0980', + '0x5142f6857f029bed5ddf6247d8a1f75984a3a380', + '0x1794bb186c15fddbf4aac4a3b0e2f40659e9b841', + '0x9a86fc508a423ae8a243445dba7ed5364118ab1d', + '0x27932f578128211f4c593f864ee2054b78f94992', + '0x4f52533c9504df756ecdfd311a8b846a59422e4e', + '0x55e1b1e49b969c018f2722445cd2dd9818ddcc25', + '0xdcfe3ca4863059ae2da63c7fdea04541bea178f9', + '0x7a59bf07d529a5fdbab67d597d63d7d5a83e61e5', + '0xed8487acc0d124efb5e8cfb5cf391caefbf99cbf', + '0x48f7fbea3781b95a9ac1cedb3d277bc3570bdcab', + '0x5ace08ff6d79663f9bf90686744c214317d0df8e', + '0x9171bf7c050ac8b4cf7835e51f7b4841dfb2ccd0', + '0x87c6668d33f224fe00adb3ef85a4a5ab4d5bf257', + '0x4b91dac1229f41c4d322f5f0fea246f069fb81a3', + '0xba2f7cb88d818bba7e932310f49d754eb29eb2ef', + '0xe12135207747d2ec1d1f0aabd4535e6ee08b853b', + '0x94065e5740b9c0560be9b830da0b2896da5f86d8', + '0x090f22ca2e3429f1f4dd38052cb451653e98f0c2', + ], + klaytn: [ + '0x7B6A8e0c40D3C3405afd5b4BAd3F5c202e18d518', + '0x766A73C9f9d51C773c95C649e26c59063f570cf8', + '0xf70644e5650e2ef5f0D31dF46e7e369771c2707F', + '0x1f450aE0AfC30b19610A57b52F9ac8C317Ac5B6A', + '0x3331e6EE96416E1B52B3182b67Faa970DC9a4F54', + '0xB551b72c1fC69E349180e1Feb11D87C719321274', + '0xe510d40a4B92302798d6baA1eF004E4629438e81', + '0x9B433Fb8424fCB35d6614C12559bA513F77b376f', + '0x2aD2811A8387191Ba08DACf8B95cC018B108252B', + '0x36715E1C3FD2Df068292De739F925dbdd28D7617', + '0x99084eb75E406A55dB913FA3E4f822Ff3690eAF5', + '0x426533F501c3615A4244087d2A9981b037C40D46', + '0xc0c09760BA26434d5482f61ae82a543c72ea8D08', + '0x3677F31C23D668d4c733f2a032ee2d3bc37aB4d9', + '0x2df990677D1E71BAEa494Ff962b408c06B8Cf6E1', + '0x9D2a003fe5FE21aB7CB1235080e48Ef801A1EE01', + '0x826c88315bb441e6886a63f80164E67F89359C5A', + '0x415cA0bbeD91664F5f94D8c62d6CB480F182a9CE', + '0xa541f77f0049A828c3CB8C800d877822Bbc7305c', + '0xF1FF200995ceC953B0A8c8539c21AF4AcC455186', + '0x94A37969EEB922535080E102F74d3c7b29470Afe', + '0xe7fa18E435FE9aCBdFb5016514B00C61C9a27507', + '0x3D5e1dd34e80E71Bcecad3eC1892B8aEe161A786', + '0x4935d93a4fe73E0F7E8bDFc9eF2e4eC79CDf1eB7', + '0x1E5dF060e7320414a2E9300968C66DD01291ca79', + '0x6731582c2F003741c135eC79F74864944A2884b0', + '0x39Ff319dd1282452cd73154B6ac670449234230F', + '0xf54c5E2305Bfe7dc62c6f1C0506c904F5564734b', + '0xBb8E0F162d53E15Dc1121081defF153b3A9481eF', + '0x31a1FCeB1296c1FE0e0A3D29658fA95898aE4f69', + '0x8A5724CA16eE5Cd4B6Ed6aFC8ab7766134CEAc53', + '0x430a6768Ef348B06F65F1FEEf01B9b2B58C75f79' + ], + heco: [ + '0xe8f67d3Dd4587E065d4abE8dCBe454E84526A715', + '0x6D8C89C937B68352916904Cb9FB39BA3aCd05c75', + '0x0bd7a237672BB287E31B80671704f83335E571f2', + '0x46e0898B8C480Bc3bF864a5C64Cd06940Ff33B4b', + '0x4Cd59EEB3a4D2fa5c35FD3dE0BA1723EeaF1D258', + '0x9d5E7AC92a7495EbCC0190964A3b90dfaFc2CF51', + '0x7840c4C08ab91AB23F57018BF6202a64C7C67588', + '0x923C5DD2449d7DCc54a86635F9196BEB2a4921a1', + '0x8434b37b493B27a1e679062210B74B4B22a66F38', + '0xB1493B7bc8e260B0b25235ae5c34B0dC201ce8C3', + '0x8d3a8a05e74c41edc6cd2cba2ec7fca0e1c611bb', + '0xff8376a18db1889abdf325cd28f37a12d2685b86', + '0xeb751332103b713b40321f86f5ab5468143c45aa', + '0xD3E341FDfa1c71C138e59c088EeBC069e2CfF96e', + '0x86f5c8eb736c95dd687182779edd792fef0fa674', + '0x5d790E3485aa6Dfe5b4F810C77CD7A41dF7B4CAC', + '0xCC6c6d6a68f303DaEE2F75C3D0E8688987cad2d8', + '0x00e517A416827720F00e61d9033E99426a6C3C63', + '0x96a020e1B07089e92f67FbFf1b870E638bf5a711', + '0x0e564BC863c2072C47FB8f952062BD5bc673E142', + '0xbca98b7049562B3BDA2E095fEf40626cf77Bc2f3', + '0x871dA29944D9CAeB25e048e6196D27c683C33796', + '0xCD70C61807130FcD68d8E2d0F32b2FB8be7A6C40', + '0x280Ae883FD219a56ef5182799f324451eaFE201D', + '0x9bC7a8ec3a8b9d9AEc0C5808456e35A934f457e5', + '0x2c03530b77699F08c69eCc4D33F801fb667f3406', + '0xBB550cDE1C88C2041Db27DC2fCf67f5354ECa0Ae', + '0x44F95Fa54b2ac1cEF14F5085dB2B1a7850b6881C', + '0x25D6A0133CF98E98e462a2a1AD127a5faEB01602', + '0xA8714b9c86Fb590bF2CEE12bdFccC575aB454272', + '0x2df074959D0f3FCfE9b5bFc18E4f9a3F7f56EDCc', + '0x50Cb33F99e05688b4969F728431041f6AA83A086', + '0xF95a075F57887405a424BAE3825086DeEa5c2a99', + '0x50eBED91FDf0dD0bBf2a46eCfB00e31F897dc870', + '0xC04a84d0E3f290D0777c233E0945678469adF353', + ] +} + +module.exports = CONFIG; \ No newline at end of file diff --git a/projects/belt/index.js b/projects/belt/index.js index b9e351d07a40..6665c603edd9 100644 --- a/projects/belt/index.js +++ b/projects/belt/index.js @@ -1,111 +1,27 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require('@defillama/sdk') -const abi = require('./abi.json') -const { get } = require('../helper/http') -const BigNumber = require("bignumber.js"); -const { toUSDTBalances } = require('../helper/balances'); +const CONFIG = require('./config') -// https://docs.belt.fi/contracts/contract-deployed-info -const bscVaults = [ - ADDRESSES.bsc.beltBTC, - ADDRESSES.bsc.beltETH, - ADDRESSES.bsc.beltBNB, - '0x9171Bf7c050aC8B4cf7835e51F7b4841DFB2cCD0', - '0x55E1B1e49B969C018F2722445Cd2dD9818dDCC25', - '0x7a59bf07D529A5FdBab67D597d63d7D5a83E61E5', - '0x9A86fc508a423AE8a243445dBA7eD5364118AB1D' -] +const beltView = '0xB543248F75fd9f64D10c247b5a57F142EFF88Aac' -const hecoVaults = [ - '0x4Cd59EEB3a4D2fa5c35FD3dE0BA1723EeaF1D258', - '0xB1493B7bc8e260B0b25235ae5c34B0dC201ce8C3', - '0x86f5C8EB736c95dd687182779edd792FEF0fA674', - '0xA8714b9c86Fb590bF2CEE12bdFccC575aB454272', - '0xC04a84d0E3f290D0777c233E0945678469adF353', - '0x9bC7a8ec3a8b9d9AEc0C5808456e35A934f457e5', - '0x0e564BC863c2072C47FB8f952062BD5bc673E142' -] - -// const klaytnVaults = [ -// '0xe510d40a4B92302798d6baA1eF004E4629438e81', -// '0x426533F501c3615A4244087d2A9981b037C40D46', -// '0x826c88315bb441e6886a63f80164E67F89359C5A', -// '0xe7fa18E435FE9aCBdFb5016514B00C61C9a27507', -// '0x39Ff319dd1282452cd73154B6ac670449234230F', -// '0x430a6768Ef348B06F65F1FEEf01B9b2B58C75f79', -// '0xf70644e5650e2ef5f0D31dF46e7e369771c2707F' -// ] - -const tetherLP = "0x04100231d548Df31a003BEb99e81e3305Be9647b" -// const BELT = "0xE0e514c71282b6f4e823703a39374Cf58dc3eA4f" - -async function getTvl(chain, block, address) { - const underlyingTokens = await sdk.api.abi.multiCall({ - chain: chain, - calls: address.map(v=>({target:v})), - block, - abi: abi.token - }) - const underlyingBalances = await sdk.api.abi.multiCall({ - chain: chain, - calls: address.map(v=>({target:v})), - block, - abi: abi.calcPoolValueInToken - }) - const balances = {} - underlyingBalances.output.forEach((balance, index)=>{ - sdk.util.sumSingleBalance(balances, chain+':'+underlyingTokens.output[index].output, balance.output) - }) - - const beltInfo = await get('https://ss.belt.fi/info/all.json') - const lockedUSDT = beltInfo.info[chain.toUpperCase()].vaultPools.find(x => x.wantToken.toLowerCase() === tetherLP.toLowerCase()) - const [ usdt, wantLocked ] = Object.entries(toUSDTBalances(lockedUSDT.wantLocked))[0] - balances[usdt] = wantLocked - - return balances +const abi = { + calcPoolValueInToken: "uint256:calcPoolValueInToken", + token: "address:token", + getStakingStat: "function getStakingStat() view returns (tuple(address token, address beltToken, uint256 totalLockedWant, uint256 tokenDecimal, uint256 beltTokenDecimal, uint256 beltTokenTotalSupply, uint256 lockUpPeriod, uint256 pricePerFullShare) info)" } - -function bscTvl(timestamp, ethBlock, chainBlocks) { - return getTvl('bsc', chainBlocks['bsc'], bscVaults) +const tvl = async (api) => { + const tokens = await api.multiCall({ calls: CONFIG[api.chain], abi: abi.token }) + const suppliesInToken = await api.multiCall({ calls: CONFIG[api.chain], abi: abi.calcPoolValueInToken }) + api.add(tokens, suppliesInToken) } -function hecoTvl(timestamp, ethBlock, chainBlocks) { - return getTvl('heco', chainBlocks['heco'], hecoVaults) -} - -async function klaytnTvl() { - const beltInfo = await get('https://ss.belt.fi/info/all.json') - var tvl = new BigNumber('0'); - - beltInfo.info.KLAYTN.vaults.forEach(vault =>{ - tvl = tvl.plus(vault.tvl) - }) - - const lockedUSDT = beltInfo.info.KLAYTN.vaultPools.find(x => x.wantToken.toLowerCase() === tetherLP.toLowerCase()) - tvl = tvl.plus(lockedUSDT.wantLocked) - - return toUSDTBalances(tvl.toFixed(2)) -} - -async function getStaking(chain) { - const beltInfo = await get('https://ss.belt.fi/info/all.json') - const stakingInfo = beltInfo.info[chain.toUpperCase()].staking - - return toUSDTBalances(stakingInfo.tvl) +const staking = async (api) => { + const { token, pricePerFullShare, beltTokenTotalSupply } = await api.call({ target: beltView, abi: abi.getStakingStat }) + api.add(token, beltTokenTotalSupply * pricePerFullShare / 1e18) } module.exports = { - timetravel: false, - methodology: 'TVL includes the liquidity of all the Vaults, 3Tether LP and staking counts the BELT that has been staked in BSC. Data is pulled from:"https://ss.belt.fi/info/all.json".', - bsc: { - tvl: bscTvl, - staking: () => getStaking('bsc'), - }, - heco: { - tvl: hecoTvl, - }, - klaytn: { - tvl: klaytnTvl, - }, -} + methodology: 'TVL includes the liquidity of all the Vaults, 3Tether LP and staking counts the BELT that has been staked in BSC.', + bsc: { tvl, staking }, + heco: { tvl }, + klaytn: { tvl } +} \ No newline at end of file From f034892419d1b5a1798ce31845df2978bf31c311 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 9 Dec 2024 22:01:04 +0100 Subject: [PATCH 663/787] fix ohm --- projects/olympus/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/olympus/index.js b/projects/olympus/index.js index 7db910491fc3..de65a9e05eba 100644 --- a/projects/olympus/index.js +++ b/projects/olympus/index.js @@ -158,12 +158,13 @@ function buildTvl(isOwnTokensMode = false){ const tokens = tokensToBalances.map(i => i.tokenAddress) - const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: tokens }) + const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: tokens, permitFailure: true, }) const ownTokens = new Set(olympusTokens.map(i => i.toLowerCase())) tokensToBalances.map(async (token, i) => { if (ownTokens.has(token.tokenAddress.toLowerCase())) { if (!isOwnTokensMode) return; } else if (isOwnTokensMode) return; + if (!decimals[i]) return; api.add(token.tokenAddress, token.balance * 10 ** decimals[i]) }) return await sumTokens2({ api, resolveLP: true, }) From b39c1bca11dd1db7dbb2cb3d5fea11ad52a66e36 Mon Sep 17 00:00:00 2001 From: Danil Cherevashko Date: Mon, 9 Dec 2024 23:40:04 +0200 Subject: [PATCH 664/787] Add swap.coffee XROCK staking (#12609) --- projects/swap-coffee/index.js | 49 ++++++++++++----------------------- 1 file changed, 16 insertions(+), 33 deletions(-) diff --git a/projects/swap-coffee/index.js b/projects/swap-coffee/index.js index add69ba5f36d..d74d44216f32 100644 --- a/projects/swap-coffee/index.js +++ b/projects/swap-coffee/index.js @@ -1,46 +1,29 @@ -const { call, sumTokensExport, getTokenRates, getJettonBalances } = require('../helper/chain/ton') -const {sleep} = require("../helper/utils"); +const { sumTokensExport } = require('../helper/chain/ton') const CES_MASTER = "0:a5d12e31be87867851a28d3ce271203c8fa1a28ae826256e73c506d94d49edad" -const STAKING_CONTRACT = "0:29f90533937d696105883b981e9427d1ae411eef5b08eab83f4af89c495d27df" +const CES_STAKING_CONTRACT = "0:29f90533937d696105883b981e9427d1ae411eef5b08eab83f4af89c495d27df" const DEDUST_TON_CES_POOL = "0:123e245683bd5e93ae787764ebf22291306f4a3fcbb2dcfcf9e337186af92c83" const STONFI_CES_TON_POOL = "0:6a839f7a9d6e5303d71f51e3c41469f2c35574179eb4bfb420dca624bb989753" -async function getTokenSupply(addr) { - return (await call({ target: addr, abi: "get_jetton_data"}))[0] / 1e9 -} - -function calcVolume(reserve, supply, rate) { - return ((reserve / 1e9) / supply) * rate -} +const XROCK_MASTER = "0:157c463688a4a91245218052c5580807792cf6347d9757e32f0ee88a179a6549" +const XROCK_STAKING_CONTRACT = "0:c84deaf1d956d5f80be722bbdaeeba33d70d068ace97c6fc23e1bfeb5689e1ca" +const DEDUST_XROCK_USDT_POOL = "0:9cf96b400deedd4143bd113d8d767f0042515e2ad510c4b4adbe734cd30563b8" +const STONFI_XROCK_USDT_POOL = "0:6ba0e19f6adacbefdcbbc859407241eff578f4a57edc8e3e05e86dcfbb283f20" module.exports = { methodology: "Counts swap.coffee smartcontract balance as TVL.", timetravel: false, ton: { tvl: () => { }, - staking: sumTokensExport({ owners: [STAKING_CONTRACT], tokens: [CES_MASTER]}), - pool2: async (api) => { - const dedustPoolReserves = await call({ target: DEDUST_TON_CES_POOL, abi: "get_reserves" }) - const dedustLpSupply = await getTokenSupply(DEDUST_TON_CES_POOL) - - // toncenter api is rate limited - await sleep(3000) - - const stonfiPoolReserves = await call({ target: STONFI_CES_TON_POOL, abi: "get_pool_data" }) - const stonfiLpSupply = await getTokenSupply(STONFI_CES_TON_POOL) - - const rates = await getTokenRates({ tokens: ["TON", CES_MASTER] }) - - const stonLpPrice = calcVolume(stonfiPoolReserves[0], stonfiLpSupply, rates[CES_MASTER]) + - calcVolume(stonfiPoolReserves[1], stonfiLpSupply, rates["TON"]) - const dedustLpPrice = calcVolume(dedustPoolReserves[0], dedustLpSupply, rates["TON"]) + - calcVolume(dedustPoolReserves[1], dedustLpSupply, rates[CES_MASTER]) - - const balances = await getJettonBalances(STAKING_CONTRACT) - - return api.addUSDValue((stonLpPrice * balances[STONFI_CES_TON_POOL].balance / 1e9) + - (dedustLpPrice * balances[DEDUST_TON_CES_POOL].balance / 1e9)) - } + staking: sumTokensExport({ + owners: [CES_STAKING_CONTRACT, XROCK_STAKING_CONTRACT], + tokens: [XROCK_MASTER, CES_MASTER], + onlyWhitelistedTokens: true + }), + pool2: sumTokensExport({ + owners: [CES_STAKING_CONTRACT, XROCK_STAKING_CONTRACT], + tokens: [DEDUST_TON_CES_POOL, STONFI_CES_TON_POOL, DEDUST_XROCK_USDT_POOL, STONFI_XROCK_USDT_POOL], + onlyWhitelistedTokens: true + }) } } \ No newline at end of file From 35f5e343b3749fac7fd0dd49b48878fdefad0e34 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Mon, 9 Dec 2024 22:24:26 +0000 Subject: [PATCH 665/787] balancer treasury using kk api --- projects/treasury/balancer.js | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/projects/treasury/balancer.js b/projects/treasury/balancer.js index a0327c28f333..1d9601f342cf 100644 --- a/projects/treasury/balancer.js +++ b/projects/treasury/balancer.js @@ -1,4 +1,5 @@ const ADDRESSES = require("../helper/coreAssets.json"); +const { karpatKeyTvl } = require("../helper/karpatkey"); const { nullAddress, treasuryExports } = require("../helper/treasury"); // Treasury addresses per chain @@ -104,46 +105,48 @@ const avaxOwnTokens = [ "0xA39d8651689c8b6e5a9e0AA4362629aeF2c58F55" // 80BAL-20WAVAX BPT ]; - +// Keeping old code because karpatkey's api tends to break module.exports = treasuryExports({ ethereum: { owners: [eth, eth2], - tokens: ethTokens, + //tokens: ethTokens, ownTokens: ethOwnTokens }, arbitrum: { owners: [arb], - tokens: arbTokens, + //tokens: arbTokens, ownTokens: arbOwnTokens }, polygon: { owners: [pol], - tokens: polTokens, + //tokens: polTokens, ownTokens: polOwnTokens }, polygon_zkevm: { owners: [zkevm], - tokens: zkevmTokens, + //tokens: zkevmTokens, ownTokens: zkevmOwnTokens }, optimism: { owners: [op], - tokens: opTokens, + //tokens: opTokens, ownTokens: opOwnTokens }, base: { owners: [base], - tokens: baseTokens, + //tokens: baseTokens, ownTokens: baseOwnTokens }, xdai: { owners: [xdai], - tokens: xdaiTokens, + //tokens: xdaiTokens, ownTokens: xdaiOwnTokens }, avax: { owners: [avax], - tokens: avaxTokens, + //tokens: avaxTokens, ownTokens: avaxOwnTokens } }); + +module.exports.ethereum.tvl = async (api)=>karpatKeyTvl(api, "Balancer DAO", "BAL") \ No newline at end of file From 598241704987f0c65a8f00d988fcd7490559b5dc Mon Sep 17 00:00:00 2001 From: Andrew Smirnov Date: Tue, 10 Dec 2024 11:07:59 +0300 Subject: [PATCH 666/787] Add new chains and tokens to CrossCurve (#12632) --- projects/crosscurve/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/projects/crosscurve/index.js b/projects/crosscurve/index.js index 0a997399ecdc..69e17877bd72 100644 --- a/projects/crosscurve/index.js +++ b/projects/crosscurve/index.js @@ -49,6 +49,7 @@ module.exports = { "0xa70af99bff6b168327f9d1480e29173e757c7904", // crvUSDT "0xdad97f7713ae9437fa9249920ec8507e5fbb23d3", // crv3crypto ADDRESSES.polygon.WBTC, // WBTC + "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", // WETH ], }), }, @@ -64,6 +65,7 @@ module.exports = { "0xA5E0E46462970C9Ee8C2ECadcde254c483748Ec4", // b3pool "0xae87e5fa20f335ce14aa3b9e0616308d9ac7d4ce", // crvUSDT ADDRESSES.bsc.BTCB, // BTCB + "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", // ETH ], }), }, @@ -94,6 +96,7 @@ module.exports = { "0x1337BedC9D22ecbe766dF105c9623922A27963EC", // av3crv "0x1daB6560494B04473A0BE3E7D83CF3Fdf3a51828", // crv3crypto ADDRESSES.avax.BTC_b, // BTC.b + "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", // WETH.e ], }), }, @@ -112,6 +115,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ "0x1337bedc9d22ecbe766df105c9623922a27963ec", // x3CRV + "0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1", // WETH ], }), }, @@ -165,6 +169,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ "0xcaef324bea3ff5c7a08710081294f3344ffadc54", // FRAX/USDT + "0xfc00000000000000000000000000000000000006", // wfrxETH ], }), }, @@ -176,4 +181,20 @@ module.exports = { ], }), }, + metis: { + tvl: sumTokensExport({ + owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", + tokens: [ + "0x420000000000000000000000000000000000000a", // WETH + ], + }), + }, + mode: { + tvl: sumTokensExport({ + owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", + tokens: [ + "0x4200000000000000000000000000000000000006", // WETH + ], + }), + }, }; From 5058828cd45018d4dc0cd3d3e89df20be739d915 Mon Sep 17 00:00:00 2001 From: hashai <163602313+SamvidNayak@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:10:10 +0300 Subject: [PATCH 667/787] add Hash AI tvl adapter (#12633) Co-authored-by: SamvidNayak --- projects/hashai/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/hashai/index.js diff --git a/projects/hashai/index.js b/projects/hashai/index.js new file mode 100644 index 000000000000..1243184b6564 --- /dev/null +++ b/projects/hashai/index.js @@ -0,0 +1,20 @@ +const { staking } = require('../helper/staking'); +const { sumTokensExport } = require("../helper/unwrapLPs"); +const coreAssets = require("../helper/coreAssets.json"); + +const contracts = [ + '0xd2fe354cfebaa06f2140f13b66d0b3e1fc3ceec0', + '0x27cc372757ca955ebf93bd577cd95c4e12f5c14b', +]; + +const hashai = '0x292fcDD1B104DE5A00250fEBbA9bC6A5092A0076'; + +module.exports = { + ethereum: { + tvl: sumTokensExport({ + owners: contracts, + token: coreAssets.null + }), + staking: staking(contracts, hashai), + }, +}; From 18deb81cc8a4e6b2cbcb58868be92ac874e7eeba Mon Sep 17 00:00:00 2001 From: yash-trufin <113037107+yash-trufin@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:41:50 +0530 Subject: [PATCH 668/787] Add Injective TVL calculation to TruStake (#12636) --- projects/trufin-trustake/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/projects/trufin-trustake/index.js b/projects/trufin-trustake/index.js index 83693706c766..6b4618b127c5 100644 --- a/projects/trufin-trustake/index.js +++ b/projects/trufin-trustake/index.js @@ -1,6 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { function_view } = require('../helper/chain/aptos') const { call: near_call } = require('../helper/chain/near') +const { queryContract } = require('../helper/chain/cosmos') const TRUSTAKE_APT_CONTRACT_ADDR = "0x6f8ca77dd0a4c65362f475adb1c26ae921b1d75aa6b70e53d0e340efd7d8bc80" const MODULE = "staker" @@ -35,6 +36,13 @@ async function nearTvl() { return { near: totalStaked[0] / 1e24 } } +const TRUSTAKE_INJ_CONTRACT_ADDR = "inj1x997dy6ka7y8u0r56yk2k83llspy33yet9zcnq" + +async function injectiveTvl(api) { + const { total_staked } = await queryContract({ contract: TRUSTAKE_INJ_CONTRACT_ADDR, chain: "injective", data: '{"get_total_staked": {}}'}) + api.add(ADDRESSES.injective.INJ, total_staked) +} + module.exports = { methodology: `Counts the TVL of native tokens across all TruStake vaults.`, ethereum: { @@ -45,5 +53,8 @@ module.exports = { }, near: { tvl: nearTvl + }, + injective: { + tvl: injectiveTvl } } From b0f298282a63f007a34f64192da8aca6ad42ce0b Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:30:27 +0100 Subject: [PATCH 669/787] Fix: Franklin-templeton (decimals issues) (#12637) --- projects/franklinTempleton-finance/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/franklinTempleton-finance/index.js b/projects/franklinTempleton-finance/index.js index dfaa7d761489..c364ccda9856 100644 --- a/projects/franklinTempleton-finance/index.js +++ b/projects/franklinTempleton-finance/index.js @@ -12,8 +12,8 @@ const BENJI = { const stellarTvl = async (api) => { const stellarApi = `https://api.stellar.expert/explorer/public/asset/${BENJI[api.chain].ticker}-${BENJI[api.chain].address}` const response = await fetch(stellarApi) - const {supply, toml_info} = await response.json() - const adjustedSupply = toUSDTBalances((supply / Math.pow(10, toml_info.decimals))) + const {supply} = await response.json() + const adjustedSupply = toUSDTBalances((supply / Math.pow(10, 7))) const [[tokenAddress, tokenBalance]] = Object.entries(adjustedSupply); return api.add(tokenAddress, tokenBalance, { skipChain: true }) } From d1d9795fd39b067466f93408c03a5cda9106356a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:46:47 +0100 Subject: [PATCH 670/787] fix osmosis --- projects/helper/chain/cosmos.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/helper/chain/cosmos.js b/projects/helper/chain/cosmos.js index 7f2a9566aa3b..a315e9bb129c 100644 --- a/projects/helper/chain/cosmos.js +++ b/projects/helper/chain/cosmos.js @@ -2,7 +2,7 @@ const sdk = require("@defillama/sdk"); const { transformBalances } = require("../portedTokens"); const { get, post } = require("../http"); const { PromisePool } = require("@supercharge/promise-pool"); -const { log } = require("../utils"); +const { log, sleep } = require("../utils"); const ADDRESSES = require('../coreAssets.json') // where to find chain info @@ -11,7 +11,7 @@ const ADDRESSES = require('../coreAssets.json') // https://cosmos-chain.directory/chains const endPoints = { crescent: "https://mainnet.crescent.network:1317", - osmosis: "https://rest.cosmos.directory/osmosis", + osmosis: "https://lcd.osmosis.zone", cosmos: "https://cosmoshub-lcd.stakely.io", kujira: "https://kuji-api.kleomedes.network", comdex: "https://rest.comdex.one", @@ -304,10 +304,15 @@ async function sumTokens({ balances, owners = [], chain, owner, tokens, blacklis if (owner) owners = [owner] log(chain, "fetching balances for ", owners.length); let parallelLimit = 25; + if (chain === 'osmosis') parallelLimit = 5; const { errors } = await PromisePool.withConcurrency(parallelLimit) .for(owners) - .process(async (owner) => getBalance2({ balances, owner, chain, tokens, blacklistedTokens, api, })); + .process(async (owner, i) => { + await getBalance2({ balances, owner, chain, tokens, blacklistedTokens, api, }) + if (chain === 'osmosis' && owners.length > 100) + await sleep(3000) + }); if (errors && errors.length) throw errors[0]; return transformBalances(chain, balances); From 9d69b4c4d0764682efac81ad7e27fa006a4c9b70 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:10:47 +0100 Subject: [PATCH 671/787] code refactor --- projects/franklinTempleton-finance/index.js | 24 ++++++++------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/projects/franklinTempleton-finance/index.js b/projects/franklinTempleton-finance/index.js index c364ccda9856..50723516eabd 100644 --- a/projects/franklinTempleton-finance/index.js +++ b/projects/franklinTempleton-finance/index.js @@ -1,7 +1,5 @@ -const { toUSDTBalances } = require('../helper/balances'); - const BENJI = { - stellar: {ticker: "BENJI", address: 'GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5'}, + stellar: { ticker: "BENJI", address: 'GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5' }, arbitrum: '0xb9e4765bce2609bc1949592059b17ea72fee6c6a', polygon: '0x408a634b8a8f0de729b48574a3a7ec3fe820b00a', avax: '0xe08b4c1005603427420e64252a8b120cace4d122', @@ -10,27 +8,23 @@ const BENJI = { } const stellarTvl = async (api) => { - const stellarApi = `https://api.stellar.expert/explorer/public/asset/${BENJI[api.chain].ticker}-${BENJI[api.chain].address}` - const response = await fetch(stellarApi) - const {supply} = await response.json() - const adjustedSupply = toUSDTBalances((supply / Math.pow(10, 7))) - const [[tokenAddress, tokenBalance]] = Object.entries(adjustedSupply); - return api.add(tokenAddress, tokenBalance, { skipChain: true }) + const stellarApi = `https://api.stellar.expert/explorer/public/asset/${BENJI[api.chain].ticker}-${BENJI[api.chain].address}` + const response = await fetch(stellarApi) + const { supply } = await response.json() + api.addUSDValue(supply / 1e7) } const evmTVL = async (api) => { const [decimals, totalSupply] = await Promise.all([ - api.call({target: BENJI[api.chain], abi:'erc20:decimals'}), - api.call({target: BENJI[api.chain], abi:'erc20:totalSupply'}) + api.call({ target: BENJI[api.chain], abi: 'erc20:decimals' }), + api.call({ target: BENJI[api.chain], abi: 'erc20:totalSupply' }) ]) - const adjustedSupply = toUSDTBalances((totalSupply / Math.pow(10, decimals))) - const [[tokenAddress, tokenBalance]] = Object.entries(adjustedSupply); - api.add(tokenAddress, tokenBalance, { skipChain: true }) - + api.addUSDValue((totalSupply / Math.pow(10, decimals))) } Object.keys(BENJI).forEach((chain) => { module.exports[chain] = { tvl: chain === 'stellar' ? stellarTvl : evmTVL }; }); +module.exports.misrepresentedTokens = true; \ No newline at end of file From 8aa54f455cf23bd9d54768279a797896122ff5db Mon Sep 17 00:00:00 2001 From: Sainath Reddy Date: Tue, 10 Dec 2024 14:45:42 +0530 Subject: [PATCH 672/787] feat: Add additional WBTC liquidity address to garden project (#12638) --- projects/garden/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/garden/index.js b/projects/garden/index.js index bb24cd53f2c0..5b1453b39522 100644 --- a/projects/garden/index.js +++ b/projects/garden/index.js @@ -5,7 +5,7 @@ const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') const SEED_TOKEN_ADDRESS = "0x86f65121804D2Cdbef79F9f072D4e0c2eEbABC08"; // SEED TOKEN (Garden's Governance Token) Address const STAKING_CONTRACT_ADDRESS = "0xe2239938Ce088148b3Ab398b2b77Eedfcd9d1AfC"; -const WBTC_LIQUIDITY_ADDRESS = "0x9DD9C2D208B07Bf9A4eF9CA311F36d7185749635"; +const WBTC_LIQUIDITY_ADDRESSES = ["0x9DD9C2D208B07Bf9A4eF9CA311F36d7185749635","0xEF440AC3D77F906F9F0E1C15B35BCF300B4C427C"]; module.exports = { bitcoin: { @@ -15,13 +15,13 @@ module.exports = { }, ethereum: { tvl: sumTokensExport({ - owners: [WBTC_LIQUIDITY_ADDRESS], + owners: WBTC_LIQUIDITY_ADDRESSES, tokens: [ADDRESSES.ethereum.WBTC], }), }, arbitrum: { tvl: sumTokensExport({ - owners: [WBTC_LIQUIDITY_ADDRESS], + owners: WBTC_LIQUIDITY_ADDRESSES, tokens: [ADDRESSES.arbitrum.WBTC], }), staking: sumTokensExport({ From 8a0b0dc79fcdb8741b8d9da5ff58c52c684159de Mon Sep 17 00:00:00 2001 From: fico23 Date: Tue, 10 Dec 2024 14:01:39 +0100 Subject: [PATCH 673/787] AERA Finance: new factory on Base (#12642) --- projects/aera/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/aera/index.js b/projects/aera/index.js index 0b7c7ccc6a01..0f96ce19491e 100644 --- a/projects/aera/index.js +++ b/projects/aera/index.js @@ -130,6 +130,10 @@ const config = { { address: "0x5CD0Cb0DcDEF98a8d07a8D44054a13F2c35C53E1", fromBlock: 13582859 + }, + { + address: "0x1395C314782bba704ca984ad41e57275f6E77b09", + fromBlock: 23294637 } ] }, From 7275cbf7436ca1f0b0e8aa88898a8ef78b3fa40b Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:28:33 +0100 Subject: [PATCH 674/787] Fix: SailingProtocol (#12640) --- projects/sailingprotocol/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/projects/sailingprotocol/index.js b/projects/sailingprotocol/index.js index 914804262408..c413968e21a9 100644 --- a/projects/sailingprotocol/index.js +++ b/projects/sailingprotocol/index.js @@ -68,11 +68,6 @@ const tokens = [ "ticker": "QQQ", "sufficientLiquidityForDefiLlamaIndexer": false, }, - { - "address": "0xBa5c32915e2303EA41d1986f5B3AAd0a98B4Fd80", - "ticker": "ETHE", - "sufficientLiquidityForDefiLlamaIndexer": false, - }, { "address": "0xA78Fb2b64Ce2Fb8bBe46968cf961C5Be6eB12924", "ticker": "AAAU", From 97b0a98251896e7da9c27ce0a689afd469bbf6bf Mon Sep 17 00:00:00 2001 From: Sainath Reddy Date: Tue, 10 Dec 2024 18:58:46 +0530 Subject: [PATCH 675/787] feat: Add additional BTC address in bitcoin-book to garden project (#12639) --- projects/helper/bitcoin-book/garden.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/helper/bitcoin-book/garden.js b/projects/helper/bitcoin-book/garden.js index 11ad3a29caad..15748805f040 100644 --- a/projects/helper/bitcoin-book/garden.js +++ b/projects/helper/bitcoin-book/garden.js @@ -1,3 +1,4 @@ module.exports = [ - "bc1qhww67feqfdf6xasjat88x5stqa6vzx0c6fgtnj" + "bc1qhww67feqfdf6xasjat88x5stqa6vzx0c6fgtnj", + "bc1qs0vw6ahdv2xc9a5jkgqdpawmmc6eq6hqr50e7e" ] \ No newline at end of file From 344763297021dcb0b8261141dd8c7de3de94fb21 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:29:29 +0100 Subject: [PATCH 676/787] Fix: Furucombo (sunset) (#12649) --- projects/furucombo/index.js | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/projects/furucombo/index.js b/projects/furucombo/index.js index a3263e5d93c9..e411dd4ce63f 100644 --- a/projects/furucombo/index.js +++ b/projects/furucombo/index.js @@ -1,22 +1,23 @@ const { getLogs } = require('../helper/cache/getLogs') -const config = { - polygon: { factory: '0xFD1353baBf86387FcB6D009C7b74c1aB2178B304', fromBlock: 29080112 }, + +const factory = '0xFD1353baBf86387FcB6D009C7b74c1aB2178B304' +const fromBlock = '29080112' + +const tvl = async (api) => { + const logs = await getLogs({ + api, + target: factory, + eventAbi: 'event FundCreated (address indexed newFund, address comptroller, address shareToken, address vault)', + onlyArgs: true, + fromBlock, + }) + + const tokens = await api.multiCall({ abi: 'address[]:getAssetList', calls: logs.map(l => l.newFund) }) + const ownerTokens = tokens.map((t, i) => [t, logs[i].vault]) + return api.sumTokens({ ownerTokens }) } -Object.keys(config).forEach(chain => { - const { factory, fromBlock} = config[chain] - module.exports[chain] = { - tvl: async (api) => { - const logs = await getLogs({ - api, - target: factory, - eventAbi: 'event FundCreated (address indexed newFund, address comptroller, address shareToken, address vault)', - onlyArgs: true, - fromBlock, - }) - const tokens = await api.multiCall({ abi: 'address[]:getAssetList', calls: logs.map(l => l.newFund) }) - const ownerTokens = tokens.map((t, i) => [t, logs[i].vault]) - return api.sumTokens({ ownerTokens }) - } - } -}) \ No newline at end of file +module.exports = { + deadFrom: '2024-12-09', + polygon : { tvl : () => ({}) } +} From 22bfcc6478776a413e7a2da92cb693a050ac9dcc Mon Sep 17 00:00:00 2001 From: MishaShWoof Date: Tue, 10 Dec 2024 15:30:01 +0200 Subject: [PATCH 677/787] Add Mantle cUSDev3 (#12645) --- projects/compound-v3/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/projects/compound-v3/index.js b/projects/compound-v3/index.js index 0d4ca453e27a..5660fc5bb8b2 100644 --- a/projects/compound-v3/index.js +++ b/projects/compound-v3/index.js @@ -41,5 +41,10 @@ module.exports = compoundV3Exports({ '0x995E394b8B2437aC8Ce61Ee0bC610D617962B214', // USDT Market '0xE36A30D249f7761327fd973001A32010b521b6Fd', // ETH Market ], - } + }, + mantle: { + markets: [ + '0x606174f62cd968d8e684c645080fa694c1D7786E', // USDe Market + ], + }, }) From 1b6380a6f164edcc41724ce3f9056f3f04e49b89 Mon Sep 17 00:00:00 2001 From: tyler-tsai Date: Tue, 10 Dec 2024 21:30:16 +0800 Subject: [PATCH 678/787] feat: add sUSDX (#12648) Co-authored-by: Tyler Tsai --- projects/helio-money/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/helio-money/index.js b/projects/helio-money/index.js index a52349426013..ffa67ff082ad 100644 --- a/projects/helio-money/index.js +++ b/projects/helio-money/index.js @@ -98,7 +98,11 @@ module.exports = { //FDUSD ["0xc5f0f7b66764f6ec8c8dff7ba683102295e16409","0x2202a491752Fee0E616F06A89E2eF416E2Fcd7e9"], - + // sUSDX + [ + "0x7788A3538C5fc7F9c7C8A74EAC4c898fC8d87d92", + "0x98b167359566c1ea05335D52794C7Eb6f8E6739a", + ], // vUSDT, PSM - LSR // ["0x55d398326f99059ff775485246999027b3197955", "0x5763DDeB60c82684F3D0098aEa5076C0Da972ec7"], From 0f4e6901fe9349b319e728b4a708d320f1156ca9 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 10 Dec 2024 14:30:40 +0100 Subject: [PATCH 679/787] Fix: Clone (sunset) (#12647) --- projects/clone/index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/clone/index.js b/projects/clone/index.js index 13dabc9eaf3d..659d9f47b637 100644 --- a/projects/clone/index.js +++ b/projects/clone/index.js @@ -21,10 +21,9 @@ async function tvl() { } module.exports = { + deadFrom: "2024-09-30", + hallmarks: [[1727654400, "Clone Sunset"]], timetravel: false, - solana: { - tvl, - }, - methodology: - 'Return the amount of collateral in the vault.' + solana: { tvl : () => ({})}, + methodology: 'Return the amount of collateral in the vault.' } From 6a6a3dcd1ff7dd2e218494e6afe863deac701d7c Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:00:27 +0100 Subject: [PATCH 680/787] Fix: AllStake (#12641) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/allstake/idls/strategy_manager.json | 82 -------------------- projects/allstake/index.js | 43 ++++------ 2 files changed, 14 insertions(+), 111 deletions(-) delete mode 100644 projects/allstake/idls/strategy_manager.json diff --git a/projects/allstake/idls/strategy_manager.json b/projects/allstake/idls/strategy_manager.json deleted file mode 100644 index c5434515951f..000000000000 --- a/projects/allstake/idls/strategy_manager.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "version": "0.1.0", - "name": "strategy_manager", - "instructions": [], - "accounts": [ - { - "name": "StrategyManager", - "type": { - "kind": "struct", - "fields": [ - { - "name": "data", - "type": { - "defined": "VersionedStrategyManager" - } - } - ] - } - } - ], - "types": [ - { - "name": "StrategyManagerV1", - "type": { - "kind": "struct", - "fields": [ - { - "name": "owner", - "docs": [ - "owner of strategy manager program" - ], - "type": "publicKey" - }, - { - "name": "strategyMints", - "docs": [ - "list of supported strategies' mint address" - ], - "type": { - "array": [ - "publicKey", - 32 - ] - } - }, - { - "name": "strategyMintsLen", - "docs": [ - "size of the list above" - ], - "type": "u8" - }, - { - "name": "minWithdrawDelay", - "docs": [ - "min withdraw queueing delay length in seconds" - ], - "type": "i64" - } - ] - } - }, - { - "name": "VersionedStrategyManager", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "defined": "StrategyManagerV1" - } - ] - } - ] - } - } - ], - "events": [], - "errors": [] -} \ No newline at end of file diff --git a/projects/allstake/index.js b/projects/allstake/index.js index bb58a5242c89..c8b3dbaa4452 100644 --- a/projects/allstake/index.js +++ b/projects/allstake/index.js @@ -1,17 +1,15 @@ const { getUniqueAddresses } = require('../helper/utils'); -const { call, sumTokens } = require('../helper/chain/near'); -const { sumTokens2, getProvider } = require('../helper/solana'); +const { call, sumTokens, } = require('../helper/chain/near'); +const { sumTokens2, getConnection } = require('../helper/solana'); const { sumTokens2: evmSumTokens2 } = require("../helper/unwrapLPs") -const { Program } = require('@coral-xyz/anchor'); const { PublicKey } = require('@solana/web3.js'); const ALLSTAKE_NEAR_CONTRACT = 'allstake.near'; const ALLSTAKE_SOLANA_PROGRAM = new PublicKey('a11zL6Uxue6mYG3JD3APmnVhS4RVjGTJZbENY7L6ZfD'); -const ALLSTAKE_SOLANA_PROGRAM_IDL = require('./idls/strategy_manager.json'); const ALLSTAKE_ETHEREUM_STRATEGY_MANAGER_CONTRACT = '0x344F8B88357A710937f2b3db9d1B974B9a002afB'; async function ethereumTvl(api) { - const strategies = await api.fetchList({ lengthAbi: 'strategiesLen', itemAbi: 'strategies', target: ALLSTAKE_ETHEREUM_STRATEGY_MANAGER_CONTRACT}) + const strategies = await api.fetchList({ lengthAbi: 'strategiesLen', itemAbi: 'strategies', target: ALLSTAKE_ETHEREUM_STRATEGY_MANAGER_CONTRACT }) const tokens = await api.multiCall({ abi: 'address:underlying', calls: strategies }); return evmSumTokens2({ api, tokensAndOwners2: [tokens, strategies] }); } @@ -26,30 +24,17 @@ async function nearTvl() { } async function solanaTvl() { - const provider = getProvider(); - const programId = ALLSTAKE_SOLANA_PROGRAM; - // const idl = await Program.fetchIdl(programId, provider) - const program = new Program(ALLSTAKE_SOLANA_PROGRAM_IDL, programId, provider); - const state = await program.account.strategyManager.all(); - const strategyManager = state[0].account.data.v1[0]; - const tokens = getUniqueAddresses(strategyManager.strategyMints.slice(0, strategyManager.strategyMintsLen).map(mint => mint.toBase58()), true); - - const tokensAndOwners = []; - for (const token of tokens) { - const pubKey = new PublicKey(token); - const owner = PublicKey.findProgramAddressSync( - [ - Buffer.from('STRATEGY'), - pubKey.toBuffer(), - ], - ALLSTAKE_SOLANA_PROGRAM - )[0].toBase58(); - tokensAndOwners.push([token, owner]); - } - - return sumTokens2({ - tokensAndOwners + const result = await getConnection().getProgramAccounts(ALLSTAKE_SOLANA_PROGRAM, { + encoding: "base64", + // We only care about the strategy addresses. + dataSlice: { offset: 0, length: 0 }, + filters: [ + { dataSize: 316 }, + ], }); + const owners = result.map(({ pubkey }) => pubkey); + + return sumTokens2({ owners }); } module.exports = { @@ -57,7 +42,7 @@ module.exports = { tvl: nearTvl, }, solana: { - tvl: solanaTvl, + tvl: solanaTvl }, ethereum: { tvl: ethereumTvl, From 721057bb15d8c30e6249fa2a4cc9bcf8e2bed65f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:19:44 +0100 Subject: [PATCH 681/787] Add Access Protocol TVL functionality and refactor code (#12652) Co-authored-by: Vladislav Matus --- projects/access-protocol/index.js | 24 ++++++++++++++++ projects/helper/utils/solana/layout.js | 3 +- .../utils/solana/layouts/mixed-layout.js | 28 ++++++++++++++++++- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 projects/access-protocol/index.js diff --git a/projects/access-protocol/index.js b/projects/access-protocol/index.js new file mode 100644 index 000000000000..de1f60c51060 --- /dev/null +++ b/projects/access-protocol/index.js @@ -0,0 +1,24 @@ +const { getMultipleAccounts, decodeAccount } = require("../helper/solana"); +const { PublicKey } = require("@solana/web3.js"); + +async function staking(api) { + const programId = new PublicKey('6HW8dXjtiTGkD4jzXs7igdFmZExPpmwUrRN5195xGup') + const accountKey = getKey(programId); + const [account] = await getMultipleAccounts([accountKey]); + const decoded = decodeAccount('access', account); + api.add(decoded.tokenMint.toBase58(), decoded.totalStaked); +} + +const getKey = (address) => { + return PublicKey.findProgramAddressSync([address.toBuffer()], address)[0].toBase58(); +} + +module.exports = { + timetravel: false, + methodology: + "Uses the Access Protocol SDK to fetch the total supply of staked ACS tokens", + solana: { + tvl: async () => ({}), + staking, + }, +}; diff --git a/projects/helper/utils/solana/layout.js b/projects/helper/utils/solana/layout.js index 42e27acd27d9..e409ec8d92c6 100644 --- a/projects/helper/utils/solana/layout.js +++ b/projects/helper/utils/solana/layout.js @@ -5,7 +5,7 @@ const { parsePhoenix } = require('./layouts/phoenix-dex') const { RAYDIUM_LIQUIDITY_STATE_LAYOUT_CLMM, RAYDIUM_STABLE_STATE_LAYOUT_V1, } = require('./layouts/raydium-layout') const { INVESTIN_FUND_DATA, } = require('./layouts/investin-layout') const { MARKET_STATE_LAYOUT_V3, OPEN_ORDERS_LAYOUT_V2, MARKET_STATE_LAYOUT_V3_MINIMAL } = require('./layouts/openbook-layout') -const { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, } = require('./layouts/mixed-layout'); +const { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, ACCESS_LAYOUT, } = require('./layouts/mixed-layout'); const { SCN_STAKE_POOL, TOKEN_LAYOUT, } = require("./layouts/scnSOL"); const { SANCTUM_INFINITY } = require("./layouts/sanctum-infinity-layout"); const { parseSanctumLstStateList } = require("./layouts/sanctum-validators-lsts-layout"); @@ -65,6 +65,7 @@ const customDecoders = { stakePool: defaultParseLayout(STAKE_POOL_LAYOUT), hhParlay: defaultParseLayout(PARLAY_LAYOUT_PARTIAL), hhPari: defaultParseLayout(HH_PARI_LAYOUT_PARTIAL), + access: defaultParseLayout(ACCESS_LAYOUT), } function decodeAccount(layout, accountInfo) { diff --git a/projects/helper/utils/solana/layouts/mixed-layout.js b/projects/helper/utils/solana/layouts/mixed-layout.js index 53962af37c5f..3fe49025b417 100644 --- a/projects/helper/utils/solana/layouts/mixed-layout.js +++ b/projects/helper/utils/solana/layouts/mixed-layout.js @@ -269,8 +269,34 @@ const HH_PARI_LAYOUT_PARTIAL = BufferLayout.struct([ BufferLayout.seq(u64(), u8().span, 'amounts'), ]); +const ACCESS_LAYOUT = BufferLayout.struct([ + BufferLayout.u8('tag'), + BufferLayout.u8('bumpSeed'), + uint64('dailyInflation'), + publicKey('tokenMint'), + publicKey('authority'), + uint64('creationTime'), + uint64('totalStaked'), + uint64('totalStakedSnapshot'), + uint64('lastSnapshotOffset'), + uint128('ixGate'), + publicKey('freezeAuthority'), + uint128('adminIxGate'), + BufferLayout.u16('feeBasisPoints'), + uint64('lastFeeDistributionTime'), + BufferLayout.u32('feeRecipientsCount'), + BufferLayout.seq( + BufferLayout.struct([ + publicKey('owner'), + uint64('percentage'), + ]), + 10, + 'recipients' + ), +]); + module.exports = { ReserveLayout, ReserveLayoutLarix, MintLayout, AccountLayout, TokenSwapLayout, ESOLStakePoolLayout, - PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, + PARLAY_LAYOUT_PARTIAL, HH_PARI_LAYOUT_PARTIAL, ACCESS_LAYOUT } From a52c1fb6352804bb5d6e57864a06c20402d6ba29 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 10 Dec 2024 15:24:39 +0100 Subject: [PATCH 682/787] track taraxa treasury --- projects/treasury/taraxa.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/treasury/taraxa.js diff --git a/projects/treasury/taraxa.js b/projects/treasury/taraxa.js new file mode 100644 index 000000000000..e3a8bef5af66 --- /dev/null +++ b/projects/treasury/taraxa.js @@ -0,0 +1,10 @@ +const { sumTokens2, nullAddress } = require('../helper/unwrapLPs') + +module.exports = { + tara: { + tvl: async () => ({}), + staking: async (api) => { + return sumTokens2({ api, tokens: [nullAddress], owners: ['0x723304d1357a2334fcf902aa3d232f5139080a1b'] }) + } + } +} \ No newline at end of file From 7e4cf629be88909709c27b9b0e642a3d468eff05 Mon Sep 17 00:00:00 2001 From: MirthFutures <69535002+MirthFutures@users.noreply.github.com> Date: Tue, 10 Dec 2024 09:25:24 -0500 Subject: [PATCH 683/787] Add Lisk Chain to Beefy (#12650) --- projects/beefy/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/beefy/index.js b/projects/beefy/index.js index 58dba0060099..7a4d0c817210 100644 --- a/projects/beefy/index.js +++ b/projects/beefy/index.js @@ -46,6 +46,7 @@ const chains = { era: 324, metis: 1088, polygon_zkevm: 1101, + lisk: 1135, moonbeam: 1284, moonriver: 1285, sei: 1329, From ee386dfb5005dfc60742b0a3fa6a7026bee518b8 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Tue, 10 Dec 2024 16:10:59 +0000 Subject: [PATCH 684/787] fix decimals shifts --- projects/navi/index.js | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/projects/navi/index.js b/projects/navi/index.js index d4f0bd2ca3f8..9ec651667a39 100644 --- a/projects/navi/index.js +++ b/projects/navi/index.js @@ -1,18 +1,8 @@ -const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui") +const { fetchURL } = require('../helper/utils') -const decimalShift = { - [ADDRESSES.sui.USDC]: -3, // USDC - [ADDRESSES.sui.USDT]: -3, // USDT - [ADDRESSES.sui.WETH]: -1, // WETH - ["0x2053d08c1e2bd02791056171aab0fd12bd7cd7efad2ab8f6b9c8902f14df2ff2::ausd::AUSD"]: -3, // AUSD - [ADDRESSES.sui.WBTC]: -1, // WBTC - [ADDRESSES.sui.USDC_CIRCLE]: -3, // native USDC - ['0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH']: -1, // native ETH - ['0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY']: -3, // USDY - ['0xf16e6b723f242ec745dfd7634ad072c42d5c1d9ac9d62a39c381303eaa57693a::fdusd::FDUSD']: -3, // FDUSD - ['0x5145494a5f5100e645e4b0aa950fa6b68f614e8c59e17bc5ded3495123a79178::ns::NS']: -3, // NS - ['0x5f496ed5d9d045c5b788dc1bb85f54100f2ede11e46f6a232c29daada4c5bdb6::coin::COIN']: -1, //stBTC +function getDecimalShifts(dynamicFields){ + return fetchURL(`https://coins.llama.fi/prices/current/${dynamicFields.map(c=>`sui:0x${c.fields.value.fields.coin_type}`).join(',')}`).then(r=>r.data.coins) } const storageId = "0xbb4e2f4b6205c2e2a2db47aeb4f830796ec7c005f88537ee775986639bc442fe" @@ -22,11 +12,15 @@ async function borrow(api) { const reservesId = storageObject.fields.reserves.fields.id.id const dynamicFields = await sui.getDynamicFieldObjects({ parent: reservesId }) + const decimals = await getDecimalShifts(dynamicFields) + dynamicFields.forEach((data) => { const coin = '0x' + data.fields.value.fields.coin_type const borrowed = data.fields.value.fields.borrow_balance.fields.total_supply * data.fields.value.fields.current_borrow_index / 1e27 - const amount = borrowed * (10 ** (decimalShift[coin] ?? 0)) - api.add(coin, amount) + if(decimals["sui:"+coin]){ + const amount = borrowed * (10 ** (decimals["sui:"+coin].decimals - 9)) + api.add(coin, amount) + } }) } @@ -36,13 +30,16 @@ async function tvl(api) { const reservesId = storageObject.fields.reserves.fields.id.id const dynamicFields = await sui.getDynamicFieldObjects({ parent: reservesId }) + const decimals = await getDecimalShifts(dynamicFields) dynamicFields.forEach(object => { const coin = '0x' + object.fields.value.fields.coin_type const total_supply = object.fields.value.fields.supply_balance.fields.total_supply * object.fields.value.fields.current_supply_index / 1e27 const borrowed = object.fields.value.fields.borrow_balance.fields.total_supply * object.fields.value.fields.current_borrow_index / 1e27 - const amount = (total_supply - borrowed) * (10 ** (decimalShift[coin] ?? 0)) - api.add(coin, amount) + if(decimals["sui:"+coin]){ + const amount = (total_supply - borrowed) * (10 ** (decimals["sui:"+coin].decimals - 9)) + api.add(coin, amount) + } }) } From 28d4260caad578a1d241bc254c6ff490520ae270 Mon Sep 17 00:00:00 2001 From: doomsower <12031673+doomsower@users.noreply.github.com> Date: Tue, 10 Dec 2024 19:45:48 +0300 Subject: [PATCH 685/787] fix: update gearbox treasury script (#12655) --- projects/treasury/gearbox.js | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/projects/treasury/gearbox.js b/projects/treasury/gearbox.js index 45b2ffaee417..2e8f5f5e7c4f 100644 --- a/projects/treasury/gearbox.js +++ b/projects/treasury/gearbox.js @@ -3,8 +3,14 @@ const { nullAddress, treasuryExports } = require("../helper/treasury"); // Treasury const treasury = "0x7b065Fcb0760dF0CEA8CFd144e08554F3CeA73D1"; -const GEAR = "0xBa3335588D9403515223F109EdC4eB7269a9Ab5D"; +const treasuryFee = "0x3E965117A51186e41c2BB58b729A1e518A715e5F"; +const treasuryArb = "0x2c31eFFE426765E68A43163A96DD13DF70B53C14"; +const treasuryOpt = "0x1ACc5BC353f23B901801f3Ba48e1E51a14263808"; +const aeraVault = "0x564bc596affd8eb9c5065bc37835d801f3830c9e"; +const GEAR = "0xBa3335588D9403515223F109EdC4eB7269a9Ab5D"; +const GEAR_ARB = "0x2F26337576127efabEEc1f62BE79dB1bcA9148A4"; +const GEAR_OPT = "0x39E6C2E1757ae4354087266E2C3EA9aC4257C1eb"; module.exports = treasuryExports({ ethereum: { @@ -16,8 +22,30 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.USDC, ADDRESSES.ethereum.DAI, ADDRESSES.ethereum.WSTETH,//wsteth + ADDRESSES.ethereum.USDT, + ADDRESSES.ethereum.CRVUSD, ], - owners: [treasury], + owners: [treasury,treasuryFee,aeraVault], ownTokens: [GEAR] }, -}) + arbitrum: { + tokens: [ + nullAddress, + ADDRESSES.arbitrum.WETH, + ADDRESSES.arbitrum.USDC, + ADDRESSES.arbitrum.USDC_CIRCLE, + ], + owners: [treasuryArb], + ownTokens: [GEAR_ARB] + }, + optimism: { + tokens: [ + nullAddress, + ADDRESSES.optimism.WETH, + ADDRESSES.optimism.USDC, + ADDRESSES.optimism.USDC_CIRCLE, + ], + owners: [treasuryOpt], + ownTokens: [GEAR_OPT] + }, +}); From 822b4fd6ae4ae7dba2aeb396cf68a3711cc8b986 Mon Sep 17 00:00:00 2001 From: rogi-sh <46889545+rogi-sh@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:54:03 +0100 Subject: [PATCH 686/787] Migrate Javsphere (JAV) to Base (#12653) Co-authored-by: igorshelkovenkov Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/javsphere/index.js | 43 ++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/projects/javsphere/index.js b/projects/javsphere/index.js index 415910ea316c..1d17d51ada6b 100644 --- a/projects/javsphere/index.js +++ b/projects/javsphere/index.js @@ -1,32 +1,25 @@ -const { get } = require('../helper/http') const { staking } = require("../helper/staking.js"); -const {stakings} = require("../helper/staking"); -const vaultUrl = "https://mainnet.ocean.jellyfishsdk.com/v0/mainnet/address/df1q7zkdpw6hd5wzcxudx28k72vjvpefa4pyqls2grnahhyw4u8kf0zqu2cnz6/vaults"; -const ONE_YEAR_LOCKING_MAINNET = '0xD88Bb8359D694c974C9726b6201479a123212333' -const TWO_YEARS_LOCKING_MAINNET = '0xc5B7aAc761aa3C3f34A3cEB1333f6431d811d638' - -async function tvl(api) { - const tvls = await api.multiCall({ abi: 'uint256:currentTvl', calls: [ONE_YEAR_LOCKING_MAINNET, TWO_YEARS_LOCKING_MAINNET] }) - const dusdTVL = tvls.reduce((agg, i) => agg + i / 1e18, 0) - api.addCGToken('decentralized-usd', dusdTVL) -} - -async function defichainTvl(api) { - const { data: [vault] } = await get(vaultUrl) - const vaultTvl = +vault.collateralValue - +vault.loanValue - api.addCGToken('decentralized-usd', vaultTvl) -} +const STAKING_BASE = '0xE420BBb4C2454f305a3335BBdCE069326985fb5b' +const FREEZER_BASE = '0x03e225D2bd32F5ecE539005B57F9B94A743ADBFB' +const VESTING_BASE = '0x42a40321843220e9811A1385D74d9798436f7002' +const JAV_BASE = '0xEdC68c4c54228D273ed50Fc450E253F685a2c6b9' module.exports = { - methodology: `We count the total value locked in DUSD from all current products (dusd staking is a vault in defichain L1, - 1 year bond and 2 year bond are smart contracts on defimetachain L2. We also track staking and freezer of javsphers native token JAV). `, + methodology: `We count the total value locked from staking and freezer of javsphers native token JAV). `, + hallmarks: [ + [1733837635, "Migration to BASE"], + ], + base: { + tvl: () => { }, + staking: staking([STAKING_BASE, FREEZER_BASE], JAV_BASE), + vesting: staking(VESTING_BASE, JAV_BASE) + }, defichain_evm: { - tvl, - staking: stakings( ['0x4e15D4225623D07Adb43e9D546E57E1E6097e869', '0xF923f0828c56b27C8f57bc698c99543f63091E9A'], - '0x66F3Cf265D2D146A0348F6fC67E3Da0835e0968E'), - vesting: staking('0x7246ad1ac72715c5fd6c1FD7460A63afB8289104','0x66F3Cf265D2D146A0348F6fC67E3Da0835e0968E') - }, defichain: { - tvl: defichainTvl + tvl: () => { }, + staking: () => { }, + }, + defichain: { + tvl: () => { }, }, } From 46f98a7c09e4e74126779f9488670b427673c290 Mon Sep 17 00:00:00 2001 From: vesu-dev <174601598+vesu-dev@users.noreply.github.com> Date: Tue, 10 Dec 2024 17:06:12 +0000 Subject: [PATCH 687/787] Add support for new pools (#12657) --- projects/helper/coreAssets.json | 4 +++- projects/vesu/index.js | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 346589bb8771..cd9e1f8ecc8f 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1302,7 +1302,9 @@ "NSTSTRK": "0x04619e9ce4109590219c5263787050726be63382148538f3f936c22aa87d2fc2", "ZEND": "0x00585c32b625999e6e5e78645ff8df7a9001cf5cf3eb6b80ccdd16cb64bd3a34", "NSTR": "0x00c530f2c0aa4c16a0806365b0898499fba372e5df7a7172dc6fe9ba777e8007", - "BROTHER": "0x03b405a98c9e795d427fe82cdeeeed803f221b52471e3a757574a2b4180793ee" + "BROTHER": "0x03b405a98c9e795d427fe82cdeeeed803f221b52471e3a757574a2b4180793ee", + "XSTRK": "0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a", + "SSTRK": "0x0356f304b154d29d2a8fe22f1cb9107a9b564a733cf6b4cc47fd121ac1af90c9" }, "ton": { "TON": "0x0000000000000000000000000000000000000000", diff --git a/projects/vesu/index.js b/projects/vesu/index.js index 665a01f14ff8..0ec03ff739c0 100644 --- a/projects/vesu/index.js +++ b/projects/vesu/index.js @@ -4,7 +4,12 @@ const { abi, allAbi } = require("./abi"); const INTERNAL_SCALE = 10 ** 18; const SINGLETON = "0x02545b2e5d519fc230e9cd781046d3a64e092114f07e44771e0d719d148725ef"; -const POOL_ID = "0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28"; +const POOLS = [ + "0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28", // Genesis Pool + "0x7f135b4df21183991e9ff88380c2686dd8634fd4b09bb2b5b14415ac006fe1d", // Re7 USDC Pool + "0x52fb52363939c3aa848f8f4ac28f0a51379f8d1b971d8444de25fbd77d8f161", // Re7 xSTRK Pool + "0x2e06b705191dbe90a3fbaad18bb005587548048b725116bff3104ca501673c1" // Re7 sSTRK Pool +]; const ASSETS = [ ADDRESSES.starknet.ETH, ADDRESSES.starknet.WBTC, @@ -12,6 +17,8 @@ const ASSETS = [ ADDRESSES.starknet.USDT, ADDRESSES.starknet.WSTETH, ADDRESSES.starknet.STRK, + ADDRESSES.starknet.XSTRK, + ADDRESSES.starknet.SSTRK ]; async function tvl(api) { @@ -19,13 +26,14 @@ async function tvl(api) { } const borrowed = async (api) => { - const calls = ASSETS.map((asset) => ({ target: SINGLETON, params: [POOL_ID, asset] })); + const poolAssets = POOLS.map((pool_id) => ASSETS.map((asset) => ({ pool_id, asset }))).flat(); + const calls = poolAssets.map(({ pool_id, asset }) => ({ target: SINGLETON, params: [pool_id, asset] })) const assetStates = await multiCall({ calls, abi: abi.asset_config_unsafe, allAbi }); - return assetStates.forEach((res, index) => { + assetStates.forEach((res, index) => { const { total_nominal_debt, scale, last_rate_accumulator } = res['0'] const totalDebt = Number(total_nominal_debt) * Number(last_rate_accumulator) / INTERNAL_SCALE; const scaledTotalDebt = totalDebt * Number(scale) / INTERNAL_SCALE; - api.add(ASSETS[index], scaledTotalDebt); + api.add(poolAssets[index].asset, scaledTotalDebt); }); }; From 5adc27cf317fab4869748ca06ad0689f0919c4ff Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:58:49 +0100 Subject: [PATCH 688/787] move token mapping --- projects/helper/coreAssets.json | 25 ++++++++++--- projects/helper/tokenMapping.js | 64 --------------------------------- 2 files changed, 21 insertions(+), 68 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index cd9e1f8ecc8f..4ee765914ac3 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -279,7 +279,8 @@ "WSTETH": "0x5979D7b546E38E414F7E9822514be443A4800529", "plvGLP": "0x5326e71ff593ecc2cf7acae5fe57582d6e74cff1", "USDe": "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34", - "FRAX": "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F" + "FRAX": "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F", + "sUSDe": "0x211cc4dd073734da055fbf44a2b4667d5e5fe5d2" }, "fuse": { "WFUSE": "0x0be9e53fd7edac9f859882afdda116645287c629", @@ -1657,7 +1658,10 @@ }, "zilliqa": { "WZIL": "0x94e18ae7dd5ee57b55f30c4b63e2760c09efb192", - "USDT": "0x2274005778063684fbb1bfa96a2b725dc37d75f9" + "USDT": "0x2274005778063684fbb1bfa96a2b725dc37d75f9", + "stZIL": "0x097c26f8a93009fd9d98561384b5014d64ae17c2", + "gZIL": "0x03a79429acc808e4261a68b0117acd43cb0fdbfa", + "XCAD": "0xccf3ea256d42aeef0ee0e39bfc94baa9fa14b0ba" }, "fsc": { "WFSC": "0xb582fD9d0D5C3515EEB6b02fF2d6eE0b6E45E7A7" @@ -1916,7 +1920,10 @@ }, "etlk": { "OGV1WXTZ": "0x3571aed54ccea5b69b00516d5a149a6baea77118", - "WXTZ": "0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb" + "WXTZ": "0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb", + "USDC": "0x796ea11fa2dd751ed01b53c372ffdb4aaa8f00f9", + "USDT": "0x2c03058c8afc06713be23e58d2febc8337dbfe6a", + "WETH": "0xfc24f770f94edbca6d6f885e12d4317320bcb401" }, "rari": { "WETH": "0xf037540e51d71b2d2b1120e8432ba49f29edfbd0", @@ -1953,7 +1960,7 @@ }, "polynomial": { "USDC": "0x17C9D8Cef7Ef072844EEaEdE1F9f54C7E3fa8743", - "fxUSDC": "0x2369EB4a76d80fBeAa7Aa73e1e1f9EAeE88C07F4", + "fxUSDC": "0x2369eb4a76d80fbeaa7aa73e1e1f9eaee88c07f4", "SDAI": "0x615172e47c0C5A6dA8ea959632Ac0166f7a59eDc", "sUSDe": "0x2A06DEAc3E863c23DD6a89Eeacd80aBA9E08B77B", "USD0": "0x6224dC817dC4D5c53fcF3eb08A4f84C456F9f38f" @@ -2060,5 +2067,15 @@ "shido": { "WSHIDO": "0x8cbaffd9b658997e7bf87e98febf6ea6917166f7", "USDC": "0x80b5a32e4f032b2a058b4f29ec95eefeeb87adcd" + }, + "ace": { + "USDC_e": "0x71ee6485cf72b9c3bf183528a2241474f21b2efa" + }, + "tara": { + "WTARA": "0x5d0fa4c5668e5809c83c95a7cef3a9dd7c68d4fe", + "USDM": "0xc26b690773828999c2612549cc815d1f252ea15e" + }, + "corn": { + "BTCN": "0xda5ddd7270381a7c2717ad10d1c0ecb19e3cdfb2" } } \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 504ab1751cea..5ad283641e8f 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -45,70 +45,6 @@ const fixBalancesTokens = { apechain: { '0x0000000000000000000000000000000000000000': { coingeckoId: "apecoin", decimals: 18 }, }, - etlk: { - '0x796ea11fa2dd751ed01b53c372ffdb4aaa8f00f9': { coingeckoId: "usd-coin", decimals: 6 }, - '0x2c03058c8afc06713be23e58d2febc8337dbfe6a': { coingeckoId: "tether", decimals: 6 }, - '0xfc24f770f94edbca6d6f885e12d4317320bcb401': { coingeckoId: "weth", decimals: 18 }, - }, - ace: { - '0x71ee6485cf72b9c3bf183528a2241474f21b2efa': { coingeckoId: "usd-coin", decimals: 6 }, - }, - shido: { - '0x8cbaffd9b658997e7bf87e98febf6ea6917166f7': { coingeckoId: "shido-2", decimals: 18 } // WSHIDO - }, - ethereum: { - '0x777B2913b1BB171A83cA3cdf79CB40523Ac76fDb': { coingeckoId: "ignition-fbtc", decimals: 8 }, - }, - arbitrum: { - '0xbbeb34F9d50e0BABe1bd03Fd4120296354510529': { coingeckoId: "ignition-fbtc", decimals: 8 }, - '0x211cc4dd073734da055fbf44a2b4667d5e5fe5d2': { coingeckoId: "ethena-staked-usde", decimals: 18 }, - }, - bsc: { - '0x2B25f4F134a56054b2b6388C2750F1eA3877e02b': { coingeckoId: "ignition-fbtc", decimals: 8 }, - }, - mantle: { - '0x93C6afA1882ea5E5bF403cA8fcb5aF87409EeCd0': { coingeckoId: "ignition-fbtc", decimals: 8 }, - }, - bob: { - '0xd681C5574b7F4E387B608ed9AF5F5Fc88662b37c': { coingeckoId: "ignition-fbtc", decimals: 8 }, - }, - hela: { - '0x3a035615e101373fa9ba21c5bea7fe4026fc40b4': { coingeckoId: "hela-usd", decimals: 18 }, - }, - bfc: { - '0x74B73Fd2eE237e9219dF30dfFDB206D237cbFC00': { coingeckoId: "coinbase-wrapped-btc", decimals: 8 }, - }, - tara: { - [ADDRESSES.null]: { coingeckoId: "taraxa", decimals: 18 }, - '0x5d0fa4c5668e5809c83c95a7cef3a9dd7c68d4fe': { coingeckoId: "taraxa", decimals: 18 }, - '0xc26b690773828999c2612549cc815d1f252ea15e': { coingeckoId: "mountain-protocol-usdm", decimals: 18 }, - }, - xlayer: { - [ADDRESSES.null]: { coingeckoId: "okb", decimals: 18 }, - }, - starknet: { - [ADDRESSES.starknet.BROTHER]: { coingeckoId: "starknet-brother", decimals: 18 }, - }, - corn: { - '0xda5ddd7270381a7c2717ad10d1c0ecb19e3cdfb2': { coingeckoId: "bitcoin", decimals: 18 }, - }, - nibiru: { - 'unibi': { coingeckoId: "nibiru", decimals: 6 }, - }, - zilliqa: { - '0x097c26f8a93009fd9d98561384b5014d64ae17c2': { coingeckoId: "stzil", decimals: 12 }, - '0x03a79429acc808e4261a68b0117acd43cb0fdbfa': { coingeckoId: "governance-zil", decimals: 15 }, - '0xccf3ea256d42aeef0ee0e39bfc94baa9fa14b0ba': { coingeckoId: "xcad-network", decimals: 18 }, - '0xe64ca52ef34fdd7e20c0c7fb2e392cc9b4f6d049': { coingeckoId: "kalijo", decimals: 18 }, - '0xe9d47623bb2b3c497668b34fcf61e101a7ea4058': { coingeckoId: "lunr-token", decimals: 4 }, - '0x9c3fe3f471d8380297e4fb222efb313ee94dfa0f': { coingeckoId: "zilpepe", decimals: 18 }, - '0x7d2ff48c6b59229d448473d267a714d29f078d3e': { coingeckoId: "zilstream", decimals: 8 }, - '0x241c677d9969419800402521ae87c411897a029f': { coingeckoId: "web3war", decimals: 12 }, - }, - polynomial: { - '0x6224dc817dc4d5c53fcf3eb08a4f84c456f9f38f': { coingeckoId: "usual-usd", decimals: 18 }, - '0x2369eb4a76d80fbeaa7aa73e1e1f9eaee88c07f4': { coingeckoId: "ethereum:0x4f460bb11cf958606c69a963b4a17f9daeeea8b6", decimals: 0 }, - } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 2ab0c5c62500380fd1ca7ec23b1388cc9a9ae447 Mon Sep 17 00:00:00 2001 From: Giuseppe Palazzolo <38705839+palace22@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:06:43 +0100 Subject: [PATCH 689/787] add folks galgo hallmarks (#12659) --- projects/folks-galgo/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/folks-galgo/index.js b/projects/folks-galgo/index.js index 56702c1ba142..c4da6cdf714a 100644 --- a/projects/folks-galgo/index.js +++ b/projects/folks-galgo/index.js @@ -15,3 +15,15 @@ module.exports = { }, }, }; + +module.exports.hallmarks = [ + [1665158400, "Governance 5 Recommitment"], + [1673114400, "Governance 6 Recommitment"], + [1680879600, "Governance 7 Recommitment"], + [1688745600, "Governance 8 Recommitment"], + [1696694400, "Governance 9 Recommitment"], + [1704643200, "Governance 10 Recommitment"], + [1712505600, "Governance 11 Recommitment"], + [1720368000, "Governance 12 Recommitment"], + [1728316800, "Governance 13 Recommitment"], +] \ No newline at end of file From 737cc245fb4e099dda06d01b9f49f94220a79f36 Mon Sep 17 00:00:00 2001 From: Nathan James Date: Tue, 10 Dec 2024 14:08:41 -0500 Subject: [PATCH 690/787] Added eos-evm adapter (#12557) --- projects/eos-evm/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/eos-evm/index.js diff --git a/projects/eos-evm/index.js b/projects/eos-evm/index.js new file mode 100644 index 000000000000..11e821a1524d --- /dev/null +++ b/projects/eos-evm/index.js @@ -0,0 +1,12 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +async function eos() { + return await get_account_tvl("eosio.evm", [["eosio.token", "EOS", "eos"]]); +} + +module.exports = { + methodology: `EOS EVM TVL is achieved by querying token balances from [eosio.evm] system account.`, + eos: { + tvl: eos + }, +} From 5cd85bc9b4f28568d5790d2e2a9e274ea42e55bf Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:03:11 +0100 Subject: [PATCH 691/787] fix kamino --- projects/helper/chain/rpcProxy.js | 6 ++++++ projects/kamino/api.js | 1 + projects/kamino/index.js | 11 ++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/helper/chain/rpcProxy.js b/projects/helper/chain/rpcProxy.js index 203d0308cb6f..a1dd3ce6e690 100644 --- a/projects/helper/chain/rpcProxy.js +++ b/projects/helper/chain/rpcProxy.js @@ -34,4 +34,10 @@ module.exports = { return data }, }, + kamino: { + tvl: async () => { + const { data } = await client.get('/kamino/tvl') + return data + }, + }, } \ No newline at end of file diff --git a/projects/kamino/api.js b/projects/kamino/api.js index c0c58e761c91..e41670c74318 100644 --- a/projects/kamino/api.js +++ b/projects/kamino/api.js @@ -2,6 +2,7 @@ const { Kamino } = require('@kamino-finance/kliquidity-sdk') const { getConnection, } = require('../helper/solana') async function tvl() { + throw new Error('Using rpc proxy now') const kamino = new Kamino('mainnet-beta', getConnection()); const shareData = await kamino.getStrategiesShareData({}); return { diff --git a/projects/kamino/index.js b/projects/kamino/index.js index c35d609f757e..060baec16846 100644 --- a/projects/kamino/index.js +++ b/projects/kamino/index.js @@ -1,8 +1,13 @@ -const { getExports } = require('../helper/heroku-api') + +const { kamino } = require("../helper/chain/rpcProxy") module.exports = { doublecounted: true, timetravel: false, - misrepresentedTokens: true, - ...getExports("kamino", ['solana']) + misrepresentedTokens: true, + solana: { tvl } +} + +async function tvl(api) { + api.addUSDValue(await kamino.tvl()) } \ No newline at end of file From 566d8aa33e62b206c9323bfafeed79c6b60f48bf Mon Sep 17 00:00:00 2001 From: Danil Cherevashko Date: Wed, 11 Dec 2024 00:29:19 +0200 Subject: [PATCH 692/787] Add swap.coffee JETTON and DFC staking (#12661) --- projects/swap-coffee/index.js | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/projects/swap-coffee/index.js b/projects/swap-coffee/index.js index d74d44216f32..42c2a0ba0cb2 100644 --- a/projects/swap-coffee/index.js +++ b/projects/swap-coffee/index.js @@ -1,28 +1,55 @@ const { sumTokensExport } = require('../helper/chain/ton') +// CES const CES_MASTER = "0:a5d12e31be87867851a28d3ce271203c8fa1a28ae826256e73c506d94d49edad" const CES_STAKING_CONTRACT = "0:29f90533937d696105883b981e9427d1ae411eef5b08eab83f4af89c495d27df" const DEDUST_TON_CES_POOL = "0:123e245683bd5e93ae787764ebf22291306f4a3fcbb2dcfcf9e337186af92c83" const STONFI_CES_TON_POOL = "0:6a839f7a9d6e5303d71f51e3c41469f2c35574179eb4bfb420dca624bb989753" +// XROCK const XROCK_MASTER = "0:157c463688a4a91245218052c5580807792cf6347d9757e32f0ee88a179a6549" const XROCK_STAKING_CONTRACT = "0:c84deaf1d956d5f80be722bbdaeeba33d70d068ace97c6fc23e1bfeb5689e1ca" const DEDUST_XROCK_USDT_POOL = "0:9cf96b400deedd4143bd113d8d767f0042515e2ad510c4b4adbe734cd30563b8" const STONFI_XROCK_USDT_POOL = "0:6ba0e19f6adacbefdcbbc859407241eff578f4a57edc8e3e05e86dcfbb283f20" +// JETTON +const JETTON_STAKING_CONTRACT = "0:160d382ed1a373e7e859d1a76b319b4a3e5c8945f26fc8177662ac59a2c67f38" +const JETTON_MASTER = "0:105e5589bc66db15f13c177a12f2cf3b94881da2f4b8e7922c58569176625eb5" +const STONFI_V2_JETTON_TON_POOL = "0:ff5f1fa2411d33dc6268cd0b74744d726e0c01145c9f4f9c9e867c0e244de490" +const DEDUST_JETTON_TON_POOL = "0:f417fc37e424d65314d646379fa15fb8d342910368d7e755f87b3220994518ff" +const STONFI_JETTON_TON_POOL = "0:139eae96db1bf5d02d7d2cd942dbac45b535757dbccc917997402587aadbfa3a" +const DEDUST_JETTON_USDT_POOL = "0:98ac7350eecb80d1f1d690912e2ed5e541e2efff1a722670103f97ed2407f473" +const STONFI_JETTON_USDT_POOL = "0:1b011c80e68e5942aab7e5c79b7b4faacd4999ecda9579df58b3edfbcca414f4" +const STONFI_V2_JETTON_USDT_POOL = "0:46fe73fa794a69f3d6723d10b136dc884061df06e602ccb5d58414306efe5310" + +// DFC +const DFC_STAKING_CONTRACT = "0:3acaf26d83f9bff8b88b72434fb6ab23182f5153e7690a07557e9626f8824bab" +const DFC_MASTER = "0:f6eb371de82aa9cfb5b22ca547f31fdc0fa0fbb41ae89ba84a73272ff0bf2157" +const DEDUST_DFC_TON_POOL = "0:84868f284afcd59de33eab700b57d18c3a8473946370ac6b6ae29db1dd29c89c" +const STONFI_DFC_TON_POOL = "0:a66a91222d03b4b9810e9af0de5cd47d8b947891854f126c8d2447304824d251" + module.exports = { methodology: "Counts swap.coffee smartcontract balance as TVL.", timetravel: false, ton: { tvl: () => { }, staking: sumTokensExport({ - owners: [CES_STAKING_CONTRACT, XROCK_STAKING_CONTRACT], - tokens: [XROCK_MASTER, CES_MASTER], + owners: [CES_STAKING_CONTRACT, XROCK_STAKING_CONTRACT, JETTON_STAKING_CONTRACT, DFC_STAKING_CONTRACT], + tokens: [XROCK_MASTER, CES_MASTER, JETTON_MASTER, DFC_MASTER], onlyWhitelistedTokens: true }), pool2: sumTokensExport({ - owners: [CES_STAKING_CONTRACT, XROCK_STAKING_CONTRACT], - tokens: [DEDUST_TON_CES_POOL, STONFI_CES_TON_POOL, DEDUST_XROCK_USDT_POOL, STONFI_XROCK_USDT_POOL], + owners: [CES_STAKING_CONTRACT, XROCK_STAKING_CONTRACT, JETTON_STAKING_CONTRACT, DFC_STAKING_CONTRACT], + tokens: [ + DEDUST_TON_CES_POOL, STONFI_CES_TON_POOL, + + DEDUST_XROCK_USDT_POOL, STONFI_XROCK_USDT_POOL, + + STONFI_V2_JETTON_TON_POOL, DEDUST_JETTON_TON_POOL, STONFI_JETTON_TON_POOL, DEDUST_JETTON_USDT_POOL, + STONFI_JETTON_USDT_POOL, STONFI_V2_JETTON_USDT_POOL, + + DEDUST_DFC_TON_POOL, STONFI_DFC_TON_POOL + ], onlyWhitelistedTokens: true }) } From 04e21f0e61d235f08157651b637f8558eb5654b7 Mon Sep 17 00:00:00 2001 From: Deploydon <96504831+Deploydon@users.noreply.github.com> Date: Wed, 11 Dec 2024 05:33:24 +0700 Subject: [PATCH 693/787] Added Valence adapter (#12660) --- projects/valence/index.js | 81 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 projects/valence/index.js diff --git a/projects/valence/index.js b/projects/valence/index.js new file mode 100644 index 000000000000..08ee3c0c860c --- /dev/null +++ b/projects/valence/index.js @@ -0,0 +1,81 @@ +const { queryContract, queryV1Beta1 } = require("../helper/chain/cosmos"); +const { transformBalances } = require("../helper/portedTokens"); +//Staked indicates if the asset is staked by the pooler. +//If so, we must query the pool address for the balance to determine the value. If not staked, we can lookup the balance directly. +const poolerAddresses = [ + { + address: "neutron1ulaxj0nelxshdua6l5mdkcqxa5k3gvcc8ut9w5867ej7u80qjx9s5cq5yh", //stars + staked: true, + }, + { + address: "neutron1quwzg6ntuy2tvvdt73rr4e8zkeetu2v5mehjfykrzszlkjavupvsn98wx9", //shade + staked: true, + }, + { + address: "neutron1nqd6ge2r9ndkgkl67js35v6wln093euvvkyynr43fs4lghj7vzgsl4va57", //nolus + staked: true, + }, + { + address: "neutron1yj6m02det6qd6wdugtfytfryzcmt9z9apls0sf4ww07hqq54zexqt5xgaq", //mars + staked: false, + }, +]; + +async function tvl(api) { + for (const pooler of poolerAddresses) { + let lpBalance; + let poolAddress; + + const lpConfig = await queryContract({ + contract: pooler.address, + chain: "neutron", + data: '{"lp_config":{}}', + }); + + poolAddress = lpConfig.pool_address; + + const poolInfo = await queryContract({ + contract: poolAddress, + chain: "neutron", + data: '{"pair":{}}', + }); + + // Get LP token balance for staked pooler + if (pooler.staked) { + lpBalance = await queryContract({ + contract: poolInfo.liquidity_token, + chain: "neutron", + data: `{"balance":{"address":"${pooler.address}"}}`, + }); + + lpBalance = lpBalance.balance || 0; + } else { + const balanceData = await queryV1Beta1({ + url: `bank/v1beta1/balances/${pooler.address}`, + chain: "neutron", + }); + lpBalance = balanceData.balances.find((balance) => balance.denom === poolInfo.liquidity_token)?.amount || 0; + } + + const shareValue = await queryContract({ + contract: poolAddress, + chain: "neutron", + data: `{"share":{"amount":"${lpBalance}"}}`, + }); + + shareValue.forEach((token) => { + const denom = token.info.native_token.denom; + const amount = token.amount; + api.add(denom, amount); + }); + } + + return transformBalances("neutron", api.getBalances()); +} + +module.exports = { + methodology: "Queries the Covenant Liquidity Pooler Addresses to sum up total held value.", + neutron: { + tvl, + }, +}; From 08a6e1171a3e1137460af6c8516eaafa30bb69ce Mon Sep 17 00:00:00 2001 From: liuxieric123 Date: Wed, 11 Dec 2024 06:34:02 +0800 Subject: [PATCH 694/787] Agdex (#12644) Co-authored-by: Ryan Lin --- projects/agdex/index.js | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/projects/agdex/index.js b/projects/agdex/index.js index fe7f5b05adce..d9af9793c9a5 100644 --- a/projects/agdex/index.js +++ b/projects/agdex/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { function_view } = require("../helper/chain/aptos"); +const { function_view, getResource } = require("../helper/chain/aptos"); const primary_fungible_asset_balance = "0x1::primary_fungible_store::balance" const AGDEX = @@ -31,44 +31,65 @@ const apt_resource_account = "0x8afc7aaa4616c0defbe655f3928a72ff849ef9a6889178f1 const apt_metadata = "0xa"; async function tvl(api) { - const usdc_value = + const usdc_balance = await function_view({ "functionStr": primary_fungible_asset_balance, "type_arguments": ["0x1::fungible_asset::Metadata"], "args": [usdc_resource_account, usdc_metadata] }); - api.add(lzUSDC, usdc_value); + const usdc_r = await getResource( + AGDEX, + `${AGDEX}::pool::Vault<0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC>` + ); + const usdc_value = parseInt(usdc_balance) + parseInt(usdc_r.reserved_amount); - const usdt_value = + const usdt_balance = await function_view({ "functionStr": primary_fungible_asset_balance, "type_arguments": ["0x1::fungible_asset::Metadata"], "args": [usdt_resource_account, usdt_metadata] }); - api.add(lzUSDC, usdc_value); + const usdt_r = await getResource( + AGDEX, + `${AGDEX}::pool::Vault<0xfa69897532f069bc0806868eaeec3328727d90c0cec710a17dde327e0bfab44f::token_map::USDT>` + ); + const usdt_value = parseInt(usdt_balance) + parseInt(usdt_r.reserved_amount); - const eth_value = + const eth_balance = await function_view({ "functionStr": primary_fungible_asset_balance, "type_arguments": ["0x1::fungible_asset::Metadata"], "args": [eth_resource_account, eth_metadata] }); - api.add(lzUSDC, eth_value); + const eth_r = await getResource( + AGDEX, + `${AGDEX}::pool::Vault<0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::WETH>` + ); + const eth_value = parseInt(eth_balance) + parseInt(eth_r.reserved_amount); - const btc_value = + const btc_balance = await function_view({ "functionStr": primary_fungible_asset_balance, "type_arguments": ["0x1::fungible_asset::Metadata"], "args": [btc_resource_account, btc_metadata] }); - api.add(lzUSDC, btc_value); + const btc_r = await getResource( + AGDEX, + `${AGDEX}::pool::Vault<0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::WBTC>` + ); + const btc_value = parseInt(btc_balance) + parseInt(btc_r.reserved_amount); - const apt_value = + const apt_balance = await function_view({ "functionStr": primary_fungible_asset_balance, "type_arguments": ["0x1::fungible_asset::Metadata"], "args": [apt_resource_account, apt_metadata] }); + const apt_r = await getResource( + AGDEX, + `${AGDEX}::pool::Vault<0x1::aptos_coin::AptosCoin>` + ); + const apt_value = parseInt(apt_balance) + parseInt(apt_r.reserved_amount); api.add(lzUSDC, usdc_value); api.add(BTC, btc_value); api.add(ETH, eth_value); From ebfcf6ef43ececabaa6b0577c9a597c77c47bbf4 Mon Sep 17 00:00:00 2001 From: Dashan McCain <91407856+DashanMcCain@users.noreply.github.com> Date: Wed, 11 Dec 2024 00:43:18 -0800 Subject: [PATCH 695/787] Add Nucleus adapter (#12663) --- projects/nucleus/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/nucleus/index.js diff --git a/projects/nucleus/index.js b/projects/nucleus/index.js new file mode 100644 index 000000000000..83a30e462c38 --- /dev/null +++ b/projects/nucleus/index.js @@ -0,0 +1,25 @@ +const { getConfig } = require("../helper/cache"); + +async function getMarkets() { + return getConfig('nucleus-vaults', "https://backend.nucleusearn.io/v1/protocol/markets"); +} + +async function getTokens() { + return getConfig('nucleus-tokens', "https://backend.nucleusearn.io/v1/protocol/tokens"); +} + + +const tvl = async (api) => { + + const vaultMap = await getMarkets(); + const owners = Object.keys(vaultMap); + const tokens = await getTokens(); + + return api.sumTokens({ owners, tokens }) + }; + +module.exports = { + ethereum: { + tvl, + }, + }; \ No newline at end of file From 5e09261c3575230c116910c11e5601566dd6825d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:01:13 +0100 Subject: [PATCH 696/787] Sym 2 (#12665) Co-authored-by: nikitulb Co-authored-by: allush --- projects/symbiosis-finance/config.js | 840 +++++++++++++-------------- projects/symbiosis-finance/index.js | 21 +- utils/scripts/useTokenLabels.js | 3 + 3 files changed, 409 insertions(+), 455 deletions(-) diff --git a/projects/symbiosis-finance/config.js b/projects/symbiosis-finance/config.js index 68ec85e76d6d..e53656179b76 100644 --- a/projects/symbiosis-finance/config.js +++ b/projects/symbiosis-finance/config.js @@ -1,456 +1,394 @@ -const ADDRESSES = require('../helper/coreAssets.json') - -const TOKENS = { - ethereum: { - pufETH: "0xD9A442856C234a39a81a089C06451EBAa4306a72", - LADYS: "0x12970E6868f88f6557B76120662c1B3E50A646bf", - XDAO: "0x71eebA415A523F5C952Cc2f06361D5443545Ad28", - G: "0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649" - }, - bsc: { - XDAO: "0x71eebA415A523F5C952Cc2f06361D5443545Ad28", - G: "0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649" - }, - polygon: { - XDAO: "0x71eebA415A523F5C952Cc2f06361D5443545Ad28" - }, - arbitrum: { - XDAO: "0x71eebA415A523F5C952Cc2f06361D5443545Ad28", - LADYS: "0x3b60FF35D3f7F62d636b067dD0dC0dFdAd670E4E" - }, - manta: { - pufETH: "0xA53E005Cecd3D7C89A4AE814617cC14828b6527E" - }, - scroll: { - pufETH: "0xc4d46E8402F476F269c379677C99F18E22Ea030e" - }, - zeta: { - pufETH: "0x1e4bF3CaBD7707089138dD5a545B077413FA83Fc" - }, - zklink: { - pufETH: "0x1B49eCf1A8323Db4abf48b2F5EFaA33F7DdAB3FC" - }, - cronos: { - USDC: ADDRESSES.cronos.USDC - }, - fraxtal: { - WETH: ADDRESSES.fraxtal.WETH, - FRAX: ADDRESSES.fraxtal.FRAX - }, - gravity: { - USDC_e: ADDRESSES.gravity.USDC_e, - wG: ADDRESSES.gravity.wG - }, - bsquared: { - WBTC: ADDRESSES.bsquared.WBTC, - }, - cronos_zkevm: { - USDC: ADDRESSES.cronos_zkevm.USDC, - } -} - module.exports = { chains: [ { - name: 'ethereum', - tokens: [ - ADDRESSES.ethereum.USDC, - ADDRESSES.ethereum.USDT, - ADDRESSES.ethereum.WETH, - ADDRESSES.ethereum.WBTC, - ADDRESSES.ethereum.FRAX, - TOKENS.ethereum.XDAO, - TOKENS.ethereum.LADYS, - TOKENS.ethereum.pufETH, - TOKENS.ethereum.G, - ], - holders: [ - '0xb80fDAA74dDA763a8A158ba85798d373A5E84d84', // portal v1 - '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8', // portal v2 - '0x42Cd64f48496dDdfEfF8F3704df9175dbe20d325', // portal Teleport - ] - }, - { - name: 'bsc', - tokens: [ - ADDRESSES.bsc.BUSD, - ADDRESSES.bsc.USDC, - ADDRESSES.bsc.ETH, - ADDRESSES.bsc.BTCB, - TOKENS.bsc.XDAO, - TOKENS.bsc.G, - ], - holders: [ - '0xD7F9989bE0d15319d13d6FA5d468211C89F0b147', // portal v1 - '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 - '0xb91d3060C90aac7c4c706aef2B37997b3b2a1DcF', // portal Teleport - '0xab0738320A21741f12797Ee921461C691673E276', // v1 pool with Ethereum - ] - }, - { - name: 'avax', - tokens: [ - ADDRESSES.avax.USDC_e, - ADDRESSES.avax.USDC, - ], - holders: [ - '0xD7F9989bE0d15319d13d6FA5d468211C89F0b147', // portal v1 - '0xE75C7E85FE6ADd07077467064aD15847E6ba9877', // portal v2 - '0xab0738320A21741f12797Ee921461C691673E276', // v1 pool with Ethereum - '0xF4BFF06E02cdF55918e0ec98082bDE1DA85d33Db', // v1 pool with BNB chain - ] - }, - { - name: 'polygon', - tokens: [ - ADDRESSES.polygon.USDC, - ADDRESSES.polygon.WETH_1, - ADDRESSES.polygon.FRAX, - TOKENS.polygon.XDAO, - ], - holders: [ - '0xD7F9989bE0d15319d13d6FA5d468211C89F0b147', // portal v1 - '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8', // portal v2 - '0x3338BE49A5f60e2593337919F9aD7098e9a7Dd7E', // portal Teleport - '0xab0738320A21741f12797Ee921461C691673E276', // v1 pool with Ethereum - '0xF4BFF06E02cdF55918e0ec98082bDE1DA85d33Db', // v1 pool with BNB chain - '0x3F1bfa6FA3B6D03202538Bf0cdE92BbE551104ac', // v1 pool with Avalanche - ] - }, - { - name: 'telos', - tokens: [ - ADDRESSES.telos.syUSDC, - ], - holders: [ - '0x17A0E3234f00b9D7028e2c78dB2caa777F11490F', // portal v1 - '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8', // portal v2 - '0x7f3C1E54b8b8C7c08b02f0da820717fb641F26C8', // v1 pool with BNB chain - ] - }, - { - name: 'aurora', - tokens: [ - ADDRESSES.aurora.USDC_e, - ], - holders: [ - '0x17A0E3234f00b9D7028e2c78dB2caa777F11490F', // portal v1 - '0x7Ff7AdE2A214F9A4634bBAA4E870A5125dA521B8', // v1 pool with BNB chain - '0x7F1245B61Ba0b7D4C41f28cAc9F8637fc6Bec9E4', // v1 pool with Polygon - ] - }, - { - name: 'boba', - tokens: [ - ADDRESSES.boba.USDC, - ], - holders: [ - '0xD7F9989bE0d15319d13d6FA5d468211C89F0b147', // portal v1 - '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8', // portal v2 - '0xab0738320A21741f12797Ee921461C691673E276', // v1 pool with Ethereum - '0xe0ddd7afC724BD4B320472B5C954c0abF8192344', // v1 pool with BNB chain - ] - }, - { - name: 'boba_avax', - tokens: [ - ADDRESSES.boba_avax.USDC_e, - ], - holders: [ - '0xd8db4fb1fEf63045A443202d506Bcf30ef404160', // portal v2 - ] - }, - { - name: 'boba_bnb', - tokens: [ - ADDRESSES.boba_bnb.USDC, - ], - holders: [ - '0x6148FD6C649866596C3d8a971fC313E5eCE84882', // pool v2 - ] - }, - { - name: 'kava', - tokens: [ - ADDRESSES.kava.USDC, - ADDRESSES.kava.USDt, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'era', - tokens: [ - ADDRESSES.era.USDC, - ADDRESSES.era.WETH, - ADDRESSES.era.WBTC, - ], - holders: [ - '0x39dE19C9fF25693A2311AAD1dc5C790194084A39', // portal v2 - '0x4f5456d4d0764473DfCA1ffBB8524C151c4F19b9', // new portal v2 - '0x97b99f47b086a074f214f4A62A3b041599726DC2', // portal Teleport - ] - }, - { - name: 'arbitrum', - tokens: [ - ADDRESSES.arbitrum.USDC, // USDC.e - ADDRESSES.arbitrum.USDC_CIRCLE, - ADDRESSES.arbitrum.WETH, - ADDRESSES.arbitrum.FRAX, - TOKENS.arbitrum.XDAO, - TOKENS.arbitrum.LADYS, - ], - holders: [ - '0x01A3c8E513B758EBB011F7AFaf6C37616c9C24d9', // portal v2 - '0x0425841529882628880fBD228AC90606e0c2e09A', // portal Teleport - ] - }, - { - name: 'optimism', - tokens: [ - ADDRESSES.optimism.USDC, - ADDRESSES.optimism.WETH_1, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'arbitrum_nova', - tokens: [ - ADDRESSES.arbitrum_nova.USDC, - ADDRESSES.arbitrum_nova.WETH, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'polygon_zkevm', - tokens: [ - ADDRESSES.polygon_zkevm.USDC, - ADDRESSES.polygon_zkevm.USDC_CIRCLE, - ADDRESSES.polygon_zkevm.WETH, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'mantle', - tokens: [ - ADDRESSES.mantle.USDC, - ADDRESSES.mantle.WETH, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'linea', - tokens: [ - ADDRESSES.linea.WETH, - ADDRESSES.linea.USDC, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - '0x7f6fb9f3ce785F3d85772c038Fda58eC9432D421', // portal Teleport - ] - }, - { - name: 'base', - tokens: [ - ADDRESSES.base.WETH, - ADDRESSES.base.USDbC, - ], - holders: [ - '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 - '0xEE981B2459331AD268cc63CE6167b446AF4161f8', // portal v2 new - ] - }, - { - name: 'tron', - tokens: [ - ADDRESSES.tron.USDT, - ], - holders: [ - 'TVgY3ayqTGUoe7th84ZNL5peVfRNdLFDjf', // portal v2 - ] - }, - { - name: 'scroll', - tokens: [ - ADDRESSES.scroll.WETH, - ADDRESSES.scroll.USDC, - TOKENS.scroll.pufETH, - ], - holders: [ - '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 - '0x9b1c1949995E43E6d391A4FDA207bf4386Ee5a32', // portal Teleport - ] - }, - { - name: 'manta', - tokens: [ - ADDRESSES.manta.WETH, - ADDRESSES.manta.USDC, - TOKENS.manta.pufETH, - ], - holders: [ - '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 - ] - }, - { - name: 'metis', - tokens: [ - ADDRESSES.metis.WETH, - ], - holders: [ - '0xd8db4fb1fEf63045A443202d506Bcf30ef404160', // portal v2 - ] - }, - { - name: 'mode', - tokens: [ - ADDRESSES.mode.WETH, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'rsk', - tokens: [ - ADDRESSES.rsk.rUSDT, - ADDRESSES.rsk.WRBTC1, - ], - holders: [ - '0x5aa5f7f84ed0e5db0a4a85c3947ea16b53352fd4', // portal v2 - ] - }, - { - name: 'blast', - tokens: [ - ADDRESSES.blast.WETH, - ], - holders: [ - '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 - ] - }, - { - name: 'merlin', - tokens: [ - ADDRESSES.merlin.WBTC, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'ftn', - tokens: [ - ADDRESSES.ftn.USDC, - ], - holders: [ - '0x318C2B9a03C37702742C3d40C72e4056e430135A', // portal v2 - ] - }, - { - name: 'zklink', - tokens: [ - ADDRESSES.zklink.WETH, - TOKENS.zklink.pufETH, - ], - holders: [ - '0x8Dc71561414CDcA6DcA7C1dED1ABd04AF474D189', // portal v2 - ] - }, - { - name: 'core', - tokens: [ - ADDRESSES.core.coreBTC, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'taiko', - tokens: [ - ADDRESSES.taiko.WETH, - ], - holders: [ - '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 - ] - }, - { - name: 'sei', - tokens: [ - ADDRESSES.sei.USDC, - ADDRESSES.sei.USDT, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'zeta', - tokens: [ - TOKENS.zeta.pufETH, - ADDRESSES.zeta.USDC_1, - ], - holders: [ - '0x8a7F930003BedD63A1ebD99C5917FD6aE7E3dedf', // portal v2 - ] - }, - { - name: 'cronos', - tokens: [ - TOKENS.cronos.USDC, - ], - holders: [ - '0xE75C7E85FE6ADd07077467064aD15847E6ba9877', // portal v2 - ] - }, - { - name: 'fraxtal', - tokens: [ - TOKENS.fraxtal.WETH, - TOKENS.fraxtal.FRAX, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'gravity', - tokens: [ - TOKENS.gravity.USDC_e, - TOKENS.gravity.wG, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'bsquared', - tokens: [ - TOKENS.bsquared.WBTC, - ], - holders: [ - '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 - ] - }, - { - name: 'cronos_zkevm', - tokens: [ - TOKENS.cronos_zkevm.USDC, - ], - holders: [ - '0x2E818E50b913457015E1277B43E469b63AC5D3d7', // portal v2 - ] - }, + name: 'ethereum', + tokens: [ + '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', // USDC, + '0xd38BB40815d2B0c2d2c866e0c72c5728ffC76dd9', // SIS, + '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', // WETH, + '0xdAC17F958D2ee523a2206206994597C13D831ec7', // USDT, + '0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599', // WBTC, + '0x12970E6868f88f6557B76120662c1B3E50A646bf', // LADYS, + '0xD9A442856C234a39a81a089C06451EBAa4306a72', // pufETH, + '0x853d955aCEf822Db058eb8505911ED77F175b99e', // FRAX, + '0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649', // G, + '0x582d872A1B094FC48F5DE31D3B73F2D9bE47def1', // WTON + ], + holders: [ + '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8' // portal + ] + }, + { + name: 'bsc', + tokens: [ + '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d', // USDC, + '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56', // BUSD, + '0x2170Ed0880ac9A755fd29B2688956BD959F933F8', // ETH, + '0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c', // BTCB, + '0xF98b660AdF2ed7d9d9D9dAACC2fb0CAce4F21835', // SIS, + '0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649', // G, + '0x76A797A59Ba2C17726896976B7B3747BfD1d220f', // WTON + ], + holders: [ + '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4' // portal + ] + }, + { + name: 'avax', + tokens: [ + '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E', // USDC, + '0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664', // USDC.e + ], + holders: [ + '0xE75C7E85FE6ADd07077467064aD15847E6ba9877' // portal + ] + }, + { + name: 'polygon', + tokens: [ + '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174', // USDC.e, + '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', // WETH, + '0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89', // FRAX + ], + holders: [ + '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8' // portal + ] + }, + { + name: 'telos', + tokens: [ + '0xe6E5f3d264117E030C21920356641DbD5B3d660c', // USDC, + '0x63d71E79AdF0886c989A23b04a0E86F1489b6BC3', // WETH, + '0x7bD3ffe9f0C9CF08FD60e102FEa455A6EA580276', // USDT + ], + holders: [ + '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8' // portal + ] + }, + { + name: 'kava', + tokens: [ + '0x919C1c267BC06a7039e03fcc2eF738525769109c', // USDt + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'boba', + tokens: [ + '0x66a2A913e447d6b4BF33EFbec43aAeF87890FBbc', // USDC + ], + holders: [ + '0xb8f275fBf7A959F4BCE59999A2EF122A099e81A8' // portal + ] + }, + { + name: 'era', + tokens: [ + '0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4', // USDC.e, + '0x1d17CBcF0D6D143135aE902365D2E5e2A16538D4', // USDC, + '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91', // WETH, + '0xBBeB516fb02a01611cBBE0453Fe3c580D7281011', // WBTC, + '0xdd9f72afED3631a6C85b5369D84875e6c42f1827', // SIS, + '0xED0c95EBe5a3E687cB2224687024FeC6518E683e', // syBTC + ], + holders: [ + '0x4f5456d4d0764473DfCA1ffBB8524C151c4F19b9' // portal + ] + }, + { + name: 'arbitrum', + tokens: [ + '0xaf88d065e77c8cC2239327C5EDb3A432268e5831', // USDC, + '0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8', // USDC.e, + '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1', // WETH, + '0x9E758B8a98a42d612b3D38B66a22074DC03D7370', // SIS, + '0x3b60FF35D3f7F62d636b067dD0dC0dFdAd670E4E', // LADYS, + '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', // FRAX, + '0x1A6B3A62391ECcaaa992ade44cd4AFe6bEC8CfF1', // UXLINK + ], + holders: [ + '0x01A3c8E513B758EBB011F7AFaf6C37616c9C24d9' // portal + ] + }, + { + name: 'optimism', + tokens: [ + '0x7F5c764cBc14f9669B88837ca1490cCa17c31607', // USDC.e, + '0x4200000000000000000000000000000000000006', // WETH + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'arbitrum_nova', + tokens: [ + '0x750ba8b76187092B0D1E87E28daaf484d1b5273b', // USDC, + '0x722E8BdD2ce80A4422E880164f2079488e115365', // WETH + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'polygon_zkevm', + tokens: [ + '0xA8CE8aee21bC2A48a5EF670afCc9274C7bbbC035', // USDC, + '0x37eAA0eF3549a5Bb7D431be78a3D99BD360d19e5', // USDC.e, + '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9', // WETH + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'linea', + tokens: [ + '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f', // WETH, + '0x176211869cA2b568f2A7D4EE941E073a821EE1ff', // USDC, + '0x6EF95B6f3b0F39508e3E04054Be96D5eE39eDE0d', // SIS + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'mantle', + tokens: [ + '0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9', // USDC, + '0xdEAddEaDdeadDEadDEADDEAddEADDEAddead1111', // WETH, + '0x1Bdd8878252DaddD3Af2ba30628813271294eDc0', // CATI + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'base', + tokens: [ + '0x4200000000000000000000000000000000000006', // WETH, + '0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA', // USDbC, + '0x9C7BEBa8F6eF6643aBd725e45a4E8387eF260649', // G + ], + holders: [ + '0xEE981B2459331AD268cc63CE6167b446AF4161f8' // portal + ] + }, + { + name: 'tron', + tokens: [ + 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t', // USDT + ], + holders: [ + 'TVgY3ayqTGUoe7th84ZNL5peVfRNdLFDjf' // portal + ] + }, + { + name: 'scroll', + tokens: [ + '0x5300000000000000000000000000000000000004', // WETH, + '0x06eFdBFf2a14a7c8E15944D1F4A48F9F95F663A4', // USDC, + '0x1467b62A6AE5CdcB10A6a8173cfe187DD2C5a136', // SIS, + '0xc4d46E8402F476F269c379677C99F18E22Ea030e', // pufETH + ], + holders: [ + '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4' // portal + ] + }, + { + name: 'manta', + tokens: [ + '0x0Dc808adcE2099A9F62AA87D9670745AbA741746', // WETH, + '0xb73603C5d87fA094B7314C74ACE2e64D165016fb', // USDC, + '0xA53E005Cecd3D7C89A4AE814617cC14828b6527E', // pufETH + ], + holders: [ + '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4' // portal + ] + }, + { + name: 'metis', + tokens: [ + '0x420000000000000000000000000000000000000A', // WETH + ], + holders: [ + '0xd8db4fb1fEf63045A443202d506Bcf30ef404160' // portal + ] + }, + { + name: 'ftn', + tokens: [ + '0x4237e0A5b55233D5B6D6d1D9BF421723954130D8', // USDC, + '0xE5b3562A0fa9eC3e718C96FfE349e1280D2Be591', // WETH, + '0xDeF886C55a79830C47108eeb9c37e78a49684e41', // USDT + ], + holders: [ + '0x318C2B9a03C37702742C3d40C72e4056e430135A' // portal + ] + }, + { + name: 'mode', + tokens: [ + '0x4200000000000000000000000000000000000006', // WETH + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'rsk', + tokens: [ + '0xef213441A85dF4d7ACbDaE0Cf78004e1E486bB96', // rUSDT, + '0x542fDA317318eBF1d3DEAf76E0b632741A7e677d', // WRBTC + ], + holders: [ + '0x5aa5f7f84ed0e5db0a4a85c3947ea16b53352fd4' // portal + ] + }, + { + name: 'blast', + tokens: [ + '0x4300000000000000000000000000000000000004', // WETH + ], + holders: [ + '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4' // portal + ] + }, + { + name: 'merlin', + tokens: [ + '0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA', // WBTC + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'zklink', + tokens: [ + '0x8280a4e7D5B3B658ec4580d3Bc30f5e50454F169', // WETH, + '0x1B49eCf1A8323Db4abf48b2F5EFaA33F7DdAB3FC', // pufETH + ], + holders: [ + '0x8Dc71561414CDcA6DcA7C1dED1ABd04AF474D189' // portal + ] + }, + { + name: 'core', + tokens: [ + '0x8034aB88C3512246Bf7894f57C834DdDBd1De01F', // coreBTC + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'taiko', + tokens: [ + '0xA51894664A773981C6C112C43ce576f315d5b1B6', // WETH + ], + holders: [ + '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4' // portal + ] + }, + { + name: 'sei', + tokens: [ + '0x3894085Ef7Ff0f0aeDf52E2A2704928d1Ec074F1', // USDC, + '0xB75D0B03c06A926e488e2659DF1A861F860bD3d1', // USDT + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'zeta', + tokens: [ + '0x1e4bF3CaBD7707089138dD5a545B077413FA83Fc', // pufETH, + '0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a', // USDC.ETH + ], + holders: [ + '0x8a7F930003BedD63A1ebD99C5917FD6aE7E3dedf' // portal + ] + }, + { + name: 'cronos', + tokens: [ + '0xc21223249CA28397B4B6541dfFaEcC539BfF0c59', // USDC + ], + holders: [ + '0xE75C7E85FE6ADd07077467064aD15847E6ba9877' // portal + ] + }, + { + name: 'fraxtal', + tokens: [ + '0xA8a59D73388D0c4344a7b0Ba287ddb654227c38a', // WETH, + '0xFc00000000000000000000000000000000000001', // FRAX + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'gravity', + tokens: [ + '0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6', // USDC.e, + '0xBB859E225ac8Fb6BE1C7e38D87b767e95Fef0EbD', // wG + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'bsquared', + tokens: [ + '0x4200000000000000000000000000000000000006', // WBTC + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'ton', + tokens: [ + 'EQD8AErK5HbmnftlHQuk8bXC_JuX1COLPeNIfMriw23gfO3I', // TON, + 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs', // USDT, + 'EQBh9XACT0B60U8Q48VnjyqCxzxpM4oA0c8rqKt4h70yk1V5', // UXLINK, + 'EQD-cvR0Nz6XAyRBvbhz-abTrRC6sI5tvHvvpeQraV9UAAD7', // CATI + ], + holders: [ + 'EQDpUHhVl5lJ6Y47DCd0TWdXB_kd-U-N6KyAELePNjfj15HT' // portal + ] + }, + { + name: 'cronos_zkevm', + tokens: [ + '0xaa5b845F8C9c047779bEDf64829601d8B264076c', // USDC + ], + holders: [ + '0x2E818E50b913457015E1277B43E469b63AC5D3d7' // portal + ] + }, + { + name: 'morph', + tokens: [ + '0xe34c91815d7fc18A9e2148bcD4241d0a5848b693', // USDC + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62' // portal + ] + }, + { + name: 'boba_bnb', + tokens: [ + '0x9f98f9f312d23d078061962837042b8918e6aff2', // USDC + ], + holders: [ + '0x6148FD6C649866596C3d8a971fC313E5eCE84882' // portal + ] + } ] } \ No newline at end of file diff --git a/projects/symbiosis-finance/index.js b/projects/symbiosis-finance/index.js index 6df91ba4bcf4..794479e66c04 100644 --- a/projects/symbiosis-finance/index.js +++ b/projects/symbiosis-finance/index.js @@ -1,15 +1,28 @@ const config = require("./config"); const { sumTokensExport } = require('../helper/unwrapLPs') +const { sumTokensExport: sumTon } = require('../helper/chain/ton') module.exports = { - methodology: 'Counts the amount of stables locked in Symbiosis protocol contracts: Portals V1, NervePools V1, Portals V2, OmniPool V2', + methodology: 'Counts the amount of stables locked in Symbiosis protocol contracts: Portals V2', }; config.chains.forEach(chainInfo => { const {name: chain, tokens, holders} = chainInfo - module.exports[chain] = { - tvl: sumTokensExport({ chain, tokens, owners: holders }) + + if (chain === 'ton') { + module.exports[chain] = { + tvl: sumTon({ chain, tokens, owners: holders }) + } + } else { + module.exports[chain] = { + tvl: sumTokensExport({ chain, tokens, owners: holders }) + } } }) -module.exports.boba_avax.tvl = () => ({}) \ No newline at end of file +const deprecatedChains = ['aurora', 'boba_avax'] +deprecatedChains.forEach(chain => { + module.exports[chain] = { + tvl: () => ({}) + } +}) \ No newline at end of file diff --git a/utils/scripts/useTokenLabels.js b/utils/scripts/useTokenLabels.js index 36a873063971..f7c233fef1ed 100644 --- a/utils/scripts/useTokenLabels.js +++ b/utils/scripts/useTokenLabels.js @@ -28,7 +28,10 @@ function run() { run() +const ignoredFolders = ['symbiosis-finance', 'node_modules'] + function updateFile(file) { + if (ignoredFolders.some(s => file.includes(s))) return; let relativePath = path.relative(file + '/..', allLabelsFile) if (relativePath.startsWith('coreAssets')) relativePath = './' + relativePath const requireStr = `const ADDRESSES = require('${relativePath}')\n` From 31da1891de83498e3511027a0784389899916e50 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:02:57 +0100 Subject: [PATCH 697/787] Fix: stakewise v2 (#12664) --- projects/stakewise/index.js | 70 ++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/projects/stakewise/index.js b/projects/stakewise/index.js index a02caf992496..c44adcfbbefc 100644 --- a/projects/stakewise/index.js +++ b/projects/stakewise/index.js @@ -1,52 +1,50 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require('@defillama/sdk'); const { getLogs } = require('../helper/cache/getLogs') -async function tvl(api) { - const lsBals = await api.multiCall({ abi: 'erc20:totalSupply', calls: ['0x20BC832ca081b91433ff6c17f85701B6e92486c5', '0xFe2e637202056d30016725477c5da089Ab0A043A']}) +const CONFIG = { + ethereum: { + rETH2: '0x20BC832ca081b91433ff6c17f85701B6e92486c5', + sETH2: '0xFe2e637202056d30016725477c5da089Ab0A043A', + validator: '0xEadCBA8BF9ACA93F627F31fB05470F5A0686CEca', + factory: '0x3a0008a588772446f6e656133c2d5029cc4fc20e', + blacklist: ['0x09e84205df7c68907e619d07afd90143c5763605'] + }, + xdai: { + GNO: '0x9c58bacc331c9aa871afd802db6379a98e80cedb', + sGNO: '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445' + } +} - const solosValidators = await getLogs({ - target: '0xEadCBA8BF9ACA93F627F31fB05470F5A0686CEca', - topic: 'ValidatorRegistered(bytes32,bytes,uint256,address)', - fromBlock: 11726299, - api - }) +const topic = { + validatorRegistered: 'ValidatorRegistered(bytes32,bytes,uint256,address)', + vaultAdded: 'VaultAdded(address,address)' +} + +const ethTvl = async (api) => { + const { rETH2, sETH2, validator, factory, blacklist } = CONFIG[api.chain] + const lsBals = await api.multiCall({ abi: 'erc20:totalSupply', calls: [rETH2, sETH2]}) + const solosValidators = await getLogs({ api, target: validator, topic: topic.validatorRegistered, fromBlock: 11726299 }) lsBals.push(solosValidators.length * 32e18) - const vaults = await getLogs({ - target: '0x3a0008a588772446f6e656133c2d5029cc4fc20e', - topic: 'VaultAdded(address,address)', - fromBlock: 18470078, - api - }) + const vaults = await getLogs({ api, target: factory, topic: topic.vaultAdded, fromBlock: 18470078 }) + const assets = await api.multiCall({ - calls: vaults.map(v=>({target:"0x"+v.topics[2].slice(26)})), + calls: vaults + .map(v => ({ target: "0x" + v.topics[2].slice(26) })) + .filter(call => !blacklist.includes(call.target.toLowerCase())), abi: "uint256:totalAssets" }) api.add(ADDRESSES.ethereum.WETH, assets.concat(lsBals)) } -async function xdaiTvl(timestamp, ethBlock, { xdai: block }) { - const chain = "xdai" - const supply = await sdk.api.erc20.totalSupply({ - target: '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445', - block, - chain - }) - - return { - [ADDRESSES.ethereum.GNO]: supply.output - } +const xdaiTvl = async (api) => { + const { GNO, sGNO } = CONFIG[api.chain] + const supply = await api.call({ target: sGNO, abi: 'erc20:totalSupply' }) + api.add(GNO, supply) } - - module.exports = { methodology: 'Counts ETH staked', - ethereum: { - tvl, - }, - xdai:{ - tvl: xdaiTvl - } -} + ethereum: { tvl: ethTvl }, + xdai: { tvl: xdaiTvl } +} \ No newline at end of file From 28c8691ac62df5a8824fd3b43648104405d64d1f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:12:16 +0100 Subject: [PATCH 698/787] use token labels --- projects/DegenHive-dsui/index.js | 3 ++- projects/DegenHive-memepad/index.js | 3 ++- projects/accumulated-finance/index.js | 2 +- projects/agdex/index.js | 2 +- projects/alphafi/index.js | 4 ++-- projects/apechain/index.js | 5 +++-- projects/avalon-finance-usda/index.js | 7 +++--- projects/belt/config.js | 7 +++--- projects/cega-v2/index.js | 2 +- projects/crosscurve/index.js | 22 +++++++++---------- projects/deepbook-v3/index.js | 2 +- projects/eigenpie/config.js | 3 ++- projects/eigenpie/index.js | 3 ++- projects/emojicoin/index.js | 3 ++- projects/headstarter/index.js | 7 +++--- projects/helio-money/index.js | 6 ++--- projects/helper/tokenMapping.js | 2 +- projects/hinkal/registryTokens.js | 2 +- .../registryTokensWithUnderlyingAddresses.js | 2 +- projects/kiloex/index.js | 4 ++-- projects/lavarage/index.js | 3 ++- projects/magma/index.js | 3 ++- projects/mitosis/index.js | 8 +++---- projects/reya-perp/index.js | 2 +- projects/sensi/index.js | 3 ++- projects/stakewise/index.js | 2 +- projects/suilend/index.js | 1 + projects/synthetix-v3/index.js | 2 +- projects/treasury/bitdao.js | 3 ++- projects/treasury/dexfinance.js | 2 +- projects/treasury/sideshift-ai.js | 3 ++- projects/tron-btc/index.js | 2 +- projects/unibtc/index.js | 2 +- projects/uniiotx/index.js | 3 ++- projects/vectis/spotMarkets.js | 7 +++--- projects/zkLink/index.js | 2 +- utils/scripts/useTokenLabels.js | 9 +++++--- 37 files changed, 84 insertions(+), 64 deletions(-) diff --git a/projects/DegenHive-dsui/index.js b/projects/DegenHive-dsui/index.js index 797acfa0619d..68a819281ce8 100644 --- a/projects/DegenHive-dsui/index.js +++ b/projects/DegenHive-dsui/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui"); async function tvl(api) { @@ -5,7 +6,7 @@ async function tvl(api) { // Add TVL from SUI liquid staking const dsui_vault = await sui.getObject("0x85aaf87a770b4a09822e7ca3de7f9424a4f58688cfa120f55b294a98d599d402"); let sui_staked = Number(Number(dsui_vault.fields.dsui_supply * dsui_vault.fields.sui_claimable_per_dsui / 1e9 + dsui_vault.fields.sui_to_stake).toFixed(0)); - api.add( "0x2::sui::SUI", sui_staked) + api.add( ADDRESSES.sui.SUI, sui_staked) } diff --git a/projects/DegenHive-memepad/index.js b/projects/DegenHive-memepad/index.js index b5e52109b1d4..3389e10f5254 100644 --- a/projects/DegenHive-memepad/index.js +++ b/projects/DegenHive-memepad/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui"); const { cachedGraphQuery } = require('../helper/cache'); @@ -22,7 +23,7 @@ async function tvl(api) { // Add TVL for MEME Pools for (const { fields } of suiMemePoolsData) { if ( fields.sui_available == 0) continue; - api.add( "0x2::sui::SUI", fields.sui_available) + api.add( ADDRESSES.sui.SUI, fields.sui_available) } } diff --git a/projects/accumulated-finance/index.js b/projects/accumulated-finance/index.js index f844b04379f7..4aaef007b07a 100644 --- a/projects/accumulated-finance/index.js +++ b/projects/accumulated-finance/index.js @@ -73,7 +73,7 @@ const config = { "stETH": [ { "ethereum": { - "baseToken": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84", + "baseToken": ADDRESSES.ethereum.STETH, "LST": "0x684d7fd1067ed8e9686e6fd764d048b9bf92dfa9" } }, diff --git a/projects/agdex/index.js b/projects/agdex/index.js index d9af9793c9a5..3be03c6e2018 100644 --- a/projects/agdex/index.js +++ b/projects/agdex/index.js @@ -19,7 +19,7 @@ const usdc_resource_account = "0x19fb80bd79fa8f7538404af85196396973e3fbbda150349 const usdc_metadata = "0x2b3be0a97a73c87ff62cbdd36837a9fb5bbd1d7f06a73b7ed62ec15c5326c1b8"; const usdt_resource_account = "0xbb3c1b88599c563062e2b08fe3a92ab048d700f9aa44617c680d59a4aa69b23f"; -const usdt_metadata = "0x357b0b74bc833e95a115ad22604854d6b0fca151cecd94111770e5d6ffc9dc2b"; +const usdt_metadata = ADDRESSES.aptos.USDt; const eth_resource_account = "0x38bca0c288df1e13d9a30d33c4ce8ee778333c52bd4e730b49c6c9379be39b10"; const eth_metadata = "0xae02f68520afd221a5cd6fda6f5500afedab8d0a2e19a916d6d8bc2b36e758db"; diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index e1ca78109153..b59a51e9e602 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -102,7 +102,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ parentPoolID: "0x9e59de50d9e5979fc03ac5bcacdb581c823dbd27d63a036131e17b391f2fac88", investorID: "0xb0bff60783536f9dc0b38e43150a73b73b8a4f1969446f7721e187821915bd00", token0Type: ADDRESSES.sui.USDC_CIRCLE, - token1Type: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH" + token1Type: ADDRESSES.sui.ETH }, // deep sui { @@ -205,7 +205,7 @@ const ALPHAFI_NAVI_TVL_IDS = [ }, { poolID: "0xc37ec956fdef6c217505e62444ab93f833c20923755d67d1c8588c9b093ae00e", - tokenType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH", + tokenType: ADDRESSES.sui.ETH, expo: 8 }, ] diff --git a/projects/apechain/index.js b/projects/apechain/index.js index cfd7dead9e3e..b456cd56c7cd 100644 --- a/projects/apechain/index.js +++ b/projects/apechain/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs'); const { staking } = require('../helper/staking') @@ -5,8 +6,8 @@ module.exports = { ethereum: { tvl: sumTokensExport({ tokensAndOwners: [ - ['0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0', '0xc8a12b1DB09ec5a43919906d94Fa7eeAef1131D1'], // wstETH - ['0x83F20F44975D03b1b09e64809B757c47f942BEeA', '0xf33D21137cD0B878f3A18Cc60cD74F842c59cb00'], // sDAI + [ADDRESSES.ethereum.WSTETH, '0xc8a12b1DB09ec5a43919906d94Fa7eeAef1131D1'], // wstETH + [ADDRESSES.ethereum.SDAI, '0xf33D21137cD0B878f3A18Cc60cD74F842c59cb00'], // sDAI ] }), staking: staking('0x5954aB967Bc958940b7EB73ee84797Dc8a2AFbb9', '0x4d224452801ACEd8B2F0aebE155379bb5D594381') diff --git a/projects/avalon-finance-usda/index.js b/projects/avalon-finance-usda/index.js index a4e3c61b6a6b..5e3a46b11797 100644 --- a/projects/avalon-finance-usda/index.js +++ b/projects/avalon-finance-usda/index.js @@ -1,21 +1,22 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/unwrapLPs"); const config = { ethereum: { poolAddress: '0x3f390dD6EF69f68f9877aACC086856a200808693', - fbtcAddress: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + fbtcAddress: ADDRESSES.bob.FBTC, lfbtcAddress: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', usdaAddress: '0x0b4D6DA52dF60D44Ce7140F1044F2aD5fabd6316', }, bsc: { poolAddress: '0xC757E47d6bC20FEab54e16F2939F51Aa4826deF7', - fbtcAddress: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + fbtcAddress: ADDRESSES.bob.FBTC, lfbtcAddress: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', usdaAddress: '0x8a4bA6C340894B7B1De0F6A03F25Aa6afb7f0224', }, mantle: { poolAddress: '0x8f778806CBea29F0f64BA6A4B7724BCD5EEd543E', - fbtcAddress: '0xC96dE26018A54D51c097160568752c4E3BD6C364', + fbtcAddress: ADDRESSES.bob.FBTC, lfbtcAddress: '0x3119a1AD5B63A000aB9CA3F2470611eB997B93B9', usdaAddress: '0x2BDC204b6d192921605c66B7260cFEF7bE34Eb2E', }, diff --git a/projects/belt/config.js b/projects/belt/config.js index 04b388d8c3cb..bb1fb3c5d3ad 100644 --- a/projects/belt/config.js +++ b/projects/belt/config.js @@ -1,10 +1,11 @@ +const ADDRESSES = require('../helper/coreAssets.json') const CONFIG = { bsc: [ - '0x51bd63f240fb13870550423d208452ca87c44444', - '0xa8bb71facdd46445644c277f9499dd22f6f0a30c', + ADDRESSES.bsc.beltBTC, + ADDRESSES.bsc.beltBNB, '0xcb3346ad40c947a2228b2e224c3931a5224ba7ad', '0xecb589831eefbdbbc48d1f86294724c76acd3314', - '0xaa20e8cb61299df2357561c2ac2e1172bc68bc25', + ADDRESSES.bsc.beltETH, '0x9a144edd7309bcc4e106a1a04e7fc402115a0980', '0x5142f6857f029bed5ddf6247d8a1f75984a3a380', '0x1794bb186c15fddbf4aac4a3b0e2f40659e9b841', diff --git a/projects/cega-v2/index.js b/projects/cega-v2/index.js index 4a8f77f96256..998423225509 100644 --- a/projects/cega-v2/index.js +++ b/projects/cega-v2/index.js @@ -27,7 +27,7 @@ module.exports = { ADDRESSES.arbitrum.WBTC, ADDRESSES.arbitrum.DAI, ADDRESSES.arbitrum.USDe, - '0x211Cc4DD073734dA055fbF44a2b4667d5E5fE5d2', + ADDRESSES.arbitrum.sUSDe, ], owners: ["0x475c4af369b28997b25bd756ef92797ad3f69593"], }), diff --git a/projects/crosscurve/index.js b/projects/crosscurve/index.js index 69e17877bd72..bdab2f52e3d6 100644 --- a/projects/crosscurve/index.js +++ b/projects/crosscurve/index.js @@ -49,7 +49,7 @@ module.exports = { "0xa70af99bff6b168327f9d1480e29173e757c7904", // crvUSDT "0xdad97f7713ae9437fa9249920ec8507e5fbb23d3", // crv3crypto ADDRESSES.polygon.WBTC, // WBTC - "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619", // WETH + ADDRESSES.polygon.WETH_1, // WETH ], }), }, @@ -65,7 +65,7 @@ module.exports = { "0xA5E0E46462970C9Ee8C2ECadcde254c483748Ec4", // b3pool "0xae87e5fa20f335ce14aa3b9e0616308d9ac7d4ce", // crvUSDT ADDRESSES.bsc.BTCB, // BTCB - "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", // ETH + ADDRESSES.bsc.ETH, // ETH ], }), }, @@ -96,7 +96,7 @@ module.exports = { "0x1337BedC9D22ecbe766dF105c9623922A27963EC", // av3crv "0x1daB6560494B04473A0BE3E7D83CF3Fdf3a51828", // crv3crypto ADDRESSES.avax.BTC_b, // BTC.b - "0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB", // WETH.e + ADDRESSES.avax.WETH_e, // WETH.e ], }), }, @@ -115,7 +115,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ "0x1337bedc9d22ecbe766df105c9623922a27963ec", // x3CRV - "0x6a023ccd1ff6f2045c3309768ead9e68f978f6e1", // WETH + ADDRESSES.xdai.WETH, // WETH ], }), }, @@ -124,7 +124,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ ADDRESSES.blast.WETH, // WETH - "0x4300000000000000000000000000000000000003", // USDB + ADDRESSES.blast.USDB, // USDB ], }), }, @@ -133,7 +133,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ ADDRESSES.mantle.WETH, // WETH - "0x09bc4e0d864854c6afb6eb9a9cdf58ac190d0df9", // USDC + ADDRESSES.mantle.USDC, // USDC ], }), }, @@ -143,7 +143,7 @@ module.exports = { tokens: [ ADDRESSES.linea.WETH, // WETH "0x3aab2285ddcddad8edf438c1bab47e1a9d05a9b4", // WBTC - "0x176211869cA2b568f2A7D4EE941E073a821EE1ff", // USDC.e + ADDRESSES.linea.USDC, // USDC.e ], }), }, @@ -152,7 +152,7 @@ module.exports = { owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ ADDRESSES.taiko.WETH, // WETH - "0x07d83526730c7438048d55a4fc0b850e2aab6f0b", // USDC + ADDRESSES.taiko.USDC, // USDC ], }), }, @@ -177,7 +177,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0x919C1c267BC06a7039e03fcc2eF738525769109c", // USDt + ADDRESSES.kava.USDt, // USDt ], }), }, @@ -185,7 +185,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0x420000000000000000000000000000000000000a", // WETH + ADDRESSES.metis.WETH, // WETH ], }), }, @@ -193,7 +193,7 @@ module.exports = { tvl: sumTokensExport({ owner: "0xac8f44ceca92b2a4b30360e5bd3043850a0ffcbe", tokens: [ - "0x4200000000000000000000000000000000000006", // WETH + ADDRESSES.optimism.WETH_1, // WETH ], }), }, diff --git a/projects/deepbook-v3/index.js b/projects/deepbook-v3/index.js index b1f880cc378e..f133f0ac4a83 100644 --- a/projects/deepbook-v3/index.js +++ b/projects/deepbook-v3/index.js @@ -5,7 +5,7 @@ const coins = { deepType: "0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP", suiType: "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI", usdcType: ADDRESSES.sui.USDC_CIRCLE, - bethType: "0xd0e89b2af5e4910726fbcd8b8dd37bb79b29e5f83f7491bca830e94f7f226d29::eth::ETH", + bethType: ADDRESSES.sui.ETH, wusdtType: ADDRESSES.sui.USDT, wusdcType: ADDRESSES.sui.USDC, nsType: "0x5145494a5f5100e645e4b0aa950fa6b68f614e8c59e17bc5ded3495123a79178::ns::NS", diff --git a/projects/eigenpie/config.js b/projects/eigenpie/config.js index d45891839f5e..5a18b6fbafa0 100644 --- a/projects/eigenpie/config.js +++ b/projects/eigenpie/config.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') module.exports = { ethereum: { eigenConfig: "0x20b70E4A1883b81429533FeD944d7957121c7CAB", @@ -7,7 +8,7 @@ module.exports = { msteth: "0x1C1Fb35334290b5ff1bF7B4c09130885b10Fc0f4", egeth: "0x4bcc7c793534246BC18acD3737aA4897FF23B458", wsteth: "0xf0e673Bc224A8Ca3ff67a61605814666b1234833", - weth: "0x4200000000000000000000000000000000000006", + weth: ADDRESSES.optimism.WETH_1, } }; \ No newline at end of file diff --git a/projects/eigenpie/index.js b/projects/eigenpie/index.js index c487fad2e26f..52a16d36f124 100644 --- a/projects/eigenpie/index.js +++ b/projects/eigenpie/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const config = require("./config"); const sdk = require('@defillama/sdk') @@ -17,7 +18,7 @@ async function tvl(api) { const zircuitApi = new sdk.ChainApi({ chain: 'zircuit', timestamp: api.timestamp }); await zircuitApi.getBlock() const zircuitSupplies = await getZircuitSupplies(zircuitApi); - api.add('0xae7ab96520de3a18e5e111b5eaab095312d7fe84', zircuitSupplies.zircuitMstethSupply * -1); // Adjust for msteth + api.add(ADDRESSES.ethereum.STETH, zircuitSupplies.zircuitMstethSupply * -1); // Adjust for msteth api.add('0xeFEfeFEfeFeFEFEFEfefeFeFefEfEfEfeFEFEFEf', zircuitSupplies.zircuitEgethSupply * -1); // Adjust for egeth // Fetch token list and their supplies diff --git a/projects/emojicoin/index.js b/projects/emojicoin/index.js index 16ab75319038..75a7f7872e67 100644 --- a/projects/emojicoin/index.js +++ b/projects/emojicoin/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { function_view, timestampToVersion } = require("../helper/chain/aptos"); async function getAllMarkets(ledgerVersion) { @@ -14,7 +15,7 @@ async function getAllMarkets(ledgerVersion) { async function tvl(api) { // const version = await timestampToVersion(api.timestamp, 1962588495); // this query is not working const tvl_amount = await getAllMarkets(); - api.add("0x1::aptos_coin::AptosCoin", tvl_amount); + api.add(ADDRESSES.aptos.APT, tvl_amount); } module.exports = { diff --git a/projects/headstarter/index.js b/projects/headstarter/index.js index 4b58cc3448b5..f84229446865 100644 --- a/projects/headstarter/index.js +++ b/projects/headstarter/index.js @@ -1,7 +1,8 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require("../helper/unwrapLPs"); const STAKING_CONTRACT = "0x000000000000000000000000000000000070eac5"; -const HST = "0x00000000000000000000000000000000000ec585"; +const HST = ADDRESSES.hedera.HST; const ENTITIES = [ { @@ -14,7 +15,7 @@ const ENTITIES = [ ], }, { - token: "0x000000000000000000000000000000000030fb8b", + token: ADDRESSES.hedera.STEAM, contracts: [ "0x00000000000000000000000000000000005737f0", "0x00000000000000000000000000000000005737e1", @@ -25,7 +26,7 @@ const ENTITIES = [ ], }, { - token: "0x00000000000000000000000000000000005c9f70", + token: ADDRESSES.hedera.HLQT, contracts: [ "0x00000000000000000000000000000000005cb45b", "0x00000000000000000000000000000000005cb45f", diff --git a/projects/helio-money/index.js b/projects/helio-money/index.js index ffa67ff082ad..a3f27e05cfa0 100644 --- a/projects/helio-money/index.js +++ b/projects/helio-money/index.js @@ -93,10 +93,10 @@ module.exports = { ["0x1346b618dC92810EC74163e4c27004c921D446a5","0x03DB750d6212C6a0BCa9258E8cB7cf46dfD63067"], // USDT -["0x55d398326f99059ff775485246999027b3197955", "0xAd406CcF75f9E6216fA4349635B0cD77D0059b1f"], +[ADDRESSES.bsc.USDT, "0xAd406CcF75f9E6216fA4349635B0cD77D0059b1f"], //FDUSD - ["0xc5f0f7b66764f6ec8c8dff7ba683102295e16409","0x2202a491752Fee0E616F06A89E2eF416E2Fcd7e9"], + [ADDRESSES.ethereum.FDUSD,"0x2202a491752Fee0E616F06A89E2eF416E2Fcd7e9"], // sUSDX [ @@ -105,7 +105,7 @@ module.exports = { ], // vUSDT, PSM - LSR - // ["0x55d398326f99059ff775485246999027b3197955", "0x5763DDeB60c82684F3D0098aEa5076C0Da972ec7"], + // [ADDRESSES.bsc.USDT, "0x5763DDeB60c82684F3D0098aEa5076C0Da972ec7"], ["0xfd5840cd36d94d7229439859c0112a4185bc0255","0xf76D9cFD08dF91491680313B1A5b44307129CDa9"] ], }), diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 5ad283641e8f..970173165969 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -43,7 +43,7 @@ const fixBalancesTokens = { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, apechain: { - '0x0000000000000000000000000000000000000000': { coingeckoId: "apecoin", decimals: 18 }, + [ADDRESSES.null]: { coingeckoId: "apecoin", decimals: 18 }, }, } diff --git a/projects/hinkal/registryTokens.js b/projects/hinkal/registryTokens.js index 6481f4fa5022..18f49e9743e8 100644 --- a/projects/hinkal/registryTokens.js +++ b/projects/hinkal/registryTokens.js @@ -956,7 +956,7 @@ const BASE_REGISTRY_TOKENS = [ "0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB", ADDRESSES.blast.ezETH, "0x1Bc71130A0e39942a7658878169764Bbd8A45993", - "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452", + ADDRESSES.base.wstETH, ]; const BLAST_REGISTRY_TOKENS = [ diff --git a/projects/hinkal/registryTokensWithUnderlyingAddresses.js b/projects/hinkal/registryTokensWithUnderlyingAddresses.js index 02fa16045caa..baf20579c0a4 100644 --- a/projects/hinkal/registryTokensWithUnderlyingAddresses.js +++ b/projects/hinkal/registryTokensWithUnderlyingAddresses.js @@ -247,7 +247,7 @@ const BASE_REGISTRY_TOKENS_WITH_UNDERLYING_ADDRESSES = { "0xD4a0e0b9149BCee3C920d2E00b5dE09138fd8bb7": ADDRESSES.optimism.WETH_1, "0x99CBC45ea5bb7eF3a5BC08FB1B7E56bB2442Ef0D": - "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452", + ADDRESSES.base.wstETH, "0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB": ADDRESSES.base.USDC, }; diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index 5e12b5225eca..f2dc1bbf2d37 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -60,8 +60,8 @@ module.exports = { ADDRESSES.base.USDC, //USDC '0x3b86ad95859b6ab773f55f8d94b4b9d443ee931f', //SolvBTC '0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf',//cbBTC - '0x04c0599ae5a44757c0af6f9ec3b93da8976c150a',//weETH - '0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452',//wstETH + ADDRESSES.blast.weETH,//weETH + ADDRESSES.base.wstETH,//wstETH ] }) }, }; diff --git a/projects/lavarage/index.js b/projects/lavarage/index.js index 5f204743a399..97acad61c044 100644 --- a/projects/lavarage/index.js +++ b/projects/lavarage/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { getProvider, sumTokens2 } = require("../helper/solana"); const { PublicKey } = require("@solana/web3.js"); const anchor = require("@project-serum/anchor"); @@ -18,7 +19,7 @@ const idleAccount = new PublicKey("bkhAyULeiXwju7Zmy4t3paDHtVZjNaofVQ4VgEdTWiE") const deployedAccount = new PublicKey("6riP1W6R3qzUPWYwLGtXEC23aTqmyAEdDtXzhntJquAh"); const multisigAccount = new PublicKey("DkPYEECBc28iute8vWvAuAU4xiM91Sht59p7FHZbmNQv"); const pendingUnstakeAccount = new PublicKey("HTnwdgfXrA6gZRiQsnfxLKbvdcqnxdbuC2FJsmCCVMw9"); -const usdcAddress = new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"); +const usdcAddress = new PublicKey(ADDRESSES.solana.USDC); const iscAddress = new PublicKey("J9BcrQfX4p9D1bvLzRNCbMDv8f44a9LFdeqNE4Yk2WMD"); const usdcPoolAccount = new PublicKey("9m3wEeK3v5yyqDGMnDiDRR3FjCwZjRVB4n92pieGtTbP"); const iscPoolAccount = new PublicKey("CrsxVEF7YNGAk9QwwbB2vuesUWoDopfgFAhA9apoCJ2z"); diff --git a/projects/magma/index.js b/projects/magma/index.js index 739350a3e562..691288d584a2 100644 --- a/projects/magma/index.js +++ b/projects/magma/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { getLiquityTvl } = require('../helper/liquity') // const { staking } = require('../helper/staking') const sdk = require('@defillama/sdk') @@ -7,7 +8,7 @@ module.exports = { tvl: sdk.util.sumChainTvls([ getLiquityTvl('0x21d81DABF6985587CE64C2E8EB12F69DF2178fe2'), getLiquityTvl('0xAeB0B38040aDdc4a2b520919f13944D9bC944435'), - getLiquityTvl('0xFF5F4bA96586EDae7E7D838D8770dFB3376Ec245', { nonNativeCollateralToken: true, collateralToken: "0x236f8c0a61dA474dB21B693fB2ea7AAB0c803894" }) + getLiquityTvl('0xFF5F4bA96586EDae7E7D838D8770dFB3376Ec245', { nonNativeCollateralToken: true, collateralToken: ADDRESSES.bob.uniBTC }) ]), // staking: staking('0x037a2e9a464fbA409D0E55600836864B410d6Dd8', '0x6C0bf4b53696b5434A0D21C7D13Aa3cbF754913E'), // disabled as backing of WEN is already counted towards tvl }, diff --git a/projects/mitosis/index.js b/projects/mitosis/index.js index 354bdfa26765..ca0b300a2521 100644 --- a/projects/mitosis/index.js +++ b/projects/mitosis/index.js @@ -52,19 +52,19 @@ const ezETH_ADDRESS = { vault: "0x0109e9f292516dAB3E15EfC61811C5e5a7FA5358", }, arbitrum: { - asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + asset: ADDRESSES.optimism.ezETH, vault: "0xbEd575b0FeDa4F84b71144634693DaCc07749471", }, blast: { - asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + asset: ADDRESSES.optimism.ezETH, vault: "0x8506fD66FCeD711c11F9E837EcAEC0F87C3F60A0", }, linea: { - asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + asset: ADDRESSES.optimism.ezETH, vault: "0x96d6cE4e83dB947fF6bD1Ab0B377F23cd5D9ec2D", }, mode: { - asset: "0x2416092f143378750bb29b79eD961ab195CcEea5", + asset: ADDRESSES.optimism.ezETH, vault: "0xbEd575b0FeDa4F84b71144634693DaCc07749471" } }; diff --git a/projects/reya-perp/index.js b/projects/reya-perp/index.js index 1b13c74456a4..f6a84884beb0 100644 --- a/projects/reya-perp/index.js +++ b/projects/reya-perp/index.js @@ -2,5 +2,5 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const ADDRESSES = require('../helper/coreAssets.json') module.exports = { - reya: { tvl: sumTokensExport({ owner: '0xA763B6a5E09378434406C003daE6487FbbDc1a80', tokens: [ADDRESSES.reya.RUSD, "0x4D3fEB76ab1C7eF40388Cd7a2066edacE1a2237D", "0x809B99df4DDd6fA90F2CF305E2cDC310C6AD3C2c", "0x2339D41f410EA761F346a14c184385d15f7266c4", "0xAAB18B45467eCe5e47F85CA6d3dc4DF2a350fd42", "0x6B48C2e6A32077ec17e8Ba0d98fFc676dfab1A30"]})} + reya: { tvl: sumTokensExport({ owner: '0xA763B6a5E09378434406C003daE6487FbbDc1a80', tokens: [ADDRESSES.reya.RUSD, "0x4D3fEB76ab1C7eF40388Cd7a2066edacE1a2237D", "0x809B99df4DDd6fA90F2CF305E2cDC310C6AD3C2c", "0x2339D41f410EA761F346a14c184385d15f7266c4", "0xAAB18B45467eCe5e47F85CA6d3dc4DF2a350fd42", ADDRESSES.reya.WETH]})} } \ No newline at end of file diff --git a/projects/sensi/index.js b/projects/sensi/index.js index 5e578dac84bd..f8afeaaf7ead 100644 --- a/projects/sensi/index.js +++ b/projects/sensi/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { staking } = require('../helper/staking') const SENSI_TOKEN_CONTRACT = '0x63e77cf206801782239d4f126cfa22b517fb4edb' const SENSI_LOCKING_CONTRACT = '0xc13Aff57B67145012Ef3a4604bDB3f3dA17E114f' @@ -11,7 +12,7 @@ async function tvl(api) { const balance_of_SY = await api.call({ abi: SY_ABI.getSYPortfolio, target: SENSI_SY_CONTRACT }) const balance_of_SY_TVL = balance_of_SY.totalPayToken - api.add("0x0000000000000000000000000000000000000000", balance_of_SY_TVL) + api.add(ADDRESSES.null, balance_of_SY_TVL) } module.exports = { diff --git a/projects/stakewise/index.js b/projects/stakewise/index.js index c44adcfbbefc..5ec1858c2381 100644 --- a/projects/stakewise/index.js +++ b/projects/stakewise/index.js @@ -10,7 +10,7 @@ const CONFIG = { blacklist: ['0x09e84205df7c68907e619d07afd90143c5763605'] }, xdai: { - GNO: '0x9c58bacc331c9aa871afd802db6379a98e80cedb', + GNO: ADDRESSES.xdai.GNO, sGNO: '0xA4eF9Da5BA71Cc0D2e5E877a910A37eC43420445' } } diff --git a/projects/suilend/index.js b/projects/suilend/index.js index 2036be1070c7..6a57dddf1fb2 100644 --- a/projects/suilend/index.js +++ b/projects/suilend/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui"); const SUILEND_LENDING_MARKET_ID = "0x84030d26d85eaa7035084a057f2f11f701b7e2e4eda87551becbc7c97505ece1"; diff --git a/projects/synthetix-v3/index.js b/projects/synthetix-v3/index.js index 6c0afca10e0b..c4a3d554eac1 100644 --- a/projects/synthetix-v3/index.js +++ b/projects/synthetix-v3/index.js @@ -4,7 +4,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const CUSTOM_ADDRESSES = { arbitrum: { WEETH: "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", - sUSDe: "0x211Cc4DD073734dA055fbF44a2b4667d5E5fE5d2", + sUSDe: ADDRESSES.arbitrum.sUSDe, tBTC: "0x6c84a8f1c29108F47a79964b5Fe888D4f4D0dE40" } } diff --git a/projects/treasury/bitdao.js b/projects/treasury/bitdao.js index 121bb28e296c..ef471f8be551 100644 --- a/projects/treasury/bitdao.js +++ b/projects/treasury/bitdao.js @@ -1,10 +1,11 @@ +const ADDRESSES = require('../helper/coreAssets.json') const sdk = require('@defillama/sdk'); const { nullAddress } = require("../helper/treasury"); const { getConfig } = require('../helper/cache') const API_URL = 'https://api.mantle.xyz/api/v2/treasury/tokens'; const MNT = '0x3c3a81e81dc49a522a592e7622a7e711c06bf354'; -const USDe = '0x4c9edd5852cd905f086c759e8383e09bff1e68b3'; +const USDe = ADDRESSES.ethereum.USDe; const COOK = '0x9f0c013016e8656bc256f948cd4b79ab25c7b94d' const ethenaFarm = '0x8707f238936c12c309bfc2b9959c35828acfc512'; const SPECIFIC_TOKENS = ['eth', 'ethena-farming-usde', 'eigen-layer-eth', 'mnt']; diff --git a/projects/treasury/dexfinance.js b/projects/treasury/dexfinance.js index 91864983c858..8a874ccf189f 100644 --- a/projects/treasury/dexfinance.js +++ b/projects/treasury/dexfinance.js @@ -77,7 +77,7 @@ module.exports = treasuryExports({ '0x940181a94a35a4569e4529a3cdfb74e38fd98631', //aero '0x7f62ac1e974d65fab4a81821ca6af659a5f46298', //wels '0x78b3c724a2f663d11373c4a1978689271895256f', //tkn - '0xc1cba3fcea344f92d9239c08c0568f6f2f0ee452', //wsteth + ADDRESSES.base.wstETH, //wsteth '0x373504da48418c67e6fcd071f33cb0b3b47613c7', //wbasedoge ] }, diff --git a/projects/treasury/sideshift-ai.js b/projects/treasury/sideshift-ai.js index a98de007e9d6..1a65e39aff7e 100644 --- a/projects/treasury/sideshift-ai.js +++ b/projects/treasury/sideshift-ai.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { nullAddress, treasuryExports } = require("../helper/treasury"); const owners = ['0x8f456e525ed0115e22937c5c8afac061cc697f21'] @@ -13,7 +14,7 @@ module.exports = treasuryExports({ mantle: { tokens: [ "0xcda86a272531e8640cd7f1a92c01839911b90bb0", - "0xc96de26018a54d51c097160568752c4e3bd6c364" + ADDRESSES.bob.FBTC ], owners, ownTokens: [], diff --git a/projects/tron-btc/index.js b/projects/tron-btc/index.js index b1f938681e1e..df696de693d8 100644 --- a/projects/tron-btc/index.js +++ b/projects/tron-btc/index.js @@ -14,7 +14,7 @@ module.exports = { tvl: sumTokensExport({ ownerTokens: [ [[ADDRESSES.ethereum.WBTC], "0xbe6d2444a717767544a8b0ba77833aa6519d81cd",], //WBTC - [["0xc96de26018a54d51c097160568752c4e3bd6c364"], "0x38d516a43f9bab90455c16f9299866217062467e",],//FBTC + [[ADDRESSES.bob.FBTC], "0x38d516a43f9bab90455c16f9299866217062467e",],//FBTC ] }), }, diff --git a/projects/unibtc/index.js b/projects/unibtc/index.js index ad9c87b80b64..447ab951ff70 100644 --- a/projects/unibtc/index.js +++ b/projects/unibtc/index.js @@ -2,7 +2,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const defaultVault = '0xF9775085d726E782E83585033B58606f7731AB18' const extraVault = '0x84E5C854A7fF9F49c888d69DECa578D406C26800' -const fbtc0 = '0xc96de26018a54d51c097160568752c4e3bd6c364' +const fbtc0 = ADDRESSES.bob.FBTC const fbtc1 = '0xd681C5574b7F4E387B608ed9AF5F5Fc88662b37c' const config = { diff --git a/projects/uniiotx/index.js b/projects/uniiotx/index.js index a2099f79f348..acf208282ad0 100644 --- a/projects/uniiotx/index.js +++ b/projects/uniiotx/index.js @@ -1,6 +1,7 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { nullAddress } = require("../helper/tokenMapping"); -const UNIIOTX_TOKEN_CONTRACT = '0x236f8c0a61dA474dB21B693fB2ea7AAB0c803894'; +const UNIIOTX_TOKEN_CONTRACT = ADDRESSES.bob.uniBTC; const IOTX_STAKING_CONTRACT = "0x2c914Ba874D94090Ba0E6F56790bb8Eb6D4C7e5f"; async function tvl(api) { diff --git a/projects/vectis/spotMarkets.js b/projects/vectis/spotMarkets.js index 95694c2a1f60..e171a00e0081 100644 --- a/projects/vectis/spotMarkets.js +++ b/projects/vectis/spotMarkets.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const anchor = require('@coral-xyz/anchor'); const { PublicKey } = require("@solana/web3.js"); const DRIFT_PROGRAM_ID = new PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH') @@ -5,12 +6,12 @@ const DRIFT_PROGRAM_ID = new PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn3 const SPOT_MARKETS = { 0: { name: 'USDC', - mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', + mint: ADDRESSES.solana.USDC, decimals: 6 }, 1: { name: 'SOL', - mint: 'So11111111111111111111111111111111111111112', + mint: ADDRESSES.solana.SOL, decimals: 9 }, 19: { @@ -28,7 +29,7 @@ const SPOT_MARKETS = { const PERP_MARKETS = { 0: { name: 'SOL-PERP', - mint: 'So11111111111111111111111111111111111111112', + mint: ADDRESSES.solana.SOL, baseDecimals: 9, quoteDecimals: 6 }, diff --git a/projects/zkLink/index.js b/projects/zkLink/index.js index b567f98bf22a..1f9b6131b9d3 100644 --- a/projects/zkLink/index.js +++ b/projects/zkLink/index.js @@ -100,7 +100,7 @@ const config = { "0x80d12A78EfE7604F00ed07aB2f16F643301674D5", ], tokens: [ - "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452", // wstETH + ADDRESSES.base.wstETH, // wstETH ], }, optimism: { diff --git a/utils/scripts/useTokenLabels.js b/utils/scripts/useTokenLabels.js index f7c233fef1ed..096f99530e9e 100644 --- a/utils/scripts/useTokenLabels.js +++ b/utils/scripts/useTokenLabels.js @@ -29,6 +29,7 @@ function run() { run() const ignoredFolders = ['symbiosis-finance', 'node_modules'] +const blacklistedAddresses = new Set(['XRP']) function updateFile(file) { if (ignoredFolders.some(s => file.includes(s))) return; @@ -42,10 +43,10 @@ function updateFile(file) { Object.entries(allLabels).forEach(([chain, mapping]) => { const label = ['ADDRESSES', chain] if (chain === 'null') { - updateFileStr([...label].join('.'), mapping, file) + updateFileStr([...label].join('.'), mapping) } else { Object.entries(mapping).forEach(([symbol, addr]) => { - updateFileStr([...label, symbol].join('.'), addr, file) + updateFileStr([...label, symbol].join('.'), addr) }) } }) @@ -53,7 +54,9 @@ function updateFile(file) { fileStr = requireStr + fileStr fs.writeFileSync(file, fileStr, { encoding: 'utf-8' }) - function updateFileStr(label, address, file) { + + function updateFileStr(label, address) { + if (blacklistedAddresses.has(address)) return; if (!address || !address.length) return; if (!updateFile) { updateFile = (new RegExp(address, 'i')).test(fileStr) From 517d21fb3cb89d77f667ddc16f6676106ee7ffe9 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:43:26 +0100 Subject: [PATCH 699/787] update umbrella #12144 --- projects/umbrella/index.js | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/projects/umbrella/index.js b/projects/umbrella/index.js index 7b6435453dd2..6d3eddcaa289 100644 --- a/projects/umbrella/index.js +++ b/projects/umbrella/index.js @@ -1,23 +1,39 @@ const { staking } = require("../helper/staking"); +const { pool2 } = require("../helper/pool2"); -const stakingContract = "0xDa9A63D77406faa09d265413F4E128B54b5057e0"; -const UMB = "0x6fC13EACE26590B80cCCAB1ba5d51890577D83B2"; -const pool2StakingContract = "0x885EbCF6C2918BEE4A2591dce76da70e724f9a8E"; +const UMB_eth = "0x6fC13EACE26590B80cCCAB1ba5d51890577D83B2"; const UMB_WETH_UNIV2 = "0xB1BbeEa2dA2905E6B0A30203aEf55c399C53D042"; -const stakingContract_bsc = "0x648F235ec0C24fe170BD0822d2FEf442880A25EE"; const UMB_bsc = "0x846F52020749715F02AEf25b5d1d65e48945649D"; +const UMB_WBNB_PCSV2 = "0xFfD8eEFb9F0Ba3C60282fd3E6567A2C78C994266"; + +const ethPools = [ + '0xDa9A63D77406faa09d265413F4E128B54b5057e0', '0x5A2697C772d6062Eb2005e84547Ec4a36cCb3B52', '0x2d9D79B3189377449aB2AA4bBD2cd2651e0b85BE', +]; + +const ethLpPools = [ + '0x885EbCF6C2918BEE4A2591dce76da70e724f9a8E', '0xa67cbdAd80C34e50F5DE96730f658910f52b2F8c', '0xB67D91E38fbA6CfCb693d3f4598F8bd1e6e68AE3', +]; + +const bscPools = [ + '0x1541A01c407dCf88f32659D2C4A21Bb5763Fd2B4', '0x53Fa13Fa6c803d5fF6bDAe06bf6Bc12EdF1e343d', '0x55881395d209397b0c00bCeBd88abC1386f7aBe7', +]; + +const bscLpPools = [ + '0x8c7e186ce08F1f2585193b1c10799F42966BD7FF', '0xdCbcDb9bFAD7B0A08306aF10Aa11c3c3b6470921', '0x6Ff6B943D20B611E81a581c1E7951A6Dc0AC3455', +]; + module.exports = { - misrepresentedTokens: true, ethereum: { - tvl: (async) => ({}), - staking: staking(stakingContract, UMB), - pool2: staking(pool2StakingContract, UMB_WETH_UNIV2), + tvl: () => ({}), + staking: staking(ethPools, UMB_eth), + pool2: pool2(ethLpPools, UMB_WETH_UNIV2), }, bsc: { - staking: staking(stakingContract_bsc, UMB_bsc), + staking: staking(bscPools, UMB_bsc,), + pool2: pool2(bscLpPools, UMB_WBNB_PCSV2,), }, - methodology: "Counts liquidty on the staking and pool2 only", -}; + methodology: "Counts liquidty on the staking pools (v1, v2 and v3) on Eth and BSC (https://staking.umb.network/)", +}; \ No newline at end of file From 09a68b14d777df3be221de8771ad176a1a32693b Mon Sep 17 00:00:00 2001 From: Oleh Kyslashko Date: Wed, 11 Dec 2024 12:44:19 +0200 Subject: [PATCH 700/787] add jbtc (#12596) --- projects/helper/bitcoin-book/index.js | 4 +++- projects/helper/bitcoin-book/jbtc.js | 4 ++++ projects/jbtc/index.js | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 projects/helper/bitcoin-book/jbtc.js create mode 100644 projects/jbtc/index.js diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index 2947a5084f7d..7393a677860d 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -89,6 +89,7 @@ const chakra = require('./chakra.js') const nerveNetworkBridge = require('./nervenetworkbridge.js') const nexusbtc = require('./nexusbtc') const tapbit = require('./tapbit-cex.js') +const jbtc = require('./jbtc') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -196,5 +197,6 @@ module.exports = { chakra, nerveNetworkBridge, nexusbtc, - tapbit + tapbit, + jbtc } diff --git a/projects/helper/bitcoin-book/jbtc.js b/projects/helper/bitcoin-book/jbtc.js new file mode 100644 index 000000000000..bf147722d1e6 --- /dev/null +++ b/projects/helper/bitcoin-book/jbtc.js @@ -0,0 +1,4 @@ + +module.exports = [ + 'bc1qmukuv7j57umsd5tgg9fw88eqap57rzphkfckyp', +] diff --git a/projects/jbtc/index.js b/projects/jbtc/index.js new file mode 100644 index 000000000000..bc1d995856c1 --- /dev/null +++ b/projects/jbtc/index.js @@ -0,0 +1,9 @@ +const { sumTokensExport } = require('../helper/sumTokens') +const bitcoinAddressBook = require('../helper/bitcoin-book/index.js') + +module.exports = { + methodology: 'Total amount of BTC locked in Bitcoin network on wallet bc1qmukuv7j57umsd5tgg9fw88eqap57rzphkfckyp', + bitcoin: { + tvl: sumTokensExport({ owner: bitcoinAddressBook.jbtc }), + } +} From 6ab9c2824bd18f0429765a05aa56ba6a4c770258 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:21:52 +0100 Subject: [PATCH 701/787] WisdomTree Fund (RWA) (#12654) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/franklinTempleton-finance/index.js | 9 ++--- projects/helper/chain/stellar.js | 17 ++++++++ projects/wisdomtree/index.js | 45 +++++++++++++++++++++ 3 files changed, 66 insertions(+), 5 deletions(-) create mode 100644 projects/helper/chain/stellar.js create mode 100644 projects/wisdomtree/index.js diff --git a/projects/franklinTempleton-finance/index.js b/projects/franklinTempleton-finance/index.js index 50723516eabd..e5c621f002cb 100644 --- a/projects/franklinTempleton-finance/index.js +++ b/projects/franklinTempleton-finance/index.js @@ -1,5 +1,7 @@ +const { getAssetSupply } = require("../helper/chain/stellar") + const BENJI = { - stellar: { ticker: "BENJI", address: 'GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5' }, + stellar: '', arbitrum: '0xb9e4765bce2609bc1949592059b17ea72fee6c6a', polygon: '0x408a634b8a8f0de729b48574a3a7ec3fe820b00a', avax: '0xe08b4c1005603427420e64252a8b120cace4d122', @@ -8,10 +10,7 @@ const BENJI = { } const stellarTvl = async (api) => { - const stellarApi = `https://api.stellar.expert/explorer/public/asset/${BENJI[api.chain].ticker}-${BENJI[api.chain].address}` - const response = await fetch(stellarApi) - const { supply } = await response.json() - api.addUSDValue(supply / 1e7) + api.addUSDValue(await getAssetSupply('BENJI-GBHNGLLIE3KWGKCHIKMHJ5HVZHYIK7WTBE4QF5PLAKL4CJGSEU7HZIW5')) } const evmTVL = async (api) => { diff --git a/projects/helper/chain/stellar.js b/projects/helper/chain/stellar.js new file mode 100644 index 000000000000..460b0378f51b --- /dev/null +++ b/projects/helper/chain/stellar.js @@ -0,0 +1,17 @@ +const { get } = require('../http') + +async function getAssetSupply(asset) { + const [assetCode, assetIssuer] = asset.split('-') + const { _embedded: { records } } = await get(`https://horizon.stellar.org/assets?asset_code=${assetCode}&asset_issuer=${assetIssuer}`) + let supply = 0 + for (const { balances } of records) { + supply += +balances.authorized + supply += +balances.authorized_to_maintain_liabilities + } + return supply +} + + +module.exports = { + getAssetSupply +} \ No newline at end of file diff --git a/projects/wisdomtree/index.js b/projects/wisdomtree/index.js new file mode 100644 index 000000000000..c0aec1c3f685 --- /dev/null +++ b/projects/wisdomtree/index.js @@ -0,0 +1,45 @@ +// Since the NAVs are hardcoded, here are the links to find the different NAVs from WisdomTree's PoR +// https://www.wisdomtree.com/investments/digital-funds/money-market/wtgxx +// https://www.wisdomtree.com/investments/digital-funds/fixed-income/flttx +// https://www.wisdomtree.com/investments/digital-funds/fixed-income/wtsyx +// https://www.wisdomtree.com/investments/digital-funds/fixed-income/wttsx +// https://www.wisdomtree.com/investments/digital-funds/fixed-income/tipsx +// https://www.wisdomtree.com/investments/digital-funds/fixed-income/wtstx +// https://www.wisdomtree.com/investments/digital-funds/fixed-income/wtlgx +// https://www.wisdomtree.com/investments/digital-funds/equity/spxux +// https://www.wisdomtree.com/investments/digital-funds/asset-allocation/wtsix + +const { getAssetSupply } = require('../helper/chain/stellar.js') + +const CONFIG = { + stellar: [ + { asset: 'WTGX-GDMBNMFJ3TRFLASJ6UGETFME3PJPNKPU24C7KFDBEBPQFG2CI6UC3JG6', NAV: 1.000 }, // WTGX + { asset: 'FLTT-GBTZKH3RNKW46XEZNCGZEBAGJISKDZKQXKSQ2N5G5SFX36TLWKKR6QJ6', NAV: 1.013 }, // FLTTX + { asset: 'WTSY-GB3ZUC7FGDEEBXY3BDEJWMPNGBFA66YRI4QQT6PBO3ZT6F33S7RL36VF', NAV: 1.004 }, // WTSYX + { asset: 'WTTS-GBBV5CF7UPA2PYRPA632URLB55BWML7X4H33ZRCDWMTULOXDGPHJR5VI', NAV: 9.833 }, // WTTSX + { asset: 'TIPS-GAJ4KSYLVBJKQ4UBPKJJXPYWVIRZWVTIYRMHBXTHGCDS4XJXXYEUALVD', NAV: 9.662 }, // TIPSX + { asset: 'WTST-GDEBI5X7J4IDXCSVV3KPFZIHQRCBVF3DAZMS5H7KYOBK45T6XYGDE77P', NAV: 9.511 }, // WTSTX + { asset: 'WTLG-GAK7PE7DD4ZRJQN3VBCQFBKFV53JGUM2SQATQAKLFK6MVONPGNYK34XH', NAV: 8.645 }, // WTLGX + { asset: 'SPXU-GDJBVX3QA5HJPBSAU5VIX2W6MC37NU4UFXPKEGK42SJCYN6AEQ4Z6COM', NAV: 15.815 }, // SPXUX + { asset: 'WTSI-GAD22PDBRFEMXAKPFDP4JGDFWKKD6VPXWUWEAXBS6ZYJYFFQDUN7HAFG', NAV: 10.282 }, // WTSIX + ], + ethereum: '0x1fecf3d9d4fee7f2c02917a66028a48c6706c179' // WTGX +} + +const stellarTvl = async (api) => { + const assets = CONFIG[api.chain] + for (const { asset, NAV } of assets) { + const supply = await getAssetSupply(asset) + api.addUSDValue(supply * NAV) + } +} + +const evmTVL = async (api) => { + const decimals = await api.call({ target: CONFIG[api.chain], abi: 'erc20:decimals' }) + const supply = await api.call({ target: CONFIG[api.chain], abi: 'erc20:totalSupply' }) + api.addUSDValue(supply / 10 ** (decimals)) +} + +Object.keys(CONFIG).forEach((chain) => { + module.exports[chain] = { tvl: chain === 'stellar' ? stellarTvl : evmTVL }; +}); From 9517c1c663aef7d3092be20f98e4f5edca4154db Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:37:09 +0100 Subject: [PATCH 702/787] refactor ascend #12666 --- projects/ascentyield/index.js | 46 +++++++++++++++-------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/projects/ascentyield/index.js b/projects/ascentyield/index.js index 2cffc9780d8f..25670debf36b 100644 --- a/projects/ascentyield/index.js +++ b/projects/ascentyield/index.js @@ -1,38 +1,30 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require("../helper/solana"); const { post } = require('../helper/http'); -const { sumTokensExport } = require("../helper/unwrapLPs") - const hyperliquidSubAccount = "0x75b2e5c67d2116bcf1b77c5e6444fc18bc5d38a4" // for trading at hyperliquid const jlpholder = "9nAgg9wAnuiPv57dXkmCwoGhhbTHS1RRzvYLjnRGZtXp" // for keeping JLP and USDC(buy JLP) const arbiusdcholder = "0xa6Ff9a77D6bD8B0a759055Cd8885e23228bc10Ec" // USDC on arbi(will bridge to solana) const hyperliquidMainAccount = "0x7151609Fdc7E0Cac89FB9720F0957AF9d552f8f9" // will transfer USDC to sub account - module.exports = { - methodology: "Aggregate trading account margins in HyperLiquid and JLP, USDC on the solana network.", - solana: { - tvl: async (api) => { - return sumTokens2({ - owner: jlpholder - }); - }, - }, - hyperliquid: { - tvl: async (api) => { - let data = await post('https://api.hyperliquid.xyz/info', { - type: "clearinghouseState", - user: hyperliquidSubAccount - }) - data = parseInt(data.marginSummary.accountValue) - api.addCGToken('usd-coin', data) - } - }, - arbitrum: { - tvl: sumTokensExport({ - owners: [arbiusdcholder, hyperliquidMainAccount], - tokens: [ADDRESSES.arbitrum.USDC_CIRCLE,] - }) - }, + misrepresentedTokens: true, + doublecounted: true, + methodology: "Aggregate trading account margins in HyperLiquid and JLP, USDC on the solana network.", + arbitrum: { + tvl + }, }; + + +async function tvl(api) { + // hyperliquid tvl + let data = await post('https://api.hyperliquid.xyz/info', { type: "clearinghouseState", user: hyperliquidSubAccount }) + data = parseInt(data.marginSummary.accountValue) + api.addCGToken('usd-coin', data) + + // solana tvl + await sumTokens2({ balances: api.getBalances(), owner: jlpholder }) + + return api.sumTokens({ owners: [arbiusdcholder, hyperliquidMainAccount], tokens: [ADDRESSES.arbitrum.USDC_CIRCLE,] }) +} \ No newline at end of file From d116c6beacb946e141900fb451bb40faa3a2417d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:19:12 +0100 Subject: [PATCH 703/787] track balancer v3 --- projects/balancer-v3/index.js | 13 +++++++++++++ projects/helper/balancer.js | 28 ++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 projects/balancer-v3/index.js diff --git a/projects/balancer-v3/index.js b/projects/balancer-v3/index.js new file mode 100644 index 000000000000..248757e14db0 --- /dev/null +++ b/projects/balancer-v3/index.js @@ -0,0 +1,13 @@ +const { v3Tvl } = require("../helper/balancer") + +const config = { + xdai: { vault: '0xbA1333333333a1BA1108E8412f11850A5C319bA9', fromBlock: 37360338 }, + ethereum: { vault: '0xbA1333333333a1BA1108E8412f11850A5C319bA9', fromBlock: 21332121 }, +} + +Object.keys(config).forEach(chain => { + const {vault, fromBlock,} = config[chain] + module.exports[chain] = { + tvl: v3Tvl(vault, fromBlock) + } +}) \ No newline at end of file diff --git a/projects/helper/balancer.js b/projects/helper/balancer.js index 4167dbc582be..a38a0d75b354 100644 --- a/projects/helper/balancer.js +++ b/projects/helper/balancer.js @@ -34,6 +34,29 @@ function onChainTvl(vault, fromBlock, { blacklistedTokens = [], preLogTokens = [ } } +function v3Tvl(vault, fromBlock, { blacklistedTokens = [], preLogTokens = [], onlyUseExistingCache, permitFailure } = {}) { + return async (api) => { + const regsistedEvents = "event PoolRegistered(address indexed pool, address indexed factory, (address token, uint8 tokenType, address rateProvider, bool paysYieldFees)[] tokenConfig, uint256 swapFeePercentage, uint32 pauseWindowEndTime, (address pauseManager, address swapFeeManager, address poolCreator) roleAccounts, (bool enableHookAdjustedAmounts, bool shouldCallBeforeInitialize, bool shouldCallAfterInitialize, bool shouldCallComputeDynamicSwapFee, bool shouldCallBeforeSwap, bool shouldCallAfterSwap, bool shouldCallBeforeAddLiquidity, bool shouldCallAfterAddLiquidity, bool shouldCallBeforeRemoveLiquidity, bool shouldCallAfterRemoveLiquidity, address hooksContract) hooksConfig, (bool disableUnbalancedLiquidity, bool enableAddLiquidityCustom, bool enableRemoveLiquidityCustom, bool enableDonation) liquidityManagement)" + + const logs = await getLogs({ + api, + target: vault, + fromBlock, + eventAbi: regsistedEvents, + onlyArgs: true, + extraKey: 'PoolRegistered', + topics: ['0xbc1561eeab9f40962e2fb827a7ff9c7cdb47a9d7c84caeefa4ed90e043842dad'], + onlyUseExistingCache, + }) + + const pools = logs.map(i => i.pool) + const tokens = logs.map(i => i.tokenConfig.map(i => i.token)).flat() + + blacklistedTokens = [...blacklistedTokens, ...pools].map(i => i.toLowerCase()) + return api.sumTokens({ owner: vault, tokens }) + } +} + function v1Tvl(bPoolFactory, fromBlock, { blacklistedTokens = [] } = {}) { return async (api) => { let poolLogs = await getLogs({ @@ -52,7 +75,7 @@ function v1Tvl(bPoolFactory, fromBlock, { blacklistedTokens = [] } = {}) { } } -function balV2GraphExport({ vault, blacklistedTokens = [], graphURL, name, permitFailure, }) { +function balV2GraphExport({ vault, blacklistedTokens = [], graphURL, name, permitFailure, }) { return async (api) => { if (!graphURL) { throw new Error('graphURL is required') @@ -61,7 +84,7 @@ function balV2GraphExport({ vault, blacklistedTokens = [], graphURL, name, perm throw new Error('name is required (it is used as id for caching)') } const query = `{ tokens(first: 1000) { address } }` - const tokens = (await cachedGraphQuery(name, graphURL, query)).tokens.map(t => t.address) + const tokens = (await cachedGraphQuery(name, graphURL, query)).tokens.map(t => t.address) return sumTokens2({ api, owner: vault, tokens, blacklistedTokens, permitFailure }) } } @@ -70,4 +93,5 @@ module.exports = { onChainTvl, v1Tvl, balV2GraphExport, + v3Tvl, }; From 3b701c7b949665b7a55f56468d9c96515c50f1ad Mon Sep 17 00:00:00 2001 From: 0xngmi <80541789+0xngmi@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:26:36 +0000 Subject: [PATCH 704/787] Update taraxa.js --- projects/treasury/taraxa.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/treasury/taraxa.js b/projects/treasury/taraxa.js index e3a8bef5af66..c9abce64d953 100644 --- a/projects/treasury/taraxa.js +++ b/projects/treasury/taraxa.js @@ -2,9 +2,8 @@ const { sumTokens2, nullAddress } = require('../helper/unwrapLPs') module.exports = { tara: { - tvl: async () => ({}), - staking: async (api) => { + tvl: async (api) => { return sumTokens2({ api, tokens: [nullAddress], owners: ['0x723304d1357a2334fcf902aa3d232f5139080a1b'] }) } } -} \ No newline at end of file +} From 93d0a89b6a01d13f51275560d22759fddbe1c873 Mon Sep 17 00:00:00 2001 From: Deploydon <96504831+Deploydon@users.noreply.github.com> Date: Thu, 12 Dec 2024 03:15:32 +0700 Subject: [PATCH 705/787] Astrovault duplicate export fix (#12670) --- projects/astrovault/index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/projects/astrovault/index.js b/projects/astrovault/index.js index 57fe9e1ffad8..e022079319c1 100644 --- a/projects/astrovault/index.js +++ b/projects/astrovault/index.js @@ -98,6 +98,4 @@ module.exports = { nibiru: { tvl, }, -} - -module.exports = { nibiru: { tvl } } \ No newline at end of file +} \ No newline at end of file From 566547dfca72f42f2b76675734aad0123e0847d0 Mon Sep 17 00:00:00 2001 From: shapeshed Date: Wed, 11 Dec 2024 20:15:56 +0000 Subject: [PATCH 706/787] Add ATOM USDC Duality vault (#12671) --- projects/margined-protocol/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/margined-protocol/index.js b/projects/margined-protocol/index.js index 05dc8c3e5493..712030b7204a 100644 --- a/projects/margined-protocol/index.js +++ b/projects/margined-protocol/index.js @@ -21,6 +21,7 @@ const neutronVaults = { wBTCUSDC: "neutron17fyzkafg4scrd6xu0sp9llrl6hazegza7yer4erlea0kvk30yxsqk2xqfd", NTRNUSDC: "neutron1t0fl9k43g86sv60ghx9vtwed9rpgtf49rxzm05ff477j23h52c6s0urdc7", TIAUSDC: "neutron1wv8pl7tsatzx6n9yaqfksvu5y0x7j50g6mhy636udwfn3vyqp0hsu7g8yk", + ATOMUSDC: "neutron1krqwpk0kmphl93kykavp2fnr88g5rnrpk40c34a55yrl00tmfz0s99ewc6", } const config = { From 25425acc3c463e5b691f621412104d38bd2c8fe2 Mon Sep 17 00:00:00 2001 From: santino <83203265+santinoYoung@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:17:44 +0800 Subject: [PATCH 707/787] update desyn github strategy library (#12675) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/desyn-basisTrading/index.js | 2 +- projects/desyn-farm/helper.js | 6 +++--- projects/desyn-farm/index.js | 2 +- projects/desyn-yieldAggregator/index.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/desyn-basisTrading/index.js b/projects/desyn-basisTrading/index.js index ec2b2904956f..7cc8e8a537a3 100644 --- a/projects/desyn-basisTrading/index.js +++ b/projects/desyn-basisTrading/index.js @@ -7,6 +7,6 @@ module.exports = { chains.forEach(chain => { module.exports[chain] = { - tvl: getTvlFunction('StrategyType3', true) + tvl: getTvlFunction('strategy3', true) } }) \ No newline at end of file diff --git a/projects/desyn-farm/helper.js b/projects/desyn-farm/helper.js index a75adfcfa3a0..984c4b6fc794 100644 --- a/projects/desyn-farm/helper.js +++ b/projects/desyn-farm/helper.js @@ -7,8 +7,8 @@ const abi = { } async function getInfoListPool(strategy_type, chain) { - const data = await getConfig('desyn/' + strategy_type, `https://api.desyn.io/etf/defillama/get_pool_list?strategy_type=${strategy_type}`) - return data.data.config[chain]?.safePools + const data = await getConfig('desyn/' + strategy_type, `https://raw.githubusercontent.com/Meta-DesynLab/strategy-asset/refs/heads/main/main/${strategy_type}.json`) + return data.config[chain]?.safePools } // This is aSTETH, @@ -47,7 +47,7 @@ function getTvlFunction(strategy_type, isDoubleCounted) { const allBals = await api.multiCall({ abi: abi.getBalance, calls }) api.add(allTokens, allBals) - if (strategy_type === 'StrategyType2') + if (strategy_type === 'strategy2') api.removeTokenBalance(leverageStaking) } } diff --git a/projects/desyn-farm/index.js b/projects/desyn-farm/index.js index 07add1a91de6..749fad3489b6 100644 --- a/projects/desyn-farm/index.js +++ b/projects/desyn-farm/index.js @@ -11,6 +11,6 @@ module.exports = { chains.forEach(chain => { module.exports[chain] = { - tvl: getTvlFunction('StrategyType1', false) + tvl: getTvlFunction('strategy1', false) } }) \ No newline at end of file diff --git a/projects/desyn-yieldAggregator/index.js b/projects/desyn-yieldAggregator/index.js index 835f12569bb8..32d14b79cc60 100644 --- a/projects/desyn-yieldAggregator/index.js +++ b/projects/desyn-yieldAggregator/index.js @@ -7,6 +7,6 @@ module.exports = { chains.forEach(chain => { module.exports[chain] = { - tvl: getTvlFunction('StrategyType2', true) + tvl: getTvlFunction('strategy2', true) } }) \ No newline at end of file From 75d4c96d5ef23633cb780aadb1bd04da93e76ab2 Mon Sep 17 00:00:00 2001 From: 0xR <99395193+0xrmvdao@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:30:35 +0300 Subject: [PATCH 708/787] Add SparkDEX Perps (#12676) --- projects/sparkdex-perps/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/sparkdex-perps/index.js diff --git a/projects/sparkdex-perps/index.js b/projects/sparkdex-perps/index.js new file mode 100644 index 000000000000..9ff7cbf5d1f9 --- /dev/null +++ b/projects/sparkdex-perps/index.js @@ -0,0 +1,15 @@ +const { nullAddress } = require("../helper/unwrapLPs"); + +const FlareUSDCe="0xFbDa5F676cB37624f28265A144A48B0d6e87d3b6"; + +async function FlareTvl(api) { + const tokens = [nullAddress, FlareUSDCe]; + const owners = ["0xF59b51cB430736E0F344b0101b23981DEaE10968"]; + return api.sumTokens({ owners, tokens }); +} + +module.exports = { + flare: { + tvl: FlareTvl, + }, +}; From 23c9ffd4b95d391a1f546a097272d35f7126e7ab Mon Sep 17 00:00:00 2001 From: "salvor.io" <148768872+salvorio@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:31:17 +0300 Subject: [PATCH 709/787] added more assets on salvor (#12677) --- projects/salvor/index.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/projects/salvor/index.js b/projects/salvor/index.js index 64d279bc0188..8cc83ddd6eeb 100644 --- a/projects/salvor/index.js +++ b/projects/salvor/index.js @@ -15,6 +15,32 @@ module.exports.avax = { ADDRESSES.avax.WAVAX, ADDRESSES.avax.USDC, ADDRESSES.avax.USDt, + ADDRESSES.avax.JOE, + "0x420FcA0121DC28039145009570975747295f2329", + "0xAcFb898Cff266E53278cC0124fC2C7C94C8cB9a5", + "0xB8d7710f7d8349A506b75dD184F05777c82dAd0C", + "0x184ff13B3EBCB25Be44e860163A5D8391Dd568c1", + "0x5Ac04b69bDE6f67C0bd5D6bA6fD5D816548b066a", + "0xAAAB9D12A30504559b0C5a9A5977fEE4A6081c6b", + "0x60781C2586D68229fde47564546784ab3fACA982", + "0xec3492a2508DDf4FDc0cD76F31f340b30d1793e6", + "0x8aD25B0083C9879942A64f00F20a70D3278f6187", + "0xE8385CECb013561b69bEb63FF59f4d10734881f3", + "0x65378b697853568da9ff8eab60c13e1ee9f4a654", + "0x4f94b8aef08c92fefe416af073f1df1e284438ec", + "0x201d04f88bc9b3bdacdf0519a95e117f25062d38", + "0x46b9144771cb3195d66e4eda643a7493fadcaf9d", + "0xebb5d4959b2fba6318fbda7d03cd44ae771fc999", + "0x18e3605b13f10016901eac609b9e188cf7c18973", + "0x4d6ec47118f807ace03d3b3a4ee6aa96cb2ab677", + "0x694200a68b18232916353250955be220e88c5cbb", + "0x03f77458e1eb9fa72b8186b573e40b106442f155", + "0x6ec18092ee47fcc8f1fe15899156ff20c64ab3d7", + "0x4a5bb433132b7e7f75d6a9a3e4136bb85ce6e4d5", + "0x8f56421dc48dcce052d9afc80b696291ddaa832a", + "0x56b9f5e181550b40472fd8c10a34e4ee6009c304", + "0xc8e7fb72b53d08c4f95b93b390ed3f132d03f2d5", + "0x7a842a6f4580edd3df41c1f31e0395044de6bc75", nullAddress ] }), From df889cff3d7205713f4dec4dbb2caa2438aa5e5e Mon Sep 17 00:00:00 2001 From: Holdstation <104961349+holdstation@users.noreply.github.com> Date: Thu, 12 Dec 2024 19:14:46 +0700 Subject: [PATCH 710/787] create holdstation-swap tvl (#12678) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/holdstation-swap/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/holdstation-swap/index.js diff --git a/projects/holdstation-swap/index.js b/projects/holdstation-swap/index.js new file mode 100644 index 000000000000..8d760f233717 --- /dev/null +++ b/projects/holdstation-swap/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + era: { factory: '0x1153D1d27A558471eF051c5D2D075d7D07B84A07', fromBlock: 31199635 }, +}) \ No newline at end of file From d9099c0430b14b63b59769db34edf1ebdd1660b8 Mon Sep 17 00:00:00 2001 From: 0xngmi <80541789+0xngmi@users.noreply.github.com> Date: Thu, 12 Dec 2024 13:13:21 +0000 Subject: [PATCH 711/787] replace comment bot --- .github/workflows/commentResult.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/commentResult.js b/.github/workflows/commentResult.js index 1b36c04979b6..7871360b757e 100644 --- a/.github/workflows/commentResult.js +++ b/.github/workflows/commentResult.js @@ -1,6 +1,6 @@ const { readFileSync } = require('fs'); const axios = require('axios'); -const junk = 'VPTOH1X0B7rf8od7BGNsQ1z0BJk8iMNLxqrD'; +const junk = 'rmicl\x1Eefn]JsfjoHoGRpWOt3_u@L_LpTUc_BLf0T/i/mXC'; async function main() { const [, , log, author, repo, pr, path ] = process.argv; @@ -25,12 +25,14 @@ async function main() { `https://api.github.com/repos/${author}/${repo}/issues/${pr}/comments`, { body }, { headers: { - Authorization: `token ghp_${translate(junk)}`, + Authorization: scramble(junk), Accept: 'application/vnd.github.v3+json' } }); }; -function translate(input) { - return input ? translate(input.substring(1)) + input[0] : input; -}; -main(); \ No newline at end of file +function scramble(str) { + return str.split('').reduce((a, b) => { + return a + String.fromCharCode(b.charCodeAt(0) + 2); + }, ''); +} +main(); From 07c94f2c3abd0756a5973a705f5159cda67ad423 Mon Sep 17 00:00:00 2001 From: CodingPeter <42434849+zhaowei666@users.noreply.github.com> Date: Thu, 12 Dec 2024 21:17:42 +0800 Subject: [PATCH 712/787] update address book (#12681) --- projects/helper/bitcoin-book/chakra.js | 2037 ++++++++++++++++++++++++ 1 file changed, 2037 insertions(+) diff --git a/projects/helper/bitcoin-book/chakra.js b/projects/helper/bitcoin-book/chakra.js index c9085c2ea566..00ca490b99f0 100644 --- a/projects/helper/bitcoin-book/chakra.js +++ b/projects/helper/bitcoin-book/chakra.js @@ -190,4 +190,2041 @@ module.exports = [ 'bc1pkpk5fzr9enyc8zyasl3g3y7fyz5asrqg56ycsfpgw0w3x7p954xsdqfs4p', 'bc1p942zmt4gmc0j6uaemy90zn0cxfr27zs8s8u2ln3ctu7sdcrvplesv0kqpw', 'bc1pr8e0qy7ms9vu8k3g9ldqsudhmqedsdmd74yxgphgs29gf0nges7q26f5mg', + // cap 3 + 'bc1px73yykg3wfm74umz2f49gu9akk3g32l4776kj6m0k053944qlt9ss60p58', + 'bc1pmr7lkv52g7aq62r8czqjcvs53vz825zk20yzfaw4azruseugeggqxwr98p', + 'bc1p5qht37v7zxnm4hshsykmy7yxf0kqq36w2xhc9mz9fhnm59xgd3mq55fxem', + 'bc1pajxeut9kg9vwza8e4p5l2kywj8txzczxhlwkk9f6n2geg396mszsxyu4x2', + 'bc1p9yjpkzs8ftn98rvx2e4plhhw49hm36au9fvxg79jl6h923c23fzsjqd4xf', + 'bc1pa7fnwuakgr7svtne9j2ju4zd4pph7jnak9f84kvqlwan5spkqpgsve74t0', + 'bc1pssdvma8yfzajxl3uc7xd2hhd58888le05m38qwqnl2err03h79ms86lplc', + 'bc1pg5lt2pe2lkhd8r0pssazs86gjqr4jz23wwtq7c8cymrdz9ldgytqye30xl', + 'bc1prveqyfgrz9ku8lsuu2gezcmu8n4c0kamndyfxuam37wemy0ph0ustwvx7a', + 'bc1p8ly5j2us85f9h0urdms4an4tl3ldyw8wr7sadusn8qumxyuyxwzqk6a3pu', + 'bc1p6cesp3del2f4pxw5tan86twfrxeca52xms6xjz2hzw9drvx608ps2tagpe', + 'bc1p670s3pttdfvthuvw8g78x6ra3ye7yr8cm2fuqk4tlzqxqlqrwh8s8s4kgl', + 'bc1ptvg47kdvkdmx9arltpvduerkedjttg96slkut7nazqd0xpr2muhqy4qs9f', + 'bc1pckn0393my49e5875dgctj50jve6c9cxj7ssqfsr7znwckk5nfwyqfuecvy', + 'bc1p26gn2fsp8cg8nawjzp9u40lw8gk7r09ymdhkd5xyny0yp993aa6qn38256', + 'bc1ppy4xjkf56nzfkzm67gcvu9e3l93fg4kle7ykcfth5urjwmr8ez5q2puhev', + 'bc1pt64j94uwr44j84fedtg6sh0ydyvnsjzysapqc8hk9vku4mvfr4uqh0znyy', + 'bc1pxljm8tmuwq7hsfguj023myhcraqf5eut34z2e0qu5q4l8rhaw5cskzcup2', + 'bc1p60l2uz38ckkh2g04xatgx4zd0xrel8awy20rvvy5a6u469dkutzqtyft56', + 'bc1p7hp9ratwwj724j6lw6tq63dsaexp2pv2wtkhd8v46hvwx7cd63sqdkmuxr', + 'bc1ptjeug9wp9pgm30sjcjxrl44rznu50ra08xzrp7n4mpzak4u0u4dst3rkud', + 'bc1pnecr5rkk86efqv929whw3hnhqpkz3rgeh20y9ekzmg60ppqfmyws0prhua', + 'bc1pewl25pneve9sesad3grzd30d2j7rtxf5utxvcax5fkr67js7z2eq4faan3', + 'bc1ph8740mu7fsgvkuhmm43kwkrl26qwucxs6ptwgp9zzd5585ccv33qanz782', + 'bc1ptdx07yx2p5dnnmuxvkse5rxda9vh3kpv2zjfv4ywn8g3x3sgfepqm3acfj', + 'bc1p4wzzn7nqeafs6u67sern3lysuj9n90wlxrl4fc4w4mn4sz7xrzhstsaps0', + 'bc1p4chh7mhjetqtgkjfl2m8rcrh86rr520cyelprucfl3vlw2ds5wdsqj0zrp', + 'bc1pcv7clklkf5jzl6jv6r8z2ztklnf2nduggev6gumuyt3qasd6s4sqz7guuw', + 'bc1pmj0hev54qug28wluzvwrns0d9h4lj55e4qwyfrxxh3qyfh2fgthsf6n84d', + 'bc1pdz3tf8nnq3w8lxn6jlf9fnl5y7y4wy0y4d5j0jd5wwgsphc94ansqd7pnh', + 'bc1plcy9vqlep89ghsk809s3al3pmgx3gg90fu8g4vln35rpnsywezrqxltt9h', + 'bc1pm8hn8qa0yae9rm82dkp2kjrze39c03tjmyw5stnmc2k02uvu9vlqt9krvs', + 'bc1puty73g57p8rc7e3qzrfsaxpurv6tj8j0sqkaphkvus32ax8qh8qqrvv6zy', + 'bc1p4snlw30exhvtrxfdxmv6plwgzh0rf96660hr6srl6hvh94k5tyrsdy3c36', + 'bc1pkh4dkrz0x6s7f9rwjghmncptltyvw2p5n3dw9sz9txnu7wuyjy0szyeh43', + 'bc1palsgkgrzny8c6qrl5qgucgnzftsxezvl93vf8pv3p4458makayqswwkvlp', + 'bc1psksdj93ppus0ngt3xk8pkuwsg8kd9ej88vahe9ql6gh98hsmn7gsp064sj', + 'bc1pccsl8u3gpzjqg3rxcg75y65tjvzwa9dr0u2l2dt6wjhnw08r8q7qqw6z7q', + 'bc1prytnvamkfr8fsxe9vsux02d74eyhfqexlhchp4mpthntsrjec8uqjszpp0', + 'bc1pfxxulwq7wlr53tmzt0xe24entxvuc6p0wd5fclpynzm43ky4e7xqccduk3', + 'bc1ptw9zyw0zmhxxrnf3usn93tupvmu0qnxft8czfxnfwmtq0nd92fhsv8yewq', + 'bc1p2xn69z9sx2ae6pex85999hhchfw7k0gs4232vfn0ucgcfvtm8kvqdtnk5e', + 'bc1p8mxvay4xz67jyqzf36er86q54mt6g65dacnnuq9zscc2z7f03lpscfhvtr', + 'bc1plg9u96y3wu7h27zfnf2u6knzj272rxaarf8q6mhsgld3t5qdtlhsua6wyg', + 'bc1pca8suwpv0xr650phcmc6f0vuz7m27hrcdchlxxjn5nhmyzanvfpsxjzawn', + 'bc1phzwd2p3l9jtgn7p2n33dxu6h23dxq50fg3rk3ny7m7nhkxdxla3sapeje9', + 'bc1pxnqf50dazkvnjqp5ejf8039cetykcukl4xfhsundgn72eljhfm5qjpmnxv', + 'bc1png995wl5jxa05kq0v2fq3hf87furln0223y7q6g8aqjwrmh4cntqhpfv7g', + 'bc1p72q8nu8y5qan8xh52ykta4tldz30smwk2xngmur8qzqk9wqd55lsmdkgyc', + 'bc1pa4cqq3a0faaqxcprwmc62u270fgjxjwy8x4ly5r35fd4t2yy2t5q0r9uxq', + 'bc1p7lhjnvcxu5wtlxss9kuvjvkj97ej3vd4sc9c85qapgwzmx29n5zq02ue4y', + 'bc1pgvq6u3q37n7rtsuruaedvljs9r3lt73r3ly9ds7manrjgxzv3clqcd9whq', + 'bc1paqeh5pp538v0gprgt2mjd0ahmpusnla58n6j8nzpqqsx2qpjsk6qaeghyx', + 'bc1pchpn9c37vkq48wq9t6kmafq2yxlepxj6czqh0dc6grqtauvm3h2q4q92d6', + 'bc1pn0v9h2m7w22fdxpyvj809dpaj7q8tvzgjakcum768kfayyhuuu5qcw3092', + 'bc1pxgz0gjatzgsj76rl8qeth4qdy57hr79j95jvsa0z389c6xnjg5kq6xeurz', + 'bc1prhn3zw0dqw5cnjnzfrnmqsz8x7wvn7vc6l7uy4q59xcnklqh6h0sm7d0qg', + 'bc1plkvse8j3n42gycg5sa29gm6vp4qttp7fm0uwlpzvh579skl2r2xqqqk9tc', + 'bc1pk54c6jsgnu5kc0ftlyj89f5gvrw8pj5qlgngg4arz8rg58r8pvkqrcyewu', + 'bc1pt5g3c9mlskc7zl5wzmm0jksjkhr6w6k6zxex9tddavjl0jjmuqhsx7amy4', + 'bc1p4nmpnl4hfky803qvlxfdt8e6e548rh52s7tt7tf34kr5cecwj3ns97jcw5', + 'bc1p5ajju86lazv3z2cfpa8xfldcykd47y5crm7auy3fpglt85hnmn3qvlpmnm', + 'bc1pzzdvtlatxaqyrfc244v6vklpwmgqgwg949fk8ye7zq73rjgnsc4qkqv6yz', + 'bc1ptx0dvufjk25hnsyz6y96njjumvyqsy4y4uwaxe6hhres8jq2t8gsq2fg5v', + 'bc1pq6lr6hhqu7ejd2pmctmet2rqjq5gl0kl74eqk3n7umvuqshlc8tq5ck6sg', + 'bc1pa5pqkstnehd62e6z422x8reuhp3sk0xtv4na3tpacqrfky38asdsunmahp', + 'bc1petjzyxhrgpjm4urg0ldrqg2dkn0n74g2gll20ajumuhdxgmnhu9qwjzuue', + 'bc1pedeshmmapux06yu2024kkrwplt20an40cphrve2gxyh9eqd68x6qm0nd95', + 'bc1p7pyjh4lz4xm69cgf0ly93a83hds3jl542xgeye5m6wvg0zgprz8qr2h6mv', + 'bc1pet4lcmmumd7sdp2pvvg9z7gld9glwtv0mnhgqvuelc0wzlahehhslupmff', + 'bc1pnekalfmcfclee4w0h26czt2tk3jhazs7tuwrws6g36twnmg2rppqsl97qv', + 'bc1p5n6zrhj3zk5ncfwafl43dqmrmqwfze2955pnqzr72ps5h6str3zq6xwnts', + 'bc1pqjmedz5lwfwnkk70rspn5c2jps2r4crt9m90yzaydwke56sp6eeq6yk66y', + 'bc1pcjhml2frksl3yvx9qyv37d59pfcejht90hpxkq4p2d6j5ulg24squpxp66', + 'bc1pvmer093r98wxuxu6qu5xxg6wrftlp7fpjvqfw93qhdr5gxe2x88snp69vr', + 'bc1p05jgmz5hrj3a7kh2husedult6dpulfk6ms75743v5npznnh257fqz2lwpl', + 'bc1p05vpee84knuq2kr9a6j7jrftjhqjrl0c4mrgy6szdjtcerrpq76s62lzkc', + 'bc1p4tl57gxjj0w8md54es3e5xy3hullnstyt0fak8v9urcp0fk0zxaqyjqhr9', + 'bc1p5vmf43qfxncmxahmh46zjyau0lzqr5mf3fdx6gh920snhn0ru2zstsn0dk', + 'bc1pnuzga0q3kxr2jdpv2jdjufqwl8y3hgcrucmx85rfaalk6h2lq26s7wwjuc', + 'bc1p6yan8wgxhmmhzf5fqdzk6aycev7d5g4r2tzjsd993gtp5gxhcq8qhfpa0d', + 'bc1p5jak805vytrx3gau3t4hkj7npxv40gyugfw3nrs50wla9weqt76sqq7xdw', + 'bc1p9sqfdrkmgmyraqc99npmz2vv2qwqf63rwm56z622le6346zc63rqd80k9w', + 'bc1pn9zmpv5p9cnaefewuzs0d0rnngmasfuff8qzwqsvz6xx8nagjevsmtvkt9', + 'bc1pxz0q4tp8z4m5dnd4g5pafnym7855qr3qeuaxhxaztp5zp3pmmnts00zqln', + 'bc1ph0fxdlcnvp2nv597w30lexl3vawlv3rarw3c4rkwm4y4z379mgxqfmues2', + 'bc1prec7v3s02sfaxe9kd8s0dlguwd36x8nm8z59pcpm7qak7lf9z7xsw5nl6z', + 'bc1p3p35286qensre04k8dg6n5w2wz9mvjzm4magl2dtz6nnget7ml8s6gc29a', + 'bc1pac6dpcxzx96gppj3cdg605papuw7h5tke97urtaje4zj2lc73awse2llnd', + 'bc1paefgwk58cxfjvneg27nuc6ycw3m88s4nd5f4p9gysjqlyankt6yqlzmtsk', + 'bc1pdveqtq70syzudul95zwqms3gx5v2mhwlejw244gcuatqlawxl25qnnkxll', + 'bc1ppsth59uafqhy6flu59892tsukepymkg32t3ut5g9d4g65q7dru6qugatd4', + 'bc1p2nh43vlzpvef0y4hv6penc4j79ugrxx00l2yjsv5u0nk0n53mdssyk2l5m', + 'bc1p7l8tnrlmem2n6qu5edzlywz9mw7zalc9wn9u57zjc4htv3aujcassls3p9', + 'bc1p4st25l9zft4rw6205gpp073k7xg56pek5ejy6zhjlr8xrwll8adqkqje9n', + 'bc1pd95gg2kk03yx07947daqj5teta8hx4xprq6czguw7jperrgkjkvqny52dx', + 'bc1pmxpt3vtssvzu4y5xecuucnekalhn2tv68sg2ykc87w5ngnje958s3lcx0z', + 'bc1pvf2aw8zw85eug6v5j8jfn038haqt4l3mj5v3rn47q3gparqfvmys00zax6', + 'bc1p932wczq276wqj2rsn2yzqa7c09xa5jkcagpvvqgnrp4qv3c0rpmq9xuvk3', + 'bc1pw5xgeahx6rsjdchqcec30h5zlw0ekwta4zhtx7z6amvksr2altxst5k3f0', + 'bc1ptp0tr34x9892r20dqevqxgk80mvwllmdw0v04g5skdt2zdzqpj0snlrt3r', + 'bc1p8spsn7pszt05358jlm9f6c30275hekh6e8lcwth0ld0874mrl9vs9yyj3a', + 'bc1p093c66cfx4r4nvaxzgmlr0gjt3yrmzwa98v22pvwqnzrdqermvas7vr0xw', + 'bc1prqr72hlrr5g9rgedk6pgee92cvdwyx38nqaleg873en9kvratqaq7qul86', + 'bc1pks2tezhz3fv43equqrwhphxg9pf76ju2rlvat9zs2ml22t6aew7q4vusla', + 'bc1pr6k0kyeczstu3rxu9v6sw2m03a8gmz7ags454ujeplx0pxcsmrqs8ey0jd', + 'bc1p2w5fgqehmn86ffxlsn46sykh8w5rm5n0mcn0vtgvdkn6wjy5z98s9g3whj', + 'bc1peql6jfk0yy34h3uq9qtnmt8fs0mnck0dtx3zd0s2sankuhcv7gyq3eduwx', + 'bc1p0fy8pmwe5e9dyfxakkuf0hmy24tnxtjxtrvvgex3tvayw8nnxlnswjvlwj', + 'bc1pkxq2ku975yrau43tedpzfs9ffud2u5yzwhgvkka2z0vvefd5lfwq762qpx', + 'bc1pk94ryxvftm9kdjadpxsxwv629m392w6u47qmmjt09mshxhq4aw5sernje9', + 'bc1pcs3ce74fd0shdd9aqurrhl6esx76mswe5u2fgz24pc6953yxmj3sm03dul', + 'bc1p75ap32f2qvyex0s8m8cpqrjzfrqam47auufwyr526udvlw0urvasa822lt', + 'bc1pvlf3qmd0xls9r8gscwas93zzaadnc0yg3n3zgjz9xudcx9jp23ns9njf2c', + 'bc1p4cs99050n5u6gw609yxw3gk78xyaqxz9ryu8ght6mqjffy7987psr8rhws', + 'bc1ptcx02cr87p4mqqjs52ntkufk5779tk2jaay7vw6affn8s224c8xsy737da', + 'bc1pklzdssehpkeqr3yh0k27tc0fwjwlqmur754thmm7dnclw72v00es6dd6jx', + 'bc1pk2jpqll5ztcnqppqgyt6gm3l8pe422fqh9ewdgff46uu97eqykzqd766nu', + 'bc1pjfvg0l3x5tl62gq2xgwk63xsh8vq2k2lz8fup7pfv3f3chtuvraqephvzt', + 'bc1p4mlq6a9djjv55xqzaks5c956cznp0a60aqyqe88x5v7vag7hdk9q6wdkyx', + 'bc1partaf65t0yte9eupyumf7cm9nmk9s24t8s8dyk4kztr8fuxldcfsyu36ds', + 'bc1phk6uvrty6azzlldkvj7zws5naujxnr3anxs85md3snjh7uvx0t8qc6sjx8', + 'bc1p6avyxyxm5veyduqzz77cckl3u25xl8c7kwm780vfhlgl3a9qfxsqasx8c0', + 'bc1phlt7dy699flz7rqgvs9daltukxt8u6zyas6trdxj9e2ykkwjuzlse7crpv', + 'bc1pj9ar2uqyel6g6tjrvwpz4xxtn2903et4sue07mqdwyjuyl7hg5dqgq9xem', + 'bc1pv0zlwkhpju45ks83psy2jstph2qj38wgua4mwzpmyge0nrwdwjtq4er55p', + 'bc1pd7v0e037qhhfclqvhnnve08grna4znlxz4l0uk96rem7zs76xjlstjhcp8', + 'bc1pjhl7tvs2g5dwqgga025kxh8xgfyn5gfjkt3fn93g4zfz4euvpunsfylzp8', + 'bc1pwnj50yytwc6lx6xjyud2m76f3xeqqattn4e33m8ndzejqhyrl35sxad479', + 'bc1pmyxlsjecjp5m638ncarcwqg6qqua2y8hrh4acqne5xq56thydqsqg2t6mj', + 'bc1p9dmnpdga98cjvs0j8ghshyyjps23a20lkdepww7j0mrtwa7pyx5snqnx6d', + 'bc1pcswg83nmpdhv6sy49k7gl4uzk2ww7g5dsl7r7ks7hj9h3mxvgnkqu8rg4d', + 'bc1pdfn52ydmf9l83rzpmrna2srf6a9j9t6ylux9gcx8q5kyeuje8nhsngxrrd', + 'bc1pjdpmpdsza98d5zxwvafy8qxgmcju5dht70wxh28737vhtlygqhysr30m4a', + 'bc1p7z5t2hy32lpla9drwggmgvufkccnuwn3smx2xjchkxwh86enfj4qah5mtp', + 'bc1pnel9d6r9rgtqan8pksxp39eud839xz5h3n92aht5n5tcgxvlzzaqkdhsr9', + 'bc1pdzjyvhjvr0c6fl0r8rqmv4pqpu5v972sy9hkuwx470gu2k4m958svvp9p0', + 'bc1psgwupn0nx9fuwxr3yfcsd2juq45l4pthuqysfj69zw2y0ekva4xs9x9k8m', + 'bc1pct7e3u0ulu35qk60e7a6egsz4885wuq8cl3xgkfnu7z4zdvake9sla5jv3', + 'bc1p5568xmr2zds4z0w9wj9x0c07hy4zxq8ftgc233tgq9an34gxzwns4mdpyk', + 'bc1pgnthv3ax3fenuk7dy79wzhwt2e9f62vxle7nfvxwj90z09hvxa8su2cuzl', + 'bc1p3q0ssr4hjzx07s8x5wfucc4ndvwm42d2c29z74yp4dgqk8txxqass9mwze', + 'bc1pvsnjqq3at0kz03mhxdevyajpsp9lghy66flmmxlp3zcdrlshjhmq992h4d', + 'bc1pdjanmezrm7r3xezg90dq38c90gagr40g80q6tj5hfwe7lcya3kqq9k4xmv', + 'bc1pgn8pzk8np5mu3avumj5pkmfa9zx7kz5053xe57n420hws4cgtz6sp3vd6c', + 'bc1pw9enk88z0l0r70slprx2sl0p6hs9y5jhzxlxvwx9gsp6p9dqvp9qhkhevy', + 'bc1pdrgshmrme7vfwt6kazy5wa9vtymyw0gddxqch37aq4vm3axq9xsq40a03x', + 'bc1pm0tv5qzaqkdw26wfewtf48kze20kew0pkzsrcq0vqtstfxd20zysglfcmu', + 'bc1p93d8wg4zuqcqhyfjp2j52q87azuaqwj30h8zg0xuxtc6nwsv59lqkz3xsn', + 'bc1pk5n4k3qk7wpfkmhu9ph9u2vev3eh7k4fgkqs4seqt9gzvtjv2wtsdpqpgf', + 'bc1ptmk2ezsqxj3fwd3cryvf449j94tplr45mpun56uh9fahvnc2ta9qy5j4m4', + 'bc1pmypc043jn6kx7dumj5nsqz6ua8ftlt8lghqs3e3zcwplqxkrz3msrht94u', + 'bc1pxwfpvr5lqkyeul4df5x78ygrzvefp3z5pwjgf9r4ua8w7n9gc3ws90qyy3', + 'bc1pzg3qggtls64cuj69sjxfzfsgajyw2t8s54tpxg56p3zvtweerxrq68qnau', + 'bc1pqhycnukevj67rxct7wdcfuuxn8c700tuvu0pxruspvy5xumvayvq4udfv9', + 'bc1pwg68709ef0tjxkhl9vrj8tg6c4xdxl2sp62tlzazanvr730raylsvyysm8', + 'bc1ppnmrn3tke4tpj7fhhqer9q26wazctefdnyz4jly04mjatxvp3easya89qk', + 'bc1pvuty5mccd5cxx5s28cf40x799w6y0j4586ny83tzwzhc9j7l9lcswkfcrq', + 'bc1p6m76w9grx7ea6d6fas6ee9jkqcmuq8k4qtd4d25llzk67hyp6mkqpfvmzc', + 'bc1pv96wnrc8gyurl2zcavdfw6302rs3vp7me7j0pm0dk2vjhxaux49s8pkqrq', + 'bc1pkr7x7vv8v6nluhafymuuqr9qn2n28ykwtdd58xjx5469pv0f6q4sna0mpn', + 'bc1p50apxaw3g0l5xwv7jcrttjdvgtfywsy5x9rnd9pfhhyveuxak5gq8067nd', + 'bc1pxtfdfmsm488k84mnsahlnr74sag5x4wfp0mhcp0k6z3rcg2h95ns68sdn5', + 'bc1ps7ymmeg5x35ytna9jhsn7743dm7xj0ng49u3ag8ypxcqh6u5kzhscjwxz4', + 'bc1pjqd4gzzas7tarjh0fa8kje7s77w86nsy2dc39wjt7pn3lzwey44sxund5r', + 'bc1pw8z09e6hydz65jgenzzy60rf5ectafu2jks8zmkwzvvx3e4zva2qeusqh2', + 'bc1pyfwwyd8hqz8nmc6a7h9rudgphl9nlj08c7zf0lhu9ugy98v8ke9q8vunaw', + 'bc1p456z2mkn56fhgqml5c7qf75savg3cw8drhu33pferu8e5sr7jwsstwfy99', + 'bc1pcfmgtr3ksgh4g0s9q3lks3ksuedxw4zezdgru8ewfjptlsagxc4syygeq7', + 'bc1pdr637zkxea549qqns9x8t7w20he8uvs9ct6vtpcre3zysnlplass2ymvyd', + 'bc1pcdq2mykq9zfa9kcjej8hylzv478vuzn2dclw58zh6y8d0qmmfqms8knxs7', + 'bc1prt2c9z07ew4s4yv33634n2xhj8p7hdvlr2w37ur39jxlc07en0jsj6t5tu', + 'bc1p6p8cvmq4axs23v23hjk7hf44e484enzq4n5ggw5xqezt4arknk6s8vytx4', + 'bc1pv7hmph2e4yekx76ssnu89rdqkyy2n3zm98n086y9km2cjg46xgys72wfsy', + 'bc1pw6hje92e5faqk09fwdftu0pmqma5yw9w5qwcdfhd7qcc9phuqrasu4q70c', + 'bc1ppkw58em656s9mys5dh3gaz8ftde0cvej99vawxkegrh9vmcy93hqukaf2h', + 'bc1pyt254tvjql9rm56l3auv2z8kp59p7y2gctrr6c7z9ud7gegkhmjss729uz', + 'bc1pkkrjr7lr7q6pntmts3ugn9antr008yvzcky3ljq5r9mhq49t0z4sxur2v7', + 'bc1p7w90pjkd8z9zehljhk6vhlu94ljjr5d7aypzuy7hajun4wyesvvqan764v', + 'bc1pyqmj095km9a7xs2ec7fsfkn9vhrlpf98zdjmgv9p5fpwlwe5tr3sc5hau3', + 'bc1phefwpn4u6qt3ezgz9hwfu8uc5q8a8rcceqh8d0us56u6qwwam9yqzv3uy7', + 'bc1p55cvl9hwzeske4358nv34vu36pknm2y79aqsp0td5slm5g0lnp4qyjfrya', + 'bc1pxmewawekvks063fyccynvc395vf295mlxesz0ezglmct9rrh3dtslxgy3h', + 'bc1pn8d5lp47xs77kghpn9hpsmma0stsgfyyfy69d42rfh8ysvxv3t9qf003hq', + 'bc1pmzg9lhpp0l5gxn2nuffthlex7whrmyyknww667j3f6ynuej4pl4q3ev6uk', + 'bc1pnln4agkc7vsfjr27qq3vkha302hyr7x60w3e0l8ny9cdzxfjgz8qz5zv83', + 'bc1p2uyt30dh8qcpxjmqnskga9z2qeyd2wxkakn95225q2y0f52jdtqs2y6jue', + 'bc1pxmpk8enp99vuv4y8h4tuhgz95wvumslmw6tnndqxatujyaya5kcqmslg2c', + 'bc1pvkdmxtfww74jnu4g5fzjzx3kl9jjzwslk568kzm8lddzu5tft78sacp9d5', + 'bc1pmpzhac06pjnt25ppddpr6kf9mqnwyzd73fjqscv7s7l9rnqulswqu40t3e', + 'bc1p7q0wxwnztndmpnflpk6kclea8vlg6nu8e4qh2yyv7usft5e7c3hqzcrq0z', + 'bc1pv7f2hfppwakhlg8lwepzrk0pvjhmxznss5xza9a6zcamxl4yevnqg50h6x', + 'bc1purcvcd0r6se2yczpujynk2rs7t54qusc05alajgnc9wq6jf2nevqrpacz5', + 'bc1pl66rxulws8t4qrfeguge4lrwgfn03mkv6qm89l49wh49mjsm5n7s0ggpsy', + 'bc1pyqux85p4tlzfk0tmpr4fkjzsu3a2krw48p2d4n2k6zxlwgzjdm7sskg0wq', + 'bc1pzuem09ng928hxqu08yzg6al9pd0v0xj30c0rzlpvrugekv37rzgqrmuhqm', + 'bc1pjlqfr8r84k63kyccuusstgr2dchp2xycx8fqgdsjpmv730cktxeqnqj46v', + 'bc1pyltna3zmna7lxssjwj9er87aeur9h4hwdzuy6xcaqlem9xat43rq62rvjy', + 'bc1pt2jpdt7wf8ewz4xfltu6e47074mvh0l63me6az0wqjsle7g9jtgsyx7xtq', + 'bc1p7cre3w0frf495twarkhxnh8ehd3mmetw5xz4rq7kgeshxx20t3ns977l69', + 'bc1p0ujtq7wzsjr90qauy9lj8n9znas25ljwzwgj6a6gl3a6ganyuwxqrj5ql4', + 'bc1pcjj47zw95agrdmp872ahmlyaz3xladxw7sxpvef4uuww70v8h8es89ry5z', + 'bc1phadrah86el2qcjw8tc5cagfsms734ekn776jupqktxg0v9cx6v3q64lfp4', + 'bc1pqdpqwzayx44w7eaccv77mjne2rq3ranxevrmngue6nqdjmxlgtqsx03p6v', + 'bc1pgwwrtgvfrxlt6clt3c0ee6k33ea4n0wymt5mvkc3thn2dktmuysqvrc00t', + 'bc1p53fw6ph8jnt0hy88jla4y7p6kanm40lmhye5vnpz9pchjzn5euvs56t7a4', + 'bc1ptec6k6l6czn46dztnl9t558433ykp95uvjxqv7xygddm0m9s7sgsj70sp0', + 'bc1prpfv43tscty66hd37wgdpzvzprhw74wnzvwn6aejtf9hpe4rnhvqthgzy2', + 'bc1p9722ffaktwfwuamjn9vk5w4u3p98n0a9m77nyaayk4gplydpjmxqstwwqt', + 'bc1pta6gjwdqj9vnpa7ppuz4trhhw7twkd90sfjwhl2lf4lrjf0wzz0s4txtuj', + 'bc1pkuqcq2v98rdfmyl7zwgqh6h8y476d4epuw8pjdqtxs2zke0znjxq4z6da8', + 'bc1ptrvxjkvy08jw0vx3fnhqgxpk5dmkam00wg95g98grq5hzmtmrxgqp34ccw', + 'bc1pzs8gqdq9qs63nn4wkmq5j60mce4t34k3p3v6vvknauhk4ft0nhtqfmv8fg', + 'bc1p0pdu3k8ws0harv0juhy2jjvtk6jp8sgcr35qk02fkyv3uk0lx66qxt9gzc', + 'bc1pp3vxpr8qx5tvelg9mxplr6xwg8zt2gwyf2q7x7phuucp3gndxyps3utrch', + 'bc1pm5m9xy6elk29zhq6yk5rg3y9p0ez4kcqqqqjq86zqvtwhqks37ssx2wzm9', + 'bc1pl4qz06xdtuxr7eprt5wfe4dy4mwt5c9zency9ztqant5ljhk2djq3226jj', + 'bc1p35844gytp45nqep42mm5v7zppzt8wem6k0a5dxt4sqear3qzu2xs4g47sd', + 'bc1pnxquplar6z4jkavtrjncdvzjxwww7hqtsfle42tjkhsp2gy78r6s7lfdxz', + 'bc1plrqf302svkhtahv0srf9wk49shjauv4j76vtrxn7we7c32pyae6swafaux', + 'bc1pykpcds82th74a29yj0dw3xsje76jgznpj05xe8xw9uu9ef8ed6tq08xlgt', + 'bc1pwj2w5p2tlm3f0s7vx5wsvp0zpdv5cj60hnjppwndtl7j24jan3js8ar04u', + 'bc1pmnqv7rna0tdhfkdprlw5qnfpmkr37mety34ypsqkz4gzdj2ah5rqsf03s8', + 'bc1pdm3x8zc06xh3k0hr9dsv2a7dwjre3jmwme0rufvyeqk8cq6q5grqmrcjuf', + 'bc1pmer9etlmke5vlrzvhxsu0qacud7eccrjjfmz5qcd2qpdqwe39als9xf2pm', + 'bc1pptup5ckan0udmudfjcxqxsgfsu3w0x34zmskwjrldwx59r6f4ezsuf5rmn', + 'bc1pgp5p9253sc84e6cygxkrdaresnqxjs4u5nnxqdxgs7smqehv93csmp8stj', + 'bc1p7ahh239eashzpg8xzzegfmf4j58ayw6hdencaahfp9umev53fwsqs6rz3n', + 'bc1pedqhlupg9mlcudynj2fkv7044tncxxkm64ehd864qw8g8cecqujqwg0f82', + 'bc1p09hvm8fa2akew8af2hlk38hw4x7ks6uwa8x4yactz4wm4vev3yzsjamsy0', + 'bc1pknl08nq9f38nxge252we550x4w0ls5z0ycuwrnx9h9hfses4mg9qtmsx73', + 'bc1pc7c2t63rdk0wmacalukxlgqz7cqqqrqg4dh2knfgrna6llwx8vts76wykr', + 'bc1pxmtc5j3nhpj74vyka7we6ktjmg4pl20eel7r79k2qd9sgw3suw3skw56wy', + 'bc1phkefjd7h57g847waz6uvuuk0mm2uqs949qaz3ut3xpzq80apv4tscf0x6e', + 'bc1pe853kyf7ywpg5zptrzce03quqlp8lfgmzz56v9vy7dy4dpyupy6se2sl42', + 'bc1pv78v5k4vw2fjwnpprcfvk9400mqmj7k9dfmfuadzmzrg3ep89rvskwcqsm', + 'bc1ph95yy0wxg4udcykgfuw8leuz0gcrgc9gx6qehwphttvxd2r4znfqt7gu5r', + 'bc1pfhpspeuvqc0zrcq0u4ev4090uucdf9fn2cskwg0jc2n8cy28x8jqqyd7w7', + 'bc1psva4eghz3tds8fcs97kkcmmq5khnugswevgz5u5rk65zed6qjjgq5rchu3', + 'bc1puggdcecxkv564xl7pr70yhfc593ee0fzpwl73tvaq2punef47h3qaz7qel', + 'bc1p2vdx7qqqxf439sv8jlfhvkpjzh6lp5u0pkl63h53uy3zw4lq39qsrfx00p', + 'bc1pazxgmxnjrgpphq46zl8m4n26aqqhkdaa53glwxyhc737zlufvuzqr6xsev', + 'bc1p7lvcnrxdejfewxnej3aen3spqn5whffghswypyjj46axy4v3p2aqgud5yj', + 'bc1pdxusx39aqur5nzxplp4vq9z3dd3sewxf6ndaxusf53wjlwka3ckqz47wtn', + 'bc1p7mw26yzzt2fkh8qmwsd4ch0qd6mgycfsf9fctpfjkycugdcnempqcsu9mk', + 'bc1pzhjwldh0zdwv4x0emtac8uzrukt336d78uxg05vj86f768helfzq68ugqt', + 'bc1p2tuusv3f4p39svm4kztcnfk49hll5r8mj3t02ur55cwzgrzxq8ps22r78q', + 'bc1pl2nk6k0p3wkzudam5a7kfztkujkwkc3057zs9dqqklgwrfcjusvqyqscg8', + 'bc1ps5gsyfmnh8f5ppt5j3n6y3whnfvu7j0xh30u29l86en5znqct4cs9umus4', + 'bc1pnqtww8cuyh4ul0h2p5jgj9krpdpnkfawl8r7ynr0s2kcqfk6snaswyxu2z', + 'bc1p5chfnk48yzgwh0sg9yu5ndlq9uqwyhndhdac5gsxrwma5vhe4u8q7rgqnw', + 'bc1pslrnaanl8fxuvhkpk4624ft99dtgqq2kw6t4pew4cafjzfsr9y2q0t7ggr', + 'bc1p7ymstluquql4u73cgvwwcm440lqllptuhnye5kqeytvwvc89nwcswmxnya', + 'bc1p006ts6egely05j6rmcplaqcs5203e6lwr3vjsearsr5sq6l48w2se42gyk', + 'bc1ptemfk6p36l62p79t9mqnfp9dtx5e5ycawlwpfl9wf9k09cxc8fgq9hsfk4', + 'bc1pka2aj2ttex06drf3ggr00szlfq0k559v32q8xxvnul92py3ewjzqqzxmkz', + 'bc1p0kf69gwq8slrt50djsklur7dgp2fupnn43gquwnqmq2n5tf94x2scnmnhv', + 'bc1p2h2602h694e93z4ry7dtw5zh67pwyt9ggxcd30dcxjrnhtt7fu2s4andkv', + 'bc1pj6zxnlvec5yevrtqzyf4na32qyvpk2yv794wdqnwmwuunl9lhznsv2mgwp', + 'bc1p023q0jxn3w4fq2e3rvcf04y98g9zlyjzh2xmc87zqm9jk37mamss30dzsu', + 'bc1pwte4mzjau7mkx9cce0y2mnh96jek3td5trrshrq2552z20qkh42smrs2u4', + 'bc1pc3trzh6eeq6g58nz2348z00rwkm46fkyy9zutjp9yyzn6lzl7tms5hwhn0', + 'bc1ppell44x7l9xa44uet445n3h57n5980lv2qkw9z9yhtqmuzpy4lrsdy5vsm', + 'bc1pzc2yqafpr44vfdpgjrajgtp4nrtnunr5tw26xz023e265fpt7kas38h0w9', + 'bc1pzxvfnehv2yx6qy8m2f5g46usyenne5wnnlmg654pytfxcndzxncq46arez', + 'bc1pd2heygclga0c5cxegjqzsm60yl6qc9fs954sup0kzg3c36n7qgaszuuzgv', + 'bc1pnnsn8kytj8cja6h2u6rd0j95ww66ekhudhnktthtr7rglu9rycpq4c6x95', + 'bc1pnltpy437yfpg00g6u89gqn8r9qhdq709cnvgdqn9glmd6pt4z89sr488kd', + 'bc1pfqnwqn8vklzsyakkqsvyhgwcqd7c5rgjt3zljgjznrqdqsjxrl9q4w57rx', + 'bc1pjceax8p2aw7s8wsacwsz89j4qcgtuknq3rfl2pp6r0s6ce8v5e2q8snl8f', + 'bc1pkwmwdm07e5kqw0r3dn3m0u76h6a6ljkcsuypzt0jg9cvxwrx58xqatgcna', + 'bc1pr3gx99gd55zkzpx2y8taxd8yradew032jsqs4364pjv3g5xjd2kss3ae8k', + 'bc1pty3smgaamcsqsw57cjyvrg3j50ztcfcsa7mvc57ncf9cpp9watwqfnrz77', + 'bc1pv6zu6nke5na6zt44pv7e423aqfsddhhwjdhdz70kn9ngsgssfc8strp5wp', + 'bc1pjhqs0za0903p5l5l5ux4d3qpzgcej7lgmj7zufywh0dxgsdnzwlqqqmvg2', + 'bc1pn4mu0rvr7ugaj23qyyxcj9kj4ms6xcq8kz777etpdsu52mrza33qca9f9k', + 'bc1ps35dgqsfdnp92t3sczth54rjdet8r4jd3rm6f2ud8uzfflmd8kvsgc0xl0', + 'bc1ppk84a87jmu772myp0th6ydrq34972hujsdmjv653pmx9fxxfazmsz953n6', + 'bc1pru2aewv0u0g6w87xwf2kmq2sev0rx08zgpypgwraccwt8knv8e6s3vae2h', + 'bc1pgkh7nfe2l5543pk7r2c0cd82yp4qnkxla7sj9eyr6l2ysf7xv99qnq3nc3', + 'bc1ptg5e4af7d6dyswmykj9pfedgcrhv8mpnrlmxn5gw8fepusyn3ehsmxr0a3', + 'bc1pdx8sralug9qjzhpkdeum42dk86zq6vqtyqexetay0gk8dewzu2kq36vefz', + 'bc1pv65ll6h79ye2vc9cxtk0u0dm93v5n3gezsrn3grga3kkhut6e8hqegpvp7', + 'bc1pf3wcczcntfchcr36mp87fx46cltdaa5yg5hnxqx0ln2jnre8rryqkg4t56', + 'bc1pgqt93ptsw9xlgf4xqr4k6wtjfsztam6jsg9ad8mt7l0v3ny7enzq97hcl5', + 'bc1p5mr8cwtjwfyaldxsrpqml4a4jrq2ss6x98yraf2d3hqcu3c7rldq6e05hl', + 'bc1p2w87kftxjtxdfwul2rtjmr66sw9mdhas467pxkah6y3cwynscmvsa79v5m', + 'bc1pj609cy58du63dag06ljdf5z4k9wtpdv95cwxkasf4fwtatj4ymqqtlh5qg', + 'bc1pgmn70wn2n8t2zkgr857mm3zaf7yqjnuv076v53neum6299zkqevsy5ujfr', + 'bc1p84kxy08fqe3nqqcjqxya7zc59wwe8h92uehwj5c6698dugax9ptsw72r3l', + 'bc1pp3ng2vlsh447grrjt0acdvqdj2wcs5uw4x9kyzymq5ua6xtgmpmq7yly6u', + 'bc1pfkx52ptkcj774jendnw6ssdqh86vypy6zmryx4zptglz8gs2wmkseqx6h8', + 'bc1pxntyh9rj2jk22s8329gyzyu4zhcg9j04se467mz2llrgzkhmxfcsnw03qg', + 'bc1py3aw4rzkru6cv9u4xj99gufufauj0ezhsvwcj6rzw6s66tlm7r6s8gy8un', + 'bc1p7qltt278dvgee0rmdmjyfljullgw4ptz3rq7wp2sfcuwkvqujjssswm4zp', + 'bc1pd8n52vc6lf5sdza6p2979pdtu7adnhkgnmvu8ae6ux26l9zekwqs980lra', + 'bc1pmrsu0cevtdwtg2luvkfj6ej4jflxc37umd9265w2mqp5dwtfcsesphdrdd', + 'bc1p5587pmv6c7gtc7vtfycy2cjnu22ppe2yzgdl30mkpn8x4k6xwt5stcgy5c', + 'bc1p0xmse5e4rq0juxw9ahz4ne9v4p80t84lue46a7u4t9lczjympx2qlj87yf', + 'bc1p3hjvwxxwkkh5dwn2sc8zqv9qgl0xre5hj7fvfpfaecl6as2ww86q84294j', + 'bc1pcgqu6yxtw27405p2z8kk9adwsykzz954ujf0flym0j95mwvspphqrdklma', + 'bc1p2e7zf373kkkmgp3t7texdwegfmk2wg9v0827dq87zp0dhdaug4rq9knjay', + 'bc1pa5fp7uz4ysg260vvz74n7yghe4505wgyzedut6z3r4ajhyplfl2qumg3nt', + 'bc1pjkaxgevap4w9p65qzvwjx5kahz0p3mngepzpg9wzdte4a3mt4t5sxe88tf', + 'bc1pnfzv9m40kwmzux4pxljmd54qkxteguy9lkdgywda8j4pfssj4h8sm44v5k', + 'bc1p5rfevzz6jret4gsx9l2u8f3e8w7n35zdw6tdntyewh7wfkvcnensyfr7fj', + 'bc1pm2pkgxq8frdtxz9zng74p73s84plt5wf5udcsf5p3qykgukc9stqwdcczl', + 'bc1pr7uxu6f2rxt0a42yr7vre6lzqt6w07jepk73csmg8sdr75rqpj5smypzw6', + 'bc1ps7qzv9ul8602vp7yfnu9dr6457mg0pkl4d7emdjhg65c6kz56fqs2ej36v', + 'bc1pft3qp9vv8d65f6hy66p5ur5suse357fj4z00us98f6ajuxpy5v2qpsx089', + 'bc1padnp5u5x36tzv8kyw6ckn5wgmd0thuc7mst4w3my734963m0p3wsp93xq4', + 'bc1pvcwmlllxqckewlttez7872xev5pl63ce4rh34gn0elfqaljv868s0v30dc', + 'bc1phvs456kmfctdhv6hygr2hresfgw8ufcmmtd03ye40gzex26tz8zqq3z7tl', + 'bc1p0rh2uu7200x72gu2f5fn65aacxv758wsexjaggsxjygf3aws83gqrndqkc', + 'bc1pdjn7qd4t8p28y3d0j8wcv5akqjyg3wu5q3690k0ppp7pkh4dn7ps8rj7tq', + 'bc1pheny7amc6xsfgl42gqgxqvymypc98tu0gyfag468va93mcv0z4cqlyrrv6', + 'bc1pq4q8p4chxxpcyhnrkjetqn3dvhmwu4g788stgwwa6mfc4a2xsndsj02yu2', + 'bc1p677ldgt8c65lt8l7wl0e6qpz3zfd6j3vgv6xgztydlmduqq6zeuqnga9sh', + 'bc1pa0d6rkmuztq2le7ntd92mlag0z6etpxknq9fspzvw2kprytp43kq6zfnq7', + 'bc1pftxezv5qul52xtamym0dxqxdqwwgv5acqah3qflqh6el2zh92wss96wtrq', + 'bc1pssh09fsw250r8xmew2m6jy0zlfffratfag48p07xchw0vacsv4gsyzf4ed', + 'bc1p0qjzprtgp8tglswh7675u8vjtr6f9rqcazeac9yhxs6qzq50hv9q7pkkay', + 'bc1p649auvxunfqezjudxk7pydrnnne3ttnxllj6wkjjfukp32gxcf6sagqwce', + 'bc1ppzv6ejd9lc8rjvhl4kkz0jfhf595hzg9ly02sgcyj5htt9ukp0uqgxk3a5', + 'bc1pvhypjvsqjygjqdpgz3smw7jjgk46dyahafcpe8qnrlu6eep535ls8a4h8x', + 'bc1pjnyltm96gl89ragzuefm7n9zm6p8z8z0mw5w7gxnpa3038gacq8s2xjc25', + 'bc1p4uvt00mjws7g08rs8f3gk4hx28cztjvwze6p0c4sy5kvs892663sk609z4', + 'bc1pa7tkhwqe0e8766w67uydljgyz9scd3g7xy7xu7uhqy9zw8ufv4kqrdjyk0', + 'bc1ps7ncgkr4g8s7x5u9crur2h4k78uk6n9u0mwqjx4ka8d6djdyckascyvc25', + 'bc1pmy040qeut2fkvy9f3xlkumm7jky3awqhecvg66er5hec90q0l9vqqw6aj0', + 'bc1papcprqhhuf48e5x0s79z6pqpe76hq0yke0j7h99z9cfqw2muatxqxekclu', + 'bc1pf590pl0sja0ln4fsed5sd72f5mdq34lhlh0cjrnwu7saj2m7g6dqxcx87z', + 'bc1pzsqfk6g9e0w5hwhv3m0zak5rxcee28zu9ugz20cp03dtxazv5mzsmqq5w3', + 'bc1p7ga309ntxpv8rwnwz896q6acqwmhkhrxzwxy8kxhdad2puusznjsyfyzmk', + 'bc1pmxqls5gd0kn4p309rt48en4ledl9gcukpudy8cxuu20zkxmk0x7sywpgpj', + 'bc1pa6t73jr5wv9jvl7c89r3dtckqvcqkhtgce4t5gft8v2s4j26k5uqxg047n', + 'bc1pcd28epmqjhlve7lpsgezqxdz7fh4c3mwlr0t9hwvn5xk0vdhdqsqa5f45a', + 'bc1pafyvuf4kxem3u9ezjjt3jqj8j5muzswxhzugfflp6wrgl6mtaa4s7z5584', + 'bc1p4ylw8jvmgtesv8439p3ahhk9x6hduqz92ar9ej6d5ult3gvsndgsgpvjng', + 'bc1pkw085s98j3wsqfsk6ghl9e0ckzxlhahhu37az9j6qrk53755ujrsc90nva', + 'bc1pswxs924q5t24yvvemauja7dvwlduz0nutkq6eu0ug9ptm74kcyys4hrwpe', + 'bc1px8ghvnmj7lg79nw7tler4wxqgl5txfvq7nehpdjt07t7daf0vv0qk30jwu', + 'bc1pjaxy2l8mesfr57myj8q4ajl2s3x9f3rl5e0ktvy94mmynyg39waqqjw9zg', + 'bc1pvglnyqz9vawt74f5jvqx49f84pe37kny8kg78t6dfq9kyl9f5j7sfhywsz', + 'bc1prr8qa2eu5kkahlvrwau02cnjn3h3hptp0p37cj8vrek6682ugxaq3c27dq', + 'bc1p5egps97lezt7e0kdmt99nghdrmt3p2hm5um57yedqd4l9k733pusq9xu0g', + 'bc1p9sjgeztelm32rnk24pfw9yw0zjtrphfwgks2hxg5mlzp5q6djp8q8kvuvr', + 'bc1phzd3v76lgv2dhu89jc03rj4zjuaze38pq0tcy75vk8t2cj8ee55qx8je94', + 'bc1phesu76383cx57eg80z65lr94w8h063aq8yvz5wxeqpvn9vglugesvc5p5j', + 'bc1p8x4ntdgql5s4clsvwh04hhmj7njxdzthtf3xtdhtpgffsvkfhw8q7e0lrp', + 'bc1pr364ek9mh6tzvh4nvhe735ja6php05wkmlelq700n4cukwx75lhsazk2tu', + 'bc1pu0f8s69xv2wqyj82wszt8mzpftqk6hyysfd9dlnkv8zcqj2xeclsj0cy8l', + 'bc1pf9rdna4ug2e44u5x7q4qptm6vjxwn93nmu28xjf368rl6rhlzp5ssnw0d2', + 'bc1ppyrskaf06dxmcw4zedsj349zsfrr9fe7ck9pvdd4cvyv7ntjp9wqwxxjeq', + 'bc1pd4g6wem0tg98fz28v49u3dqzg4k8fhg8e3s7x60p9xzlmljqhklskvhe9q', + 'bc1pgkkdrvudn6v9wsqwz9fevqaq2we2c7qhcj8wcjrwjdrcmvsz03cqcl39c5', + 'bc1p557acdhw8qxajg7q2gmkmaf7yd9lns8wq3r3ywxpnwf66mgkjycqgamhv0', + 'bc1pzul2k7an8q8vzmn3w3jsl4gxw9yqveeenkuwcdjtucs64n8je6ds8aak3t', + 'bc1pkn63h5utrwle45mmllkl8avnnptfh9ef53qkn62022gt63ywvu4qlg65ph', + 'bc1p5ulg5wqcljrlyank5jh6w7x8hmmhdrg9v6l3m5a8gmmwh60g20pq3j307j', + 'bc1p2pvdsaq0zq5rnlm7pnqerg3yw6ajq7nuxal396j90kjh66xzwyhs6ed9u7', + 'bc1p32p4pknra7wz76rgkdxpyacsektkqm4ygfs369wsnalucsyhxe7ql058ul', + 'bc1pfz7cwvcvzpwly7ca35vc30ucxsm2p4ttyjn76anfv6u63y0ha6hqgw04q8', + 'bc1pqjlmmu2afwy9f7xfpl7ytnqvg0ksest8tzq805d82ht0rwckgmgsg2qr0c', + 'bc1px3dpv5vzp6xj5vcyuyqz9r96fnas0acmrl35wwu0u2fygu3fl94skm4dgp', + 'bc1p237ev25rm50jkyps56avcw49u7elp70vec36g2l4gl7mejt38j2sufemfd', + 'bc1py9jr3qjquuq720wqgkvuuczepxdlj0dvurpmzgum8vm3u5ufdhqqla85z9', + 'bc1pe9gecc828v90rf5n7dm4tcv7jtqjq5d0e8xqeea7whxauq2sldussq0zsl', + 'bc1p3enrsfqzsfy2p3yk6eyclmhdnsu3n4ju8dwrtjg9wcmr76wukj0qutfz66', + 'bc1pguz2pad7nn878n3cf58fq0t6n35zaw72ngfwkut8m4uahpsqfa7snxaymh', + 'bc1phngst8thnxvxf4njjpghp3y22386a8n9mlkgnjr3xdwzkyayutgsdfejx4', + 'bc1plkffql6wn2083672g8klwnqccczh7u5fr3h9e8ja5hkz4wg70rcq64cgh4', + 'bc1pwc9cz4zqvl8e08ej3mjhr65stazpln56yc70m76r26p9yaq42nesedrpdm', + 'bc1plnkgg629wa7atrd0h9u9m6q7ql2h82fpuz79akwys82mltma027qcpvhuw', + 'bc1pq4wgrsjdjef8cwlxd63zhexsdc83w03fyg7545uhs6yth2rgmr6q3qxwu8', + 'bc1pttln6sz2ayqexcjafdxyn58nyfatlcp0d0jnmckl8sv2avwfrxnsc5wvjn', + 'bc1pq84e0k0g25zheellpdtssrgmffusz08u34hw8trvcw5jsz3y8r7q4fcl6e', + 'bc1ph3nj7ag4wv485qqerzz72d0qe0xh42rxv6cn8pnmmtn8xk72hyfq8rvku3', + 'bc1pw9y8pn32ys3pxqk8ewgca74q64j0gwhnx3943ewna5v0dtzcmqmqadjxtw', + 'bc1p6fs4zfw3394trqar8qy5f669zdmeyd9nqpkgfwz0g9wh5tznjawsmhhweu', + 'bc1pqw4gnhs980ap3lq6dupucxsx0qhdu94zqxy4m3crtcm7sqrjc4tqjrcuuy', + 'bc1p95kmunznuh823utarhkas08wh9zsqw5ceshz3qtqrprfyn5znrkst744zy', + 'bc1ppernct4gxuyy0zaxkxnprc5x5h33zjylep4ayss47p2f4qrqjd3swutn4p', + 'bc1p2aj30zrmmrevs0zy0wuhfjupwtpasntfauvke63rvxcaptndknfqarenpj', + 'bc1pzfufj5hl3rukn02ztsq4gp7ftz4ndn9uxvvgy62fyvhgvfjeeuwqnhgcth', + 'bc1pngfunc2vyjkgpkgwqkqww6pz85zhv6cw6rlj8sw28v27d8lfg3xqqp5tvh', + 'bc1pz3affd66r2wreg24n5qjhzjff6vd9yyhrkpgsz79lkjpgu3g053sjeuzgj', + 'bc1padm32p3vxdhpek5633wy2t5t5dsylhzg93k8jlqjpapvr54klmssjh56df', + 'bc1ptuth4ehdz5nw8umy64qf83qn9536y0ccjmdny90aeup948lsw4wqx6tdyr', + 'bc1pqf7p9g4n09as897qs6wmpy5c02tm6xkzkpp3jwzf7eq7camy837s4tx4hw', + 'bc1p2h9lspkjg0x9ue5rnfh2qxp8z5mq78wl3034llpdwmr8mz3wa4hspyhc47', + 'bc1p396tp04mq99q89s2v2e0jsk97k5mhlpgm0g9tv4cezk72futn7vq8jqtnw', + 'bc1pk4xqgyzyumlt577gv3n7pamzg9e9xphe4n4lsp8c8lzg3t4rhapqje5nvg', + 'bc1p5tv8f3hd9jcexnrsrtuf9yxmshtqv2jpj4kdma4kcr5qlredcyrqyucmuz', + 'bc1p4tju5509klfx9jgkdqausaj6z9j8twfdg45w0rg7k4snqul8whss67r49t', + 'bc1ph4759dznfnfm9wra5hctvspqvwt6khmv4mhevz2mr7kx420uychsra970m', + 'bc1p9v63tz5adj2g0ppglenangyfjczqjwfrv3256sey8kra4v3cvg6qlpuhrc', + 'bc1per0p84pul3sjwhs5frmq5rh4xtlv6ty9g4jcgfyr5hrgqdfuqy3snfq95f', + 'bc1p780rzaana8jj0cd6uupyhghewat2e6pthrjaxlkfw5uepkgn28kqrdp4kq', + 'bc1p2kjltr4fp845aeepl359mp7vs47j6s9a9xk8ffvfux98p2tnkv3s7drtfs', + 'bc1pnt4avjw59hkq94dpnkrp7qm0mykmhg7v94wccuu6an0znw4xa0gsmlfdxm', + 'bc1pmkln4xl8zj383umglpcv4ua40gugsthycwj2tfjtaftuydstvwtqghk8qa', + 'bc1pd428qspvaqmtffr4au9ddan9yhuj5exsp6jt503g249zccsns4fqymlnm6', + 'bc1pkafkf6s0l4yyx8p3csk9ujuguev9chcj3hx6pznqj5tqxtmw4s7stf0svc', + 'bc1pm6s7mnu00xc8afuxpxx0l0t9vlc328e44lejda53wwuw5pfzy7vqp9caqq', + 'bc1pq2cv5h8efj0q3w6j3lcp7anl0hsaywjjrsansyhmmw08pl8tn38qu73alv', + 'bc1pjryhher7fpq05dq0f9dwngswqmpavnazl35rvkg032evmseeu44q8vrx40', + 'bc1pfeluypk5qwnfyr7evhlltey0yw7zsjz244sdw63teshdthgrmwsq8v2zhk', + 'bc1pgdp667s8lyv46smdnvhj4skux5nkmnx2a242kyxfawagatj2ln4qhuzhsr', + 'bc1pzep05tpvqud2pnpyky6sha6y6r2pnexwwlwxnuetetymnsvtzqsshkhsjs', + 'bc1pyh0ryrvzek2s7wpz6g6f4hh0paahacxmhdgcl5hqqrzmrwa6xk6qnw23nv', + 'bc1p46z6hx65cl0kgexe8322ta3wj7n6d4vz2v3qkr3cl0t7kw2v3j7qyqa6qk', + 'bc1p2ds3vnuy0ytw2u3k5e2scwe7yrnfa28ajctpd2erl7gje09dgxsqs3n864', + 'bc1p00fpem8c4q9kfpezqdrdl573ap28gveh2s4d3d63lvzf9jjq8xcqulml0a', + 'bc1p3n38e98v05tku798y3ekmlqf7q8huhllhzj5manfdf4ksgzrhkzqu34rkv', + 'bc1pedhen8gq2gf3jt7gyn9f8zq2f66jxl9y83achg92zjulvvaqvhnsw2qyv2', + 'bc1pze63tq5pf7tmnre227tn84yeqm2fplc6fhqhalu4vtxadlmq3fkqw02r5u', + 'bc1p7xnqsp85qqcyk6cmnnaq6qfvythl8j8jwh8a326dn5g5jr83wvhsnretgk', + 'bc1pny33wz79myncm6gcxr4wgnkn637xmqejqh9n6d4w4yv85en3u77qqjpd6e', + 'bc1prvluvnph4v36wuye62vejplhpu8nkyjv438d8naw4jztplvzw4dsxuf783', + 'bc1pe2efk6v84njvss25x5hagrsphsdvj0r9uygkxke0yfls345t2j4qvxwkxx', + 'bc1pq8ruxhh9u8exdk0w5z6zz2jtdf94kwpkweenmn6ygzxqg2vljpnqhvf6wg', + 'bc1pvfmx8mur82k9fx7q6hmgsmntukf8qvh0wtd8y750me9a95g8lqsq0ksu5l', + 'bc1pxkrm0j956yu5l5tljamx559jhfaxk7c630tdy9tlnfgevuwp670swy2d7m', + 'bc1pzc0rpmqyclkeqwks7wewq9afnykvupgtfquw4gutj6uday45yjdsc9r4uu', + 'bc1p6p4gvfcrlh44j93mhamduuzvyr7ezyg0fd5p6q3drg6qnnn4adxsnkjmye', + 'bc1p2hme44vjq2e4fxv38u7gv2fvtcgt3ja6y6k9g0usp0lzsjs5jtds7t7taw', + 'bc1pum78ujgtj6884sx2q3ye47nssd9lfznexfu5lxtkeax46tnklq2s8xrkzm', + 'bc1p7frxq4c2g5swzhelcx3xdfdkgxqnaaz5xaqs3q83h4gl40fwlx4q9umlyc', + 'bc1pg39jm8gzjyhmcyyw00lqfs0u83c7grp8zsdsttjwemdjz6mmnm7qud3wyg', + 'bc1pe2nhcmm9pvcqfudep2t9n54wzzhnplnsxp0jxxka789e27p3582s6pfht8', + 'bc1pgae3tyweaa5qd5czshxm2yh3v25q4t3fj030hh2pl64mxs6fwl6q6xt3gx', + 'bc1ps94nyps7tjjt3r2dvpxkxsds7lc6zg50wdpgkxu352pw7svfcy0q0n8ff6', + 'bc1pftvcfatnjs0reqd7ht8q45flzf2tjn22hcgn65hu3x2y5wh0txdslxz9xf', + 'bc1pxn7nht46qk79gu64f72ljkc0nusw8y6790fpecpespe67mv35l2sd0x305', + 'bc1pwtxvjty24zjsmtucuzxl2g8djtyt0u84kkhvmncdara97sxc0gys077yft', + 'bc1p9pt50nc8ujhy9gxysskrvk8j5gky3nyxpycxlr2n6v707dh0fk3ssyxhjh', + 'bc1p989mxkms82ztlwtlwuhrgcglxump3yhltqf4hy6kwg2qeg8ys8vq6klg79', + 'bc1p4cl8f32l5vmz2na30k2hxdx8djg2lcw9elxz2k45s8rws5jj35lslhhnqy', + 'bc1p9mg7dhctae22csxk5j0uy434x7jxueuq87ppcs5npsaa3kcm5a0sete8hr', + 'bc1pklqa0rwwdqce0wa5wn7l3lvslguu8suffv0wjxj6kx4c33n6uqxszgvepr', + 'bc1pxll06yfq3mwl6hz0h6fp6wsfcv4xwytte5zlgjgsvpq0jzz5hmpqlnlk5d', + 'bc1pc8js2p28282gvjw8vwpq0ps7w04pdjvx57mags29udamw73hrqls35dq9l', + 'bc1pph37e27k3ssm737fedlpsra794n5p29q7au98vxc6ntm6al0h40q83anah', + 'bc1ppx4yt0ukn8rpu8synzhzwcrvv9tcn0xc2cuaznvx2k80rk58merq4wq8mj', + 'bc1p2e3yjpjsm50vnv47hn5j4fepvfxcl0ha0ljvdlpzm2ze6sh963qstz3sqq', + 'bc1px3j0yvkh7qy6p5g86fqdu0jmk9cy3lrcvzxf28sp3uhg5a28juds4fvw8n', + 'bc1p6yala2kf77c3urre69ln3n7mdrv2udptty2gfc5yzzfytmcnkhqstm2uh2', + 'bc1pezpglnkd2dg63huk9ahhu4j0asp6z53lqgwwlp5030dqxf5ahvhqzysl9y', + 'bc1pf8ruje87k3rwu8y99qdzuw34yscjdc8n9cte5tnv3au9wy8wwkvqxwau88', + 'bc1p37hyq62wl7vzltpclk8r6qaeypxxgv0qf4jr7fl4l5qnt3unnmjqg7f940', + 'bc1p9q5xkax96hwtcn8le80fx3eyacja8k6xslxg80r7phfhsyvps23qx0cfuk', + 'bc1p2989qq2t4k5zvsnr688d9mma5d2v5xf3jdy2wgd2vahx68qe0m3sxs4xm8', + 'bc1pvjk3rxpjen2z7fn638ngfh0mdv29ud7wdgvptp4njya54dunmesqz3sup2', + 'bc1p8lm2y73lvr7dgtng228xx74hc38st73amygvk6cg238mx7n5x0wsrpd4pn', + 'bc1prf53z94halzgc29cgzpvwy2t3svdrytq4fyjgydk5tn77rayxmms2qq8q8', + 'bc1pkngwflk3kk3yktwz7y63s32pmrjn5ndsynn3nzd2ry0vp39xpppqleyur5', + 'bc1pyhgklu8uejlxn20n6ffkwqgsqp3u5rny7x9tppf2dhdafgeavwgsksn30v', + 'bc1pq6skvxwphwny4xte236wgqgpnzstgclvqxk4k9z4hgt6j9eqxfesdzza5v', + 'bc1p24atc2kptgdk73mgphv22lww2r3m462c0pte94u3ledzvy25s6xs23tlg9', + 'bc1p0tqynxkrku2akram3jp8fyv7kz0d8e26jugc9f3gjyppt36yvwzs8jruaa', + 'bc1pyxnqmfklufkm8mrcurmjvs748pfqz2lvt94ad877u3txyexjfkwsuqu0st', + 'bc1p0h2lygmz5yt6n859hr3lrk27jc2vtrgrrmxjwhk69zrmdchdqt9qwa7qt8', + 'bc1p9yn95mzfvzyes3cehfaxs9ax3wru2whrfp26tufa7yz4rsdpz4tsp9dq9u', + 'bc1pde9hxaf32tds6qqhaxrhpxn53gycchgzhf2gzgzhvvkk7jsr0xaqn3a9j3', + 'bc1p0yqnuv554vvfsvy3k909dprsepzu0jjes7k6dshvsvh0afrpuhfshd2r9r', + 'bc1pag3c8pp3t66jdfdcscx2zvj7gc3chc0l788ldsaw28hx262hexuquv2j28', + 'bc1pe9gn85dpv08ak06y3h0rctwh5tqj5x6xzesm8zfjqq7uuyyrhu9s24hezd', + 'bc1papxmk5kvp4frp5s6tnplc5zpunq476tzav87jxq6xgp6skvspkzs9adpra', + 'bc1ps5v7huguavr6y039fpcgqc3j7qkzdwmuqkucde37fw04ppmer3dq4957cg', + 'bc1pk4kasrnvzqk75e8p974lmuqm0dpg0cc8lx05cpf6yuf5p8yv800sg27e90', + 'bc1pe7zkzmzgv30r7amnc7tr8r9rjzvhgraf39j559evz7nkvqh8ht6qgjfj7j', + 'bc1p8tpj3g3ds3drp5daeg783j2tjpew8pdz98gnpmee6uj6l8ukf40qlpsvua', + 'bc1p2edvuq7493tvjeyrf3s3qyvakxsqfurvl6xzuazh4hnld908k93ssa96zm', + 'bc1p85eweta5rr34xj3kj77hkacgvhksf6k7mv09v76220jzezjr3yxsdl5ugp', + 'bc1pfqw4dze3k9spju3v4yxxv65t7fe09tta4jgfh0t9h02fjq0cxg0qmzrfqu', + 'bc1plafg3vaap0ulvl2r2mtaz97220sxelzd5mn87gsc9vf5m508lq3sz9vx8s', + 'bc1pl8c08aqsx90kzczkvwyu84gke59692ttk4ghh77sp9cpmynlmqhs0j423a', + 'bc1p0v3a8mc0yytwt26zxyjjscvw3apy56tra7hd0vhdrnuggy5pxgaqspf88d', + 'bc1p927pm4zl7t2qqrh77dmyl2vpesx0gm50ll7u26rp0nle4y8g3tcqn4ecuy', + 'bc1pnwu72ud69pleph0mcjqht0ckt57wkzqrn6n4yd3ltkkc9rpujj0qgswzhr', + 'bc1px3w3hyhlaxdlwacmzxlsdmaqymzqamcgwrzsslvr7jv62s9x8cwsf3umca', + 'bc1pavzq4xs02kqndgxhtw5e2h0sge85nqx2djgp92sd68fhsm0n09sq675553', + 'bc1pszzqthpe9zgws95580sp7uxylrdycq9p6ynxuuph8qvgjtuq6hdsqdgyqs', + 'bc1pddcp6s2z04n4dduljl25qrw8w9s7wy0k4zyp4r63uggc95z0jz9qhurtaw', + 'bc1phnsnnk2red4m46r5d8q7rxjj5asas8a24whc6ksm9zryk66czvus77m7v7', + 'bc1p6qlp254a34haw4yfgg9knqmulctamnldn5mv9r9lupc2e27prpeqmcd78u', + 'bc1pet3xftasta80uwvt366fz5py4ranhpq4zjnsrtacw67mtjzcn3kqw3msml', + 'bc1p26j6m2z3588th0u33as6a4gy9undawswga8405hq23ak2y6mz6eqhnrdpg', + 'bc1pk2cl9d5qz4zpw3fxtcpjqdgecg9s7du9gvj8ygfnnawcn3pmrvuqvjd9v7', + 'bc1pe7yh9y8z0u7t3hxds2ege2uhe3lwtz50mj6fuqn0yv97xazyer4qwva8f4', + 'bc1pujnqpa0auf9p0granvy477gu7y4tcwt2scrayzshgnr0lxx5ddes70hgj3', + 'bc1pr0k9wnm78qrhy9zxjxxm7tywv8xc72dqp9jz2gsz0cgtyj20rmkqctwr7g', + 'bc1ptmv4xztjcnlzh9y8fns79784zwjctxqfum8zwygmukd2qywsfvxq3vm9ly', + 'bc1passv8s0jsh5rwfrkmtpq9mxdfxng9vaguz0vf9nx0rg2u3w2xxxqht25d7', + 'bc1pcx4rgvxdv4alt36n6430aqxa4nqq5gjtmlfeqaehs4q65fg5yn0qp4lfg4', + 'bc1p9xp2nz48r5qul435w8ezh5pc2teqhkgunwtlu5wqffjqgde7vvrsjeusec', + 'bc1pf5ajz80htn2xawhz0urw9phz478yrk6fu274gt5gwlg8st03uglqpua3gk', + 'bc1pslhqk09v6l7g9gxlzu7sk7gdjwstf90k9ga80dgpe7cs0lt8ftksghavfs', + 'bc1ppw0pqsnzct3ydrcya0zffap5pzd8arappv5c76yddkg4g9z98flqllc9dp', + 'bc1p57lm9wgtvrqvqpmsl42gd7fuj7a880z905srj87sh4kex8pmmv8qskrn8n', + 'bc1pcfmkzd92jkgn5ccq58rvxgclnhwznul7spl3xyj07242jexv4ggqp7dxu6', + 'bc1pyd5vqy48fc2dkqd9gwpmqh32pvz4rpem99unzvzqghlzj06403eqkgmnrw', + 'bc1pwk34avuw0eezncy3vpx42asffe49466peushvw2ume28p55rfykq8cca5n', + 'bc1pnj9k9lxufc2wand8qmpq93xyclajgpmmtlcdxxrrwwv0dlejj82q2tz708', + 'bc1prkuk46zha0tynl4ye8wunpr4z077wfr79gn7wlf7repuj4k2segqgskxy2', + 'bc1p43elyt4xu6675uqgg90knlqsatl2efwe8rxctdpd7vyu0nmx2wsqy5kn4v', + 'bc1pudep5uxq94f33uuma0kcglyfm9uhzl0v324ajdgvd2p4250ja5hqra6c94', + 'bc1pwwx2gdpnglxz5g55jc43zjv8gw5wj0gl8jmudmzezwlmr5eknfmqxhewqv', + 'bc1pftkxdl9r0p58z2gtr3qrm2zalsy55skfupwlxpnagwcdk8a69k4syl7q0z', + 'bc1pcp9df4pzu9286kulz90dd7rvjqsp7j96n8d99avcv6y6d52tpkgs9dssnw', + 'bc1pa0cmdxw6wpyt74wl70mwx8xvmnguch7vxlt765c9zv9fphrrntsq8l58ze', + 'bc1pkh59u05ayelaau7ed7vhnttd8ne8k490eynxgn6mlzzl8qe74s6sy6hf9j', + 'bc1prtsvk869ppkyezjr5gfh0md5rd4f67uapv8jkyfwfsfzeh9ue47qe4hdxs', + 'bc1psnfhufxkagpzf5wxuf0uph9ewfj3v6e7dst6m69rjuzj6jkge05qu9fgj3', + 'bc1ps8u2rqyz7hmvlwlp4pltut0wx3yfs0nfljsgsetdwe9aw6mwrgqsy98c34', + 'bc1pqll3wtcqghpt4kwdkq2su8xecrt0k2a7khwsvgzh76pwfmpcav9swsculg', + 'bc1p6znqe43w23psy9ph6u3c5qay9f046h67mm3e6fnd09pq9hxvpwlq7p5p2s', + 'bc1pvhsfaq4rfw2lrr56rjr5hm6fkpekurs89lh2xtuetm7fyjx9nm9qzxvnwp', + 'bc1p6ah9jk8f646j9dugguryg9c32asvjdwk72erkfe6avnxkzfkn2jsrsgym9', + 'bc1p873jgpcamw4jm3zulshfw3x6vc5hxpzv6twgrnjf6k97lef2ax7q77qsut', + 'bc1p92yzefhg4zhtgg6ja4xtz9rmjnl0d2v26880y4ca0qu9p2kq7uaq92tync', + 'bc1pnh4uwlmqp56wvrg45ff83dlu09aev70trm9znrkzsc4rnwaprstqh0c8xk', + 'bc1pjtmkcudjaey6pve3qps8htpss6epmlf3xa53xx085gj25plezqrskgejky', + 'bc1pl9kqpnnaswvwhdxyvwpszwlqyhsfvtsnhfqwvmdd0mm8rzw805lqmu2zuc', + 'bc1pp7e5hgwh2vl52zmtsg2szvp0ls6wp6673du2qrmh3fy25u25qw9s400mfg', + 'bc1py80nuvk2m4xns6xg5l0k2wdtg7hath6lghcrupcahr8knlyr6daqljsrqd', + 'bc1pmqepnfttfrjfzrgg8expazwlnhq8z5velc4yfketswy8x70qpvkswkzxvc', + 'bc1pfh24d0aej2sxlck7saq4e446dkd8lnmqlltpp9d5tp5klaqpfzeqjqhyw0', + 'bc1pf8aw2ktm7wqyt0pw3gfv83rvj9gsg4k59ug6zxsqhj24crhsg20sjws8sk', + 'bc1pn7964f7usyktfl9l5nglv4zl99892ecureesftprzetdlcnqxl9sy95lc9', + 'bc1p6zs0wsd622avlh4r63tllma9j9sjc3ggealwjh3axa9gxe0s5snqdgqx7w', + 'bc1p93qdxz7t7na9ttvx4qrfd068znpftq9yp8w2487zp49rym92c9dqz8ppvr', + 'bc1p7drwu6ahwg8lxtfumyry39e2kysam6fk5l44xff6d6h39uh86w6skqtgy5', + 'bc1pm6n64jew63cm9fxvkn65aynw2l27khp0s8s8eqxl647zqje82t6sv0csp0', + 'bc1pcyftl5v96ap8w24x8c5ew7csggafvwufuvwgxn5hax6pvceamdas0gm2k3', + 'bc1p5rxhyx93jjzllkg5694uqhfdmz9ulmzcx9ly0tndq74qdlw6m60sft9ak0', + 'bc1p9yyplz4tsytkv548jxcqphntj7n2dyl9fzlxrcnngmzl6j4txvhs4whjwe', + 'bc1pfnqw4k4ecpe9w4n3rdgp9stuqaln95vf8ymwwema3h77e2p3fhgqf08zcz', + 'bc1pg4p4kxs84y39nlwsmxn3kd97g06wy63zdmngq9kceqpdctn8v3cqc00ddr', + 'bc1pk3cct9032h204zpqu3cywc8mak9pscys9hgkcqywhkw2js0jdw4saydwxv', + 'bc1p5dqqeq8mmdydadn5cmw8cr4vphlj4wfphcew7rhkcdyqrlxx7uzqxrsxf6', + 'bc1pku0da7v2ngkpmsxlhgku4m2gh2kfnp596y2ura0j4mf5a0xfs82qpfqnmy', + 'bc1pn9muhfua9s62rcswgfvnuvlkqn56hhxuu6yxqc40c7ktamr5tp8syc478k', + 'bc1ppg6yaewsrtpecmw3l8ayjhlxdygkflwuqmhl6sdrprrzqmtuafks5rn4wl', + 'bc1pcfe83gn6sdlmlv5tggeq60zw5pe0j0puaxrdsemsw3wtcck9myqqsjvjkx', + 'bc1puuquc4zzusldlmf5sd0ym6hhyh8a6zqufxf8qu2dxsyqlqa7zstssm88dq', + 'bc1p9vgpwl6pssk50vcfcys36f8yq7rllc007pg9xulvmyn5686qghhqhczsqr', + 'bc1pewyp27d8td020sq5f6gcepszsqz69zre3894fymst4rfawudr7fsa2h8au', + 'bc1p2vlx46mxmzeep743p7n6584ywjq8agpy9mvg5z5gsq26ch306wxs84rxkx', + 'bc1p453r94wgvd4qydu5ayqtaxujdqj6xzlfqupm0cwhpv00cs69v3zq76xldm', + 'bc1pvtdjphcexuuhyjwzgdfq73hed6dhd8xwa04rtq9gl7zxtaej6syqlq5320', + 'bc1pmspq2ref5mt3lxlzwgq7e088cwju2y9yj8260t7g8k0y80lzln5qwqke6t', + 'bc1pm8uzu7ffl6hazddrjz2wq6ns8dtzdexngpj4wd2sqlme8t0jvrgqau2x3e', + 'bc1przd2rhcnewnscngzxsxp5yz5p9k88hlknyl29k7vgq2djq49a7ms8q23xh', + 'bc1puelp7em5krt64c54ay7q4r5z0wg5p39uf50y669elykder235fxsxq3yfu', + 'bc1peje8rnywzmca66p577prd93z7uwrz70wuesjxa8m8aqrngp4kxpqf3ef45', + 'bc1pxg6t8qy309y8ehkzp87xlwf76c7ue7u2u9qzw4c7ghsu6t4h26hq248k6h', + 'bc1phu9zk846z64ysn8u9lfkx9pzf6na6nq8uycd03rmjs6434z2ndesyfrvpw', + 'bc1prwc6zc70spq3n3sjqtkx8we58dcg4lcxghwlch6muz0tsjnsd69swry2tz', + 'bc1p6tdu7nkaxhuee8n7zv6j9jtmv56mdd8a6fa57p72f36ltqp0dp3qe6dzwu', + 'bc1pqq5m5nc938xdacw3msdva4hx45vmamgzjfrpz42nyg5lrlsq99nqtsklph', + 'bc1p6uzm2e837zyqwe2awg0dpvsfa4akk0xehcdq70c94xqfaqhe9j4sz3kjk7', + 'bc1pj3xa6mfqv4krrfl0vmyf9zjvhpcsphtauvllv5e0unrnqseke56qz7kt69', + 'bc1pzllsl9d36pff8cq5klfnhn3p2vhl80mhwg5u8cql60dldfj9gr7q7selqz', + 'bc1pr9muzns9lafvyxl5qa2xse5ydgpcvjxxqjd8tewelgaa3v5fufhstsuqer', + 'bc1p0huwn4v8dsp959d3u5te8t6d992cy3uwwkj365els6qn7tudl8lsfqxg7l', + 'bc1p7n5rmt74nz2h870em276w48rcv7t7kgs6lxrajdcv93p6h6pwpuqhxuy85', + 'bc1ptkfcymqjd5ehw2t3trz6etu9rvcn0rryarkx6dwqy3s575x6twjswarwj8', + 'bc1pqnezmvet0l0ef3aan8cf3nampn72ah9qjn9da5a5qw4ljrlxjmpstes3h5', + 'bc1ptrl567f60nswqf7s6mz2vs5swj7c85zzys49xl505elll2rpszzskkmeqv', + 'bc1pu0wufndhwk2xa9vs5hesxj0dqknl37zzpuu766dgp3waxvwspqxs6f9hq0', + 'bc1puswt8zcdmg7zysajyxff4w2wwkzh8wtlcwgamuvhnyawr9lv40zskwxgh5', + 'bc1pl672vsqzvq6n52r8ltqp3yysmlwyh3tqgkpssyef89es3ts2ny9sfavpuj', + 'bc1p53d9ren0ytuh65gpkzn5mdq6fqye33k5daf09t46e7q538payx6s6emfxd', + 'bc1pywezkydczan6evpqsv2p76xy3y0z9hukjp4truf7glcv97gv6zssg02l2s', + 'bc1paf56ayvszfw98qx0e7xc0l8ygzuwt8qwnm0m23gps5efprvxgzjqdt5n6k', + 'bc1pnswdwtwwts3fglgmk45t8lmgvt5780hgjdff488cuukjnrua4tespj6t8w', + 'bc1p9rjdnmppms4j4g720zl65y6459qknqyqnh4whczdv5aauuuxh2jqwtlc9k', + 'bc1pfwf2hfylprwxxeeazauq896pa0cap38xtjcpxl29s9mpmzsg8xcq6h73sx', + 'bc1pd6s7cp4c6zdxzslk4exquyf8xujhuv8rm505fut70kf7z8vrwn4qmnd2eh', + 'bc1pepm4h223es4xs4h6w55f7ydeccm2kerx4mgffvhml8x836lmljusxd4maj', + 'bc1plmnedpm8fs8asevrwl03wx8sstsr9krk7dvvt9qy2ryyrhktudnslcdre9', + 'bc1pg7ntrvvr93shrn7lncnzz8fja38kk7fqq398mcww8dsq8ngyph4sc4gdyh', + 'bc1putp83u3saqptzxlvmfs2ldr2v3k7w5h6cpr0780n6shg0uyef3nqe64lyk', + 'bc1phkpad7qh45qv5fxpt479d5hs575jryq4u8jasqdmndmpnrgs922sh79e9f', + 'bc1pdpunm0rwr50yerfres8hu2hlrk7d3cqnteyuuyrkwhjs7aahv52qfmq3ed', + 'bc1pqnfak3zeqd44dycstxzs9wj2tf9ec9d3v8l5z4ref59gmzms7t7ss6cv5k', + 'bc1p46t72jvwknytr67d444jrjs4322z4z88rfmdt3aesqv0kmxrag9qa3ykmr', + 'bc1prqtx6dz3ujkhrh99vywlhc29m95w3jpyahvkyu3zrfgyhh53q66qsr65va', + 'bc1ppedswh5hn89ehpj2srcr05kcc0yskfwuzk8j5myc3mnt3qw0d7zsgwy8p6', + 'bc1prvcezqavsz8rymmez7mtyremsxwwvs9u2jkdzmnel0mp507tweyspd8luc', + 'bc1plce0nafqhx9apc7llnuu2lrflm5ezzvrxvxyph9g652ewtggm5nse8c04w', + 'bc1p36tjzzcwv3r79h4q559a3778fkddcsju3y87enqj0slx8zuh66vqf4d8jq', + 'bc1p2vh6pwdehq04rtm6e7gv7kckddj2mtqxekpmwajcw5nrxjqt888qnv46ta', + 'bc1p5sjstu4txplzjfqrrhjzfc6gudrdeh0fkpdgc5fvtdnwzemv5qesdrm3vf', + 'bc1pnv7ntcuqedexfa29shkktup82dmgycl6fhtuukm3ysepjfqp4qdqv80n8r', + 'bc1phr5z65p7lvu33rdc9a02mgdx3wnart8lavr60wf7n4s04qf9rwtqcatd7x', + 'bc1pv57tzfsrm0p68788e68d8wz0rahgqzscmw7zzc00u42fne70f65szuaxnt', + 'bc1pr9n3fgm2ar0t5gjpjt6u9dtw2dyvcpn8ax58fwry44yxdqpvscxsn8ejkc', + 'bc1pnqyytpdnfvakmr5nh6emcjnhqnxh9z94674k7z2y8zr05zrw8egqmk9fcm', + 'bc1pe3an2yh72wxva6m9gsf3ds7nm95mqsk4affc7xj9zue7m3zgwgmsfpsqxj', + 'bc1pv8unzcdqkpezavs4wpqwd8asypg9g389s724x0yn0unfhkx9g6psqhryjz', + 'bc1pm73ty6xd95xu96hjxetqmuydh8prk7e4daepg8w6n9t0uhnxez7qyfeye4', + 'bc1p9fyvcd5deqks7d0l6h38wzyglvlyhp6077f8rtzw95ut0g5gaussy2kj6m', + 'bc1p3rl6gauq9srgx9l39zy37vkfluvynfkdp7gtw3h5250h7tjnpfzslkzhwy', + 'bc1pe2dq05emu90krwshwdfnscr9mhtdc0ushxwdw2l9ntaxqzk5qy4slxm6fj', + 'bc1pngq7m0fmf7c54mccgcsxufqh7zszfqksd8ed55eh6mm050wak9lq2azyz4', + 'bc1pxjfk6knsqr75a9st7v6fkmve76jkufqz3hyrwyanauyqmlq5q7qs58p43c', + 'bc1pweqvl0eqzxmy7e3frktx8h9gefha7r733qptuku895lxrxl08kuq2s7jxn', + 'bc1pjtr5g90kh4793ajqq8dd27vrlvpf2j47p3xkaga5ryedcvpx5mwsyl3v79', + 'bc1pkn4rz05m4cfkw3mjhh9z43477868xdjrzz0dxjwkjrq565cdxx7sw2reag', + 'bc1ps3rdaf6g3hnqz347dw8ljk0z4y407tcdkk82e84eqrqdsjkesrlqdel9mw', + 'bc1peg094ja76hqj5d9y93rdgrls7uf29rrus3nrkyqqz4ms9ang638sdj32jh', + 'bc1pkfhwtr4rn6nyl7ct2yxxglq60qr0nusr2zm5t7kp98mu3w2uh3dqzvkjjn', + 'bc1pytd8ayd6fut06azy090e7g35xla9pcd2lkje202cm2p9h6g6sddqmt4ctd', + 'bc1punpttta0euqh529h6jcw9h3aszag7pf89kpf2mzw2t3pfcwa0zjqp66sjq', + 'bc1pk9kgvykk5l8409an8nk477g33gn4wawhwyup4smqf3ht0czedm6sqxyqkn', + 'bc1pu24tqazhmrgsv7w0kzm60v84cn0mvjfumltnvl5n5j7l85yxmmrs8rqa78', + 'bc1p8sduagt8hwnkc3sz8a3ss5vqe75sd7lp3r5ux6ywmlu0c08677jsp8xy5r', + 'bc1prmy5agjlp6glvr8eeh3rgkfzvfse9kcn5jw3lene256ht2dmqmxskxn47c', + 'bc1p9pfde9lpvptkxku9je3e59fle6jh3u03x68lg9tyrl4jkf7ve34qysmppz', + 'bc1pgjcqynw7u7s69y6384vxwl7t6u87xg4z4chm4mumncfr0xh0xp3shcsp0s', + 'bc1pljkmur34sez8y4asrk3w9v357vatvacspakgl2psdhhrg3zhehdsp3k5ge', + 'bc1pwfhvxgzkpcn4r6sl732spfy2ppfm7xds5j3cd7l093zx5n8j4j6scpwzn7', + 'bc1pf56cfl2fugk3rr8gn2v0w5qlhd98szwcrsays45ncgyzjhyyzp6sc3f6xr', + 'bc1pvzxfw0gtln544w5j9upl5usqyqxta2fcet88dd5658zvjgy9yucq6vccla', + 'bc1pkhjh99j6hh703a4d6k7zwdaqsj3kk0llquemq4qguhs5023384aqjyam3v', + 'bc1p3dtgk9yfkj83ru8yxan2mssd6ajn55z89y7a2wqpxwjxlm6yf6jqs2fxka', + 'bc1pwv4avw5n8r968ds7gar2prre6cng53nlzpyvcwp39sz8hz4qpcqqe29aj9', + 'bc1ptw7t4ahzwvun40p89j8vav880ky9trfp4c8pjvfgthqwrt6zem8sefnkce', + 'bc1pgfke95rd8tn7wg9f3nzjlwytschl8mqle26zjwn8lthvary57n2sw9shxt', + 'bc1p89c2yqhsdhgkpw463gvc7at6yxajj52av23exjsgykmhlwt3rpws6jdq50', + 'bc1p8sjqjturwayk6d88at3ypwcegzmjx0wyhwdsrttnrugh7t328pxq3x5gt9', + 'bc1pjpxvl3v0dfkjhhugjds3lnjg0j3g7kdwjjwke725jft3hhe8v8yqm00mnl', + 'bc1pvhde7d0h8h33mnhjj23vfjjr8l4kuu6xk3v2lmzj6532egsysqsqtdaqme', + 'bc1pnhd0pq7a26hsvhav0psdgqkk9we26cf3cdcmka270yxw0a4es54q33wa6e', + 'bc1phpu50k7rh0sdv2ezhuznkjrz6rzm6n4jt5lr9aezccs9uhqn9mfs9falq2', + 'bc1p4jq328ew2e0zptqgq9gza4tcyjg2hknvdxtsft5cxnayg6dsapsqwugnf7', + 'bc1p5l5xl460ezjnd0j9t7fpj9qdpl38hepuprgagt9fp3rj527tn5zq5r2jsv', + 'bc1p6n86rrjqvla82dypv75s29ndugev6mt0j0qwwhgkn9guw3zvvq9qz6phss', + 'bc1pt7pwq3en6na0g9n9d69ple2c0m6534fcwhh7nzd45m7qvztvl5mq6za46x', + 'bc1pg8ddz3lgdyzezlrrc0xv6ur2e5l94ymz3rqhzeq6v7wa7r0haqusgpvzqm', + 'bc1p4aq7du7juypnclpjush9wnr8y432zn4q4n0wx8sfhr6rx0pasacsaf8d6w', + 'bc1p3sggrqwl0d9kknq4lmlllcr3eq62rjp0r3je9acyx9xql07envyqntr8cy', + 'bc1p3may9yjw6lwm80mlfx7g9z8rxgyd09q40k7qnlkwhmzntjjk6lcs6hupym', + 'bc1pexjyhtc4gl5ngafr5pp9xya9q6h8x5kj386jld3vlemy7vjx834qf2lpws', + 'bc1pnlwlh2gd93g8smc3j2paaff3xdpxlqaqrym6ya77mflfkc3xs6dq0j572h', + 'bc1pntgtj3kk8yf9pq5qh30rvmn4zsfcjgzz29ch60pszt35df3jpgms9zyt5g', + 'bc1pwr93d94pfy02q9n6evc0d474fpjyz0se6fewf9le9sk2hzjgxknsvhpx9f', + 'bc1pvzzttfpzmwy7dpr4e5nv6uewrvv727mjhv4pzwv0kprq9xr60dvsv6kys9', + 'bc1pe39kat0zkgy89przhe2ff367v20276jtqal3g2jmyew7rfkzluas6uqs53', + 'bc1pg2f3h2vvs33t7fp2nf2ml9xpyxh98a0fc7mu889tvmwc678wjl8qmevpws', + 'bc1ps5e635jjfcme8ygylusqwfk48zf0552al376apmaqdvm3ekvyfps8zcthj', + 'bc1p9d94cj3s9f9pw7p80au6rqvpsvn7aafjgsz5tcwnlmh5lfca8rrsp2m0m8', + 'bc1p8v7qxmwt5vgz5tp2s9ay9en2sluj76fua4nzdjk2zlz5k3d087jszzvwat', + 'bc1pxqsvu5zzp87cvweqm4ukx38c4lcq6tsk6q02gvhe9d62clgx0znsgc8haj', + 'bc1pj6yhajkas7guvt2we6nmh89sqlnxkdxnhkrpnvk8acc89s6fjvfqz82px6', + 'bc1p0jrejp9fdujzw733vyxt6hs3q6q96yamu07nmvu84rakqutg380q3dlx0z', + 'bc1pa3dc5qjugg3y66fugahr3uydk9m2vv2sf34j9zhsk5e033zftmmsurr38f', + 'bc1pppffv2fgmryyrv3e2qs5x5dj95xaj478e2s95celpxf7twjyt6ksdlsx2v', + 'bc1plculyece6g7d2vvmgpm3d384uxlq65z4jd2sfsrvh7svwatjaxwsuj3gfu', + 'bc1pjmxynyrn2h3zd6t8mjskp5xfayrsnplmnvvutvl2pl8kxj5l25tqc3enkq', + 'bc1p2wcyqn4lcs58k38g6vhkm2rtefx9m9n2m2np76dtf6u83m3hlq6qstl0jz', + 'bc1ptkpw0zuy9207p4zvmwsdk3kyc5eafzl7ld7zna96z5syx9vhvhtqwvhpwa', + 'bc1p2kzdcaxdrvuz2grejk0ylkel387a5anr6xerqjf7e9us86u88kcq5ftk4a', + 'bc1pjtr0l29e2ghxduh0gh9jlj5v6uetp26666pmce299edevprpqjzqafahdp', + 'bc1p6uugyyp79dj5czgttrgq2fhavdtgr309skp0jejs4tnjnlxh8e2sek6pgw', + 'bc1pmarkag47jclzfgee3fes78m77u5mshgwn7h4adnay39k88mg7u4qth9ug6', + 'bc1pmdx3antnsmmlq7r9rufngtzwck94gqqml6st8nv0gmtj24u9dsjsevy8a0', + 'bc1ps89jfj65ephxq22kgnjsm4hufdxrf7eksam4kkku8r0gv2skztjq2ar9y9', + 'bc1pruzxxz84e3t6d2edrh24vd7av372v05t0aa30s36nnvq6p29rzrqeywjwl', + 'bc1p78dgz0mtzwxunvpen7a0ng2ey58z609v3fem5muvg7gdmqguay2qx77n6a', + 'bc1p05xcu6v7v84w235fvlpm2era3cljz3t0knyvzy932y6jv2hjse8sqt2l8h', + 'bc1pk6tj6tffsdw0ke3fllj6u8eafs6pwxd26em963ntewtdgx0mexksy6ds20', + 'bc1pqz2sduvdhqpuhk69g2w2u2uc5knwqza8hkyatfs5fg7nulek9j5svpn7gm', + 'bc1pd6q4dv5nmhcpx7ecnhljmu4h7szrxu9gqhanydjqwk792y8z2a0qj4l0gh', + 'bc1pv839nmpxvh7n4gemxeemhxagh62uuecwx0urvvex5n2d05txdq7sqvdjfk', + 'bc1p6865f9xtpe6ncjh8y9e76a03jj2s95rwy9503jd28tlksqspnruqun75df', + 'bc1p47cg4uhyaz74yhkk0ha0wjhr8xsfrjcm70fvewm4yezuexdaawmsnf4pzx', + 'bc1p29mx6h5p80fg623cknr33y6npnmw73ms6zdg89538hpdq7ng8utswa2lck', + 'bc1pg9jyr4ahpmvw7su4vsdypthglgk8j4c96gp0hrzymek89rytchyqpncx7u', + 'bc1pzzpkkfmjsf75zx0welvfhyru4xxvk5pucs0vrdlueyfc3mcjlq9sqcu9s2', + 'bc1paksx8j45dhtu5lgarsz57xhf0mnytxn9al0yqkjk3r584zdpcqxqqaeh7v', + 'bc1pvrw4x9ln7668c9przpkeg95lzysj9ukcdxa2v7yyz6rnpwjs9vlqhccyfx', + 'bc1p2hg0we6xefcfdt09sfwgxaqm2l2qhwj8wm5rsdrtujcwlzs9mncqtmf767', + 'bc1pus4a8nx4guuq6zvdja6gk2cv90ckjr793h6s27gyhwevsu9rsa4qhkwptw', + 'bc1p6lyxe04l73xwtch6wkwdpu0vgz8f40wle787qrnhyqsuya7t98dqwfp49x', + 'bc1p06xjlrmhlyhwpxwssax8pmxgewh2y44wrvqmyc8r34hxzp9rsu6sk6upa5', + 'bc1pt5ljexu5ucshrwvd7807nwealelhfj8gtjhv0tkh4xjsw3z7wk0szxc562', + 'bc1ptze5c73p8x6nhhsjuhvds6t3a3xm80048u7k4hxx2rn843dmw83s3tvdrj', + 'bc1pj37ufur8e2udymmrt8ee3m80lkm93umclnzyg9qcd9kaztv4r03qmarjd4', + 'bc1pj7edu2kahcy8prf3c935rrm3c748hlls45kk84yxae3khnl0e59q9ns6x0', + 'bc1pzmgvh97jg733aex4753mx0ah7tqqs93flfe70cdpyvg5hpq50slqtr6ght', + 'bc1p4havj4f9qxvxzd70e2wyz7rzlyfr0fnqk6d0yn4ks2yjrs970lsqy6pe70', + 'bc1p0ykpd0n0cyfggp83unsv55ypf27znra2tgtgljl3mzj8glfvsxcs2yql7m', + 'bc1pmqt4ur0y7sdqydr45mzpy2ll5e3xrqf4wrfal842cyw0rf4d747sk8thwn', + 'bc1pkguyvv43m34mgpph865d5mmesyfmzymmxqt9ex4ewyakh554uwgstalzud', + 'bc1pkewdy7ees4e7wkd7w5z98z02w6edf0rlnpmekdp37m3ttt6sqz4qgsj264', + 'bc1pem9ud098dxe8x6ytu8la78jkmdkkyhu3xcmvg8r7d7qkcks4v9xqsdusjx', + 'bc1py642vlh97zlgv8ezuukhfyfam3n4rpnf8gzazw304v4kvkjgx2tqedth2j', + 'bc1p57zkyepmlk4q8fuk5ghruhq6ha48lnnfl9celjetlfg0hyujf7lq9gu92k', + 'bc1pflfd44je7y2jj4dg67lzfvx892mcszxv9h0pp7z0majvkefc49xq9823yf', + 'bc1pdtynt40gzwqqm9cy04ksn80lxthxawhh2a3phsw6sqnzg8j7cmlssd6u5r', + 'bc1p4c2q70mljcwgyus8c0ht7knml84kskudqflug8mzdqcvevk8n69sscj42r', + 'bc1p65hx0xc2f4xp5mzyla050zqguw4p887eymu90z2pj6us4xpyhljqrq3ssf', + 'bc1phts9v7k9gr65nv7x6cznxums3kkrq0mtfx3ctqta3jx3saq9w9csmhe6hw', + 'bc1p9ue3hh9e8ulxvrs6utrfdfk4uq0expgg6kwp9p59fuz7hjdl0lrqvpjupg', + 'bc1pwdvlvlgglkmp08fhathyfdumkpy478a5r8qf6wgydaf943waskpqcnl5e0', + 'bc1pdlxw48hvh0f5axe3xq4h7aw0zc805u20q3lw0tcjmvvpsqrvx9lshplgk0', + 'bc1pc2p0uj2wy9vh5l9x2rg5x8g76dajxlvlm4pqkrs9hqlylrkagsjqyy3e02', + 'bc1p2f43d5xh0mr4d5vudrhyzxuv38k0nd99k34zvvepw2lxrxyftupqr44zly', + 'bc1pmpnvnece09efs5n6evzk0y8lajmuqyctygl6wqwmppujz7rx7xqqcs0l9q', + 'bc1pnk9849p9htufzskdcnn3teclmwntn60x79gvvgjhsgu8vcwghaasvcn87x', + 'bc1puyv3mtu8x5l59ujpxqvt3xr2geuhvtlmfveem2y3rnq8slrmkq0stg64uh', + 'bc1p0wnkhf2yzjk6r24urt3l75n94ead7k08ktudsvuuytx7amt2cz6slyh3r0', + 'bc1pwevlpl92ggut0ml4y0cr07qklk58726q44z64a7xgrrpelj20d9qk7cx4f', + 'bc1pzq2ekzwg49eu6sgkkp65sxhk0javl6586c9zssda0s9f0ea48y8qyyj00z', + 'bc1pdmtwu44chk30lsgj3z6qg4t72h6axsq9rlplppmp9yw06vs56p9q3t4frw', + 'bc1pp86cu4rxw7hlkla6v3289g3vjrcratukf3r8vekxfn74ywhqq0rqr4nkej', + 'bc1ps986ssqzvrj6ysh5rvva5cl8vad37hse2pgptd4a0txhlfu77jms956dlp', + 'bc1pkep6awfz623ufp8dn25jlnsx8283xs3l4rtj3aygzphmdpx0uags0ua4kn', + 'bc1puuyetydr8npfz7wq64u52kewlw37v7qc48sjaqtfhqedeyqn32mq2jcn37', + 'bc1p5f5ccca4qxscr6n6e5ef9cru65j744haegxejhshpcdeh82w759s7n5pq3', + 'bc1p99uf3ssxjkwmt4pmc28fmpf6kvqdnyl8zng5wvayk7gpsdy9h8wq7hwtqe', + 'bc1pp58akfkwn4n4e92ruwgp6s3n5mn6t3k86f8wytm3jz2ma8erqqes7xjltz', + 'bc1p96d78ym97vnmfg08u6r7tfp8uamef6cwy07apmkdf9asjrt9kalsgjs8uf', + 'bc1pqr0hapsrx8a9ua52la8xjjgv5spsuls0w3jqmjf5deaunxctwtfqhy0mx7', + 'bc1pyz9alfcct9ly90qtlz44hnnu7kx84aa7kaa3h6ufcv0n4kel5m8shl9j06', + 'bc1pc3yvcp45ewsftesep3g5z2vfzq7q2p35saqc055s6w36n5l89sas4syqru', + 'bc1pdjckvjuejmq5fv2x7dl9zg03qprxk6sfzz405l9l5f9qxuq5ftsqj2lmqc', + 'bc1ps7jychcgxgf4n7zeu4s6xzc34v5ydtls7cu2q879gy67e037uv7skm6f5w', + 'bc1pvmqms56ljkr5g0hhd22a34pa3552r8eycsk2wlawv0g0ke6zg4pqahga7p', + 'bc1ptrr30cptrntegm7tqfeuh0hcvszfngl5j8sxngw93cusrmk3hdlqkzmtq4', + 'bc1p2hrha5jm5d3f000tuhcf3aleum3m9xw484zyupj264l6gvqy257q2q9wmp', + 'bc1p7ks7gahnff2ze605lkfmat052vyeunv2579ac4xw34kjcxczx0nsh492ra', + 'bc1pekrfdkqp5ng5kht0974fe9sxr26xy03eegk6mft49a6lr4mzp6uqfc7zpu', + 'bc1pjppjxh2upduhx5y23ahufuc3pm8xycxudj30avuy2026883pt8fq5ue9ly', + 'bc1p8kjy8g8plvt9kdwvvx52z0vdpll0vatur70xdgj3ktcpkwjzk7nsc62zrh', + 'bc1psup5tdvss5cjhj8tpatkh8027u5z4yf2x3lgqva6fcreetvgvvkqfhu04v', + 'bc1prcwfjnfs5kytyzha5kkhl7kvjll6mkljuphra3tayxl4rp9kzncqsjthca', + 'bc1pn0t3gnppwvend3zyrpa9z6tfl0k3xtclg3dw863cxw88z64fhf6snftcp6', + 'bc1pe2jqyw0v2xp7fz3p9n7lmv43dczs6r3w2xy5p902k38maa4ketsqalrz0l', + 'bc1pufssugm0q83awnk73d8zspkwdjxew3axs7d5ej7aueuhyt7glwvscq4fls', + 'bc1pu0j6zsglmx60psfh9vcgpkzyf552stv2wwtzy5dsdf589nghmj3sv4u7wh', + 'bc1pr30wpw5qealzj33exwa7ey5p38msypp4tlw5vkhlmufcuqrd0wzsx4ay84', + 'bc1p0and0xyl7f72844aamdaehjx500p9xfu6gxvcxzvwc2dzu4ht44s9gsuar', + 'bc1p4td9y05qtp9rwy5fczfunph7utsmw2zl0waey7gfkyfddky4lles6yppay', + 'bc1pxdhx6vkgp7xjptgz29xj0xd6p7jgtlg04xf8pvsael0wtef4wqes7tegu6', + 'bc1ps2g50urtmkd473xc8mugqpmdlgzpsa224g7mjettzfe86qd6wnqs0zc0q7', + 'bc1pf43pqfuhsvk9k53jhmjgnrjmqevsdzj328etft358wzvyesxv7vqwjjuuj', + 'bc1pyk6y7lqxn94zzxy27rvelqzyfk3zqzacxkj6v6q6h6uxutus2muq9h6qy3', + 'bc1p7ngydy8tx6y8rrvseezja99aygmlpwuwsnshse5m9q4yfc9tx04qrynx3d', + 'bc1prkw6e2f8898lrxthx3pz8gny5x6q3yqgapty9almauswux84hteq04umz0', + 'bc1pj4mzxq84ljgjct4p8gwlwee3ku4a546hgvx7gqtegc8nutjurs0qdukeg9', + 'bc1ph76x8ejy77ep5mrgem6scsa6uk5uhnr2l3maqpqy95gf3s4qvy8qky6tat', + 'bc1pz3cql8sq5c6xdnrjmmca2vza4hsck6w0yqr8a6v29gezklvr3nrs3wnqkt', + 'bc1p2un7jha7f74kl2xysp959mqw46a56czy6pl8lfmfn0hzyavrlcesldqk36', + 'bc1pvlp2j2qpde6sezdap3vjxgdwyf8g542tqjlz2n477m6j0fagw0fsgsyft7', + 'bc1pnurgc90v686mlpqucgj4er8vx5c0wcu32ye8p0n0dsrsyxnysz5q7zsuw7', + 'bc1pfsept3yj6p2gfgf3azxg682kj77xpzj26uegsk0cc0j9fku5ynzq82493p', + 'bc1psu0qgleefylnw70hldsv76nckx0vnu6km8zd3gkqxeaycnkjamqsqet0ly', + 'bc1pt6glq4ppk7kpdgpch879zl7pswfykfc3epyyhfclxwp80skh4e7qvjnzn0', + 'bc1pr0eafs9m6qhg37cw4zey5xkekxqrwnt82aykfsyt7ucj93gndtysrzpae5', + 'bc1pctkw3zjsfswgzesx5lhnhp2zgqxg5tq5tnreggvme6lzdd3leq0qf2fft9', + 'bc1pzu4pmf2fsjz2ye847wqnt0s4rke58dfljewaxyltywm7u84uxt6qnevvcq', + 'bc1prj5jdcxppln79jxa0qxfm9wyv79r8uq3n0lluluusdw3203fp84snutzch', + 'bc1pskh7en4vrwg3acwmynasxcafyrfneqgantw6uhzvqsp8gw0hzy2s68l8lq', + 'bc1p42tyhgt8wx9h36mj87zgqpcqec2ljssjswn23ppuum8fnqk67e7q96k0te', + 'bc1pts9mhymmfg03z77jxszuy05dgd3ewkc2q08233e37393vtpes63skqexyd', + 'bc1pf4azn4r8sys8f47dae9246jhcxk7vgphexuyzhdfssjm0dtgwx9qpyfa0a', + 'bc1p30cwlw3juh28q36ap372gzh5eu7gs6c8fp4clzetm6knate5wrsqdeewrr', + 'bc1pmx8ekj9l42pucm69cmqkweuy2eknqw589prvgh08ytegdsq28udsllrhxc', + 'bc1p4qfnsg6namru0u5ujep876xke0vmlk3fgfp345m9qawtvn6c9llq324kwn', + 'bc1ppzujgd9etgpjnv05ewyvmsagyndz4zv2ycyhump33p7f06kudneqr73se9', + 'bc1pm33wmkzptfvjjlw5lar0wlqwvdvsy2r8f8azhgn0jzpq98eg3juqk77uut', + 'bc1pyd2r09jhdxv4netdph6jqqujr7w4v4n7zgpwx93sy93ukprrea2qscyyqq', + 'bc1p7emt8scx0d35gwtljwmu9smvgp8emr233rhvsk394rhaj2ueqrksuugfu8', + 'bc1petwkycr7dnykm3fjxfh7536cge4z0vta0hw2x78q3w22uf2dwg3s84q6e2', + 'bc1pnvv5sma90uvdu8e8p59e4s8ypz357dgh000t8q0p757dzkq78fkqc729pu', + 'bc1pvt6sgr3elrmwmlrvjjh3lwaxdrvuj7x2vppp9ufky78hjf302fsqmvjm0l', + 'bc1p85jrw6jrehgl63832mmxs03jh0lyg7hfl0024dcxknuwpgseklcq57wmnt', + 'bc1p87976l0zsalgps9ec675fa7fvhmw4fl9pf3ehnafupkqaa06tzvsxvsu3y', + 'bc1pc05kx76dcvhdktdhvnju2vhvrntqd70fp3hypzmf70efpq5mut6q8fk7t9', + 'bc1ptjf5a96e63jhzhcw958curm2n0udfftfjmlp2yf6z5f8nsqeaqss4lh3nk', + 'bc1pvl6c3yn9678a254wldsc9nhvaw2yxv0t5z5vpjrhfk5ygj78pgtsarlc93', + 'bc1pvcpt87rsyuwtd8z8eg3tx7xxmcq9tnyx6jkzw7pd9ar3cej792psameppg', + 'bc1p8mxm808dtxwd6v73lvm8mqc8jk9k2lvr4m50hx3kg43930kmfavs2xl4tc', + 'bc1p2afv7a30scmxan000k03984hwxzf9x6uv7wmkfxhl7q6f8tgyzgq33gytk', + 'bc1pg5k336s542nea9gkyc842e6n4n5gss02n3wmak8c60z3r85zhdyql9xacp', + 'bc1pladlfl0ja762uxuwf9cyvka84kxwtr657pys8hyhpd375w8acdjs5gajta', + 'bc1pv44elx479rcpr3zw3wm329qancwvmj9see6npmgkhp0f5yvrwzvqsx04gv', + 'bc1p50ec64v5wvc7dqtzlmmam08pygwlq6hyaeuvkdwwsveehx7s98cqt5m5h4', + 'bc1ptucezmwjuueug46sx9l4wf7hmuxw4g8xla2294z49lfrnzr70g9qpvzmh5', + 'bc1plkukg2vwu3kvj2gxh8szeewzhhmk30yecq302d2c7wrpsdjkwfwqxnj640', + 'bc1psxtf7cw34jktxdt5g5hydt87fns4p7x3qs8st8qmsnvjgg0gyehqd35km8', + 'bc1p4gwg274fns4g67g5h8lzc5qypvh2quyngjed9lfrjymyet78f9mqpsdh47', + 'bc1p07lkg59wtl5f67yvlycan7nv4gga67pq9gsljdzvasfhs6u02n2qxmgl09', + 'bc1pd939e48v8cgzefx533axv9d7vzadm94yh8f93e99fk7m8cdcg5hsf4vp7d', + 'bc1pr0ssrgstd9y4ars3ks7fadcanc2jy9283d7d6dqcsr8q6jqwjmeq3f9fgd', + 'bc1p7w5edmu8me8uw3h5kzs29c87aj0gyw9snkap46nkcx0ywn5xh90qhenvm7', + 'bc1puv4lhtukkuvkfcmtm38257ecpc39mm42f2h38pge4cykn7s3z9fsua5qzy', + 'bc1p42al7nkseh74cz9yc3qn4mrly3vqv8xlykxtrgak8d2wsak7cnqsu4ypt2', + 'bc1pf76mcfdy9tnu58s5g5ej4v6dmdyrqnjwlvlqca62ymecfnhqh4tqfdr6du', + 'bc1prdhygp2fmv4wlrr8t2tryvpcq7d4wrzy2q83k7jsksf6em26y2xslujrk8', + 'bc1p0r2d67jdfreyqxfgs2ywpedm0kengf3tgcpchft4f6r2csyk9ysq4rjh3q', + 'bc1p2w8s5dftsqylap3k9c7lxyu77jzhatcyduc2xspyah3wztrrgjtqgru0en', + 'bc1py2ker94htjym422lupss0vkc794udnulk2cpth275ax2w2chgpdsuuhs2q', + 'bc1pc6pfp38k92jxa6m2mn2vpc53p5380hfdqsa43gvkz5p53et08s0shwv6y9', + 'bc1p4uc96vts7k4twkyslfgjmsnd7ft4rzuq0hm3je0jhhmdsw0t3qjq0yhmrn', + 'bc1pjpqf2waep8t8ujqjx5ly78y306uxadlj2qafpwnhg4p0huzs4hashfs2xx', + 'bc1p69vqw635a7drd9sufa4yxdf7huk84p59zqj88ues2pzgcgq2t6rqap6daz', + 'bc1pcgu4ks2n7du0pd2tmy447zqadny7khfnahajzd4k4hywgpcu09ksmhjhkx', + 'bc1pnf8vp5wep895u3q76nazqyn9gghgac8cq0ezj7lqw0r7ug6gpsdqzgnkfe', + 'bc1pyw4kww4rcmunz5gkh5f7jh50sh2gd5gw6mmsxkpf3th0vk6us0gq3hcpym', + 'bc1ptent8vdwjvym948n2v0llhlyz8csg5g745gm4hkenua5sp02vc9sdvjvca', + 'bc1pzf4eyah8u7clkjsvq2rhqfwafsh5q52f55gnx0su4tqjhs2m83sq6v69sa', + 'bc1pvnqnguhsp4j3m456s7dh8dqluh5z8ew5hw5h93kdspy5naydkgxs00zekk', + 'bc1ps7yc7vzym3fy8ccsap9w9xcdel482lqpu6k863nk0jvxm5x0fhxqjtj2mp', + 'bc1pqv6vnj2ch3rcg32qq6sxnyq9vkvsgcvu38sqnmjgey5xtg2ycq5she3qc9', + 'bc1p5lt474mj0newptk4vwaayeeh38c7rwjnjg84y68gcy6hspg0nk5qdjvnpx', + 'bc1pw4558lhf4rlkeuugutfjmj05kgn76j7wy8we2ljlwlufkpmrs6lqsceelg', + 'bc1phk7vf46fyk3s98n6lagv6aaj9qnuk2u0y9979j9dp3tmp4nnkvusge73vh', + 'bc1p3papkjspjqln85ndzdmhccx42jfa9gty9q6j9hn2sdsq33sdks0q2lg6tu', + 'bc1pe9hk4tkrjml9pwkcyl62l6apudkggk2f8cqxu5qkzsp2d9kguksqnwnh3q', + 'bc1pnwqefa4z0zz8nyfc7y94qgzkuqwjp2c5wcm8d5th4ygzg32nj62qpzsfue', + 'bc1p5fcnrhl03z7xpvj0stylwgpt8jupkfs3prjk8d3trsgxalm50azsvsvwre', + 'bc1pl33wu8dh4vt6afsr3jr47298dsg5cjjjflfx7fylsl37y9zzaxastamse8', + 'bc1pe02f8skmcccqsmqmqwyakec8chsnl6p0x38yv6n30599687jk3gq72e449', + 'bc1pfelj84j5ted5twcvr79sfva89yxrxmkjemx93tc57xwx29l7khyqym3rdu', + 'bc1p5l627c88c5yu6eyerx7tptqmde5hzxdkmdpszkvqhzq9fgm8tkjs8y6lkz', + 'bc1p7s32twefk8ev5az4qvmh8cy7j50dx4ay56ke07rhy5sscnyvqq7qcze7rs', + 'bc1p73mfhvp3x4dpau7ck8mh5c5p068ayec0hzmgvjvxk9hcjxnfuhxq20hqvd', + 'bc1pz4nhjn5uz2rdzdkzu7zxvggs96xyaurqy859jzxmccvea2gh53js29np20', + 'bc1pl2cgdqwnww4cd3uc0rjvug3vca8m2n6sc6e3fyv3uegxmtd9cfkqtzpwvu', + 'bc1p364y9ydfj25yttc5a74v3r578nxcsk7gjnnmlhhqrtjpgwx0mwkq8u3c2l', + 'bc1prwve8c322evcp35wwh26rdpzkp9yvmdqkyqewmx83zpeps4dfansn8dyus', + 'bc1pfwaqqhs44my3u9xya70fsp4xxr7xnfd2np235tknvqgnvstfmsrq456qmm', + 'bc1ptrpcfx63xl4ulj00xvvhgs60zz70qvqltcx7ht4fjm92a6m4vpmqhwjrx8', + 'bc1pg7j0ppd3waktjh28ez5wts9f6fw6kj465064dg2pt8pyqtme6dqswdy9mu', + 'bc1pt9n0da6hdz2zjghm77226x8n82x54f25a80e9rnq30aw7sgfck8qnhjskd', + 'bc1p7l3flukmg8tk60f3lm0teku3mp3sue5rr3v52ju0x6mcj3qyg7hqscqav0', + 'bc1p6duxwva4gkekpdkrmquvcquqs824k8majkjt900gy7r89jjkym2s06gf83', + 'bc1p7csw4xhlunyxrk5tt4jjd8fwp9rxd09mcnnszevxd59ecmrgrdlqhsx3kh', + 'bc1plkuaadh9z2yqnqez7fd2r0quhyflsjmvl0pf9vrlcpvs6kda7c8qzfelaj', + 'bc1pzda53v0agjj0yyyu8zlanfr6tys7ma043af80zam44h0ph92m00qs66c3w', + 'bc1pt0gkgxtrvjnecxcdhakacyymrwl0gep3u4wmxkfh9g8wn5qgvazsjfzvts', + 'bc1pvekxald2mejnsc55jzy3gm5z6arx5mrujx7smmyqvmm2xevz7haq2ex8c3', + 'bc1pljaudz8n3kjmsur3rh6muggumqvrudrcsyjrc7zdjwcgmr8uvvhqxxel4e', + 'bc1py4kv8ee2urjy3fc58rfgylgqtqeckrugzrkgrjtgx76t3lx38k5swuu4ln', + 'bc1pwynqyun69vfc0k45gght0gtxgart205kc3xzz8q5u89vcmgp3d7qv073wv', + 'bc1pmc5lupjw6s7vg0rpnjksms7uy7ml2jvs82rk4fpl7qea0vene9ksuljxpc', + 'bc1ps0ezg5g4pvn9zknx0v2an8y7qywzv7k3l8n7qcmthfsv9349twpqf25t2z', + 'bc1pknex9pu5758ex0az6fkcl88yfu3k70x8fvhdwc9ak85gqegytlzq48cle9', + 'bc1p2fhf9cmuffu2xmfxr5rc03pdx9ej3e3e6d6ls4npj6wz7a4eqxvqj2qfry', + 'bc1pfkjmp89tyc3gj4lhx4jscl6ep3pdea05njsrckyhw948rkj9xxtqch5ucj', + 'bc1pfhcuemr7uq02keak42nj6nqa7huvlhkzplcfrfhhte3cw3paqtds2luqa7', + 'bc1pue6lh6kvchkw4zgfltk4rkg4f74t7w08defkhlxg0d0ys4q6k72qt469mm', + 'bc1puhcn4kvwn7uhurqxkj3cmnuuykyup7uhwt94pluhdxv339a48hesupqdkw', + 'bc1p6uk22jhary0mwn45372sh9zcql8350tkzp7f6qce8auyt3qszykqszm8nq', + 'bc1pkvqpehea6u26vw8tn6qned6nphe3jtpew92v6lgythgl9eh6qzjsrky5th', + 'bc1p2tlajc9f3tyrpqwtclfcfm3u6cey8es3uaafkhah5m3qwze8dvaqdaenwa', + 'bc1p6ckhtcvf23adp8trnn7kxfp9alteqgrk3qgzczshyfyfy98p6vhsnyaqzl', + 'bc1ppjfnrgkudhcgkyqllmp3repdnervr5qamp59plvp55t47q6zvqvqm53k76', + 'bc1ppa6zr8jlum0dpnl3620sxae4kanctujjfrzr2k79wlrpxfpf0uks96fy86', + 'bc1pduuxmdkp26vpf4mpwswzmls8gvh4avude7rngu386ygh6czgy26sycrf3w', + 'bc1p4l3esssvsknaufzeh2u335jjyqjqzhcqg4hadnq28907rmujxtvs7mlls3', + 'bc1p94s3ksd9lql0lkzzeekc9ukh59f7d9eq58a34u556knuw93syy3qtz86rs', + 'bc1ppc4a5nfee3fmsz8zkrstw9e6qaenakz623y5d23wlmm55mx39cqqeed504', + 'bc1pezlhpxn2umhgyxhvre34urhhajrxfg8rw73fk29pwe2w859vrgqqa2snf3', + 'bc1pmcanlzf4mwy73zlvcjrlasegt92s98xf7mhuk9sjse2puyyv6mcqsqwm35', + 'bc1phq4ww6h89zhpuqt5c43dj6ex8d9sm9zt8a53tkw8ndtjl343jz4qfmt88k', + 'bc1padwcr9a5sxv6ty97k545dxusdgw73ph4nc3u46vr6c2dn59q24sqxsfwez', + 'bc1p5vhyupttqkvh96f38g30wwgkxnrew7wh7c06cxyc3tvjvsuvx3zq2jwecd', + 'bc1pt5lyu4hlutnses2v4ewr8k9a67emcwtaklzwnmhvnmgdyn5z8h0sqwudp6', + 'bc1ppwtqqu2yd4atx4xkxxe2yu406etkq30c4y4zux9awvx7smrdhwlscmd8h2', + 'bc1prlxmrd3rr9gy3qvwvjt79d0qj7haxmcdwwhy3qmzl27r9h3t2hvsc7y72h', + 'bc1pp7x6w5spz8lnxyn5xnmetq83yq7xu8pn0e3xtn2pyz5q9lr7rqzsgy2ptn', + 'bc1pwjwx4j65p0kqjrkllfga0zgef4ph7nxgvz35s9un8avnt7mkjekqnvfclk', + 'bc1px8y5rgvkqgp5ya0kem7vz0mm85388ggdj09ymaj7rap3zrdv7j5s5tazje', + 'bc1p5j2j0utl9qlgkep2ygcjk6u70yqyr8lu5ww5d6ux6ha8072mnk3s4tchnu', + 'bc1p4dt6p5vc9h0y3u26y6zw0md732vwejp76c3y2nq82szxt8eyawrsauxy6q', + 'bc1pqhs3j42l850fknx9kq4fezry0sc4u9unmavy5ct40727e5llsm4stjfusf', + 'bc1p8sz04uprnnw0l587raajnngwvx6f40hmuenvjn0fhpc5gpe6ralsth5dgd', + 'bc1pcv8cljpp3m0j22d0cn0wnx8cf4hr64jhu3yceqjz0q9awr4xpx8s3rn6hy', + 'bc1pgkpmdayzh9xvm93k5c28qld4k6620fr44040q9gpsla3dx4zzlxqx6qyxk', + 'bc1p0zgqeqvs6lxftqqkczhp2fp96hw9eaus3d8auzq3qcldu402m47sdkpyup', + 'bc1pg6yzuyv0hezm44ex47a2fqqv2kfv9v43ttkpt8fg5u4gns9ths7saufpju', + 'bc1p24svszlkwcj7gclrw69t4t3qn7q7uexsh7yy6e7fvnz7fk2p29hq8xhq7r', + 'bc1py77xcqahmxs4alxufrhrrh6swtr79alsslhyev76g2skd8kzm7dqhpjm9n', + 'bc1pld7ujcn0fzf759upcgm3efclku2z6xq5vv54s4rwmj9dmrf075tq5969aa', + 'bc1prmzut3dq5sjf2ee3700y0tac2clv3z3can0pasys2ww5q4z2alus7vzj54', + 'bc1pyp58hmmyyws38gjuykjpkwa2mkxrhdsgfg4fywuwdc23p57cyl3qjp5s9s', + 'bc1pyk6eq7eys50txq08ty447xthhz2xne6ltjkk7sajyynhp3am40jqr9u0kx', + 'bc1pau5hm90x9nennpz6ydd29dnln0rg2mysx7gtyz28qz5qezhfyp3sdp3vz8', + 'bc1p6ejmjdwurfca99nyn9g9fv8wr49wvlvyn5d2ne8r5rcgjaxj2a8sewwfqg', + 'bc1pkygwezl2xscfpfvpym3xtfnc87w2h5q7956m6tp549vmtrt4p9uqcqvd57', + 'bc1pfm7mlhevds6mdaw803ffzxv4mnshu6cuuvjkj7vvrxu9hmenj02st2649u', + 'bc1pjrf0k7clvguj5qqkvaeh5edez02fr4unyxrqqhhe9mr4eh6vwcws6wk22h', + 'bc1psust2x652g0uj6648rnl05sjscgafk9zkkfve7dpwczv4t42vzhs20v4ny', + 'bc1phvrm27ztqyhu3wqgt4wnlqfnefv3vhtahumcvje4xl3eqanzvrfsdhyuvx', + 'bc1p56wdxvr4df3sum3hrpkjmgjph35j4gavjvem4z0u4fyr98zyvejsm73rcg', + 'bc1p3ervngq7ry0rkfyemljx2txelqg094y2xhl79j7rcc90kkzj0a8stqgd2u', + 'bc1pfjfmwr55jlard98qsynvtna6nct62dvq9el5t5lgh2chs64mxf4qectsx6', + 'bc1py7627utpvnz64xagah63d5gat5vh26r5rnn2wy0a7d9wxm8f9heqm5aagw', + 'bc1pdgdckgygwd085u7cvdzzajnxl8dgw4hw9m9snqy8x8qjvlezhqksar9hm3', + 'bc1plj4fqmtd009khqfa8u0xty35u5z82lct669aythdvdrga256pk7q2psrr3', + 'bc1pucl20kk840y5ka4q20lafn6lkf2tw302mul2wz8cez5c803fdjrqz3456f', + 'bc1p6tephfw25nffw3zk8emfsmwa2e7rxmgzuf8fu6ur669u0mu73rdsmxs40p', + 'bc1pd55t2tza2lyuev9zuhxp93kh3h2565kgngdmduq0kcxklmad9jhsr3xp7k', + 'bc1pry0kt6l7wd8j9fgq79yh7yf33nw4mt7xhatetkhgpqjhv6gpck7q3avd70', + 'bc1pyu7cdh4r04ha0z3ua5c24ufxjdy4vu6va0erjdnq2qp8dl082kmqqvga9j', + 'bc1pz3e64sywrht8de64xdc65aeu97jzlasccrnv7q3kca43mewqy8cq9z3w0q', + 'bc1pr33hsda2eq48ulh00tmulhg2ageg5cfg09c3yacc3ywrxpez4zqqczl35f', + 'bc1pgkx5253lsym9a6t6e80l452mwftw704up865rhathaeymutdatqslkmjrd', + 'bc1pmf35g9ue84kk7efzaaqugtz3v4fxx7kwec9hupaskuz5cknatpeqdn87jp', + 'bc1pzt6g9fnrtwwn5xrtth3hez44hw0e9lqgzgmxsv5z3f760sldkfrsvr4plw', + 'bc1p3hjcdv6f0p3g7jwffayd6wgljdhuse5stsq8vgp4309p75addxpq604f66', + 'bc1pkdwcq7rjeyt5wwm807d0x5z6x22drsah9ffcsfeqreevr9y6ugjsp0wtck', + 'bc1pglk2tmk5u64gph3gj792qz2cxhahpn5883nzmlxalxzqw9ke34rs87wh6q', + 'bc1p2pxwed4sqpnwt8gucgg7pmt5dkcvlh5qzxcs4nhf849mnkkfhjhq33mfkc', + 'bc1pfe70sl72ch4cdyagvvxljl566y46alvdfn3vfe5y53scuza799tqf275vs', + 'bc1pf6k73q49ck6q0sssk0auv7humavv380upc670hut5r5fu7lpq8kspwndpa', + 'bc1pxmj6ggtgkmhvahmqvxhfgfqhcnahjnns6ctvh2z8u8we0l0vanpqc658s4', + 'bc1pmky6hd5q282d6hz9wrqyzsfnv0zshd0a3l48nuwyd9emjnqnhvts28jtd7', + 'bc1phuwdle04t0m9auvdxfmxke046ewpcxldndtqmu5tcqnrt8dv2spqyaqx03', + 'bc1pwymyajtn5sktcwckwakpcgqlpdp520sw5d7nla0d56wnqvr7amhq74dkr3', + 'bc1psjpc9crw4pupxqf8st0a5puwe3v20dzl8lrlcrtk0wa44ay95vgsmhyvze', + 'bc1pssl4e20gwm8f3a4lrphkmhfgvlqd3s3xl6xnzmj7vvaexd3p6pms635w23', + 'bc1p8n68wljr0zrfllgpysam2lt0rgx5rsqvhuh5x59mcdwax0pmcp2s3339k9', + 'bc1pumml48pafme8xrn7cla5qr8rjg5jlljnkava4z0vx7sv206qp4kq8vc0pj', + 'bc1pj7uzjpymf055r4ksyu909fkyjv7nz6wca4m4dp6y0gnnj7vzrqgsutyrgv', + 'bc1pc4xrl00t0hxp5m5gvg5dskcwr07xdqakr9sy0ltrep3ul6288mxstyaes9', + 'bc1p3rql4hmhdxqa7z92we3cxrsld5hrwsy9ykhf6hcn8v6ndtvsj5dskg5mhl', + 'bc1pm2nmh5hs5xvxglfrhvpacwmqvswjc8xkv60vn8lxxm5qx2ldvvsq5ench9', + 'bc1p9yyzjcte8z2430e8wuyrd3qalw8xe455rxnqt2dcmthf0q5mjd7s058nlh', + 'bc1p6hla6gtvjx60k0ejkq6z3lpdt4yp5654jxqd2dq4d59g5a2qekzsx0fyf8', + 'bc1pczkz3epvk5hzzg5tf7j0qs8cqugyfrz28rltr23wmcrsen82f9yqkffj6t', + 'bc1pcmqhzzh9je7rv7pev47xd5kjx23ht7dgz8cr3rrlw8amrc8gd72qglhphf', + 'bc1p38wuj9zlqll8ken6t4raftldth64tw4n7vyddmuucvk36us02vns4zvu2m', + 'bc1pgd5ajxe3vsnmc66r7kqc6syfg6qyzgzmmyy0tdjnpustmgvcsqrqm0vn89', + 'bc1przu78pejvx4906kv5fxjzmlszwp4fukxe7rmfrkvfgukncmlcfvsj8u600', + 'bc1pg2c6f75kmaq6j8fuutt6lnvuh6v7dt6h46v0gfg3cgada2u4t65ql4x49s', + 'bc1p2c2sftd9rjw4z8zgtf0vzkxqelmtn5wzj65kc664zu3rjj2rru6q9gsvj8', + 'bc1p2c7exz075js6pqtgukmdn0jlpdx3jfsrcc6mjjqhsccw4y7lkcyq3d9lf5', + 'bc1p4vnasty7wq7ceshhlfxmyt272xsja569a7vvqfqjhy022ytj9f3s8qeumn', + 'bc1pctmn0ceelqwpl8w9xz9hgdz5v84m6apc5sx2rntkcwzt5mffnwps5acsmt', + 'bc1pvnwhgprvurxzc7nmscvjfgnsgm72scjtwufg8yg8uk4ql2pxs2wqxw5ggk', + 'bc1pjd4gyfqxurnrxamnyynvxgt7jl0yd0epz669f3q95sj4sr908jask4cwen', + 'bc1pajzphysva7sqxrajxqdhssrfpv6hjv647qpclyjqkjgn328kr4pspvq3nk', + 'bc1p6v83msec6kh0hj2wl8ws8kh3a043tn2k3z80fc8glvm5k8q9x90qf0zwc8', + 'bc1php9hqkn0c28vpkl57us63dkwhv49e7kaatep3ja3xyfv2vd96hhq4vyr7j', + 'bc1puunkgx9c0yjh7wd80gx8upx79ndge6rv9k0j8he0s9lled5xufgqsg6v8u', + 'bc1p0y6lxuhpkt0ykv4t5k7vlc7wg3w0aa9z96p4w204v04esjesu2es59nfwl', + 'bc1pmpaf9nzpw2kczzu2hchvpaeqjerkzw9kmspppmmzmn0hj8g6suxqrvlusm', + 'bc1pc49cm82f23nypm0p3vn54fylfzuhku6y2d5xglv8vefgmv3w7r5sslhxme', + 'bc1pjq2742n494f5tunuy2ar5ku3unm4n2dzwmzt8cmfyv4f34en05esmhzfna', + 'bc1p3sqsw4wqvrh4ngypc2m6hqqnhl33h58m4afxtgs7ls0v0llu33uqpt3k76', + 'bc1pw24catc5sw5yg8yw0jqhdzyrewkaugstujasu3e9pvg6z5r30aqq9urd27', + 'bc1pe6eta8dj6appj2nkxn7rtztluwslu6l6ll8md62dmjjdy2m6e42qlynmfn', + 'bc1px35l86nf0nu5g5wfzah6393h4p7veuvtyyn6dmqmm3k0duwd0sqqk07k5l', + 'bc1pqp430tn33lmpxfw3fcnmx37nr4y8td2l2ucmvcvrn5algru4nslsddqalk', + 'bc1pj6fttcmeqjl64u6uxt7h5r0f5fc3xjzvdxmhdejjgkd7zay373cqpzgzh2', + 'bc1p84xg5jhf3cntw60g74sxnrefl97fsscgwyvrjhcmex4nstyg5c5q9h5p2k', + 'bc1par4g8zmk09j00em3szmpd3qnv4z855dac8qchr0vjgt06urgpgks9k2r7w', + 'bc1p2sp0a8rvl0g8kwm3tmunwd3x4u8cn0fh4hejwe8523cyymq6ffpskllyxk', + 'bc1pfj64axv7fvrvd4yxr35fsdkfecr4jsn0c460pge8tcyvl6apm52q62vkrs', + 'bc1py6q6nxqeccw3p2upnqdpu2v6cq76hnwa52lcj0smwjd2geljmfzs9cpfwc', + 'bc1p2fzdyclgdzzah7q4ruqe235949atlfx8v4nv3k9k5ydas8klr26s77qqq7', + 'bc1pyrqj3xanwqtqx9k4v5r83nkjtkh45lemdhckzq6t9uw23pm7a95qaxnqtz', + 'bc1pfjysy28kxvnp9xl8vsfm2g6fy0lcq62rxrkt9mjrt4hc96fns6wqpn8me4', + 'bc1plgnh6seqksjr34r344ml6jekgzyhm3htnut70wy7cskxx2f6me2qtj2q98', + 'bc1pz0r3lsqkxmw2aauyalfkqy5l5hvwle5k58g53k9gf08r5qepfrps0r6hua', + 'bc1p7zm54pc7l8d7ycdvs2r0sqw5dfpqfchq54h9dnnr8nuf7pqjsvmse8fxal', + 'bc1p85h2grsr6qad2v8gn8y0pk3gz0c6pffgnwsqtcnrq5n33yhap8hqkmphtu', + 'bc1pcu6tz4xsj633y3klyl8ungavjzkmyeupnfn7rslkfrmvrccfw97qfrlhxn', + 'bc1ppz7cjawqvkeg4ts0emhyfp4awe6jf9pg7vajt5n8c939tth6gyzqsjclgh', + 'bc1ph2407k2dlf4gmsv88vztppefmqnpf3s4alnkq3rta0jk2whxh35qz65rnv', + 'bc1pqgxf0j0shw089yvl22x4p94uqqjtqhx4nuzrq7ewwxvsz3583mtsugupc8', + 'bc1pgc0mvwr5upsdh0uar229qd5gzqr4hjrfkf0mfwee8ekqyrv959zspz7pg7', + 'bc1pvrwp7lfzavhh94s95uakcx6f25mzt0jyyl7y7hse24efcexe0dksgeva89', + 'bc1p74muwr99vxkfkf9f4gjs9rpzxmalyyews89x8r7uu4e87zztnv2qfmr2rm', + 'bc1p8e355e03s2tdjmle92zefjvucgycqtxanrux7wex3rwerpgsp56qzjywp9', + 'bc1pa7ye64k549lrr6tjd5gfp0hw28mztsq6s2rnfl2c92qtz8x2pqhqq9hs8e', + 'bc1pmfchfps744xfj7zgtmdr36lvyq0x9sgde0u6pkw9n4xl5xnt9j7qa2tlc2', + 'bc1paqzrc6f6zqzjesdh0fy9ws3kz3c9783mjl3m0cy0438f79hr55mqwdwhaj', + 'bc1pkvtqg3tt5hl0yfjuzz7kyvkrsq7jn9s69rrjjj25v0tyv98lfstsaxjyuh', + 'bc1p9gnc5zycglrawnvgta0mut5e9sy3d68jlrw7d9nypgna095z23xqlmn4ka', + 'bc1py9j4j7lvkaszkmdllz4au4ure5pnh7tw3z9u5xck72l6s93tkwcqj9h7s7', + 'bc1pj6yp9wzfkcjdtv7q37c3fpngvcd8gfe8qnakgdv4uflywad7vd2sggc0dr', + 'bc1pf75d324cn0zukcn3y7344p6mqktwv0frnrudxq50reet2yyrygnqyx9krn', + 'bc1pflumgdunknpsyvwg4txlyhmraqenj4cscz9a0rlkxsdu4h247w2s8ej7pf', + 'bc1pv9x6ewdgmv0rdt8yhyzwfpddmn36e7hgec66dspjcgpz00zkk7dqhvnh97', + 'bc1p6tft22xxgxap84slunjvpmufzvezyzsnpwqm8z4qj4ylyxxqgx2q8e8u22', + 'bc1pakld2fe2t4qza5g3gk4qew8ywp5hn38tv9ngunp6vhqce976mevskpy6fq', + 'bc1pfujac9pwcjtx9j6nesefatjstgu2jtnave78l7pfd0gaz4cgysusqn0j7m', + 'bc1pj55nhtx9w8vrfy2vns2m6v60js2nwgeq74t8fx8z5mverv4lxvdq52y27m', + 'bc1p0y3up8vzus8xq683arjdy9yylaxj4v6czm6zvy8ccjfc7y8453kssllpf4', + 'bc1p40ndfm2hfx7un9rw2aed8kkwqvmuarmc6amzt05v2cynh4us76tscmdqke', + 'bc1pdxq56ejx89p2nrc4pmdjjgphr6ywr93p054duajeekf080m0e2xsarrv69', + 'bc1pyfmzth0k7nuqt7a4c2rfzmdsyky04ur222585c408nth7ntmu6ws9zs80q', + 'bc1plg3vjhaccqhlpycjvghqeeh0dv86f9zz78az6ruagpyzx9cslw4q06lmxy', + 'bc1p6e02er7mgkhj8hlfngg4hfnnv8xq45afl3ssexk248x50c8jpxlq8fh3jf', + 'bc1pv9hvnyh2nxuvj670pxgclfr7dy5elcypccadf5pqv8wu8dxhjkxqxa2k4l', + 'bc1phsrep06yly5tfpjym3vc785cplg5k0ag3ze29q3w96jsu7jhgf3qw4q4fu', + 'bc1pjwcd9j6t77w0nk43tlm26jlsvdrw3d7env35wxsx2fm6fkcz3rzskvf3hl', + 'bc1pa6whe5k3rsn8pl7s3dsjawdzt7pauyf8wttrlrckrscs2j5pahxswrjzg7', + 'bc1pc4uzw5773lvw5muvanjgm04z0zc9yhffessdd406rr77mutzt05s8z8wkj', + 'bc1pyexnashw7adeky8m2ysy53pgckkskrn0pm5j8fzwsdzyhl5d4j8sqmht3f', + 'bc1p5wlas49cxyspd8cwezueselkmgruqrgruqy6tcxmkdmgyq74gyhqfker4u', + 'bc1pf6vzh54tvnlgwhk8h68783xgcly9jxxwx9xudctms47qujvccehqkqp79j', + 'bc1pf7yh6u7jkccx6le32kjfsfuj6nkmfktm7aqc3sfy5uvxh3l78m2sswzwjm', + 'bc1ppupgqx0x6jy7sh8xwjf4gnzwhp4ham0dp062tade9rhztrwgxk0svytr2v', + 'bc1pcu0qt6rcmhx4qt3ekse94wlv6el3dp8fd5x5pl0n7tfk76erfvss2rxle9', + 'bc1ppyhh5ahv7vekmxz9j39hw3fl3g9at5e02uyzgduvrj53hvfhc0rqjd5v8z', + 'bc1peqyc2aeqsswz8ths0s62q6fwn0xaynuul6my40jzga8v356wd5lsrh6hc4', + 'bc1ppvp5fwkud5desukhr5rpnxl5g7kgje0djrtmpqaedc2lkv9tkxqq90hggl', + 'bc1psp7wwjrnt5cfzwkswz465rhcxddskuext2xr8mfuh4zp65anplxqclhxyv', + 'bc1pyjnvnanez83msl0akl9kyhnf9mryzejhrvrzslfsvwsp7ngd7vfqlrqtl4', + 'bc1pk8h2azau5p445nw764eqstymvh9n6e988hf7m2vpmnkrnu3w5v4sj0rrxm', + 'bc1pkm8rhvv0wmaw8tpmmsm64s9j0nyk04xzqw5upua7kt0eklpzrugsdt3uah', + 'bc1ppgk8xhjr9y5mk0vhtrr8fj4gd2rfpynvjvnml3jwv3j2wsd9c5ws8zprue', + 'bc1p8d8ywtj8n466d83f48fjflyat5spe44jyq332vrjhy4a66ey8jzq5en2x3', + 'bc1pd3xefxhetqngg7tfw4la4swnaewkt8dzvzfljved27mguxs8csuseexpgf', + 'bc1pegktaqlnkte7u3fq22ceyqtc42qrd0h7g5f6tvscdf7hyhn2k2asha58kj', + 'bc1p44q8fp9rcr52y0kxzhdw9j4kn50cc7gpvx8vsxw27sdcvhsv0hfslc4ds6', + 'bc1p85qhame800sd6vzktuhauywpgwcm62km9e7xcssswyxwsnwks44ql2l39c', + 'bc1ph52qg0fv6ncg5jpkh78kft234gfryjdmhuzf07egkuvca9mhq8ds0sumxd', + 'bc1puhmqpyz8fdvnw8v5hwyhmkcdhsqhdpcuwzu5s69zr0vm32l6wjnsu59xpn', + 'bc1pse4pfltw8at2wkm8r5y6q3gdm5y8znnmw9sm3prjl5k88cmpfj2sy4x7ad', + 'bc1p3p5y2lpvegs4449p20prkkk2sj0nvd774pf5cvft5xlg0t9pceusznzgz9', + 'bc1puczkxy5ff444wgkss6ajtt9zv3y4fh7svr2gzv4ca9qk7nlae02sn7yj29', + 'bc1pkmhpc2hl6ylfhld6zlvmc7ap6uyqe3s8x9cyf6aje6j2f87edzlsz0kn5g', + 'bc1p6ys72fyz84wmpax97qytn79acevusza0v7htmceqxc73pr6td6tsg22h9s', + 'bc1pnsl0rsuu4nk5y2c79wkar6exq9enk9cwt6thz8q667wyddt63w6s2k0fee', + 'bc1psec0uuj0hp9l7wch97uan3wygv0pt0xx99s9lsz7004d652dzq6sfjdvdm', + 'bc1phdyz3c0ys9p8kg8wmneg5tnwuv4w8mstwp6k24y00qu0nv027cas7yg2hy', + 'bc1pzrszgu0g90e6mmmj75f2dtsyszq33tqwr03r46v8hv2ndtf7039s8vjzpq', + 'bc1pszr9pdts9jjp2wdjx8nqjvdnyfy4vngsgzrugfkmzyh0u8azt36sqst4y2', + 'bc1p74smhmh8dpgyzmvdhgla4vw9mana0ar56lns27pja8kv6kznsfpsh8z0ru', + 'bc1p8vawcvccs9zjksjhywgm47erqj44kg7lvmha9tzd9zkvlr5jrntqdvtlqt', + 'bc1pknk32dw5cs8xekyc30ntc8tdrgek08t0jhuz8j9tm7jsjm77vvysd4l90n', + 'bc1p446hkww8lf002t4wt56ku0far8xg346v00ly4ch9vmhkhszxjcns3cj06f', + 'bc1pql3n9mfdmp2jhhhdh4dk4gjesgefxddsuwgt9e38x6ptwcxnyc3q7vy8p4', + 'bc1psrrm05tnks24v84ss7juwrwmkky5nat3ued5ndq6gm9tpyuuv2mqq8ysyy', + 'bc1pnwhkhkkre3wtn78wjx6ewwmhvfqftauwvlyexdfmx66xqejdyjhqlhc68n', + 'bc1p9u8hr2zt37wg0z2t7zenpl8tk0gdjjzcx9js2k44kt7v7ny27ukslj4w7s', + 'bc1p3gpg05jhp7t6s4tcamuy79ll23uxhwg7c9k2w5uwdkzppa8kqv9sd4wk6w', + 'bc1pyfm27klqtj09qq3nj37vrrgtq76juggrcu8j7a9jg0t244wcfktsfxwkze', + 'bc1pk48fhxzt5kt2ra7m2e9627qj0lejzfzfs8jz3ynj7sswskx93eeq8yyzwq', + 'bc1pv0mgepm98548vkc08uufqryklce5qq03kq5cpagwfwcjr7vlpsks42jraw', + 'bc1p92r96pdt400spd792f78dptwyckyx93u8rn6kkra2svau5ck2x3sd65kh4', + 'bc1pxm62rdrrxxf8m0t3mepp832ay3lfxzj9letkrm9gvqvdy0k2l3eqwngwa3', + 'bc1px58zapc36nus7ecxjz9kxxudnx9zxvdwgzhagnaywwdqeh3u75kqqll22s', + 'bc1p2cl2nfsycl7j80yw8f0fjnjrpusaypqs4g4s7g80u5vdqqx5q8ksr5re0t', + 'bc1pyjkq737hpk2p5y49esvgjmwhszc7hedear68dmgkgm9vuar7eazq0d3r26', + 'bc1p0dc3tm9u9llf9t2kvhv6fn7sl4znsc5s0wa4c00qlqzw4sgk7kyq7mteag', + 'bc1pxq8xay04ma2nukfa7tqe9xsl7kjl8tdztq8a6al5h6qpsx8v308syj04ld', + 'bc1p4p3mspge0j8hwvslpqwc09r4dkcspk05lxfkvvf2amq2smds79aqvm2f9v', + 'bc1psyqrq2peu7qgrser8zc5euca06dfy3gadfdxt8yfs0xvmzu8cq8syncwl5', + 'bc1p47qejj9thgay75446dh8j4cr0m6gv62ssz35f4wt2frwdepxdt7shge44n', + 'bc1pzkzct3dplhe9nl7n2rdt95sd3ycs2ktxyg8w4qutermc4j36hpwsecczqd', + 'bc1px4vd3f8rf90au2j77ly6xdhzvw9ff9gvfz8zptkxf5me7fl006as6gck7z', + 'bc1p0pxj2r2vpghzs7mhzvje8hsx6uy59cnqqkdr6vcazekn98p59y9sj5raq5', + 'bc1pt62ghm6g5tnee9flmfa3pe6pnnm2h3ec4rkhlmearnpvghg9lz9q3raw7r', + 'bc1p7jae0kg8ckdgwpzedzcs3rvwwcv6fxlh9jn4leevxrjwf6vpwpksrzhvj0', + 'bc1pw0f67mhq78vxz5x6d3gthcvkm4wgs656an5z55yd9ep70dzrquasq73p73', + 'bc1ps7ecm8jvdt78fltltz63ylu53na6qytf6rh80yuqewsdqgrcs3aqgcf5e6', + 'bc1p240gumy96hutd5eawjplh5levxy8vs57vnl2u9dh6j5hu2u2rsqqazvhrn', + 'bc1paft5tacpgen7tfe09jvrtskf9j580h80783ddy0pmpueqnleqs9qmazydg', + 'bc1pgmfqfrz7qjyef8ylf7apwtsf6syzmgehsk894cs8pvsq6g0lu5zs2gnk4e', + 'bc1ptg50red55s0xh5hpdvzxqtvd7yp8uqclrz22ey62z3ej3rmdrp7sn6jhfj', + 'bc1pfqzphjyh2c7h0ugwm4lcae3rd098elm4lqylu0qpvx6z82xphv5qwrld2h', + 'bc1pepgkrfys8sva5lj2gerhhnwaxpg8zpwh4cphsdhyq4lhws9sqj5s04099d', + 'bc1plj4jdnj8t0mdth3uu0fnzsmq53cmema4khy38ga6tv5df2jzrscs4aqwdx', + 'bc1paak2v24qk8ktd2feec2cvx4qvj4d5hdrngyjxn5wwy2uap8t2gnqj8jhhh', + 'bc1pvfdncg0v4lrvlvhxklzpmsj83hg7r3ekahqkqh07dvu56yqv3p9q82d9zq', + 'bc1pw35tl7z8sxju0ynx3v3jha66mdeqhse8xfr43q6l4cfyg5mc9twqplx8fu', + 'bc1pztv8p3rpt469c5807x0ju4y6706a30lh349zp6da3l0vyq52lrfszrx8q4', + 'bc1p24am4ll0uaksgrngkajjydnjsz8cpkm3jlz7dedu7eclf0ffu7hqklzshn', + 'bc1pkzmfw4y6ksdct0kuxl89km5c6693xztf4clk25ea7t2w2d5leh0s2g08qj', + 'bc1pykakedg84hy7wtxnkhk3tr29nz00pltn5m892cm986el5mdm6kss5nayvk', + 'bc1pq0h3zyf57qdvpphc8rngz6axmm09ua658a4dea9hw93w9n8t807swt3t9l', + 'bc1pl0hlelcnvpef74x26fdj7m8hjtng7jngw9zmplr8pepzpmkzv5ws0cq4au', + 'bc1p9sce58skemqgzgp3w335w2pexfp2rmzvyr00t229segnq8eefldsencsxe', + 'bc1p070cpf0chfajtget8g263rpct2v5h9wygsklpktf2gxhjgp6e28sv0z6lx', + 'bc1pxf7493tl0dykzfydcnjdz9cftwynj6465k58qkw8j6jcekavxggs680v3l', + 'bc1p2s2psedudl5s8cdmkkmvrhsgw8v5alp0hrm7ufd5d773xq7m89gq82sta0', + 'bc1pgl7r8ak6puvkv9q9nx8srjekjw7hpptaq5ufaqz2udleje7wvngqqspytf', + 'bc1p0tffp7rs4aasj9lm5j4pdn69kudt33d64yr6mg3l2rhdn0zrzd5shw26sa', + 'bc1puqtm0k6dqk8yykxljrj2mt3cpprqw5px06txha7lquf8w9y6azlqjcz0d7', + 'bc1paaeess9c6qsyyt9fwh4pthcxlf4m35608rdnkmephg69wza0zs9q9u4s78', + 'bc1p7adhm585zayu3q8pa2l5dc5tznu7vu0x9zypu7zlqfrn9z5f8ahqcuhrn4', + 'bc1p2mg0j4lpjpguvzk29p2elgcc9dy0mlnj7qyka86da49xc4t692tsjfga8l', + 'bc1pfyg7afvmxr6puv7jv6ugx9ruewn7p6lj4u4jlsckgumz3m655ensjgj4na', + 'bc1pksvxj9r042unvwvfv08tr3h650jlpx4kjzvjegnsev0f650d5acqxnqv7u', + 'bc1p277wm6r98npv7d7e097fgeh6nzfudcp5x49rvrt5xzj6adjd3jmq8jekjt', + 'bc1pzzv42797e7r7rqafmq5fkg85j5wqurh4aj2qlqj4246c67skmhxsq30sqq', + 'bc1pek74uy46grx8vu07mx97zwffnaquuvdysuar2f24qnas034tyvmscz6779', + 'bc1pq7lwh9zn4gae0xq0hg20z32e2z8gnpcf8yaks8uurgf34vf9d3rsw8h8r7', + 'bc1pxfq782fd2rdss07cx8q4r2ctfaerpeckhphz8va47359r7vvkpwqa26ag0', + 'bc1p09gjlqrt4laal3rqwa3tfc26ja2y2ajeg0xt3unn2yxhlkqflduq3wc8mh', + 'bc1p0wln5yupmlyy6utjnnjgw05fpdmcagql77pm0cduws3cm87eq2dqctvc6e', + 'bc1p8kdv2dyjlx7j9x274tn3dna75xqu3w4ud8d0rjvg3vfmdztu45ks9nup3n', + 'bc1pmnpx9csx3jsuvjjpp7nd2xglvdnmyrx8nzayl55h7u062kzf9xlsyjh4q6', + 'bc1p96a0vpnmrc8l79kuhseczw906j38ulde7uqzc5087n48wzt9ugcqcg0u6s', + 'bc1pp47fdc2y0tehkhgshmceqhvmltspjfcz5qka90lz3ds8x653dcks2y9xmw', + 'bc1pj6fc5l9zwc85g5fpnrqhctmrhvujc8zev0r92g3czlqnv0uvh42swtfvs4', + 'bc1ppyutgft3fz7rjvwk8z6tgfesqnmstxdr78pv62c4np2vkqtgxekqmefkuj', + 'bc1p5p5jzp4aut3clnppfglz38ztr407vun4pzj3llaa2yw4vyms667qgl85ha', + 'bc1p7x65s58gcc2f07xjwutnn7g2c39qq6t7pv8qa3pwfays5nf5jkusgwypaz', + 'bc1pr4av6xujwd4zf99e9dta4x5dc9wwf3j6rvpgc3jkcjy8q6dnzwxswq5guh', + 'bc1pvhkm0cfaaqdmft3epmcsqvwrrttntf78x6m7yyks0zc88xn7hgws26azn6', + 'bc1pq0p5pssvtg4ct07w56f64d4wudpgwar7yl8ly060hqt5sl2w9ncq5zahqk', + 'bc1p8epalgdp7r5xch3v34wd9f9u8ml85ufzflurmsk2trgy6jyx0eeszv3apq', + 'bc1pk6y0az3fqfunfqr7czknlq47mhjax40p3djy5u8xwzzzhnjazulqhj5sgs', + 'bc1pklq63jkc7jcjw35gxaeje7jtvdatkrk0tmwm6sh70q9xvx8ylx7s7jqjv8', + 'bc1pt7lpcnjr8qex02cy4w02cnt6jz3fyxqvtx5rzxfaqkweyg5zfytqq3ddf9', + 'bc1pj0gaaaddrajhtes3kau764unqldvxdewgm7w3yxnn65vdge280cq74meu9', + 'bc1pc9rz4jmmmm3fma7k480swc2gte5sa28glwnk0sfv93e09lmnl4mqfcd5a3', + 'bc1p8uh9vy7a70aj4e8mgdwxcte50uy68lzu83wcdjtl3q3echhmr0sqt8rd9t', + 'bc1pj5kayg4fpklmqfswk40nqel6tr0wrqrjf2390xmtkpzpq8qw5mwszzhn55', + 'bc1pcwvxhwk2r6m9dw85vgp6h6gd0xyj8fd8s57axu4p7eck42w3kvws4r286a', + 'bc1prv4ztm6u7p23fgh8s0c83lu5vuew3vkt5sdg5cxvmdpxdkph5cnq55w759', + 'bc1pe23sk2l2yszsnhu0cvl6r0jujq8690xrvxl9dwh6j786v2ralqxscd439v', + 'bc1pu7tadm30gw83aynm0vr4ta9ngcw8ftvystxvh0q3k3hpz5rnjzhqtpzn56', + 'bc1ptnzrd4ttdttesuqypsya7rcmg3xeuduv2rzel6n4khs4av3t9llsrv733v', + 'bc1pc42p9c8v3cpc0tncjzjfe6s43889hgzsec05jq5jgzfftw9c3xkqtwfhvt', + 'bc1pr3cfvu2txuw66eaepcyjnrfewn4gx2gv7jj7v62j7x583psfr5dq6gv9n3', + 'bc1paked3kwx4nftvj2x27c4pkpam3drdv6hcgj5g3flkacgawn7jyxq0zz8sq', + 'bc1phw0ypg8szvkveqdxdas27vevak8ded46cffcqtc9r08rtm63vhxqtqzhtc', + 'bc1pedv4rajnu96ldzwcdt32pqh9lxfp60hme2n7ync00w9qpyx4t9sqw3ycdp', + 'bc1pvc9m8xk04h3xddnsnk6rrmc0hse7gnsdwlyn8etgsay260m7ewns945fta', + 'bc1pur5v9eeyqpl39mp5wnmazkqrc25kee357frcylj4c2njzp2pflqspwusph', + 'bc1pr7gmp95wcjfc9e6ya9947zpzqpnn849mvztpwvvqn2aw2vk9qylqhkpkgw', + 'bc1pczedkchje8l2pcsm03swkhdvwdeavn39w2xwdg0aqktg099le7kqss5js5', + 'bc1pdz2pe6xw8l9snrnf0tgup6ptc0x8q22q27zlyfvm33tnlpqujp3s9c6mvg', + 'bc1pwp88cxytmp52e628f753n2yqvs8gf27rtfqkz05y0kpj5pfakg2qu5awqz', + 'bc1pke9aacezepmqtqrqsekk7fmyd4gfel28z8vv2r8ksrtc3y5vvw3qlpj5el', + 'bc1puagptary0p8ykuua965z5e9c0xapeqz50zea7k78lgaayvdlhjsq5s88ty', + 'bc1peqr4p2akv0rqucka34fr3293ehv5vk8el6a420mvfl7u99q4gk7scjlhn2', + 'bc1pcvcxdfrw3u57wdur02a9ul58zc5tr0ae5zdfazh4rhjgvzhnvlgqw85gjf', + 'bc1pt98lmv7eahz9343lxw3qs0a6gylj8dz9jutwuz9ucj9zweea8krs229hdm', + 'bc1pfchm264pfxw0nd932qfdr79rgep5ul57agm49v8fjdkdfmzfnk0sdm27ys', + 'bc1pm6kzpdt8lwquy5k0n7n0rzkht363gjkc8j7sew7xcldw86uzc6qqrgmxdy', + 'bc1p0k8rmsyk8sg3jq8jvak7zc7hr2g30477nv6kupl64clz9ky4h8pq60r5jl', + 'bc1ps9su7pghhghrq40hqudavujkp7sfvxqm8dcgwjzxl9gpu7zvf3jqpzfhjm', + 'bc1p0whvh7zep5z59udemrrzdc5w44tq2ht6luaqzy5naa97guw4z8nqswmkjh', + 'bc1plag7yhz0d5gxz9z6rkv58vzk5met0kgd4h8m305fe4shyc68nq9q5s2x6j', + 'bc1phqnua8m82gyc7j6j48wk3uaa6p04lvc29jglhk4ggg6wkhp4uu2s5kftv9', + 'bc1pp2dnxjm7a7lk4pa0epfax9rd4s87xw7hpgdxxjg2y9phwqlnha4sprye7n', + 'bc1p6shet8yenqznynt4meftetqkg9aj7acndgh6ecy8lcw8z8433xysp376qz', + 'bc1p9pt5pekyx2egdvmdgq9ap84qr4syhwryqkqgkax4acqgm3mhgrasprduq5', + 'bc1pwm6794tqxr3lc6348wy4z74ssj00tscnxmvd889kskac4jte95ps5v6nf8', + 'bc1pm7tnkc3c33h0xc3ry63w72hq3yfc39typagczzryu22w9p3ash8srnkvtz', + 'bc1pv0amvarvk0ft44zs8zlqe4rznw6x7gp86u48syqx7mkph4n2ureqxc3x5n', + 'bc1p3n66vj5qata55jlyjcv3rcjrwy2tgmwjd2n5y83alpztcp2uvmqqze79xs', + 'bc1petshrrt2u3gzfe04nfwun8ksu7xsnx648r3ky3jqxq0wwqj2x3hqckuvt6', + 'bc1puaj5d76cd7cw5l6nrvqqt86wgg3yyughyg976yadspwh8aetzf9qf76j4q', + 'bc1pqpj7mc27m4eq7ns95p58zx0c80sy40x05w9twujfef69ur5nue5s78t97m', + 'bc1pm9lp5evmzrr0edehgdpqqzmgr966uaxjf22m35mjj28rdsr0a5dqr2mwe5', + 'bc1psf34cgkrxs29lwc9lyv9a8adfvufemhgg4jqkk34vnglgfd7px6qvvgpqq', + 'bc1ph8cejfdk2j3ldk9aqywnj7xrnx0v24he0sf982nkdez9509awuasdfpdam', + 'bc1pz8hdpx0r2dzjqxkwaenulxjezwz3vmh823ehrzk06g5gll65g3es38f7d6', + 'bc1pgjfcqenfvfaeu94ftcgpnyt4kw5ted9rcqfe6n55mec6nqsfdr4spkf3gt', + 'bc1pzfvwpr8ancxnr868hgjy96lfykm59t7rjkr8xd6gx7l86jwkshdsl2ln2s', + 'bc1pltpr9uwy4f8rm64px473q84a9cghppx0fk4n80mhdxtjmgzgn8kscg7wm8', + 'bc1p3fxjqxexmqdr3sswzwa7t52d4qadexp0ru9czc7s0v8k9kk4spxqx2guea', + 'bc1penavaxm0hfuulxjprtsdmqn2x9wxs4aut53xswvqpga3x7rjw9ps88m3c6', + 'bc1pqt25anhef05urfp8y8qtqr6lk922gecja4era57pf0ujgukwpajq88px3t', + 'bc1pqmedya57zg28c2ae7qd67ua82ul4gd7nayftwuxwjx7euhnhu49qpmwjts', + 'bc1psgvx46lkx86qd20eckvg92ah4ksngntuevhypz02ch85sacwdsuqtffl4z', + 'bc1pj5n8e73n2fp6h5z7r624y85vs8hccfxq2r4fth8jjx3psa4qu6yspnewc3', + 'bc1p5d3vs7hp5ldvzjpqft55vezdhwv8tugunxhunfwt454vpsd8zgjs2ykfup', + 'bc1p78dzevaa8v4w0wzgv4mfw3xjdszlkqhm6pmq578l478dvrn57dvsrl2pme', + 'bc1ptr5et40v70zw5n62xr9xjhtmqwpag8uyr5uc34y4rjmlfhd5e8ys2aed7a', + 'bc1pq00nz60nhzkszfz2zghgsljsaa36ww3ead3fvy2r3j4z33ffc8uqpaeqj9', + 'bc1p6p2dj7dt4kn9x4xqa37ernke0aj508thxf7f4230thhms8ehhukqxleazh', + 'bc1ps6z56yehle0s2nt7anlxpmzkld6ywjpehlrn48xnagaa9e9x4kxqzl0u5k', + 'bc1pqmt0e0q4q3n3v5nlzfn9zp4m5lxkgz96lg0yqqmvd2kf4hztq8uqp4dckn', + 'bc1pnez6m0dywuc5x7ucnlgn63fujcvs3ntel53acxwwa2j6q00cnt5sgkusmy', + 'bc1p3zw7wywh4upj0gd5dzmzy3dmuqv2g7z202hs7m6ve8x5kwqnrrcqe709u9', + 'bc1phfdd403w9e9xq4lx0tsyw55sz5z0mexwtf79d9wmhac8n7vmz5lsq6amyu', + 'bc1px926j4sg5pxpulgl5ptl0e040cxeh75l6n6q75sn7a5nk4r8rnxsuwkegf', + 'bc1pejv8c3uwgk9vyy4cpn62227e9h05wnsagu08pueh4qqp6ughzvzs0qkypq', + 'bc1plten9grmergen9xlxdyxnnafxv6mpxzradlsnumr52k9sdcdwu3sqtx7tj', + 'bc1pq7a5cfr9zghsydzsfflrkgkns9u2zlspzr87222fu63m7utftqdq2eldxa', + 'bc1pqsv08t05sjs505xg3wjs07fem02nm653hlne5ke9k3cggewuzngqsl6p5r', + 'bc1pudll32guxevsayk6g2f5tv9nagujtt7s2xsajudvmkry6mcl4tcqj6ykxx', + 'bc1pp4ja6fmj488wcrqcs63fcsjuf77hpye0gqpyu3hysafdsyezwm9qjmrgpq', + 'bc1pafp3gtjj060ng48xpyr3mv0thlmsz6yf7a6ge839s0gza4xg6rhs3l2asz', + 'bc1p67y67ej0mszgentmvv57lhdl3jykvdcsy28q3qamm0eqwckjssuqml2xdc', + 'bc1pk6v36ajdzpml3pdz27nyg2rvshun220w45xevn7gq8htjdm8dncssc5z87', + 'bc1pcaf9d02r47su0jqrkq57l8wnkxvqfh007ky3jtll87ccfdj2huus2y77z8', + 'bc1pmfhn9hjqf24vzhkmcxd33fjap239r0pghakuwrqcnrg95na0g6kqulg50p', + 'bc1p5nx97kk7t0mvtedtggj4sa6yeqm56q9h0dgng7jqw3ce0tey65ushul93t', + 'bc1pdravsvcylky6te2rcmpjl802uyejjpdem4kxe7tfk6umnvazrmxs8xnnrs', + 'bc1p8kf3nfe498ar9qt52gkqsfpd37pnr7a2uqa0q3zqxvdaqctu4n3sy0v26y', + 'bc1p6tznt3u4lk6apxswxg36mk2d6z6e2xk7384f2kucua5wnu3yjntsnma3aw', + 'bc1prudvtzy9dqmhuaxee0lu8423t7fv6k604gyjsnshlqae4n8h6h5sl726qq', + 'bc1pluh37c8ced3xakg45nnc6842dvurdtakzguuwuxy3gaapnzv2sqsfvwu8r', + 'bc1psgqcygzyga8wpl4p3kyar7jsr7csdjact3pgcgqmy0hz84x3zwvq7a28er', + 'bc1pc57d5l42l0a5ca9c3r6m0jwhxwuqj7vs34k845y6nqrrj89338pskwf65e', + 'bc1pq3x7pkkcsy0v53307q4s35d5zcwrz3h9lrk8m7xcacgthl4x7yuqgffcel', + 'bc1p5glt87k558h4t4hk5d2gnwvem896483qp64cm4rey0jcgu2633qq7dykzp', + 'bc1pzjk0yvkz3lkk4w5ehyl7eqydl57sh0gs49yw7449c72n8mhpf54qv9eag7', + 'bc1pp94958lqm5w6ls76sddj55ak5hdf92yqzkz3qtdzwjsyh3j8extst422gw', + 'bc1pcxz588ac9rjcxdn4l3gve5ha9h7pv9p7srf2hymkkyvllmwdqyssunkdst', + 'bc1ppsgqdknsrley09js7pj6zm02ayjprunecl7l27gcym8684z5q3gq29gvwq', + 'bc1pq4xdjeg5fm6pvhw5jf4tkw4zh7g26v8pmj2ftxh4law92ygmerzqxdhrwz', + 'bc1p540hsfjg3tsrt37xtumjyk88cdqurxkjtz7hw0srhqay6ya9gsgqkuszsm', + 'bc1pejqatygf6xtttfvucvmvdhljnne7kh24fuhp9gc5mrk4nssnv5sqpajwps', + 'bc1p7uvspl6qt47eqyhe2azd6teulyy3ldm7kf65mjqan2wqnmwdquts36jg8p', + 'bc1pktcjahn3jda5t2zvh9knk44mse2gfvj9rxyfamqydz5x22rfnlus3jwz6u', + 'bc1pa9grs6wng9negv2rp0y3p7dnatvcym0mng9vvrjnkzs622nhk9jqak8dqe', + 'bc1phs0shgl8uj9uv0c4yyf80vsj0ptt2sww7daxu2tagpcgu2xfhw0qw54z5p', + 'bc1pecmtald0gq6xl97ddwm9e8xunr3ut0ssp20qptxvt6vy5c7g2tqqtmhzng', + 'bc1pcapsxmlv6j53d0lknkav8l0xdn232y58ym8wfeqszm0frg9at82qxqz4md', + 'bc1pd03w0la40qle3v9mh8qvv8kdd69fd8nvusyufczqr8k4llrenu2qmujxgc', + 'bc1pacnak64enz2u6pnawspxfya3825fee74zmh4aw7wwyy8eakm5rds0fardw', + 'bc1pdyerdal38qutfyxkmxau5rgt2n2q0x9wr7d44hht0vnyusrwjjmq8et98f', + 'bc1pec6uvys8hvf69nfjdezdarflcdzyphej3ypyrd5sc8nsph8tqa2q5w8pkf', + 'bc1plrvxzujel6t9ntpsd6yj8nrk0sc37325uefvzq6eua8xwddadcnsvgu2x0', + 'bc1pncckqrdhcyqdlqtje08svf67mam0f3844yyv5w5c89kcnhlgmj0s9cj577', + 'bc1pmf6qq38jgkptl8s86kaxdk6xsj5q78ur8x8tamnxq754wrau8t7qlrylql', + 'bc1pkqdswf06dt47q63fg3s278fvk0896ylc6ddff07nqgxtpf2mxpqsm7ca3w', + 'bc1paa3rh02rm73fqu5wdwufjnt4chd4tpf5qggyhe3eqxx34p6vwtwspjpn8y', + 'bc1paj7h80raslxp4chugeq35a8akan60au5vecveqmmzssvt4rsv4jqayv4gf', + 'bc1pfhqvqkua50z8s6xzjpe5tja69qh9y8gsucflegq8qrrpwc8g7s2sarw39v', + 'bc1pljk2dm94yrgh25um6vy9hllxsuwv579uujpf9mz7j488ze2338rstshtzf', + 'bc1pdfm0wrmgwvlsv2c4kcsjxctuph2fc00aawt7rq5phv93sucvqrqst7e98r', + 'bc1pdzv4thm3tayud0d9w5x3nlu0n0lad0dld58yekafmpwsnpcqr87sg73gzh', + 'bc1p9x584g4x300pvnqpkgfytkur8dnu3spsc7tl3em2up6cndzj0p6svm4ljm', + 'bc1pecme0f6qprrx2uqur3t063exq65sm4klk4ktz9pzrqdgezewqptsrqzder', + 'bc1pk3cz94tqdutk9qsm5pryzggala44f2htze33n55qgquzfh45u56qhdqrz3', + 'bc1pesc80s5cnsew4nv7pvgsjh990zqq3v6ea3gsm7lrvy2lk8t4rwesceslf3', + 'bc1pn3vfaaykhengvq0j2alw25ka95ue6sxuu36pmagct35lwda6eksqhfege7', + 'bc1p8hs94famh8q926p7k5vj8hxcqw97aq2f90v7lvl6g54x024pl68skdcc22', + 'bc1pgdl5md8zkp8sst7rl4x276sk4xdh9v0sdwq0atah2nmf7ewygd4qyeqg0h', + 'bc1pt54em3fgtlj2l2npyd9j6v9rkse4g4q0kaqhd0nfmcw8tfskrw6q25kxcw', + 'bc1pk2u0x67qa9nwp82yh9jp940mjzsc9uryas9vd37nwxav2v6kgfms2fh9md', + 'bc1pgty3epszkcv4zs0nt5g3wt5ze7da0egtzgyfzyrlq6uwggxrkyxszwrfw0', + 'bc1pxq5y7a943qld5rtsg6ndwe9flzcc6vq6qsqs3sgtegjdmmy5l40s0f84n5', + 'bc1pa7tnvxpe23q0z2c648durejzpz8c55lnwaft3z7f2vlh4h84c9ms9fwygh', + 'bc1ps53h86m8qyepj3syr842l62wrr56mrp67s8m2l3ka2y58u62rvhq59ujc9', + 'bc1p706ktvdghk84dzsf0kc23xhtc6lk893jme8h6kuv6r7mzehpd7fs0uymj4', + 'bc1plrdfqv239jjk9k47qry3693dsz9d3q86fj3mtnsyz02ky7uzq7dsxgcm5m', + 'bc1pt7qkcp9wxjtm4lw4jcpndr0f4jy2hg39pgtu2shf8wy0r936qzfq997lfn', + 'bc1p0xul57mz8qg52mahjutug3qp6tr506gjfjq47rews3v6he0uplhs2eemhj', + 'bc1phvs5qhkev4dj7xvcf6pe8cex44uu8jz856x9rg6l66ty73dqklpq4tgr20', + 'bc1pmhhh5qaglmh9nsqw4as70hducjg4ysf0h7eaye906swehxfk7cls5j9984', + 'bc1p5pdnwglz35hg0sat3dnehfwzhxg02c4kyknh4dagyps3qgx0gypqj9wvyt', + 'bc1pvj200xkay9r9ljy5epqg05r74akkj7ld50ls3sft4mc6jwp2cn5qzdlk0v', + 'bc1peagf9jew5lu5hdtxaevecn7j8wuheqemku3trnwm8rkjuvf3nfmqr97kew', + 'bc1plpjc9hqt8s2m7gv6x58p2razel4h9f73y2pajy6rqqk8ac7lu7xs6t80rf', + 'bc1phqf7cq5eay62zwqnlk258e60hf0tmng8gmvaccnytpqd6dpls95qq5z909', + 'bc1pw6ke44dkqv8x2fecjudtdxxxfpsqv9rl5dgkfeadj87tlkzsyxtqlankw7', + 'bc1p32a6ana5yqyt9lepnr269j6cux8hqlmz5w82txxhxlvyn65mcgnqm0fefm', + 'bc1ppwyr45jmdz9qsuq9sf6ergq0273t9kxz4tc4s5kev9r9p4c70q8qvec3yx', + 'bc1p3cuwsrekzuykkytzchqwum5lw57ks44f6u9lewn8c43mx4sk9pdqnclqlw', + 'bc1p8zvs79ukv88hhsh2hzstmtnad9uzsdarsx4e9h7y4hg5lzcwfkxs2hz550', + 'bc1pt5gy8n2ghp9vfxlde9n8xwa8t3ytfnce4zfnxsntpmctnddt5crsn8kac8', + 'bc1pmhhke8x8cm7clwcdzct8a86jmjaxwhrz0v58mtwdp3gm6sq28tds3ff3yp', + 'bc1p4495eajpm6x467838ychuc7eaxd79mwn7enyxtr6mcwy2te9kq7spgvy8j', + 'bc1pjlcz27hn9dake6rlmz93knus5nw9auzgp2k4wl86x7unaugsg2ms9f3cwl', + 'bc1pkydu5fhex6lk5du7q6xrel877ayhkjegt9ytswt566e5uxp8nvhqystssj', + 'bc1pvd2tjdjlhzdu8mkr6uapqavy4lqt3ms0pync3f2r5kaex9fyq96sswvv7u', + 'bc1ptpfpxw4r84sk43qw788z6yvjq24fjgfyaswzcts0qyvtc3srp0vq920us6', + 'bc1pnf2ad2ccvwjxx5e38q6r0nm9f5jsue6h4hss6xh9hyahvqx0mcls4fj3rg', + 'bc1prexk8rmmf8ul8uhw8xnwgkugdh60r7jjgr7l26ux3jgxkqup5j8sg4pp8d', + 'bc1pxntp4zsclq6969u3ed55glmkgwng9dat9d8axjhk860c7u0lnnxqyuka32', + 'bc1p3vkfjxaca88fknwgdu56xst26lelr3yk45yzv07g079d0a9nhnwsyksg90', + 'bc1p4pajywqctu08pe76uxsks05y8k5au77zarzfdsjps6taekd2tm7s5lx35n', + 'bc1pc0tufqfjq2ewq83053r4wkmjl2rg0rhkcd32jgujxecyvxxwaapsagywqg', + 'bc1pa5mca3rgs69uugphk58zq33tp7nh9p3d27vxq5t0scq3z8d07t2szx8evy', + 'bc1ptnrpwxnnmwyyxntjsv406xapnfx5aqaq0jcjna0ga7wkz0uaqmws4ac6rf', + 'bc1prjvm2gu9qkqjjksadsxqmm6femra8xrlfgnxd4w8k7ndws9rxfhs6eec4a', + 'bc1p908qh63dvzqt8hl3k6agwmhdx98ytthvechyezu0504m3eml6kvsjet36a', + 'bc1p4twhadsnzplk7mlxlycs8c3n7l3t7lg058ktmct3q009dcsupm0su3t4zu', + 'bc1pttcjsl929q685ntv45dzccn9qgfdzfrw5js545hrw5jj988n3mzqtcsw28', + 'bc1ptetq3erkzahfsekvcrjhka4s0c3vj7rxlf48qkjhr42dn5lx7p2q74u89h', + 'bc1p6j6ttwv2wsuun0mhy9tsvjglq5yqw2yy43h97cy6te3xgv4jrzfszh5t85', + 'bc1pnz0m98wv0kzdpcuuygjax7expqdamuc3w5juval5xtldj7gka7uq20tnq2', + 'bc1pcguvzng7yvdnuyntqygrtsce2rkyhxn3tnx7kwcltxnavhryy9cqtshuqf', + 'bc1pdgfzhgdyv2rwz0rzvxy45ctqh6df2rcrvex5kunz8pgae30ktlqskv78qq', + 'bc1p0jchrzwyzpgk8ksjz77gcdhxypmsj35kgvc249mau8gr0k9rpdvqpylxcm', + 'bc1pcg3w97n2yyt94yryqmqpxfdjyw4zpa0gp9z6aflxr77wsszv528s40tdq2', + 'bc1ptvad8yc5g0r543hhrk53aagpveqeavk2afps0ejwdyv48uzs6zns4u2z0k', + 'bc1prtrma3ne35m7wnmlvrpufkjzml7crtlgu8eaznsyk4sech3y90yspye4kx', + 'bc1pcgqmljue5z9pff9jdekytepegrxzlte6cg6svx0zxukld6zr874qn9mylu', + 'bc1pq3usutfaqrf4lgqk5glh2u8kxmdr8ddzeml686edak40ng3d8k2q6kqqeu', + 'bc1pd22qhq9sxt30q2fvkqmj2anduwwyeyleanpmnt9r09dxdv8ruucs0zyz70', + 'bc1pzy6fhztz5tsestc48lmthsl9zvuale58fe6rw9g9lf6lfe2nhwjs5l8jq8', + 'bc1pjkrgp5j9uapns49lfvn3lg6c72evd9n7lgt0gu6u4rcrc4g2jkjqmmcu3h', + 'bc1pwd9vp20jpyw549nct8wlgdtdx0w5wx8wg3qfy8hja5hkledvuceqk9w8qy', + 'bc1pg9lyrnyqthnc4w2x6jytdfrgu853fusgcph92q3chwjna0cenhystqj0cc', + 'bc1pst2upxksqp7lwtqw9htc3zqwwcqx0ze32gy8xzdl3706daxh4ykqaa8k2y', + 'bc1pp99xgqvep4pcpqtmwrcnrsd67ahxupfartfj2zgks4d48upnzwaq5gdgkj', + 'bc1pf4xx969ym8wwk5k3u8hyj254ruya9ty8pp2v0m4ef3e73xj845yq05p6me', + 'bc1pttmyvq60wkz5azqrtr960q42alyfwwxd9usfe6yvjqw5mg0cfqhqnws95k', + 'bc1ptx6euazpp4l82j0fyulve6um57g0sym87dgvcyk53x7qtjd4edxseeksfn', + 'bc1p34luf6anvfmljzuwa4k9xaunm6tleqqlg0qfxcnk0d7hru2vcdjqk0e9u6', + 'bc1p4cl34u59wgc6r4px8ge4fr86jhg27rqjpt6780zhntpje26pwqrsedz839', + 'bc1p473quqh47dlpvdpf66njzc65teaaqdl5klans3z8xqeu5zvzjqfs9vgcva', + 'bc1pvk6rcpnyte7tgd7c80ceksvq6892qex7cv9pdzdktp6dkq4ad2mss3n3c0', + 'bc1ppgasvm4dk2el45jw4cfkz7ldjamyzxemaj39mk9p90sd9x355ucqtlunml', + 'bc1pae60555ygx5q0v9g4e95vhlertg4wzxgwanqgu8tj0sekdqva9msgmar9x', + 'bc1pygmks9ncp7qatc68xdymzqhfapj0cxvacf052yu74j98jhfyqekqs644mt', + 'bc1pkjn6jaum5spegjz73xmrxlyt3f004j4ftt2ew0d6jns2t9sckqaq3f890s', + 'bc1pgxrwzfqlzahh60nm8dzcl69fkwadz6lmc2mtan4txw67gm6f5mzsaems4k', + 'bc1pg2m2c86cfqzryjeee4wf6t2k6smm99548hzd8gswls0lznte6ttserhvyh', + 'bc1p0q566ayukshmmjgkjzr5pmy4zxv5kg4t276akw2l06upvs2kvgfqujrzpl', + 'bc1p6sl34r200vht2endg49ttamrq7sg8lemzlrl9pc378lmh4mn6mvqllk2np', + 'bc1p78awv5ez5fa8x0qv8qys03nfweqjv6y7h6mxmvnn8ufqdy0y2qqsm0zfaw', + 'bc1p05hssmsmgvy7exc6eaxqyz9sfda5tzdf4n50dlm67stzpaws7kcqsk98dl', + 'bc1prhtlmtgvzv9j8dwg3np0t53t424awedaw403mhld7lwn4fjv6c4q9ta2c5', + 'bc1puqewvdjt6j8fr6vydkxwez3y5hggmtvrp3jx40whh9sxc526ck9qr8cn3t', + 'bc1pchlg057nl26dkgnw3ug3c5p49tzsl2t06qxgaveyqvkyhyg6kjvqdlz3zn', + 'bc1p9mnwv7janw79gw6h9k7765stsjyl8eppry9w043v43jzachcwg7q3x4hvl', + 'bc1pg8g7cwd3tduvx3lg6kjmkykugp6fyq9ause3a8ay7h4g2d7sz8vqecc8et', + 'bc1pvxajvafh83862kl0d0w3mzjcwvue4xzz6vyjtxe4t6la0f2ava9s3efct2', + 'bc1p366542yp30n430knxken5nlxzk8kfk9kf3u3evpvlk7wrzsu53zqy4cuy5', + 'bc1ppggpked283slcupygquthtsygj7u7l64ey8406ru7e7xahvv2vwscd8uuu', + 'bc1pnp9vupx2tgdnhku4qgmq5yrkgauah4tz2f04zrst405n6khun8dql34l8p', + 'bc1p7s9lmd55p2ucrcmwlungxae6mvrzqqh2ac0h25zyhlydmdzdh8hsltlwgg', + 'bc1pngrqedlrm4ysp69mh35zdrmpw49n2glmmnczljgp8q0juztvnhxshxn25m', + 'bc1p9q5dl9khz42q5n62n5tuecr3zvwjhgdky7rqmh0rj4wfpj0svkeqlj3tpk', + 'bc1ptllzpsajv3kzn6kxzjvz9xpaem2tw4uc22gygkyw5lllek07cpls0kqr6r', + 'bc1p7e3jj0q0z7kjh2dtd3kd8gqfhj9r2pps8svpjyre8lcq42redamq3pc2d2', + 'bc1pxu7lmm35jut8zcfx59e0hq25mc7v5fypeuau22x8nghulsk0tajql92ms3', + 'bc1ppjhjqswhtt0w46z4l6hjp3ztgqjh52xurjnlhkragy7zemyhzhjscpqzjw', + 'bc1pwj7t9l77j0pecstxnmnv6cxh8ltsh32lwdwqnfzkhqm452rnghgqx8w7na', + 'bc1pkljdq2tlxyh6l9vd5nddm6dyz37mdqmk6j3sx8zjl4t8nv4sw2lspkyvsd', + 'bc1pxkvg6dmn4lx38mkxullahd0rk8qqfvwllr7mmtzav37jjavjkqqs5de29f', + 'bc1pys65ddfjh8eeele67z7em5m66f3eu3ztnedzuksjukrpy753uv9q3h6r25', + 'bc1pqkhm2eu7wsxlahxcgj3qpderyfcv9a9gvx6fwykfx98zqxj8dcpsfghus0', + 'bc1pj0wzzjruzjezkxdupfjjhh4arf4d7spsqj2u8uldpc7gcdxs4lrq3vue5v', + 'bc1p6ugztsykt0nvvsa9v57wnpn4m6a8k0xk5wvvscjsgjkcv83chdesftcqhl', + 'bc1pxwv7k55m54qxpra4c3h6eahd5gukt5chp6k2selnmn0atxxfw7rsukjp37', + 'bc1p4y3fhe33j495m5j9lrakplv7a2f32xh3cx6f57z03qcjed49gmssch0ymm', + 'bc1puy3wdxg7fg5lm3h22jpvf5zlsfae44cpe9n0ydh98rd3lzhqsugspgf6u0', + 'bc1pvs0sp6augclzgxs66ufyfc5cwf754knsd65wpjkcezz364d94j5qw97s35', + 'bc1ppn2rxp5fwh32wkt4hrkswa3jy7yd2mcg74y5lj9fm30u0ahlpvqse8w5l8', + 'bc1pt0kmfd825lsmayvmv5v7evq77gvfpd47uukkfvt0d3hdd97tdc2s79psm9', + 'bc1pfcyqw3hgsgetvsz8kr2jt4vs595t0hj2wphwfmxqchm0aen46dnsgkgcfw', + 'bc1pc6msjansxaf7zvt6s686vgyw3lk9c57uceh3stxsf7uk0ultc4cqjg4lj4', + 'bc1pz0q8d9p0yra6e2078th3c9h2v5t6vg8gque76udqms0nfqcnqqwsrvl9c5', + 'bc1p5qrchfjd5flc94rf8zmu9k0z6p42zxtr0w9fv9tmjqt78nsa0xcsnzc6n7', + 'bc1pnm95rzvnwkr3cky26axqp3za5je705xza223vf0fv6lp8panmrcs844he2', + 'bc1phjp5ef2amhqw6qx4sv455d22ktztyns0gllkvmgrtxk7svg2duksnl6ca3', + 'bc1pz2twlfvclq59n6rg68njnnl94sctl5kzgkcm8ajvrc0jea4s5v7sje6zqp', + 'bc1p3yxhvfvulqespv3nzh85muhky30wzjrv3ft3xrxpav57x6m44pls8ksws9', + 'bc1pqx33h5kgt2zfghxlcyxgq8v3k7lgyuq673qjwp9x7zwre043adks04wymc', + 'bc1p54d3tnp0hew3kx5xm2ff6ran2uheath2n7dv39s39h74xnyewq6smxz9ym', + 'bc1pjmdvcsu6vgrhglyj3hp9562uqxun3jv0fhes95gh9mrm02v0naqsl37sqz', + 'bc1p4ale2hav7lc2t54m8v5rvmncjy64kzvrmwudn629xpasvqf9q6js65qme3', + 'bc1pykutm77t9m0n8lwfjpx602p0p2mglak79hunp2rxtulr9pcrx29sy947x6', + 'bc1p6yqcnpzqrhqtuy5mw0mxm8q4m5yn7798vca377k2n2erk00xt2nsx5wc6l', + 'bc1pl8q4pusq34lqhzmmwwwxl3jxdqe0gfsr40q3tpa0s0pnrxh5zh7qyfmtkp', + 'bc1pxrnwsznlwks2de28c4zltz8geu5evsxrtd9aat809jpu3xcwq2qqdfsjwe', + 'bc1pk6kta4dcw3h5v25qxk99qzkherxxnc8wmwej7kxagcg0q6f4re5qcqnqsp', + 'bc1p8at7f3vsl4w6d2yjszuy669zrgffx2s0r9c72uql7wvthx9z9x6sn3lhmk', + 'bc1p497f6kquk62jsk4td3y9aytcweae39s34uvlq295j3wp3hkwzshqetsdx0', + 'bc1p8wkvjfvwcah7nefg7yna0tg6sapjajs0e75a0awf95a2hjvklraqqpw6wd', + 'bc1p0snlk8z9p5fqpt4nxgvrlu4e7zpefrm7tfnf9el0pep2mu3lhlnsec3ljr', + 'bc1p23yfj82h89w076td8pepdpgs4rx4r93f6ru86wr6npnrp0t998mq6k0e00', + 'bc1pjy3fr708pzu7zem3tsgzlpycpcv2t4qnmay74h7s74uy95dvp6zqgsqd83', + 'bc1p0ql0hve83nk3um5wwrydw9f8tfjm6hs85fd8j5kmvz8lhxdy42jq0zdwrj', + 'bc1p2lxmjk2svvg3vye03w3xm7c4rxp2tp8edx88jftchmj3n52wthwqfdr82j', + 'bc1pc7n7gnjulxlmurd7l553hmcdsddgdujwl6snwdp0j39mlc72m3zqnfmg2k', + 'bc1plmf6puanj8rqxplkxpnqvfk9aygpagl64ds3fsjsxhjtfhut9hkqy6m5h3', + 'bc1ply5g5s8davjh82nmrhuj0hl7l6ysar0gvwcmf8df6cpx7ltxz5aqqdv3a3', + 'bc1pxwvqpfq3r8cky4ct90g4jwfgg3axyvkqmqll8d2ywy69qnssz45qls0c6j', + 'bc1pu4zxp7q4epvgavgrf7tazltcqvcu2udl9e9rjhx9983hukkv7a3qxcrj75', + 'bc1p3qkey4w53phmt4fqxxhjswfldssyrld5fwxu4v4g9wk3t7tuj07qq8m7a3', + 'bc1pfse6r50yushx432yffwekj68lfewus0zugltqemrk2pd5fs0tess2aflyn', + 'bc1ps87hz4dpq5jt586dfwffwrh0vxklrndejy2g2jqjllh609rjjjcq8dp4aa', + 'bc1phrkfqgn6lj0w9lma5ucqtrl2h4whe4g3pgktxq38d03q67hgzcvqv6j6mn', + 'bc1p5xc06jcxlrt3f0vaxd772cxy7qvanwrw4s98xkgykaztr6ac26wsfcvn9q', + 'bc1pkqxlf36anyu24lf4msppyn5ls3kskg7gxxse87qred6cexh0wmasvxdzjc', + 'bc1pavvjcn55swul8u8kguhnc9224vkan5s4w5mwlgjex7pywfdgkywq37pz49', + 'bc1p92ksste8mgnar9vgxlc5yj9c56u4lknfj2swjd39t3k9s6ddfqes5quff7', + 'bc1pn886qw06sgta3l2d0tz0cdnp7j38v9fdn8dj5s2ganct3p8gsrgsr9qgzr', + 'bc1pcl6z6he4u45daky7y5nc20gpu0dr6g9ffzh2z58tca38c9wqgrqsqg627j', + 'bc1pqfvcn8ltkn2lgal663pxl2ztnp936ytd44y2y2mqexzxvql6eyxsxtdun9', + 'bc1ptwsvqhxmuf9fn8djy0afwrrwud64f599q80xzu82t7wpqylw8ftsv995x9', + 'bc1pvn4k7m9nzstskkgcfmc9rpz8s8766frln9f9ajzwkptm8egdk0gq7qx2l0', + 'bc1phspzycwr50mj8gl9lvg5g4d8uqn8m47q4kf8xyeppjs5xhmm2gvsnyar9f', + 'bc1p8f6a34cecnv7gyp4gz5g909rsk8m3lspzyhfasw6gjceru3yfkes7zc6n5', + 'bc1p72kcp2qt5uzkdznya67ltehrlvg3jzzu3rml6kyals6c6uutzgkqcw03jd', + 'bc1phg9f4ska8ht8a62uk3m7m9f7t2j68dz9mg9ta2qcau7hp9kfh5hsjlvkma', + 'bc1p0wenzg80aklzhtmldeayywenje0njactylcfdefyayypuydyffesw5pkx8', + 'bc1psgfld7evtvpmkngdwgrpv2ya2jpa28v6vfwcn6vndyxefa3nk3js0hse0q', + 'bc1pcr3rtuwkp9puef5us3dv9z6kysylsv4e2acgj7avrq5hjuak6lgsa0vudw', + 'bc1p70tnt73egmnz3rgx86j6r39etl563lc6my9j5dtx9thda8cwnezqy903j8', + 'bc1pjjnqu090mmv9mwz2e8mpztk5aexdhq4vvw0njga948zvjzh5n3kqa8uu6r', + 'bc1p8js6enxs6drtm9wuzvxy42aaz8af3ptjwtt9crkgu8avua20rejqj2p8yu', + 'bc1p3zcjcp6zws2hk7ul3dhrruvcv45a0lq5c2m0aceyzqtk28t3lhusqrw2hd', + 'bc1pzajaukauvka6je0jhtfwpvf52gh63r5mr5uz5nrs4cpucr4fmyfqdupdqt', + 'bc1p9qjqr87ehpvdyq77w9m4dssc27lhwx6zslwf7wlvf4syz22jgqgq8aajv3', + 'bc1pw36cs264sg93f3utpvesqwszrxgqepmk7alusc9tcj70pec050ssp40g9f', + 'bc1pdhjcm7nl5xhr07akhgeu3zgrq3xf6k6666lqsct2qnqwt6ktusdse29060', + 'bc1plvu9svza4ss97zn4z83xqfjyuhvw5upqg807uem5g4rcj2k4mzkskkr3x5', + 'bc1p5xujdsd7jer2pw5v6w5lr8w54dgn436mv00jygtafadkvfv8c6sq0ywfkj', + 'bc1pdhupjj9d8gwev6zuggkxug2t9f4hw4wqmfe3sfvwcfd2hmqq58dqf9jql4', + 'bc1pw4q5zw7yfl9t40rtlx8ggk4jklrg9dyc8v4cxv8enlhjda2peg8srtgg4u', + 'bc1psh97u7hv7ntrryra64jkymarrfxy8q9l0h8r8k4k7y8rrl7lcvvqq90nxf', + 'bc1p2eexfdmn4wn0u292u4qlwxu98e6qgkgqqsk529t778mr32gphn0sx8wk3s', + 'bc1pntvd2tzfqsng8wd3ee8ty6ayzp0zn3a6mwr93l2enrcp0w0xswas8vqvks', + 'bc1pd8enuntrw762j678j700emjardwkr7fn89ufn96m44dnassv5u3qnnkjqy', + 'bc1p3tvu2aydvjua8sfr9cckdhtgsvz9q3hufdccc2cfqezva7tmxvhs86erd6', + 'bc1ptcfwh0fnl9crcx43tmljz7r4j2qxl5ref2zl47095a50k89drz6s6n0mcz', + 'bc1pfavl6mc0970sk3zye4zk5crud8fphr2wh0gtjrkl35ppwvrpa8pssry6ph', + 'bc1panrtcpa898ptt2xz03lyu39h5lvmfx3z5l6d3fzw397v5lwuqxysqrwpl2', + 'bc1pxlcxve3m453gjga4gxrmldaqcx9c043dedrhcnhmnsv38qurj7ns9y7zse', + 'bc1pvq68u4rlwtafzpvz8gya0y2ntjuqt9xfussxych3yu8dsmh0n8vq8vd3uc', + 'bc1pjr4e428y2ynjqgxefd40zwtynu74n5mrsk6ujwh9qhcswgfxlnmszqqhhu', + 'bc1pls5kh60ddw9fq7r6t3zggqfxr5ujluqctn5d5w33tvcavgkumafs7whf8a', + 'bc1ppdx6mym6zj34yt24pg04q5npqxk2v2tgv0h0gnvsnt0974ztejhsp6pvau', + 'bc1p6s8ja530p7mfu5aht0xrqqr572udasm35nxjm6fxrty90ap8qulq6fpgsd', + 'bc1pwce3wnjtcgyze55fcnddc3cn9npr7qnxldcmjlv2pp9k86gv24jsm9yl9w', + 'bc1pjqddh40gdnw77cdg0tn02ksfx7duk22r9e8whf2j4vh75hwu0p9smweccc', + 'bc1pcvktr3dusyqpmvvcyy4arnxzdk0yrc78t7678eeq32ac46anda8sdw878f', + 'bc1pkudmeflsua5e457ezppkx8v7257dtt884wj8jx2elu3qglf3wc9szf430w', + 'bc1p3xxn0pmnra7zpyenf77598w9mypewqjcd74xdsztktcwhe6hwh5s9zuhft', + 'bc1pjk95ue34tg0t6fmw9ty3r6uc6u400lqy6rzdmst5nmzw9rcwzxmssqn869', + 'bc1pj5n5ud8h2ksqzv9re3c53rd7zkw48cwz8uvqyrc5lpdkf2qvfhnqa70y2c', + 'bc1pzgkmqhtkxqan5vutwn0rlmfzmucnlcsvaps42squsgq5pxyzzh0sr7rpup', + 'bc1pg2upuhz8pp6l76qk3elu8rm029nmymvhz6ft3zm9napuqr4y4v7sswgzky', + 'bc1p5fhtqqe8rax526c49z73jdhx8tzq3vya2fdqsl3t5wkdyg7nx3tqg9kzlk', + 'bc1p7s9za8qsg6h5apdcjths8teq2etvzt6v2pxggyuntkn9d52xn7nsjrzd0h', + 'bc1p68dmdmcqkdn6m7lw8dryhy3c005jy29p9hfma8lagwwx9zaqpuyqn9a6hr', + 'bc1p2zkhhwhtekn3zd7jklgngjkldm2r7pe496qwel59jj9lpf4pcu3q84cpv2', + 'bc1p6aglvfvs47fkuuwsgt7zjjwrksa3ancs932mmr86zug0u0d73h8sfx7g9v', + 'bc1plukrfeackm0xnj4al32d8tntg6a2fyda3g55ejqzu520afya724qyyuc9a', + 'bc1pa9p6fjxg2ljz2mfet8zktrppg3g6k0j34z6mdfc9av4azwf76rzsezsh0z', + 'bc1pes5ttlq2eaw3uqdg6zyrq6cpqnmc9s58u63jz0qf2cv0tuv9wgcstzrezv', + 'bc1p5lq299c4pm78pz6l8522nv02y94rvsuanr8txucekvp4pnmkmd2q4dqwm9', + 'bc1pu0vruztq3n9g2mdnaql0lr5uzgerz44xsq5dygzqs8c74450hwpqm6udhq', + 'bc1prcs28xynjj080dmyamqnntqj405545vghqkanhvdlcy9nr63n8vsch5unf', + 'bc1p47m0p389ja22rm3ejqwyryz8lzfsuzk9hcntqhr6axkmnj6q0y7sllfr70', + 'bc1psw3pn9v4mvl4a67t42wtecxuqqennkawj22rq95hndlweexs8zhslxqvl8', + 'bc1ptnmkmp4yf2vxdecf5jv254usm0egp6ajz5thnzpc2vrmc8gwxgkswmr7mt', + 'bc1p4uhna3u0mef07j43jj6alnzh7dw8slx6guswlq45c393fh6xweuq2ggjqg', + 'bc1p5txr55rsnx2cdunxr8wdawqrg2g4z6p32nm5kglf8j6jumwgazxs5j2vv2', + 'bc1pnvsnnfp8vcc023wv8w4zw5jefp3mpsud79ydrssmy74c4a30ttqqaqjr33', + 'bc1pq6x8ylspfvfldcgus7897xs6vemvzrg2cn625acjjftp79swgqeqdta2ds', + 'bc1pjz54ga4gjhfrjasyyfh9f8vfjcyuku3p8j4qwphjrn9q32f6wduqn8xqss', + 'bc1pgr9h7p3ckd5y8fjm7gnmhhr30ju7y0m7xwhmqu8xxqwzwe6eleks2zxyqf', + 'bc1p4hnhzq5zkqwssqn0d5tpgrs8dy3s3uv3atd0f0r64wuy2y6tpjnsxn7r0t', + 'bc1pqqh3lnphnqvchr356z8eafu89vjwc7zlrfevyhnhzrqcymjekarqnv6mwt', + 'bc1p2742d6vcjngyxhkaz7ukgknu9s2x33jprzl52cnyvpnnge7z383qgp4u28', + 'bc1p4ql4xe6lpz0pe77834ph0sw89e79cyk2ev3dp2gtrdqnd6p8v7mqn33nut', + 'bc1pnpvpqy5tg0azxclaar98vcf652zgg6hwgf8xessfk9ra64uamuhq0s8sc5', + 'bc1pd4zjn077c44e43pfmz5ez7tx7fyx0v0kxgcv8xqrf8l4t05umctq924z8z', + 'bc1p49ffqe3j4f5jqc3avwnqp8uy45mszvfjg4vcsxclgrmnjnlug0zqh60xfj', + 'bc1puldv6dfe009avgtv2h5zmfws0lu428w9tg0957lv2snp6wxc3u2qkmf08h', + 'bc1p2jhjjnyudnjqdu2fe0tpwyrn6pvw8gn5ezq9gs8c45e93cfewc8q0q00xm', + 'bc1ppjn0jdfpr2g29qc4vu2z69c2vzjr40wnxsp8r60gp5eksnh88pusu0ujtv', + 'bc1p609jddxkn0gj4gdt73xwtulpw8r0nvde3pydlqwyf8fmcp094zxqh8ffa6', + 'bc1pmm8n3gzpz0hayc8l0fyezzltejfhtmtc5sr7a2uqd8t2f8q358jqvuvt3r', + 'bc1ppfyyu427xp2h3xxm4t7z2tqa6rg3fmndnqes6k05vnxmju5n4tps05venj', + 'bc1p6d7zy9f8prmfu04q48d37eeysn30uvl8c6zr9t569uczmd4d4a0spkmuy2', + 'bc1pppydj4zwc4h7unzeagkmr4hypzvp6tfrqs0sf69rk4jn73vwphtq8fa09g', + 'bc1psjysdan7ezddfqaaevv2y4k7w2jl2e2g2dh0ggqxm88sztxh6cpshj3mm3', + 'bc1pxzqmwn7jnrrwlp47mx7e447cxdanl5srcpwydnsvxr67ctvkpklqm7fvpx', + 'bc1pweldke3gcymlun3m7n39e258cpwz8vqthln4md77udvreaz8vzeq4t95xs', + 'bc1p89hu8yxsnuut49wltn06dz3u23d9vsze70dk52erufkzep5au7dqfq90g7', + 'bc1plsg6zz50fz3gs8h0tz5e0cw28qms278xfgwvsay747y5wp2826ts9mxv5p', + 'bc1p46fg0gmv50rsa8vd5jwfyu4274hnj5g96futyqdlu8uf57fd2udqr6plne', + 'bc1pvyejsj64jsyqsn8qrnlrt57cvrtrxv5cg3ha8pavau5kg8hz7gyskm47ax', + 'bc1pr374kkjfmewfhgq20n52qs44t2pdd78anpxdd4m7ydzrn2lxmq6qk8z5rs', + 'bc1pzxkpv09nz2vmlu95d939vfk0uwu34vyda6n5l5qgdcyvud7txcusk9rn0r', + 'bc1pdpxkerlrkdrz70f4mrtlemqtc4w9ww6q7msugaxq4vuez384js2q564vxu', + 'bc1pqlpxyhr2l4s5c32k0dzemfyq5yr8zgh88lrc68a94z3mvuwpfp0q6zepze', + 'bc1pk3venhqklz4n3d6k4958gl6eeug3lq33yjyvpvlwk7ceqewq320s6s5rff', + 'bc1pch9vdt2fp0qe0x5eg7edknjaarg4gymn0hvmy03zujax7stqm9lqwd36u5', + 'bc1p9zje7fy2ny88ewujscvgqtyz3yw288g7ula4jf2pp4896eacemdquqq7rw', + 'bc1pj24uwacvm28pf38rkcg3fjqvq7fu6zrv5zsk7qmducvl3zl9m2ussgt4ut', + 'bc1p4khrgn2lewmpwzdrte8ap4wxa3zwhvhlz2uarshesn0y6d22a7xq70y2sm', + 'bc1p25j6nry73s2hxyf7jwckaanmj0nknnm87au2zgp5xhs6cn7fqgrqxcj4lj', + 'bc1pxxdgfhu90l303gm4ndkjp3td9j66g3qykdzseh87zwck8pnm7hfqaygwsl', + 'bc1phytkzl289v8045m8zknj6c4cqlptnyxxps7mheyjm0ses5y5vtsqg90zzr', + 'bc1p5ah4fv30rv5z0g7u6c00dky07hll3m487hqfkc6vehqrzd7grjeqtjs5n3', + 'bc1p5llygh7h4ax0rm80v5cm8dcsqygsmv2c5xvxux37mtcek9ljk8vqxxxyru', + 'bc1p9nlwjkky68dtjsz7krjujk7pwkpm539zs08kd5979hktjw7cl06sjkh76m', + 'bc1pd4tz0e5sn9s6chpf82z97f68e2q73l753zmk99p83aktmvmh3c8sc5qjhx', + 'bc1p3m3nl20u0vsj2ylxllxv3kjxg4kyhrpn5d83fv529k97qlkr48sqj3t2yn', + 'bc1pt7tsgv8lh9cvpsefsdgmjjx57sjg0qj5ae38txqu9p4kae7p85ds4glr0z', + 'bc1ppw8cf33p3l7sf9yufue4tesax439ukv93rn08ejj0h4gu5zlz3zqs7u5x2', + 'bc1psgpl0rm70jzdcy7zgmy97cyf625ga9g2lafjgkzkxyqf7edg4d6su3ypr0', + 'bc1ppyk94e968tf23k970ar8jp7xdlxmfptl6jg4e75sps09xhq644mq6rl0uw', + 'bc1pzvmnwjsj3yekhh3ay2423j95dt9lnmqfud4l9y8pygr0udc77hjqg66fgm', + 'bc1p7fctjtjnns7lxzve9vrdxq8sv3t784cz07j8nuklpad57vk6vl3qvvz46e', + 'bc1p34ys2mulhwen2ftw37rxg8vk50lnq8sj6fkeqnjgrgkkrhh3h0ks6e7h7h', + 'bc1pcc389qjz5qrqqaxdexphmmfv8r7uu3yu5wgu75ce758np7f8x8fqnzz3ws', + 'bc1pg5c5qcsm5w28xu7xl7j8d2qcufs0jwx667y56y3hth8284nd2grquy5lj9', + 'bc1pvhrwvfazwxxczczear5gvkfxz66qjg4s3v3s008q8akxxhjz4qhqj7w6q0', + 'bc1pc53llf3d2x35jxcjgaj07nwzllrykk7j3we9xxqp8dg2afkwez9q2w75m6', + 'bc1p5llv0663xv4c27qcusumvuzu0dpxh6a3n7lrsz9l3w5tgahrd0ds7l4ec9', + 'bc1pu7rcwyhkn2tpu5rmsg8hqvtm4qjdnu5pjc6rtjs57g62pm70gvkqjz2ev2', + 'bc1p4z4ktct2ascyu6lcpaehqurjj6lfa28h3tt6qf270uzwa52n5t2qrd7xju', + 'bc1p7znnw2xg8udpu5zpdlaztq86z3qtkpyaawcaml3vlngs9mvaf3hqmf95gw', + 'bc1pf4l0e0w5m68ty2a7cwhxjtzk7ylczwtutdkhga0yt7wpwz4psp7qg5f4mp', + 'bc1pcwun6ay5qvd0snq07jx35ectrd8he4vdsmurrckq5qhujx0079fsverkcc', + 'bc1p27rn3sxhzmlagzeghu70978lvklhv3mfs6tj63s7tqurzhunyx6q24qsls', + 'bc1pfhq464klk55dwsd4cx0re2eeuanqdyle6vvvs2pjk9efvyz508ns8evcu0', + 'bc1pgzj63axq0r23r5ncmmmxxumqwnz03sewfp0t6w5qhguwfznmfa8s0rtyve', + 'bc1prshpg4n0lk5n4a0wt8z2r7g7pv687uhtwmekxta0v3ch0hmlxdhsg4cpru', + 'bc1pma9zyn8uxqfprfk363hhw9tk757hu3rt2e0v3dd4mu4sr3slvf8q67mlpg', + 'bc1pksl5yjcw2hv756crmszmcuen89n8y25k8dthc8lqmvqnu7zruaqslp29ym', + 'bc1p7faj7hnzkwwd7nyee38r274h6uh2gsl6na0rw2zq8gdg7sgxsa2q3fu3lv', + 'bc1p0gwqh6gxjwncp5qjel0dfgduhjkml68xn398nwkcpde04s9r2jdqxyx92u', + 'bc1p9ycpumjnj6tg6gd046agx5wm6ljx4yp0pjpvvdp0t5r9gpwwn2psq69nzn', + 'bc1p4g40vgtnf6upydxyp2z3ps0v2s78dtysrw2fgwmlvkxpg5nkxmtsjepau0', + 'bc1p6yrms3fw5fl8y5gu793vrleav9cg05mjlxz5x43pqw2aey62zecqxx3jrj', + 'bc1pn0jc24la557zuc3xywvd47pw5ulj3q58l6asvtgnel67chl7452qsg03gg', + 'bc1pcqe8lfx2qz657dnjzr70jx5tgy242htehagazmknulfclk9ur78qc0f4c9', + 'bc1pmj6l5cvjd2r2wsql4jrc4rex4nmlmu42mxzwzan5lj6njyywmkpq23slvd', + 'bc1p4wfrf99w2xpq9hwnwzlsr0qqf03phr836wxpgau69h6u7r8c962qpfm9xr', + 'bc1puz9pqxcn7tmau5gapx4gwvzfkl5kanj0gd2udvpz259upxg9cfjq8pjgyw', + 'bc1pjy78zsff53d3z03tygn0v3e5ef5utdc0y6y09cuw7n0s7ea3839q990yhg', + 'bc1pjn0zy4cndmxnnj435gj5y2vft05u48dwv2l5s9l829guun60m9rqk6ea24', + 'bc1phddy4hjphxnpxrj9rn8hn9p8v2ple42x7mmwxy0ag820c6q8v3gqddrg60', + 'bc1pwal0l3cvmtj8xrc5ntzhyyf9rwxnlhus7d3j7wp3ryaesd986jtqqa4hgp', + 'bc1pv3a5drhse6zcnmhwmrlwxl2uzekradwu8eetcn8xp8jnkwh73e2s0p89u7', + 'bc1pfcd7as4f0ldj5lv287cpr0hg5yg2q57ccwell35n2de72tnrvtdq8m620m', + 'bc1p6s9ewc2alshmq9s7h6tuvvcvrewxuddx7f22uxxu7k4sewsyj64s6s4ks4', + 'bc1p4j8r6q4xl05u3daplrtndqrstdha9hd2gukzwytry5hu9pgzultq9c4sn9', + 'bc1p3cw2qpyetqad50uwx49lktsr0nut8van7vtyg0587dfa4ez4qf4s3z8cqq', + 'bc1pz4uvma2kg2tghafdp07c9vupn8cpj4mwu6zw89r4vscd59td3mtq0ldwj8', + 'bc1p3hmw2pl08s5ssz0rv4qusvj69uz3znfrfp4acz3ww0vwek27t5ns7dx8g7', + 'bc1pdej6gyesjz0n4xexgz0w9w2r73dqr4rpdxa4fjmfw2984rhnn4xq4vrc6p', + 'bc1plsz4p5cy4yrfy5q3g5vzcuqxsparpvc98evnxmzcqvkj9p7fygys0yhda3', + 'bc1p25tpzctvazx3n0exwh2h6z8tvtrerapxk0kj38jemsr3wjjq0h9q5aq22s', + 'bc1pszald0cjkd7paevl2m0fyy43ktcscnmzawlzzf39fvttvml2xdkqgc6t7s', + 'bc1px2tptt6qa336a2ufxjwy344dnp09l5wp64h22ufsk8h49rvgrtystaxypl', + 'bc1p0ndheztg3ha40w32zukzxtj9ma6uwaykya5v4ukt4suclf0e674q7f82jt', + 'bc1pq6e9tch4xdqflgfhk5zgfz94xzm4mzddp9w9q8leqtvy9vasa7esdyx4yh', + 'bc1pe8t5w4l0p8v9t3hgvk6xj7j0haslq3h3s83mqxyslpygj07t3qxswxr37n', + 'bc1pm7x48ftez2ueg79y505fgy9vqjcxglfghqdpzkn9pe8qkdcr8qaqu9u9fx', + 'bc1pj4s6t56hzrdc0qnz99u3nwuttwwawc9xj78gw4cm6hwzuedgznuqsxtqg3', + 'bc1pdpelj2gehxxmrxqzf980wmwgfffnthw3muvsccpk8ms0en5r274s75agpu', + 'bc1pup46xavg8egvzqecnfkgn6dpxu74jhs6p8mjpkjc0n7t6hlq0hnsrk5hd4', + 'bc1p2nj5qavzru6uta705k37axrghswp42f7kdqhre8nmuuywfdkx85qtwxcuq', + 'bc1pk9ry75u0d99qwhs4ynul30xfmkfgwzq2cddxn5k2qek8uqm02h0sev22mt', + 'bc1pfl08ethnczmxpq0kajpm5ew39smvmna2xsdg3yfuuk77ld4ajcjqrcl3lg', + 'bc1pyq5zp5589e3ttemrpg6q7uf8tcpwuara2pfqgem3j47xtju0mycsmgd6jk', + 'bc1p8tjgq4mh5rh590lxccaxka8l5cr8qnmwwxqqw2fj0t8l0laradkqwzgy6a', + 'bc1pjs84jrng8hn9c4dgtqllurckfg2uku0uuagnttxmw26cv5kll5lq096z8r', + 'bc1pccwade3985pxrr3meykvd9mtx04dlzxedlkzwh8y8ew5q66klvrqg5mnhk', + 'bc1p0j6v6wkkdlldte8nxutndqqnyhmhszd2ljv9qtu950x3pktafk5sg95qgm', + 'bc1p4rwfd4sre5h4s9sz68w8qada7evthd3lkxlz0ae5t58kal22qpwsmy6swq', + 'bc1pcmylug7a54hg2stuy4xcjty6n6g6cetvml9m6v34u7axj28j09hqdzkj5v', + 'bc1pz52wmvmxssy4u5mpfufw4ap7kaac5m9upnenmzjx9mjqff2xy23q3qmf30', + 'bc1pqa7mta6levrdpfpp08qss068g8pwhd7fgfqj5j5zfgs29xkdkvkq69zdfg', + 'bc1pfakttu3pefht0n3va685l3xyl2vg6hxvzzgzmxj8ggrg3hsft9uqxvzml3', + 'bc1pquj0w88vjcgcuyrxclx07jmazrx8kthpjxfxrypc0wv6emakt5eqcf6ytm', + 'bc1p2pf4fmk7ygealkde4npfedc8cm4g2rnhvem0zc4zlrlvxfcjxjdsyj2kgv', + 'bc1phz7k8mfzvrhl2cqzvcnedpn39e4hjlu36g54srxhlza9sh3c93nsgra9g4', + 'bc1puujcaaumksz0zdrgaxahnytfep922kgsl40wj3g4sg7tf7rxv8nq5ay8zm', + 'bc1pzvckzplq68dz0u0v97esxc063640dq8fah42v4hd3wq39ychfpwsv7use7', + 'bc1pfx3938sdvkylz5rjgemvae4jfy2lvtdfnemgfevedp2vtk0q0npqp28efv', + 'bc1ppkryqg6kq73atsnz2pnzungfyr6ayhhfkjgd6fgcnnfv7hqpve9stwsat3', + 'bc1pyq8fxfh5zxgm9dmsekyxgm7mezerrf4rg9mhzjl2vena4dystq5spzy5lj', + 'bc1pcsq4gc5dxmcwarjavj4r8ncnehm5xgkyrtnjupeueauhj6wykrgqj04yq0', + 'bc1p9j64vgmzs75y9tm07mvevwaeves8eyzycpwyfz5txjnw5p7fr5astvvyye', + 'bc1p9u43avj6u0nf3vevy4c0drfve5c2w906dgz9x6w2wx7xak0j6n8ss0t2p0', + 'bc1p9r2sj8rtdykaq6n9m80d05qrw4xpm3d4etckk2t7mjqrwtcslx4qdvhsy3', + 'bc1p27c3vaw302qhsyptk6gtl3m0vljauq4dnq38nhsphq8d3wygn27q6lmdgv', + 'bc1phvsnfqfz4dj5v45u75zxmdhqjchvw4rzk30hxpaamnrldduejdsqfckq79', + 'bc1p4xu93awrd76w5jj9aafu8kzfdx3mzfkags77l3v63yxcn0ne6x6sx8luhz', + 'bc1pkllkf4vzvcgs34d6cfj7fc3zankpeuvx8c02pstccawem3jvv9xse5x3k4', + 'bc1p9n7ffh8637fvtxczf9lyjqylnj6gahchs337zlh5pm7m5h737assneeecu', + 'bc1pnjzrmygvu5px75qdlfxcfh0zkwuza5c0uptwulwjqh2lrgyw2z7snynxrt', + 'bc1paj5g066zfq4rsvzfwqazex95cq2svy49tpnlt95ex0yw5el25pyqkq6wkl', + 'bc1plkkkq8yz5pwl984l46nz9vx03lyvrudwpxheu5c0dt22ktxqsdxs3jww3u', + 'bc1pr63f8msjp5vc3q3dr7ehpxeykg0fq323v08jtvz83c6vsthc520qf559rh', + 'bc1pmzervjhxxkk485j53gq0zrx9gxzjgts5s0cgh2rdm2ulf0a837nqek8hgm', + 'bc1p6reaf4thx3exatmjazqg8e3rr9ren4kgs9nzg4y54pnfvmmp7luscr05f8', + 'bc1pxsa097ef7j4l09a0v7xeepfy4a98n7anh3d6clgy873qz2dvt5msqhyxpz', + 'bc1pg6jn5q4nccdex9nuhmshaqm7rglh7hf8wfcewjunt8tn9zplcx5qu3tqjs', + 'bc1pzatedgjr9mc99wyqd6vl7dvl2r02pjtvhyf0e3fc3mg80q9wqpaqgeseks', + 'bc1pccpkwdyyg9rmzmrkdvk64eh0ua6huw5mlytvjuh98p4r6mnttxzqd6uujn', + 'bc1pa3yec965gsu2pmka2m46zh4sq2mmszzq75z0ypfp92zzusmg5s5qar5k7s', + 'bc1peucveyzk2anseau5epg9hj5rd03t46fkrh5eeyqd4xh3s7kxsydqy5xjqc', + 'bc1p8z8swv0ugyy45kpyr37l9qkzsmkm4llseuqfna9ze880tuzrduzsuvgnaa', + 'bc1phpdwae7rx6tdd8wjjr0enf4yyxc7yjxehm4ujt0g8urckhekddmq3amkps', + 'bc1plhkvppd35r0dk5fkzgd5gct89hp9xd6p8edy7ahf5gnaxy49uj6s2xh5w6', + 'bc1pcu389kpd6zh4v0p52k8p66hh5kac5h23deye7d0lu27rdwwn96kq6gple7', + 'bc1pksf5aunqvuuxrh2cdzypv84xqwd5fc6jwplwlp57tdwumveezz3qzfjzyw', + 'bc1pm79htsspqwg5pkfr4cj0gfkt50qlzk303dzt2ghs7chndey6n60srvtxge', + 'bc1pr4zfxf00tnwukfas7fvdv8llhzlxjyueyhmg2tq2wnhw9qeqm8wqlw65nu', + 'bc1ppx89g77xgqy27f3wkkjyeuw76l54uz4nchnucnsg4r4ak2ytmwgqp8x80e', + 'bc1p93vpfq3kfqzcxk0pwcazgk8032x6c9nw699a3m2wtf88pcvyegnsyctqum', + 'bc1pmqkwjgu3nkqwyeccuclymyyn7ghvud29yjrc554p2g8sw0h5v8kstadu6c', + 'bc1p5uu8re8dr7fy4ntks6em05g2z3ct9g2ay0ccpc5sqquqw6ntzknqsnh9kg', + 'bc1p9qyurwnnmnzxc9swyszl3m4sr272mmfewygq2yae3vxtll3f4k0srjk7ml', + 'bc1p6rjsngceewz96eyn5larww99p52yt7zj9uwym7yz83ljgfrzc4jsuyffn5', + 'bc1pftcm3eqcs0y2z92tn9fnltydkpm22l02cnlhqt9hf9eudurlyf0qukxyxq', + 'bc1pnqn3l40cj659035vgnygvutv04zu6qp8sq50wttgrf3xfum3jwps6fxl7a', + 'bc1pgcat9q6c8z7g4pa3xslsys7pd0vr0hfdtgspujd9e9u5mnur9trstz8qhj', + 'bc1pvcwqr2q077hj8yck3uxjdmysmnpspksjgyw9uky9jr7w2lkzau0skyu6fp', + 'bc1pazpsg5dyycuh9w30pnkpp5j0l4kcxz926nujwt3j7a5trj97u4nqyk2tvp', + 'bc1pe6vjzxpsw6jha0c25medf8zpy2z03xqruele6835nkypgheup5as5u4dzx', + 'bc1ptjp8t699t6tqhtsk25a4vfvm8un9z7frg4a5ex9esgsy0p68q8vsjl3f5d', + 'bc1p09eecy0j6l6yaq0frgdjukhtqr4jkgs6nru4kuk93ndsry9pvkzqz4neck', + 'bc1p0m37e6t7w50wegq4tve6d2v6sj0va027fapqrnacdm3v8n4f467sefsxdz', + 'bc1pzn75wqyp6hn02pnq3e8v8dc2nvywzrmcjcrapwwgvymv27alzg9s0g83t3', + 'bc1pxyxc9t8cz3qf345eu5sdze2revwgu735rqwwh8af36hus5r605pqnyck69', + 'bc1pns9zxqhuklscqfzg66yjw246uhk74nmlqv0mmlakc2lefx7mlf4qn40zlp', + 'bc1p08d40glrlh629rqvwp9wd5t5dzr9evm3847zcnswz9alry9gxlcsuefsls', + 'bc1p96g6jvlkuvjcpc0rgsppj36q7ul9nyqt30sng334ey0jrl22uatqcn6w2w', + 'bc1p9ruwtdk4aveuqlnynth2tdasl9ha3gmed23k3uj4ydygfjlzmy9shavjqp', + 'bc1pelarnmq5u3k3v8u923eqpd0zgn39eekunmurhcrzwehd2a8uhllq6x76xa', + 'bc1ps40qs8gq7lpqgq3t56u32n06dwxchvqdzh99ydx882ccp0uq63gsr9cvy7', + 'bc1p5dt86z4zeut9u8nh9p43vlzgawylw8mnq7fvyrpvg0fqhj4hg4jqmywfrd', + 'bc1pxpk0rsxruj6rk5lpefa5zh7w5ec9e06gh9nge63m264ll0t6tt6sg775f6', + 'bc1pjknyuhf8xj36squ9lgxpqam3s9qgh0krasrrht7v7hdfnvqgvrlq9avaj7', + 'bc1p9w0cyveev8dlmjrjune95nkytwemjc8xxhv6xtvyuv59kzxnacusgep6zc', + 'bc1p6up5u3kvzksnxfes8u0ux35uzr6d4r738lkxmwwpzdvha9ltzyns96mde0', + 'bc1pnr54myjm7pup4lrtudhajempz3c9t3r0v6s0688d3799t5lt6u6su34aan', + 'bc1p0x05x3r0gx7353fwng7mehdmsn2cvq4d82kvw2yrzu9fscnehers20vmsq', + 'bc1p7el2e9akt63c7z5h8x44skppwhdc04ld47cyp6g4sj57z4e52tpq7pg0yl', + 'bc1pvuw7htlmg4emee4y3wkv32sqgprlcajlm7rk96rkqkawssxl3mkqzjyh9j', + 'bc1pnaky3xt6jteuh0q0ew46mdx20xudppcvknh5exgekyyplr72regsnjgew4', + 'bc1p5h23xyn7e90ya2uvtmqpmw3mrcahz0ktl3w57shn3kute7dj534q5xjr0k', + 'bc1p7vgzqvvpnjyhcxt8a89zlpz2nxqzuq25r4dk5je889zyesxuwqlqj399a3', + 'bc1pfcd4yypvh3x6hgmdajmzwxyvydeljky4ueua84dxlcr5uvgc53esagfmyw', + 'bc1p2fyvyvxvgn9uulhnyaczuyhtwglsvhcsw7rsvptz7enzywwjvdsq6qlzzy', + 'bc1pwh40gsptwu590j0al23hwa68y4ptqkmraje00m4el7ngfkgv8wgs09d4xx', + 'bc1p2cldshhxnj0fkwr7rz7tjqyn7rupz8nafwwljrfaam8n8y9tzuas473l2w', + 'bc1pz836d8x4qxs527nfle8rs2yvwme3xw6g72m2wakwegcz7nkceqwqtn8ckp', + 'bc1pdmkvzjcd9k9zxppsyrtpy0hklxfc3cd2wdqfheu7kj749gyhalyszp6t8x', + 'bc1p26l9n68f9za4fzxq0vsy5tz2l3rxvkenpagefd9p6045aykwnrfsfawpd9', + 'bc1pa806c2ewelpyh3er0kln35yty40k6f5lv3qmnlykr9d6js8e5mds3nehg5', + 'bc1p8eg9uc5gupjgp9f8xz5fls6920f74s4qqew9yusyrmesnq76t9equkh95q', + 'bc1plzqu6wf2fr9x8f40jxp2rv7092daew2r707wclxx6y6gxf5v5yqq4ksvkq', + 'bc1pgpr8jqal9avulr5crs7s43h9sruh3r6fmfkjm752v9mnwnxw66gs5fev89', + 'bc1psp5murlkxghvr3vqvvz9nlrve7j35smqrywm5yfj6uunxwxuyy7q6jzyjj', + 'bc1pu43kmh7dchftyak7kxkpe3y6y2l0y7334vapjgvh464yhsmcn3wqma5qyu', + 'bc1phrr75wn2f8f3pm250ufu8f4ma28e5k7tfakqqmt36ymnkx3vgh0sxvlx9q', + 'bc1p4ua3pss96fhdwvthv7hu9j65v90frcmcpss8vecdmwmarn30z5qsawufz9', + 'bc1pjcfhcmn7swgunhgvsypz2wlxalsczcvwtsqn5skmnttf2rg7gd0qsdys2m', + 'bc1p5n2q32gytmaatv0w2m2kns6esmmt4v0ekwxmqyuskl6fjg06l2xq0900eh', + 'bc1pxmcwy8fdwutu9s9z0qhdsa6gua8978yxe05k53w90e2c5ga4n2cs853xye', + 'bc1pf3dnz3zf8m00ec4c2ywkv79jahuxmygjhmgnzl5rak6u7nmw8lwqcfn9x7', + 'bc1pja0z4nedz5f7ap0tayx0j9d08lexu78tmv8t0qcgreqdgqw2pnds93uhhd', + 'bc1p4ew7dshmlcsc0fyr02s7v2netwec9lmsjrn4jha6hjfyjssh7xlqjlcmmg', + 'bc1px3q3kehg7mstq73ynv3fnugxn9k8sxwhz3y7re5jjslh07yf4dpsq7gwmf', + 'bc1p74q6de4agh7u4kgdcf8f2j20k9gn5j0z25sazygk6mk85v4yjffqywx0rl', + 'bc1pmzeaersnk7xr4n8hzdnnzklwzc884yus9sanntjmkhng5sqf24fs74gsst', + 'bc1p32xsn2zgs38w0h2jytzuz92v7g3sdd3yyw48yzp9y0hgxenme44snja7jh', + 'bc1prr6jerhav33unyydnl6rm5glh0xtdmnvh2ljn77wq5a2l6vsldls9u5mmq', + 'bc1pny3fdjmh8xs5gwcsy94ymr7a7lmn0zhe3cheuunanan0vhejh3csa4wn5h', + 'bc1pgpqlfmugn84khdt5qjlcrq3g4dm7k2kjvjnva5k9umejza7tfhpsmt7rf6', + 'bc1pg4j7x5uddfnjjjdh28wpk8wwjfdpfyers4vnfw48je9n8lzl9amq85n0cd', + 'bc1pnpwnqf5qfkw45ef7e9w7g3eprucmq86z8eunte9syxn4g339w9ksctan42', + 'bc1pl02lj3angsh9t9x9jyp5924kq0qnm5xknxeqjkge9h4u6du5w8kqkwpgyx', + 'bc1prsn4qs623gksy2wjs2lx9y8yu3ljlrfr6zhulg4de8fn9w7tj92sq8dnny', + 'bc1p8m8yps35tav9xe27kkgyl9a8cy0js66u94cykegmzq32tfunpscqyuvf5t', + 'bc1p537seqlcpyptknwrdajt7ghlr38k2lhkptugyx35skfvfzaqgk6sxa6j8x', + 'bc1pj078hf3ahntahfswr86ran8p0mpnvj2s4j9lcveytk9pwgjaztcqxz8q5t', + 'bc1p3yadm23zyskf64q7my8pen654teta8fk48xn2xpmtt7w4dr0sdeq548jm5', + 'bc1pkwl0yp67qyj226z93825gfekl8gnz7x2jglq5vpeym0ph2qjlexqdtcqye', + 'bc1pgmtdvweekd5xlzj6n9y3rvgrjspj6s4p2ha46ds0gw9jmzky3ajqthup5n', + 'bc1pdz2n509kpf0d7nge909lfnj2rzhau9263m9sysatun9p7a7lrw4spuvn9p', + 'bc1p9ga2ex8znzq85fl3cx7p6en55de7ugc0pjh806psuw3ne6afqpfs6rg88p', + 'bc1pz62mm3xznzkrpcakn5nq9s8tk4dfhlzu20m932rp233wydrkmgjskzf65x', + 'bc1p4uudaw0jdt9gj8fa4eqvwu9wpmls8crpuc00u6c2ud7j49mt9ycqafyypd', + 'bc1pp076ln9yydjvr4pdvaf008jmsl44dmfp29g2czjen5dnyn0wr55ssqq9yf', + 'bc1pguk3yx3cx5fv6nul8s2mjc86sga5cn8se58kxrtzg3uqm0malensc6y4nq', + 'bc1p86puqm4nf59merxfg7rxndt5lt3tq37c3ec8t8xthtm3mr2wkecs8qun5d', + 'bc1p7j4przr20qj8hke9x42qkurpguz8erjsl6flgntaq3c7n9e2eppselp3ej', + 'bc1p8475au3wf6jl8skmjzfhv7df5q093p6nvfuy83kvcue6falvz3lsgcgfk8', + 'bc1p5ep9g6s9ju6qz6rky0zxnj5jm5layvf0nsrggj8amjgwzxrnnddqjjhaqa', + 'bc1pc63rwjmaxejlf39sls2gwafd0ef83x2rc65km0jcqpqsx2508d4qys9cyp', + 'bc1pyjc9ngmcve2t2ww4vq6ph7fl4hs9vl7xprp6qtursdrahpz0w4xst3j5at', + 'bc1pl5u2gl5vtx846v3z4f73q0afuymdue905lwdl2dnf5q0kf9f6z3ssluxt7', + 'bc1pmkdug7q8wqakgrwnsp55he268n6mddst38n77f0nkd7hpx86vjhshakcqr', + 'bc1pmny9vx2suwr4a4yxj7j0xm5quaxn9zr7y69945p9mnkdzvmfk7dq4tfuak', + 'bc1pmenp2760ha6nmxna76cjwer8cm8erkc9t609fj54hqx9cqa5flpqs78r94', + 'bc1p523rq06nttp9rrjcn2zrs9lyptrr2gm0ll0rpmmr4exysfn6j7vqpteyxg', + 'bc1pfej5ggyee5xu0x8pgwsqxlkn22aw9y8jvep3l2s0ju202snq7zksfv0xye', + 'bc1pffrjhgh4f3ssuwaajzrd75prscz49kl9702fvfl5yznz9tj2czysc9xfm3', + 'bc1plefcr87theqzzdhgdspc7rdcj0gwy7w544weewudwu92rhl7txhq52tsn2', + 'bc1pal3r95n6czwfdv7we7qyle0s43cds69hsmtvwcwg95hw6ux4ca0sdpx76y', + 'bc1psnmjhhmp0l4rvjt3yreaf293evq5ca2736ddmrl8r4efjyxc2d0q0sf9pw', + 'bc1pgp2snnt82y5kcuucskmu637skt88hcmwfuw7jukwurfzu00xfmzq7aduzl', + 'bc1plp5gxlklk664xdh9d3su69df6mtm4nkrq5xfydp9ka8w6z94c23qa6yg50', + 'bc1p34m0akh5lapch5v07mcr2szs6nkwp0u7l64pj44are9aqm7yqfqs9ynvgt', + 'bc1pgr0gpnp9kn3277qqx5f9psnl8sd0yufp04rzzv67nwdth9ncghes0x0mgj', + 'bc1pkr3x67094sarvwcy9l05shjczxskk45gq7eveurxpds3hqm08uqqawenjn', + 'bc1p0sas0ly6gulcxu6z0uznyllreqwsan635qvx4d6xdggdw34lc65q7tdzf3', + 'bc1pmy9mj0ghgqdal0qhy4z6m7wwp8varfz623j3wsf37kfzpvmsxussyr6n00', + 'bc1phmamzsjftuz7u5hv7vncfs3dcfgh8e8xd3lqss8yhum8g8m4rqyq52vcaq', + 'bc1pjtqughcwtcv6j0hg25gv34xk5pn40makmqlrr46yxaqrsl4lvceswj6ykc', + 'bc1pd7zpaxy4h6r8cchmwczdu5tq9pun09l8kmn45y5ys0r6hccmrcwqc8v4gf', + 'bc1ptkgv70vdn9uymn8qqv0e9s437lm6l0rq0fqj5t6ec6qn5tqutzfsz8uq7a', + 'bc1ppjrc8j72384pwjdm3fk8kdhmyd8vjgan0682vl2ua8k4yxj858gs7yjnnf', + 'bc1pl2jmyw864g7vv2anghtf4c7shrc5jq97e24f7emmjdj7ktq6q37qrzn0zu', + 'bc1pe0xyj63z7yvdgcsdmqt4urdfm2xey30mqk4mnjmxljyzc7yy7y0s9w7edt', + 'bc1ph7z335s94gs0ysvu2sw0e82h7aw2k0smase62c9376yv6resmhuqwq2vl7', + 'bc1pszt4lgddtdhrh057ahw6u6qr7t4q3xej5wnfp3zd248ju7gplkcsqqzxdv', + 'bc1p9jwh42vergz9nyjmxk440mct37ux76nz5434xvsjhh2ekjfgmjtqhly8h3', + 'bc1p3l6gzhh4mgxrqj4muqkgvk462v6zdewn38cck0ye4ckxuc5uf57sqzwq6q', + 'bc1p5xn70e9pc6kv8qky8tr6anjlkahvygc2e7ej90m2yu46smgdurkqlmfgg8', + 'bc1plgvnm5rq2au7dz4tuf8xw0d79x2h7859f9g9ek98du50cccn586ssye22p', + 'bc1pt7a7tnrj5cd7snjpw09rcks3clm88krunks9guh956t0trm43evqasql3n', + 'bc1p5auc0c4qhlshrsshasux2tujen0ajcs75lmk83nrnss74kv633tsg2y47q', + 'bc1pkqwps7m80g6fguph9jgmepk56nart05msajk4gul397c0vjqncpszgw9uv', + 'bc1pcw0hn5xy63nm54m4uzxxzsem458xfj0gx4s5vj5yrhdu3xhr0jhsw0ewcr', + 'bc1p7hxs7s02qlxdtcjdladk0c85yx8dez63jz8qdakk3z523gc6ushqhpv77z', + 'bc1pftffhkqzmfmf0zlauhm0ewxkxl2qwdfzf5tytvdxsuht7thn0yqqzuujkd', + 'bc1pynrvffj50g9tgs0vn2eyyts4gd8whycg55d6pvea0nwz87kf87zsf4puhu', + 'bc1p20jep92gr8mcptfc6nervyframrzshxrx5ye3t6llp6fdmdukfnq9zwuwn', + 'bc1pr09t5u25lr4aplwxvuucvy742x4e48egshq8eczx24vlh9aktrkqrzpz99', + 'bc1pakxha5a3va4rn79txschreud9qr9unwd5rd5xf3aejzn568llpeq00mep3', + 'bc1pwhkhs68k6q54d2vm4y9nrzm0pxmggjxre7p4kj7wm7acyudytyvqpye2d3', + 'bc1plexf7qqt6zzpdc2pex74cqpvrpjhgcqn7h6lp7d9f4y7cu0zql7qmfnd5e', + 'bc1pykfq8clmyau89y3mvt6lsm0rw42hydhk4fpwk3t2f9kmv0dsxfesqts67m', + 'bc1pxzlzq5pazg9wf5cwd4qm42ldv0pamzhjdlnkgchpxup0rm7f9ars6xzq96', + 'bc1p5tv5hdfd737lmtvglj6a5era9uukjsxterlv2ne6e4pktfqhw2vsjrw9xr', + 'bc1pv339ydahcrc5l4t805rhhwagg6pdep6zlgfe4z84kltp4ykux2nswxryk3', + 'bc1p6vgyvlqq300aclfjmx5p2kuvfgkznq8a603j9p7fu7ersarh4w6sdpqv83', + 'bc1pyvghuecx32ml9wpq9przj5y35kenjkn3khl3j5r33g03n8hx7r6q7r7t9g', + 'bc1pq4rr2pu5uux5098rdp7qpe2akyef85u3hchfaltr5epa6r0yemcqkrcxp6', + 'bc1pdcymtfpqfscerv787gkkksjcpsjj7977dzl9rsadvj7fxfwvvzrssxleje', + 'bc1p6uegtrdhdq8tdxe9rhekctmkm2l0gv5atrucdkd482m22r5nx8gq64jzwv', + 'bc1pysm0uhnk9sky4dmr0nk8d99tks0c5p3n6mex4dagvjuyl74l3k0s9sqvrd', + 'bc1pa0qrlxqshjgc6ytgycgwfdzkz0svy5tm744cwnc8q2whdtgcjjtsxzkqfy', + 'bc1p3zdj5r6gfq6l3nexxjnyylwtk3szntwcs99j7pedyvjp930ya7sqs0yjdz', + 'bc1pej7arsqqgc0ucggue2xlr2yqfv9re2eemctskqwqv93mz980gyws6m44kt', + 'bc1pqgexvgnln9g3jv9cdk5gfuwk94qx0cazx55fndzks0gjpd0hjctsuqc3al', + 'bc1p2yxq7kzue2nmlu92gezng4z32x6g5ka7k6trftj8a42zl9c64jgshkqm58', + 'bc1pkd9arump85yy9nyjng3lgm0272y8ne44z3j65v3k3r8pyzv37zmqp4apgk', + 'bc1p5ls64xdx47r20ygvewucs05q003cttwuwj7t2uvauypf0aeny0fsu7kwum', + 'bc1ppw9czgjcmk3t38xezc4me90dq6e7yyf2gt00mnn5q4c5esv6l9csh563qn', + 'bc1p3fc28a90j6ayx0snpfwkc98447xdvqv6euv6rswt4dd22yxmx32s38yzk3', + 'bc1psen0kgkez4n0jpekukflet2yqmjm8gq5vqcdxdv69lm6szld8q0sz0a5t6', + 'bc1pnmwyse5x69ya6gkpj32wvcu3w4z2v9vqpl59cu9qa945j4ddhf5seemt8m', + 'bc1p50k8fpwxcz70w97fcxxr3hr7e6tlvmyw2alxu6vm7um2d6mnqzgq7cx8v3', + 'bc1p3fxcl9cf75n9c6rd3c6zgna8xwzsjq2zjvdx0v6xnt9rswqtyk7suqknvc', + 'bc1puaujxwps4w9jukr77v3ypswwq6cpgmnmdqfhks383av3v6kawglqsjukly', + 'bc1p5ls64xdx47r20ygvewucs05q003cttwuwj7t2uvauypf0aeny0fsu7kwum', + 'bc1paw036hyuzup8zkc4y8ts2s8ndlh6eyv5n8jjyl9394pr7vqlr6ssnw4l8k', + 'bc1peu0sxm2u2wqk6gx2ap96n4hfqlnpts4g84m7uae6ejsjgj24zhus6q3ws2', + 'bc1pjxmtvrys0gx8kaxxdju3fr75ueg48g7ugk5h4pjuy2ltf36enptsg83wkx', + 'bc1p2zk8d9f8wcyg7gr5yq6n2gyedryjny4d7y6pmv7zzl7zjex0kakswc8tnn', + 'bc1pf2p8pcmnv7ssekf0uvx55acuvs40kehly5430trmcufftw0jupgstya0e2', + 'bc1pdf6yyvz5w6zqesc8t5geenxra23mkv2xnd465wras9jt8ed5kz4syg3wp5', + 'bc1p2andmz4475q7yl2xdurnm33fkun8tdmepf60qgrl09rnzz9uttzqd634r8', + 'bc1pdg95fqjg7a66sj8tnppgpj8j9ukh0qqxd6fcf0apt9wwqwd5ws2sdxkry6', + 'bc1pg402ucm2cz2a0et4mkmxmkr3j75720zepdtpee4lqtdy55l5yn8scj3t70', + 'bc1pfyu87rcnnp95qmxz3l6f6grk40ut8ka7h9z5n3ummr4x6tcxxzlqralu4m', + 'bc1peruv2eealm9zn0ksxlx55e05nwxydw87rsg8xvf35sudrla03zhsmgssx7', + 'bc1pjelvgqecnarwe8m94kyssty9wg2kvdvwzqa9nmgwpz88gxnm5ucsd08vvy', + 'bc1pnhvhpev9cjdfff99aupnjwrvpxpxqznyxvrvjx2apsgpmqmmn2wqdfgn38', + 'bc1p6m56r8asvq33mh84dr4f7nxg20zmxz5dy76zulavtv60d45dppksszrx39', + 'bc1pedh6ntet5my440ullz4cd9cpxqd770urahcjy4dmp2396tmjlrss2df9gt', + 'bc1p7nxjhxwz42au8czxsjctuz0rersy5fqh4488k0rrale72ccgwcyqkpnvxj', + 'bc1pgn4jl6ckx07jcwp36pvg258ztedpkyh7msc9tt9vgswdep8rfqzqygdfnh', + 'bc1pwd2u606q4ft5ueh7gkzfrhxzffq37hspvj68rkjx6x8jngy6rfnqwjrlt4', + 'bc1p6x895u4l5pjdvasvr3afv9zv3gp6ky4t79gdjsv2j0587wavf9xsvw744t', + 'bc1pp4dwfps0squ4dr4srj4t0938rllfsefnjctun8aky5xvpctn9hxqre6jhx', + 'bc1puy9jknghzw4d96hux8kxun27ch94fjn23zdqlgkwx6c803ydsvhqka8mmg', + 'bc1pd059ap923050am3xhau8tg496qnu92wd0kqqd9uazkst0jfy83nsjj8jkc', + 'bc1pe85nk65mpylrqshfqe95d2pvxgp7na0xu6vemf0j2360uu2ea2sqlvdc2f', + 'bc1p3yggawdq8zc3mfqylhq2zjw4sxf9lnncmdpw9x203kjzet0ujqlsvwdr8h', + 'bc1pgzkf3c4347esf5efh88r43htdksqyp6txu2uh4s2pjlrptnywkmsh4zapx', + 'bc1pycz25aklxpysyp0y5nysze322h4a6sz6xp0nlnchh0kffkmtyhaselugw4', + 'bc1puv874pw4dj8zhrcemhqmf4n5c7uyp4rnpgv24l57yl3x3spdrd7sr69w8d', + 'bc1prju0dgjr6xnlj0wzp2r6tdv0u83m2q0e6s4kaxf5jyl2jzx47ddskjy5ey', + 'bc1p6vmqe86enggjam383339g2crqfd9gfjeysd4f2tchugt7d7y6dxsaww8mm', + 'bc1pwxsnwklg6eecmnzygdla5r3uhan9dqa683h6uasfgl98a47h03cqqpjsc6', + 'bc1p0knup6t8nkjajhn03sfyh0v2fj3e8u34t7kvxh294cs0nt20ky0qh7ar9x', + 'bc1pjzrh5apj0xwpdpvxh4neyfhr6myddw4m9xu9kvjh72rdyrnez2ds2vyed5', + 'bc1pa8vvjr54ah70scu98v6f89fce6y2gupkrca0hzlscsqgvgxyl49s8nj9sq', + 'bc1phttpm7ww0cw8f8l604r5dqkczt32et07j4fydxq63xrjjs4tf9tqvjl67h', + 'bc1pytfzru0pd567lvdcvg2nxekp8wdl97wjmwc8ql4e7akvfzlmg4js2jnha0', + 'bc1p23xhj86jarvkwzw8em8h4xhc65v6sy0rkmc4xs0gugr5gvggt6jqteye98', + 'bc1p33xu5xld4sj44q5snc9ngpe6tc54ckz6tyz97zd66ghee29shl3q97apcm', + 'bc1puxnck2gxx0ty9qxkwmfnu299assvu7k9720ndngxkfagqqvg9x2sl3rf8n', + 'bc1ph8f5d7tnskx0et8evhxeehxj82u5wd06qmfzfmsxgfdlefuh64ysh4axyz', + 'bc1p6l95u0ufnqfrnkf3288hxy8h5rzx098l50e8le759qv40997q4wqev6sqv', + 'bc1prygcq7u72pvgzm4d3n9srx33j43dnrwgyp674vux0e8jwjsf0egsumkkwk', + 'bc1purxfjs9rmgwgdgs8emz96ez4k88z8tresrd26z3xh0keuvuc5h2sgf6hv8', + 'bc1p3tf3yfg8cdvwmtaqk62qhey23jjpzjyzz6vggpn2w2cndg8k3w6q6u8nwl', + 'bc1pv9rjswk3w0qg8fn9e0phzfufsxchmyvqdy5e73ux2tjc4plnwhyq24xm8k', + 'bc1p6u97m5ve5deglchq4jpnwym7s70whw9e6lpraw8nygw4lkzuz8asj7h8qj', + 'bc1p07z0jt9m6epy2udmnmqrsagpjpw8z8qr4azz7dnl5sem6pfyez3qe8m0md', + 'bc1pttyq3ccv4w959ll29jk2gk8p9vmkss9wj3fmjd2mlt622sl2ljkqc8agpj', + 'bc1pq34x8ahnmqc8satp6gg8k3vg7zg4w8qgjyqteq7mltmfmq0f85dquv7m79', + 'bc1pdhnthm5e2npuplaw9aa2hqj8jj43davu7hysndk04vntaehmf4kqe748ck', + 'bc1prw2p3ju7vmytq55fkz3rtn5tqe5pe6t9tjrert8r4c2wgudfzl4qdd3yn8', + 'bc1pxrkfxv8nuvglznn9cvkfhpl8fdgxdnv8nwhdvdmhut4t6ucr4gzs0hfyzs', + 'bc1pw2f2pwckcwm09ahzu89lrfqpc5jmnuqpdyyq4c90arz475dsrrjskfx03y', + 'bc1phha7w579mufl8l88yfj6fpk7pdwnn0lh927qqhknlf4297m0s0yqutnh8g', + 'bc1pz028qrsk2apzzap3k0uehw22c3tq5v23zlxetwfpevrnmuwmmglq6t77xg', + 'bc1ppvfknf46ac5apg2uepaulhdkhj74y6fa2jnj8sstz0sg8shxtvxqgwdm48', + 'bc1p0zm6nngc7gfek3ypaey8m6fenf2aqsy7ekjq9et9h5cs7k48dwdsuzgdg0', + 'bc1pf4vrrs7zjygkxa8fz4x97f4wvj3t0kvf36z8ylva5qpmdf3cfv9qexaydh', + 'bc1pj5fck0vyzgrw3j3cnku0qzdps7ncs89dzu5dnanc4p90fzqqc05s04rads', + 'bc1pyh2plmezjzhflc638wqafe9kdte50w3tv66rc0866gxuef7dq5aq4s87c2', + 'bc1peh7shwz6y2fsy832s7ffx9fynlz0yagc7n506lnms32yqc7ekwasfdua6a', + 'bc1p74kn857hxzw8pfssza8zsmtt74w7j5pmhfgqnz8lh47fky3wlx4sk3qk0v', + 'bc1phpda0xr02h87xzmyacm5vh6jxvnrpc3qphjpecgenrvwy7elnxvsqsa9nj', + 'bc1py2m7xrkw4rtqrajf4p9nmvcmp8ulhy98rn6rxke46vmvez8jddwqzmrnze', + 'bc1p6nmecs2af8nd7hwsmt5xavhuge2vnl3rqtv2tu2eg059t0rtdy6qpulh5n', + 'bc1p3rqpmfghptqs4ukf324scs7kqxr9qw0wupmnd8xgz28lmmm2kufqhsjj0v', + 'bc1pdx8e6encs08rqpjeywe8kazxl6exxsay6cr4wrnmf0mltk5uqnhqs69z58', + 'bc1p3p50mxhmpqqwjltxl28v4jta06hpstazv8tlu384w869fex5hdmq8uvq3k', + 'bc1pgs8vr8m8dtkxunnzeppfqtjst7card4ty5kjnjpcq8pw8v33tynsk3hjdv', + 'bc1p5w3nejgqlkca0veuz8whelrxk2xzm2s58902l2kn4ahecfesydaqahxvh0', + 'bc1p4jfgn8n7vwkfeceypvjn4phg62tnln6luzkd39xe4c0awleefcuq22h5zf', + 'bc1pzwm2098dx54dwajj2n9z7azfv6lq2kn30qkfhef8z6rclhh2jkwsanv55x', + 'bc1p6n2ezr4z27r2c9jy3633hx6s7hlaskjvlr6pw295ycurzxgwt6sqjvu0m9', + 'bc1prdrdhgdgsjvrhpslq743wrva2kn8wds0rhj5elngc84cycajpkkshmzgml', + 'bc1pkqv8z8n6hgfe8ym240prq638xx9sn2xuqlph04em52n2xxrn954ste4aln', + 'bc1phknrycyemqgm3r9754pf3gn2hm2an69eqsypu9fcnvfu56dsjdrqels6tc', + 'bc1plqvesppw3djkn5dqxn73xec9s0xk8kp8v0ztpe9xvfp90svx6uas0zafdr', + 'bc1pnag5ynqguersuldlc0q25tyk8za7ar6jp5ecfhy9w88umsg2760secjncm', + 'bc1pelugygv377yc208309m04445pd993fjsatajcgkyy320a4fwj8mqa8yhlt', + 'bc1p9qdf3meuvsxma4t78dznteusgc9nljecx9tpsar4qs6u89fq0gmq24sjk4', + 'bc1pmhrwm6jjkpf44mq4pl32y6nnzq22l4ypu0cnsa2gg6fwtczy0tdqje8h0y', + 'bc1pnvuk2fzy3gyt5mthep0h8hnw9ye3ttngn3yeyd07d67ck9jfrllq5qnr84', + 'bc1pmvnc94ldhn0457achmse234gsqln87lw5e3wt4kj3ft57eyexj9s0etm9t', + 'bc1pf2etuczshaqxgeqrjq387ypag6e96vqd82asplzpa36mc7ll8e8qlxfxel', + 'bc1ppaq2hfny4eusgnml329fl3c4ku90er3rzq7f9hpd5a77m2spwt7qx47vsy', + 'bc1pdyn6hgl7wtjmf93l3xkm52a6zffxarxgw2ure86ddqhz6mdnhunscm5mrj', + 'bc1pkuv5hjywjkgg0xmetcwamadljjdl7az6uepxheu3x66ad6c5utaqzqwaql', + 'bc1pddvzdhar06ln20t6wrrekvg8tdat9xgdy4egtlr82fl553veeseqtaem74', + 'bc1plegu2atvert6sw8078ydsrskmeau2555tpwzmrh53ha2269njc0sxg3kpl', + 'bc1pryukm6w54adqy2g5qjwpuvjnd4y08s5xkqkqh3g7ff32rn3rc94qrseedv', + 'bc1pe7r3cwav5g4cp4yunmnr7h3n0tunss4zjv5f3lgwcjrmjlj35seqcfuhqy', + 'bc1pazdz9q50juq4algnlqaeujcj63vns3veep3umegkhjp5vf90xl4qhz08w2', + 'bc1psg2t3vt3ljp36jupfqr3nkvnhvsxvywh83pmr5ngl50lx5hz63yq07rrlh', + 'bc1pg9wd9xswmwpqq0u4j8djsum6ln5zvvqrnrum6fa8fzsc5g6t74lqtusplp', + 'bc1ppnt2lwgr482n5nh4nq03hcd75taax3mg6qxmcvjzsd0v7fts5d5qmzn0kt', + 'bc1pnz2wlkrmr3ysy3ldvefcjkwfhu2ce6mf38tvqs082mfvuvf99zysmtkwyu', + 'bc1p53ptd9dr8avw0v989yp78qv9rpq9lzkx6zsjpnnsc99vwkzlklmquts522', + 'bc1pprgvujm68xxesu5dmwe42yl2k0x7klghx4c69pa40hwlhx3y36qq4xxx2y', + 'bc1pjh56cqd43untgndwxd4dquuyu0ym7vea6r2k7nz4jdg3p035ny2se0djzw', + 'bc1ptzqu49lfl93m8f3wykujqw8cs45exmve3cd3yg9quydcu48wycgqhhxval', + 'bc1pje57rckyv344475ae6jek9dr07af0k7y3ews278ac3r3t9my63wsp83nky', + 'bc1pwrx00356nneqfxhpycqxfgavmnfhc0j5x4ld9z3f40h2aazzurdqn6kj2n', + 'bc1padqha953gerna0clhgnghlhqk2uz479wap9ftdgegajdq89dhhdq004c4u', + 'bc1p84g9pe943hzdfddyy65r0hrtcnarnqjs4qn66pj068da6c78ee8swtdpgx', + 'bc1p6ycc9vtgg09wzzcu39hq97wrg2ggw94hn9llhyt8vwghg5v78lkqhzlv6t', + 'bc1pjf2thrzcx3g8yquf7pj0ced57jfg9gndjvk96lyrr6pfmwjkdlwqum4l9c', + 'bc1pn23tnue4764na6e82scv9n5tm8gfgsd5v29yj5dscwa8t48ca7kszafy7a', + 'bc1pw6y8vk6aesl9qnctxv5p7l2tev79l594p3dm76jcjhhe8wyjfc0sd344md', + 'bc1p078f7jcexft9j44jqnhamu84h2al7alsze7kdnaljzhx4acp6y5s40srn3', + 'bc1pc47zn6tnlqy7xeryra55lrgyawxrctyq2mysmfj84dpke2c2qqms0n06hc', + 'bc1p7tfxamku98pzvzn4hj0gh79xtds6vwghqf647xukarqy7rcujt4sz5rre5', + 'bc1puxs2edn2j9nutumrfpv00qqhztlwxpet0qpfgg7s9tcn8kwe057saxrpmw', + 'bc1p5ahlzhrzsxm2kh460sr2d59x7fzsqt6kpml8j67c4gea5r7c63escs7g3h', + 'bc1phjte3tazrh88vgu57wkljejkzedvj0pgppqchducpxm465ejt8dqaqva9c', + 'bc1p58xalhmtam2qelasa0j5s37xsfjsfmnvezmvshv6vnz49hv0avqqyegv0r', + 'bc1p3fc7lpx008e8heav83nush9m7x6ktdnl2mf42n2pemgun8ew22zqgssl4n', + 'bc1pms9u0xfe7aytjlsj808una0prmnsj8h95ekv7wg6yfusfea0h5aqekxery', + 'bc1p77v8knduumr9z65xw58ty2nnxsumyspxd2mla4n78q06sd7jut8qp6y5dx', + 'bc1p3klzu6zh0wfzca6w44pf4uwq2f3vmdptmxh9efnkndd2a7qw0qls00q2mq', + 'bc1ptacgey53urcmtgl7qmzdwjruq29fzksdr0tf35p6ummyn4su48cqvuussa', + 'bc1pkjjmgxwrqkyhf2c7asrdxmxpndeyuq36wlcety5clvufqwhrrt7qgw59dd', + 'bc1pasvdk60surtnkv6qh9cd0k8uvp5y0smnxns7cvaxzgtlwu2uqcas4uzp37', + 'bc1pnncv6fw69d55aur2p3x06xesclex2f9gjzx7lxh3g8v879khmuqq3xgjsq', + 'bc1pw8937zezmu4s42gn6fq3ndtng2xsq5an7v4hhg2g4e590p4wj5lqtr8v5f', + 'bc1prl6ep6ne7rqg64fup48vpqu70leqz9c5f8l0k54gdchf92rkgdcsnlxf6x', + 'bc1pfz8gddruugafnlyffy92vy0awvgfh95ydmp4sl9py8qgmwfzvh4sey9ydy', + 'bc1p4rpw0tzr2uqzwelhe3g5auaefjepr9nyg88m8x8dy8fvd8jrcgcskexeph', + 'bc1p54f836cy0reqa7ctjl94umrtcv75sl0je3vwt4kdn6cx5vkdqd8qx8vktw', + 'bc1p45xednxj7ukrs2ezu77hw5taunv9jw02tj34qaxm6qdl97zw9fesu2hf6x', + 'bc1pxtxwj73v9n62jakrvq63sgzdy5k7jeh2dnfnx4jrzyevujy9404s4q3kxn', + 'bc1px8rke2jwsx2kfrzydnw284y5rg9xg0jy2qg7hygr6ftkq5vv768q4699av', + 'bc1pe47r4gk66u6ju0uvd0cwamuak2zcm6vm6u3sl783dq536h6h7rgszlp5ah', + 'bc1p9xuqyhap7txqye7zwqj5elalgyj5x5v5vun0dr9xr3yy236auswqwwq4ns', + 'bc1ps35u2f47fqc8m8swuw88de3fzakdsnk80w9xjw3wzatlcak37lwsy63dnu', + 'bc1puv5zdqw45ew6gkhy2wnz5ceyw5anp7f2ryqjs5a4g8ljpt9tdsusm6gf76', + 'bc1p00ftpj7ktpgw5wxfntca0sxenvnvmsgyqx8lyktufc9eqp4kr4eq0lss8u', + 'bc1pvav3syspg90zkrtsfvjp8526qfr9r4qedk0pqzxt633kmp8te85qv95p3w', + 'bc1p6pt88p2tw942e8f96z4tlh093jlstz0yxy476n9evx27xnfrj44sqh3zx4', + 'bc1p59zavt3r0v5shxkl7a77kz93mgw9kh5sfmtrmpr8ugmaumak37yqn0n5qe', + 'bc1pvr5ggylulpvct9zn3jal398wpfmgjs0p2dp0sjd8fj7385ts4pvq4zvk23', + 'bc1pl8jdylje2v0cdc7mexlkjh2rajk9ly4l5xl9rna2eyjn5d44nyysj4tvy9', + 'bc1pdd8ggxrjlf69drcatukevyh0m2vecyt9e7z7ra83whvdg4umv4msahd598', + 'bc1pjkghpqpxqt2xdnf9kg8phczdc847dxnjmvdf08d8z3w9djjdyx6qlujzll', + 'bc1pcfsgvud4k4ng5pqq8y482r83zv0yygat9dkzq52v8kg2enykcxlsyjxxjl', + 'bc1pfz2qzzc879hc4xnnkrr52cv38wgjpvcf8uxuh65hdk8n5ygpgk5searhee', + 'bc1p782ag0384vszpsapvenpmh2pvm49ncwrsq88t6nz8ehzvxlel9msv4s67m', + 'bc1pn7tc6u8amrg8ht6a70ykp5ea8lcntclvqfllndszqgx2gtt9h4msmpcn9c', + 'bc1p7dakkc9dpl4dmfzvc6ta5p23unnl9qetxlslefndwpcxq259rg7qhzk278', + 'bc1pxgs2d4mpz6tvs9clkj759q8cgsyglg56kr08vdkmvxvmyxjhpuqstt599v', + 'bc1pdn76ap000w32xqjfsdu2n0yg5uuxvtej9gnewmdeauuhqrl6xxmqmg3xt7', + 'bc1pwf9qfvx3ul40te45m2ex254mxq04l37m84ts324lkr6m4qyjcccqlfczyt', + 'bc1phh2z220vfq9wx958ym25ucc3nywg8ydu265gr7r2h9yyzw32a2xqpeqj42', + 'bc1pvdgrj6m0c8jddrqy33ncz5dwzyfp6ul6yhzfkxsx5aetp4eq3emqexytf8', + 'bc1pu4423sdl5463m4hm7jf0l0yz5f56wk2fj6ltamgj7sjr7avhp8tq8j8z3m', + 'bc1prs55frjm22697v2ujxx63385rphsvs7tx9z6mtvl60q3f2yh4w8s4aufj8', + 'bc1pmtvt5wfpdxrrwsg23hhhwsw5kxf7hs6z47wwrrpa0r76qqlktyysz94xnx', + 'bc1pn877aqs352x8rvr29dff0lzmmrzfnh3kf3jph52tq3j8rwn7fjxqf3x3pz', + 'bc1pax44twghgk5tq554hfpfhk5hugkhuhpl6fga3t7h5dgqfcn65z2spf7l5c', + 'bc1plqp7vq3ueda6908le4f8azj9e3czp2cah6c8y3zvc6k39sw7sa6sp0wlka', + 'bc1pnuucy5w6mh9g4eq55h8394a78e40ytmwz4nrw2enqx4800c044qqpqhl6j', + 'bc1pnvem4cvktzgw6zxq60x7wcdljluauvsx7gp48dtxfqe68s35pdvsyfnqjn', + 'bc1pdpeyqeauua9yjv3yrr3nc32wq2j3dxy6trkrhrn9ncxqn8c9nxcqu40l9h', + 'bc1p64mhea79tmllw2kuykc23dyyqarva3tl7lsn8cx4ejvc4csx4mlq07zprc', + 'bc1pl0kpcm6psfxavhcscaplf5sv85gg3m7r0qe7q9vulutrfndzezmqudmx7v', + 'bc1p4m3lyw8kehjq35zlzac8vlk6ytrzhv6euc3g9t9nxvk07qnrdmnq3mmjv4', + 'bc1palv6jnlmlqn99q4ldzclgl0h53wmuzvlq76jgnjtdjdv2tx5mmpsplmg68', + 'bc1psvgq4zew7revgstvvs89nf6zk8wx6up8yj5kahwa63f7qk05ls0q7y9wss', + 'bc1ppkxamtrslym6hvevaewnjjfzplaytuuctklpdhhctutjcsxkzy2qhn7slg', + 'bc1puxusccggwntmuadqv767sy3wxu5m5dk3s5dja44azj5ghlfcv7esw0xq6p', + 'bc1p7q8zkwupxfl3w3q2jjcagwgs36h8mwakggzj30u8q66vtxl8mwssnqr72q', + 'bc1pxhwc9xxyc6w5f5jnngxtkmazsry93nfh4j8tyjx8s408drdwsevqykktw4', + 'bc1phzfutlzv56a33xjd0k2gl9faxzl0nhdvzz9upgl9cqezzft3jm6sewk2uv', + 'bc1pv0r584d7c95gkx6k707psat4luc67msfpmckkvdqfyhydllaxu9s5el436', + 'bc1p8ay5ew45k3pnay6qw2lcl8fyuj8vmc3uczz7xt6mhxs80mflv43sg60a00', + 'bc1p0xdfvxrw0jm2h0ga000lmxtxaze8jn7vfhvv6lmw8n9h242t4v2qk4xjk5', + 'bc1p4m6ejwuwjhfzz94nxfgrzjuqqxcmgve4vj4ey7tzn5m9v23nyafqpes4hl', + 'bc1pwe0v76gch3h6cee2eljgnhwrwn9zkxwar25nden33dxgjc995qcs2k2e7z', + 'bc1ps2gfwh8v7dhenz30jwpr3xcxwd9538xsqn0vdsd8gpuc4hzjgy7snxhcvp', + 'bc1pxrr895mugdaanyeeejz5re6tg54ac5w3rxwj8f30atkju49dljuqzhl7wr', + 'bc1pyw837p3lg0slvnp6vj79unk4zhsgh7ypy5cg9hnmsl9m5qh055zq23lyzm', + 'bc1p9v44w4ln35tpe0ggqm2n4cs2hlhmlzwjcctlke28zdhad9rp29wswuw49g', + 'bc1p8zfvp20drnr0mw3gnh8yd88s2jems5kjc9a2u7hy7x36kmkgjrmqskhuly', + 'bc1p5je72vevln76z2ccegmm9ayh8akk0ucfq70thcvpw5vct44u63tq5u7vyr', + 'bc1pvkrhsr6mpm0sgrq4rvx6m7uk7uar0rjrp4cegut94eqhgfsdkhxquahd77', + 'bc1ppnlftma8gev5ds00v97xdna3a5k79ufww2vyerug0d276n3zt6zse8nqau', + 'bc1pc3rzsyk2rx86t3mrlragnymjf4685llzav40glyxuhw9zt05j3ms3h5wz5', + 'bc1py5pkv9sxgwudcz9prt20xfffh4e8t2p5xw88py27hlpfply47ats22c4y0', + 'bc1pagjh7vxnv577d3f9eqzkcd8tgc6srykys9rgukgyte32nz9z0x3qkmg5yp', + 'bc1p57gc0hvmw30q3v8h94whslj32h5q436ftkjtrh00y4wuv0tt47sq2wkade', + 'bc1p3lg9x2600xmna55hrgf77r4zx8ltxt3x9egr9zxxt596xyr2nt9qf9enec', + 'bc1pc30px7aryevq4mghkj7ytp34a06e0psjjzwvxqly3h8swvknp9yste47m3', + 'bc1pwkc77fssc9m7w5uw83ezt7z5798gusfvh2aep7kl8pzqa5hr6tvs3l2ka6', + 'bc1phgad4uyt35pdy5vvevvjfspqwg6xnh8tywue688lfjxzjec35huqsw7rpn', + 'bc1pn453ejn6dqpqr06npnq8njz7w8suu7jf2wf9056vrjd7laa69kmqfckpz7', + 'bc1p2l2x9s7yvun27xutqd75tetfn0w07eu7haepqfnzdls8hr796n8s6fhheg', + 'bc1pnpmhl3srastmxrnuu8lyey6qe7fthkkpuuen63cthgt0uwqwkkdqtcte9p', + 'bc1pz83r0veyzsgym76wflv3l0exquy5h46ykwgq3lc6pnqqamstjy8qhrpagt', + 'bc1p9ujscj46hn5d6nqkq0syv62hl7wj0k4m63wfhf2ne4qpwj5qdf4q9evd4w', + 'bc1pxjcxp5jrex5swm0huprs0h3cx5pywcgsykwnglp8s3s2gep3dj3qaxlzvx', + 'bc1p6lcnkexgzzj4whzwu96l47y23kzphlfj82aup73ax3pprdwvl3ns36ttr6', + 'bc1pw80rt6tu5d40aue64lh7eelqgyum6y6r7auacwrjk9yerkam8w6s95t63x', + 'bc1pm4z8xtxyrwktquetd7t0wu2rdsex6zjqrrluuhx3njlekrt039jqr0uz8g', + 'bc1prcwwfm9cxazz6z2ljz4n3nhqv0jfhvg4ed7qm97ynz2axr9g3qyqnhjkc2', + 'bc1pxsah25f66axv3uz6n7jttc8f7xh4q5njtlsgerhf67artudl9j9q289463', + 'bc1pa3yth3m6zheq0k2ckqlzsrvcmtdefn2j32u7u0es0vgndj9q2czqphage7', + 'bc1ped68t67t8yk9pe0f2pd84dxxvuulf7ahwcfk0hadx6m4vfq5cypqm09wrk', + 'bc1p0udpd4sfclysym4ex0x7rwrnxzsjvlpa9fk9av4e2ywr02q6p0wsqk57tj', + 'bc1pe32ytfeahzp030cvreg2htufzwhhykw7akk4vefd4vjkkhnyxv6qrk05p8', + 'bc1padt6sgas00edgesju2ce70l56zusq6d7h4p4xgq0nursga0qqzhqj6spk5', + 'bc1phrpwxyauk26h6rayl86fmjvsgfs8yq32x55fd9zvacf6rr5u0j0q4ct4nl', + 'bc1p4d4wq659nvecy08844h0gg79a79tg6wxhznxgtanq2pumtustrvqerhp4w', + 'bc1p8t9ghjgqw46lu6qfxn0jpc7e8lgcr0j9fvsa63e8d665mhrrmjdsttuvwy', + 'bc1p4ynfnkhrt0m3fyjcp69rryp5qee830gnjzls8mg2ptqpt52q73dsgywthc', + 'bc1p6jrtxy4t9aezqv9rgf847kw6nlhdqy88g3tgddds99n5d5expqts3kceg0', + 'bc1p5rr99pz99zg5rrnck9x8t8c9uxvtd5qfez3huglgv26amsupa96stnkk9f', + 'bc1p5msl4th83xacy8sw8u8k0znfhyqqdk9eqq0n805t3y5usuqmcgxqucxv83', + 'bc1pg4dpep60cgntcyzjuns5vmalshhphndeqrp0kpd8fxz6yt9s0tws39ehky', + 'bc1pvwwxkm9jkkfu6cns4gygsxf49v7pt93cmjr82tfcjdquwltq04zqw59qwc', + 'bc1pjx68s6dk9xvqnwvuc3tthz5kuhseptz4s0w3sk5tftmjs5x6ds2qj9vndn', + 'bc1pm2u3gqe544tl7cr0ea8aazve69sp5nkpfdzadr2e260e652r39ksxndney', + 'bc1pw5ls9fr90kddqamprchykkcflqc45g3swur2efxwz53pegzv3hgqmrt9ds', + 'bc1pane2m0z8ymreh67xkathhrst8jm4ljw53nkq3da23fmmf6gm522sf03t55', + 'bc1pmzsjlfwsrfkm6xcq6nay6agx3uxvu87kh5vwaqy9gx5rr8l03vrskr0gds', + 'bc1pk9zqlfjjn9h5vathr63qejscpd4ljsgetjd3zk8uskt3cu3g3z5qrsr2ht', + 'bc1p5zdcgdk5edp6y8zr7dny4lhjqucfjs53750396sdhewkawpy22ess84kk4', + 'bc1p9tt8f4kregqyq55uvgkhyst4sa2mlu6vw68kksnzgqjx9824fy6s3zq7hp', + 'bc1p2avzn4532avveyjgsvlp4efrsm27y390nk3hdxltw9zk5j8r4smqhshyr5', + 'bc1p3haghg60y5jw3dpqn0tz4mx8fp9fu06j0yhzjyhj7l6appywyd4sr6eprj', + 'bc1peg5t029ejm0dzg38pe5nv6rv4e3w25drxcsr664z7vy88nyhpdqqkq6a9a', + 'bc1p72r70w9uhkmftpwkf6qfknpdftcaljyrjlgd36qnluf5wx8eup7sk4kc4u', + 'bc1pqlja2gkl04jcagms942e8z0v8lxdmdxt9w7mqmdygzrqthhwk99sfhl6yq', + 'bc1pc9xzztm74w4zqm8yg690v9r50shyr9vkckufzjs4m4cdxwvf0tzsnk7ewd', + 'bc1p4jxwz3cvfyhgr9dsqnlenp676u9rderu9yvq7re6nyrzseqmw95sph63xc', + 'bc1pvfpg5v2ze70h03td8yc3ecvn6p3t5velj90ngrf2xcdf0kz54utqg6eeuw', + 'bc1pun2370d5c7lg3grc88f6s5p9pycnp6804zpn6waqfd2y5vxrgnksard60z', + 'bc1pdw74npe0yqfxqqmu56dlqvystzsnvlj77w3h404sayrp5w9zz9tsc45y9j', + 'bc1pv8mu9cfpyqrgmz63jtlxsmr7tw2vtpq9pj52a0mzp4vnh049aqeqpp7ule', + 'bc1pfta7kn83dqv893m4hvdev272eyerqt4p7wc76m6z6p9x9wkekkgqsq82sn', + 'bc1pu6vychqpd29rdvcakzsskumc6t3ct0jhcc7gk3gsadrqsk3q5daqtxfyny', + 'bc1p2rffxpdhxvufa8flvgetky286rrzn4u5e2m6kt2nwzzryl7jlpwsxzp9k3', + 'bc1p09y5fjrdcxh56du0wukpy40lqrsdyqdwlq3g3fpgpsqm6jpyrjhq85yjmf', + 'bc1p4kp4p4l00sw75aw733uukm3nmjstxnjgs4nqd9ah4xkhz5vnnknqj2yplj', + 'bc1pj2q2e6ctv4gznn7ymgpedcj4qpwvgyfcvkju8mn0gl08nqhshtes9sfc8n', + 'bc1pqkx2mw0y2tte7f6724a65crpp2lqkjp3sl8zll3uglmun2kakavqhak47u', + 'bc1p3fsnykumz4grrcaep37xu4eywflehuy0kuzvzrhrdz9vx8ljzmjquq08x3', + 'bc1pfpn0v8fend47qdzjd65ll0wxjena8naueetf3k48lzq0uqeh946qvtm3jz', + 'bc1p6zxvxfuksu5t3rxusukgr3kzkqwwry440zlr56k9n9dhus3aup0qh78mpy', + 'bc1p4mtdpt4q83h4jv8fhfkzrfcg3hkz8mfln0wdrhd3xk4qv2g7exwq4zy4cr', + 'bc1p33dzk43j8djjp0pajenefnyvytw67ppkkf6gj376e0nnsqz0e2vs9xrsue', + 'bc1phg9pptky4ldjlcyp650sqlqsrzp780d373degl2npa8gaamjac8sjywcn9', + 'bc1pftx7hqw76p47qfdl3y8nmtajh2clpxme62ltfh9gnnckyrzzay9smzq0a7', + 'bc1p7yhq02qj2tfz3mgnfmttn6w7garrgetk9g4cfp3udkpsqgy89wasq9gdy2', + 'bc1p3vxsmd8pyzvh8c0j0s8re8tlpv98ewn8qnp58juq40ndkrh3yems7nvys6', + 'bc1p7jjwzjpykr2y4pgaejv8ju0rngqy9djzlj36jmjah9hdd84u5n4qqdsq5u', + 'bc1phmcsjz6vsfz63zchzxau877n0wwqz2wfd3t937yeq94uct2vjw3snlwpf7', + 'bc1p9xh359eu37ywynud40hkn5q67yxnz4nhc5uu5mjav69p2gxx9ycq6a7pew', + 'bc1p3ad80amjmadfzdr79xc4s9zqjdxaensslnwyc8ze7lxr6jdnp7fq6zunfv', + 'bc1p7s59sktks4rhev3hw7g9gulz3tj9ttm8wdn5kfm79ddgz8jrrztq3pfya4', + 'bc1p5lfr0sppja5jlfjkds43vtstvzkxmnsagfhtchfsgk93e8e8ktsqp4076q', + 'bc1pjcpvvlg550w7up87g4ayrlaydrlq7h2587wvxcnm97za6q7euqeqg5cnes', + 'bc1pnkvl5s9nsv6she08zq32t78wtcffelhr4mdavw6psw9djfek5z3qhf2hav', + 'bc1pje9u9shrnjx3ymg45lmle7kaeu948ypd5dwnm5s8pch2njy3dehqq7a57e', + 'bc1pykm2afhjyrjuqc37f3uwdggepau97ljk5tv99prlqg54rpejwwsqzjtklk', + 'bc1phn7hzqk0d5km24qagethuh63re6x3esr0szs7f8wvt6afjdv940q9gdh09', + 'bc1prev3smc7n2rlek6pdktdeg4fegy4hr75tvhpwqj0qu794qmn8w5s6yetnl', + 'bc1pungg73vdjmrxevy6jfxggrmemf3mkva9ztr4u8j3sq52nzjpsyssanx6yp', + 'bc1p2ltevrwc2s5se683qxm0zceva5d0c2lasjn6087mw5hph56zk3hqfs3c9q', + 'bc1prrcj4dz3cvzkn3305k7xa9lc4wmnkk9a855jw322l2lvvvzsezmsveg9ld', + 'bc1pa96tlu8jclfkz75rn0ggfdxtfxca9jmgu09fvscep7xmu7hc5znsdzcsr8', + 'bc1psjln9er9upyy8m552zexfgqrj3ah9pe6rjy5uk9shf36d04qa2uqfqk7am', + 'bc1psymgd4x8lt2aq3xsv6687xr2l8c7d8eqjpqvy3dl8tkzzxve9v3s534yjv', + 'bc1p9w2pxlz9hkw2mwvvk4khc3ezqa4x2npptrxqa5wysdfejarn5gyq79ec7v', + 'bc1pe4xh3j29h9fcgzjnyx6gsfwd249a0mp4qu90gkzs0k60gxj5ezqqmsmmey', + 'bc1py9agj7amgqu0378mypddsp6quawpzdtk2ryeclr7nue94y8ffgcshd30gg', + 'bc1p4pp78da3a2hv3hf9ztpmxxc3kqxecm2eep5mdrzgkzfmkmsrs37qt3zk4v', + 'bc1pe3z4h5gyhpyn38x7yx04zwduq0d6e8ctlzm9a45kdcw8t96wcnksldt60w', + 'bc1putufhuxaanf80r9u2ct2ay583h9dsawl45sp6wq6vs6gg37g5ttsd3s9c4', + 'bc1p8y6xzvxa49qygp4eyslcxz4z0rmm2attrffu7m6k5eh3e4envkyqg8hmdg', + 'bc1prs56u7473g26gtjqxzmjl6k07akdnxrhleyvg2kk6kdjurts99gszvq6a3', + 'bc1pf76uhesvxzyjrn6g30lyrn22r96u0k7zyy8avfqwulx6f0u0exqqjerca2', + 'bc1pr3tq23pntrn3970lk4k4gwjgn503ls3lx4f3dv7nudy5234429gqhmcptq', + 'bc1pxfcuk7m40ww5gd50wl2dcwvqqxyjmpx8ejg9m8zmds58wnxxklasxr2qrj', + 'bc1pygh6a33pgg079kya4l3lsfzslj0qmr0j0jqu6xycssy0jxhj59hsruzlhu', + 'bc1pxd7tjtxqcevnnx5nvpd2zkr9fkvxxfznkl0gucck8tmulvxe69asxgrkn7', + 'bc1pwhz0wc4hw8xw65xdjjvnyyrz68w3a6wy7e09a0fj69p0wvmnxymsrjc59x', + 'bc1p7rwrt0yyxup5uxe6vdjxfna7zp52yj4nul9r7qy7gzwdppv72ursz643d4', + 'bc1p073j0k642jre5mvhxz70y4rjyngcc5zwylj9f0k8ua2swm77p5xsjtle68', + 'bc1phqcjzxshcnxazlx3rmkw8wul9s4fqk26c54kqmzw4q0sfwzdtp6qevte47', + 'bc1pqrpr886mnrtt3aypqy6a9hrv0vc6arly57sq5wg40gr229yre7ssh7vvk2', + 'bc1p0pvu2mxwx5k7rtpytcdhf47qpp9k4r62c0awy26efs4wtyw6z7eqecupk2', + 'bc1pdl3xxsz4fdzd0dl4sn8wwcvcn22fd95m3sjpug00lxes93nq6aqs3e8fy7', + 'bc1pumuwgzqtr93ygatvtv36ywktzlnuezyfx4gww8w75agtu4agt79qksnqj5', ] \ No newline at end of file From b6e826fef95b3cfa28ea0d3a03e743664f15a090 Mon Sep 17 00:00:00 2001 From: rogi-sh <46889545+rogi-sh@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:58:21 +0100 Subject: [PATCH 713/787] Add LeverageX (Javsphere) Earn side TVL (#12683) Co-authored-by: igorshelkovenkov Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/javsphere/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/javsphere/index.js b/projects/javsphere/index.js index 1d17d51ada6b..597cbb508849 100644 --- a/projects/javsphere/index.js +++ b/projects/javsphere/index.js @@ -4,6 +4,13 @@ const STAKING_BASE = '0xE420BBb4C2454f305a3335BBdCE069326985fb5b' const FREEZER_BASE = '0x03e225D2bd32F5ecE539005B57F9B94A743ADBFB' const VESTING_BASE = '0x42a40321843220e9811A1385D74d9798436f7002' const JAV_BASE = '0xEdC68c4c54228D273ed50Fc450E253F685a2c6b9' +const LEVERAGEX_BASE_EARN = '0xfd916d70eb2d0e0e1c17a6a68a7fbede3106b852' + +async function tvl(api) { + const config = await api.fetchList({ lengthAbi: 'tokensCount', itemAbi: "function tokens(uint256) view returns (address asset, bytes32 priceFeed, uint256 targetWeightage, bool isActive)", target: LEVERAGEX_BASE_EARN }) + const tokens = config.map(i => i.asset) + return api.sumTokens({ owner: LEVERAGEX_BASE_EARN, tokens, }) +} module.exports = { methodology: `We count the total value locked from staking and freezer of javsphers native token JAV). `, @@ -11,7 +18,7 @@ module.exports = { [1733837635, "Migration to BASE"], ], base: { - tvl: () => { }, + tvl, staking: staking([STAKING_BASE, FREEZER_BASE], JAV_BASE), vesting: staking(VESTING_BASE, JAV_BASE) }, From c60ce503fb026106d5a4e1d7f64176431e686dc5 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:04:12 +0000 Subject: [PATCH 714/787] add double count liquid restaking (#12686) --- projects/adrastea-lrt/index.js | 1 + projects/aspida/index.js | 1 + projects/fragmetric/index.js | 1 + projects/ibtc/index.js | 1 + projects/kyros/index.js | 1 + projects/ngad-euclid/index.js | 1 + projects/yieldnest/index.js | 1 + 7 files changed, 7 insertions(+) diff --git a/projects/adrastea-lrt/index.js b/projects/adrastea-lrt/index.js index f75e94027aa7..24c53d662b9e 100644 --- a/projects/adrastea-lrt/index.js +++ b/projects/adrastea-lrt/index.js @@ -1,5 +1,6 @@ const { sumTokensExport } = require('../helper/solana') module.exports = { + doublecounted: true, solana: { tvl: sumTokensExport({ owners: ['wYPqKV6XuRBSBU1zYiYB1ZTPhkR8PsDRz5kKgmSyum1'] }) } diff --git a/projects/aspida/index.js b/projects/aspida/index.js index ea3ff2f547ff..e9d0d5542b1b 100644 --- a/projects/aspida/index.js +++ b/projects/aspida/index.js @@ -1,4 +1,5 @@ module.exports = { + doublecounted: true, ethereum: { tvl: async (api) => { const totalSupply = await api.call({ target: "0xFC87753Df5Ef5C368b5FBA8D4C5043b77e8C5b39", abi: "uint256:totalSupply" }); diff --git a/projects/fragmetric/index.js b/projects/fragmetric/index.js index 462f79a03840..2e340930a650 100644 --- a/projects/fragmetric/index.js +++ b/projects/fragmetric/index.js @@ -20,6 +20,7 @@ async function tvl() { module.exports = { timetravel: false, + doublecounted: true, solana: { tvl }, methodology: 'TVL is calculated by summing all restaked assets.', }; diff --git a/projects/ibtc/index.js b/projects/ibtc/index.js index 24fcdef49a22..f31ee5d6c60d 100644 --- a/projects/ibtc/index.js +++ b/projects/ibtc/index.js @@ -7,6 +7,7 @@ async function tvl(api) { } module.exports = { + doublecounted: true, xsat: { tvl }, diff --git a/projects/kyros/index.js b/projects/kyros/index.js index 7015c61d162e..2bfab21bf246 100644 --- a/projects/kyros/index.js +++ b/projects/kyros/index.js @@ -10,6 +10,7 @@ async function tvl() { module.exports = { timetravel: false, + doublecounted: true, solana: { tvl }, methodology: 'The TVL is calculated by summing all restaked assets.', }; diff --git a/projects/ngad-euclid/index.js b/projects/ngad-euclid/index.js index f0e63e74a72d..449c984f18bd 100644 --- a/projects/ngad-euclid/index.js +++ b/projects/ngad-euclid/index.js @@ -15,6 +15,7 @@ async function tvl(_, _1, _2, {api}) { } module.exports = { + doublecounted: true, ethereum: { tvl } diff --git a/projects/yieldnest/index.js b/projects/yieldnest/index.js index 0383bef2b986..7c3cc6bf56d6 100644 --- a/projects/yieldnest/index.js +++ b/projects/yieldnest/index.js @@ -5,6 +5,7 @@ const YN_ETH = '0x09db87a538bd693e9d08544577d5ccfaa6373a48' const yn_ETHx = '0x657d9ABA1DBb59e53f9F3eCAA878447dCfC96dCb' module.exports = { + doublecounted: true, ethereum: { tvl: async (api) => { const ynethBalance = await api.call({ abi: 'uint256:totalAssets', target: YN_ETH }) From be42bb87aac758e4dd0015f47329d07d05ccaa04 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:01:04 +0100 Subject: [PATCH 715/787] track mew finance #12682 --- projects/mew-fi/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/mew-fi/index.js diff --git a/projects/mew-fi/index.js b/projects/mew-fi/index.js new file mode 100644 index 000000000000..6472dc72be45 --- /dev/null +++ b/projects/mew-fi/index.js @@ -0,0 +1,9 @@ +const { sumTokensExport } = require('./helper/chain/ergo') + +module.exports = { + timetravel: false, + ergo: { + tvl: () => ({}), + staking: sumTokensExport({ owner: '2Czxg7U54ZyGMzjt35EYX9g98H9UjFqteuYWX5CSgGCYWAjg1ng2jgm4BHjA6u1Azeo7EYQsBMVLbhRreNASJu54ho', }) + } +} From 99d6f2746538574d0b474d412813576728cb2a7a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:25:57 +0100 Subject: [PATCH 716/787] cowswap: track arbitrum --- projects/balancer-cow-amm/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/balancer-cow-amm/index.js b/projects/balancer-cow-amm/index.js index 35c72404d95a..f9e8053eee7f 100644 --- a/projects/balancer-cow-amm/index.js +++ b/projects/balancer-cow-amm/index.js @@ -10,6 +10,9 @@ const config = { ['0x703Bd8115E6F21a37BB5Df97f78614ca72Ad7624', 35259725], ['0x7573B99BC09c11Dc0427fb9c6662bc603E008304', 35163914], ], + arbitrum: [ + ['0xE0e2Ba143EE5268DA87D529949a2521115987302', 248291297 ] + ] } Object.keys(config).forEach(chain => { From 8bca8274e7461d65a2c4788e27699a5fedcb4890 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:42:40 +0100 Subject: [PATCH 717/787] feat: Adapter, Comtech-Gold (#12688) --- projects/comtech-gold/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/comtech-gold/index.js diff --git a/projects/comtech-gold/index.js b/projects/comtech-gold/index.js new file mode 100644 index 000000000000..36ddede975a1 --- /dev/null +++ b/projects/comtech-gold/index.js @@ -0,0 +1,10 @@ +const CGO = '0x8f9920283470f52128bf11b0c14e798be704fd15' + +const tvl = async (api) => { + const supply = await api.call({ target: CGO, abi: 'erc20:totalSupply' }) + api.add(CGO, supply) +} + +module.exports = { + xdc: { tvl } +} \ No newline at end of file From 3f1c023be14a1fb5110e4f3638381adcfd062cfa Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:48:14 +0100 Subject: [PATCH 718/787] Hashnote update (#12689) Co-authored-by: twothirtyfive --- projects/hashnote/index.js | 29 ++++++++++++++++++++++------- projects/helper/coreAssets.json | 1 - 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/projects/hashnote/index.js b/projects/hashnote/index.js index 35bbcf0875df..9930d8a14c66 100644 --- a/projects/hashnote/index.js +++ b/projects/hashnote/index.js @@ -1,25 +1,40 @@ const { call } = require('../helper/chain/near') +const { get } = require("../helper/http"); -const NEAR = '0x136471a34f6ef19fE571EFFC1CA711fdb8E49f2b' +const USYC = '0x136471a34f6ef19fE571EFFC1CA711fdb8E49f2b' const CONFIG = { canto: '0xfb8255f0de21acebf490f1df6f0bdd48cc1df03b', - ethereum: NEAR, - near: 'usyc.near' + ethereum: USYC, + near: 'usyc.near', + noble: 'uusyc' } const evmTvl = async (api, token) => { const supply = await api.call({ target: token, abi: 'erc20:totalSupply' }) - api.add(NEAR, supply, { skipChain: true }) + api.add(USYC, supply, { skipChain: true }) } const nonEvmTvl = async (api, token) => { const supply = await call(token, 'ft_total_supply', {}); - api.add(NEAR, supply, { skipChain: true }) + api.add(USYC, supply, { skipChain: true }); +} + +const nobleTvl = async (api, token) => { + const res = await get(`https://rest.cosmos.directory/noble/cosmos/bank/v1beta1/supply/by_denom?denom=${token}`); + api.add(USYC, parseInt(res.amount.amount), { skipChain: true }); } Object.entries(CONFIG).forEach(([chain, address]) => { module.exports[chain] = { - tvl: async (api) => (chain === 'near' ? nonEvmTvl(api, address) : evmTvl(api, address)) + tvl: async (api) => { + if (chain === 'near') { + return nonEvmTvl(api, address); + } else if (chain === 'noble') { + return nobleTvl(api, address); + } else { + return evmTvl(api, address); + } + } }; -}); +}); \ No newline at end of file diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 4ee765914ac3..1542216f88e8 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1952,7 +1952,6 @@ "noble": { "USDC": "uusdc", "USDY": "ausdy", - "uusdc": "uusdc", "ausdy": "ausdy" }, "ripple": { From e8b52681c50cd59f747a156602fbb68e0e59dc26 Mon Sep 17 00:00:00 2001 From: Ss5h Date: Fri, 13 Dec 2024 01:00:45 +0900 Subject: [PATCH 719/787] add wstBfc (#12610) --- projects/bifi/index.js | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/projects/bifi/index.js b/projects/bifi/index.js index c5a0511bf930..23da26146735 100644 --- a/projects/bifi/index.js +++ b/projects/bifi/index.js @@ -51,16 +51,11 @@ const chainPools = { UnifiedDAI: { pool: '0x2168dAb12A6A93181bbAD9C9dc769307C36fB45C', token: ADDRESSES.bfc.UnifiedDAI }, UnifiedWBTC: { pool: '0xEa3b4a2dA5DbE8379AD4c60aaD5184df69D7C9AD', token: ADDRESSES.bfc.WBTC}, UnifiedBTCB: { pool: '0x0B31FeE8bF53bFe2f5F7083B73A4c9C8B517E32F', token: ADDRESSES.bfc.BTCB}, - BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: ADDRESSES.bfc.BitcoinUSD } + BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: ADDRESSES.bfc.BitcoinUSD }, + WstBFC: { pool: '0xf9B2f6D2a61923E61aD9F6DAA78f52b7e1722b12', token: '0x386f2F5d9A97659C86f3cA9B8B11fc3F76eFDdaE' }, }, } -module.exports = { - bitcoin: { - tvl: bitcoin - }, -}; - Object.keys(chainPools).forEach(chain => { const pools = chainPools[chain] module.exports[chain] = { @@ -70,20 +65,4 @@ Object.keys(chainPools).forEach(chain => { } }) -const wbtc = ADDRESSES.ethereum.WBTC -async function bitcoin(timestamp, ethBlock) { - const tokenPool = { - pool: '0x986Eb51E67e154901ff9B482835788B8f3054076', - token: '0x4ca7a5Fb41660A9c5c31683B832A17f7f7457344' - } - let tokenLocked = await sdk.api.erc20.balanceOf({ - owner: tokenPool.pool, - target: tokenPool.token, - block: ethBlock - }); - return { - [wbtc]: tokenLocked.output - } -} - module.exports.ethereum.staking = stakings(stakingPool, bfcAddr) From 1670ba3068a7401372d4b6dc22c94f13e2ce5853 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Thu, 12 Dec 2024 19:18:33 +0000 Subject: [PATCH 720/787] fix import --- projects/mew-fi/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mew-fi/index.js b/projects/mew-fi/index.js index 6472dc72be45..84a0098e8ef3 100644 --- a/projects/mew-fi/index.js +++ b/projects/mew-fi/index.js @@ -1,4 +1,4 @@ -const { sumTokensExport } = require('./helper/chain/ergo') +const { sumTokensExport } = require('../helper/chain/ergo') module.exports = { timetravel: false, From 6de1c5d8c1ddaba58310163ab111c01a84d28614 Mon Sep 17 00:00:00 2001 From: Samuele Marro Date: Fri, 13 Dec 2024 09:57:14 +0000 Subject: [PATCH 721/787] Add VinuSwap adapter (#12692) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 6 ++++++ projects/vinuswap/index.js | 36 +++++++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 projects/vinuswap/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 0075d0f0391e..f3569d8435a9 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -337,6 +337,7 @@ "vechain", "velas", "venom", + "vinu", "vision", "vite", "vive", diff --git a/projects/helper/env.js b/projects/helper/env.js index 461d4435ed42..9d1fd35aa66f 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -35,6 +35,7 @@ const DEFAULTS = { CORN_RPC: "https://rpc.ankr.com/corn_maizenet", ACE_RPC_MULTICALL: "0x025A2B4fCE1E0bD736D5cebe6C8a52229795376B", ZILLIQA_RPC_MULTICALL: "0x38899efb93d5106d3adb86662c557f237f6ecf57", + VINU_RPC_MULTICALL: "0x63CE2062281fb85fE5BC407799A455C21f35F355", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 970173165969..1515d90d1535 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -45,6 +45,12 @@ const fixBalancesTokens = { apechain: { [ADDRESSES.null]: { coingeckoId: "apecoin", decimals: 18 }, }, + vinu: { + '0xC0264277fcCa5FCfabd41a8bC01c1FcAF8383E41': { coingeckoId: "tether", decimals: 6 }, + '0xDd4b9b3Ce03faAbA4a3839c8B5023b7792be6e2C': { coingeckoId: "ethereum", decimals: 18}, + '0x00c1E515EA9579856304198EFb15f525A0bb50f6': { coingeckoId: "vita-inu", decimals: 18}, + '0xEd8c5530a0A086a12f57275728128a60DFf04230': { coingeckoId: "vinuchain", decimals: 18}, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) diff --git a/projects/vinuswap/index.js b/projects/vinuswap/index.js new file mode 100644 index 000000000000..fd481329ccdc --- /dev/null +++ b/projects/vinuswap/index.js @@ -0,0 +1,36 @@ +const { getLogs2 } = require('../helper/cache/getLogs') +const { sumTokens2 } = require('../helper/unwrapLPs') + +// v1.1 factory +const factories = [ + '0x4bC45A5db58d4535FaF668F392035407d2a14E76', // v1 + '0xd74dEe1C78D5C58FbdDe619b707fcFbAE50c3EEe' // v1.1 +] + +// Deployed with an old contract +const V1_POOLS = [ + '0xa97FA6E9A764306107F2103a2024Cfe660c5dA33', + '0x3424b0dd7715C8db92414DB0c5A9E5FA0D51cCb5', + '0xfD763943f628e125CEE3D8d85DC0fc7098355d16', + '0x8d713bC2d35327B536A8B2CCec9392e57C0D04B4', + '0xd50ee26F62B1825d14e22e23747939D96746434c' +] + +async function tvl(api) { + const ownerTokens = [] + const token0s = await api.multiCall({ abi: 'address:token0', calls: V1_POOLS}) + const token1s = await api.multiCall({ abi: 'address:token1', calls: V1_POOLS}) + + ownerTokens.push(...V1_POOLS.map((pool, idx) => [[token0s[idx], token1s[idx]], pool])) + + const logs = await getLogs2({ api, target: factories[1], eventAbi: 'event PoolCreated(address indexed token0, address indexed token1, uint24 indexed fee, int24 tickSpacing, address feeManager, address pool)', fromBlock: 1, skipCacheRead: true, }) + + ownerTokens.push(...logs.map(l => [[l.token0, l.token1], l.pool])) + return sumTokens2({ api, ownerTokens }) +} + +module.exports = { + vinu: { + tvl + } +} \ No newline at end of file From d73afa6af7aaca6201ae212166dc39b0fa3d72c3 Mon Sep 17 00:00:00 2001 From: charq <73696209+buchaoqun@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:02:50 +0800 Subject: [PATCH 722/787] Update github url (#12694) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: qwen-solv Co-authored-by: hja <740055963@qq.com> --- projects/solv-protocol-funds/index.js | 2 +- projects/solv-protocol-rwa/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/solv-protocol-funds/index.js b/projects/solv-protocol-funds/index.js index eaddedb068ca..717b6b53d3c2 100644 --- a/projects/solv-protocol-funds/index.js +++ b/projects/solv-protocol-funds/index.js @@ -14,7 +14,7 @@ const graphUrlList = { merlin: 'http://solv-subgraph-server-alb-694489734.us-west-1.elb.amazonaws.com:8000/subgraphs/name/solv-payable-factory-merlin', } -const slotListUrl = 'https://raw.githubusercontent.com/solv-finance-dev/solv-protocol-rwa-slot/main/slot.json'; +const slotListUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solv-rwa-slot.json'; const addressUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solv-funds.json'; diff --git a/projects/solv-protocol-rwa/index.js b/projects/solv-protocol-rwa/index.js index 25d703b28ec7..be2cf40b9f8a 100644 --- a/projects/solv-protocol-rwa/index.js +++ b/projects/solv-protocol-rwa/index.js @@ -8,7 +8,7 @@ const graphUrlList = { mantle: 'https://api.0xgraph.xyz/api/public/65c5cf65-bd77-4da0-b41c-cb6d237e7e2f/subgraphs/solv-payable-factory-mantle/-/gn', } -const slotListUrl = 'https://cdn.jsdelivr.net/gh/solv-finance-dev/solv-protocol-rwa-slot/slot.json'; +const slotListUrl = 'https://raw.githubusercontent.com/solv-finance/solv-protocol-defillama/refs/heads/main/solv-rwa-slot.json'; async function tvl(api) { From b8ca31658d4a826eecd4e9a97af5c5b5128b8055 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 13 Dec 2024 11:23:03 +0100 Subject: [PATCH 723/787] update bitflux #12690 --- projects/bitflux/index.js | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/projects/bitflux/index.js b/projects/bitflux/index.js index a3f45f7644cc..6bab5ca62c31 100644 --- a/projects/bitflux/index.js +++ b/projects/bitflux/index.js @@ -1,19 +1,21 @@ -const { sumTokensExport } = require("../helper/unwrapLPs"); +const { sumTokens2 } = require("../helper/unwrapLPs"); -const swapFlashLoan = '0x4bcb9Ea3dACb8FfE623317E0B102393A3976053C'; +const swapFlashLoans = Object.values({ + 'BP1': "0x4bcb9Ea3dACb8FfE623317E0B102393A3976053C", + 'BP2': "0x6a63cbf00D15137756189c29496B14998b259254", + 'BP3': "0xE7E1b1F216d81a4b2c018657f26Eda8FE2F91e26", + 'BP4': "0xeC938Bc5b201E96b6AFE97070a8Ea967E0dcAe96" +}) -const ADDRESSES = { - 'WBTC': "0x5832f53d147b3d6Cd4578B9CBD62425C7ea9d0Bd", - "solvBTCb": "0x5b1fb849f1f76217246b8aaac053b5c7b15b7dc3", - "solvBTCcore": "0x9410e8052bc661041e5cb27fdf7d9e9e842af2aa" +async function tvl(api) { + const tokens = await api.multiCall({ abi: 'address[]:getTokens', calls: swapFlashLoans}) + const ownerTokens = tokens.map((token, idx) => [token, swapFlashLoans[idx]]) + return sumTokens2({ api, ownerTokens }) } module.exports = { - core: { - tvl: sumTokensExport( - { - owner: swapFlashLoan, - tokens: [ADDRESSES.WBTC, ADDRESSES.solvBTCb, ADDRESSES.solvBTCcore] - }), - } + core: { + tvl + }, + methodology: "Counts all BTC-pegged tokens in the Bitflux liquidity pools" } \ No newline at end of file From cc009a5a6b79339c4d4c251e416a686c991fd59d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:36:39 +0100 Subject: [PATCH 724/787] track mars perp #12695 --- projects/mars-perp/index.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 projects/mars-perp/index.js diff --git a/projects/mars-perp/index.js b/projects/mars-perp/index.js new file mode 100644 index 000000000000..d770a8b0d7f0 --- /dev/null +++ b/projects/mars-perp/index.js @@ -0,0 +1,23 @@ +const { queryContract } = require('../helper/chain/cosmos'); + +const contractAddresses = { + neutron: { + perps: 'neutron1g3catxyv0fk8zzsra2mjc0v4s69a7xygdjt85t54l7ym3gv0un4q2xhaf6' + }, +}; + +async function tvl(api) { + const chain = api.chain; + const { perps } = contractAddresses[chain]; + const info = await queryContract({ contract: perps, chain, data: { 'config': {} }, }); + const perpsVault = await queryContract({ contract: perps, chain, data: { 'vault': {} }, }); + + if (perpsVault) api.add(info.base_denom, perpsVault['total_balance']); +} + +module.exports = { + timetravel: false, + methodology: + "For each chain, sum token balances by querying the total deposit amount for each asset in the chain's params contract.", + neutron: { tvl }, +} From b64331610e9c9f6d9ca23d08aa919d31203513ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Manojlovi=C4=87?= Date: Fri, 13 Dec 2024 16:25:09 +0100 Subject: [PATCH 725/787] Add new assets to Nostra Money Market (#12699) --- projects/nostra/index.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/projects/nostra/index.js b/projects/nostra/index.js index e8034e051c19..f10eb98de4c2 100644 --- a/projects/nostra/index.js +++ b/projects/nostra/index.js @@ -62,6 +62,26 @@ const supplyTokens = [ "0x036e722e04ef2ccadb9229b5415272353aaeb9554c989b83d4d932dba8dbe8f9", "0x065bde349f553cf4bdd873e54cd48317eda0542764ebe5ba46984cedd940a5e4", "0x000215cbd38a1e765cfd2c60bcb291c9d0b0bb7e7f56f682f0d3501303586185", + // EKUBO + "0x45863a5605ea7e77f2b043888a9efb1ff6e6b0fb9e62790ff987b2e084ca1f6", + "0x6b1063a4d5c32fef3486bf29d1719eb09481b52d31f7d86a50c64b0b8d5defb", + "0x06fd4a9efd0c884e0b29506169dd2fcad6b284d5bdbd46ede424abc26d71164", + "0x2360bd006d42c1a17d23ebe7ae246a0764dea4ac86201884514f86754ccc7b8", + // xSTRK + "0x6878fd475d5cea090934d690ecbe4ad78503124e4f80380a2e45eb417aafb9c", + "0x1b8d8e31f9dd1bde7dc878dd871225504837c78c40ff01cbf03a255e2154bf0", + "0x4d1125a716f547a0b69413c0098e811da3b799d173429c95da4290a00c139f7", + "0x257afe480da9255a026127cd3a295a580ef316b297a69be22b89729ae8c1d2a", + // BROTHER + "0x674d79e17ae51cbf3b49d443266460dce15215277d9c3aedd7e1733112e9e52", + "0x296f271f5ec4f45c93c1fd351bd44117795f5ef80c5134137d7dc9fce3dc364", + "0xf7c7bf6267b4c19d531ccd959cc4fb6ca39bc04af8b173f8255567b5688636", + "0x21bb27bc057be40e31752c53e7e8867b6d1b155ce46ae32454619adff0be777", + // sSTRK + "0x271f97bd18cdb2e7aff148db683be36891b0dbbffcd42024237a849ef7ad6cd", + "0x1dd8cab616528ba64689a2b7f10bad1acd6bb4e2de3f4f5dab1839f7a89a82e", + "0x24fbb2888e04b47f1bc1f3232528dcfc1ddf69d150b19241628e6d42b3545c6", + "0x1fb33831f458b0786e1a041ac2e9df7603635a7caa88aa4ed30c23a787d4e3a", ]; const debtTokens = [ "0x0491480f21299223b9ce770f23a2c383437f9fbf57abc2ac952e9af8cdb12c97", @@ -76,6 +96,10 @@ const debtTokens = [ "0x4b036839a8769c04144cc47415c64b083a2b26e4a7daa53c07f6042a0d35792", "0x3e0576565c1b51fcac3b402eb002447f21e97abb5da7011c0a2e0b465136814", "0x06726ec97bae4e28efa8993a8e0853bd4bad0bd71de44c23a1cd651b026b00e7", + "0x73fa792a8ad45303db3651c34176dc419bee98bfe45791ab12f884201a90ae2", + "0x424638c9060d08b4820aabbb28347fc7234e2b7aadab58ad0f101e2412ea42d", + "0x25a079284c3cd58bbed989250a169e7e52929070b4bcefaf8f0b9b7be77e5b1", + "0x4349ca3d519e1b1da9da5da3cf19e2039b1776a9fe98c529f95ead7964fe0d", ]; function* chunks(arr, n) { From 915bf90c3efc4ccb0c6b7dd54bc255bb69d93b13 Mon Sep 17 00:00:00 2001 From: 0xpeluche <110820448+0xpeluche@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:25:23 +0100 Subject: [PATCH 726/787] Update: Fortunafi (more assets) (#12698) --- projects/fortunafi/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/fortunafi/index.js b/projects/fortunafi/index.js index fa3ecdece16a..907b59b8a931 100644 --- a/projects/fortunafi/index.js +++ b/projects/fortunafi/index.js @@ -16,7 +16,16 @@ const config = { ifBill: '0x45bafad5a6a531Bc18Cf6CE5B02C58eA4D20589b', }, ethereum: { + fBill: '0x108Ec61bd5A91F5596F824832524C6b6002E3F03', + ifBill: '0x4B57e1E3fd684d3bb82A0652c77FD7412dF6a2A5', fCOIN: '0x2378aC4EEAAe44695E1e3d0fcAEEd6ba8b0F5108', + ifCOIN: '0xA6d0f5bb034312f9a4fC565e916B84c264160994', + fHOOD: '0x62C5e58001f91E65C420c4dc4c2F2FAA2264f846', + ifHOOD: '0x7fC6B348368c34013aaC4a7888883b886226E95e', + fSPQQQ: '0x3010E93c37092991E9C1Cc7f7Eeed44148836657', + ifSPQQQ: '0x6D34113F41d5C3b327b6417fC17Ea449C71eA6f4', + fHV1: '0xD71412e045825d52b38355F8ade1230DD2E393e4', + ifHV1: '0xE7638CB7ad2384D635d2C49AeBE76cfbcceC50ed' }, } From d906e73633eaa65daf46df1342318bc8bcee6f8d Mon Sep 17 00:00:00 2001 From: o-sekiguchi <157677454+o-sekiguchi@users.noreply.github.com> Date: Sat, 14 Dec 2024 00:27:01 +0900 Subject: [PATCH 727/787] Add Arbitrum chain to existing Lockon protocol adapter (#12697) --- projects/lockon/index.js | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/projects/lockon/index.js b/projects/lockon/index.js index 3eab9037df49..d061659ef092 100644 --- a/projects/lockon/index.js +++ b/projects/lockon/index.js @@ -1,14 +1,26 @@ const START_TIMESTAMP = 1690340140; // 2023-07-26T02:55:40Z -const CONTROLLER_ADDRESS = "0x153e739B8823B277844Ad885A30AC5bD9DfB6E83" - -async function tvl(api) { - const sets = await api.call({ abi: "address[]:getSets", target: CONTROLLER_ADDRESS, }) - const tokens = await api.multiCall({ abi: 'address[]:getComponents', calls: sets}) - const ownerTokens = sets.map((set, i) => [tokens[i], set]) - return api.sumTokens({ ownerTokens }) +const config = { + polygon: { + controllerAddress: "0x153e739B8823B277844Ad885A30AC5bD9DfB6E83", + }, + arbitrum: { + controllerAddress: "0xA36c2B06aFc96Ffd52d148Ed6acbB9fe2Ab864Be", + } } -module.exports = { - start: START_TIMESTAMP, - polygon: { tvl } +function tvlExport({controllerAddress}) { + return async function tvl(api) { + const sets = await api.call({ abi: "address[]:getSets", target: controllerAddress, }) + const tokens = await api.multiCall({ abi: 'address[]:getComponents', calls: sets}) + const ownerTokens = sets.map((set, i) => [tokens[i], set]) + return api.sumTokens({ ownerTokens }) + } + } + +module.exports.start = START_TIMESTAMP +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: tvlExport(config[chain]) + } +}) From 2bfcd60a664bb47a3590bb019f05501ac5206ae4 Mon Sep 17 00:00:00 2001 From: 0xmDreamy <124707942+0xmDreamy@users.noreply.github.com> Date: Sat, 14 Dec 2024 19:22:57 +0700 Subject: [PATCH 728/787] feat(abracadabra): Add various new cauldrons (#12708) --- projects/abracadabra/market.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/projects/abracadabra/market.json b/projects/abracadabra/market.json index af4f168f0210..f9957bf82f64 100644 --- a/projects/abracadabra/market.json +++ b/projects/abracadabra/market.json @@ -9,7 +9,9 @@ "0x7962ACFcfc2ccEBC810045391D60040F635404fb": "0x09400D9DB990D5ed3f35D7be61DfAEB900Af03C9", "0x66805F6e719d7e67D46e8b2501C1237980996C6a": "0x7f1fa204bb700853D36994DA19F830b6Ad18455C", "0x49De724D7125641F56312EBBcbf48Ef107c8FA57": "0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f", - "0x780db9770dDc236fd659A39430A8a7cC07D0C320": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1" + "0x780db9770dDc236fd659A39430A8a7cC07D0C320": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "0x6B04C535C852AD19345571247ee12B5BF23dAcB6": "0x6985884C4392D348587B19cb9eAAf157F13271cd", + "0xFCE0b2fe7d7d5057C82A896e4D8EC0e4b813f71f": "0x58538e6A46E07434d7E7375Bc268D3cb839C0133" }, "avax": { "0x35fA7A723B3B39f15623Ff1Eb26D8701E7D6bB21": "0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b", @@ -68,7 +70,9 @@ "0x692887E8877C6Dd31593cda44c382DB5b289B684": "0xf35b31B941D94B249EaDED041DB1b05b7097fEb6", "0x406b89138782851d3a8C04C743b010CEb0374352": "0xdCD90C7f6324cfa40d7169ef80b12031770B4325", "0x85f60D3ea4E86Af43c9D4E9CC9095281fC25c405": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", - "0x00380CB5858664078F2289180CC32F74440AC923": "0x5C5b196aBE0d54485975D1Ec29617D42D9198326" + "0x00380CB5858664078F2289180CC32F74440AC923": "0x5C5b196aBE0d54485975D1Ec29617D42D9198326", + "0x38E7D1e4E2dE5b06b6fc9A91C2c37828854A41bb": "0x5C5b196aBE0d54485975D1Ec29617D42D9198326", + "0xE8ed7455fa1b2a3D8959cD2D59c7f136a45BF341": "0x73075fD1522893D9dC922991542f98F08F2c1C99" }, "fantom": { "0xed745b045f9495b8bfc7b58eea8e0d0597884e12": "0x0DEC85e74A92c52b7F708c4B10207D9560CEFaf0", From b4991748c5e2c0052863667bc167af69a0bf06cb Mon Sep 17 00:00:00 2001 From: Rafael Albuquerque <70333411+0xhafa@users.noreply.github.com> Date: Sat, 14 Dec 2024 10:54:41 -0300 Subject: [PATCH 729/787] feat: added marionette vethe deposits in hidden hand (#12702) --- projects/hidden-hand/index.js | 4 +++- projects/hidden-hand/marionette.js | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 projects/hidden-hand/marionette.js diff --git a/projects/hidden-hand/index.js b/projects/hidden-hand/index.js index ed63f14c7ffd..ffcf2f25d357 100644 --- a/projects/hidden-hand/index.js +++ b/projects/hidden-hand/index.js @@ -1,5 +1,6 @@ const { sumTokens2 } = require('../helper/unwrapLPs') const { cachedGraphQuery } = require('../helper/cache') +const marionette = require('./marionette'); const protocol_contracts = { ethereum: { @@ -77,8 +78,9 @@ async function tvl(api) { } module.exports = { - methodology: `Sums bribe tokens deposited on Hidden Hand Reward Distributors, Bribe Vaults and Harvester contracts.`, + methodology: `Sums bribe tokens deposited on Hidden Hand Reward Distributors, Bribe Vaults and Harvester contracts and veTHE deposited in Marionette.`, ethereum: { tvl }, optimism: { tvl }, arbitrum: { tvl }, + bsc: marionette.bsc, }; diff --git a/projects/hidden-hand/marionette.js b/projects/hidden-hand/marionette.js new file mode 100644 index 000000000000..af92074f7e77 --- /dev/null +++ b/projects/hidden-hand/marionette.js @@ -0,0 +1,23 @@ +const { sumTokens2 } = require('../helper/unwrapLPs') + +async function tvl(api) { + const owners = ["0x60443fd265b4a4D51DFE2569569D45DBde393B14", "0x6045648cF69285fC2018Ca8F3ee8844d5e05Ee5d"]; //marionette adapters + + return sumTokens2({ + api, + owners, + solidlyVeNfts: [ + { + isAltAbi: true, + baseToken: "0xF4C8E32EaDEC4BFe97E0F595AdD0f4450a863a11", + veNft: "0xfBBF371C9B0B994EebFcC977CEf603F7f31c070D" + }, // veTHENA + ], + permitFailure: true, + }); +} + +module.exports = { + methodology: `Sums veTokens deposited on Hidden Hand Marionette Adapters.`, + bsc: { tvl }, +}; From b4aff68d2dfe2e6fb58ddb732aed90bf8bc2a78c Mon Sep 17 00:00:00 2001 From: GMS Vaults Date: Sat, 14 Dec 2024 23:18:08 +0100 Subject: [PATCH 730/787] Add GMS Vaults | Base (#12704) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/gmsvaults/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 projects/gmsvaults/index.js diff --git a/projects/gmsvaults/index.js b/projects/gmsvaults/index.js new file mode 100644 index 000000000000..3208fe7ed415 --- /dev/null +++ b/projects/gmsvaults/index.js @@ -0,0 +1,14 @@ +const { staking } = require("../helper/staking"); + +const base_vault = "0xe1515D3A8c503a0fc68015844a9fc742D1c80927"; +const base_staking = "0x3D893CC2C70242907cAac245D04C565056174EF7"; +const base_GMS = "0x13dE6E0290C19893949650fe6fdf9CDfFAFa6040"; + +module.exports = { + doublecounted: true, + methodology: 'staked gms + vault balance', + base: { + staking: staking(base_staking, base_GMS), + tvl: staking(base_vault, '0x2D5875ab0eFB999c1f49C798acb9eFbd1cfBF63c'), + }, +}; \ No newline at end of file From 10a31fd9e595cc060880f4862ae35cd6c35f3057 Mon Sep 17 00:00:00 2001 From: mdcryptonfts <105838382+mdcryptonfts@users.noreply.github.com> Date: Sat, 14 Dec 2024 17:18:41 -0500 Subject: [PATCH 731/787] Added waxfun project (#12710) Co-authored-by: Mike D --- projects/waxfun/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/waxfun/index.js diff --git a/projects/waxfun/index.js b/projects/waxfun/index.js new file mode 100644 index 000000000000..a36b729806a1 --- /dev/null +++ b/projects/waxfun/index.js @@ -0,0 +1,18 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +// WaxFun +// https://wax.fun +async function wax() { + const accounts = ["main.waxfun"]; + const tokens = [ + ["eosio.token", "WAX", "wax"] + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `WaxFun TVL is achieved by querying token balances from a launchpad contract`, + wax: { + tvl: wax + }, +} \ No newline at end of file From e49706bc75cd4e59cb860ce7868b89877b4371ee Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sun, 15 Dec 2024 04:03:43 +0000 Subject: [PATCH 732/787] add treasury for memewe --- projects/treasury/memewe.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/treasury/memewe.js diff --git a/projects/treasury/memewe.js b/projects/treasury/memewe.js new file mode 100644 index 000000000000..108a0151f3ad --- /dev/null +++ b/projects/treasury/memewe.js @@ -0,0 +1,15 @@ +const { nullAddress, treasuryExports } = require("../helper/treasury"); + + +module.exports = treasuryExports({ + base: { + owners: [ + '0xFfC60ed4c5ee48beb646dD81521842A4a4d19980', + ], + tokens: [ + nullAddress, + "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ], + ownTokens: [], + }, +}) \ No newline at end of file From e8c7d8c0e15d7a2c5b32083430d7c5b11390d1d7 Mon Sep 17 00:00:00 2001 From: Galaxy <30950645+GalaxySciTech@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:59:07 +0400 Subject: [PATCH 733/787] Add BBBPump.fun to xdc network (#12703) --- projects/bbbpump/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/bbbpump/index.js diff --git a/projects/bbbpump/index.js b/projects/bbbpump/index.js new file mode 100644 index 000000000000..3b818bdba11c --- /dev/null +++ b/projects/bbbpump/index.js @@ -0,0 +1,25 @@ +const { nullAddress } = require('../helper/unwrapLPs'); +const { stakingPricedLP } = require("../helper/staking"); + +// Contract addresses +const MegadropBBB = "0x37c00AE5C4b49Ab0F5fD2FFB1033588e9bC33B08"; // Megadrop BBB +const BBB = "0xfa4ddcfa8e3d0475f544d0de469277cf6e0a6fd1"; // BBB Token +const XDC_BBB_LP = "0x95ab47ff0056cdc81a42b35d96551d9c5534947d"; // XDC-BBB LP Token +const BBBPump = "0x2E24BFdE1EEDa0F1EA3E57Ba7Ff10ac6516ab5Ec"; // BBBPump + +async function bbbPumpTvl(api) { + return api.sumTokens({ + tokensAndOwners2: [ + [nullAddress], + [BBBPump] + ] + }); +} + +module.exports = { + start: '2024-10-10', + xdc: { + tvl: bbbPumpTvl, + staking: stakingPricedLP(MegadropBBB, BBB, "xdc", XDC_BBB_LP, "wrapped-xdc"), + }, +}; \ No newline at end of file From f9ccb907f6b9acf49f997517074faca18c07a64a Mon Sep 17 00:00:00 2001 From: Knight <74679047+Knight-101@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:50:19 +0530 Subject: [PATCH 734/787] updated new apis for vaults (#12712) Co-authored-by: Knight --- projects/kriya-dex-earn/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/kriya-dex-earn/index.js b/projects/kriya-dex-earn/index.js index 60cbaecb1fe4..02986229aa3d 100644 --- a/projects/kriya-dex-earn/index.js +++ b/projects/kriya-dex-earn/index.js @@ -2,10 +2,10 @@ const { fetchURL } = require("../helper/utils"); const sui = require("../helper/chain/sui"); const clmmVaultUrl = - "https://88ob93rfva.execute-api.ap-southeast-1.amazonaws.com/release/vaults"; + "https://vjkibmct3h.execute-api.ap-southeast-1.amazonaws.com/release/vaults"; const llVaultUrl = - "https://4sacq88271.execute-api.ap-southeast-1.amazonaws.com/release/vaults"; + "https://c19eainr59.execute-api.ap-southeast-1.amazonaws.com/release/defilama/vaults"; async function clmmVaultTVL(api) { const vaults = (await fetchURL(clmmVaultUrl))?.data; From 39fb855813cddef4be40116fbbcead90d96f7db8 Mon Sep 17 00:00:00 2001 From: RedWilly Date: Sun, 15 Dec 2024 20:56:25 +0000 Subject: [PATCH 735/787] Added Bondle.xyz tvl (#12714) --- projects/bondle/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/bondle/index.js diff --git a/projects/bondle/index.js b/projects/bondle/index.js new file mode 100644 index 000000000000..58f89b808e4b --- /dev/null +++ b/projects/bondle/index.js @@ -0,0 +1,17 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); +const coreAssets = require("../helper/coreAssets.json"); + +const routers = [ + "0x9272ddC213739Dad3B499C2C1245ff4A2cDe313A", + "0xc4d1a89d5BCC5A13c59fe2f3820E20B4f5d3095e", + "0x97b962Ab399beBF439a4a303d9754e79d6925EDa" +]; + + +const tokens = [coreAssets.null]; + +module.exports = { + shibarium: { + tvl: sumTokensExport({ owners: routers, tokens }) + }, +}; \ No newline at end of file From c56a78fcbadca330ab617e1ffb3af4f9a3b637c8 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:54:29 +0800 Subject: [PATCH 736/787] Add assets for Opus (#12720) --- projects/opus/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/opus/index.js b/projects/opus/index.js index 5f101278cf20..56c6c5c5e6f7 100644 --- a/projects/opus/index.js +++ b/projects/opus/index.js @@ -7,6 +7,8 @@ const tokensAndOwners = [ [ADDRESSES.starknet.STRK, "0x031a96fe18fe3fdab28822c82c81471f1802800723c8f3e209f1d9da53bc637d"], [ADDRESSES.starknet.WBTC, "0x05bc1c8a78667fac3bf9617903dbf2c1bfe3937e1d37ada3d8b86bf70fb7926e"], [ADDRESSES.starknet.WSTETH, "0x02d1e95661e7726022071c06a95cdae092595954096c373cde24a34bb3984cbf"], + [ADDRESSES.starknet.XSTRK, "0x04a3e7dffd8e74a706be9abe6474e07fbbcf41e1be71387514c4977d54dbc428"], + [ADDRESSES.starknet.SSTRK, "0x03b709f3ab9bc072a195b907fb2c27688723b6e4abb812a8941def819f929bd8"], // Transmuters [ADDRESSES.starknet.USDC, "0x03878595db449e1af7de4fb0c99ddb01cac5f23f9eb921254f4b0723a64a23cb"], ] From 5183d3152dd9d0d978dbaa7c90d7bd1a8fed6f30 Mon Sep 17 00:00:00 2001 From: santino <83203265+santinoYoung@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:55:45 +0800 Subject: [PATCH 737/787] update desyn api (#12717) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/desyn-farm/helper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/desyn-farm/helper.js b/projects/desyn-farm/helper.js index 984c4b6fc794..b123d9ce590e 100644 --- a/projects/desyn-farm/helper.js +++ b/projects/desyn-farm/helper.js @@ -6,6 +6,7 @@ const abi = { getBalance: "function getBalance(address) view returns (uint256)" } + async function getInfoListPool(strategy_type, chain) { const data = await getConfig('desyn/' + strategy_type, `https://raw.githubusercontent.com/Meta-DesynLab/strategy-asset/refs/heads/main/main/${strategy_type}.json`) return data.config[chain]?.safePools From 01a53a239b97ba2423adc59373f461b077a7be9d Mon Sep 17 00:00:00 2001 From: tanglenaut87 <90203390+tanglenaut87@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:06:16 +0100 Subject: [PATCH 738/787] New DEX: Metropolis Exchange (& new chain: Sonic) (#12715) Co-authored-by: tanglenaut <> Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/env.js | 2 ++ projects/helper/tokenMapping.js | 3 +++ projects/metropolis-exchange-amm/index.js | 5 +++++ projects/metropolis-exchange-dlmm/index.js | 5 +++++ 5 files changed, 16 insertions(+) create mode 100644 projects/metropolis-exchange-amm/index.js create mode 100644 projects/metropolis-exchange-dlmm/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index f3569d8435a9..81a6e959c201 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -300,6 +300,7 @@ "solana", "sommelier", "songbird", + "sonic", "sora", "stacks", "stafi", diff --git a/projects/helper/env.js b/projects/helper/env.js index 9d1fd35aa66f..45586acb2577 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -25,6 +25,8 @@ const DEFAULTS = { MATCHAIN_RPC_MULTICALL: "0xDa91510Bd8c50bfa54FC2BE2dD6dAbE03eA8496c", SHAPE_RPC:'https://mainnet.shape.network', SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", + SONIC_RPC: "https://rpc.soniclabs.com", + SONIC_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", APECHAIN_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", MORPH_RPC_MULTICALL: "0x33A213b1049D5AD2eeE6e61dAe040955e60383D4", WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 1515d90d1535..4dcb089a9e84 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -38,6 +38,9 @@ const ibcMappings = { } const fixBalancesTokens = { + sonic: { + '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38': { coingeckoId: "fantom", decimals: 18 }, + }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain diff --git a/projects/metropolis-exchange-amm/index.js b/projects/metropolis-exchange-amm/index.js new file mode 100644 index 000000000000..fc730ab69c11 --- /dev/null +++ b/projects/metropolis-exchange-amm/index.js @@ -0,0 +1,5 @@ +const { uniTvlExports } = require('../helper/unknownTokens'); + +module.exports = uniTvlExports({ + sonic: '0x1570300e9cFEC66c9Fb0C8bc14366C86EB170Ad0', +}) diff --git a/projects/metropolis-exchange-dlmm/index.js b/projects/metropolis-exchange-dlmm/index.js new file mode 100644 index 000000000000..32d2b584c8d7 --- /dev/null +++ b/projects/metropolis-exchange-dlmm/index.js @@ -0,0 +1,5 @@ +const { joeV2Export } = require('../helper/traderJoeV2') + +module.exports = joeV2Export({ + sonic: '0x39D966c1BaFe7D3F1F53dA4845805E15f7D6EE43' +}) From 8acd3975086f931ceff5805bc8013b3c443d64df Mon Sep 17 00:00:00 2001 From: RedVeil <44397805+RedVeil@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:19:55 +0100 Subject: [PATCH 739/787] VaultCraft/Popcorn - point to updated vault list (#12722) --- projects/popcorn/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/popcorn/index.js b/projects/popcorn/index.js index acc9a0e21b7b..8bc74146b8dc 100644 --- a/projects/popcorn/index.js +++ b/projects/popcorn/index.js @@ -16,16 +16,19 @@ const fraxLockVaultsNotRegistered = [ "0x1F0a3bF1e4Ea8f27449AFa0a3A27eFc3817431fc", "0xDc5Ed7b972710594082479AF498B1dA02d03a273", ]; + async function tvl(api) { let balances = {}; - const data = await getConfig('popcorn/' + api.chain, `https://raw.githubusercontent.com/Popcorn-Limited/defi-db/main/archive/vaults/${api.getChainId()}.json`); + const data = await getConfig('popcorn/' + api.chain, `https://raw.githubusercontent.com/Popcorn-Limited/defi-db/main/vaults/${api.getChainId()}.json`); let vaultAddresses = Object.keys(data); + if (api.chain === "arbitrum") { let fraxLockVaults = await api.call({ target: "0x25172C73958064f9ABc757ffc63EB859D7dc2219", abi: getVaultsAbi }); fraxLockVaults = fraxLockVaults.concat(fraxLockVaultsNotRegistered); vaultAddresses = vaultAddresses.filter((address) => !fraxLockVaults.includes(address)); await addFraxVaultToTVL(balances, api); } + const assets = await api.multiCall({ abi: getAssetAbi, calls: vaultAddresses, }); const totalAssets = await api.multiCall({ abi: getTotalAssets, calls: vaultAddresses, }); From 269d0e76d03e43514570f0806fce649dc6ea7bc0 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:20:24 +0100 Subject: [PATCH 740/787] update sdk version --- package-lock.json | 6 +++--- projects/helper/env.js | 19 ------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5b6ddb351cea..e780464a8e57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1009,9 +1009,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.101", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.101.tgz", - "integrity": "sha512-mlZsTA9dxIDn/VG2qKq6q9BbIikb5UWL7WSI71JNRNDJ0RE/bHiRvpU0gjtgEb6svt5pV5jRsWONjcSPOWcljg==", + "version": "5.0.102", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.102.tgz", + "integrity": "sha512-S+MX9SL02E2IwgpviKIbxEtYjlUkGu8m57e7CjTbRtdyBrGbu1JhsvRCtuKm9Wz+bylX4I7jYbTC2fFdz/vvLg==", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@elastic/elasticsearch": "^8.13.1", diff --git a/projects/helper/env.js b/projects/helper/env.js index 45586acb2577..23c7da1cb961 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -15,29 +15,10 @@ const DEFAULTS = { SUI_RPC: 'https://fullnode.mainnet.sui.io/', SUI_GRAPH_RPC: 'https://sui-mainnet.mystenlabs.com/graphql', FLOW_RPC: 'https://rest-mainnet.onflow.org', - FLOW_EVM_RPC: 'https://mainnet.evm.nodes.onflow.org', MULTIVERSX_RPC: 'https://api.multiversx.com', ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", - IDEX_RPC: "https://xchain-rpc.idex.io", - ETN_RPC: "https://rpc.ankr.com/electroneum", - MATCHAIN_RPC: "https://rpc.matchscan.io,https://rpc.matchain.io", - MATCHAIN_RPC_MULTICALL: "0xDa91510Bd8c50bfa54FC2BE2dD6dAbE03eA8496c", - SHAPE_RPC:'https://mainnet.shape.network', - SHAPE_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", - SONIC_RPC: "https://rpc.soniclabs.com", - SONIC_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", - APECHAIN_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", - MORPH_RPC_MULTICALL: "0x33A213b1049D5AD2eeE6e61dAe040955e60383D4", - WC_RPC: "https://worldchain-mainnet.g.alchemy.com/public", - APECHAIN_RPC: "https://rpc.apechain.com", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", - UNIT0_RPC: "https://rpc.unit0.dev", - RBN_RPC: "https://governors.mainnet.redbelly.network", - CORN_RPC: "https://rpc.ankr.com/corn_maizenet", - ACE_RPC_MULTICALL: "0x025A2B4fCE1E0bD736D5cebe6C8a52229795376B", - ZILLIQA_RPC_MULTICALL: "0x38899efb93d5106d3adb86662c557f237f6ecf57", - VINU_RPC_MULTICALL: "0x63CE2062281fb85fE5BC407799A455C21f35F355", } const ENV_KEYS = [ From 087e6ed20e73de70f16b1d692cba1ed5d6ce05a6 Mon Sep 17 00:00:00 2001 From: help_me_up <93499348+jaejeonglee@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:22:56 +0900 Subject: [PATCH 741/787] feat: new feature on goldstation (#12721) Co-authored-by: Booyoun --- projects/goldstation-dex/index.js | 12 +++++++++++- projects/goldstation-rwa/index.js | 8 +++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/projects/goldstation-dex/index.js b/projects/goldstation-dex/index.js index 7a965859b339..4540d2a5aabb 100644 --- a/projects/goldstation-dex/index.js +++ b/projects/goldstation-dex/index.js @@ -1,5 +1,6 @@ const { getUniTVL } = require('../helper/unknownTokens'); const { sumTokensExport } = require('../helper/unwrapLPs'); +const { uniV3Export } = require("../helper/uniswapV3"); module.exports = { misrepresentedTokens: true, @@ -8,6 +9,15 @@ module.exports = { staking: sumTokensExport({ tokensAndOwners: [ ['0x4836cc1f355bb2a61c210eaa0cd3f729160cd95e', '0x4d55B04AC52b2CA41ad04337FF13CbAefbdC8954'], ]}) - } + }, + avax: { + tvl: uniV3Export({ + avax: { + factory: "0xF72f4652785a5186EDF7b93a9cfd246FeFc0ef5c", + fromBlock: 52760680, + isAlgebra: false, + }, + }), + }, } diff --git a/projects/goldstation-rwa/index.js b/projects/goldstation-rwa/index.js index ba828d7a0344..9bdf133e7470 100644 --- a/projects/goldstation-rwa/index.js +++ b/projects/goldstation-rwa/index.js @@ -6,7 +6,13 @@ async function tvl(api) { const supply = await api.call({ abi: 'erc20:totalSupply', target: GPC }) api.add(GPC, supply) - const lps = ['0xCd13CD31fb61345Abe7B7376A4664784622817EE'] + const lps = [ + '0xCd13CD31fb61345Abe7B7376A4664784622817EE', + '0xF1294AA9CF51fB138CB30324D2A7CE5c53DD6876', + '0xD8219DeE0BEf8f8CE618572A572f87ea27Ac8285', + '0xB5E70F160077163A2D90F4828Ef2EfF7e5F57915', + '0xf2426f8b8cb0352fd03319300b6d4d6837915d45' + ] return sumUnknownTokens({ api, lps, useDefaultCoreAssets: true }) } From 946107714d9850717d0ace21d2c41f8da51b0cca Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:47:14 +0000 Subject: [PATCH 742/787] add ethena (#12723) --- projects/ethena-usdtb/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/ethena-usdtb/index.js diff --git a/projects/ethena-usdtb/index.js b/projects/ethena-usdtb/index.js new file mode 100644 index 000000000000..700a3d514ac7 --- /dev/null +++ b/projects/ethena-usdtb/index.js @@ -0,0 +1,10 @@ +const USDtb = "0xc139190f447e929f090edeb554d95abb8b18ac1c" + +module.exports = { + ethereum: { + tvl: async (api) => { + const supply = await api.call({ abi: 'erc20:totalSupply', target: USDtb }) + api.add(USDtb, supply) + }, + } +} From c0b46529db2f667485d4acec38c78beb51c2b674 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:51:21 +0100 Subject: [PATCH 743/787] update velar --- projects/velar-amm/api.js | 40 +++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/projects/velar-amm/api.js b/projects/velar-amm/api.js index 0357b39ec488..58e64eda5c74 100644 --- a/projects/velar-amm/api.js +++ b/projects/velar-amm/api.js @@ -1,29 +1,45 @@ +const { sumTokens } = require('../helper/chain/stacks') const { call } = require('../helper/chain/stacks-api') const { transformDexBalances } = require('../helper/portedTokens') const { sleep } = require('../helper/utils') const sdk = require('@defillama/sdk') const factory = 'SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.univ2-core' +const factory2 = 'SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.univ2-registry_v1_0_0' +const stableFactory = 'SP1Y5YSTAHZ88XYK1VPDH24GY0HPX5J4JECTMY4A1.curve-registry_v1_1_0' module.exports = { stacks: { tvl } } -async function tvl() { +async function tvl(api) { + await uniTvl(api, stableFactory, true) + await uniTvl(api, factory) + // await uniTvl(api, factory2) +} + + +async function uniTvl(api, factory, isStable = false) { const data = [] const pairCount = +(await call({ target: factory, abi: 'get-nr-pools' })).toString() for (let i = 1; i <= pairCount; i++) { - const { - token0, token1, reserve0, reserve1, - } = await call({ target: factory, abi: 'do-get-pool', inputArgs: [{ type: 'uint', value: i }] }) - data.push({ - token0: token0.value, - token1: token1.value, - token0Bal: reserve0.value, - token1Bal: reserve1.value, - }) + const res = await call({ target: factory, abi: 'do-get-pool', inputArgs: [{ type: 'uint', value: i }] }) + const { token0, token1, reserve0, reserve1, ...rest } = res + // console.log({ token0, token1, reserve0, reserve1, rest, pairCount }) + // console.log(rest['lp-token']?.value) + // console.log(res) + if (isStable) { + await sumTokens({ owner: rest.contract.value, balances: api.getBalances() }) + } + else + data.push({ + token0: token0.value, + token1: token1.value, + token0Bal: reserve0?.value, + token1Bal: reserve1?.value, + }) sdk.log(`velar-amm: ${i}/${pairCount}`) - await sleep(2100) + await sleep(1100) } - return transformDexBalances({ chain: 'stacks', data }) + return transformDexBalances({ chain: 'stacks', data, balances: api.getBalances() }) } \ No newline at end of file From 9941dd3b30e9f5246236b66c58d2cb8daefad0ac Mon Sep 17 00:00:00 2001 From: "harry(jimi)" <691742@gmail.com> Date: Mon, 16 Dec 2024 23:06:32 +0800 Subject: [PATCH 744/787] fix: delta-trade near tvl missing some tokens (#12725) --- projects/deltatrade.js | 33 ++++++++++++++------------------- projects/helper/chain/near.js | 3 +++ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/projects/deltatrade.js b/projects/deltatrade.js index 815fecee3301..784017fb2c06 100644 --- a/projects/deltatrade.js +++ b/projects/deltatrade.js @@ -1,4 +1,3 @@ -const ADDRESSES = require('./helper/coreAssets.json') const { sumTokens } = require('./helper/chain/near') const { getConfig } = require('./helper/cache') const { get } = require('./helper/http') @@ -12,34 +11,25 @@ const programId = new PublicKey('CNLGhYQgNwjyDfHZTEjHfk1MPkqwP96qZahWN82UfcLM'); const GRID_CONTRACT_ID = 'grid.deltatrade.near'; const DCA_CONTRACT_ID = 'dca.deltatrade.near'; -const tokens = [ - 'wrap.near', - '17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1', - 'token.v2.ref-finance.near', - ADDRESSES.near.BURROW, - 'token.lonkingnearbackto2024.near', - 'blackdragon.tkn.near', - 'ftv2.nekotoken.near', - 'gear.enleap.near', - 'token.0xshitzu.near', - 'edge-fast.near', - '802d89b6e511b335f05024a65161bce7efc3f311.factory.bridge.near', -] +const nearApi = 'https://api.deltatrade.ai'; +const solanaApi = 'https://solapi.deltatrade.ai'; + module.exports = { timetravel: false, near: { - tvl: () => sumTokens({ tokens, owners: [GRID_CONTRACT_ID, DCA_CONTRACT_ID] }), + tvl: nearTVL, }, solana: { tvl: solanaTvl, } } -async function getTokens() { - return getConfig('deltatrade/sol-pairs', undefined, { +async function getTokens(chain) { + return getConfig(`deltatrade/${chain}-pairs`, undefined, { fetcher: async () => { - const { data } = await get('https://solapi.deltatrade.ai/api/bot/grid/pairs'); + const url = `${chain === 'solana' ? solanaApi : nearApi}/api/bot/grid/pairs`; + const { data } = await get(url); const tokenSet = new Set() data.forEach(pair => { tokenSet.add(pair.base_token.code) @@ -52,6 +42,11 @@ async function getTokens() { }) } +async function nearTVL(){ + const tokens = await getTokens('near'); + return sumTokens({ tokens, owners: [GRID_CONTRACT_ID, DCA_CONTRACT_ID] }) +} + function getGlobalBalanceUser(token) { const [globalBalPda] = PublicKey.findProgramAddressSync([Buffer.from("global_balance_user"), state.toBuffer(), new PublicKey(token).toBuffer()], programId); @@ -61,7 +56,7 @@ function getGlobalBalanceUser(token) { } async function solanaTvl() { - const tokens = await getTokens(); + const tokens = await getTokens('solana'); const tokenAccounts = tokens.map(getGlobalBalanceUser) return sumTokens2({ tokenAccounts }) } diff --git a/projects/helper/chain/near.js b/projects/helper/chain/near.js index c79feedea24d..55e6d4137da1 100644 --- a/projects/helper/chain/near.js +++ b/projects/helper/chain/near.js @@ -51,6 +51,9 @@ const tokenMapping = { 'blackdragon.tkn.near': { name: 'black-dragon', decimals: 24 }, 'gear.enleap.near': { name: 'near-tinker-union-gear', decimals: 18 }, 'token.0xshitzu.near': { name: 'shitzu', decimals: 18 }, + 'purge-558.meme-cooking.near': { name: 'forgive-me-father', decimals: 18 }, + 'mpdao-token.near': { name: 'meta-pool-dao', decimals: 6 }, + 'kat.token0.near': { name: 'nearkat', decimals: 18 }, } async function view_account(account_id) { From b15bbba4dc581f3821ec355c2dd4558942c1392e Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Mon, 16 Dec 2024 16:12:46 +0000 Subject: [PATCH 745/787] add dai to spark borrows --- projects/spark-fi/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/projects/spark-fi/index.js b/projects/spark-fi/index.js index 62f009851217..1771aae1c121 100644 --- a/projects/spark-fi/index.js +++ b/projects/spark-fi/index.js @@ -1,8 +1,11 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { aaveExports } = require('../helper/aave'); +const { aaveExports, aaveChainTvl } = require('../helper/aave'); module.exports = { - ethereum: aaveExports('ethereum', '0x03cFa0C4622FF84E50E75062683F44c9587e6Cc1', undefined, ["0xFc21d6d146E6086B8359705C8b28512a983db0cb"], { v3: true, blacklistedTokens: [ADDRESSES.ethereum.DAI]}), + ethereum: { + tvl: aaveChainTvl('ethereum', '0x03cFa0C4622FF84E50E75062683F44c9587e6Cc1', undefined, ["0xFc21d6d146E6086B8359705C8b28512a983db0cb"], false, true, { blacklistedTokens: [ADDRESSES.ethereum.DAI] }), + borrowed: aaveChainTvl('ethereum', '0x03cFa0C4622FF84E50E75062683F44c9587e6Cc1', undefined, ["0xFc21d6d146E6086B8359705C8b28512a983db0cb"], true, true, {}) + }, xdai: aaveExports('xdai', '0xA98DaCB3fC964A6A0d2ce3B77294241585EAbA6d', undefined, ["0x2a002054A06546bB5a264D57A81347e23Af91D18"], { v3: true}) }; \ No newline at end of file From b0f13c9657a6514eda2fbdbd264c940d4d917911 Mon Sep 17 00:00:00 2001 From: Timepunk <45543880+0xTimepunk@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:17:03 +0000 Subject: [PATCH 746/787] feat: add halmark (#12726) --- projects/superform/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/projects/superform/index.js b/projects/superform/index.js index ddaa4146a2aa..5d0e489620f7 100644 --- a/projects/superform/index.js +++ b/projects/superform/index.js @@ -10,11 +10,11 @@ async function tvl(api) { const getSuperformRes = await api.multiCall({ abi: "function getSuperform(uint256) external view returns(address, uint32, uint64)", calls: forms, target: api.chainId === 250 ? fantom_factory_contract : factory_contract }) const super4626 = getSuperformRes.map(v => v[0]) const vaults = await api.multiCall({ abi: 'address:vault', calls: super4626 }) - + // Filter out blacklisted vaults const filteredVaults = vaults.filter(vault => !blacklisted_vaults.includes(vault.toLowerCase())); const filteredSuper4626 = super4626.filter((_, index) => !blacklisted_vaults.includes(vaults[index].toLowerCase())); - + const assets = await api.multiCall({ abi: 'address:asset', calls: filteredSuper4626 }) const vBals = await api.multiCall({ abi: "erc20:balanceOf", calls: filteredVaults.map((v, i) => ({ target: v, params: filteredSuper4626[i] })) }) const bals = await api.multiCall({ abi: "function previewRedeemFrom(uint256) external view returns(uint256)", calls: filteredSuper4626.map((v, i) => ({ target: v, params: vBals[i] })), permitFailure: true }) @@ -26,8 +26,9 @@ async function tvl(api) { module.exports = { methodology: "counts the TVL of each superform across all the supported networks", hallmarks: [ - [1707350400,"Early Access"], - [1715212800,"Open Launch"] + [1707350400, "Early Access"], + [1715212800, "Open Launch"], + [1734012000, "SuperVaults Launch"], ] }; From ff8e4f465b21724bc10126f5586898c5f380f5a4 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Mon, 16 Dec 2024 22:56:08 +0000 Subject: [PATCH 747/787] update from usdt to usdc for calculation --- projects/hyperliquid-perp/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hyperliquid-perp/index.js b/projects/hyperliquid-perp/index.js index 5c14aacaae99..4e7268de7f86 100644 --- a/projects/hyperliquid-perp/index.js +++ b/projects/hyperliquid-perp/index.js @@ -3,7 +3,7 @@ const { post } = require('../helper/http') async function tvl(api) { let data= await post('https://api.hyperliquid.xyz/info', {"type":"tvlBreakdown"}) data = data.find(i => i.protocol === "Hyperliquid Perps DEX") - data.tokens.forEach(i => api.addCGToken('tether', +i.usdcValue)) + data.tokens.forEach(i => api.addCGToken('usd-coin', +i.usdcValue)) } module.exports = { From b596885202863007f15d2a71508802a942fb664c Mon Sep 17 00:00:00 2001 From: Real Shaman <85087525+realdealshaman@users.noreply.github.com> Date: Tue, 17 Dec 2024 05:10:27 +0000 Subject: [PATCH 748/787] Update index.js add hallmarks --- projects/bluefin-amm/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/bluefin-amm/index.js b/projects/bluefin-amm/index.js index 47c79bb91426..0da5184623b6 100644 --- a/projects/bluefin-amm/index.js +++ b/projects/bluefin-amm/index.js @@ -13,7 +13,11 @@ async function suiTvl(api) { module.exports = { + hallmarks: [ + [1731974400, "Spot Launch"]. + [1733875200, "BLUE Token"] + ], sui: { tvl: suiTvl }, -} \ No newline at end of file +} From 468fab836f31f3aa120574993228642ef73581dd Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Tue, 17 Dec 2024 05:13:42 +0000 Subject: [PATCH 749/787] fix syntax --- projects/bluefin-amm/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/bluefin-amm/index.js b/projects/bluefin-amm/index.js index 0da5184623b6..a82891ef0c09 100644 --- a/projects/bluefin-amm/index.js +++ b/projects/bluefin-amm/index.js @@ -14,7 +14,7 @@ async function suiTvl(api) { module.exports = { hallmarks: [ - [1731974400, "Spot Launch"]. + [1731974400, "Spot Launch"], [1733875200, "BLUE Token"] ], sui: { From 6a0fa1b2664a29b7a5f22862ce279990fd4528f6 Mon Sep 17 00:00:00 2001 From: UtyabLabs <168716796+utyablabs@users.noreply.github.com> Date: Tue, 17 Dec 2024 08:59:00 +0100 Subject: [PATCH 750/787] Add UtyabSwap TVL (#12733) Co-authored-by: Tiqan Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chain/ton.js | 5 +- projects/helper/chain/utils/ton-address.js | 237 +++++++++++++++++++++ projects/utyabswap/index.js | 44 ++++ 3 files changed, 285 insertions(+), 1 deletion(-) create mode 100644 projects/helper/chain/utils/ton-address.js create mode 100644 projects/utyabswap/index.js diff --git a/projects/helper/chain/ton.js b/projects/helper/chain/ton.js index e606ac5b84a1..43a426622771 100644 --- a/projects/helper/chain/ton.js +++ b/projects/helper/chain/ton.js @@ -73,7 +73,7 @@ function sumTokensExport({ ...args }) { return (api) => sumTokens({ api, ...args }) } -async function call({ target, abi, params = [] }) { +async function call({ target, abi, params = [], rawStack = false, }) { const requestBody = { "address": target, "method": abi, @@ -87,6 +87,9 @@ async function call({ target, abi, params = [] }) { if (exit_code !== 0) { throw new Error('Expected a zero exit code, but got ' + exit_code) } + + if (rawStack) return stack + stack.forEach((i, idx) => { if (i[0] === 'num') { stack[idx] = parseInt(i[1], 16) diff --git a/projects/helper/chain/utils/ton-address.js b/projects/helper/chain/utils/ton-address.js new file mode 100644 index 000000000000..62720d6da491 --- /dev/null +++ b/projects/helper/chain/utils/ton-address.js @@ -0,0 +1,237 @@ +const bounceable_tag = 0x11; +const non_bounceable_tag = 0x51; +const test_flag = 0x80; + +function crc16(data) { + const poly = 0x1021; + let reg = 0; + const message = Buffer.alloc(data.length + 2); + message.set(data); + for (let byte of message) { + let mask = 0x80; + while (mask > 0) { + reg <<= 1; + if (byte & mask) { + reg += 1; + } + mask >>= 1; + if (reg > 0xffff) { + reg &= 0xffff; + reg ^= poly; + } + } + } + return Buffer.from([Math.floor(reg / 256), reg % 256]); +} + +function parseFriendlyAddress(src) { + if (typeof src === "string" && !Address.isFriendly(src)) { + throw new Error("Unknown address type"); + } + const data = Buffer.isBuffer(src) ? src : Buffer.from(src, "base64"); + // 1byte tag + 1byte workchain + 32 bytes hash + 2 byte crc + if (data.length !== 36) { + throw new Error("Unknown address type: byte length is not equal to 36"); + } + // Prepare data + const addr = data.subarray(0, 34); + const crc = data.subarray(34, 36); + const calcedCrc = (0, crc16)(addr); + if (!(calcedCrc[0] === crc[0] && calcedCrc[1] === crc[1])) { + throw new Error("Invalid checksum: " + src); + } + // Parse tag + let tag = addr[0]; + let isTestOnly = false; + let isBounceable = false; + if (tag & test_flag) { + isTestOnly = true; + tag = tag ^ test_flag; + } + if (tag !== bounceable_tag && tag !== non_bounceable_tag) + throw "Unknown address tag"; + isBounceable = tag === bounceable_tag; + let workchain = null; + if (addr[1] === 0xff) { + // TODO we should read signed integer here + workchain = -1; + } else { + workchain = addr[1]; + } + const hashPart = addr.subarray(2, 34); + return { isTestOnly, isBounceable, workchain, hashPart }; +} +class Address { + static isAddress(src) { + return src instanceof Address; + } + static isFriendly(source) { + // Check length + if (source.length !== 48) { + return false; + } + // Check if address is valid base64 + if (!/[A-Za-z0-9+/_-]+/.test(source)) { + return false; + } + return true; + } + static isRaw(source) { + // Check if has delimiter + if (source.indexOf(":") === -1) { + return false; + } + let [wc, hash] = source.split(":"); + // wc is not valid + if (!Number.isInteger(parseFloat(wc))) { + return false; + } + // hash is not valid + if (!/[a-f0-9]+/.test(hash.toLowerCase())) { + return false; + } + // has is not correct + if (hash.length !== 64) { + return false; + } + return true; + } + static normalize(source) { + if (typeof source === "string") { + return Address.parse(source).toString(); + } else { + return source.toString(); + } + } + static parse(source) { + if (Address.isFriendly(source)) { + return this.parseFriendly(source).address; + } else if (Address.isRaw(source)) { + return this.parseRaw(source); + } else { + throw new Error("Unknown address type: " + source); + } + } + static parseRaw(source) { + let workChain = parseInt(source.split(":")[0]); + let hash = Buffer.from(source.split(":")[1], "hex"); + return new Address(workChain, hash); + } + static parseFriendly(source) { + if (Buffer.isBuffer(source)) { + let r = parseFriendlyAddress(source); + return { + isBounceable: r.isBounceable, + isTestOnly: r.isTestOnly, + address: new Address(r.workchain, r.hashPart), + }; + } else { + let addr = source.replace(/\-/g, "+").replace(/_/g, "/"); // Convert from url-friendly to true base64 + let r = parseFriendlyAddress(addr); + return { + isBounceable: r.isBounceable, + isTestOnly: r.isTestOnly, + address: new Address(r.workchain, r.hashPart), + }; + } + } + constructor(workChain, hash) { + this.toRawString = () => { + return this.workChain + ":" + this.hash.toString("hex"); + }; + this.toRaw = () => { + const addressWithChecksum = Buffer.alloc(36); + addressWithChecksum.set(this.hash); + addressWithChecksum.set( + [ + this.workChain, + this.workChain, + this.workChain, + this.workChain, + ], + 32 + ); + return addressWithChecksum; + }; + this.toStringBuffer = (args) => { + let testOnly = + args && args.testOnly !== undefined ? args.testOnly : false; + let bounceable = + args && args.bounceable !== undefined ? args.bounceable : true; + let tag = bounceable ? bounceable_tag : non_bounceable_tag; + if (testOnly) { + tag |= test_flag; + } + const addr = Buffer.alloc(34); + addr[0] = tag; + addr[1] = this.workChain; + addr.set(this.hash, 2); + const addressWithChecksum = Buffer.alloc(36); + addressWithChecksum.set(addr); + addressWithChecksum.set((0, crc16)(addr), 34); + return addressWithChecksum; + }; + this.toString = (args) => { + let urlSafe = + args && args.urlSafe !== undefined ? args.urlSafe : true; + let buffer = this.toStringBuffer(args); + if (urlSafe) { + return buffer + .toString("base64") + .replace(/\+/g, "-") + .replace(/\//g, "_"); + } else { + return buffer.toString("base64"); + } + }; + if (hash.length !== 32) { + throw new Error("Invalid address hash length: " + hash.length); + } + this.workChain = workChain; + this.hash = hash; + Object.freeze(this); + } + equals(src) { + if (src.workChain !== this.workChain) { + return false; + } + return src.hash.equals(this.hash); + } +} + +const addressToInt = (address) => { + return BigInt(`0x${address.toRawString().replace("0:", "")}`); +}; + +const intTo256BitHex = (n) => { + // Convert the BigInt to a hexadecimal string + const hex = n.toString(16); + // Pad with leading zeros to ensure it is 64 characters (256 bits) + return hex.padStart(64, "0"); +}; + +const convertIntToAddress = (uint) => { + const addressString = `0:${intTo256BitHex(uint)}`; + return Address.parseRaw(addressString); +}; + +const compareAddress = (a, b) => { + if (!a || !b) { + return false; + } + + try { + const parsedA = typeof a === "string" ? Address.parse(a) : a; + const parsedB = typeof b === "string" ? Address.parse(b) : b; + + return parsedA.equals(parsedB); + } catch { + return false; + } +}; + +module.exports = { + addressToInt, + convertIntToAddress, + compareAddress, +}; \ No newline at end of file diff --git a/projects/utyabswap/index.js b/projects/utyabswap/index.js new file mode 100644 index 000000000000..1f0d46403c1c --- /dev/null +++ b/projects/utyabswap/index.js @@ -0,0 +1,44 @@ +const { getConfig } = require("../helper/cache"); +const { call } = require("../helper/chain/ton"); +const { transformDexBalances } = require("../helper/portedTokens"); +const { convertIntToAddress, } = require("../helper/chain/utils/ton-address"); +const { PromisePool } = require("@supercharge/promise-pool"); +const { sleep } = require("../helper/utils"); + +module.exports = { + misrepresentedTokens: true, + timetravel: false, + ton: { + tvl: async () => { + const pools = await getConfig('utyabswap', "https://api.utyabswap.com/v1/pools"); + const getPoolData = async (pool) => { + const data = await call({ target: pool.address, abi: "get_assets_full", rawStack: true, }); + + data.shift().pop(); + const asset0AddressInt = data.shift().pop(); + const asset0Address = convertIntToAddress(BigInt(asset0AddressInt)).toString() + const asset0Reserve = Number(data.shift().pop()) + + data.shift().pop(); + const asset1AddressInt = data.shift().pop(); + const asset1Address = convertIntToAddress(BigInt(asset1AddressInt)).toString() + const asset1Reserve = Number(data.shift().pop()) + + await sleep(1000 * (2 * Math.random() + 2)) + + return { + token0: asset0Address, + token1: asset1Address, + token0Bal: asset0Reserve, + token1Bal: asset1Reserve, + } + } + + const { results: data, errors } = await PromisePool.withConcurrency(2).for(pools).process(getPoolData); + + if (errors && errors.length) throw errors[0]; + + return transformDexBalances({ chain: "ton", data, }); + }, + }, +}; From e27e26241a2f1f469e638b2c77311a805115422d Mon Sep 17 00:00:00 2001 From: Cassian <164681176+cassianvalor@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:59:20 +0300 Subject: [PATCH 751/787] track opengpu tvl/staking (#12732) Co-authored-by: cassianvalor --- projects/opengpu/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/opengpu/index.js diff --git a/projects/opengpu/index.js b/projects/opengpu/index.js new file mode 100644 index 000000000000..e60c3d05f47f --- /dev/null +++ b/projects/opengpu/index.js @@ -0,0 +1,20 @@ +const { staking } = require('../helper/staking'); +const { sumTokensExport } = require("../helper/unwrapLPs"); +const coreAssets = require("../helper/coreAssets.json"); + +const CONTRACTS = [ + '0x3C9634620A626b7e9a3fB74A8f800d67cdaF2A5B', + '0x695a9c59cd823cbb2cd8331a835d1eb7982b170a' +]; + +const oGPU = '0x067Def80D66fB69C276e53b641f37ff7525162f6'; + +module.exports = { + ethereum: { + tvl: sumTokensExport({ + owners: CONTRACTS, + token: coreAssets.null + }), + staking: staking(CONTRACTS, oGPU), + }, +}; \ No newline at end of file From de6c8e2dfcec9ba00e8c002e51ca4f5828562d2d Mon Sep 17 00:00:00 2001 From: SboomFi Date: Tue, 17 Dec 2024 15:10:46 +0700 Subject: [PATCH 752/787] add-sonic (#12729) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/tokenMapping.js | 1 + projects/sboomfi/index.js | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 projects/sboomfi/index.js diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 4dcb089a9e84..c392aa4e9262 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -40,6 +40,7 @@ const ibcMappings = { const fixBalancesTokens = { sonic: { '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38': { coingeckoId: "fantom", decimals: 18 }, + '0x832497895f05100e53f42dfa8fc758b4866b183a': { coingeckoId: "fantom", decimals: 18 }, }, // Sample Code ozone: { diff --git a/projects/sboomfi/index.js b/projects/sboomfi/index.js new file mode 100644 index 000000000000..08f900278860 --- /dev/null +++ b/projects/sboomfi/index.js @@ -0,0 +1,4 @@ +const { uniTvlExports } = require('../helper/unknownTokens') +module.exports = uniTvlExports({ + sonic: '0x3638Ca700D67D560Be2A2d0DD471640957564829' +}) \ No newline at end of file From 1148127302f92524ead88fa2a6525c337714813a Mon Sep 17 00:00:00 2001 From: TsimakuridzeNikolozi <100114440+TsimakuridzeNikolozi@users.noreply.github.com> Date: Tue, 17 Dec 2024 12:11:03 +0400 Subject: [PATCH 753/787] Added hETHWETH Gauge Token to Hinkal Token registry (#12730) --- projects/hinkal/registryTokens.js | 1 + projects/hinkal/registryTokensWithUnderlyingAddresses.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/projects/hinkal/registryTokens.js b/projects/hinkal/registryTokens.js index 18f49e9743e8..11eb4ad25d0f 100644 --- a/projects/hinkal/registryTokens.js +++ b/projects/hinkal/registryTokens.js @@ -255,6 +255,7 @@ const ETHEREUM_REGISTRY_TOKENS = [ "0x35d8949372d46b7a3d5a56006ae77b215fc69bc0", "0x1f7e9321ce32af1f9ea1185fd10d31fea31ffd95", "0x270B7748CdF8243bFe68FaCE7230ef0fCE695389", + "0x8B2098043Cea715A18E81CC0A6a9d202Cf279014", ]; const ARBITRUM_REGISTRY_TOKENS = [ diff --git a/projects/hinkal/registryTokensWithUnderlyingAddresses.js b/projects/hinkal/registryTokensWithUnderlyingAddresses.js index baf20579c0a4..f8b4bb45aa6e 100644 --- a/projects/hinkal/registryTokensWithUnderlyingAddresses.js +++ b/projects/hinkal/registryTokensWithUnderlyingAddresses.js @@ -88,6 +88,8 @@ const ETHEREUM_REGISTRY_TOKENS_WITH_UNDERLYING_ADDRESSES = { ADDRESSES.ethereum.USDT, "0x028171bCA77440897B824Ca71D1c56caC55b68A3": ADDRESSES.ethereum.DAI, + "0x8B2098043Cea715A18E81CC0A6a9d202Cf279014": + "0x1f7e9321ce32af1f9ea1185fd10d31fea31ffd95", }; const ARBITRUM_REGISTRY_TOKENS_WITH_UNDERLYING_ADDRESSES = { From 594019069b51c86f73b475e2407855e33c15d03d Mon Sep 17 00:00:00 2001 From: Zorag44 <75122924+Zorag44@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:43:22 +0530 Subject: [PATCH 754/787] stSUI: Liquid staking protocol by AlphaFi (#12728) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/alphafi-stsui/index.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 projects/alphafi-stsui/index.js diff --git a/projects/alphafi-stsui/index.js b/projects/alphafi-stsui/index.js new file mode 100644 index 000000000000..945514b6a7cd --- /dev/null +++ b/projects/alphafi-stsui/index.js @@ -0,0 +1,16 @@ +const sui = require('../helper/chain/sui') + +async function tvl() { + const pool = await sui.getObject('0x1adb343ab351458e151bc392fbf1558b3332467f23bda45ae67cd355a57fd5f5'); + const suiAmount = pool.fields.storage.fields.total_sui_supply / 10 ** 9 + return { + sui: suiAmount, + } +} + +module.exports = { + methodology: "Calculates the amount of SUI staked in stSui liquid staking contracts.", + sui: { + tvl, + } +} From 950b2d1fd0da10b6a505c0367e9dd26c79d3183e Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:20:13 +0100 Subject: [PATCH 755/787] beetx: Add support for Sonic and refactor code (#12734) Co-authored-by: franz --- projects/beethovenx-sftmx/index.js | 34 ++++++++++++++++++------------ projects/beethovenx/index.js | 3 +++ projects/helper/tokenMapping.js | 1 + 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/projects/beethovenx-sftmx/index.js b/projects/beethovenx-sftmx/index.js index 9d02242bdb63..d48f8736a671 100644 --- a/projects/beethovenx-sftmx/index.js +++ b/projects/beethovenx-sftmx/index.js @@ -1,17 +1,23 @@ -const ADDRESSES = require("../helper/coreAssets.json"); -const liquidStakingContract = "0xB458BfC855ab504a8a327720FcEF98886065529b"; - -async function tvl(api) { - const supply = await api.call({ - abi: "uint256:totalFTMWorth", - target: liquidStakingContract, - }); - api.add(ADDRESSES.null, supply); -} +const { sumTokens2 } = require("../helper/unwrapLPs"); module.exports = { - methodology: "Retrieve the total underlying FTM supply", - fantom: { - tvl, - }, + methodology: "Retrieve the total underlying FTM/sonic supply", }; + + +const config = { + fantom: '0xB458BfC855ab504a8a327720FcEF98886065529b', + sonic: '0xe5da20f15420ad15de0fa650600afc998bbe3955', +} + +Object.keys(config).forEach(chain => { + const liquidStakingContract = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const abi = chain === 'fantom' ? 'totalFTMWorth' : 'totalAssets' + const supply = await api.call({ abi: "uint256:" + abi, target: liquidStakingContract, }); + api.addGasToken(supply) + return sumTokens2({ api }) + } + } +}) \ No newline at end of file diff --git a/projects/beethovenx/index.js b/projects/beethovenx/index.js index 4866706c1dba..c3763a50fcc9 100644 --- a/projects/beethovenx/index.js +++ b/projects/beethovenx/index.js @@ -7,4 +7,7 @@ module.exports = { optimism: { tvl: onChainTvl('0xBA12222222228d8Ba445958a75a0704d566BF2C8', 7003431), }, + sonic: { + tvl: onChainTvl('0xBA12222222228d8Ba445958a75a0704d566BF2C8', 368312), + }, }; diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index c392aa4e9262..1858351b73ee 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -39,6 +39,7 @@ const ibcMappings = { const fixBalancesTokens = { sonic: { + [ADDRESSES.null]: { coingeckoId: "fantom", decimals: 18 }, '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38': { coingeckoId: "fantom", decimals: 18 }, '0x832497895f05100e53f42dfa8fc758b4866b183a': { coingeckoId: "fantom", decimals: 18 }, }, From e03d17f65f8774ce9e17611ca717b1cbeaea2279 Mon Sep 17 00:00:00 2001 From: MishaShWoof Date: Tue, 17 Dec 2024 11:47:15 +0200 Subject: [PATCH 756/787] feat: add new comet (#12736) From cbe250c7a8c735d6b1d3b964d459d27b4f0470ee Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 17 Dec 2024 11:10:30 +0100 Subject: [PATCH 757/787] migrate token mapping --- projects/helper/coreAssets.json | 10 ++++++++++ projects/helper/tokenMapping.js | 11 ----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 1542216f88e8..be3f826f7e3f 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -2076,5 +2076,15 @@ }, "corn": { "BTCN": "0xda5ddd7270381a7c2717ad10d1c0ecb19e3cdfb2" + }, + "sonic": { + "wS": "0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38", + "WS_1": "0x832497895f05100e53f42dfa8fc758b4866b183a" + }, + "vinu": { + "USDT": "0xC0264277fcCa5FCfabd41a8bC01c1FcAF8383E41", + "ETH": "0xDd4b9b3Ce03faAbA4a3839c8B5023b7792be6e2C", + "VINU": "0x00c1E515EA9579856304198EFb15f525A0bb50f6", + "WVC": "0xEd8c5530a0A086a12f57275728128a60DFf04230" } } \ No newline at end of file diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 1858351b73ee..970173165969 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -38,11 +38,6 @@ const ibcMappings = { } const fixBalancesTokens = { - sonic: { - [ADDRESSES.null]: { coingeckoId: "fantom", decimals: 18 }, - '0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38': { coingeckoId: "fantom", decimals: 18 }, - '0x832497895f05100e53f42dfa8fc758b4866b183a': { coingeckoId: "fantom", decimals: 18 }, - }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain @@ -50,12 +45,6 @@ const fixBalancesTokens = { apechain: { [ADDRESSES.null]: { coingeckoId: "apecoin", decimals: 18 }, }, - vinu: { - '0xC0264277fcCa5FCfabd41a8bC01c1FcAF8383E41': { coingeckoId: "tether", decimals: 6 }, - '0xDd4b9b3Ce03faAbA4a3839c8B5023b7792be6e2C': { coingeckoId: "ethereum", decimals: 18}, - '0x00c1E515EA9579856304198EFb15f525A0bb50f6': { coingeckoId: "vita-inu", decimals: 18}, - '0xEd8c5530a0A086a12f57275728128a60DFf04230': { coingeckoId: "vinuchain", decimals: 18}, - }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 6e54896120a30b5ea863bc950857d1b703ddcc55 Mon Sep 17 00:00:00 2001 From: Marc Puig Date: Tue, 17 Dec 2024 12:16:45 +0100 Subject: [PATCH 758/787] Add address to pStake BTC (#12737) --- projects/helper/bitcoin-book/pstake-btc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/helper/bitcoin-book/pstake-btc.js b/projects/helper/bitcoin-book/pstake-btc.js index 86a053a920e0..ae061728a9a9 100644 --- a/projects/helper/bitcoin-book/pstake-btc.js +++ b/projects/helper/bitcoin-book/pstake-btc.js @@ -1,3 +1,3 @@ module.exports = [ - "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d", "bc1pzq0ve6e7j6jt4ckx8uzdjyddrfda9ew8dxvrjmkxmfnj9yz68zeqgqh9cl", "bc1pjp9pg0d6wcejlg576st4s8d424zx443mdumdhvjcxx5ehnfk4xcqyru7ay", "bc1px92pntcj0wd5076nnymp787a7qczsaauuefgntxngdwvkd584xgsaagem2", "bc1pxhkczd3jq9nq50p2xll99edhxlx5dj6ztgw5pgtzszjtlvg7tl4s8ttf04" + "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d", "bc1pzq0ve6e7j6jt4ckx8uzdjyddrfda9ew8dxvrjmkxmfnj9yz68zeqgqh9cl", "bc1pjp9pg0d6wcejlg576st4s8d424zx443mdumdhvjcxx5ehnfk4xcqyru7ay", "bc1px92pntcj0wd5076nnymp787a7qczsaauuefgntxngdwvkd584xgsaagem2", "bc1pxhkczd3jq9nq50p2xll99edhxlx5dj6ztgw5pgtzszjtlvg7tl4s8ttf04", "bc1pxhe0dvtg7q06st7n7k0s6235ed4dhhawhhewpz7f4a0dmcrch09q2shl8y" ] \ No newline at end of file From 519da131d18749ef26e72534fe8e1116323a0e46 Mon Sep 17 00:00:00 2001 From: KovacZan Date: Tue, 17 Dec 2024 13:55:24 +0100 Subject: [PATCH 759/787] feat: Add neby-dex uniswap v3 dex (#12738) --- projects/neby-dex/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/neby-dex/index.js diff --git a/projects/neby-dex/index.js b/projects/neby-dex/index.js new file mode 100644 index 000000000000..4aa7efb3139b --- /dev/null +++ b/projects/neby-dex/index.js @@ -0,0 +1,9 @@ +const { uniV3GraphExport } = require("../helper/uniswapV3"); + +module.exports = { + sapphire: { + tvl: uniV3GraphExport({ + name: 'Neby Dex', graphURL: 'https://api.goldsky.com/api/public/project_clzi4lu67khgw01072ibvekvt/subgraphs/neby-dex-sapphire-mainnet/1.0.0/gn' + }), + } +} From ba27ba00f591bdfe96600d3a21a122ab97a946ff Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:03:59 +0000 Subject: [PATCH 760/787] phemex more wallets (#12740) --- projects/phemex/index.js | 74 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/projects/phemex/index.js b/projects/phemex/index.js index 3bb13492a33a..c5f73f5b1c83 100644 --- a/projects/phemex/index.js +++ b/projects/phemex/index.js @@ -7,7 +7,79 @@ const config = { }, ethereum: { owners: [ - '0xf7D13C7dBec85ff86Ee815f6dCbb3DEDAc78ca49' + '0xf7D13C7dBec85ff86Ee815f6dCbb3DEDAc78ca49', + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + bsc: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + base: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + avax: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + fantom: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + arbitrum: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + optimism: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + polygon: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + era: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + linea: { + owners: [ + '0x50be13b54f3eebbe415d20250598d81280e56772' + ], + }, + ripple: { + owners: [ + 'rQKKvBvEfXbTThkqrtqaY3sAKuW6iqcMzX', + 'rLMAAuqJowC5yMccaPnappeLM8vDfdiDTg', + ], + }, + sui: { + owners: [ + '0x51fc8f63faf7b22d401623f9c3ae5183e564d701741770f12ad1851c6c45a0c8', + ], + }, + tron: { + owners: [ + 'THAABzWrhp84Nr7gxss7qhtzA5mp3d1qUo' + ], + }, + solana: { + owners: [ + 'EWSHJzKpzjpwz9GuNKkXWMHXAiwtB7obSGhdFKu5QZku' + ], + }, + polkadot: { + owners: [ + '15hTaSogYFyGyRJhXdpQWRR1J9oya5nj4nFppi4XgUVMCvmP' ], }, } From 19866053bcf3ec5a6925028bd3b25fe55ce19b98 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Tue, 17 Dec 2024 15:07:04 +0000 Subject: [PATCH 761/787] temp comment chain --- projects/polynetwork/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/polynetwork/index.js b/projects/polynetwork/index.js index 17c1ddff420e..ec5b0ff631f3 100644 --- a/projects/polynetwork/index.js +++ b/projects/polynetwork/index.js @@ -21,7 +21,7 @@ const blockchainEndpoints = { okexchain: 'getTVLOKC', neo3: 'getTVLNeo3', polygon: 'getTVLPolygon', - palette: 'getTVLPalette', + //palette: 'getTVLPalette', arbitrum: 'getTVLArbitrum', xdai: 'getTVLGnosisChain', zilliqa: 'getTVLZilliqa', From a282262813dcbb810c33df15af5b6f404717406e Mon Sep 17 00:00:00 2001 From: Daniil <34062256+mellaught@users.noreply.github.com> Date: Tue, 17 Dec 2024 19:14:50 +0300 Subject: [PATCH 762/787] updated the logic, added the inwstETHs vault (#12741) --- projects/inception-lrt/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/inception-lrt/index.js b/projects/inception-lrt/index.js index 3731811b65e8..6f54675793ad 100644 --- a/projects/inception-lrt/index.js +++ b/projects/inception-lrt/index.js @@ -1,11 +1,11 @@ const ADDRESSES = require('../helper/coreAssets.json') async function tvl_eth(api) { - const vaults = ['0x36B429439AB227fAB170A4dFb3321741c8815e55', '0xfE715358368416E01d3A961D3a037b7359735d5e', '0x90E80E25ABDB6205B08DeBa29a87f7eb039023C2', '0x4878F636A9Aa314B776Ac51A25021C44CAF86bEd', '0xA9F8c770661BeE8DF2D026edB1Cb6FF763C780FF', '0x1Aa53BC4Beb82aDf7f5EDEE9e3bBF3434aD59F12', '0x814CC6B8fd2555845541FB843f37418b05977d8d', '0xc4181dC7BB31453C4A48689ce0CBe975e495321c', '0xC0660932C5dCaD4A1409b7975d147203B1e9A2B6', '0x6E17a8b5D33e6DBdB9fC61d758BF554b6AD93322', '0x295234B7E370a5Db2D2447aCA83bc7448f151161', '0xd0ee89d82183D7Ddaef14C6b4fC0AA742F426355'] + const vaults = ['0x36B429439AB227fAB170A4dFb3321741c8815e55', '0xfE715358368416E01d3A961D3a037b7359735d5e', '0x90E80E25ABDB6205B08DeBa29a87f7eb039023C2', '0x4878F636A9Aa314B776Ac51A25021C44CAF86bEd', '0xA9F8c770661BeE8DF2D026edB1Cb6FF763C780FF', '0x1Aa53BC4Beb82aDf7f5EDEE9e3bBF3434aD59F12', '0x814CC6B8fd2555845541FB843f37418b05977d8d', '0xc4181dC7BB31453C4A48689ce0CBe975e495321c', '0xC0660932C5dCaD4A1409b7975d147203B1e9A2B6', '0x6E17a8b5D33e6DBdB9fC61d758BF554b6AD93322', '0x295234B7E370a5Db2D2447aCA83bc7448f151161', '0xd0ee89d82183D7Ddaef14C6b4fC0AA742F426355', '0xf9D9F828989A624423C48b95BC04E9Ae0ef5Ec97'] const total_deposited = await api.multiCall({ abi: 'uint256:getTotalDeposited', calls: vaults, permitFailure: true}) // const total_withdraw = await api.multiCall({ abi: 'uint256:totalAmountToWithdraw', calls: vaults, permitFailure: true}) - const strategies = await api.multiCall({ abi: 'address:strategy', calls: vaults}) - const tokens = await api.multiCall({ abi: 'address:underlyingToken', calls: strategies}) + // const strategies = await api.multiCall({ abi: 'address:strategy', calls: vaults}) + const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults}) // const result = total_deposited.map((deposited, index) => deposited - total_withdraw[index]); api.add(tokens, total_deposited) } From 24d55e08b0b4c32cc04a65c37373603208247ebb Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:19:04 +0100 Subject: [PATCH 763/787] minor fix --- projects/Delea/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/Delea/index.js b/projects/Delea/index.js index b285666eac27..bed1da0e6b48 100644 --- a/projects/Delea/index.js +++ b/projects/Delea/index.js @@ -12,6 +12,7 @@ const ownersList = [ module.exports = { methodology: 'Counts Delea smartcontract balance as TVL.', + misrepresentedTokens: true, ton: { tvl: sumTokensExport({ owners: ownersList, tokens: [ADDRESSES.null]}), } From 4a85a968774e1a4ec39fafd49f56bb0bdd68b721 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 17 Dec 2024 20:06:14 +0100 Subject: [PATCH 764/787] Track ink chain integration (#12747) --- projects/dyorswap/index.js | 1 + projects/helper/chains.json | 1 + projects/helper/env.js | 2 ++ projects/helper/tokenMapping.js | 3 +++ 4 files changed, 7 insertions(+) diff --git a/projects/dyorswap/index.js b/projects/dyorswap/index.js index 4f8b31d9f772..e4d27a2d890b 100644 --- a/projects/dyorswap/index.js +++ b/projects/dyorswap/index.js @@ -8,6 +8,7 @@ const config = { degen: '0x2CcaDb1e437AA9cDc741574bDa154686B1F04C09', xlayer: '0x2ccadb1e437aa9cdc741574bda154686b1f04c09', bob: '0x2CcaDb1e437AA9cDc741574bDa154686B1F04C09', + ink: '0x6c86ab200661512fDBd27Da4Bb87dF15609A2806', } module.exports = { diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 81a6e959c201..126e04d2812f 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -159,6 +159,7 @@ "imx", "inevm", "injective", + "ink", "interlay", "iotaevm", "iotex", diff --git a/projects/helper/env.js b/projects/helper/env.js index 23c7da1cb961..b91fa8d842b5 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -19,6 +19,8 @@ const DEFAULTS = { ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", + INK_RPC: "https://rpc-gel.inkonchain.com/", + INK_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 970173165969..441bb7e182d1 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -45,6 +45,9 @@ const fixBalancesTokens = { apechain: { [ADDRESSES.null]: { coingeckoId: "apecoin", decimals: 18 }, }, + ink: { + [ADDRESSES.optimism.WETH_1]: { coingeckoId: "ethereum", decimals: 18 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 646f7eeb89ff6d013610a6fa1542e4e02faafc88 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 17 Dec 2024 21:07:14 +0100 Subject: [PATCH 765/787] fix onedex --- projects/onedex/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/onedex/index.js b/projects/onedex/index.js index 0270cd2bcbd9..67e89282abc5 100644 --- a/projects/onedex/index.js +++ b/projects/onedex/index.js @@ -5,6 +5,7 @@ module.exports = { elrond: { tvl: sumTokensExport({ owner: "erd1qqqqqqqqqqqqqpgqqz6vp9y50ep867vnr296mqf3dduh6guvmvlsu3sujc", + blacklistedTokens: ['GROK-f2a62f'] }), staking: sumTokensExport({ owners: ["erd1qqqqqqqqqqqqqpgql9z9vm8d599ya2r9seklpkcas6qmude4mvlsgrj7hv", "erd1qqqqqqqqqqqqqpgq8nlmvjm8gum6y2kqe0v296kgu8cm4jlemvlsays3ku"] From e4addded46a9dc4bd588a6d313cb233f1c646238 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:29:36 +0100 Subject: [PATCH 766/787] track ink bridge --- projects/ink/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/ink/index.js diff --git a/projects/ink/index.js b/projects/ink/index.js new file mode 100644 index 000000000000..960c3f159906 --- /dev/null +++ b/projects/ink/index.js @@ -0,0 +1,15 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +module.exports = { + ethereum: { + tvl: (api) => + sumTokens2({ + api, + owners: [ + "0x88FF1e5b602916615391F55854588EFcBB7663f0", + "0x5d66C1782664115999C47c9fA5cd031f495D3e4F", + ], + fetchCoValentTokens: true, + }), + }, +}; From cd947c7a6e21468759996ccbd7d22d0e2005ffda Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 18 Dec 2024 09:34:14 +0100 Subject: [PATCH 767/787] track inswap.io --- package-lock.json | 6 +++--- projects/helper/env.js | 2 -- projects/inkswap/index.js | 4 ++++ 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 projects/inkswap/index.js diff --git a/package-lock.json b/package-lock.json index e780464a8e57..177f1400cc6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1009,9 +1009,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.102", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.102.tgz", - "integrity": "sha512-S+MX9SL02E2IwgpviKIbxEtYjlUkGu8m57e7CjTbRtdyBrGbu1JhsvRCtuKm9Wz+bylX4I7jYbTC2fFdz/vvLg==", + "version": "5.0.103", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.103.tgz", + "integrity": "sha512-wJSKpnYFzFZoK99jm3qDm6npZkb448Fw/E85VqcVBnvTFiYFyzU03J4KwZvMKO1YnWjegm5wOT9Hs4fMbvp/Dg==", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@elastic/elasticsearch": "^8.13.1", diff --git a/projects/helper/env.js b/projects/helper/env.js index b91fa8d842b5..23c7da1cb961 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -19,8 +19,6 @@ const DEFAULTS = { ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", - INK_RPC: "https://rpc-gel.inkonchain.com/", - INK_RPC_MULTICALL: "0xcA11bde05977b3631167028862bE2a173976CA11", } const ENV_KEYS = [ diff --git a/projects/inkswap/index.js b/projects/inkswap/index.js new file mode 100644 index 000000000000..4e3cead06b80 --- /dev/null +++ b/projects/inkswap/index.js @@ -0,0 +1,4 @@ +const { uniTvlExports } = require('../helper/unknownTokens') +module.exports = uniTvlExports({ + ink: '0xBD5B41358A6601924F1Fd708aF1535a671f530A9' +}) \ No newline at end of file From f495356a58b7b5ff04548820ad8c0e66795f81b0 Mon Sep 17 00:00:00 2001 From: 0xsign <99134502+0xsign@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:20:56 +0100 Subject: [PATCH 768/787] Mellow add isETH vault (#12755) --- projects/mellow-protocol-v2/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mellow-protocol-v2/index.js b/projects/mellow-protocol-v2/index.js index b933fa5b717c..d3d2866ef3c5 100644 --- a/projects/mellow-protocol-v2/index.js +++ b/projects/mellow-protocol-v2/index.js @@ -18,6 +18,7 @@ const config = { '0x7b31F008c48EFb65da78eA0f255EE424af855249', '0x4f3Cc6359364004b245ad5bE36E6ad4e805dC961', '0x375A8eE22280076610cA2B4348d37cB1bEEBeba0', + '0xcC36e5272c422BEE9A8144cD2493Ac472082eBaD', ], }, } From e165264c9810c73e90a4afaa8f5ada93bc191b3b Mon Sep 17 00:00:00 2001 From: Jarekkkkk <86938582+Jarekkkkk@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:21:16 +0800 Subject: [PATCH 769/787] [Bucket] add FDUSD collateral (#12754) --- projects/bucket-protocol/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/projects/bucket-protocol/index.js b/projects/bucket-protocol/index.js index 444f203a04bb..b3c0a841e1e0 100644 --- a/projects/bucket-protocol/index.js +++ b/projects/bucket-protocol/index.js @@ -9,6 +9,7 @@ const BUCK = ADDRESSES.sui.BUCK; const USDC = ADDRESSES.sui.USDC; const USDT = ADDRESSES.sui.USDT; const USDC_CIRCLE= ADDRESSES.sui.USDC_CIRCLE +const FDUSD= "0xf16e6b723f242ec745dfd7634ad072c42d5c1d9ac9d62a39c381303eaa57693a::fdusd::FDUSD" const SCALLOP_swUSDC = "0xad4d71551d31092230db1fd482008ea42867dbf27b286e9c70a79d2a6191d58d::scallop_wormhole_usdc::SCALLOP_WORMHOLE_USDC" const SCALLOP_sUSDC = "0x854950aa624b1df59fe64e630b2ba7c550642e9342267a33061d59fb31582da5::scallop_usdc::SCALLOP_USDC" const SCALLOP_sUSDT = "0xe6e5a012ec20a49a3d1d57bd2b67140b96cd4d3400b9d79e541f7bdbab661f95::scallop_wormhole_usdt::SCALLOP_WORMHOLE_USDT" @@ -54,6 +55,8 @@ const USDC_PSM = const USDT_PSM = "0x607e7d386e29066b964934e0eb1daa084538a79b5707c34f38e190d64e24923e"; +const FDUSD_PSM = "0xb23092f74b7bbea45056d8564a7325be993cc2926b89f384367b9ad309dd92c5" + const BUCKETUS_PSM = "0xba86a0f37377844f38060a9f62b5c5cd3f8ba13901fa6c4ee5777c1cc535306b"; @@ -108,7 +111,7 @@ function convertUnderlyingAssets(coin){ if(coin === SCALLOP_sSUI) return ADDRESSES.sui.SUI // sbETH if(coin === SCALLOP_sSB_ETH) return ADDRESSES.sui.ETH - // sSCA + // sSCAUSDT_PSM if(coin === SCALLOP_sSCA) return SCA_ADDRESS return coin @@ -141,6 +144,9 @@ async function tvl(api) { const usdcCirclePSMObj = await sui.getObject(USDC_CIRCLE_PSM); const usdcCirclePSMAmount = usdcCirclePSMObj.fields.pool; + const fdusdPSMObj = await sui.getObject(FDUSD_PSM); + const fdusdPSMAmount = fdusdPSMObj.fields.pool; + const usdcPSMObj = await sui.getObject(USDC_PSM); const usdcPSMAmount = usdcPSMObj.fields.pool; @@ -224,6 +230,7 @@ async function tvl(api) { api.add(USDC_CIRCLE, Math.floor(usdcCirclePSMAmount)); api.add(USDC, Math.floor(usdcPSMAmount)); api.add(USDT, Math.floor(usdtPSMAmount)); + api.add(FDUSD, Math.floor(fdusdPSMAmount)); // 1 Cetable = 0.5 USDC + 0.5 USDT const halfCetableAmount = Math.floor(cetablePSMAmount / 2); From 23428e319a0b454f6629b5f9a11c7eea9f4f37b6 Mon Sep 17 00:00:00 2001 From: VarekStorm <163447238+VarekStorm@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:22:00 +0300 Subject: [PATCH 770/787] added DevvE tvl adapter (#12753) Co-authored-by: VarekStorm --- projects/devve/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/devve/index.js diff --git a/projects/devve/index.js b/projects/devve/index.js new file mode 100644 index 000000000000..5b15135dd964 --- /dev/null +++ b/projects/devve/index.js @@ -0,0 +1,12 @@ +const { staking } = require('../helper/staking'); + +module.exports = { + methodology: "DEVVE can be staked in the protocol", + ethereum: { + tvl: () => ({}), + staking: staking( + "0xa0dab5d6907a9CFFD023e0160210eAB464322b70", + "0x8248270620Aa532E4d64316017bE5E873E37cc09" + ), + }, +}; From 1d1a8857fe8f921c79baef898e7aa3b31772cc91 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Wed, 18 Dec 2024 11:22:32 +0100 Subject: [PATCH 771/787] Added Mars Perps launch hallmark (#12752) --- projects/mars/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mars/index.js b/projects/mars/index.js index 6894881fe668..47139138300b 100644 --- a/projects/mars/index.js +++ b/projects/mars/index.js @@ -122,5 +122,6 @@ module.exports = { [1690945200, 'Launch on Neutron'], [1696906800, 'Mars v2 launch on Osmosis'], [1724166000, 'Mars v2 launch on Neutron'], + [1734098400, 'Perps launch on Neutron'] ], }; From 0d9fb125f9c1c84475938384b835043112f2333d Mon Sep 17 00:00:00 2001 From: Bao Nguyen <151540392+baonguyen1904@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:23:21 +0700 Subject: [PATCH 772/787] Update Harmonix PoolFactory in arbitrum (#12751) --- projects/harmonix/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/harmonix/index.js b/projects/harmonix/index.js index aff77b0e0e59..74ab9da984db 100644 --- a/projects/harmonix/index.js +++ b/projects/harmonix/index.js @@ -5,7 +5,7 @@ module.exports = { } const config = { - arbitrum: "0x7274463BF93E0058481042Cbd6e0cc73042E6285", + arbitrum: "0x3363A85c31cf13a96802e2935724232767420135", ethereum: "0xC7C8Cdd1E9817Fc98AD1b05cD3633c6471A9473b", base: "0x45dC73fB760f2382Cfd11e28C0Dd0a3A8d3E4C31", } @@ -18,4 +18,4 @@ Object.keys(config).forEach(chain => { api.addCGToken("tether", bal/1e6) } } -}) \ No newline at end of file +}) From 4c7df0c5683c652c9fbae487ef7c250ae28de84b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:27:30 +0100 Subject: [PATCH 773/787] update feeFree #12750 --- projects/FeeFree/index.js | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/projects/FeeFree/index.js b/projects/FeeFree/index.js index 1d46901ddc55..b77357c47170 100644 --- a/projects/FeeFree/index.js +++ b/projects/FeeFree/index.js @@ -1,9 +1,9 @@ const { getLogs2 } = require('../helper/cache/getLogs') const { sumTokens2 } = require('../helper/unwrapLPs') -const EVENT_ABI = 'event Initialize(bytes32 id, address indexed currency0, address indexed currency1, uint24 fee, int24 tickSpacing, address hooks)' +const EVENT_ABI_OLD = 'event Initialize(bytes32 id, address indexed currency0, address indexed currency1, uint24 fee, int24 tickSpacing, address hooks)' -const config = { +const configOLD = { zora: { pool: "0xB43287b2106BC044F07aE674794f5492E851d3dC", router: "0x0Fee97363deEFBE4De038D437D805A98dbEbA400", @@ -16,6 +16,24 @@ const config = { } } +const EVENT_ABI = 'event Initialize(bytes32 indexed id, address indexed currency0, address indexed currency1, uint24 fee, int24 tickSpacing, address hooks, uint160 sqrtPriceX96, int24 tick)' + +const config = { + zora: { + pool: "0x2BB2DeAeF5D4E62D3798Ce67C3D623da09188AB9", + fromBlock: 23864003, + }, + base: { + pool: "0x60B393a76cEa4a3AFff00e1Fb08d0F63A8F4A314", + fromBlock: 23809396, + }, + scroll: { + pool: "0xA407e0637b22e1F64395D177C8EAD26C03dC3294", + fromBlock: 11975196, + } +} + + module.exports = { start: '2024-04-25', // Apr 26 2024 } @@ -24,6 +42,14 @@ Object.keys(config).forEach(chain => { const { pool, fromBlock, } = config[chain] module.exports[chain] = { tvl: async (api) => { + + if (configOLD[chain]) { + const { pool, fromBlock, } = configOLD[chain] + const logs = await getLogs2({ api, factory: pool, eventAbi: EVENT_ABI_OLD, fromBlock, }) + const tokens = logs.map(i => [i.currency0, i.currency1]).flat() + await sumTokens2({ api, owner: pool, tokens, }) + } + const logs = await getLogs2({ api, factory: pool, eventAbi: EVENT_ABI, fromBlock, }) const tokens = logs.map(i => [i.currency0, i.currency1]).flat() return sumTokens2({ api, owner: pool, tokens, }) From 955ee81344a352cd81a2c58629997bf06157e184 Mon Sep 17 00:00:00 2001 From: Winson Cheng <83229800+0xKMG@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:29:05 +0800 Subject: [PATCH 774/787] add Vault D and LST Vault into tvl calculation (#12749) --- projects/vectis/index.js | 85 ++++++++++++++++++++-------------- projects/vectis/spotMarkets.js | 27 +++++++++-- 2 files changed, 73 insertions(+), 39 deletions(-) diff --git a/projects/vectis/index.js b/projects/vectis/index.js index d7bb8070a376..c2980de5eae8 100644 --- a/projects/vectis/index.js +++ b/projects/vectis/index.js @@ -18,8 +18,10 @@ const vaultUserAddresses = [ new PublicKey("9Zmn9v5A2YWUQj47bkEmcnc37ZsYe83rsRK8VV2j1UqX"), //Vault A new PublicKey("4KvPuh1wG8j1pLnZUC5CuqTm2a41PWNtik1NwpLoRquE"), //Vault B new PublicKey("Hcs63usAc6cxWccycrVwx1mrNgNSpUZaUgFm7Lw9tSkR"), //Vault C - new PublicKey("MzEPFp2LwCSMMPHLQsqfE7SN6xkPHZ8Uym2HfrH7g5P"), //Yield Compress A - new PublicKey("CMiyE7M98DSPBEhQGTA6CzNodWkNuuW4y9HoocfK75nG") //Yield Compress B + new PublicKey("ARLwHJ3CYLkVTeW3nHvPBmGQ7SLQdhZbAkWHzYrq57rt"), //Vault D + new PublicKey("MzEPFp2LwCSMMPHLQsqfE7SN6xkPHZ8Uym2HfrH7g5P"), //Yield Compass A + new PublicKey("CMiyE7M98DSPBEhQGTA6CzNodWkNuuW4y9HoocfK75nG"), //Yield Compass B + new PublicKey("CnaXXuzc2S5UFSGoBRuKVNnzXBvxbaMwq6hZu5m91CAV") //LST Yield Compass ]; @@ -41,52 +43,65 @@ const vaultUserAddresses = [ * */ async function tvl(api) { + // Get all vault accounts first const accounts = await getMultipleAccounts(vaultUserAddresses) const deserializedData = accounts.map(deserializeUserPositions) - const perpIndices = deserializedData.map(data => data.perpPositions.map(position => position.market_index)).flat() - const perpKeys = perpIndices.map(index => getVaultPublicKey('perp_market', index)) - const perpAccounts = await getMultipleAccounts(perpKeys) - const perpAccountMap = {} - perpIndices.forEach((v, i) => perpAccountMap[v] = perpAccounts[i]) + // Collect unique market indices upfront + const allSpotIndices = new Set() + const allPerpIndices = new Set() + + deserializedData.forEach(({ spotPositions, perpPositions }) => { + spotPositions?.forEach(pos => allSpotIndices.add(pos.market_index)) + perpPositions?.forEach(pos => allPerpIndices.add(pos.market_index)) + }) + + // Batch fetch + const allKeys = [ + ...[...allSpotIndices].map(index => getVaultPublicKey('spot_market', index)), + ...[...allPerpIndices].map(index => getVaultPublicKey('perp_market', index)) + ] + + const allAccounts = await getMultipleAccounts(allKeys) + + // Create lookup maps + const spotAccountMap = {} + const perpAccountMap = {} + + let offset = 0 + ;[...allSpotIndices].forEach((index, i) => { + spotAccountMap[index] = allAccounts[i] + offset = i + 1 + }) + ;[...allPerpIndices].forEach((index, i) => { + perpAccountMap[index] = allAccounts[i + offset] + }) + // Process positions using the cached account data for (const { spotPositions, perpPositions } of deserializedData) { - // - // Process spot positions if (spotPositions?.length) { - const spotIndices = spotPositions.map(position => position.market_index) - const spotKeys = spotIndices.map(index => getVaultPublicKey('spot_market', index)) - const spotAccounts = await getMultipleAccounts(spotKeys) - const spotAccountMap = {} - spotIndices.forEach((v, i) => spotAccountMap[v] = spotAccounts[i]) - spotPositions.forEach(position => { - const tokenMint = getTokenMintFromMarketIndex(position.market_index); - const adjustedBalance = processSpotPosition(position, spotAccountMap[position.market_index]); - api.add(tokenMint, adjustedBalance); - }); + const tokenMint = getTokenMintFromMarketIndex(position.market_index) + const adjustedBalance = processSpotPosition(position, spotAccountMap[position.market_index]) + api.add(tokenMint, adjustedBalance) + }) } - // Process perp positions if (perpPositions?.length) { + perpPositions.map(position => { + const baseTokenMint = getPerpTokenMintFromMarketIndex(position.market_index) + const { baseBalance, quoteBalance } = processPerpPosition(position) + api.add(baseTokenMint, baseBalance) - perpPositions.map(async position => { - // Handle base asset - const baseTokenMint = getPerpTokenMintFromMarketIndex(position.market_index); - const { baseBalance, quoteBalance } = processPerpPosition(position); - api.add(baseTokenMint, baseBalance); - // - // Handle quote asset (always USDC) - const quoteTokenMint = getTokenMintFromMarketIndex(0); - // - api.add(quoteTokenMint, quoteBalance); + const quoteTokenMint = getTokenMintFromMarketIndex(0) + api.add(quoteTokenMint, quoteBalance) - const { cumulativeFundingRateLong, cumulativeFundingRateShort, } = getPerpMarketFundingRates(perpAccountMap[position.market_index]); - const currentCumulativeFundingRate = position.base_asset_amount > 0n ? cumulativeFundingRateLong : cumulativeFundingRateShort; - const difference = (currentCumulativeFundingRate - BigInt(position.last_cumulative_funding_rate)) / BigInt(10 ** 6); - const fundingRatePnl = (difference * (position.base_asset_amount) / BigInt(10 ** 6)); + const { cumulativeFundingRateLong, cumulativeFundingRateShort } = getPerpMarketFundingRates(perpAccountMap[position.market_index]) + const currentCumulativeFundingRate = position.base_asset_amount > 0n ? cumulativeFundingRateLong : cumulativeFundingRateShort + const difference = (currentCumulativeFundingRate - BigInt(position.last_cumulative_funding_rate)) / BigInt(10 ** 6) + const fundingRatePnl = (difference * (position.base_asset_amount) / BigInt(10 ** 6)) - api.add(quoteTokenMint, fundingRatePnl); + api.add(quoteTokenMint, fundingRatePnl) }) } } diff --git a/projects/vectis/spotMarkets.js b/projects/vectis/spotMarkets.js index e171a00e0081..9ca75e4598a7 100644 --- a/projects/vectis/spotMarkets.js +++ b/projects/vectis/spotMarkets.js @@ -1,4 +1,3 @@ -const ADDRESSES = require('../helper/coreAssets.json') const anchor = require('@coral-xyz/anchor'); const { PublicKey } = require("@solana/web3.js"); const DRIFT_PROGRAM_ID = new PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH') @@ -6,12 +5,27 @@ const DRIFT_PROGRAM_ID = new PublicKey('dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn3 const SPOT_MARKETS = { 0: { name: 'USDC', - mint: ADDRESSES.solana.USDC, + mint: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', decimals: 6 }, 1: { name: 'SOL', - mint: ADDRESSES.solana.SOL, + mint: 'So11111111111111111111111111111111111111112', + decimals: 9 + }, + 6: { + name: 'jitoSOL', + mint: 'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn', + decimals: 9 + }, + 16:{ + name:'INF', + mint:'5oVNBeEEQvYi1cX3ir8Dx5n1P7pdxydbGF2X4TxVusJm', + decimals: 9 + }, + 17:{ + name:'dSOL', + mint:'Dso1bDeDjCQxTrWHqUUi63oBvV7Mdm6WaobLbQ7gnPQ', decimals: 9 }, 19: { @@ -19,6 +33,11 @@ const SPOT_MARKETS = { mint: '27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4', decimals: 6 }, + 22: { + name: 'PYUSD', + mint: '2b1kV6DkPAnxd5ixfnxCpjxmKwqjjaYmCZfHsFu24GXo', + decimals: 6 + }, 28: { name: 'USDS', mint: 'USDSwr9ApdHk5bvJKMjzff41FfuX8bSxdKcR81vTwcA', @@ -29,7 +48,7 @@ const SPOT_MARKETS = { const PERP_MARKETS = { 0: { name: 'SOL-PERP', - mint: ADDRESSES.solana.SOL, + mint: 'So11111111111111111111111111111111111111112', baseDecimals: 9, quoteDecimals: 6 }, From 74394ef2c2492a57d9e9fe6b635be20137fe6f4e Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 18 Dec 2024 13:00:10 +0200 Subject: [PATCH 775/787] Adding event on TVL chart (#12743) --- projects/amphor/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/amphor/index.js b/projects/amphor/index.js index 878b3c59686e..df15db22ae42 100644 --- a/projects/amphor/index.js +++ b/projects/amphor/index.js @@ -48,4 +48,5 @@ module.exports.hallmarks = [ [1710115200, 'Beta test closing'], [1712361600, 'ETH Boosted Vault Release'], [1718927999, 'Symbiotic LRT Vault Release'], + [1734454404, 'Migration to InceptionLRT'], ]; From 67b4ef2ed7f25b932eb802d082aa700b0cef4402 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:56:15 +0000 Subject: [PATCH 776/787] Duckchain gogo (#12758) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/camelot-v2/index.js | 1 + projects/camelot/index.js | 3 +++ projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 3 +++ 5 files changed, 9 insertions(+) diff --git a/projects/camelot-v2/index.js b/projects/camelot-v2/index.js index ec282cb3732b..cc9f9e5631d2 100644 --- a/projects/camelot-v2/index.js +++ b/projects/camelot-v2/index.js @@ -13,6 +13,7 @@ const export2 = uniV3Export({ reya: { factory: '0x10aA510d94E094Bd643677bd2964c3EE085Daffc', fromBlock: 2932166, isAlgebra: true, }, gravity: { factory: '0x10aA510d94E094Bd643677bd2964c3EE085Daffc', fromBlock: 11988, isAlgebra: true, }, apechain: { factory: '0x10aA510d94E094Bd643677bd2964c3EE085Daffc', fromBlock: 60224, isAlgebra: true, }, + duckchain: { factory: '0xCf4062Ee235BbeB4C7c0336ada689ed1c17547b6', fromBlock: 1530060, isAlgebra: true, }, }) module.exports = mergeExports([export1, export2 ]) \ No newline at end of file diff --git a/projects/camelot/index.js b/projects/camelot/index.js index 82ea9cba7e46..bf8159e28f95 100644 --- a/projects/camelot/index.js +++ b/projects/camelot/index.js @@ -23,5 +23,8 @@ module.exports = { }, apechain: { tvl: getUniTVL({factory: '0x7d8c6B58BA2d40FC6E34C25f9A488067Fe0D2dB4', useDefaultCoreAssets: true}) + }, + duckchain: { + tvl: getUniTVL({factory: '0x7d8c6B58BA2d40FC6E34C25f9A488067Fe0D2dB4', useDefaultCoreAssets: true}) } }; \ No newline at end of file diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 126e04d2812f..6ff0e11efb23 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -93,6 +93,7 @@ "doge", "dogechain", "dsc", + "duckchain", "dydx", "dymension", "echelon", diff --git a/projects/helper/env.js b/projects/helper/env.js index 23c7da1cb961..4d2dc3347aa5 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -19,6 +19,7 @@ const DEFAULTS = { ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", + DUCKCHAIN_RPC: "https://rpc.duckchain.io,https://rpc-hk.duckchain.io", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 441bb7e182d1..b23178efb255 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -48,6 +48,9 @@ const fixBalancesTokens = { ink: { [ADDRESSES.optimism.WETH_1]: { coingeckoId: "ethereum", decimals: 18 }, }, + duckchain: { + ["0x7F9308E8d724e724EC31395f3af52e0593BB2e3f"]: { coingeckoId: "wrapped-ton", decimals: 18 }, + }, } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From 85fedd4254443e2e81f0c82c1c65db30b3deb3d9 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:56:28 +0000 Subject: [PATCH 777/787] add spectra staking (#12759) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/spectra/index.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/projects/spectra/index.js b/projects/spectra/index.js index cda61e4b6e30..1b6a71bb2fe7 100644 --- a/projects/spectra/index.js +++ b/projects/spectra/index.js @@ -2,6 +2,11 @@ const { getLogs } = require("../helper/cache/getLogs"); const abi = require("./abi.json"); const config = require("./config.json"); const sdk = require("@defillama/sdk"); +const { staking } = require("../helper/staking.js") + +// staking - SPECTRA token +const SPECTRA = "0x64fcc3a02eeeba05ef701b7eed066c6ebd5d4e51" +const veSPECTRA = "0x6a89228055c7c28430692e342f149f37462b478b" module.exports = { methodology: `All deposited underlying in Spectra Principal Tokens and all underlying supplied as liquidity in Spectra Markets`, @@ -121,3 +126,5 @@ Object.keys(config).forEach((chain) => { return logs.map((i) => i.pt); } }); + +module.exports.base.staking = staking(veSPECTRA, SPECTRA) \ No newline at end of file From 1c0314b72cdaa33d3bf514c79cc7a492035c330a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:10:23 +0100 Subject: [PATCH 778/787] update litecoin api --- projects/helper/chain/litecoin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/helper/chain/litecoin.js b/projects/helper/chain/litecoin.js index 400d6f6d20b7..b8c42f51c1da 100644 --- a/projects/helper/chain/litecoin.js +++ b/projects/helper/chain/litecoin.js @@ -4,7 +4,7 @@ const { PromisePool } = require('@supercharge/promise-pool') // const url = addr => 'https://chainz.cryptoid.info/ltc/api.dws?q=getbalance&a=' + addr const url1 = addr => 'https://ltc.tokenview.io/api/address/balancetrend/ltc/' + addr -const url = addr => 'https://explorer.litecoin.net/api/address/' + addr +const url = addr => 'https://litecoinspace.org/api/address/' + addr async function getBalance(addr) { try { From 2177d81a7c95f639f0f6fa8e10875aaea6171070 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:36:19 +0100 Subject: [PATCH 779/787] increase chunk size for non-polygon chains and add support for OMAX LP tokens --- projects/helper/cache/vestingHelper.js | 2 +- projects/helper/utils.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/helper/cache/vestingHelper.js b/projects/helper/cache/vestingHelper.js index f64477caf7d2..27412767433e 100644 --- a/projects/helper/cache/vestingHelper.js +++ b/projects/helper/cache/vestingHelper.js @@ -16,7 +16,7 @@ async function vestingHelper({ tokens = getUniqueAddresses(tokens) blacklist = getUniqueAddresses(blacklist) tokens = tokens.filter(t => !blacklist.includes(t)) - const chunkSize = chain === 'polygon' ? 250 : 500 // polygon has a lower gas limit + const chunkSize = chain === 'polygon' ? 250 : 2000 // polygon has a lower gas limit const chunks = sliceIntoChunks(tokens, chunkSize) const finalBalances = {} for (let i = 0; i < chunks.length; i++) { diff --git a/projects/helper/utils.js b/projects/helper/utils.js index 86edb86dbb7c..2102c3d0931f 100644 --- a/projects/helper/utils.js +++ b/projects/helper/utils.js @@ -101,6 +101,7 @@ function isLP(symbol, token, chain) { if (['fantom', 'nova',].includes(chain) && ['NLT'].includes(symbol)) return true if (chain === 'ethereumclassic' && symbol === 'ETCMC-V2') return true if (chain === 'shibarium' && ['SSLP', 'ChewyLP'].includes(symbol)) return true + if (chain === 'omax' && ['OSWAP-V2'].includes(symbol)) return true let label if (symbol.startsWith('ZLK-LP') || symbol.includes('DMM-LP') || (chain === 'avax' && 'DLP' === symbol) || symbol === 'fChe-LP') From caedd2a811857039f237c1b02e27b911be6b9209 Mon Sep 17 00:00:00 2001 From: Brendon Votteler Date: Wed, 18 Dec 2024 17:38:31 +0100 Subject: [PATCH 780/787] Add LBTC to BOB (#12760) --- projects/bob-fusion/index.js | 1 + projects/bob-gateway/index.js | 1 + projects/bob/index.js | 1 + 3 files changed, 3 insertions(+) diff --git a/projects/bob-fusion/index.js b/projects/bob-fusion/index.js index f663c7552d4b..6e6d8336a39c 100644 --- a/projects/bob-fusion/index.js +++ b/projects/bob-fusion/index.js @@ -16,6 +16,7 @@ const enabledAddresses = [ "0xbdBb63F938c8961AF31eaD3deBa5C96e6A323DD1", // eDLLR "0xbdab72602e9AD40FC6a6852CAf43258113B8F7a5", // eSOV "0xe7c3755482d0dA522678Af05945062d4427e0923", // ALEX + "0x8236a87084f8B84306f72007F36F2618A5634494", // LBTC ] module.exports = { diff --git a/projects/bob-gateway/index.js b/projects/bob-gateway/index.js index 954e389fcd34..e51903ef41d4 100644 --- a/projects/bob-gateway/index.js +++ b/projects/bob-gateway/index.js @@ -38,6 +38,7 @@ module.exports = { ADDRESSES.bob.FBTC, ADDRESSES.bob.uniBTC, ADDRESSES.bob.pumpBTC, + "0xA45d4121b3D47719FF57a947A9d961539Ba33204", // LBTC ], owners: gateways, }); diff --git a/projects/bob/index.js b/projects/bob/index.js index 07184113b5e9..371413167cad 100644 --- a/projects/bob/index.js +++ b/projects/bob/index.js @@ -15,6 +15,7 @@ const tokens = [ "0xbdBb63F938c8961AF31eaD3deBa5C96e6A323DD1", // eDLLR "0xbdab72602e9AD40FC6a6852CAf43258113B8F7a5", // eSOV "0xe7c3755482d0dA522678Af05945062d4427e0923", // ALEX + "0x8236a87084f8B84306f72007F36F2618A5634494", // LBTC ]; From d36020ee6dc011a9f97ebb2a6feb696036f1e97b Mon Sep 17 00:00:00 2001 From: MD Date: Wed, 18 Dec 2024 17:39:02 +0100 Subject: [PATCH 781/787] update impermax treasury (#12761) --- projects/treasury/impermax.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/projects/treasury/impermax.js b/projects/treasury/impermax.js index 8ec65d3c2a5e..27e981b1263c 100644 --- a/projects/treasury/impermax.js +++ b/projects/treasury/impermax.js @@ -1,12 +1,25 @@ const { nullAddress, treasuryExports } = require("../helper/treasury"); -const treasury = "0x7f959c082bc30f3ea88187fac1a640438ad7bf20"; +const treasury = "0xc28f68cd2df0fcc50f0058fb20abbc77bec8bdc6"; +const operations = "0x2157bfbb446744fc92bd95c3911eb58d0a9b01bd"; module.exports = treasuryExports({ arbitrum: { tokens: [ nullAddress, ], - owners: [treasury,], + owners: [treasury, operations], }, -}) \ No newline at end of file + base: { + tokens: [ + nullAddress, + ], + owners: [treasury, operations], + }, + blast: { + tokens: [ + nullAddress, + ], + owners: [treasury, operations], + }, +}) From 53da7cd71ad9ae15690c4678dae5ede1d38d29b6 Mon Sep 17 00:00:00 2001 From: rogi-sh <46889545+rogi-sh@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:39:10 +0100 Subject: [PATCH 782/787] Add Traders Collateral to TVL (Javsphere) (#12762) Co-authored-by: igorshelkovenkov Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/javsphere/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/javsphere/index.js b/projects/javsphere/index.js index 597cbb508849..076b8815ee62 100644 --- a/projects/javsphere/index.js +++ b/projects/javsphere/index.js @@ -5,15 +5,16 @@ const FREEZER_BASE = '0x03e225D2bd32F5ecE539005B57F9B94A743ADBFB' const VESTING_BASE = '0x42a40321843220e9811A1385D74d9798436f7002' const JAV_BASE = '0xEdC68c4c54228D273ed50Fc450E253F685a2c6b9' const LEVERAGEX_BASE_EARN = '0xfd916d70eb2d0e0e1c17a6a68a7fbede3106b852' +const LEVERAGEX_BASE_DIAMOND = '0xBF35e4273db5692777EA475728fDbBa092FFa1B3' async function tvl(api) { const config = await api.fetchList({ lengthAbi: 'tokensCount', itemAbi: "function tokens(uint256) view returns (address asset, bytes32 priceFeed, uint256 targetWeightage, bool isActive)", target: LEVERAGEX_BASE_EARN }) const tokens = config.map(i => i.asset) - return api.sumTokens({ owner: LEVERAGEX_BASE_EARN, tokens, }) + return api.sumTokens({ owners: [LEVERAGEX_BASE_EARN, LEVERAGEX_BASE_DIAMOND], tokens, }) } module.exports = { - methodology: `We count the total value locked from staking and freezer of javsphers native token JAV). `, + methodology: `We count the TVL of LeverageX Trading platform leveragex.trade (LPs and Traders). And TVL from staking and freezer of javsphers native token JAV.`, hallmarks: [ [1733837635, "Migration to BASE"], ], From 9881eb2254c285f6f830edd61377d05915026596 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:41:30 +0000 Subject: [PATCH 783/787] git checkout -b bitkumb-cex (#12764) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/bitkub-cex/index.js | 210 +++++++++++++++++++++ projects/helper/bitcoin-book/bitkub-cex.js | 17 ++ projects/helper/bitcoin-book/index.js | 4 +- 3 files changed, 230 insertions(+), 1 deletion(-) create mode 100644 projects/bitkub-cex/index.js create mode 100644 projects/helper/bitcoin-book/bitkub-cex.js diff --git a/projects/bitkub-cex/index.js b/projects/bitkub-cex/index.js new file mode 100644 index 000000000000..27de8a889c56 --- /dev/null +++ b/projects/bitkub-cex/index.js @@ -0,0 +1,210 @@ +const { cexExports } = require("../helper/cex"); +const bitcoinAddressBook = require("../helper/bitcoin-book/index.js"); + +const config = { + bitcoin: { owners: bitcoinAddressBook.bitkub }, + ethereum: { + owners: [ + "0x1579B5f6582C7a04f5fFEec683C13008C4b0A520", + "0xaD0703a267f97e19034FD564d731C4e6d888f9ef", + "0x831e8C86197C3993eb1238b3Ac22E42e3B7f2Fd9", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + "0xE35bb4845149eCC6799C98ceEeF7ff7c85440e6f", + "0x59E0cDA5922eFbA00a57794faF09BF6252d64126", + "0x326d9f47ba49bbaac279172634827483af70a601", + "0x4A3b441962BB481cdffF2650D84EBEC0f119CbB7", + "0x6B130820c449A27b35256A3c99942adbD53AAC18", + "0xFBA420CdAEE2df4e38a622d36616c3547AB6aaB4", + ], + }, + cardano: { + owners: [ + "addr1q8080hxmacdlnhrjllmurq35uj8jnj4ak0egxyl0zx6y9hns6jxls0ngn2qadghy4h7dterk0gzm3y7czmh8zlsfvmesug72j9", + "addr1q9lnc0jsh3f76hmapmsf8m7d6a32gm993gyhjspfvjgpdatl8sl9p0zna40h6rhqj0hum4mz53k2tzsf09qzjeyszm6s6n08gw", + "addr1vx7vlgvuupzvvls99penvatpm2c4j9ljscevzsnn3awk8ys6xynxk", + "addr1q8rgxa3edn03lywl8c9hk6p3c6rpyf9frhqe6a97qtrjktkxsdmrjmxlr7ga70st0d5rr35xzgj2j8wpn46tuqk89vhqaglq5q", + "addr1qyswadm6cz8u2lt8eh752d8434dgtjuvkmp3yv00klcuqm50s7wwjnhjjrt6h206nlzavqmsaqfllzslny5zyhfhemgslhpqe5", + "addr1q9pag8w4fhlfntk53te5ggjcxfv3a47pjs3kp79espx0xa3ry9xxlmzqcs8t8xj28xmw5l34pcdshnm80hjlsl0rlgwst42fps", + "addr1q8w6ydejn4v89cxmvmltzg4g0y4xkg84p3sqf3gmdst032pef9780gqwzm4c5q3m4juvp5q08e37yx9rvhfxahv7kywqn7h8jp", + "addr1q93njnfcfeky7ygfg5wjk3pms74qnxtashr7xmwnzykxpgp4yjdypphupnvrnskz8uj55cuzydmnmmnjvy70hytezjssux9ahu", + "addr1qxdsu34cmfw7er4zmd4702szx7yhc9gayrnyv6lsm89k6mafmzzku8yt4xqu7tqh3qctas87ukfswf0h3ytq9c92razqph7vpw", + "addr1qylmz3tepjdum5alfegjw80xawkqxrqy0lzl9ndhrcmr0dg34hvrr6m7qg538lpd6ppvxe7gp47rm36vyjw9cckuc0qsg26ngm", + "addr1q8j70zld3p2dhpgkxksprpsmzm4qhfhm2l6w9wk44gqs6264x2gg8f3gacy3x74ew8felyagrtq3lztx4cnx90cs09fsp87nrj", + "addr1q94vgjd7zfesgq06vgtrqe9q9g2rjtl6yn35gepwta9eqz25ts95j7frk9yh479d2fqln76xj4gldjflczkqwq003q3s39lprc", + "addr1q9vp536dm7jz05h8qfux247yl4c2cnzrz6kj9p3wh6u98gxuef7ar9t9kpnwpnnksgz8x4tuqtup6jch7yg55kns3p5s4vhaqa", + "addr1qxt89e3xnepa336w0t6td4as2awn0e57nk6f025r26rwug8q8t28pdfqtkt90eeafdf4axmzrh46cg65u47z59tscj3qfpxyxx", + "addr1q9fe0wv28yd6pse9hrwqn8rhcudj42e4z3a5vveqyqww6uys8ta3zga2drsxq42e003wxm7lvxt9skmrnst8f6z7sytqke4up9", + "addr1q8km36sd4wgt6f5e3n557nk454tqwxzg670fxylsztsccq5yy7w9y0uz4hlc3j2veln52xu3ktrrrzkr4p9ays0uhu5q6vukqh", + "addr1qx26c2mdztwk02fyn43692lzqcxscf0ujye06vv3jadhsazwram6xhx09z4yka4q6uexkelc92df9dysnjf5nhajvmnq2e4qwf", + "addr1qxxm602az76en6rjyvurmdpv7sj8jwxxfxv9jvjrttvrxt5l8pzavzkxpxuha8ra90t0h3s2zs5dhv2jmaq3mm6snfkqdmj5vl", + "addr1qxrs00m9qntkxhru8vdmd4xz562rv3ajck36l9yvcs06nwzcx8u53x99sahetdtaascmug9363m5sjjx8aullxgswvesy5td9l", + "addr1q9czs903atc9hmz9vf8sdrqgk33dz9hnwdgpgx98q4fsnj9t3n4wl5p8j9uqg4ewj740uupwjsv4c8p0eckuh3p0tjasl8v77f", + "addr1q9xfm9pxac0vhxym802eagwmtc0aus5w5uhc0tg9rslzzhfcj99akd57ewpta8ww9wf3vp9af3psmyw62vy00tvk3yaq9c3yw6", + "addr1q98xhywsa3xgu79ftrjyrfg6e2wrxfgqvepnudusw58ee6vmw0j8gzw6hmyuefah02purkfvqj6x2pz2wpjr26mr8r7qv6v2qa", + ], + }, + base: { + owners: [ + "0x7b7B40D0FfC52005AdE856D4F65008BFf7d4D4a6", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + "0x4EBBb4DeEd5dA01B1F882F237BA3a19e83Baaeea", + ], + }, + algorand: { + owners: [ + "CT7HPFSYMKHPJES4GEEA5VE6ML7PF4JUOKNSJNDK7MXYNYLMMTFJ7XDETY", + "Q3GDAVXJLVHL2YNTIP35LMXEIZRGLLANSUGXGG4O2O44RZYYFNAU32OBNU", + "6CBNVPFCWAPEA2C2Y34JP7JDDNZI6YXG5JMPNCSYZOLB24IF3CALRRUSUQ", + "B6PJYYQSVT7F3NNJMGTR7MGS6AA5RLHY5LUGSWJSRXUQQQJZEFZ3QQ2BPE", + ], + }, + bsc: { + owners: [ + "0xC68C8d9d435c1C8a04909A7D8eA588d1031ae1E9", + "0xAdf4c208d546E7F1Ec24cab1CcDA9B47B90B8540", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + "0x2B8A2A03883E790fd8731823fcaC3E7af0a6dab3", + "0xe8FbDA2Ac282a0EBb73d3f4089AD130312eDb8DA", + "0xa2FF973Bf5A7c33cE4591226b03cf0afc5F16D37", + "0xd8A184BBEB7098E45a7bDCe1f88BFb5785Cb22bA", + "0x427E2cb82551D247daA712ebECf5FaC7F1d955Ad", + "0x1ecCd85c9E21f247FadB70F6cFf94B14cb737d03", + "0x3A67638883EfF7856b286ccd373d36476C45407a", + "0x45De26036ebe8a611FD361324872E887B5839564", + "0x85f44C42bAA806047f1d9aAea362333200FC5d10", + "0x8F19c19Fd4B6b3363fd1f214FF7781FBceBdba6d", + "0x165c97f4a371e69A747678bA1893Be023b284f4a", + "0x034bda447330D010554A5a93A22fF45a2505f494", + "0x42b3cd5676FFD76D29A587Fe8aAdE7e35BF7D1B5", + "0xBf36D6540c310996a21537c0193ACA1756884C40", + "0x6Fc29dFF13345574FaD530a8DBCC7Bb4A43Ad045", + "0x56152e13828f78cDCC90A6b016dF0aeC0985e2f3", + "0xc686D5a4A1017BC1B751F25eF882A16AB1A81B63", + "0x074b08B84E7400E9E5446CcE14d446b36B6351B5", + ], + }, + aptos: { + owners: [ + "0x73f6a587b4bc245bf3eeaa31b7ffe490d4c297a4960023b9548c1a4187bbe826", + ], + }, + arbitrum: { + owners: [ + "0x3ad60935c48f59cad57794eea41c60574735b4c9", + "0x799cb7688637824025F2Ae0BE78baA4854EB10f9", + "0x77aB048B5A14385450DfE21a676930E391B0c50C", + "0x0573AdF35a54475CBe10992Ba7C7dC11a80f39Ab", + "0x3040028E91D2a5D1E780c8E1a771A1A243f8921A", + "0xb8a63Da460063aB54aE52c73693Fc554E38E7794", + "0x7836c2eaD68809CEB6168E70558E46eB454209B9", + "0xc49839a2eDd1A2c4B23b080734a72CA9ff8DF666", + "0xCacb823a3D0C5a8490B1d3E60d1f33AB1eEB0387", + "0xFa87f3ae8Bf869d4f6138F47a5682dD9E4458EE3", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + ], + }, + avax: { + owners: [ + "0xCee64C0fD6E455B629ee82404094Bb0FD7a015d3", + "0xf521f4f06253a2c9db5732c6838b82cf472ccb6b", + "0xed450b3a875eaab5366cdc6746b1aa95c1f87009", + "0x16eCE576723AE9640053C2a5e100E21Ae6879915", + "0xaE0B49663C51C8e00795e935186e7C8D425Aa4Fd", + "0x134282ea729a0a129f331d9950d399f22545e8b8", + "0x376AD7FB3842475725D276D77b85883474B9050C", + "0x91013c9c7c2a856B26dF52A8A117Afeb9FC90379", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + ], + }, + litecoin: { + owners: [ + "ltc1qdjslxvcf0sdp7glpm7uyj97dnc8ml32c820jjr", + "MV6PFbiFu9hAzav77zvArKnVbepqzgLai6", + "LX3BfLPmTpNAqemj9QZKu4SLTMrU9M4W4a", + ], + }, + mantle: { + owners: [ + "0x93593B52373775B6387Bb136fb662a1B2B95D28C", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + ], + }, + optimism: { + owners: [ + "0xda4231EF1768176536EEE3ec187315E60572BBD4", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + "0x18f59d6945C3847d837bC7bF2E402C2F91FdBF04", + "0xE24568D364A170B9D768AF5AaB2E9bFfFE628fAA", + "0xB2a4bE10ff7599e748a59EF66DF574EA14FdD28e", + "0x4BB9326ac2721cECc34737FCCE2FeA5fe78Ec88F", + "0x87F05730C7fC9D20EE8f2776b6E12675e344d323", + "0xfE7Ad27596CA67A134Cc227FCCEEe02fD7BaCC46", + "0x4da9F5048B530EC1B0A415d3d4D82f1C0A0F3d77", + "0x34d68b60F2BB5983a85dCE33A9Fbc74135EA05d6", + ], + }, + polygon: { + owners: [ + "0xCa7404EED62a6976Afc335fe08044B04dBB7e97D", + "0x98a81ce4e94249beb329f04b9595e10735ae6ab0", + "0xac72565ccf186f10e6a7a3964492c62be5757e31", + "0x9573A11d939753737E8F09f80f07f6462C093a1c", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + ], + }, + solana: { + owners: [ + "CqLu65KkFvGi3DUrR9o9aUC4LP2yUywFHZn8WoNLNVgy", + "99GQKbo1m2dU2ETGtEB1of9F6QHne5o9HHjAc7MyiVSn", + "FEpW539FYXJLpuKxPEuFZhtBHqv3o3V5qKtQa8wxN6qQ", + "7Z4YASPhNRbebWGx4GuzEWFAETZyRdN1GQTFTnM8t5c2", + "9ZxAqUEP5aYBCHakuVt9ojL15jfy9oMiaeQv5ewk2c7J", + "EwA9sKvmKwTpKr9BqYmsYi2UjKEMm3aPsihmFfT7Q9DM", + ], + }, + tron: { + owners: [ + "TUokA66synv9BN4T2VPSRZivNedcbkhfJF", + "TN6yULseUiJF7WZUruRQqMTUb1VTDBdsqG", + "TRHQmybCizoiMCA3ev4pNTb5PLJmgpSztQ", + "TLpzN1ztwi47kK8Wip2VvmDMFwnMyWnHwj", + ], + }, + ripple: { + owners: [ + "rnrqyM7kS6wmC5demJm9vrfdN2vLgS8LfY", + "rE3Cc3i6163Qzo7oc6avFQAxQE4gyCWhGP", + "rsgwNP2cyRHAcEbuRmboDQ4pmgemMNVZR3", + "rN2AVDJj927YbdAvTXoDtq8uswbQvFU42t", + "rfZCcK6EMCYeAX3y86X281xwgRLcH82SAw", + "rwa1MPnDwpRsgJ4jmZHuBo42xK9YVpp45P", + ], + }, + era: { + owners: [ + "0xe65eE83E7B466CB3836f666BaAeB4ed6d29B5723", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + ], + }, + core: { + owners: [ + "0x1CA1817eD440b26Fb005748f3CE9f8db160A5C0a", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + ], + }, + fantom: { + owners: [ + "0xE9BB729A7eA588c2ad10acaF647124503Dbb08d1", + "0x7A1CF8CE543F4838c964FB14D403Cc6ED0bDbaCC", + "0xDD374d8202D43a18BE95C8B64C41a87a9898889f", + ], + }, + ton: { + owners: [ + "UQC99FRwIlV2iLvDwFDyIfSVFQms5fUKtVZKidKuFTKItH2h", + "UQDByM-88YEJtGq4UTZx3FOgZFZ6URHPYD11wf9AcBrajchg", + ], + }, +}; + +module.exports = cexExports(config); diff --git a/projects/helper/bitcoin-book/bitkub-cex.js b/projects/helper/bitcoin-book/bitkub-cex.js new file mode 100644 index 000000000000..ffa3a87c4c17 --- /dev/null +++ b/projects/helper/bitcoin-book/bitkub-cex.js @@ -0,0 +1,17 @@ +module.exports = [ + "15ZAumgvBkRBpBkvuB699FszE8KW7sUqof", + "3JgjA1xMGhjfwuS2RK7zomuesTbCt4bLyE", + "3Q4Yt1QPe3hfyHok78PCowKd5rJG1hUvjH", + "36u1EMxV4NGMwEoS6WLSHHqww7kM2AGfVR", + "bc1qnh70mytjrnykrlufhz4tsgc3dfphrgsefwm0zx", + "1VHhZ3vZ2rhrT8a5QCt5Sd23Y5APBk9QU", + "bc1qlsg4ph439lemctx2vx6ydpc5sx8d2trv8ry25u", + "1iqw8qwMDcwkkw7AiEXqsxwQQ4qgmRpoP", + "bc1qxj30n45488xf7jc8lrx0val5d36ty7dql495j8", + "12ken5PwHeA6YnD3272S1beaSdGN46cEBh", + "bc1q85sqvgccu9d26mfw8j50y6evmyund0d7sg7rc89csyu3uh0c7f6s5g30nw", + "3AavzRkkbhtQjFJ3CLwA3FPoazxsFZM5go", + "bc1que2ellarxvz4f9pa88f6etejvj9mtsmlse22k8nzygnht6h4tlvqtpk9lf", + "33PkD3DjT6YYao2NbAS7bqFRy6nCTdGXBf", + "18DDXRwzkWvjg87P4fk9CB5k3AC25kxBsU", +]; diff --git a/projects/helper/bitcoin-book/index.js b/projects/helper/bitcoin-book/index.js index 7393a677860d..1d6eea795032 100644 --- a/projects/helper/bitcoin-book/index.js +++ b/projects/helper/bitcoin-book/index.js @@ -90,6 +90,7 @@ const nerveNetworkBridge = require('./nervenetworkbridge.js') const nexusbtc = require('./nexusbtc') const tapbit = require('./tapbit-cex.js') const jbtc = require('./jbtc') +const bitkub = require('./bitkub-cex.js') const p2pb2b = ['39BFtTzZjj6o2s7eewefFQxqM4617VmhEK'] const teleswap = [ @@ -198,5 +199,6 @@ module.exports = { nerveNetworkBridge, nexusbtc, tapbit, - jbtc + jbtc, + bitkub } From 0460522ffb8691301496ba8ff369d6a29fbeef50 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:12:07 +0100 Subject: [PATCH 784/787] update swissborg #12756 --- projects/helper/bitcoin-book/swissborg.js | 1 + projects/swissborg/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/helper/bitcoin-book/swissborg.js b/projects/helper/bitcoin-book/swissborg.js index d9b9a863f467..9f241f25b544 100644 --- a/projects/helper/bitcoin-book/swissborg.js +++ b/projects/helper/bitcoin-book/swissborg.js @@ -5,4 +5,5 @@ module.exports = [ '1Mgs8zLJ7JyngcNRUscayyPHnnYJpJS5x2', 'bc1qc8ee9860cdnkyej0ag5hf49pcx7uvz89lkwpr9', '1JgXCkk3gjmgfgjT2vvnjpvqfvNNTFCRpM', + '3jvARuePRR6KpNAeYYGRQzs8W4VYsWWxe4BfoTSTZhUr', ] \ No newline at end of file diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index ba5c888a264c..7f9a53c47ecb 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -21,6 +21,7 @@ const config = { '0x8F0d8b27bF808976Fa94f03e2230b4bca95bf3C4', '0xe2484A7Ac1b9Cb6D8E55fd00e129aB913172bea6', '0xdbe15F6573108B6736c70779C683Ca633c18aFe2', + '0xa2E07DB4e92F66071Ca68984517972F5625AB325', ], }, bitcoin: { From 8945fac327b20003eea0c7f37a0b2ca85925798b Mon Sep 17 00:00:00 2001 From: Antoine <67124021+antoineborg@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:12:56 +0100 Subject: [PATCH 785/787] Add new SwissBorg wallets (#12756) --- projects/swissborg/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/swissborg/index.js b/projects/swissborg/index.js index 7f9a53c47ecb..4f8a3445ed2d 100644 --- a/projects/swissborg/index.js +++ b/projects/swissborg/index.js @@ -50,6 +50,7 @@ const config = { 'Fe7SEekiKygziaEGKxsDsgLVzrCfNvVBvAYsaJBwFA8s', 'AR2ecEWY2vfsXmd4fUxc196LhbX5p8TnhvJg8t3fgYUN', '7Sng9GTnkjjb8WTF2kYX8JWqGHHwJGk5Ke9639zREUAR', + '3jvARuePRR6KpNAeYYGRQzs8W4VYsWWxe4BfoTSTZhUr', ], }, polkadot: { From eeb437de987bc9e56300cadacd7f4216270e7313 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 18 Dec 2024 18:13:31 +0100 Subject: [PATCH 786/787] bugfix swissborg #12756 --- projects/helper/bitcoin-book/swissborg.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/helper/bitcoin-book/swissborg.js b/projects/helper/bitcoin-book/swissborg.js index 9f241f25b544..d9b9a863f467 100644 --- a/projects/helper/bitcoin-book/swissborg.js +++ b/projects/helper/bitcoin-book/swissborg.js @@ -5,5 +5,4 @@ module.exports = [ '1Mgs8zLJ7JyngcNRUscayyPHnnYJpJS5x2', 'bc1qc8ee9860cdnkyej0ag5hf49pcx7uvz89lkwpr9', '1JgXCkk3gjmgfgjT2vvnjpvqfvNNTFCRpM', - '3jvARuePRR6KpNAeYYGRQzs8W4VYsWWxe4BfoTSTZhUr', ] \ No newline at end of file From 7226f9d61b72b614908f238e9c135a483db817bb Mon Sep 17 00:00:00 2001 From: Lutro <76906369+lutr0@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:54:27 +0100 Subject: [PATCH 787/787] feat: add Sophon chain (#12748) Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Co-authored-by: 0xsign <99134502+0xsign@users.noreply.github.com> Co-authored-by: Jarekkkkk <86938582+Jarekkkkk@users.noreply.github.com> Co-authored-by: VarekStorm <163447238+VarekStorm@users.noreply.github.com> Co-authored-by: VarekStorm Co-authored-by: Linkie Link Co-authored-by: Bao Nguyen <151540392+baonguyen1904@users.noreply.github.com> Co-authored-by: Winson Cheng <83229800+0xKMG@users.noreply.github.com> Co-authored-by: Denis Co-authored-by: Define101 <93603962+Define101@users.noreply.github.com> Co-authored-by: Brendon Votteler Co-authored-by: MD Co-authored-by: rogi-sh <46889545+rogi-sh@users.noreply.github.com> Co-authored-by: igorshelkovenkov Co-authored-by: Antoine <67124021+antoineborg@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/coreAssets.json | 9 +++++++++ projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 10 ++++++++++ projects/syncswap/index.js | 24 +++++++++++++++--------- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 6ff0e11efb23..02faf84c604f 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -303,6 +303,7 @@ "sommelier", "songbird", "sonic", + "sophon", "sora", "stacks", "stafi", diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index be3f826f7e3f..d11c8d04e64a 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -2086,5 +2086,14 @@ "ETH": "0xDd4b9b3Ce03faAbA4a3839c8B5023b7792be6e2C", "VINU": "0x00c1E515EA9579856304198EFb15f525A0bb50f6", "WVC": "0xEd8c5530a0A086a12f57275728128a60DFf04230" + }, + "sophon": { + "ETH": "0x72af9f169b619d85a47dfa8fefbcd39de55c567d", + "USDT": "0x6386da73545ae4e2b2e0393688fa8b65bb9a7169", + "USDC": "0x9aa0f72392b5784ad86c6f3e899bcc053d00db4f", + "WSTETH": "0x60d02f185f80644e1a5ae35497736dd31d1b078b", + "WEETH": "0x5e9fc50b44988b66ba84500f8bc32c0493fe8f8d", + "DAI": "0x88171a5bbacd92ca5e25575c5904581c80b025dd", + "SDAI": "0xeccbb9360d235548473cb8c752735f68e652439b" } } \ No newline at end of file diff --git a/projects/helper/env.js b/projects/helper/env.js index 4d2dc3347aa5..1dd47e9c79da 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -20,6 +20,7 @@ const DEFAULTS = { RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", RPC_PROXY_URL: "https://rpc-proxy.llama.fi", DUCKCHAIN_RPC: "https://rpc.duckchain.io,https://rpc-hk.duckchain.io", + SOPHON_RPC_MULTICALL: "0x5f4867441d2416cA88B1b3fd38f21811680CD2C8", } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index b23178efb255..ea6fd085f06b 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -38,6 +38,7 @@ const ibcMappings = { } const fixBalancesTokens = { + // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain @@ -48,6 +49,15 @@ const fixBalancesTokens = { ink: { [ADDRESSES.optimism.WETH_1]: { coingeckoId: "ethereum", decimals: 18 }, }, + sophon: { + [ADDRESSES.sophon.ETH]: { coingeckoId: "ethereum", decimals: 18 }, + [ADDRESSES.sophon.USDT]: { coingeckoId: "tether", decimals: 6 }, + [ADDRESSES.sophon.USDC]: { coingeckoId: "usd-coin", decimals: 6 }, + [ADDRESSES.sophon.WSTETH]: { coingeckoId: "wrapped-steth", decimals: 18 }, + [ADDRESSES.sophon.WEETH]: { coingeckoId: "wrapped-eeth", decimals: 18 }, + [ADDRESSES.sophon.DAI]: { coingeckoId: "dai", decimals: 18 }, + [ADDRESSES.sophon.SDAI]: { coingeckoId: "savings-dai", decimals: 18 }, + }, duckchain: { ["0x7F9308E8d724e724EC31395f3af52e0593BB2e3f"]: { coingeckoId: "wrapped-ton", decimals: 18 }, }, diff --git a/projects/syncswap/index.js b/projects/syncswap/index.js index b24b4c8d1034..170dd73e6c5f 100644 --- a/projects/syncswap/index.js +++ b/projects/syncswap/index.js @@ -43,21 +43,27 @@ async function tvl(api) { const config = { era: { fromBlock: 9775, - stableFactorys: ['0x5b9f21d407F35b10CbfDDca17D5D84b129356ea3','0x81251524898774F5F2FCaE7E7ae86112Cb5C317f'], - classicFactorys: ['0xf2DAd89f2788a8CD54625C60b55cD3d2D0ACa7Cb','0x0a34FBDf37C246C0B401da5f00ABd6529d906193'], - aquaFactorys: ['0x20b28B1e4665FFf290650586ad76E977EAb90c5D','0xFfa499b019394d9bEB5e21FC54AD572E4942302b','0x0754870C1aAb00eDCFABDF4e6FEbDD30e90f327d'] + stableFactorys: ['0x5b9f21d407F35b10CbfDDca17D5D84b129356ea3', '0x81251524898774F5F2FCaE7E7ae86112Cb5C317f'], + classicFactorys: ['0xf2DAd89f2788a8CD54625C60b55cD3d2D0ACa7Cb', '0x0a34FBDf37C246C0B401da5f00ABd6529d906193'], + aquaFactorys: ['0x20b28B1e4665FFf290650586ad76E977EAb90c5D', '0xFfa499b019394d9bEB5e21FC54AD572E4942302b', '0x0754870C1aAb00eDCFABDF4e6FEbDD30e90f327d'] }, linea: { fromBlock: 716, - stableFactorys: ['0xE4CF807E351b56720B17A59094179e7Ed9dD3727','0x61Abf754fc031C544236053495a193f3518e9101','0x024A096bAb43587d24004C95C3e20FcB7518Ad86'], - classicFactorys: ['0x37BAc764494c8db4e54BDE72f6965beA9fa0AC2d','0x9573994Ae6C9b35627976d26FA89e507e71FBaA2','0xb8AbaEa25E42DA5ac6897C9DAb0a8157885fE32b'], - aquaFactorys: ['0x7a31060d8524c21496a352BE65549eEf1e864fb0','0x1080EE857D165186aF7F8d63e8ec510C28A6d1Ea'] + stableFactorys: ['0xE4CF807E351b56720B17A59094179e7Ed9dD3727', '0x61Abf754fc031C544236053495a193f3518e9101', '0x024A096bAb43587d24004C95C3e20FcB7518Ad86'], + classicFactorys: ['0x37BAc764494c8db4e54BDE72f6965beA9fa0AC2d', '0x9573994Ae6C9b35627976d26FA89e507e71FBaA2', '0xb8AbaEa25E42DA5ac6897C9DAb0a8157885fE32b'], + aquaFactorys: ['0x7a31060d8524c21496a352BE65549eEf1e864fb0', '0x1080EE857D165186aF7F8d63e8ec510C28A6d1Ea'] + }, + sophon: { + fromBlock: 38459, + stableFactorys: ["0x8c9d66ba3e1d7681cffffa3c7d9807adae368e74"], + classicFactorys: ["0x432bcc3bc62de9186f9e8763c82d43e418681e6c"], + aquaFactorys: ["0xa2e2f6b5db704fde654db69895c89523332e538e"], }, scroll: { fromBlock: 80875, - stableFactorys: ['0xE4CF807E351b56720B17A59094179e7Ed9dD3727','0x5BEBDA7E264b03bB963CB2418f40C5ffcefb7A9e','0xA2acA673C00495A184F88De533BBa8e1b7f38D00'], - classicFactorys: ['0x37BAc764494c8db4e54BDE72f6965beA9fa0AC2d','0xDAEdEcF3F1Caf8d9050A0C973B77E40bA8024F69','0x76f549af692efA64952d02c075226df9878Fb54C'], - aquaFactorys: ['0xa033eAbcCfd9b71543E34dec43935467A230Ce2d','0x87aeb51d606056F48D241C4072f55ACd9D937018'] + stableFactorys: ['0xE4CF807E351b56720B17A59094179e7Ed9dD3727', '0x5BEBDA7E264b03bB963CB2418f40C5ffcefb7A9e', '0xA2acA673C00495A184F88De533BBa8e1b7f38D00'], + classicFactorys: ['0x37BAc764494c8db4e54BDE72f6965beA9fa0AC2d', '0xDAEdEcF3F1Caf8d9050A0C973B77E40bA8024F69', '0x76f549af692efA64952d02c075226df9878Fb54C'], + aquaFactorys: ['0xa033eAbcCfd9b71543E34dec43935467A230Ce2d', '0x87aeb51d606056F48D241C4072f55ACd9D937018'] }, }