From 926518ad84edcfaca7bb3eb940fe2145c94311f7 Mon Sep 17 00:00:00 2001 From: yepp4you Date: Fri, 7 Jul 2023 14:42:24 +0400 Subject: [PATCH 001/168] add new stake address on Klaytn --- projects/neopin-staking/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/neopin-staking/index.js b/projects/neopin-staking/index.js index dbb6fc8cab29..08f1f6abcf78 100644 --- a/projects/neopin-staking/index.js +++ b/projects/neopin-staking/index.js @@ -11,6 +11,7 @@ module.exports = { '0xDa664b81C13b050F9b0435D0B712218Aa8BB1609', '0x0D3ACA076712DE598DF856cEcEF76daD38F0A75b', '0xf9d92BAd7b1410dfFB0a204B7aa418C9fd5A898F', + '0xf20816C9bdcb25da3ba79b206e9b7107ae02ae10' ], tokens: [nullAddress], }), From 8a29f0a3da91f1db8b69f4843618534db4e7d5ef Mon Sep 17 00:00:00 2001 From: yepp4you Date: Wed, 7 Feb 2024 09:42:42 +0400 Subject: [PATCH 002/168] add new address for Klaytn staking contracts and remove old ones. --- projects/neopin-staking/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/neopin-staking/index.js b/projects/neopin-staking/index.js index 08f1f6abcf78..c4559746bb8a 100644 --- a/projects/neopin-staking/index.js +++ b/projects/neopin-staking/index.js @@ -8,10 +8,9 @@ module.exports = { klaytn: { tvl: sumTokensExport({ owners: [ - '0xDa664b81C13b050F9b0435D0B712218Aa8BB1609', - '0x0D3ACA076712DE598DF856cEcEF76daD38F0A75b', '0xf9d92BAd7b1410dfFB0a204B7aa418C9fd5A898F', - '0xf20816C9bdcb25da3ba79b206e9b7107ae02ae10' + '0xf20816C9bdcb25da3ba79b206e9b7107ae02ae10', + '0x489d6d679F1CA4cFE6976C55B54427D1AaDb8057' ], tokens: [nullAddress], }), From 94c71a72ee4ce8ebd696a25863674095826d0039 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Tue, 5 Mar 2024 19:35:26 +0000 Subject: [PATCH 003/168] separate fusefi lending --- projects/fusefi-lending/index.js | 24 ++++++++++++++++++++++++ projects/fusefi/index.js | 9 ++------- projects/fusefi/olalending.js | 10 ---------- 3 files changed, 26 insertions(+), 17 deletions(-) create mode 100644 projects/fusefi-lending/index.js delete mode 100644 projects/fusefi/olalending.js diff --git a/projects/fusefi-lending/index.js b/projects/fusefi-lending/index.js new file mode 100644 index 000000000000..79b5685fc121 --- /dev/null +++ b/projects/fusefi-lending/index.js @@ -0,0 +1,24 @@ +const { usdCompoundExports } = require('../helper/compound'); + +const unitroller_fuse = "0x26a562B713648d7F3D1E1031DCc0860A4F3Fa340" + +const abis = { + oracle: "address:getRegistry", + underlyingPrice: "function getPriceForUnderling(address cToken) view returns (uint256)", +} + +const olalending = usdCompoundExports(unitroller_fuse, "fuse", "0x025B0ff0920298e087308F3b2de0CF6399685909", abis) +module.exports = { + fuse:{ + tvl: olalending.tvl, + borrowed: async function(timestamp, ...otherParams){ + if(timestamp >= 1648684800){ + return {} + } + return olalending.borrowed(timestamp, ...otherParams) + } + }, + hallmarks: [ + [1648684800, "Ola Finance exploit"] + ] +} \ No newline at end of file diff --git a/projects/fusefi/index.js b/projects/fusefi/index.js index 92b203e1f872..e80a3e353fcf 100644 --- a/projects/fusefi/index.js +++ b/projects/fusefi/index.js @@ -1,6 +1,4 @@ -const sdk = require("@defillama/sdk"); const swap = require("./swap"); -const olalending = require("./olalending"); const { stakings } = require("../helper/staking"); const VOLT_TOKEN = "0x34Ef2Cc892a88415e9f02b91BfA9c91fC0bE6bD4".toLowerCase(); @@ -10,10 +8,7 @@ const VOLT_VOTE_ESCROW = "0xB0a05314Bd77808269e2E1E3D280Bff57Ba85672".toLowerCas module.exports = { misrepresentedTokens: true, fuse: { - tvl: sdk.util.sumChainTvls([swap.tvl, olalending.tvl]), + tvl: swap.tvl, staking: stakings([VOLT_BAR, VOLT_VOTE_ESCROW], VOLT_TOKEN), - }, - hallmarks: [ - [1648684800, "Ola Finance exploit"] - ] + } }; diff --git a/projects/fusefi/olalending.js b/projects/fusefi/olalending.js deleted file mode 100644 index 8949841c7bee..000000000000 --- a/projects/fusefi/olalending.js +++ /dev/null @@ -1,10 +0,0 @@ -const { usdCompoundExports } = require('../helper/compound'); - -const unitroller_fuse = "0x26a562B713648d7F3D1E1031DCc0860A4F3Fa340" - -const abis = { - oracle: "address:getRegistry", - underlyingPrice: "function getPriceForUnderling(address cToken) view returns (uint256)", -} - -module.exports = usdCompoundExports(unitroller_fuse, "fuse", "0x025B0ff0920298e087308F3b2de0CF6399685909", abis) \ No newline at end of file From 8d06142324a1f8942381d6475d76af0335730183 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Tue, 5 Mar 2024 21:27:36 +0000 Subject: [PATCH 004/168] add missing treasury --- projects/treasury/bitdao.js | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/projects/treasury/bitdao.js b/projects/treasury/bitdao.js index 9e68b055bf70..710251125a5a 100644 --- a/projects/treasury/bitdao.js +++ b/projects/treasury/bitdao.js @@ -1,5 +1,6 @@ const ADDRESSES = require('../helper/coreAssets.json') const { nullAddress,treasuryExports } = require("../helper/treasury"); +const sdk = require("@defillama/sdk"); //eth wallets const mTreasuryL1 = "0x78605Df79524164911C144801f41e9811B7DB73D"; @@ -22,7 +23,7 @@ const MNT = "0x3c3a81e81dc49a522a592e7622a7e711c06bf354" const MNTMantle = "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000" const wrappedmantleonmantle = "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8" -module.exports = treasuryExports({ +const tokenTreasuries = treasuryExports({ ethereum: { tokens: [ nullAddress, @@ -33,6 +34,7 @@ module.exports = treasuryExports({ '0x50D1c9771902476076eCFc8B2A83Ad6b9355a4c9',//FTT '0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272',//xSUSHI "0x52A8845DF664D76C69d2EEa607CD793565aF42B8", + "0x9d39a5de30e57443bff2a8307a4256c8797a3497", //sUSDe ], owners: [mTreasuryL1, mTreasuryL1SC,mTreasuryL1O1,mTreasuryL1E1, mTreasuryL1RB1, mTreasuryL1LPE1 ], ownTokens: [BIT, MNT], @@ -53,4 +55,19 @@ module.exports = treasuryExports({ ownTokens: [MNTMantle, wrappedmantleonmantle], resolveLP: true, }, -}) \ No newline at end of file +}) + +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]), + }, + mantle: tokenTreasuries.mantle +} \ No newline at end of file From fa7271b27f7e9733f94c418a681c389d7340dee7 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:30:28 +0000 Subject: [PATCH 005/168] first batch tokenMapping move to coreAssets (#9199) * first batch tokenMapping move to coreAssets * second batch (wip/merge server first) --- projects/helper/coreAssets.json | 67 ++++++++++++++++++++++++++----- projects/helper/tokenMapping.js | 70 --------------------------------- 2 files changed, 58 insertions(+), 79 deletions(-) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 8208ddbb9653..e2afac19e3ac 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -218,7 +218,11 @@ "USDC": "0xe3f5a90f9cb311505cd691a46596599aa1a0ad7d", "ETH": "0x639a647fbe20b6c8ac19e48e2de44ea792c62c5c", "ELK": "0xe1c110e1b1b4a1ded0caf3e42bfbdbb7b5d7ce1c", - "BEPRO": "0xcb4a593ce512d78162c58384f0b2fd6e802c2c47" + "BEPRO": "0xcb4a593ce512d78162c58384f0b2fd6e802c2c47", + "MOVR": "0xffffffff98e37bf6a393504b5adc5b53b4d0ba11", + "BNC": "0xffffffff3646a00f78cadf8883c5a2791bfcddc4", + "KSM": "0xffffffffc6deec7fc8b11a2c8dde9a59f8c62efe" + }, "moonbeam": { "WGLMR": "0x5f6c5c2fb289db2228d159c69621215e354218d7", @@ -234,7 +238,9 @@ "MOVR": "0x1d4c2a246311bb9f827f4c768e277ff5787b7d7e", "xcUSDT": "0xffffffffea09fb06d082fd1275cd48b191cbcd1d", "BEPRO": "0x4edf8e0778967012d46968ceadb75436d0426f88", - "stDOT": "0xfa36fe1da08c89ec72ea1f0143a35bfd5daea108" + "stDOT": "0xfa36fe1da08c89ec72ea1f0143a35bfd5daea108", + "VGLMR": "0xffffffff99dabe1a8de0ea22baa6fd48fde96f6c", + "FIL": "0xffffffffcd0ad0ea6576b7b285295c85e94cf4c1" }, "arbitrum": { "WETH": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", @@ -556,7 +562,8 @@ "ATID": "0x5271d85ce4241b310c0b34b7c2f1f036686a6d7c", "JPYC": "0x431d5dff03120afa4bdf332c61a6e1766ef37bdb", "aUSD": "0xffffffff00000000000000010000000000000001", - "vDOT": "0xFfFfFfff00000000000000010000000000000008" + "vDOT": "0xFfFfFfff00000000000000010000000000000008", + "ASTR": "0xffffffff00000000000000010000000000000010" }, "cardano": { "ADA": "ADA" @@ -638,7 +645,8 @@ }, "kujira": { "KUJI": "ukuji", - "USK": "factory/kujira1qk00h5atutpsv900x202pxx42npjr9thg58dnqpa72f2p7m2luase444a7/uusk" + "USK": "factory/kujira1qk00h5atutpsv900x202pxx42npjr9thg58dnqpa72f2p7m2luase444a7/uusk", + "FUZION": "factory/kujira1sc6a0347cc5q3k890jj0pf3ylx2s38rh4sza4t/ufuzn" }, "injective": { "INJ": "inj", @@ -661,7 +669,12 @@ "USDC": "0xea1199d50ee09fa8062fd9da3d55c6f90c1babd2" }, "tomochain": { - "WTOMO": "0xb1f66997a5760428d3a87d68b90bfe0ae64121cc" + "WTOMO": "0xb1f66997a5760428d3a87d68b90bfe0ae64121cc", + "TOMO": "0xc054751bdbd24ae713ba3dc9bd9434abe2abc1ce", + "USDT": "0xbbbfab9dcc27771d21d027f37f36b67cc4a25db0", + "USDC": "0x20cc4574f263c54eb7ad630c9ac6d4d9068cf127", + "ETH": "0x9ede19ede2baf93d25fba4c8f58577e008b8f963", + "SAROS": "0xb786d9c8120d311b948cf1e5aa48d8fbacf477e2" }, "ethereumclassic": { "WETC": "0x82A618305706B14e7bcf2592D4B9324A366b6dAd" @@ -1129,7 +1142,8 @@ "AVAX": "0x4200000000000000000000000000000000000023" }, "omax": { - "WOMAX": "0xfebabc6a9b2ec46d6357879b8bf39b593f11a5b9" + "WOMAX": "0xfebabc6a9b2ec46d6357879b8bf39b593f11a5b9", + "OMAX": "0x373e4b4E4D328927bc398A9B50e0082C6f91B7bb" }, "wemix": { "WWEMIX": "0x7d72b22a74a216af4a002a1095c8c707d6ec1c5f", @@ -1282,7 +1296,18 @@ "BUSD": "0x35bf4004c3fc9f509259d4942da6bae3669e1db1", "WMAPO": "0x13cb04d4a5dfb6398fc5ab005a6c84337256ee23", "USDC": "0x9f722b2cb30093f766221fd0d37964949ed66918", - "ETH": "0x05ab928d446d8ce6761e368c8e7be03c3168a9ec" + "ETH": "0x05ab928d446d8ce6761e368c8e7be03c3168a9ec", + "ROUP": "0x3e76deF74d4187B5a01aBE4E011Bd94d9f057d94", + "WROUP": "0x5a1c3f3aaE616146C7b9bf9763E0ABA9bAFc5eaE", + "ORDI": "0xB719e46B6eB5b23E2759526CdE24589d87097733", + "WORDI": "0x9CA528368964cFb92cfFdd51dCcED25E27ACCef9", + "RATS": "0xcAF17cDdb80F72484e5A279921b98a0a9A2391ee", + "WRATS": "0x6369414F2b0e973c7E85A362141aA1430bc30056", + "CSAS": "0x640a4C0AaA4870BaDE2F646B7Da87b3D53819C4f", + "WSAS": "0x141b30Dd30FAFb87ec10312d52e5dbD86122FE14", + "BTCS": "0x0e2cA3e003f3c73C8cC18ec244d46DB9d4c4DCEB", + "WBTCS": "0xBE81B9390D894fEBf5e5D4Ea1486a003C1e8dc63", + "MMSS": "0x0fBb3B3Fb1e928f75B3Ed8b506bAb4503373fdca" }, "bone": { "WBONE": "0xcda1fa23ff3b9b7172be82237bf662efb69437e9" @@ -1366,7 +1391,10 @@ }, "stacks": { "WSTX": "SP1Z92MPDQEWZXW36VX71Q25HKF5K2EPCJ304F275.wstx-token-v4a", - "WBTC": "SP3DX3H4FEYZJZ586MFBS25ZW3HZDMEW92260R2PR.Wrapped-Bitcoin::wrapped-bitcoin" + "WBTC": "SP3DX3H4FEYZJZ586MFBS25ZW3HZDMEW92260R2PR.Wrapped-Bitcoin::wrapped-bitcoin", + "stSTX": "SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststx-token::ststx", + "USDT": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-susdt::bridged-usdt", + "aBTC": "SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-abtc::bridged-btc" }, "neon_evm": { "WNEON": "0xb14760c064a1b9eaf9ec5a8a421971e40a51b59c" @@ -1461,7 +1489,8 @@ "kroma": { "WETH": "0x4200000000000000000000000000000000000001", "USDC": "0x49A5010110a358d9069282873F3e7eCf6B41DC10", - "USDT": "0x0Cf7c2A584988871b654Bd79f96899e4cd6C41C0" + "USDT": "0x0Cf7c2A584988871b654Bd79f96899e4cd6C41C0", + "WEMIX": "0x3720b1dc2c8dde3bd6cfcf0b593d0a2bbcac856e" }, "radixdlt": { "XRD": "resource_rdx1tknxxxxxxxxxradxrdxxxxxxxxx009923554798xxxxxxxxxradxrd", @@ -1588,5 +1617,25 @@ "bitrock": { "WBR": "0x413f0e3a440aba7a15137f4278121450416882d5", "BR": "0xde67d97b8770dc98c746a3fc0093c538666eb493" + }, + "btn": { + "BTN": "0x8148b71232162ea7a0b1c8bfe2b8f023934bfb58" + }, + "area": { + "AREA": "0x298b6a733cd34e41ca87b264d968c8ca7b0b9931" + }, + "defiverse": { + "OAS": "0x5a89E11Cb554E00c2f51C4bb7F05bc7Ab0Fa6351", + "USDC": "0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2", + "WBTC": "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb", + "ETH": "0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea" + }, + "xai": { + "XAI": "0x36be1fd6ff2a6beb34b500a04f89103a524516d8", + "USDC": "0x300a7b57dc85b6a9776e249614abf0fe5c9905fb" + }, + "merlin": { + "WBTC": "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA", + "VOYA": "0x480e158395cc5b41e5584347c495584ca2caf78d" } } diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 6df16c1c64e4..3cd91936b5a8 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -37,76 +37,6 @@ const fixBalancesTokens = { // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain - }, - map: { - // https://docs.rolluper.xyz/how-does-roup-work/deployed-contracts - // https://app.rolluper.xyz/ - '0x3e76deF74d4187B5a01aBE4E011Bd94d9f057d94': { coingeckoId: 'roup', decimals: 18 }, - '0x5a1c3f3aaE616146C7b9bf9763E0ABA9bAFc5eaE': { coingeckoId: 'roup', decimals: 18 }, - // '0x3b7fC78434B00586a2ad7c3DAd821e1b02fcA66f': { coingeckoId: '', decimals: 18 }, // mapo - // '0xb84e5EF60f73ed0da684bC3C5d7962f3839ae619': { coingeckoId: '', decimals: 18 }, // STST - '0xB719e46B6eB5b23E2759526CdE24589d87097733': { coingeckoId: 'ordinals', decimals: 18 }, - '0x9CA528368964cFb92cfFdd51dCcED25E27ACCef9': { coingeckoId: 'ordinals', decimals: 18 }, - '0xcAF17cDdb80F72484e5A279921b98a0a9A2391ee': { coingeckoId: 'rats', decimals: 18 }, - '0x6369414F2b0e973c7E85A362141aA1430bc30056': { coingeckoId: 'rats', decimals: 18 }, - '0x640a4C0AaA4870BaDE2F646B7Da87b3D53819C4f': { coingeckoId: 'comsats', decimals: 18 }, - '0x141b30Dd30FAFb87ec10312d52e5dbD86122FE14': { coingeckoId: 'comsats', decimals: 18 }, - '0x0e2cA3e003f3c73C8cC18ec244d46DB9d4c4DCEB': { coingeckoId: 'btcs', decimals: 18 }, - '0xBE81B9390D894fEBf5e5D4Ea1486a003C1e8dc63': { coingeckoId: 'btcs', decimals: 18 }, - '0x0fBb3B3Fb1e928f75B3Ed8b506bAb4503373fdca': { coingeckoId: 'mmss', decimals: 18 }, - }, - btn: { - '0x8148b71232162ea7a0b1c8bfe2b8f023934bfb58': { coingeckoId: 'bitnet', decimals: 18 }, - }, - omax: { - '0x373e4b4E4D328927bc398A9B50e0082C6f91B7bb': { coingeckoId: 'omax-token', decimals: 18 }, - }, - area: { - '0x298b6a733cd34e41ca87b264d968c8ca7b0b9931': { coingeckoId: 'areon-network', decimals: 18 }, - }, - kujira: { - 'factory:kujira1sc6a0347cc5q3k890jj0pf3ylx2s38rh4sza4t:ufuzn': { coingeckoId: 'fuzion', decimals: 6 }, - }, - kroma: { - '0x3720b1dc2c8dde3bd6cfcf0b593d0a2bbcac856e': { coingeckoId: 'wemix-token', decimals: 18 }, - }, - astar: { - '0xffffffff00000000000000010000000000000010': { coingeckoId: 'astar', decimals: 18 }, - }, - moonriver: { - '0xffffffff98e37bf6a393504b5adc5b53b4d0ba11': { coingeckoId: 'moonriver', decimals: 18 }, - '0xffffffff3646a00f78cadf8883c5a2791bfcddc4': { coingeckoId: 'bifrost-native-coin', decimals: 12 }, - '0xffffffffc6deec7fc8b11a2c8dde9a59f8c62efe': { coingeckoId: 'kusama', decimals: 12 }, - }, - moonbeam: { - '0xffffffff99dabe1a8de0ea22baa6fd48fde96f6c': { coingeckoId: 'voucher-glmr', decimals: 18 }, - '0xffffffffcd0ad0ea6576b7b285295c85e94cf4c1': { coingeckoId: 'filecoin', decimals: 18 }, - }, - stacks: { - 'SP4SZE494VC2YC5JYG7AYFQ44F5Q4PYV7DVMDPBG.ststx-token::ststx': { coingeckoId: 'blockstack', decimals: 6 }, - 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-susdt::bridged-usdt': { coingeckoId: 'tether', decimals: 8 }, - 'SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.token-abtc::bridged-btc': { coingeckoId: 'bitcoin', decimals: 8 }, - }, - defiverse: { - '0x5a89E11Cb554E00c2f51C4bb7F05bc7Ab0Fa6351': { coingeckoId: 'oasys', decimals: 18 }, - '0x7c6b91D9Be155A6Db01f749217d76fF02A7227F2': { coingeckoId: 'usd-coin', decimals: 18 }, - '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb': { coingeckoId: 'wrapped-bitcoin', decimals: 18 }, - '0xE7798f023fC62146e8Aa1b36Da45fb70855a77Ea': { coingeckoId: 'ethereum', decimals: 18 }, - }, - tomochain: { - '0xc054751bdbd24ae713ba3dc9bd9434abe2abc1ce': { coingeckoId: 'tomochain', decimals: 18 }, - '0xbbbfab9dcc27771d21d027f37f36b67cc4a25db0': { coingeckoId: 'tether', decimals: 18 }, - '0x20cc4574f263c54eb7ad630c9ac6d4d9068cf127': { coingeckoId: 'usd-coin', decimals: 6 }, - '0x9ede19ede2baf93d25fba4c8f58577e008b8f963': { coingeckoId: 'ethereum', decimals: 18 }, - '0xb786d9c8120d311b948cf1e5aa48d8fbacf477e2': { coingeckoId: 'saros-finance', decimals: 18 }, - }, - xai: { - '0x36be1fd6ff2a6beb34b500a04f89103a524516d8': { coingeckoId: 'xai-blockchain', decimals: 18 }, - '0x300a7b57dc85b6a9776e249614abf0fe5c9905fb': { coingeckoId: 'usd-coin', decimals: 6 }, - }, - merlin: { - '0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA': { coingeckoId: 'merlin-chain-bridged-wrapped-btc-merlin', decimals: 18 }, - '0x480e158395cc5b41e5584347c495584ca2caf78d': { coingeckoId: 'merlin-chain-bridged-voya-merlin', decimals: 18 }, } } From 52e0db01ed43077f88f377216c3c8ebafa616728 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 5 Mar 2024 22:39:11 +0100 Subject: [PATCH 006/168] Alta (#9187) * Ready for PR * Refactor * Refactor * Refactor * code refactor * Update index.js --------- Co-authored-by: Jeremy Crane --- projects/alta-finance/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/alta-finance/index.js diff --git a/projects/alta-finance/index.js b/projects/alta-finance/index.js new file mode 100644 index 000000000000..f927d9da39ab --- /dev/null +++ b/projects/alta-finance/index.js @@ -0,0 +1,25 @@ +module.exports = { + methodology: "Sums the amount of funded real-world assets on ALTA Finance as borrowed. Tokens left in the countract are counted towards tvl", +} + +const config = { + polygon: { investments: ['0xcf152E9f60E197A44FAdce961c6B822Dcb6c9dcc'], debts: ['0xE92F580C930dd24aACB38Ab0EA18F6c1dEf31369'], token: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174' }, +} + +Object.keys(config).forEach(chain => { + const { investments, debts, token } = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + return api.sumTokens({ owners: investments.concat(debts), tokens: [token] }) + }, + borrowed: async (_, _b, _cb, { api, }) => { + const nftCount = (await api.multiCall({ abi: 'uint256:_tokenIdCounter', calls: investments, permitFailure: true })).map(i => i ?? 0) + const amount = (await api.multiCall({ abi: 'uint256:amountPerNft', calls: investments, permitFailure: true })).map(i => i ?? 0) + api.add(token, nftCount.map((v, i) => v * amount[i])) + + const bals = (await api.multiCall({ abi: 'uint256:amount', calls: debts, permitFailure: true })).map(i => i ?? 0) + api.add(token, bals) + return api.getBalances() + }, + } +}) From 39c5741753b585b9c89cd7888575723b3d1d5409 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Tue, 5 Mar 2024 21:52:00 +0000 Subject: [PATCH 007/168] add extra wallets --- projects/treasury/bitdao.js | 44 ++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/projects/treasury/bitdao.js b/projects/treasury/bitdao.js index 710251125a5a..4881039bf7b5 100644 --- a/projects/treasury/bitdao.js +++ b/projects/treasury/bitdao.js @@ -23,6 +23,44 @@ const MNT = "0x3c3a81e81dc49a522a592e7622a7e711c06bf354" const MNTMantle = "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0000" const wrappedmantleonmantle = "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8" +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 tokenTreasuries = treasuryExports({ ethereum: { tokens: [ @@ -36,10 +74,10 @@ const tokenTreasuries = treasuryExports({ "0x52A8845DF664D76C69d2EEa607CD793565aF42B8", "0x9d39a5de30e57443bff2a8307a4256c8797a3497", //sUSDe ], - owners: [mTreasuryL1, mTreasuryL1SC,mTreasuryL1O1,mTreasuryL1E1, mTreasuryL1RB1, mTreasuryL1LPE1 ], + owners: [mTreasuryL1, mTreasuryL1SC,mTreasuryL1O1,mTreasuryL1E1, mTreasuryL1RB1, mTreasuryL1LPE1, ...ecspWallets ], ownTokens: [BIT, MNT], resolveLP: true, - resolveUniV3: true, + resolveUniV3: true }, mantle: { tokens: [ @@ -51,7 +89,7 @@ const tokenTreasuries = treasuryExports({ "0x201EBa5CC46D216Ce6DC03F6a759e8E766e956aE", //tether "0xf52b354ffdb323e0667e87a0136040e3e4d9df33", //lp meth ], - owners: [mTreasuryL2, mTreasuryL2RB2, mTreasuryL2LPM1, mTreasuryL2FF1], + owners: [mTreasuryL2, mTreasuryL2RB2, mTreasuryL2LPM1, mTreasuryL2FF1, ...ecspWallets], ownTokens: [MNTMantle, wrappedmantleonmantle], resolveLP: true, }, From ee83c6da96a9604f9c7d27c830b134058ca347f9 Mon Sep 17 00:00:00 2001 From: suNrisEinMyeYes <40171291+suNrisEinMyeYes@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:08:00 +0800 Subject: [PATCH 008/168] xUsdVaultRedeployed (#9197) * xUsdVaultRedeployed * code fix --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/locus/index.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/projects/locus/index.js b/projects/locus/index.js index 6bf17256a237..990bc10cb5ad 100644 --- a/projects/locus/index.js +++ b/projects/locus/index.js @@ -1,3 +1,4 @@ +const sdk = require('@defillama/sdk') const { sumERC4626VaultsExport } = require('../helper/erc4626') const { staking } = require('../helper/staking') @@ -21,15 +22,20 @@ const config = { arbitrum: { lvTokens: { xARB: "0xF8F045583580C4Ba954CD911a8b161FafD89A9EF", - xUSD: "0x2a889E9ef10c7Bd607473Aadc8c806c4511EB26f", + }, + lvTokens2: { + xUSD: "0x6318938F825F57d439B3a9E25C38F04EF97987D8", }, } } Object.keys(config).forEach(chain => { - const { lvTokens } = config[chain] + const { lvTokens, lvTokens2 } = config[chain] + let tvl = sumERC4626VaultsExport({ vaults: Object.values(lvTokens), tokenAbi: 'token', balanceAbi: 'totalAssets' }) + if (lvTokens2) + tvl = sdk.util.sumChainTvls([tvl, sumERC4626VaultsExport({ vaults: Object.values(lvTokens2), tokenAbi: 'wantToken', balanceAbi: 'totalAssets' })]) module.exports[chain] = { - tvl: sumERC4626VaultsExport({ vaults: Object.values(lvTokens), tokenAbi: 'token', balanceAbi: 'totalAssets' }) + tvl } }) From dd23942fa2e891cf3c8d99416d38693aa83992b0 Mon Sep 17 00:00:00 2001 From: SpoolFi <90168835+SpoolFi@users.noreply.github.com> Date: Tue, 5 Mar 2024 23:08:14 +0100 Subject: [PATCH 009/168] Add Project: StakingRewards (srETH) (#9196) * Add Project: StakingRewards (srETH) * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/staking-rewards/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/staking-rewards/index.js diff --git a/projects/staking-rewards/index.js b/projects/staking-rewards/index.js new file mode 100644 index 000000000000..07ad0e561159 --- /dev/null +++ b/projects/staking-rewards/index.js @@ -0,0 +1,25 @@ +const abi = { + "getSmartVaultAssetBalances": "function getSmartVaultAssetBalances(address, bool) external returns (uint256[] memory)" +} + +const ethContract = "0x5d6ac99835b0dd42ed9ffc606170e59f75a88fde"; +const spoolLens = '0x8aa6174333F75421903b2B5c70DdF8DA5D84f74F'; + +async function eth(timestamp, ethBlock, chainBlocks, { api }) { + const tvlETH = await api.call({ + target: spoolLens, + abi: abi["getSmartVaultAssetBalances"], + params: [ethContract, false] + }); + api.addGasToken(tvlETH[0]) + return api.getBalances() +} + +module.exports = { + methodology: 'TVL is counted as deposits routed to the underlying Liquid Staking protocols in the vault.', + doublecounted: true, // tokens are stored in underlying LSDs + misrepresentedTokens: true, + ethereum: { + tvl: eth + } +} From 762f06b269c1cee1fc6e25380622b42e91d7b1a2 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 5 Mar 2024 23:09:30 +0100 Subject: [PATCH 010/168] Add spool-fi-sreth project with TVL calculation for Ethereum --- projects/{staking-rewards => spool-fi-sreth}/index.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename projects/{staking-rewards => spool-fi-sreth}/index.js (100%) diff --git a/projects/staking-rewards/index.js b/projects/spool-fi-sreth/index.js similarity index 100% rename from projects/staking-rewards/index.js rename to projects/spool-fi-sreth/index.js From adf3a3c712226592334e6831d1a5df269a43f08c Mon Sep 17 00:00:00 2001 From: Shushant <114708157+WardenJakx@users.noreply.github.com> Date: Tue, 5 Mar 2024 18:12:20 -0500 Subject: [PATCH 011/168] [FEAT]: Add definitive.fi (#9200) * definitive adapter * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/definitive/index.js | 90 ++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 projects/definitive/index.js diff --git a/projects/definitive/index.js b/projects/definitive/index.js new file mode 100644 index 000000000000..cfd4e73daca3 --- /dev/null +++ b/projects/definitive/index.js @@ -0,0 +1,90 @@ +const CommunityVaultsLP = { + arbitrum: [ + "0xbE3cb8CA59487D39b49d33A124cC93a83cB6fd16" + ], + avax: [ + "0xe5b54e79cD1D53024A94df479B3099DBE72FB662", + "0x1499BeB1FBf76420704e12a9F7E3Af99dCc39618", + "0xEeF282aCCa091bE35AaCC0a6ce38708530749170", + "0x99C409C681650964296916780A7aB540fFBd4Bc4", + "0x123384ba6Cde21a3E8874cA878dF9d8a1326A0c6", + "0x4a86E2ceE61a41a2F5c97906431611F1F26881ec", + "0x90529324E6901fA8f69F207A6E58CE6F4367a519", + "0x486B322cbcBf92A463769F0b1284D2b63FD66E2C", + "0xd91f00d6Add5A1A59589B4756C3193892540B7d0", + "0x751c09F0803C1351019c2249C3efA42C6e1ABaDD", + "0xb4d844B64e972eA41dC87714A04EfF4CbFffDBaf" + ], + base: [ + "0x85fa0A64c9D181226496A132BbBd1fc34116aAB9", + "0xc38E40C35469d8e226E6ef39ff6741b5d1ef3C96", + "0x6221452d88C21eC9D9Ea201191CEbEb47a758228", + "0x70408e74fF424866c4F3b537892393B0228ea26f", + "0xf9536Fe70c056f1d1220E5d73E1A2d8e9Ed770Ad", + "0x20F3A0a03bd4a53eD32A259252469a345F45CB91", + "0xc252d7692D9540DFb2be9932cfCf22b085dc81F8", + "0x0F5a1bb0AA76fFfe8216b9D659ae56d948F1c375", + "0x143e11dC78F8DCd39EDD70A90Baf89588a3a350B", + "0x9BA4b909E2B40706ff1cD209B34006FD73c42A6D", + "0x994c3586401a7fA10CA2E73136f7B7d1D251A640", + "0xd3cc1C60c8C90f0B8CBb6334Da7bdEc505C28255", + "0xc446F6d3178ccaAf919cB27D1C5FCc21C37f88dd" + ], + ethereum: [ + "0xFefb05EB5abc0c378120b93ff37CEc8af4872A18" + ], + optimism: [ + "0x4bBC0bFA0ea23fAec258924823bF9a3f870aAa95", + "0xA1185B84FF6F18C00234995E8BE5aA9e701bad82", + "0xfCAe29Da7c6cA5de03328E19f67E7b761ae39c15", + "0x62FA680af3B0F546624645D9E40eE77607D4cEc3", + "0x5Cdcc84bf78e89Da688d08a5d52100D0c33c751A" + ], + polygon: [ + "0x926b5A53A6fd4f11177e5c4781551d5E58d75C3C", + "0xBF279cc0d2E046F10D042F772dCe98B136f3B811" + ] +} + +const CommunityVaultsLLSD = { + arbitrum: [ + "0x449b72B665C28D6190ff08A21b2130CaCf06E1c8" // Aave wstETH + ], + avax: [ + "0xa460802fc6e7c1401B06078B332d5A1B52dff0D1", + "0x7402282F04740F2f8CE97eE426f90d6F800A3C21", + ], + base: [ + "0xC2cA42Ac871753d4623766581b7A963c2AD7209B", + "0x035569b57390a095b4b3f7754214b39CA3145C75", + "0xB3E741Ee16Df64eF9274261A397Df6Fd54073FFB" + ], + ethereum: [ + "0x954F286AEc288af89601F53e5D8727540ba2f00f", + "0x4184a083307a208f5bF20d0B44E161Bc55aae996" + ], + optimism: [ + "0x3796103d23D207fB5db2CFEc97fd7a0ac0A70D82", + "0xB2a74028CcCA97C4fA4686802246FdDEAa3A941B" + ], + polygon: [ + "0x8347B60460421EE565F3aC26DaFbAC9D2fE8930e" + ], +} + +async function tvl(_, _1, _2, { api }) { + /** Hyperstaking Community Vaults */ + const LLSDs = CommunityVaultsLLSD[api.chain] + /** LP Community Vaults */ + const LPVaults = CommunityVaultsLP[api.chain] + + return api.erc4626Sum({ calls: LLSDs.concat(LPVaults), isOG4626: true, }) +} + +module.exports = { + methodology: "For Hyperstaking, an onchain method calculates collateral + balance - debt. For LP, we can just calculate the value of LP tokens held in the vault" +} + +Object.keys(CommunityVaultsLP).forEach(chain => { + module.exports[chain] = { tvl } +}) \ No newline at end of file From 2f1c15038faf72442f6eca594e19d6085989db2f Mon Sep 17 00:00:00 2001 From: Centure2222 <161669395+Centure2222@users.noreply.github.com> Date: Wed, 6 Mar 2024 06:14:22 +0700 Subject: [PATCH 012/168] Update Cellana finance - Fix err text and add CELL token balances (#9190) * add cellana aptos tvl * minor fix * Fix err text and add CELL token balance * minor refactor * lint fix --------- Co-authored-by: HS Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/cellana/index.js | 51 ++++++++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/projects/cellana/index.js b/projects/cellana/index.js index 1de1562fcbb7..5d2acc955e99 100644 --- a/projects/cellana/index.js +++ b/projects/cellana/index.js @@ -1,24 +1,49 @@ -const sdk = require("@defillama/sdk"); const { getResources, } = require("../helper/chain/aptos"); -const { transformBalances } = require("../helper/portedTokens"); - -let resourcesCache +const ADDRESSES = require('../helper/coreAssets.json') +const CELL_fungible_asset_address = '0x2ebb2ccac5e027a87fa0e2e5f656a3a4238d6a48d93ec9b610d570fc0aa0df12' +const APT_fungible_asset_address = '0xedc2704f2cef417a06d1756a04a16a9fa6faaed13af469be9cdfcac5a21a8e2e' async function _getResources() { + let resourcesCache; if (!resourcesCache) resourcesCache = getResources("0x3b38735644d0be8ac37ebd84a1e42fa5c2487495ef8782f6c694b1a147f82426") return resourcesCache } + const extractCoinAddress = (str) => str.slice(str.indexOf("<") + 1, str.lastIndexOf(">")); const reserveContrainerFilter = (i) => i.type.includes("0x1::coin::CoinStore") +async function _getCELLbalances(api) { + const data = await getResources('0x4bf51972879e3b95c4781a5cdcb9e1ee24ef483e7d22f2d903626f126df62bd1') + const poolsAddresses = data.find(i => i.type.includes('::liquidity_pool::LiquidityPoolConfigs'))?.data.all_pools?.inline_vec + for (const pool of poolsAddresses) { + const fungibleAssetPoolStore = (await getResources(pool.inner)).find(i => i.type.includes('liquidity_pool::LiquidityPool'))?.data + const fungibleAssetAddressToken1 = fungibleAssetPoolStore?.token_store_1?.inner + const fungibleAssetAddressToken2 = fungibleAssetPoolStore?.token_store_2?.inner + + const fungibleAssetTokenStore_1 = (await getResources(fungibleAssetAddressToken1)).find(i => i.type.includes('fungible_asset::FungibleStore'))?.data + const fungibleAssetTokenStore_2 = (await getResources(fungibleAssetAddressToken2)).find(i => i.type.includes('fungible_asset::FungibleStore'))?.data + const token_1_address = fungibleAssetTokenStore_1?.metadata?.inner + const token_2_address = fungibleAssetTokenStore_2?.metadata?.inner + if (token_1_address == CELL_fungible_asset_address) { + addBalance(token_2_address, fungibleAssetTokenStore_2?.balance || 0); + } else if (token_2_address == CELL_fungible_asset_address) { + addBalance(token_1_address, fungibleAssetTokenStore_1?.balance || 0); + } + } + + async function addBalance(token, balance) { + if (token === APT_fungible_asset_address) + api.add(ADDRESSES.aptos.APT, balance) + } +} + module.exports = { timetravel: false, misrepresentedTokens: true, methodology: - "Counts the lamports in each coin container in the Aries contract account.", + "Counts the lamports in each coin container in the Cellena contract account.", aptos: { - tvl: async () => { - const balances = {}; + tvl: async (_, _1, _2, { api }) => { const data = await _getResources() const coinContainers = data.filter(reserveContrainerFilter) .map((i) => ({ @@ -27,11 +52,9 @@ module.exports = { })); coinContainers.forEach(({ lamports, tokenAddress }) => { - sdk.util.sumSingleBalance(balances, tokenAddress, lamports); + api.add(tokenAddress, lamports); }); - - return transformBalances("aptos", balances); - }, - - }, -}; + await _getCELLbalances(api) + } + } +} \ No newline at end of file From 66825827d3baad9e57bfba9dd9c67b0e827410bb Mon Sep 17 00:00:00 2001 From: 0xngmi <80541789+0xngmi@users.noreply.github.com> Date: Wed, 6 Mar 2024 00:31:29 +0000 Subject: [PATCH 013/168] doublecount lrt --- projects/ether-fi/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/ether-fi/index.js b/projects/ether-fi/index.js index 8c9ec5901846..1b67838b4c16 100644 --- a/projects/ether-fi/index.js +++ b/projects/ether-fi/index.js @@ -2,6 +2,7 @@ const { nullAddress } = require("../helper/unwrapLPs"); const sdk = require('@defillama/sdk') module.exports = { + doublecounted: true, ethereum: { tvl: async (timestamp) => { const api = new sdk.ChainApi({ timestamp, chain: 'optimism' }) From f2b7671470ad945ac87a0a445a92b9ccf75d297f Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Wed, 6 Mar 2024 00:36:48 +0000 Subject: [PATCH 014/168] add doublecounted to lrts --- projects/claystack/index.js | 1 + projects/genesis-lrt/index.js | 1 + projects/inception-lrt/index.js | 1 + projects/kelp-dao/index.js | 1 + projects/prime-staked/index.js | 1 + projects/renzo/index.js | 1 + projects/restake-finance/index.js | 1 + projects/swell-restaking/index.js | 1 + projects/unieth/index.js | 1 + 9 files changed, 9 insertions(+) diff --git a/projects/claystack/index.js b/projects/claystack/index.js index 51dbb99a3c00..f77c1f98800d 100644 --- a/projects/claystack/index.js +++ b/projects/claystack/index.js @@ -12,6 +12,7 @@ async function getTvlOnEthereum(_, block, _1, { api }) { } module.exports = { + doublecounted: true, hallmarks: [ [1707315338,"Split Adapter"] ], diff --git a/projects/genesis-lrt/index.js b/projects/genesis-lrt/index.js index 246ea24f21ab..a2c89e2f614c 100644 --- a/projects/genesis-lrt/index.js +++ b/projects/genesis-lrt/index.js @@ -6,5 +6,6 @@ async function tvl(_, _b, _cb, { api, }) { } module.exports = { + doublecounted: true, ethereum: { tvl, }, } \ No newline at end of file diff --git a/projects/inception-lrt/index.js b/projects/inception-lrt/index.js index 2b4d0394a020..073e22208d94 100644 --- a/projects/inception-lrt/index.js +++ b/projects/inception-lrt/index.js @@ -9,5 +9,6 @@ async function tvl(_, _b, _cb, { api, }) { } module.exports = { + doublecounted: true, ethereum: { tvl, }, } \ No newline at end of file diff --git a/projects/kelp-dao/index.js b/projects/kelp-dao/index.js index 620478d7f203..43d9c72958f4 100644 --- a/projects/kelp-dao/index.js +++ b/projects/kelp-dao/index.js @@ -9,6 +9,7 @@ async function tvl(_, _1, _2, { api }) { } module.exports = { + doublecounted: true, methodology: "deposited LSTs in deposit pool, node delegator contracts and from them into eigenlayer strategy contracts", ethereum: { diff --git a/projects/prime-staked/index.js b/projects/prime-staked/index.js index d8bd3c3a7056..9e8ad0149e8e 100644 --- a/projects/prime-staked/index.js +++ b/projects/prime-staked/index.js @@ -9,6 +9,7 @@ async function tvl(_, _1, _2, { api }) { } module.exports = { + doublecounted: true, methodology: "Returns the total assets owned by primeETH", start: 19128047, diff --git a/projects/renzo/index.js b/projects/renzo/index.js index 74385d2e3d38..8f8fea5f03d6 100644 --- a/projects/renzo/index.js +++ b/projects/renzo/index.js @@ -11,6 +11,7 @@ async function tvl(_, _b, _cb, { api, }) { } module.exports = { + doublecounted: true, ethereum: { tvl, }, diff --git a/projects/restake-finance/index.js b/projects/restake-finance/index.js index 826e38e2eacb..2506b62d9f94 100644 --- a/projects/restake-finance/index.js +++ b/projects/restake-finance/index.js @@ -14,6 +14,7 @@ async function tvl(_1, _2, _3, { api }) { } module.exports = { + doublecounted: true, ethereum: { tvl, } diff --git a/projects/swell-restaking/index.js b/projects/swell-restaking/index.js index 5651cd5f3d7c..050426760eea 100644 --- a/projects/swell-restaking/index.js +++ b/projects/swell-restaking/index.js @@ -11,6 +11,7 @@ async function tvl(_, _b, _cb, { api, }) { } module.exports = { + doublecounted: true, ethereum: { tvl, }, diff --git a/projects/unieth/index.js b/projects/unieth/index.js index fefa981271cb..70551ef29f6a 100644 --- a/projects/unieth/index.js +++ b/projects/unieth/index.js @@ -18,6 +18,7 @@ async function tvl(_, _1, _2, { api }) { } module.exports = { + doublecounted: true, methodology: 'Counts the total ethers staked with RockX Staking Contract.', ethereum: { tvl, From 3aa9691d801cd453c94ab6929b5c06cd9a804992 Mon Sep 17 00:00:00 2001 From: Andy <92434329+IvanMacaron@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:18:44 +0800 Subject: [PATCH 015/168] add Lessgas (#8893) * add fetch * Change calculation method * add log * change tvl method * add * code refactor --------- Co-authored-by: evan Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/lessgas/abi.json | 4 ++++ projects/lessgas/index.js | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 projects/lessgas/abi.json create mode 100644 projects/lessgas/index.js diff --git a/projects/lessgas/abi.json b/projects/lessgas/abi.json new file mode 100644 index 000000000000..8099a753055f --- /dev/null +++ b/projects/lessgas/abi.json @@ -0,0 +1,4 @@ +{ + "balanceOf": "function balanceOf(address account) view returns (uint256)", + "totalSupply": "uint256:totalSupply" +} diff --git a/projects/lessgas/index.js b/projects/lessgas/index.js new file mode 100644 index 000000000000..56e7c8f7d47a --- /dev/null +++ b/projects/lessgas/index.js @@ -0,0 +1,16 @@ +const { getConfig } = require('../helper/cache') +const HOST = 'https://api2.lessgas.xyz' + +const staking = async (a, b, c, { api }) => { + let { data: { result } } = await getConfig('lessgas', `${HOST}/llama/staking`) + const tokensAndOwners = result.map(i => [i[1], i[0]]) + return api.sumTokens({ tokensAndOwners }) +} + +module.exports = { + methodology: "Get the amount of tokens in lessgas platform", + map: { + tvl: () => ({}), + staking, + } +}; From b8d94834ec831df9ccd2dd11e3120cee710a1af8 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 10:25:56 +0100 Subject: [PATCH 016/168] Add Blastoff TVL (#9204) * Add Blastoff TVL * Merge branch 'DefiLlama:main' into main * code refactor --- projects/blastoff/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/blastoff/index.js diff --git a/projects/blastoff/index.js b/projects/blastoff/index.js new file mode 100644 index 000000000000..82fc8af05e58 --- /dev/null +++ b/projects/blastoff/index.js @@ -0,0 +1,12 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') +const ADDRESSES = require('../helper/coreAssets.json') + +const LOCKED_STAKING = "0xd95773e5b1eedc7ff302a70acd0eb370927397d2"; +const NONLOCK_STAKING = "0xd9747a98624f0B64B4412632C420672E16432334"; + +module.exports = { + blast: { + tvl: sumTokensExport({ owners: [LOCKED_STAKING, NONLOCK_STAKING], tokens: [ADDRESSES.null, ADDRESSES.blast.USDB] }), + }, + methodology: "counts the amount of USDB and ETH locked in 2 staking contracts", +}; From fa2f3bf4017c0ab11328f83e1d0f5b0c7737b2f1 Mon Sep 17 00:00:00 2001 From: mandriuska <124680830+mandriuska@users.noreply.github.com> Date: Wed, 6 Mar 2024 11:27:18 +0200 Subject: [PATCH 017/168] adding Lenfi(Aada) V2 measuring (#9202) --- projects/aada/index.js | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/projects/aada/index.js b/projects/aada/index.js index 49115ff554d4..73780c8420dd 100644 --- a/projects/aada/index.js +++ b/projects/aada/index.js @@ -1,20 +1,30 @@ -const { sumTokensExport, } = require("../helper/chain/cardano"); +const { sumTokensExport } = require("../helper/chain/cardano"); const scriptAdresses = [ - 'addr1zy9940grv28qxz9k82l9gmqd80vfd8a2734e35yzsz9cqktfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9smq5w00', //request.hs -- Request created. Lender to fund - 'addr1zykhtew0z93z6hmgu2ew7kl9puqz0wmafp0f3jypuejkwmrfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9skq4p22', //collateral.hs -- Loan funded. Borrower to repay - 'addr1zxfgvtfgp9476dhmq8fkm3x8wg20v33s6c9unyxmnpm0y5rfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st8q78h', //interest.hs -- Borrower repaid -- Lender to claim - 'addr1zxcjtxuc7mj8w6v9l3dfxvm30kxf78nzw387mqjqvszxr4mfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sp92046', //liquidation.hs -- Funds were liquidated. Borrower to claim - 'addr1zytwe3qhc0kf5k8yaur60cnhcxjg9zvfdnftp0rfu2czprtfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sgzwepc', //debt_request.hs -- Funds locked as liquidity deposits 'addr1z8tjrqy2dj5uk6her4ksltyxy2flzykktxkahzlahm9nwctfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st86ewu', //request.hs v2 -- Funds locked as liquidity deposits - 'addr1zyc7w5n699ews00yujnhw59g4nuzykuzgl5x6nzqp49zv5tfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sdyxnxc', //collateral.hs v2-- Funds locked as liquidity deposits - 'addr1zy6v8c7xdhftln7zk5uvt9h6jaknaxlx6hz5nkw63mpgwamfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sw9snf6', //debt_request.hs v2-- Funds locked as liquidity deposits + "addr1zy9940grv28qxz9k82l9gmqd80vfd8a2734e35yzsz9cqktfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9smq5w00", //request.hs -- Request created. Lender to fund + "addr1zykhtew0z93z6hmgu2ew7kl9puqz0wmafp0f3jypuejkwmrfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9skq4p22", //collateral.hs -- Loan funded. Borrower to repay + "addr1zxfgvtfgp9476dhmq8fkm3x8wg20v33s6c9unyxmnpm0y5rfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st8q78h", //interest.hs -- Borrower repaid -- Lender to claim + "addr1zxcjtxuc7mj8w6v9l3dfxvm30kxf78nzw387mqjqvszxr4mfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sp92046", //liquidation.hs -- Funds were liquidated. Borrower to claim + "addr1zytwe3qhc0kf5k8yaur60cnhcxjg9zvfdnftp0rfu2czprtfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sgzwepc", //debt_request.hs -- Funds locked as liquidity deposits 'addr1z8tjrqy2dj5uk6her4ksltyxy2flzykktxkahzlahm9nwctfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9st86ewu', //request.hs v2 -- Funds locked as liquidity deposits + "addr1zyc7w5n699ews00yujnhw59g4nuzykuzgl5x6nzqp49zv5tfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sdyxnxc", //collateral.hs v2-- Funds locked as liquidity deposits + "addr1zy6v8c7xdhftln7zk5uvt9h6jaknaxlx6hz5nkw63mpgwamfjcnq9fczt4qkxgec2hz6x7f38vnj8xuxywk4x4qgzh9sw9snf6", //debt_request.hs v2-- Funds locked as liquidity deposits + "script1xt5vpt33fm6tu3fvz65enpnlvmg6z7gle9evktmuwn3c6gjfc7p", // Pool contract + "script1nwvlaa0wnf43wzjp3xv738k6myam74dlrlh027mq20trg3ng772", // Collateral contract + "script1sqscxzh7mkzlmgf98k3tuadkds8xt3yzzj8t3jnfpypukld9xck", // Leftovers contract ]; module.exports = { - methodology: 'Counts amount of AADA staked; by a price of ADA sitting in the orderbook.', + methodology: + "Calculates the total of idle tokens held in pool contracts or collateral tokens secured in the collateral contract.", timetravel: false, cardano: { - staking: sumTokensExport({ owner: 'addr1wyvej5rmcrhfpcwrwmnqsjtwvf8gv3dn64vwy3xzekp95wqqhdkwa' , tokens: ['8fef2d34078659493ce161a6c7fba4b56afefa8535296a5743f6958741414441']}), - tvl: sumTokensExport({ scripts: scriptAdresses, }) - } + staking: sumTokensExport({ + owner: "addr1wyvej5rmcrhfpcwrwmnqsjtwvf8gv3dn64vwy3xzekp95wqqhdkwa", + tokens: [ + "8fef2d34078659493ce161a6c7fba4b56afefa8535296a5743f6958741414441", + ], + }), + tvl: sumTokensExport({ scripts: scriptAdresses }), + }, + hallmarks: [[1708560053, "V2 Launch"]], }; From 5686d3ce21e9f7c335b0694d2cac8dd0d10b88f8 Mon Sep 17 00:00:00 2001 From: hoomp3 Date: Wed, 6 Mar 2024 04:31:50 -0500 Subject: [PATCH 018/168] Update Juice Finance (#9201) * feat: add new collateral vault and strategy vault * Add sumTokens2 function and update tvl calculation --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/juice-finance/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/projects/juice-finance/index.js b/projects/juice-finance/index.js index 96dff86f3810..c10b38692437 100644 --- a/projects/juice-finance/index.js +++ b/projects/juice-finance/index.js @@ -1,9 +1,17 @@ const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens2 } = require('../helper/unwrapLPs') const LENDING_POOL = "0x4A1d9220e11a47d8Ab22Ccd82DA616740CF0920a" const COLLATERAL_VAULT = "0x6301795aa55B90427CF74C18C8636E0443F2100b" +const COLLATERAL_VAULT_V2 = "0x105e285f1a2370D325046fed1424D4e73F6Fa2B0" + +const vaults = [ + // This vault holds a Thruster LP token, but it is not being priced. + ["0x12c69BFA3fb3CbA75a1DEFA6e976B87E233fc7df", "0x72E4ce9b7cC5d9C017F64ad58e512C253a11d30a"], + [ADDRESSES.blast.WETH, "0x4A355D57fc1A5eEB33C0a19539744A2144220027"] +] async function tvl(timestamp, _, _1, { api }) { - return api.sumTokens({ tokensAndOwners: [[ADDRESSES.blast.USDB, LENDING_POOL], [ADDRESSES.blast.WETH, COLLATERAL_VAULT]] }) + return sumTokens2({ api, resolveLP: true, tokensAndOwners: [[ADDRESSES.blast.USDB, LENDING_POOL], [ADDRESSES.blast.WETH, COLLATERAL_VAULT], [ADDRESSES.blast.WETH, COLLATERAL_VAULT_V2], ...vaults] }) } module.exports = { From 44b5fb49109feb1e38838f3232a81913809e55f0 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 10:53:43 +0100 Subject: [PATCH 019/168] unwrap aSTETH --- projects/alongside/index.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/projects/alongside/index.js b/projects/alongside/index.js index 260ce31848a4..6ef3b93a8b26 100644 --- a/projects/alongside/index.js +++ b/projects/alongside/index.js @@ -1,19 +1,21 @@ -const sdk = require("@defillama/sdk"); -const { sumTokensExport } = require("../helper/unwrapLPs"); +const { sumTokens2 } = require("../helper/unwrapLPs") +const ADDRESSES = require('../helper/coreAssets.json') -const INDEX = "0xF17A3fE536F8F7847F1385ec1bC967b2Ca9caE8D"; +async function tvl(_, block, _cb, { api }) { + const aSTETH = "0x27C2B9fd547EAd2c05C305BeE2399A55811257c2" + const vault = "0xf3bCeDaB2998933c6AAD1cB31430D8bAb329dD8C" + const astBal = await api.call({ abi: 'erc20:balanceOf', target: aSTETH, params: vault }) + const stethBal = await api.call({ abi: 'erc20:balanceOf', target: ADDRESSES.ethereum.STETH, params: aSTETH }) + const astethSupply = await api.call({ abi: 'erc20:totalSupply', target: aSTETH }) + api.add(ADDRESSES.ethereum.STETH, stethBal * astBal / astethSupply) -async function tvl(_, block, _cb) { - const balances = {} - const supply = await sdk.api2.abi.call({ abi: 'uint256:totalSupply', target: INDEX, block }) - sdk.util.sumSingleBalance(balances, INDEX, supply, 'ethereum') - return balances + return sumTokens2({ api, owner: vault, fetchCoValentTokens: true, blacklistedTokens: [aSTETH] }) } module.exports = { methodology: "Data is retrieved from calculation of market price and total supply", ethereum: { - tvl: sumTokensExport({ owner: '0xf3bCeDaB2998933c6AAD1cB31430D8bAb329dD8C', fetchCoValentTokens: true }), + tvl, }, }; From a1d1cee669a20edd8fb60a0145020810b8780d89 Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 6 Mar 2024 11:20:55 +0000 Subject: [PATCH 020/168] add binance btc wallet (#9206) --- projects/binance/config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/binance/config.js b/projects/binance/config.js index 5a3ddbdc0780..31ffc805951d 100644 --- a/projects/binance/config.js +++ b/projects/binance/config.js @@ -76,6 +76,7 @@ const assetList = [ ['BTC', 'BTC', '3NjHh71XgjikBoTNYdWgXiNeZcLaKNThgb'], ['BTC', 'BTC', '3Qxak1CZhLyZ7GVckKphLURdLBCjMfz9bA'], ['BTC', 'BTC', 'bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h'], + ['BTC', 'BTC', '3E97AjYaCq9QYnfFMtBCYiCEsN956Rvpj2'], // added on 06/03/2024 ['BTC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], ['BTC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], ['BTC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], From 7bf9a91e66fb83a92b640a67e4d94648fee9390a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:07:53 +0100 Subject: [PATCH 021/168] fix broken adapters --- package-lock.json | 6 +-- projects/ambient-finance/index.js | 2 +- projects/elektrik/index.js | 2 +- projects/helper/chain/cosmos.js | 2 +- projects/helper/env.js | 2 + projects/orbitbridge/index.js | 87 ++++++++++++------------------- 6 files changed, 41 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33ecfd2a767e..496134da871d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -886,9 +886,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.37", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.37.tgz", - "integrity": "sha512-V+3bpkkU5fiHVDwcerk+aqozxYrPJ9aunNb4KbXO4CSB9YmCA23QJn+3EEP9e5iikjVmnlFCeIOVViMB86LkYQ==", + "version": "5.0.38", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.38.tgz", + "integrity": "sha512-XhcqNwaKvbnXwcHO+oIUx5vcdP/PpkdtNHAPR7sdZ5vjnAvSQgSMCgSqH0qu0gvqiJgblULdqJ5rf77QSIAHgg==", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@supercharge/promise-pool": "^2.1.0", diff --git a/projects/ambient-finance/index.js b/projects/ambient-finance/index.js index e2cd418141e9..351eace028d3 100644 --- a/projects/ambient-finance/index.js +++ b/projects/ambient-finance/index.js @@ -12,7 +12,7 @@ const vault = { const subgraphs = { scroll: 'https://ambindexer.net/scroll-gcgo/pool_list?chainId=0x82750', blast: 'https://ambindexer.net/blast-gcgo/pool_list?chainId=0x13e31', - canto: "https://canto-subgraph.plexnode.wtf/subgraphs/name/ambient-graph", + canto: "https://ambient-graphcache.fly.dev/gcgo/pool_list?chainId=0x1e14", ethereum: `https://api.thegraph.com/subgraphs/name/crocswap/croc-mainnet` } diff --git a/projects/elektrik/index.js b/projects/elektrik/index.js index 3a92a6946f3e..5e2a28a80ab1 100644 --- a/projects/elektrik/index.js +++ b/projects/elektrik/index.js @@ -10,7 +10,7 @@ const query = `{ }` async function tvl(_, _b, _cb, { api, }) { - const { pools } = await cachedGraphQuery('elektrik', 'https://subgraph.elektrik.network/subgraphs/name/ELEKTRIK-GRAPH', query) + const { pools } = await cachedGraphQuery('elektrik-1', 'https://subgraph.elektrik.network/subgraphs/name/ELEKTRIK-GRAPH', query) const ownerTokens = pools.map(i => [[i.token0.id, i.token1.id], i.id]) return sumTokens2({ api, ownerTokens, }) } diff --git a/projects/helper/chain/cosmos.js b/projects/helper/chain/cosmos.js index 30312372cffa..b63b7e145e77 100644 --- a/projects/helper/chain/cosmos.js +++ b/projects/helper/chain/cosmos.js @@ -25,7 +25,7 @@ const endPoints = { stargaze: "https://rest.stargaze-apis.com", quicksilver: "https://rest.cosmos.directory/quicksilver", persistence: "https://rest.cosmos.directory/persistence", - secret: "https://lcd.secret.express", + secret: "https://rpc.ankr.com/http/scrt_cosmos", // chihuahua: "https://api.chihuahua.wtf", injective: "https://sentry.lcd.injective.network:443", migaloo: "https://migaloo-api.polkachu.com", diff --git a/projects/helper/env.js b/projects/helper/env.js index 2b96673d1fa5..b41730d16d59 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -23,6 +23,8 @@ const DEFAULTS = { MERLIN_RPC: "https://rpc.merlinchain.io", MERLIN_RPC_MULTICALL: '0x830E7E548F4D80947a40A7Cf3a2a53166a0C3980', BITROCK_RPC_MULTICALL: '0x40DD0342A46Ab0893251211F6626E82c09A75345', + RONIN_RPC: 'https://api.roninchain.com/rpc', + ETHF_RPC: 'https://rpc.dischain.xyz/', } const ENV_KEYS = [ diff --git a/projects/orbitbridge/index.js b/projects/orbitbridge/index.js index 87badce66c3a..343d87768d15 100644 --- a/projects/orbitbridge/index.js +++ b/projects/orbitbridge/index.js @@ -1,5 +1,4 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require('@defillama/sdk') const { getConfig } = require('../helper/cache') const { sumTokensExport } = require('../helper/sumTokens') const { sumTokens2 } = require('../helper/unwrapLPs') @@ -40,72 +39,52 @@ const farms = { let tokenData -function chainTvls(chain) { - return async (timestamp, ethBlock, {[chain]: block}) => { - const vault = vaults[chain] - let targetChain = chain - if (chain === 'ethereum') targetChain = 'eth' - if (chain === 'polygon') targetChain = 'matic' +async function tvl(timestamp, ethBlock, _1, { api }) { + const chain = api.chain - const tokenListURL = 'https://bridge.orbitchain.io/open/v1/api/monitor/rawTokenList' - tokenData = tokenData || getConfig('orbit-bridge', tokenListURL) - const data = await tokenData + if (chain === 'meta') return {} // rpc issues with meta - let tokenList = data.origins.filter(x => x.chain === targetChain && !x.is_nft).map(x => x.address) - tokenList.push(nullAddress) - const balances = await sumTokens2({ owner: vault, tokens: tokenList, chain, block, blacklistedTokens: [ + const vault = vaults[chain] + let targetChain = chain + if (chain === 'ethereum') targetChain = 'eth' + if (chain === 'polygon') targetChain = 'matic' + + const tokenListURL = 'https://bridge.orbitchain.io/open/v1/api/monitor/rawTokenList' + tokenData = tokenData || getConfig('orbit-bridge', tokenListURL) + const data = await tokenData + + let tokenList = data.origins.filter(x => x.chain === targetChain && !x.is_nft).map(x => x.address) + tokenList.push(nullAddress) + await sumTokens2({ + api, + owner: vault, tokens: tokenList, blacklistedTokens: [ '0x662b67d00a13faf93254714dd601f5ed49ef2f51' // ORC, blacklist project's own token // reason for skipping, most of the tvl comes from this transaction which is about 25% of ORU supply on ETH // https://etherscan.io/tx/0x0a556fcef2a867421ec3941251ad3c10ae1402a23ddd9ad4b1097b686ced89f7 - ] }) + ] + }) - if (farms[chain]) { - const calls = farms[chain].map(i => ({ params: i })) - const { output: farmData } = await sdk.api.abi.multiCall({ - target: vault, - abi: ABI.farms, - calls, chain, block, - }) - const { output: farmBalance } = await sdk.api.abi.multiCall({ - abi: ABI.wantLockedTotal, - calls: farmData.map(i => ({ target: i.output})), - chain, block, - }) - farmBalance.forEach((data, i) => sdk.util.sumSingleBalance(balances, chain + ':' + farms[chain][i], data.output)) - } - return balances + if (farms[chain]) { + const calls = farms[chain] + const farmData = await api.multiCall({ target: vault, abi: ABI.farms, calls, }) + const farmBalance = await api.multiCall({ abi: ABI.wantLockedTotal, calls: farmData, }) + api.add(farms[chain], farmBalance) } } module.exports = { methodology: 'Tokens locked in Orbit Bridge contract are counted as TVL', timetravel: false, - bsc: { - tvl: chainTvls('bsc') - }, - celo: { - tvl: chainTvls('celo') - }, - heco: { - tvl: chainTvls('heco') - }, - ethereum: { - tvl: chainTvls('ethereum') - }, - klaytn: { - tvl: chainTvls('klaytn') - }, - polygon: { - tvl: chainTvls('polygon') - }, - meta: { - tvl: chainTvls('meta') - }, - wemix: { - tvl: chainTvls('wemix') - }, + bsc: { tvl }, + celo: { tvl }, + heco: { tvl }, + ethereum: { tvl }, + klaytn: { tvl }, + polygon: { tvl }, + meta: { tvl }, + wemix: { tvl }, ripple: { - tvl: sumTokensExport({ chain: 'ripple', owner: 'rLcxBUrZESqHnruY4fX7GQthRjDCDSAWia'}) + tvl: sumTokensExport({ chain: 'ripple', owner: 'rLcxBUrZESqHnruY4fX7GQthRjDCDSAWia' }) }, ton: { tvl: tonExport({ owner: "EQAtkbV8ysI75e7faO8Ihu0mFtmsg-osj7gmrTg_mljVRccy", tokens: [ADDRESSES.null], onlyWhitelistedTokens: true }), From 1f4aee72152cd58f50a8b8dd456d2c1d98d86c9b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 13:35:36 +0100 Subject: [PATCH 022/168] track velodrome slipstream --- projects/velodrome-CL/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 projects/velodrome-CL/index.js diff --git a/projects/velodrome-CL/index.js b/projects/velodrome-CL/index.js new file mode 100644 index 000000000000..f2b1fc3dc233 --- /dev/null +++ b/projects/velodrome-CL/index.js @@ -0,0 +1,15 @@ + +const {getUniTVL} = require('../helper/unknownTokens.js') +const config = { + optimism: { factory: '0x548118C7E0B865C2CfA94D15EC86B666468ac758'}, +} + +Object.keys(config).forEach(chain => { + const { factory } = config[chain] + module.exports[chain] = { + tvl: getUniTVL({ factory, fetchBalances: true, abis: { + allPairsLength: 'uint256:allPoolsLength', + allPairs: "function allPools(uint) view returns (address)", + } }) + } +}) From 09abeae51d25d2b474fa7058078ad04f217ce2dd Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 6 Mar 2024 21:32:53 +0800 Subject: [PATCH 023/168] Add lazyotter adapter (#9205) * add lazyotter project * modify methodology * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/lazyotter/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/lazyotter/index.js diff --git a/projects/lazyotter/index.js b/projects/lazyotter/index.js new file mode 100644 index 000000000000..ecefd5574151 --- /dev/null +++ b/projects/lazyotter/index.js @@ -0,0 +1,18 @@ +const aaveVaults = [ + '0x7100409baaeda121ab92f663e3ddb898f11ff745', + '0x844Ccc93888CAeBbAd91332FCa1045e6926a084d', +] + +async function tvl(_, _1, _2, { api }) { + const tokens = await api.multiCall({ abi: 'address:asset', calls: aaveVaults}) + const aTokens = await api.multiCall({ abi: 'address:aToken', calls: aaveVaults}) + const tokensAndOwners2 = [tokens.concat(aTokens), aaveVaults.concat(aaveVaults)] + return api.sumTokens({ tokensAndOwners2 }) +} + +module.exports = { + methodology: "TVL: Returns the total assets owned by the LazyOtter Vault on Scroll.", + scroll: { + tvl, + }, +}; From 5a47ac0ab733cfc2c40d47017f4312e49065f8e7 Mon Sep 17 00:00:00 2001 From: waynebruce0x Date: Wed, 6 Mar 2024 13:33:35 +0000 Subject: [PATCH 024/168] panther (#9208) --- projects/panther-protocol/index.js | 38 +++++++++++------------------- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/projects/panther-protocol/index.js b/projects/panther-protocol/index.js index aac98b333734..35d1b44d3549 100644 --- a/projects/panther-protocol/index.js +++ b/projects/panther-protocol/index.js @@ -1,32 +1,22 @@ -const { staking } = require("../helper/staking"); -const { sumTokens2 } = require('../helper/unwrapLPs') - +const { stakings } = require("../helper/staking"); const contracts = { polygon: { - core: '0x9A06Db14D639796B25A6ceC6A1bf614fd98815EC', + core: "0x9A06Db14D639796B25A6ceC6A1bf614fd98815EC", + staking: [ + "0x4cec451f63dbe47d9da2debe2b734e4cb4000eac", + "0x5e7fda6d9f5024c4ad1c780839987ab8c76486c9", + ], }, ethereum: { - core: '0x909E34d3f6124C324ac83DccA84b74398a6fa173', - staking: '0xf4d06d72dacdd8393fa4ea72fdcc10049711f899' - } + core: "0x909E34d3f6124C324ac83DccA84b74398a6fa173", + staking: ["0xf4d06d72dacdd8393fa4ea72fdcc10049711f899"], + }, }; -const blacklistedTokens = []; - -function getTVLFunc(contractAddress, chain) { - return async function (timestamp, _, { [chain]: block }, { api }) { - return sumTokens2({ owner: contractAddress, fetchCoValentTokens: true, blacklistedTokens, api }) - } -} - -function getChainTVL(chain) { - return { - staking: contracts[chain].staking ? staking(contracts[chain].staking, contracts[chain].core) : undefined, - tvl: getTVLFunc(contracts[chain].proxy, chain), +Object.keys(contracts).forEach((chain) => { + module.exports[chain] = { + tvl: () => ({}), + staking: stakings(contracts[chain].staking, contracts[chain].core), }; -} - -Object.keys(contracts).forEach(chain => { - module.exports[chain] = getChainTVL(chain) -}) +}); From 9a8efb5abb416c39705f1122e50412c327db0654 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:54:09 +0100 Subject: [PATCH 025/168] Update kamino lending markets (#9211) * Fetch kamino lend markets dynamically * kamino: cache api response --------- Co-authored-by: peroxy --- projects/kamino-lending/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/kamino-lending/index.js b/projects/kamino-lending/index.js index a96980b94248..d753a48fd7db 100644 --- a/projects/kamino-lending/index.js +++ b/projects/kamino-lending/index.js @@ -3,11 +3,12 @@ const { getConnection, sumTokens } = require('../helper/solana'); const { Program } = require('@project-serum/anchor'); const kaminoIdl = require('./kamino-lending-idl.json'); const { MintLayout } = require("../helper/utils/solana/layouts/mixed-layout"); +const { getConfig } = require('../helper/cache') async function tvl() { const connection = getConnection(); const programId = new PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD'); - const markets = ['7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF', 'DxXdAyU3kCjnyggvHmY5nAwg5cRbbmdyX3npfDMjjMek']; + const markets = (await getConfig('kamino-lending', 'https://api.kamino.finance/v2/kamino-market')).map(x => x.lendingMarket); const lendingMarketAuthSeed = 'lma'; const tokensAndOwners = []; const ktokens = {}; From e6bef7d9e5740b5cf049d980f896e4ddae47c370 Mon Sep 17 00:00:00 2001 From: Brdd Mnk Date: Wed, 6 Mar 2024 15:56:53 +0200 Subject: [PATCH 026/168] new project Kaisen (#9209) * new LP contract address * code refactor * new CALM contract * new project kaisen * Remove unused import statement --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/kaisen/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/kaisen/index.js diff --git a/projects/kaisen/index.js b/projects/kaisen/index.js new file mode 100644 index 000000000000..0be9976071ec --- /dev/null +++ b/projects/kaisen/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); + +module.exports = { + methodology: "TVL comes from the Vaults", + blast: { + tvl: sumTokensExport({ + owner: "0xd97cbc833643dc458849d5b96dea100f13b08402", + resolveUniV3: true, + }), + }, +}; From dd28cacd4fae0ae7dd4d5050f2e41c6278d7258e Mon Sep 17 00:00:00 2001 From: Dozer <71271486+dev-dozer@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:09:12 +0200 Subject: [PATCH 027/168] added manta chain (#9212) --- projects/interport-finance/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/interport-finance/index.js b/projects/interport-finance/index.js index 47d2358e1989..6590b7562234 100644 --- a/projects/interport-finance/index.js +++ b/projects/interport-finance/index.js @@ -15,7 +15,7 @@ module.exports = { methodology: 'Interport TVL is calculated by summing the USDT and USDC balance of the vaults contracts, ITP token balance in the ITP Revenue Share contract and LP token balance in the LP Revenue Share contract.', }; -['ethereum', 'avax', 'bsc', 'fantom', 'arbitrum', 'polygon', 'polygon_zkevm', 'base', 'era', 'optimism', 'linea', 'eon', 'op_bnb', 'scroll'].forEach(chain => { +['ethereum', 'avax', 'bsc', 'fantom', 'arbitrum', 'polygon', 'polygon_zkevm', 'base', 'era', 'optimism', 'linea', 'eon', 'op_bnb', 'scroll', 'manta'].forEach(chain => { module.exports[chain] = { tvl: async (_, _1, _2, { api }) => { const vaults = config[chain]?.vaults || defaultVaults From a0c90ae35bd2f659dc156afb62dd32a1132d544b Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:25:32 +0000 Subject: [PATCH 028/168] Poly (#9213) * add binance btc wallet * new api endpoint polynomial trade --- projects/polynomial-trade/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/polynomial-trade/index.js b/projects/polynomial-trade/index.js index 60777d2987b5..31dfb2e3a12b 100644 --- a/projects/polynomial-trade/index.js +++ b/projects/polynomial-trade/index.js @@ -2,7 +2,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const { get } = require('../helper/http'); // api -const BASE_URL = "https://perps-api-experimental.polynomial.fi/snx-perps/tvl"; +const BASE_URL = "https://perps-v2-mainnet.polynomial.fi/snx-perps/tvl"; async function tvl (timestamp, ethBlock) { const perpApi = await get(BASE_URL); From ed7003abb8d53b3e434af0c137b1155c05886254 Mon Sep 17 00:00:00 2001 From: WarlockDeFi <142273979+WarlockDeFi@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:04:06 +0000 Subject: [PATCH 029/168] Update BlastNYAN contracts (#9215) --- projects/BlastNYAN/index.js | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/projects/BlastNYAN/index.js b/projects/BlastNYAN/index.js index f2091ad9f3e3..7ee4c57fe1a1 100644 --- a/projects/BlastNYAN/index.js +++ b/projects/BlastNYAN/index.js @@ -5,16 +5,29 @@ const BLNYAN_WETH_SLP = '0x0E9309f32881899F6D4aC2711c6E21367A84CA26' const stakingBLNYANContract = '0xA76D6dc805d0EbEcb3787c781ce3A18feEF020cb' const feeDistro = '0xBC8a7a845cC7A8246EB34856Afe6f1a3d62BD9C6' -const stakeLpEarnWeth = '0x0a3A757BE3049C2d9444d025E98D37b2a81a0a32' +const stakeLpEarnWeth = '0xF63Ef9F4320f9d16731a40ff1f58a966ee086806' const button = '0x00066Ed6c2F7d6CC6e66c678BaEE2C8683B632e6' +const lockPoints = '0x46B3a66ef4fAC801B455884035eF2862F01e6158' const opts = { useDefaultCoreAssets: true, lps: [BLNYAN_WETH_SLP] } module.exports = { misrepresentedTokens: true, blast: { - tvl: sumTokensExport({ owners: [stakeLpEarnWeth, feeDistro, button], tokens: [WETH], ...opts, }), - pool2: sumTokensExport({ ...opts, owners: [stakeLpEarnWeth], tokens: [BLNYAN_WETH_SLP], }), - staking: sumTokensExport({ owners: [stakingBLNYANContract], tokens: [BLNYAN], ...opts, }), + tvl: sumTokensExport({ + owners: [lockPoints, feeDistro, button], + tokens: [WETH], + ...opts, + }), + pool2: sumTokensExport({ + ...opts, + owners: [stakeLpEarnWeth], + tokens: [BLNYAN_WETH_SLP], + }), + staking: sumTokensExport({ + owners: [stakingBLNYANContract, lockPoints], + tokens: [BLNYAN], + ...opts, + }), }, methodology: 'Counts as TVL the ETH only. blNYAN and LP assets deposited are counted as Pool2 and staking Respectively', From d672695bfbbdbe9f7620d3303defb29ad6af2012 Mon Sep 17 00:00:00 2001 From: DackieSwap <132213730+DackieSwap@users.noreply.github.com> Date: Wed, 6 Mar 2024 23:04:32 +0700 Subject: [PATCH 030/168] DackieSwap Update Blast chain Factory Address (#9216) * update staking dackie * update arbitrum * update blast * update blast factory --------- Co-authored-by: andreapn.eth --- projects/dackieswap-v2/index.js | 2 +- projects/dackieswap/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/dackieswap-v2/index.js b/projects/dackieswap-v2/index.js index 33477e746154..e7043afc9640 100644 --- a/projects/dackieswap-v2/index.js +++ b/projects/dackieswap-v2/index.js @@ -34,7 +34,7 @@ module.exports = { }, blast: { tvl: getUniTVL({ - factory: "0x757cD583004400ee67e5cC3c7A60C6a62E3F6d30", + factory: "0xF5190E64dB4cbf7ee5E72B55cC5b2297e20264c2", useDefaultCoreAssets: true, fetchBalances: true }) diff --git a/projects/dackieswap/index.js b/projects/dackieswap/index.js index d4038adba0e4..f1960c087f73 100644 --- a/projects/dackieswap/index.js +++ b/projects/dackieswap/index.js @@ -4,5 +4,5 @@ module.exports = uniV3Export({ base: { factory: "0x3D237AC6D2f425D2E890Cc99198818cc1FA48870", fromBlock: 2031627 }, optimism: { factory: "0xc2BC7A73613B9bD5F373FE10B55C59a69F4D617B", fromBlock: 115172042 }, arbitrum: { factory: "0xaEdc38bD52b0380b2Af4980948925734fD54FbF4", fromBlock: 180722131 }, - blast: { factory: "0xB9010964301326160173da694c0697a2FcE82F39", fromBlock: 286237 }, + blast: { factory: "0xd1575B2e0C82fba9Eddc3de9c9AAF923AFA670cC", fromBlock: 286237 }, }); \ No newline at end of file From b9b6e8d9df6a8f768635ff527f8bb1d254b95222 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 21:46:36 +0100 Subject: [PATCH 031/168] venus: track ethereum --- projects/venus-isolated-pools/index.js | 14 ++++++++++---- projects/venus.js | 4 +++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/projects/venus-isolated-pools/index.js b/projects/venus-isolated-pools/index.js index 7b51fbceb9f9..a2201f8a065c 100644 --- a/projects/venus-isolated-pools/index.js +++ b/projects/venus-isolated-pools/index.js @@ -4,6 +4,11 @@ const { compoundExports2 } = require('../helper/compound') const config = { bsc: { endpoint: 'https://api.thegraph.com/subgraphs/name/venusprotocol/venus-isolated-pools', + corePools: ['0xfd36e2c2a6789db23113685031d7f16329158384'], + }, + ethereum: { + endpoint: 'https://api.thegraph.com/subgraphs/name/venusprotocol/venus-isolated-pools-ethereum', + corePools: ['0x67aA3eCc5831a65A5Ba7be76BED3B5dc7DB60796'], } } @@ -12,9 +17,10 @@ Object.keys(config).forEach(chain => { }) async function getPools(api) { - const { endpoint } = config[api.chain] - const { pools } = await cachedGraphQuery('venus-v4', endpoint, `{ pools { id }}`) - return pools.map(i => i.id) + const { endpoint, corePools } = config[api.chain] + const poolSet = new Set(corePools.map(i=>i.toLowerCase())) + const { pools } = await cachedGraphQuery('venus-v4/'+api.chain, endpoint, `{ pools { id }}`) + return pools.map(i => i.id).filter(i => !poolSet.has(i.toLowerCase())) } async function tvl(...args) { @@ -29,4 +35,4 @@ async function borrowed(...args) { const pools = await getPools(api) const tvls = pools.map(i => compoundExports2({ comptroller: i, fetchBalances: true, })) return sdk.util.sumChainTvls(tvls.map(i => i.borrowed))(...args) -} \ No newline at end of file +} diff --git a/projects/venus.js b/projects/venus.js index 29dfd3d48def..687adb0e3674 100644 --- a/projects/venus.js +++ b/projects/venus.js @@ -1,5 +1,5 @@ const ADDRESSES = require('./helper/coreAssets.json') -const {fullCoumpoundExports} = require('./helper/compound'); +const {fullCoumpoundExports, compoundExports2} = require('./helper/compound'); const replace = { [ADDRESSES.bsc.BETH]: ADDRESSES.ethereum.WETH, // beth->weth @@ -9,3 +9,5 @@ const replace = { module.exports = fullCoumpoundExports("0xfd36e2c2a6789db23113685031d7f16329158384", "bsc", "0xA07c5b74C9B40447a954e1466938b865b6BBea36", ADDRESSES.bsc.WBNB, addr=>{ return replace[addr.toLowerCase()] || `bsc:${addr}` }) + +module.exports.ethereum = compoundExports2({ comptroller: '0x67aA3eCc5831a65A5Ba7be76BED3B5dc7DB60796'}) \ No newline at end of file From fa294f6d3c2d45e729c7e00ede0a2d734fd533a1 Mon Sep 17 00:00:00 2001 From: 0xFantomMenace <93462858+0xFantomMenace@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:55:41 -0600 Subject: [PATCH 032/168] adds Ironclad (#9221) * adds Ironclad * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/ironclad/index.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 projects/ironclad/index.js diff --git a/projects/ironclad/index.js b/projects/ironclad/index.js new file mode 100644 index 000000000000..bec88f197b66 --- /dev/null +++ b/projects/ironclad/index.js @@ -0,0 +1,5 @@ +const { aaveExports } = require('../helper/aave') + +module.exports = { + mode: aaveExports("mode", "0x5C93B799D31d3d6a7C977f75FDB88d069565A55b"), +} From 65068eab6a317607aaa846e1380683126e01e6ca Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 6 Mar 2024 22:00:09 +0100 Subject: [PATCH 033/168] minor fix (#9222) * Added MANTA chain to QuickSwap * Added astar zkevm * Revert "Added astar zkevm" This reverts commit 5a0877643a0feeb50a82beae60d8e4bc9771e09c. * Merge pull request #1 from DefiLlama/main Taking commits from base repo * Added astar zkevm * minor fix --- projects/helper/chains.json | 1 + projects/quickswap-v3/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 63cca3c070f6..6d2ad0b4ebfa 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -10,6 +10,7 @@ "archway", "area", "astar", + "astrzk", "aura", "aurora", "avax", diff --git a/projects/quickswap-v3/index.js b/projects/quickswap-v3/index.js index 1adf75e416db..dffac32d4881 100644 --- a/projects/quickswap-v3/index.js +++ b/projects/quickswap-v3/index.js @@ -5,6 +5,7 @@ module.exports = uniV3Export({ dogechain: { factory: '0xd2480162aa7f02ead7bf4c127465446150d58452', fromBlock: 837574, isAlgebra: true, }, polygon_zkevm: { factory: '0x4B9f4d2435Ef65559567e5DbFC1BbB37abC43B57', fromBlock: 300, isAlgebra: true, }, manta: { factory: '0x56c2162254b0E4417288786eE402c2B41d4e181e', fromBlock: 357492, }, + astrzk: { factory: '0x56c2162254b0E4417288786eE402c2B41d4e181e', fromBlock: 93668, }, }) async function tvl(_, _b, _cb, { api, }) { From 4f6c721ed53446d416ead5408864ced3aaa7f837 Mon Sep 17 00:00:00 2001 From: Ken Date: Thu, 7 Mar 2024 05:01:29 +0800 Subject: [PATCH 034/168] update tvl methodology (#9218) --- projects/lazyotter/index.js | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/projects/lazyotter/index.js b/projects/lazyotter/index.js index ecefd5574151..a547924edf50 100644 --- a/projects/lazyotter/index.js +++ b/projects/lazyotter/index.js @@ -1,17 +1,14 @@ -const aaveVaults = [ - '0x7100409baaeda121ab92f663e3ddb898f11ff745', - '0x844Ccc93888CAeBbAd91332FCa1045e6926a084d', -] +const aaveVaults = ["0x7100409baaeda121ab92f663e3ddb898f11ff745", "0x844Ccc93888CAeBbAd91332FCa1045e6926a084d"]; async function tvl(_, _1, _2, { api }) { - const tokens = await api.multiCall({ abi: 'address:asset', calls: aaveVaults}) - const aTokens = await api.multiCall({ abi: 'address:aToken', calls: aaveVaults}) - const tokensAndOwners2 = [tokens.concat(aTokens), aaveVaults.concat(aaveVaults)] - return api.sumTokens({ tokensAndOwners2 }) + const tokens = await api.multiCall({ abi: "address:asset", calls: aaveVaults }); + const aTokens = await api.multiCall({ abi: "address:aToken", calls: aaveVaults }); + const tokensAndOwners2 = [tokens.concat(aTokens), aaveVaults.concat(aaveVaults)]; + return api.sumTokens({ tokensAndOwners2 }); } module.exports = { - methodology: "TVL: Returns the total assets owned by the LazyOtter Vault on Scroll.", + methodology: "Returns the total assets owned by the LazyOtter Vault on Scroll.", scroll: { tvl, }, From 1ac03ec8685106b7afe586261aaa66e17f05585e Mon Sep 17 00:00:00 2001 From: helloworld <1641346965@qq.com> Date: Thu, 7 Mar 2024 05:02:37 +0800 Subject: [PATCH 035/168] Feature/mufex (#9217) * Add eth and tron owners to mufex * Add tron owners to mufex * add bsc contract address * add bsc contract address --------- Co-authored-by: felix --- projects/mufex/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/mufex/index.js b/projects/mufex/index.js index 54eb4431c03e..8ca57725dbb9 100644 --- a/projects/mufex/index.js +++ b/projects/mufex/index.js @@ -4,6 +4,7 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const owners = [ '0x763ecd00eEA0CDAECBDF97d88c3e0fd5457eE5A0', '0x16BEDB2Ab2aEf9023ff2cbF0C78135cA120c03C6', + '0x60b4B5e9FAc430698faE838D83bb7941d0fce5A2', ] module.exports = { From 17b3117fc748d37b66b1331c4088b0ab4b342a5c Mon Sep 17 00:00:00 2001 From: t0rbik <90512605+t0rbik@users.noreply.github.com> Date: Wed, 6 Mar 2024 23:10:44 +0100 Subject: [PATCH 036/168] add graphene on base fantom and mantle (#9223) --- projects/graphene/index.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 projects/graphene/index.js diff --git a/projects/graphene/index.js b/projects/graphene/index.js new file mode 100644 index 000000000000..40134689483e --- /dev/null +++ b/projects/graphene/index.js @@ -0,0 +1,37 @@ +const { getLogs } = require("../helper/cache/getLogs"); +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const config = { + base: { + fromBlock: 5314581, + controller: "0xfbF069Dbbf453C1ab23042083CFa980B3a672BbA", + }, + fantom: { + fromBlock: 69969086, + controller: "0xf37102e11E06276ac9D393277BD7b63b3393b361", + }, + mantle: { + fromBlock: 18438182, + controller: "0x7900f766F06e361FDDB4FdeBac5b138c4EEd8d4A", + }, +}; + +Object.keys(config).forEach((chain) => { + const { controller, fromBlock } = config[chain]; + module.exports[chain] = { + tvl: async (_, _b, _cb, { api }) => { + const logs = await getLogs({ + api, + target: controller, + topic: "PairCreated(uint128,address,address)", + eventAbi: + "event PairCreated(uint128 indexed pairId, address indexed token0, address indexed token1)", + onlyArgs: true, + fromBlock, + }); + const tokens = logs.map((i) => [i.token0, i.token1]).flat(); + + return sumTokens2({ api, owner: controller, tokens }); + }, + }; +}); From d2fe61a85a0e614e2ed0cb08f1b37a9805c90f02 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 7 Mar 2024 02:53:40 +0000 Subject: [PATCH 037/168] nova treasury --- projects/treasury/arbitrum-dao.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/treasury/arbitrum-dao.js b/projects/treasury/arbitrum-dao.js index 6df34d8b96c7..21244835499d 100644 --- a/projects/treasury/arbitrum-dao.js +++ b/projects/treasury/arbitrum-dao.js @@ -17,4 +17,10 @@ module.exports = treasuryExports({ owners: [treasury, l1_surplus_fees, l2_surplus_fees, l2_base_fees, l2_treasury_timelock], ownTokens: [ARB], }, + arbitrum_nova: { + tokens: [ + nullAddress, + ], + owners: ["0x509386DbF5C0BE6fd68Df97A05fdB375136c32De", "0x3B68a689c929327224dBfCe31C1bf72Ffd2559Ce", "0x9fCB6F75D99029f28F6F4a1d277bae49c5CAC79f"], + }, }) From f3cef99a13dd35b3c34a336f72808b15faa64467 Mon Sep 17 00:00:00 2001 From: Rodrigo Eduardo Date: Thu, 7 Mar 2024 06:17:10 -0300 Subject: [PATCH 038/168] feat: add aeUSDC-sUSDT pair (#9224) --- projects/bitflow/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/bitflow/index.js b/projects/bitflow/index.js index ffd2235fb2fe..374ed12d9ca8 100644 --- a/projects/bitflow/index.js +++ b/projects/bitflow/index.js @@ -7,7 +7,8 @@ const PAIRS = [ `${BITFLOW_ADDRESS}.stableswap-stx-ststx-v-1-2`, `${BITFLOW_ADDRESS}.stableswap-usda-susdt-v-1-2`, `${BITFLOW_ADDRESS}.stableswap-abtc-xbtc-v-1-2`, -] + `${BITFLOW_ADDRESS}.stableswap-aeusdc-susdt-v-1-2`, +]; module.exports = { stacks: { From ece2e483d7c719eeb131abdcab0ca63859b0f885 Mon Sep 17 00:00:00 2001 From: SpaceFi <82010251+SpaceFinance@users.noreply.github.com> Date: Thu, 7 Mar 2024 17:18:21 +0800 Subject: [PATCH 039/168] Add blaspace (#9229) --- projects/blaspace/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/blaspace/index.js diff --git a/projects/blaspace/index.js b/projects/blaspace/index.js new file mode 100644 index 000000000000..0e20eac4850a --- /dev/null +++ b/projects/blaspace/index.js @@ -0,0 +1,11 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +module.exports = { + misrepresentedTokens: true, + blast: { + tvl: getUniTVL({ + factory: '0xCAb98fEd113d403EbD9E294D80Bf92E3f19ddD57', + useDefaultCoreAssets: true, + }) + }, +}; From 35c7a61caca060a08b172a79407e84185cabd346 Mon Sep 17 00:00:00 2001 From: Gyffindo Slymewl Date: Thu, 7 Mar 2024 16:22:54 +0700 Subject: [PATCH 040/168] Update csix staking v3 (#9225) * add csix project with tvl and staking * add hallmarks * code refactor * add csix staking v3 --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/csix/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/csix/index.js b/projects/csix/index.js index c2889d89a1cc..8794252628ab 100644 --- a/projects/csix/index.js +++ b/projects/csix/index.js @@ -1,17 +1,22 @@ const CSIX_TOKEN = "0x04756126F044634C9a0f0E985e60c88a51ACC206"; const STAKING_CONTRACT_V1 = "0xadc743298F6339Cd8ebC0Dc58D4E19C2065D6b4f"; const STAKING_CONTRACT_V2 = "0xA4f55D251b8fa8e0C291CC539F020c5Cbe4a9FA8"; +const STAKING_CONTRACT_V3 = "0x7c7C76e4D47872A7B73FA15306A9Ebb673796dDc"; async function staking(_, _1, _2, { api }) { - const staked = await api.multiCall({ abi: "uint256:totalStaked", calls: [STAKING_CONTRACT_V1, STAKING_CONTRACT_V2,] }) - staked.forEach(i => api.add(CSIX_TOKEN, i)) - return api.getBalances() + const staked = await api.multiCall({ + abi: "uint256:totalStaked", + calls: [STAKING_CONTRACT_V1, STAKING_CONTRACT_V2, STAKING_CONTRACT_V3], + }); + staked.forEach((i) => api.add(CSIX_TOKEN, i)); + return api.getBalances(); } module.exports = { hallmarks: [ [1676338485, "Staking V1"], [1700652398, "Staking V2"], + [1708909450, "Staking V3"], ], bsc: { tvl: () => ({}), From 272ad37ce9561b7c0a64994941b90c7a20506e7a Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:25:14 +0100 Subject: [PATCH 041/168] code refactor (#9230) * Add Alien Finance Adapter * code refactor --- projects/alien-finance/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/alien-finance/index.js diff --git a/projects/alien-finance/index.js b/projects/alien-finance/index.js new file mode 100644 index 000000000000..2ccc980a9259 --- /dev/null +++ b/projects/alien-finance/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require("../helper/unwrapLPs") +const ADDRESSES = require('../helper/coreAssets.json') + +const owner = "0x50454acC07bf8fC78100619a1b68e9E8d28cE022" + +module.exports = { + blast: { + tvl: sumTokensExport({ owner, tokens: [ADDRESSES.blast.USDB, ADDRESSES.blast.WETH]}), + }, + start: 1709630412, +}; From 1f0b314c3d4d237d51ad2078335c9423bf7f8019 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:38:56 +0100 Subject: [PATCH 042/168] Add chromatic protocol, change TVL, and refactor code (#9232) * add chromatic protocol * change tvl * code refactor --------- Co-authored-by: kayden-fi --- projects/chromatic-protocol/index.js | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 projects/chromatic-protocol/index.js diff --git a/projects/chromatic-protocol/index.js b/projects/chromatic-protocol/index.js new file mode 100644 index 000000000000..56a44a83938b --- /dev/null +++ b/projects/chromatic-protocol/index.js @@ -0,0 +1,51 @@ +const ADDRESSES = require("../helper/coreAssets.json") + +const config = { + arbitrum: { + marketFactory: '0x0b216AB26E20d6caA770B18596A3D53B683638B4', + lpRegistry: '0xc337325525eF17B7852Fd36DA400d3F9eEd51A4a', + tokens: { + USDT: ADDRESSES.arbitrum.USDT, + }, + vault: "0x19631A51aeDcd831E29cbCbCfe77010dAfd3343a", + pools: { + USDT: [ + { + name: "crescendo long & short ( deprecated )", + address: "0xAD6FE0A0d746aEEEDEeAb19AdBaDBE58249cD0c7", + }, + { + name: "plateau long & short ( deprecated )", + address: "0xFa334bE13bA4cdc5C3D9A25344FFBb312d2423A2", + }, + { + name: "decrescendo long & short ( deprecated )", + address: "0x9706DE4B4Bb1027ce059344Cd42Bb57E079f64c7", + } + ], + }, + }, +} + + +Object.keys(config).forEach(chain => { + const { tokens, vault, pools, marketFactory, lpRegistry } = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const settlementTokens = await api.call({ abi: abi.registeredSettlementTokens, target: marketFactory }) + const lpAddressesBySettlementToken = await api.multiCall({ abi: abi.lpListBySettlementToken, calls: settlementTokens, target: lpRegistry }) + const ownerTokens = settlementTokens.map((settlementToken, i) => lpAddressesBySettlementToken[i].map(j => [[settlementToken], j])).flat() + ownerTokens.push([Object.values(tokens), vault]) + if (pools) { + const _tokens = Object.values(tokens) + Object.values(pools).forEach(i => i.forEach(p => ownerTokens.push([_tokens, p.address]))) + } + return api.sumTokens({ ownerTokens }) + } + } +}) + +const abi = { + "registeredSettlementTokens": "address[]:registeredSettlementTokens", + "lpListBySettlementToken": "function lpListBySettlementToken(address token) view returns (address[])" +} \ No newline at end of file From 587171e3977574a21edefb555c4f507f557ba5a7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:48:29 +0100 Subject: [PATCH 043/168] Add Monroe Protocol TVL calculation (#9233) * feat: monroeprotocol * code refactor --- projects/monroeprotocol/index.js | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 projects/monroeprotocol/index.js diff --git a/projects/monroeprotocol/index.js b/projects/monroeprotocol/index.js new file mode 100644 index 000000000000..8d34dd536539 --- /dev/null +++ b/projects/monroeprotocol/index.js @@ -0,0 +1,45 @@ +const { createIncrementArray } = require("../helper/utils"); +const { getLogs } = require('../helper/cache/getLogs') + +// Controllers[chain] +const CONTROLLERS = { + manta: "0xCc396B83Baba70c85FBB8f44B64e7e43aE810232", +} + + +async function tvl(_, _1, _2, { api }) { + const logs = await getLogs({ + api, + target: CONTROLLERS[api.chain], + eventAbi: "event CreatedSynth(address newSynth, string name, address oracle)", + onlyArgs: true, + fromBlock: 1548740 + }); + const synthAddresses = logs.map(log => log.newSynth); + + const vaultLength = await api.call({ abi: "uint:getVaultsLength", target: CONTROLLERS[api.chain] }) + const vaultCalls = createIncrementArray(vaultLength) + + const owners = [] + const tokens = [] + await Promise.all(synthAddresses.map(async (synth) => { + const vaults = await api.multiCall({ abi: "function mintVaults(uint vaultId) view returns (address)", calls: vaultCalls, target: synth}) + const _tokens = await api.multiCall({ abi: 'address:collateralAsset', calls: vaults}) + tokens.push(..._tokens) + owners.push(...vaults) + })) + + return api.sumTokens({ tokensAndOwners2: [tokens, owners]}) +} + + + +module.exports = { + methodology: + "Adds up the total value locked as collateral in Monroe vaults", + start: 1709510400, // Monday, March 4, 2024 00:00 GMT +}; + +Object.keys(CONTROLLERS).forEach((chain) => { + module.exports[chain] = { tvl }; +}); From aaedc204b39715a4c60cd9ed956cfa9220762cc1 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Mar 2024 10:53:52 +0100 Subject: [PATCH 044/168] Add stability adapter and refactor code (#9234) * stability adapter * code refactor --- projects/stability/index.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 projects/stability/index.js diff --git a/projects/stability/index.js b/projects/stability/index.js new file mode 100644 index 000000000000..52843fc4205b --- /dev/null +++ b/projects/stability/index.js @@ -0,0 +1,28 @@ +const abi = { + "vaultAddresses": "function vaultAddresses() view returns (address[] memory vaultAddress)", + "strategy": "address:strategy", + "assetsAmounts": "function assetsAmounts() view returns (address[] memory assets, uint[] memory amounts)" +} + +const config = { + polygon: { + vaultManager: '0x6008b366058B42792A2497972A3312274DC5e1A8', + }, +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: async function (_, _1, _2, { api }) { + // Stability Platform Vaults + // Get all vaults + const vaults = await api.call({ abi: abi.vaultAddresses, target: config[chain].vaultManager }); + + // Get strategy addresses + const strategies = await api.multiCall({ abi: abi.strategy, calls: vaults, }) + + // Get all assets amounts managed by strategies + const assetsAmountsAll = await api.multiCall({ abi: abi.assetsAmounts, calls: strategies, }) + assetsAmountsAll.forEach(([assets, amounts]) => api.add(assets, amounts)) + }, + } +}) \ No newline at end of file From f14ff7b5f12b1bba596f112ef4094b45acb1aae6 Mon Sep 17 00:00:00 2001 From: 0xggoma Date: Thu, 7 Mar 2024 19:11:13 +0900 Subject: [PATCH 045/168] Add blast chain for mint-club-v2 (#9235) --- projects/mint-club-v2/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/mint-club-v2/index.js b/projects/mint-club-v2/index.js index fcac528b43d8..2127a2a6f222 100644 --- a/projects/mint-club-v2/index.js +++ b/projects/mint-club-v2/index.js @@ -7,13 +7,14 @@ module.exports = { const V2_BOND_CONTRACTS = { avax: "0x3Fd5B4DcDa968C8e22898523f5343177F94ccfd1", + blast: "0x621c335b4BD8f2165E120DC70d3AfcAfc6628681", } const ownTokens = { bsc: ['0x1f3Af095CDa17d63cad238358837321e95FC5915'] } -const chains = ['avax', 'ethereum', 'optimism', 'arbitrum', 'polygon', 'bsc', 'base'] +const chains = ['avax', 'ethereum', 'optimism', 'arbitrum', 'polygon', 'bsc', 'base', 'blast'] chains.forEach(chain => { const BOND_CONTRACT = V2_BOND_CONTRACTS[chain] ?? '0xc5a076cad94176c2996B32d8466Be1cE757FAa27' From 657a4d758d905557b478b86ba319605f9f1a3c0c Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Thu, 7 Mar 2024 12:21:31 +0000 Subject: [PATCH 046/168] binance wallets march (#9236) --- projects/binance/config.js | 963 +++++++++++++++++++------------------ 1 file changed, 492 insertions(+), 471 deletions(-) diff --git a/projects/binance/config.js b/projects/binance/config.js index 31ffc805951d..ca614fff4b4b 100644 --- a/projects/binance/config.js +++ b/projects/binance/config.js @@ -4,477 +4,492 @@ const { getUniqueAddresses } = require('../helper/utils') // taken from https://www.binance.com/en/blog/community/our-commitment-to-transparency-2895840147147652626 const assetList = [ - ['1INCH', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['1INCH', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['1INCH', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['1INCH', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['1INCH', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], - ['1INCH', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['1INCH', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['APT', 'APT', '0x5bd7de5c56d5691f32ea86c973c73fec7b1445e59736c97158020018c080bb00'], - ['APT', 'APT', '0x80174e0fe8cb2d32b038c6c888dd95c3e1560736f0d4a6e8bed6ae43b5c91f6f'], - ['APT', 'APT', '0xae1a6f3d3daccaf77b55044cea133379934bba04a11b9d0bbd643eae5e6e9c70'], - ['APT', 'APT', '0xd91c64b777e51395c6ea9dec562ed79a4afa0cd6dad5a87b187c37198a1f855a'], - ['APT', 'APT', '0xed8c46bec9dbc2b23c60568f822b95b87ea395f7e3fdb5e3adc0a30c55c0a60e'], - ['ARB', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], - ['ARB', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['ARB', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['BNB', 'BEP2', 'bnb142q467df6jun6rt5u2ar58sp47hm5f9wvz2cvg'], - ['BNB', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['BNB', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['BNB', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], - ['BNB', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['BNB', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], - ['BNB', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], - ['BNB', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], - ['BNB', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], - ['BNB', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], - ['BNB', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['BNB', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], - ['BNB', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['BNB', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], - ['BNB', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['BNB', 'BEP20', '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8'], - ['BNB', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], - ['BNB', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], - ['BNB', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], - ['BNB', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['BNB', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['BNB', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['BNB', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['BNB', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['BTC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['BTC', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['BTC', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['BTC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['BTC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['BTC', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['BTC', 'BTC', '1PJiGp2yDLvUgqeBsuZVCBADArNsk6XEiw'], - ['BTC', 'BTC', '1Pzaqw98PeRfyHypfqyEgg5yycJRsENrE7'], - ['BTC', 'BTC', '34GUzCVLbdkMQ2UdVTaA4nxPwoovVS7y2J'], - ['BTC', 'BTC', '34HpHYiyQwg69gFmCq2BGHjF1DZnZnBeBP'], - ['BTC', 'BTC', '34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo'], - ['BTC', 'BTC', '36zSLdRv1jyewjaC12fqK5fptn7PqewunL'], - ['BTC', 'BTC', '38DN2uFMZPiHLHJigfv4kWC9JWJrNnhLcn'], - ['BTC', 'BTC', '38Xnrq8MZiKmYmwobbYdZQ5nnCbX1qvQfE'], - ['BTC', 'BTC', '395vnFScKQ1ay695C6v7gf89UzoFpx3WuJ'], - ['BTC', 'BTC', '39884E3j6KZj82FK4vcCrkUvWYL5MQaS3v'], - ['BTC', 'BTC', '3AeUiDpPPUrUBS377584sFCpx8KLfpX9Ry'], - ['BTC', 'BTC', '3AtnehKDkFPC1bKvdrEVPSRGCtxQH8F1R8'], - ['BTC', 'BTC', '3CySuFKbBS29M7rE5iJakZRNqb3msMeFoN'], - ['BTC', 'BTC', '3EVVc8e2rxwUuERtdJCduWig8DnpsUqyA6'], - ['BTC', 'BTC', '3FHNBLobJnbCTFTVakh5TXmEneyf5PT61B'], - ['BTC', 'BTC', '3HdGoUTbcztBnS7UzY4vSPYhwr424CiWAA'], - ['BTC', 'BTC', '3JFJPpH8Chwo7CDbyYQ4XcfgcjEP1FGRMJ'], - ['BTC', 'BTC', '3JJmF63ifcamPLiAmLgG96RA599yNtY3EQ'], - ['BTC', 'BTC', '3LQUu4v9z6KNch71j7kbj8GPeAGUo1FW6a'], - ['BTC', 'BTC', '3LcgLHzTvjLKBixBvkKGiadtiw2GBSKKqH'], - ['BTC', 'BTC', '3LtrsjtyLsHoG8WQMe2RFw3de4pLTQZNcY'], - ['BTC', 'BTC', '3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6'], - ['BTC', 'BTC', '3Me9QACjioepv2L2oKTC9QQ87NH6vFe1Zj'], - ['BTC', 'BTC', '3NXCvmLGz9SxYi6TnjbBQfQMcwiZ1iQETa'], - ['BTC', 'BTC', '3NjHh71XgjikBoTNYdWgXiNeZcLaKNThgb'], - ['BTC', 'BTC', '3Qxak1CZhLyZ7GVckKphLURdLBCjMfz9bA'], - ['BTC', 'BTC', 'bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h'], - ['BTC', 'BTC', '3E97AjYaCq9QYnfFMtBCYiCEsN956Rvpj2'], // added on 06/03/2024 - ['BTC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['BTC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['BTC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['BTC', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['BUSD', 'AVAX', '0x9f8c163cba728e99993abe7495f06c0a3c8ac8b9'], - ['BUSD', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['BUSD', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], - ['BUSD', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['BUSD', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], - ['BUSD', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], - ['BUSD', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], - ['BUSD', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], - ['BUSD', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], - ['BUSD', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['BUSD', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], - ['BUSD', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['BUSD', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], - ['BUSD', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['BUSD', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], - ['BUSD', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], - ['BUSD', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], - ['BUSD', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['BUSD', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['BUSD', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['BUSD', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['BUSD', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['BUSD', 'ETH', '0x9696f59e4d72e237be84ffd425dcad154bf96976'], - ['BUSD', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['BUSD', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], - ['BUSD', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], - ['BUSD', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], - ['BUSD', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], - ['CHR', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['CHR', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['CHR', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['CHR', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['CHR', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['CHR', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['CHR', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['CHR', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], - ['CHR', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['CHR', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['CHZ', 'BEP2', 'bnb142q467df6jun6rt5u2ar58sp47hm5f9wvz2cvg'], - ['CHZ', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['CHZ', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], - ['CHZ', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['CHZ', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['CHZ', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['CHZ', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['CRV', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['CRV', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['CRV', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['CRV', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['CVP', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['CVP', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['CVP', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['CVP', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['CVP', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['CVP', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['CVP', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['CVP', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['DOGE', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['DOGE', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['DOGE', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['DOGE', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['DOGE', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['DOGE', 'BEP20', '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8'], - ['DOGE', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['DOGE', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['DOGE', 'DOGE', 'D73RQLGWW9TBT2AKspEP24wLiXFrXvnTqX'], - ['DOGE', 'DOGE', 'D7D2f2WuEkwhTWqBkisZ5sM3JagaBcNWBs'], - ['DOGE', 'DOGE', 'D7JLeAgZK2TyFRFtjKwHMxhFjWvJ9gS5kj'], - ['DOGE', 'DOGE', 'D7QZnXec5bkMyokPFPh6v4WAw5VF5TocAy'], - ['DOGE', 'DOGE', 'D7bg2iUG3UiHuTWjRqcjdJiEjHrsFASsjw'], - ['DOGE', 'DOGE', 'D7dm1b8DEqaCxcgaPuBXz9FqjAQ7UTK6sz'], - ['DOGE', 'DOGE', 'DAYthKnkrWUHRENvtBwjemi6kFzk4K9SMr'], - ['DOGE', 'DOGE', 'DCxFJEWsYJFnC3HP7YfZdsd3X43ttQA79Z'], - ['DOGE', 'DOGE', 'DD1h9ojoyAdAGLXaqgqZP3j86AtxZs6jCn'], - ['DOGE', 'DOGE', 'DD6K5pfaPd93ri5x67PzVVUS8Cui3rRoBe'], - ['DOGE', 'DOGE', 'DE5opaXjFgDhFBqL6tBDxTAQ56zkX6EToX'], - ['DOGE', 'DOGE', 'DEvUEF9VrXbKf5rdaQCUzeh4MvZxd3Zx5T'], - ['DOGE', 'DOGE', 'DFyohYD3bMXCEg1TdMfdy1J7dYfK4shhPf'], - ['DOGE', 'DOGE', 'DGYUcgNQAAMzXynRHJJVAKkgXWhSddJNi2'], - ['DOGE', 'DOGE', 'DGiYKUGbzRtppwdoinym7ZJXWuBqBuHxUk'], - ['DOGE', 'DOGE', 'DHiKVUMdaAm43NMh2wMSfn7xtmUmfKSSNE'], - ['DOGE', 'DOGE', 'DJRaDXkewtLgwL9EZyTkWQEsxuyBUaveKU'], - ['DOGE', 'DOGE', 'DJfU2p6woQ9GiBdiXsWZWJnJ9uDdZfSSNC'], - ['DOGE', 'DOGE', 'DLqwvgk27ACJnHPEGxyDfspieHBVYJRZiC'], - ['DOGE', 'DOGE', 'DN9NrgYzgh6AtNmTUFThqRxhbyoNWhG6iD'], - ['DOGE', 'DOGE', 'DPAMdZsSirVBGeDR9sE1LJXkwG6AQSNAMW'], - ['DOGE', 'DOGE', 'DPKKpanH1hMVzdWb2oi126znjruvvGRQzj'], - ['DOGE', 'DOGE', 'DQYqMYmQCfL2eDLmMXV5uvCPkN6Vv4KtSx'], - ['DOGE', 'DOGE', 'DQkwksfYrAWAR9tRcqygA5pihmnURozxzo'], - ['DOGE', 'DOGE', 'DQnhnNxW89AkFHDsT6aWHim4DvtzwF9sGo'], - ['DOGE', 'DOGE', 'DRuYd74gqPuQD9HKEBDxRr9gSogQmdj9DH'], - ['DOGE', 'DOGE', 'DRweGdMgohChLBn2TamjCNicKYEncRgj5a'], - ['DOGE', 'DOGE', 'DTSop4ycWkpmDqpncVZ3jwKp3z7B4kW4T3'], - ['DOGE', 'DOGE', 'DU8gPC5mh4KxWJARQRxoESFark2jAguBr5'], - ['DOT', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['DOT', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['DOT', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['DOT', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['DOT', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['DOT', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['DOT', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['DOT', 'DOT', '16ZL8yLyXv3V3L3z9ofR1ovFLziyXaN1DPq4yffMAZ9czzBD'], - ['DOT', 'DOT', '1743nDTMZisPgBCYSAgkUn1kVG7MePc9rvMEjoRNf4ipVkF'], - ['DOT', 'DOT', '1qnJN7FViy3HZaxZK9tGAA71zxHSBeUweirKqCaox4t8GT7'], - ['DOT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['DOT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['DOT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['DOT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['ENJ', 'ENJ', 'enC1zkqfU5X4x84LMKSzcRdsSSiF7M1Nt7ovm62jRXr78uT1h'], - ['ENJ', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['ENJ', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['ENJ', 'ETH', '0x56eddb7aa87536c09ccc2793473599fd21a8b17f'], - ['ENJ', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['ENJ', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['ETH', 'ARB', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], - ['ETH', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], - ['ETH', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['ETH', 'BASE', '0x3304e22ddaa22bcdc5fca2269b418046ae7b566a'], - ['ETH', 'BASE', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], - ['ETH', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['ETH', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['ETH', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], - ['ETH', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['ETH', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], - ['ETH', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], - ['ETH', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], - ['ETH', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], - ['ETH', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['ETH', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], - ['ETH', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['ETH', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], - ['ETH', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['ETH', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['ETH', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['ETH', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['ETH', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['ETH', 'ETH', '0x4976a4a02f38326660d17bf34b431dc6e2eb2327'], - ['ETH', 'ETH', '0x56eddb7aa87536c09ccc2793473599fd21a8b17f'], - ['ETH', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['ETH', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], - ['ETH', 'ETH', '0x9696f59e4d72e237be84ffd425dcad154bf96976'], - ['ETH', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], - ['ETH', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['ETH', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['ETH', 'OP', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], - ['ETH', 'OP', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], - ['ETH', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], - ['FDUSD', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['FDUSD', 'BEP20', '0x835678a611B28684005a5e2233695fB6cbbB0007'], - ['FDUSD', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['FDUSD', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['FDUSD', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['FDUSD', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['FDUSD', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['FDUSD', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['FDUSD', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], - ['FDUSD', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['FDUSD', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['GRT', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['GRT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['GRT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['GRT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['GRT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['HFT', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['HFT', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['HFT', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['HFT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['HFT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['HFT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['HFT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['LINK', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['LINK', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['LINK', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['LINK', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['LINK', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['LINK', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['LINK', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['LINK', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['LINK', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['LINK', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], - ['LINK', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['LINK', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['LTC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['LTC', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['LTC', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['LTC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['LTC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['LTC', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['LTC', 'LTC', 'LZEjckteAtWrugbsy9zU8VHEZ4iUiXo9Nm'], - ['LTC', 'LTC', 'LbmGksLBwtwRXyxeazCZqKiAHX6cWN2AzN'], - ['LTC', 'LTC', 'LhzEoDXHXASi4hSMxrKeVoSGrED9QsBpPq'], - ['LTC', 'LTC', 'M8T1B2Z97gVdvmfkQcAtYbEepune1tzGua'], - ['LTC', 'LTC', 'MB8nnFMvR5cgvpzQ1QXTDVfUM91BcsLH3k'], - ['LTC', 'LTC', 'MBjKmoDwkuUbtnVd4vjymxjJx7Crca2s1z'], - ['LTC', 'LTC', 'MDwD5wYdeuoisfoaWKgeHK4Gq3YkbaCypJ'], - ['LTC', 'LTC', 'MEhAHYijouCinmGKL6n1bRTXYznH1X24rD'], - ['LTC', 'LTC', 'MG9aFQgTH5C4UPcur8S2bh5duKYMfaJFUS'], - ['LTC', 'LTC', 'MGvUTN1PuWgBxuoFgTfkk4eJDzYgRivR8F'], - ['LTC', 'LTC', 'MJto5wFLrE9t4TDXCgdSet8W6mxYqGijC3'], - ['LTC', 'LTC', 'MJwFHGandYUFJTTHHSXg3q6u7ge4af1n4N'], - ['LTC', 'LTC', 'MLkNzCps6cXou2DELVfxDuRC4uZGwr397o'], - ['LTC', 'LTC', 'MQd1fJwqBJvwLuyhr17PhEFx1swiqDbPQS'], - ['LTC', 'LTC', 'MSeDRiNoH5Afr9b9rNo837hYzpxBXXqMZf'], - ['LTC', 'LTC', 'MWGTiJBNEQSfxTCrdC2VKEa55Lck27wr67'], - ['LTC', 'LTC', 'MWkX1ZaFbrRPtcQvVpjvigxWU17JoinePy'], - ['MASK', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['MASK', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['MASK', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['MASK', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['MASK', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['MASK', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['MASK', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['MASK', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['MASK', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['MATIC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['MATIC', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], - ['MATIC', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], - ['MATIC', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['MATIC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['MATIC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['MATIC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['MATIC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['MATIC', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['MATIC', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], - ['MATIC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['MATIC', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['MATIC', 'MATIC', '0x082489a616ab4d46d1947ee3f912e080815b08da'], - ['MATIC', 'MATIC', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], - ['MATIC', 'MATIC', '0x835678a611B28684005a5e2233695fB6cbbB0007'], - ['MATIC', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], - ['MATIC', 'MATIC', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['OP', 'OP', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], - ['OP', 'OP', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], - ['OP', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], - ['SHIB', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], - ['SHIB', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], - ['SHIB', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['SHIB', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['SHIB', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], - ['SHIB', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], - ['SHIB', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['SHIB', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['SHIB', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['SHIB', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['SHIB', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['SHIB', 'ETH', '0x4976a4a02f38326660d17bf34b431dc6e2eb2327'], - ['SHIB', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['SHIB', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], - ['SHIB', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['SHIB', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['SOL', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['SOL', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['SOL', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['SOL', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['SOL', 'SOL', '2ojv9BAiHUrvsm9gxDe7fJSzbNZSJcxZvf8dqmWGHG8S'], - ['SOL', 'SOL', '3gd3dqgtJ4jWfBfLYTX67DALFetjc5iS72sCgRhCkW2u'], - ['SOL', 'SOL', '3yFwqXBfZY4jBVUafQ1YEXw189y2dN3V5KQq9uzBDy1E'], - ['SOL', 'SOL', '5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9'], - ['SOL', 'SOL', '6QJzieMYfp7yr3EdrePaQoG3Ghxs2wM98xSLRu8Xh56U'], - ['SOL', 'SOL', '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM'], - ['SSV', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['SSV', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['SSV', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['SSV', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['TUSD', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['TUSD', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['TUSD', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['TUSD', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['TUSD', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['TUSD', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['TUSD', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['TUSD', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['TUSD', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], - ['TUSD', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], - ['TUSD', 'TRX', 'TWd4WrZ9wn84f5x1hZhL4DHvk738ns5jwb'], - ['UNI', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['UNI', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['UNI', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['UNI', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['UNI', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['UNI', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['UNI', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['UNI', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['UNI', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], - ['UNI', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['UNI', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDC', 'ALGO', 'MTCEM5YJJSYGW2RCXYXGE4SXLSPUUEJKQAWG2GUX6CNN72KQ3XPJCM6NOI'], - ['USDC', 'ALGO', 'QYXDGS2XJJT7QNR6EJ2YHNZFONU6ROFM6BKTBNVT63ZXQ5OC6IYSPNDJ4U'], - ['USDC', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], - ['USDC', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDC', 'AVAX', '0x9f8c163cba728e99993abe7495f06c0a3c8ac8b9'], - ['USDC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['USDC', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], - ['USDC', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['USDC', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['USDC', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], - ['USDC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['USDC', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], - ['USDC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['USDC', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['USDC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['USDC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['USDC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['USDC', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDC', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], - ['USDC', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], - ['USDC', 'RON', '0xb32e9a84ae0b55b8ab715e4ac793a61b277bafa3'], - ['USDC', 'SOL', '2ojv9BAiHUrvsm9gxDe7fJSzbNZSJcxZvf8dqmWGHG8S'], - ['USDC', 'SOL', '5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9'], - ['USDC', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], - ['USDC', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], - ['USDC', 'TRX', 'TWd4WrZ9wn84f5x1hZhL4DHvk738ns5jwb'], - ['USDC', 'XLM', 'GBAIA5U6E3FSRUW55AXACIVGX2QR5JYAS74OWLED3S22EGXVYEHPLGPA'], - ['USDC', 'XLM', 'GC5LF63GRVIT5ZXXCXLPI3RX2YXKJQFZVBSAO6AUELN3YIMSWPD6Z6FH'], - ['USDT', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], - ['USDT', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDT', 'AVAX', '0x4aefa39caeadd662ae31ab0ce7c8c2c9c0a013e8'], - ['USDT', 'AVAX', '0x9f8c163cba728e99993abe7495f06c0a3c8ac8b9'], - ['USDT', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['USDT', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['USDT', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], - ['USDT', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['USDT', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], - ['USDT', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], - ['USDT', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], - ['USDT', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], - ['USDT', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], - ['USDT', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], - ['USDT', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], - ['USDT', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], - ['USDT', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['USDT', 'BEP20', '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8'], - ['USDT', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], - ['USDT', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], - ['USDT', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], - ['USDT', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['USDT', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['USDT', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['USDT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['USDT', 'ETH', '0x56eddb7aa87536c09ccc2793473599fd21a8b17f'], - ['USDT', 'ETH', '0x9696f59e4d72e237be84ffd425dcad154bf96976'], - ['USDT', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], - ['USDT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['USDT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDT', 'MATIC', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], - ['USDT', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], - ['USDT', 'MATIC', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['USDT', 'OP', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], - ['USDT', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], - ['USDT', 'SOL', '2ojv9BAiHUrvsm9gxDe7fJSzbNZSJcxZvf8dqmWGHG8S'], - ['USDT', 'SOL', '5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9'], - ['USDT', 'SOL', '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM'], - ['USDT', 'TRX', 'TAzsQ9Gx8eqFNFSKbeXrbi45CuVPHzA8wr'], - ['USDT', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], - ['USDT', 'TRX', 'TJCo98saj6WND61g1uuKwJ9GMWMT9WkJFo'], - ['USDT', 'TRX', 'TJDENsfBJs4RFETt1X1W8wMDc8M5XnJhCe'], - ['USDT', 'TRX', 'TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9'], - ['USDT', 'TRX', 'TMwf7KT8CCdUKuZfKNPTTjbYkFb3eGRbzY'], - ['USDT', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], - ['USDT', 'TRX', 'TQrY8tryqsYVCYS3MFbtffiPp2ccyn4STm'], - ['USDT', 'TRX', 'TWd4WrZ9wn84f5x1hZhL4DHvk738ns5jwb'], - ['USDT', 'TRX', 'TYASr5UV6HEcXatwdFQfmLVUqQQQMUxHLS'], - ['WRX', 'BEP2', 'bnb142q467df6jun6rt5u2ar58sp47hm5f9wvz2cvg'], - ['WRX', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['WRX', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['WRX', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['WRX', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['WRX', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['WRX', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['WRX', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['WRX', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['WRX', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['WRX', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['XRP', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], - ['XRP', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], - ['XRP', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], - ['XRP', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], - ['XRP', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], - ['XRP', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], - ['XRP', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], - ['XRP', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], - ['XRP', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['XRP', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], - ['XRP', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], - ['XRP', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], - ['XRP', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], - ['XRP', 'XRP', 'rBtttd61FExHC68vsZ8dqmS3DfjFEceA1A'], - ['XRP', 'XRP', 'rDAE53VfMvftPB4ogpWGWvzkQxfht6JPxr'], - ['XRP', 'XRP', 'rEy8TFcrAPvhpKrwyrscNYyqBGUkE9hKaJ'], - ['XRP', 'XRP', 'rNU4eAowPuixS5ZCWaRL72UUeKgxcKExpK'], - ['XRP', 'XRP', 'rPJ5GFpyDLv7gqeB1uZVUBwDwi41kaXN5A'], - ['XRP', 'XRP', 'rPz2qA93PeRCyHyFCqyNggnyycJR1N4iNf'], - ['XRP', 'XRP', 'rs8ZPbYqgecRcDzQpJYAMhSxSi5htsjnza'], + ['1INCH', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['1INCH', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['1INCH', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['1INCH', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['1INCH', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], + ['1INCH', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['1INCH', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['APT', 'APT', '0x5bd7de5c56d5691f32ea86c973c73fec7b1445e59736c97158020018c080bb00'], + ['APT', 'APT', '0x80174e0fe8cb2d32b038c6c888dd95c3e1560736f0d4a6e8bed6ae43b5c91f6f'], + ['APT', 'APT', '0xae1a6f3d3daccaf77b55044cea133379934bba04a11b9d0bbd643eae5e6e9c70'], + ['APT', 'APT', '0xd91c64b777e51395c6ea9dec562ed79a4afa0cd6dad5a87b187c37198a1f855a'], + ['APT', 'APT', '0xed8c46bec9dbc2b23c60568f822b95b87ea395f7e3fdb5e3adc0a30c55c0a60e'], + ['ARB', 'ARB', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], + ['ARB', 'ARB', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['ARB', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], + ['ARB', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['ARB', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['BNB', 'BEP2', 'bnb142q467df6jun6rt5u2ar58sp47hm5f9wvz2cvg'], + ['BNB', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['BNB', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['BNB', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], + ['BNB', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['BNB', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], + ['BNB', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], + ['BNB', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], + ['BNB', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], + ['BNB', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], + ['BNB', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['BNB', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], + ['BNB', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['BNB', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], + ['BNB', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['BNB', 'BEP20', '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8'], + ['BNB', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], + ['BNB', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], + ['BNB', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], + ['BNB', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['BNB', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['BNB', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['BNB', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['BNB', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['BTC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['BTC', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['BTC', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['BTC', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['BTC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['BTC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['BTC', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['BTC', 'BTC', '1PJiGp2yDLvUgqeBsuZVCBADArNsk6XEiw'], + ['BTC', 'BTC', '1Pzaqw98PeRfyHypfqyEgg5yycJRsENrE7'], + ['BTC', 'BTC', '3E97AjYaCq9QYnfFMtBCYiCEsN956Rvpj2'], // THIS WALLET WAS PROVIDE BY BINANCE TEAM, AFTER THE SNAPSHOT OF MARCH + ['BTC', 'BTC', '32bhzEniykYRFADVaRM5PYswsjC23cxtes'], + ['BTC', 'BTC', '34GUzCVLbdkMQ2UdVTaA4nxPwoovVS7y2J'], + ['BTC', 'BTC', '34HpHYiyQwg69gFmCq2BGHjF1DZnZnBeBP'], + ['BTC', 'BTC', '34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo'], + ['BTC', 'BTC', '36zSLdRv1jyewjaC12fqK5fptn7PqewunL'], + ['BTC', 'BTC', '38DN2uFMZPiHLHJigfv4kWC9JWJrNnhLcn'], + ['BTC', 'BTC', '38Xnrq8MZiKmYmwobbYdZQ5nnCbX1qvQfE'], + ['BTC', 'BTC', '395vnFScKQ1ay695C6v7gf89UzoFpx3WuJ'], + ['BTC', 'BTC', '39884E3j6KZj82FK4vcCrkUvWYL5MQaS3v'], + ['BTC', 'BTC', '3AeUiDpPPUrUBS377584sFCpx8KLfpX9Ry'], + ['BTC', 'BTC', '3CySuFKbBS29M7rE5iJakZRNqb3msMeFoN'], + ['BTC', 'BTC', '3FHNBLobJnbCTFTVakh5TXmEneyf5PT61B'], + ['BTC', 'BTC', '3HdGoUTbcztBnS7UzY4vSPYhwr424CiWAA'], + ['BTC', 'BTC', '3JFJPpH8Chwo7CDbyYQ4XcfgcjEP1FGRMJ'], + ['BTC', 'BTC', '3JJmF63ifcamPLiAmLgG96RA599yNtY3EQ'], + ['BTC', 'BTC', '3JqPhvKkAPcFB3oLELBT7z2tQdjpnxuDi9'], + ['BTC', 'BTC', '3LQUu4v9z6KNch71j7kbj8GPeAGUo1FW6a'], + ['BTC', 'BTC', '3LcgLHzTvjLKBixBvkKGiadtiw2GBSKKqH'], + ['BTC', 'BTC', '3LtrsjtyLsHoG8WQMe2RFw3de4pLTQZNcY'], + ['BTC', 'BTC', '3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6'], + ['BTC', 'BTC', '3Me9QACjioepv2L2oKTC9QQ87NH6vFe1Zj'], + ['BTC', 'BTC', '3NPL82eaehTFh4r3StpHqVQBTnZJFaGsyy'], + ['BTC', 'BTC', '3NXCvmLGz9SxYi6TnjbBQfQMcwiZ1iQETa'], + ['BTC', 'BTC', '3NjHh71XgjikBoTNYdWgXiNeZcLaKNThgb'], + ['BTC', 'BTC', '3Qxak1CZhLyZ7GVckKphLURdLBCjMfz9bA'], + ['BTC', 'BTC', 'bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h'], + ['BTC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['BTC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['BTC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['BTC', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['BUSD', 'AVAX', '0x9f8c163cba728e99993abe7495f06c0a3c8ac8b9'], + ['BUSD', 'BNB', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['BUSD', 'BNB', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], + ['BUSD', 'BNB', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['BUSD', 'BNB', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], + ['BUSD', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], + ['BUSD', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], + ['BUSD', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], + ['BUSD', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], + ['BUSD', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['BUSD', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], + ['BUSD', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['BUSD', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], + ['BUSD', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['BUSD', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], + ['BUSD', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], + ['BUSD', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], + ['BUSD', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['BUSD', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['BUSD', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['BUSD', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['BUSD', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['BUSD', 'ETH', '0x9696f59e4d72e237be84ffd425dcad154bf96976'], + ['BUSD', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['BUSD', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], + ['BUSD', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], + ['BUSD', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], + ['BUSD', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], + ['CHR', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['CHR', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['CHR', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['CHR', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['CHR', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['CHR', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['CHR', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['CHR', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], + ['CHR', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['CHR', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['CHZ', 'BEP2', 'bnb142q467df6jun6rt5u2ar58sp47hm5f9wvz2cvg'], + ['CHZ', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['CHZ', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], + ['CHZ', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + // ['CHZ', 'CHZ2', '0x87917d879ba83ce3ada6e02d49a10c1ec1988062'], + // ['CHZ', 'CHZ2', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['CHZ', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['CHZ', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['CHZ', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['CHZ', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['CRV', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['CRV', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['CRV', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['CRV', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['CVP', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['CVP', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['CVP', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['CVP', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['CVP', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['CVP', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['CVP', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['CVP', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['DOGE', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['DOGE', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['DOGE', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['DOGE', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['DOGE', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['DOGE', 'BEP20', '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8'], + ['DOGE', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['DOGE', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + /* + ['DOGE', 'DOGE', 'D73RQLGWW9TBT2AKspEP24wLiXFrXvnTqX'], + ['DOGE', 'DOGE', 'D7D2f2WuEkwhTWqBkisZ5sM3JagaBcNWBs'], + ['DOGE', 'DOGE', 'D7JLeAgZK2TyFRFtjKwHMxhFjWvJ9gS5kj'], + ['DOGE', 'DOGE', 'D7QZnXec5bkMyokPFPh6v4WAw5VF5TocAy'], + ['DOGE', 'DOGE', 'D7bg2iUG3UiHuTWjRqcjdJiEjHrsFASsjw'], + ['DOGE', 'DOGE', 'D7dm1b8DEqaCxcgaPuBXz9FqjAQ7UTK6sz'], + ['DOGE', 'DOGE', 'DAYthKnkrWUHRENvtBwjemi6kFzk4K9SMr'], + ['DOGE', 'DOGE', 'DCxFJEWsYJFnC3HP7YfZdsd3X43ttQA79Z'], + ['DOGE', 'DOGE', 'DD1h9ojoyAdAGLXaqgqZP3j86AtxZs6jCn'], + ['DOGE', 'DOGE', 'DD6K5pfaPd93ri5x67PzVVUS8Cui3rRoBe'], + ['DOGE', 'DOGE', 'DE5opaXjFgDhFBqL6tBDxTAQ56zkX6EToX'], + ['DOGE', 'DOGE', 'DEvUEF9VrXbKf5rdaQCUzeh4MvZxd3Zx5T'], + ['DOGE', 'DOGE', 'DFyohYD3bMXCEg1TdMfdy1J7dYfK4shhPf'], + ['DOGE', 'DOGE', 'DGYUcgNQAAMzXynRHJJVAKkgXWhSddJNi2'], + ['DOGE', 'DOGE', 'DGiYKUGbzRtppwdoinym7ZJXWuBqBuHxUk'], + ['DOGE', 'DOGE', 'DGmd2jn1D7oLXpdpcGkLaGLDMbnRt4qkH3'], + ['DOGE', 'DOGE', 'DHiKVUMdaAm43NMh2wMSfn7xtmUmfKSSNE'], + ['DOGE', 'DOGE', 'DJRaDXkewtLgwL9EZyTkWQEsxuyBUaveKU'], + ['DOGE', 'DOGE', 'DJfU2p6woQ9GiBdiXsWZWJnJ9uDdZfSSNC'], + ['DOGE', 'DOGE', 'DLqwvgk27ACJnHPEGxyDfspieHBVYJRZiC'], + ['DOGE', 'DOGE', 'DN9NrgYzgh6AtNmTUFThqRxhbyoNWhG6iD'], + ['DOGE', 'DOGE', 'DPAMdZsSirVBGeDR9sE1LJXkwG6AQSNAMW'], + ['DOGE', 'DOGE', 'DPKKpanH1hMVzdWb2oi126znjruvvGRQzj'], + ['DOGE', 'DOGE', 'DQYqMYmQCfL2eDLmMXV5uvCPkN6Vv4KtSx'], + ['DOGE', 'DOGE', 'DQkwksfYrAWAR9tRcqygA5pihmnURozxzo'], + ['DOGE', 'DOGE', 'DQnhnNxW89AkFHDsT6aWHim4DvtzwF9sGo'], + ['DOGE', 'DOGE', 'DRuYd74gqPuQD9HKEBDxRr9gSogQmdj9DH'], + ['DOGE', 'DOGE', 'DRweGdMgohChLBn2TamjCNicKYEncRgj5a'], + ['DOGE', 'DOGE', 'DTSop4ycWkpmDqpncVZ3jwKp3z7B4kW4T3'], + ['DOGE', 'DOGE', 'DU8gPC5mh4KxWJARQRxoESFark2jAguBr5'], + */ + ['DOT', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['DOT', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['DOT', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['DOT', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['DOT', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['DOT', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['DOT', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['DOT', 'DOT', '16ZL8yLyXv3V3L3z9ofR1ovFLziyXaN1DPq4yffMAZ9czzBD'], + ['DOT', 'DOT', '1743nDTMZisPgBCYSAgkUn1kVG7MePc9rvMEjoRNf4ipVkF'], + ['DOT', 'DOT', '1qnJN7FViy3HZaxZK9tGAA71zxHSBeUweirKqCaox4t8GT7'], + ['DOT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['DOT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['DOT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['DOT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + // ['ENJ', 'ENJ', 'enC1zkqfU5X4x84LMKSzcRdsSSiF7M1Nt7ovm62jRXr78uT1h'], + ['ENJ', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['ENJ', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['ENJ', 'ETH', '0x56eddb7aa87536c09ccc2793473599fd21a8b17f'], + ['ENJ', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['ETH', 'ARB', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], + ['ETH', 'ARB', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['ETH', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], + ['ETH', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['ETH', 'BASE', '0x3304e22ddaa22bcdc5fca2269b418046ae7b566a'], + ['ETH', 'BASE', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], + ['ETH', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['ETH', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['ETH', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], + ['ETH', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['ETH', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], + ['ETH', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], + ['ETH', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], + ['ETH', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], + ['ETH', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['ETH', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], + ['ETH', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['ETH', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], + ['ETH', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['ETH', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['ETH', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['ETH', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['ETH', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['ETH', 'ETH', '0x4976a4a02f38326660d17bf34b431dc6e2eb2327'], + ['ETH', 'ETH', '0x56eddb7aa87536c09ccc2793473599fd21a8b17f'], + ['ETH', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['ETH', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['ETH', 'ETH', '0x9696f59e4d72e237be84ffd425dcad154bf96976'], + ['ETH', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], + ['ETH', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['ETH', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['ETH', 'OP', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], + ['ETH', 'OP', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], + ['ETH', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], + ['ETH', 'ERA', '0x7aed074ca56f5050d5a2e512ecc5bf7103937d76'], + ['ETH', 'ERA', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], + ['ETH', 'ERA', '0xa84fd90d8640fa63d194601e0b2d1c9094297083'], + ['FDUSD', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['FDUSD', 'BEP20', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['FDUSD', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['FDUSD', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['FDUSD', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['FDUSD', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['FDUSD', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['FDUSD', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['FDUSD', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['FDUSD', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['FDUSD', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['GRT', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['GRT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['GRT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['GRT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['GRT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['GRT', 'MATIC', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['HFT', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['HFT', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['HFT', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['HFT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['HFT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['HFT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['HFT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['LINK', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['LINK', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['LINK', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['LINK', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['LINK', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['LINK', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['LINK', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['LINK', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['LINK', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['LINK', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], + ['LINK', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['LINK', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['LTC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['LTC', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['LTC', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['LTC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['LTC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['LTC', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['LTC', 'LTC', 'LZEjckteAtWrugbsy9zU8VHEZ4iUiXo9Nm'], + ['LTC', 'LTC', 'LbmGksLBwtwRXyxeazCZqKiAHX6cWN2AzN'], + ['LTC', 'LTC', 'LhzEoDXHXASi4hSMxrKeVoSGrED9QsBpPq'], + ['LTC', 'LTC', 'M8T1B2Z97gVdvmfkQcAtYbEepune1tzGua'], + ['LTC', 'LTC', 'MB8nnFMvR5cgvpzQ1QXTDVfUM91BcsLH3k'], + ['LTC', 'LTC', 'MBjKmoDwkuUbtnVd4vjymxjJx7Crca2s1z'], + ['LTC', 'LTC', 'MDwD5wYdeuoisfoaWKgeHK4Gq3YkbaCypJ'], + ['LTC', 'LTC', 'MEhAHYijouCinmGKL6n1bRTXYznH1X24rD'], + ['LTC', 'LTC', 'MG9aFQgTH5C4UPcur8S2bh5duKYMfaJFUS'], + ['LTC', 'LTC', 'MGvUTN1PuWgBxuoFgTfkk4eJDzYgRivR8F'], + ['LTC', 'LTC', 'MJto5wFLrE9t4TDXCgdSet8W6mxYqGijC3'], + ['LTC', 'LTC', 'MJwFHGandYUFJTTHHSXg3q6u7ge4af1n4N'], + ['LTC', 'LTC', 'MLkNzCps6cXou2DELVfxDuRC4uZGwr397o'], + ['LTC', 'LTC', 'MQd1fJwqBJvwLuyhr17PhEFx1swiqDbPQS'], + ['LTC', 'LTC', 'MSeDRiNoH5Afr9b9rNo837hYzpxBXXqMZf'], + ['LTC', 'LTC', 'MWGTiJBNEQSfxTCrdC2VKEa55Lck27wr67'], + ['LTC', 'LTC', 'MWkX1ZaFbrRPtcQvVpjvigxWU17JoinePy'], + ['MASK', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['MASK', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['MASK', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['MASK', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['MASK', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['MASK', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['MASK', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['MASK', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['MATIC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['MATIC', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], + ['MATIC', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], + ['MATIC', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['MATIC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['MATIC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['MATIC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['MATIC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['MATIC', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['MATIC', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['MATIC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['MATIC', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['MATIC', 'MATIC', '0x082489a616ab4d46d1947ee3f912e080815b08da'], + ['MATIC', 'MATIC', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], + ['MATIC', 'MATIC', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['MATIC', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], + ['MATIC', 'MATIC', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['OP', 'OP', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], + ['OP', 'OP', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], + ['OP', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], + ['SHIB', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], + ['SHIB', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], + ['SHIB', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['SHIB', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['SHIB', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], + ['SHIB', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], + ['SHIB', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['SHIB', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['SHIB', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['SHIB', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['SHIB', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['SHIB', 'ETH', '0x4976a4a02f38326660d17bf34b431dc6e2eb2327'], + ['SHIB', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['SHIB', 'ETH', '0x835678a611B28684005a5e2233695fB6cbbB0007'], + ['SHIB', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['SHIB', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['SOL', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['SOL', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['SOL', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['SOL', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['SOL', 'SOL', '2ojv9BAiHUrvsm9gxDe7fJSzbNZSJcxZvf8dqmWGHG8S'], + ['SOL', 'SOL', '3gd3dqgtJ4jWfBfLYTX67DALFetjc5iS72sCgRhCkW2u'], + ['SOL', 'SOL', '3yFwqXBfZY4jBVUafQ1YEXw189y2dN3V5KQq9uzBDy1E'], + ['SOL', 'SOL', '5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9'], + ['SOL', 'SOL', '6QJzieMYfp7yr3EdrePaQoG3Ghxs2wM98xSLRu8Xh56U'], + ['SOL', 'SOL', '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM'], + ['SSV', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['SSV', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['SSV', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['SSV', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['TUSD', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['TUSD', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['TUSD', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['TUSD', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['TUSD', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['TUSD', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['TUSD', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['TUSD', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['TUSD', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], + ['TUSD', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], + ['TUSD', 'TRX', 'TWd4WrZ9wn84f5x1hZhL4DHvk738ns5jwb'], + ['UNI', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['UNI', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['UNI', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['UNI', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['UNI', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['UNI', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['UNI', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['UNI', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['UNI', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], + ['UNI', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['UNI', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDC', 'ALGO', 'MTCEM5YJJSYGW2RCXYXGE4SXLSPUUEJKQAWG2GUX6CNN72KQ3XPJCM6NOI'], + ['USDC', 'ALGO', 'QYXDGS2XJJT7QNR6EJ2YHNZFONU6ROFM6BKTBNVT63ZXQ5OC6IYSPNDJ4U'], + ['USDC', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], + ['USDC', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDC', 'AVAX', '0x9f8c163cba728e99993abe7495f06c0a3c8ac8b9'], + ['USDC', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['USDC', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], + ['USDC', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['USDC', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['USDC', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], + ['USDC', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['USDC', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], + ['USDC', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['USDC', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['USDC', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['USDC', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['USDC', 'ETH', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['USDC', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['USDC', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDC', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], + ['USDC', 'MATIC', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDC', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], + // ['USDC', 'RON', '0xb32e9a84ae0b55b8ab715e4ac793a61b277bafa3'], + ['USDC', 'SOL', '2ojv9BAiHUrvsm9gxDe7fJSzbNZSJcxZvf8dqmWGHG8S'], + ['USDC', 'SOL', '5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9'], + ['USDC', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], + ['USDC', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], + ['USDC', 'XLM', 'GBAIA5U6E3FSRUW55AXACIVGX2QR5JYAS74OWLED3S22EGXVYEHPLGPA'], + ['USDC', 'XLM', 'GC5LF63GRVIT5ZXXCXLPI3RX2YXKJQFZVBSAO6AUELN3YIMSWPD6Z6FH'], + ['USDT', 'ARB', '0xb38e8c17e38363af6ebdcb3dae12e0243582891d'], + ['USDT', 'ARB', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDT', 'AVAX', '0x4aefa39caeadd662ae31ab0ce7c8c2c9c0a013e8'], + ['USDT', 'AVAX', '0x9f8c163cba728e99993abe7495f06c0a3c8ac8b9'], + ['USDT', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['USDT', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['USDT', 'BEP2', 'bnb1m5amny2gs3xdyta6pksmr43zu4727w24syyks7'], + ['USDT', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['USDT', 'BEP2', 'bnb1xrfwzlu9c5208lhtn7ywt0mjrhjh4nt4fjyqxy'], + ['USDT', 'BEP20', '0x01c952174c24e1210d26961d456a77a39e1f0bb0'], + ['USDT', 'BEP20', '0x161ba15a5f335c9f06bb5bbb0a9ce14076fbb645'], + ['USDT', 'BEP20', '0x1fbe2acee135d991592f167ac371f3dd893a508b'], + ['USDT', 'BEP20', '0x29bdfbf7d27462a2d115748ace2bd71a2646946c'], + ['USDT', 'BEP20', '0x3c783c21a0383057d128bae431894a5c19f9cf06'], + ['USDT', 'BEP20', '0x515b72ed8a97f42c568d6a143232775018f133c8'], + ['USDT', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['USDT', 'BEP20', '0x73f5ebe90f27b46ea12e5795d16c4b408b19cc6f'], + ['USDT', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['USDT', 'BEP20', '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8'], + ['USDT', 'BEP20', '0xa180fe01b906a1be37be6c534a3300785b20d947'], + ['USDT', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], + ['USDT', 'BEP20', '0xdccf3b77da55107280bd850ea519df3705d1a75a'], + ['USDT', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['USDT', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['USDT', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDT', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['USDT', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['USDT', 'ETH', '0x56eddb7aa87536c09ccc2793473599fd21a8b17f'], + ['USDT', 'ETH', '0x9696f59e4d72e237be84ffd425dcad154bf96976'], + ['USDT', 'ETH', '0xbe0eb53f46cd790cd13851d5eff43d12404d33e8'], + ['USDT', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['USDT', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDT', 'MATIC', '0x5a52E96BAcdaBb82fd05763E25335261B270Efcb'], + ['USDT', 'MATIC', '0xe7804c37c13166ff0b37f5ae0bb07a3aebb6e245'], + ['USDT', 'MATIC', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['USDT', 'OP', '0xF977814e90dA44bFA03b6295A0616a897441aceC'], + ['USDT', 'OP', '0xacd03d601e5bb1b275bb94076ff46ed9d753435a'], + ['USDT', 'SOL', '2ojv9BAiHUrvsm9gxDe7fJSzbNZSJcxZvf8dqmWGHG8S'], + ['USDT', 'SOL', '5tzFkiKscXHK5ZXCGbXZxdw7gTjjD1mBwuoFbhUvuAi9'], + ['USDT', 'SOL', '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM'], + ['USDT', 'TRX', 'TAzsQ9Gx8eqFNFSKbeXrbi45CuVPHzA8wr'], + ['USDT', 'TRX', 'TDqSquXBgUCLYvYC4XZgrprLK589dkhSCf'], + ['USDT', 'TRX', 'TJCo98saj6WND61g1uuKwJ9GMWMT9WkJFo'], + ['USDT', 'TRX', 'TJDENsfBJs4RFETt1X1W8wMDc8M5XnJhCe'], + ['USDT', 'TRX', 'TMuA6YqfCeX8EhbfYEg5y7S4DqzSJireY9'], + ['USDT', 'TRX', 'TMwf7KT8CCdUKuZfKNPTTjbYkFb3eGRbzY'], + ['USDT', 'TRX', 'TNXoiAJ3dct8Fjg4M9fkLFh9S2v9TXc32G'], + ['USDT', 'TRX', 'TQrY8tryqsYVCYS3MFbtffiPp2ccyn4STm'], + ['USDT', 'TRX', 'TWd4WrZ9wn84f5x1hZhL4DHvk738ns5jwb'], + ['USDT', 'TRX', 'TYASr5UV6HEcXatwdFQfmLVUqQQQMUxHLS'], + ['WRX', 'BEP2', 'bnb142q467df6jun6rt5u2ar58sp47hm5f9wvz2cvg'], + ['WRX', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['WRX', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['WRX', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['WRX', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['WRX', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['WRX', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['WRX', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['WRX', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['WRX', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['WRX', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['XRP', 'BEP2', 'bnb1fnd0k5l4p3ck2j9x9dp36chk059w977pszdgdz'], + ['XRP', 'BEP2', 'bnb1lsmt5a8vqqus5fwslx8pyyemgjtg4y6ugj308t'], + ['XRP', 'BEP2', 'bnb1u2agwjat20494fmc6jnuau0ls937cfjn4pjwtn'], + ['XRP', 'BEP20', '0x5a52e96bacdabb82fd05763e25335261b270efcb'], + ['XRP', 'BEP20', '0x8894e0a0c962cb723c1976a4421c95949be2d4e3'], + ['XRP', 'BEP20', '0xbd612a3f30dca67bf60a39fd0d35e39b7ab80774'], + ['XRP', 'BEP20', '0xe2fc31f816a9b94326492132018c3aecc4a93ae1'], + ['XRP', 'BEP20', '0xeb2d2f1b8c558a40207669291fda468e50c8a0bb'], + ['XRP', 'BEP20', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['XRP', 'ETH', '0x21a31ee1afc51d94c2efccaa2092ad1028285549'], + ['XRP', 'ETH', '0x28c6c06298d514db089934071355e5743bf21d60'], + ['XRP', 'ETH', '0xdfd5293d8e347dfe59e90efd55b2956a1343963d'], + ['XRP', 'ETH', '0xf977814e90da44bfa03b6295a0616a897441acec'], + ['XRP', 'XRP', 'rBtttd61FExHC68vsZ8dqmS3DfjFEceA1A'], + ['XRP', 'XRP', 'rDAE53VfMvftPB4ogpWGWvzkQxfht6JPxr'], + ['XRP', 'XRP', 'rEy8TFcrAPvhpKrwyrscNYyqBGUkE9hKaJ'], + ['XRP', 'XRP', 'rNU4eAowPuixS5ZCWaRL72UUeKgxcKExpK'], + ['XRP', 'XRP', 'rPJ5GFpyDLv7gqeB1uZVUBwDwi41kaXN5A'], + ['XRP', 'XRP', 'rPz2qA93PeRCyHyFCqyNggnyycJR1N4iNf'], + ['XRP', 'XRP', 'rs8ZPbYqgecRcDzQpJYAMhSxSi5htsjnza'], ] function getAddresses(chain) { @@ -542,5 +557,11 @@ module.exports = { }, fantom: { owners: getOwners('FTM') + }, + base: { + owners: getOwners('BASE') + }, + era: { + owners: getOwners('ERA') } } \ No newline at end of file From 46ed24e2fd0415dc25c77a8f534d75a883ea300c Mon Sep 17 00:00:00 2001 From: elykct <137165620+elykct@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:05:05 +0700 Subject: [PATCH 047/168] Adding BVM network (#9131) * Adding BVM network TVL * naka chain update SATS token address * adding bvm chain * restore Chocoinu * remove count assets from bridge, add univ3 factory contract * code refactor * Update chains.json --------- Co-authored-by: elykct Co-authored-by: elykct 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/naka-dex/index.js | 5 +++++ 4 files changed, 13 insertions(+) create mode 100644 projects/naka-dex/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 6d2ad0b4ebfa..4437408a1dea 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -169,6 +169,7 @@ "muuchain", "mvc", "nahmii", + "naka", "near", "neo", "neo3", diff --git a/projects/helper/env.js b/projects/helper/env.js index b41730d16d59..bba612ac2706 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -23,6 +23,7 @@ const DEFAULTS = { MERLIN_RPC: "https://rpc.merlinchain.io", MERLIN_RPC_MULTICALL: '0x830E7E548F4D80947a40A7Cf3a2a53166a0C3980', BITROCK_RPC_MULTICALL: '0x40DD0342A46Ab0893251211F6626E82c09A75345', + NAKA_RPC: 'https://node.nakachain.xyz', RONIN_RPC: 'https://api.roninchain.com/rpc', ETHF_RPC: 'https://rpc.dischain.xyz/', } diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 3cd91936b5a8..c21fd4f1674f 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -34,6 +34,12 @@ const ibcMappings = { } const fixBalancesTokens = { + + "naka": { + "0xDe4c4768ee70D97C044062fEC971eAE91B6aFAB7": { coingeckoId: "wrapped-bitcoin", decimals: 18 }, + "0x4F90055b8670B21d64146577152aE52975075900": { coingeckoId: "ethereum", decimals: 18 }, + "0xBD0adB3Ee21e0A75D3021384177238883D69e883": { coingeckoId: "ordinals", decimals: 18 }, + }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain diff --git a/projects/naka-dex/index.js b/projects/naka-dex/index.js new file mode 100644 index 000000000000..b696ee28fb22 --- /dev/null +++ b/projects/naka-dex/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + naka: { factory: '0xf6632D6fF6fc71DAf1fA96AbAd1bC269bD507dF8', fromBlock: 49370, sumChunkSize: 50 }, +}) From acf7f4ce31a76b977e139997b3d5acc3760a69e2 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 7 Mar 2024 16:12:23 +0000 Subject: [PATCH 048/168] fix ownTokens --- projects/treasury/bitdao.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/treasury/bitdao.js b/projects/treasury/bitdao.js index 4881039bf7b5..63b38aa2c615 100644 --- a/projects/treasury/bitdao.js +++ b/projects/treasury/bitdao.js @@ -106,6 +106,7 @@ async function otherTvl(_timestamp, _block, _chainBlocks, {api}){ 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 fc29435a2e570a583585f507f4e96cb213179df6 Mon Sep 17 00:00:00 2001 From: Nowalski Date: Thu, 7 Mar 2024 17:41:52 +0100 Subject: [PATCH 049/168] =?UTF-8?q?This=20PR=20adds=20the=20ETCMC=20adapte?= =?UTF-8?q?r=20to=20the=20DeFi=20Llama=20project,=20showcasing=20=E2=80=A6?= =?UTF-8?q?=20(#9237)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * This PR adds the ETCMC adapter to the DeFi Llama project, showcasing a DEX on the Ethereum Classic chain. The adapter includes TVL calculation logic using the `getUniTVL` helper function. The methodology section in the adapter configuration explains how TVL is calculated based on liquidity in the AMM. Changes: - Added ETCMC adapter configuration to `projects/etcmc/index.js`. - Updated the configuration to include the staking contract address and the main ETCPOW contract address. - Tested the integration to ensure accurate TVL calculation * code refactor * minor fix --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/etcmc/index.js | 12 ++++++++++++ projects/helper/utils.js | 1 + 2 files changed, 13 insertions(+) create mode 100644 projects/etcmc/index.js diff --git a/projects/etcmc/index.js b/projects/etcmc/index.js new file mode 100644 index 000000000000..9250afe2fc60 --- /dev/null +++ b/projects/etcmc/index.js @@ -0,0 +1,12 @@ +const { getUniTVL } = require('../helper/unknownTokens'); +const { staking } = require('../helper/unknownTokens') + +const ETCPOW = '0x6c3B413C461c42a88160Ed1B1B31d6f7b02a1C83' +module.exports = { + misrepresentedTokens: true, + methodology: "Factory address (0x164999e9174686b39987dfB7E0FAb28465b867A5) is used to find the LP pairs. TVL is equal to the liquidity on the AMM.", + ethereumclassic: { + tvl: getUniTVL({ factory: '0x164999e9174686b39987dfB7E0FAb28465b867A5', useDefaultCoreAssets: true, }), + staking: staking({ tokensAndOwners: [[ETCPOW, '0xca1F5a20E07610d82e28683519c72f6817A3505a', ]], lps: ['0x730F59a8690b50724914D7b9b2f49a8dD18F5572'], useDefaultCoreAssets: true}), + }, +}; diff --git a/projects/helper/utils.js b/projects/helper/utils.js index d6dbc318c940..96c90ac23e93 100644 --- a/projects/helper/utils.js +++ b/projects/helper/utils.js @@ -95,6 +95,7 @@ function isLP(symbol, token, chain) { if (chain === 'scroll' && /(cSLP|sSLP)$/.test(symbol)) return true //syncswap LP if (chain === 'btn' && /(XLT)$/.test(symbol)) return true //xenwave LP if (['fantom', 'nova',].includes(chain) && ['NLT'].includes(symbol)) return true + if (chain === 'ethereumclassic' && symbol === 'ETCMC-V2') return true let label if (symbol.startsWith('ZLK-LP') || symbol.includes('DMM-LP') || (chain === 'avax' && 'DLP' === symbol) || symbol === 'fChe-LP') From ef778d79faa16b18d937eb46a18ccb2f370549f4 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:50:12 +0100 Subject: [PATCH 050/168] update uncx v3 --- projects/unicrypt-v3/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/unicrypt-v3/index.js b/projects/unicrypt-v3/index.js index 99a38c550842..ad604fab0b28 100644 --- a/projects/unicrypt-v3/index.js +++ b/projects/unicrypt-v3/index.js @@ -15,7 +15,7 @@ const config = { reserves: ['0xc22218406983bf88bb634bb4bf15fa4e0a1a8c84', '0xd8207e9449647a9668ad3f8ecb97a1f929f81fd1', '0x40f6301edb774e8B22ADC874f6cb17242BaEB8c4'], }, base: { - reserves: ['0xd6cd8fb001cbdae91f0af7a58a1602c945967d67'] + reserves: ['0xd6cd8fb001cbdae91f0af7a58a1602c945967d67', '0x231278edd38b00b07fbd52120cef685b9baebcc1'] } }; From 77fca329759723f4f8cf6cd0b2a1a5201da5fcbe Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 7 Mar 2024 21:54:02 +0100 Subject: [PATCH 051/168] update ferro --- projects/ferro/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/ferro/index.js b/projects/ferro/index.js index 03b40dd26570..660354076362 100644 --- a/projects/ferro/index.js +++ b/projects/ferro/index.js @@ -31,6 +31,7 @@ const tokens = { // LATOM-ATOM '0xb888d8dd1733d72681b30c00ee76bde93ae7aa93': ['0x5FA9412C2563c0B13CD9F96F0bd1A971F8eBdF96'], '0xac974ee7fc5d083112c809ccb3fce4a4f385750d': ['0x5FA9412C2563c0B13CD9F96F0bd1A971F8eBdF96'], + '0xD42E078ceA2bE8D03cd9dFEcC1f0d28915Edea78': ['0x6A41732eaDBE15e9c9FcA2cfF1299c6321AA104B'], }; async function tvl(timestamp, ethBlock, _, { api }) { From c7b771e573ccf9affa426908f55490f698840741 Mon Sep 17 00:00:00 2001 From: Hyungsuk Kang Date: Fri, 8 Mar 2024 06:39:54 +0900 Subject: [PATCH 052/168] Add Blast deployment (#9239) --- projects/standard-mode/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/standard-mode/index.js b/projects/standard-mode/index.js index 7e4b16dbaa0b..7f8e071e94ef 100644 --- a/projects/standard-mode/index.js +++ b/projects/standard-mode/index.js @@ -1,6 +1,7 @@ const { getLogs } = require('../helper/cache/getLogs') const config = { mode: { factory: '0x4D1b18A7BDB8D0a02f692398337aBde8DeB8FB09', fromBlock: 4381503, }, + blast: { factory: '0x2CC505C4bc86B28503B5b8C450407D32e5E20A9f', fromBlock: 434946, }, } Object.keys(config).forEach(chain => { @@ -12,4 +13,4 @@ Object.keys(config).forEach(chain => { return api.sumTokens({ ownerTokens}) } } -}) \ No newline at end of file +}) From 54021f18699e0114a12b4ba2ab049ba8ad8b365d Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 7 Mar 2024 23:12:38 +0000 Subject: [PATCH 053/168] add fraxtal --- projects/frax-swap/index.js | 1 + projects/helper/chains.json | 3 ++- projects/ra/index.js | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 projects/ra/index.js diff --git a/projects/frax-swap/index.js b/projects/frax-swap/index.js index aaffa8e7ebe5..5c9e5fe2adcb 100644 --- a/projects/frax-swap/index.js +++ b/projects/frax-swap/index.js @@ -22,4 +22,5 @@ module.exports = { ...fx("fantom", "0xF55C563148cA0c0F1626834ec1B8651844D76792", "0xDc745E09fC459aDC295E2e7baACe881354dB7F64"), ...fx("moonbeam", "0x5Ca135cB8527d76e932f34B5145575F9d8cbE08E", "0x51f9DBEd76f5Dcf209817f641b549aa82F35D23F"), ...fx("polygon", "0xc2544A32872A91F4A553b404C6950e89De901fdb", "0x54F454D747e037Da288dB568D4121117EAb34e79"), + ...fx("fraxtal", "0xe30521fe7f3beb6ad556887b50739d6c7ca667e6"), }; diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 4437408a1dea..2f9d6467ec0e 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -283,5 +283,6 @@ "zkfair", "zksync", "zyx", - "zeta" + "zeta", + "fraxtal" ] diff --git a/projects/ra/index.js b/projects/ra/index.js new file mode 100644 index 000000000000..c11d73361eae --- /dev/null +++ b/projects/ra/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + fraxtal: { factory: '0x95120704f4E2D545Aea8b6B3c16d9Da1fa32E30F', fromBlock: 1352709, }, +}) \ No newline at end of file From ccada6733a06e103fcbdbaab77ce2b7c8579ba54 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Thu, 7 Mar 2024 23:19:55 +0000 Subject: [PATCH 054/168] fix ra --- projects/ra/index.js | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/projects/ra/index.js b/projects/ra/index.js index c11d73361eae..106e8ef074f3 100644 --- a/projects/ra/index.js +++ b/projects/ra/index.js @@ -1,5 +1,17 @@ +const sdk = require('@defillama/sdk') const { uniV3Export } = require('../helper/uniswapV3') +const {getUniTVL} = require('../helper/unknownTokens') -module.exports = uniV3Export({ - fraxtal: { factory: '0x95120704f4E2D545Aea8b6B3c16d9Da1fa32E30F', fromBlock: 1352709, }, -}) \ No newline at end of file +const concentraledLiquidity = uniV3Export({ + fraxtal: { factory: '0xAAA32926fcE6bE95ea2c51cB4Fcb60836D320C42', fromBlock: 1352717, }, +}) + +module.exports = { + misrepresentedTokens: true, + fraxtal:{ + tvl: sdk.util.sumChainTvls([ + concentraledLiquidity.fraxtal.tvl, + getUniTVL({ factory: '0xaaa16c016bf556fcd620328f0759252e29b1ab57', useDefaultCoreAssets: true, hasStablePools: true, stablePoolSymbol: 'crAMM' }), + ]) + }, +} \ No newline at end of file From ce189ab5f0fd882294923e5edc1f46d8f8073394 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:51:58 +0100 Subject: [PATCH 055/168] track hyperlock --- projects/hyperlock/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 projects/hyperlock/index.js diff --git a/projects/hyperlock/index.js b/projects/hyperlock/index.js new file mode 100644 index 000000000000..5d6ceeb50ca7 --- /dev/null +++ b/projects/hyperlock/index.js @@ -0,0 +1,8 @@ +const { sumTokensExport } = require('../helper/unwrapLPs') + +module.exports = { + doublecounted: true, + blast: { + tvl: sumTokensExport({ owner: '0xc28EffdfEF75448243c1d9bA972b97e32dF60d06', resolveUniV3: true, }) + } +} \ No newline at end of file From 2055e75bcca187702f28f1c9ca12da4596eced37 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Mar 2024 09:56:01 +0100 Subject: [PATCH 056/168] Add hyperlink to Hyperlock documentation --- projects/hyperlock/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/hyperlock/index.js b/projects/hyperlock/index.js index 5d6ceeb50ca7..c7576f533c18 100644 --- a/projects/hyperlock/index.js +++ b/projects/hyperlock/index.js @@ -1,5 +1,6 @@ const { sumTokensExport } = require('../helper/unwrapLPs') +// https://docs.hyperlock.finance/developers/hyperlock-contracts module.exports = { doublecounted: true, blast: { From 471ce016ba3cb60b1ecf78ff5fa0b38338557043 Mon Sep 17 00:00:00 2001 From: XDXDex <162077358+XDXDex@users.noreply.github.com> Date: Fri, 8 Mar 2024 17:33:58 +0800 Subject: [PATCH 057/168] update XDX TVL (#9248) Co-authored-by: LionDEXDev --- projects/XDX/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 projects/XDX/index.js diff --git a/projects/XDX/index.js b/projects/XDX/index.js new file mode 100644 index 000000000000..388e2f70dd56 --- /dev/null +++ b/projects/XDX/index.js @@ -0,0 +1,12 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +module.exports = { + misrepresentedTokens: true, + blast: { + tvl: getUniTVL({ + fetchBalances: true, + useDefaultCoreAssets: true, + factory: '0xF55dE36072beCebF162d2d54C49964f3b0683711', + }) + } +} \ No newline at end of file From ce29ee50f14df33189dae834468ca2071b798042 Mon Sep 17 00:00:00 2001 From: lanotechres <162079480+lanotechres@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:39:48 +0900 Subject: [PATCH 058/168] Add Gomble to DefiLlama (#9247) * gomble * Update pull_request_template.md * Update pull_request_template.md * Update pull_request_template.md * Update index.js --------- Co-authored-by: agwab Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/gomble/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 projects/gomble/index.js diff --git a/projects/gomble/index.js b/projects/gomble/index.js new file mode 100644 index 000000000000..20fbcc30746e --- /dev/null +++ b/projects/gomble/index.js @@ -0,0 +1,13 @@ +const stakingContractAddress = '0xAB8c9Eb287796F075C821ffafBaC5FeDAa4604d5'; + +async function tvl(ts, _block, chainBlocks, { api }) { + const tokens = await api.call({ abi: 'address[]:getRegisteredTokens', target: stakingContractAddress }) + const vTokens = await api.multiCall({ abi: 'function getRegisteredVToken(address) view returns (address)', calls: tokens, target: stakingContractAddress }) + return api.sumTokens({ owner: stakingContractAddress, tokens: vTokens.concat(tokens) }) +} + +module.exports = { + bsc: { + tvl, + }, +} From 9aa538ed13c5151021c8657611c0b1a9ca7d050e Mon Sep 17 00:00:00 2001 From: Bill Clippy <80559444+bill-clippy@users.noreply.github.com> Date: Fri, 8 Mar 2024 01:40:12 -0800 Subject: [PATCH 059/168] add TVL calculation for Tranchess V3 (#9245) --- projects/tranchess/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/tranchess/index.js b/projects/tranchess/index.js index 31b1f12b889d..85e0eb754ca2 100644 --- a/projects/tranchess/index.js +++ b/projects/tranchess/index.js @@ -24,14 +24,19 @@ const v2Swaps = [ '0x87585A84E0A04b96e653de3DDA77a3Cb1fdf5B6a', // ETH V2 BISHOP Swap '0x56118E49582A8FfA8e7309c58E9Cd8A7e2dDAa37', // BNB V2 BISHOP Swap '0xfcF44D5EB5C4A03D03CF5B567C7CDe9B66Ba5773', // BNB V2 QUEEN Swap + '0x6Da3A029d0F0911C7ee36c1cEa2Ea69Fc31dd970', // BTC USDC BISHOP Swap + '0x09427783666Ec4173e951222ab9B3C12871400AA', // ETH USDC BISHOP Swap + '0xD3392699d679DFa57bC8ee71a0Ad44902C1Ab9f7', // BNB USDC BISHOP Swap ] const ETHV2Funds = [ '0x69c53679EC1C06f3275b64C428e8Cd069a2d3966', // ETH V2 Fund (ETH mainnet) + '0x811c9dD8B7B670A78d02fac592EbbE465e5dD0FA', // wstETH Fund (ETH mainnet) ] const ETHV2Swaps = [ '0xBA919470C7a2983fbcdA6ADC89Be9C43b8298079', // ETH V2 BISHOP Swap (ETH mainnet) + '0xAD06a2DBd34Da8f8Cf5f85d284A5B93A2057bDb5', // wstETH SWAP (ETH mainnet) ] function getBSCAddress(address) { From 0118895b30d1fc229a341efe250ac548e9f01e78 Mon Sep 17 00:00:00 2001 From: UjjwalGupta49 Date: Fri, 8 Mar 2024 15:16:39 +0530 Subject: [PATCH 060/168] added FLP3 (governance pool) tokenAccounts to tvl (#9243) --- projects/flashtrade/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/flashtrade/index.js b/projects/flashtrade/index.js index 231d73967d30..2f52086db163 100644 --- a/projects/flashtrade/index.js +++ b/projects/flashtrade/index.js @@ -7,6 +7,10 @@ async function tvl() { "FuFoCkfnrDjNmwPr54JEAYTUshXA4gQojevfvv3KXdx7", // ETH "55UmrYacpb8v7gbKswDofmWjLS8TSP3VB8NKjNfxu11d", // BTC "7b2jY9CeCWCnyKBvaLSnsV7qwUhbJGsJTPdyCsspPY7Q", // Virtual Pool - USDC + "CjRKKtT3DCsDh7gvQwkX1aCLpYhhDUKaNrJhUzGtsHUC", // Governance Pool - USDC + "CjSYeE668mfLdY7hi1B1ocLMzAVAFFtEhjKrGo8hgvuy", // JUP + "5rdgpCu7xFDhyksEAyUxsyuH9q1KQReKg1FwzmGA7mFq", // PYTH + "FahFdXRRn1iodaCs9MZyNjSb62TTpaQCD98Xcsdowdgf" // JTO ]; return sumTokens2({ tokenAccounts: vaults }); From 0be40fdaf8c0ed180a88fd27d88dcf928edcd121 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:48:29 +0100 Subject: [PATCH 061/168] code refactor --- projects/flashtrade/index.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/projects/flashtrade/index.js b/projects/flashtrade/index.js index 2f52086db163..84b4135accb5 100644 --- a/projects/flashtrade/index.js +++ b/projects/flashtrade/index.js @@ -1,19 +1,7 @@ const { sumTokens2 } = require("../helper/solana"); async function tvl() { - const vaults = [ - "Hhed3wTHoVoPpnuBntGf236UfowMMAXfxqTLkMyJJENe", // SOL - "BC5xAUpEbfeSWi5fJdvhFQhM3eMbTok2c7SY62daB3da", // USDC - "FuFoCkfnrDjNmwPr54JEAYTUshXA4gQojevfvv3KXdx7", // ETH - "55UmrYacpb8v7gbKswDofmWjLS8TSP3VB8NKjNfxu11d", // BTC - "7b2jY9CeCWCnyKBvaLSnsV7qwUhbJGsJTPdyCsspPY7Q", // Virtual Pool - USDC - "CjRKKtT3DCsDh7gvQwkX1aCLpYhhDUKaNrJhUzGtsHUC", // Governance Pool - USDC - "CjSYeE668mfLdY7hi1B1ocLMzAVAFFtEhjKrGo8hgvuy", // JUP - "5rdgpCu7xFDhyksEAyUxsyuH9q1KQReKg1FwzmGA7mFq", // PYTH - "FahFdXRRn1iodaCs9MZyNjSb62TTpaQCD98Xcsdowdgf" // JTO - ]; - - return sumTokens2({ tokenAccounts: vaults }); + return sumTokens2({ owner: '81xGAvJ27ZeRThU2JEfKAUeT4Fx6qCCd8WHZpujZbiiG', getAllTokenAccounts: true, }); } module.exports = { From c492be30823a736aef64918112af303dd0e525ba Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:52:40 +0100 Subject: [PATCH 062/168] Add gaming dex and refactor code (#9250) * add gaming dex * code refactor --------- Co-authored-by: oromp1812 --- projects/gaming-dex/index.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 projects/gaming-dex/index.js diff --git a/projects/gaming-dex/index.js b/projects/gaming-dex/index.js new file mode 100644 index 000000000000..4e2aa774a72f --- /dev/null +++ b/projects/gaming-dex/index.js @@ -0,0 +1,7 @@ +const { onChainTvl } = require('../helper/balancer') + +module.exports = { + defiverse: { + tvl: onChainTvl('0x2FA699664752B34E90A414A42D62D7A8b2702B85', 87620), + }, +}; From 378afcd6bd13874417f021fc3859b9aa9f0f1f1b Mon Sep 17 00:00:00 2001 From: Kim <157560526+KJesTF@users.noreply.github.com> Date: Fri, 8 Mar 2024 16:57:39 +0700 Subject: [PATCH 063/168] add INIT on Blast (#9241) Co-authored-by: Kim --- projects/init-capital/index.js | 50 ++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/projects/init-capital/index.js b/projects/init-capital/index.js index e1cd7e1b222d..3c910adeff05 100644 --- a/projects/init-capital/index.js +++ b/projects/init-capital/index.js @@ -1,19 +1,47 @@ -const { getConfig } = require('../helper/cache') +const { getConfig } = require("../helper/cache"); const POOL_DATA_URI = "https://app.init.capital/static/json/pools.json"; const tvl = async (timestamp, block, _, { api }) => { - const allPoolData = await getConfig('init-capital', POOL_DATA_URI); - const pools = Object.keys(allPoolData[api.getChainId()]); - const tokens = await api.multiCall({ calls: pools, abi: 'address:underlyingToken' }) - return api.sumTokens({ tokensAndOwners2: [tokens, pools] }) + const allPoolData = await getConfig("init-capital", POOL_DATA_URI); + const chainId = api.getChainId(); + + const tokens = Object.keys(allPoolData[chainId]).map( + (pool) => allPoolData[chainId][pool].underlyingToken + ); + + let pools = []; + + if (chainId === 81457) { + pools = Object.keys(allPoolData[chainId]).map( + (pool) => allPoolData[chainId][pool].rebaseWrapperAddress + ); + } else { + pools = Object.keys(allPoolData[chainId]); + } + + return api.sumTokens({ tokensAndOwners2: [tokens, pools] }); }; const borrowed = async (timestamp, block, _, { api }) => { - const allPoolData = await getConfig('init-capital', POOL_DATA_URI); - const pools = Object.keys(allPoolData[api.getChainId()]); - const tokens = await api.multiCall({ calls: pools, abi: 'address:underlyingToken' }) - const debts = await api.multiCall({ abi: "uint256:totalDebt", calls: pools, }); + const allPoolData = await getConfig("init-capital", POOL_DATA_URI); + const chainId = api.getChainId(); + const pools = Object.keys(allPoolData[chainId]); + const tokens = Object.keys(allPoolData[chainId]).map( + (pool) => allPoolData[chainId][pool].underlyingToken + ); + + let debts = await api.multiCall({ abi: "uint256:totalDebt", calls: pools }); + + if (chainId === 81457) { + debts = await api.multiCall({ + calls: debts.map((debt, i) => ({ + target: allPoolData[chainId][pools[i]].rebaseWrapperAddress, + params: [debt], + })), + abi: "function toAmt(uint256) returns (uint256)", + }); + } api.addTokens(tokens, debts); }; @@ -24,4 +52,8 @@ module.exports = { tvl, borrowed, }, + blast: { + tvl, + borrowed, + }, }; From a55034e29feec7cd9f3cf2d2bd88458a70d95d18 Mon Sep 17 00:00:00 2001 From: MuitoFinance <148542132+MuitoFinance@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:08:39 +0800 Subject: [PATCH 064/168] add Muito Finance (#9242) * add muito finance * delete log * code refactor --------- Co-authored-by: muito Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/muito-finance/index.js | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 projects/muito-finance/index.js diff --git a/projects/muito-finance/index.js b/projects/muito-finance/index.js new file mode 100644 index 000000000000..1a1c59cd0c67 --- /dev/null +++ b/projects/muito-finance/index.js @@ -0,0 +1,41 @@ +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const MUTO_FARM = "0x30b0e706fB7a6BfaFcdcd0C8290d8542b5E9C5a0"; +const MUTO_MULTI_FARM = "0xBD08D27ED845a0b75e87A756226E6a2Bc1cDc4dA"; +const NATIVE_TOKEN = "0x029d924928888697d3F3d169018d9d98d9f0d6B4".toLowerCase(); + +async function getTvl(api, farmAddress) { + let pools = await api.call({ abi: abiInfo.poolTvls, target: farmAddress }); + + pools + .filter((i) => i.assets.toLowerCase() !== NATIVE_TOKEN) + .forEach((i) => { + api.add(i.assets, i.tvl); + }); + + return await sumTokens2({ api, resolveLP: true }); +} + +async function tvl(_, _1, _2, { api }) { + await getTvl(api, MUTO_FARM); + return await getTvl(api, MUTO_MULTI_FARM); +} + +async function staking(_, _1, _2, { api }) { + let pools = await api.call({ abi: abiInfo.poolTvls, target: MUTO_FARM }); + let target = pools.find((i) => i.assets.toLowerCase() === NATIVE_TOKEN); + api.add(NATIVE_TOKEN, target.tvl) + return api.getBalances() +} + +module.exports = { + mantle: { + tvl, + staking, + }, +}; + +const abiInfo = { + poolTvls: + "function getPoolTotalTvl() view returns (tuple(uint256 pid, address assets, uint256 tvl)[])", +}; From 6203a06327d61c265df7d61401854aa6e4d9eceb Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:19:41 +0000 Subject: [PATCH 065/168] add more binance wallets (#9251) --- projects/binance/config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/binance/config.js b/projects/binance/config.js index ca614fff4b4b..1ad5a6fdc72b 100644 --- a/projects/binance/config.js +++ b/projects/binance/config.js @@ -490,6 +490,16 @@ const assetList = [ ['XRP', 'XRP', 'rPJ5GFpyDLv7gqeB1uZVUBwDwi41kaXN5A'], ['XRP', 'XRP', 'rPz2qA93PeRCyHyFCqyNggnyycJR1N4iNf'], ['XRP', 'XRP', 'rs8ZPbYqgecRcDzQpJYAMhSxSi5htsjnza'], + // THE WALLETS UNDER WHERE PROVIDED BY BINANCE TEAM ON THE 08/03/2024 + ['FDUSD', 'ETH', '0xa7C0D36c4698981FAb42a7d8c783674c6Fe2592d'], + ['USDT', 'ETH', '0xa7C0D36c4698981FAb42a7d8c783674c6Fe2592d'], + ['ETH', 'ETH', '0xa7C0D36c4698981FAb42a7d8c783674c6Fe2592d'], + ['BNB', 'BEP20', '0xa7C0D36c4698981FAb42a7d8c783674c6Fe2592d'], + ['BTC', 'BTC', 'bc1q7t9fxfaakmtk8pj7tdxjvwsng6y9x76czuaf5h'], + ['SOL', 'SOL', 'HXsKP7wrBWaQ8T2Vtjry3Nj3oUgwYcqq9vrHDM12G664'], + ['USDT', 'TRX', 'TRGCqsUXeynKTgynp2j9g3sg7Nux2KtB3u'], + ['XRP', 'XRP', 'rP3mUZyCDzZkTSd1VHoBbFt8HGm8fyq8qV'], + ] function getAddresses(chain) { From a1c870a35daa90eee13dbb0e14ff248712b7d35e Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:06:48 +0100 Subject: [PATCH 066/168] Add USTB price calculation (#9253) * changes * fastcommit * add price * code refactor --------- Co-authored-by: bd21 --- projects/superstate/index.js | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 projects/superstate/index.js diff --git a/projects/superstate/index.js b/projects/superstate/index.js new file mode 100644 index 000000000000..e0107bb5deaa --- /dev/null +++ b/projects/superstate/index.js @@ -0,0 +1,46 @@ +const { get } = require("../helper/http"); + +module.exports = { + misrepresentedTokens: true, + methodology: "Sums the total supplies of Superstate's issued tokens.", +}; + +async function USTBPrice(ts) { + const data = await get("https://api.superstate.co/v1/funds/1/nav-daily") + let date = getDate(ts) + const oneDay = 24 * 60 * 60 + let res = data.find((nav) => nav.net_asset_value_date === date) + if (!res) { + date = getDate(ts - oneDay) + res = data.find((nav) => nav.net_asset_value_date === date) + } + return res.net_asset_value +} + +const config = { + ethereum: { + USTB: '0x43415eb6ff9db7e26a15b704e7a3edce97d31c4e', + }, +} + +Object.keys(config).forEach((chain) => { + let fundsMap = config[chain]; + const fundAddresses = Object.values(fundsMap); + + module.exports[chain] = { + tvl: async (ts, _b, _cb, { api }) => { + let supplies = await api.multiCall({ abi: 'erc20:totalSupply', calls: fundAddresses }); + const price = await USTBPrice(ts); + api.addCGToken('tether', supplies[0] * price / 1e6) + } + }; +}); + +function getDate(ts) { + const date = new Date(ts * 1000); + const day = String(date.getDate()).padStart(2, '0') + const month = String(date.getMonth() + 1).padStart(2, '0'); // January is 0! + const year = date.getFullYear(); + + return `${month}/${day}/${year}`; +} \ No newline at end of file From 1798bee957e1434d81cd69a465e762173a6acf8c Mon Sep 17 00:00:00 2001 From: Aleksei Lushnikov Date: Fri, 8 Mar 2024 13:08:02 +0000 Subject: [PATCH 067/168] symbiosis adds Merlin support + add wrbtc token on Rootstock (#9252) --- projects/symbiosis-finance/config.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/symbiosis-finance/config.js b/projects/symbiosis-finance/config.js index 155c5f30351d..fd9a65b2427f 100644 --- a/projects/symbiosis-finance/config.js +++ b/projects/symbiosis-finance/config.js @@ -262,6 +262,7 @@ module.exports = { name: 'rsk', tokens: [ ADDRESSES.rsk.rUSDT, + ADDRESSES.rsk.WRBTC1, ], holders: [ '0x5aa5f7f84ed0e5db0a4a85c3947ea16b53352fd4', // portal v2 @@ -276,5 +277,14 @@ module.exports = { '0x5Aa5f7f84eD0E5db0a4a85C3947eA16B53352FD4', // portal v2 ] }, + { + name: 'merlin', + tokens: [ + ADDRESSES.merlin.WBTC, + ], + holders: [ + '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 + ] + }, ] } \ No newline at end of file From c26538372f134bc205937e0968179a293748e4f9 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 8 Mar 2024 14:48:48 +0000 Subject: [PATCH 068/168] backpack cexs --- projects/backpack/index.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 projects/backpack/index.js diff --git a/projects/backpack/index.js b/projects/backpack/index.js new file mode 100644 index 000000000000..60bad72a9cfe --- /dev/null +++ b/projects/backpack/index.js @@ -0,0 +1,25 @@ +const { cexExports } = require('../helper/cex') + +// https://dune.com/21co/backpack-exchange +const config = { + solana: { + owners: [ + '43DbAvKxhXh1oSxkJSqGosNw3HpBnmsWiak6tB5wpecN', + 'BbHG9GvPActFGogv3iNrpDAj4qpXr8t3jF16uGxXcKci' + ], + tokens: [ + 'hntyVP6YFm1Hg25TN9WGLqM12b8TQmcknKrdu1oxWux', // HNT + 'jtojtomepa8beP8AuQc6eXt5FriJwfFMwQx2v2f9mCL', // JTO + 'Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB', // USDT + 'HZ1JovNiVvGrGNiiYvEozEVgZ58xaU3RKwX8eACQBCt3', // PYTH + 'rndrizKT3MK1iimdxRdWabcF7Zg7AR5T4nud4EkHBof', // RNDR + 'mb1eu7TzEc71KxDpsmsKoucSSuuoGLv1drys1oP2jh6', // MOBILE + 'EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm', // WIF + 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263', // BONK + 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', // USDC + 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN' // JUP + ] + }, +} + +module.exports = cexExports(config) \ No newline at end of file From ede3246bee8340bb8cf0e55ffdea3cfe2dc691b5 Mon Sep 17 00:00:00 2001 From: Miner PEPE <162719909+Minerpepe@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:32:09 +0500 Subject: [PATCH 069/168] add minner pepe (#9254) --- projects/minerPepe/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/minerPepe/index.js diff --git a/projects/minerPepe/index.js b/projects/minerPepe/index.js new file mode 100644 index 000000000000..60b718f9800a --- /dev/null +++ b/projects/minerPepe/index.js @@ -0,0 +1,19 @@ +const { sumTokensExport } = require("../helper/unknownTokens") +const ADDRESSES = require('../helper/coreAssets.json') +const LPS = ["0xd60f323965eD3D6b90e66eA676414A31D53A0b98"] +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: [ + [ADDRESSES.null, '0x93Fb89601B5C3253b50c8d650C11bDfe5FB7EE3F'], + ["0x0E09FaBB73Bd3Ade0a17ECC321fD13a19e81cE82", '0x18951EEe359A98fFC22b7F22641Db6E7f8571A5A'], + ] + }), + staking: sumTokensExport({ owners: ['0x26e6B07013748a1C9C12ff17A51A95e40456689C'], tokens: TOKENS, lps: LPS, useDefaultCoreAssets: true, }), + }, +} \ No newline at end of file From 3957276fcf93c6e3a0f791729b88d67b7c17378f Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Fri, 8 Mar 2024 20:42:26 +0000 Subject: [PATCH 070/168] fix --- projects/hyperlock/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hyperlock/index.js b/projects/hyperlock/index.js index c7576f533c18..c1daf49b76c8 100644 --- a/projects/hyperlock/index.js +++ b/projects/hyperlock/index.js @@ -4,6 +4,6 @@ const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { doublecounted: true, blast: { - tvl: sumTokensExport({ owner: '0xc28EffdfEF75448243c1d9bA972b97e32dF60d06', resolveUniV3: true, }) + tvl: sumTokensExport({ owners: ['0xc28EffdfEF75448243c1d9bA972b97e32dF60d06', '0xC3EcaDB7a5faB07c72af6BcFbD588b7818c4a40e'], resolveUniV3: true, }) } } \ No newline at end of file From 4369995c5c9c42a0440e3d0f25563b5b569a9adb Mon Sep 17 00:00:00 2001 From: Bill Clippy <80559444+bill-clippy@users.noreply.github.com> Date: Fri, 8 Mar 2024 15:38:31 -0800 Subject: [PATCH 071/168] remove dup tvl calculated in tranchess eth (#9255) --- projects/tranchess/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/projects/tranchess/index.js b/projects/tranchess/index.js index 85e0eb754ca2..7b2b6c4f13ec 100644 --- a/projects/tranchess/index.js +++ b/projects/tranchess/index.js @@ -30,7 +30,6 @@ const v2Swaps = [ ] const ETHV2Funds = [ - '0x69c53679EC1C06f3275b64C428e8Cd069a2d3966', // ETH V2 Fund (ETH mainnet) '0x811c9dD8B7B670A78d02fac592EbbE465e5dD0FA', // wstETH Fund (ETH mainnet) ] From 30cd6724477d8a508a04c48e0a3824ee64059975 Mon Sep 17 00:00:00 2001 From: AronYeager <100383952+AronYeager@users.noreply.github.com> Date: Fri, 8 Mar 2024 18:42:34 -0500 Subject: [PATCH 072/168] Add clone protocol (#9256) --- projects/clone/index.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 projects/clone/index.js diff --git a/projects/clone/index.js b/projects/clone/index.js new file mode 100644 index 000000000000..e9c5e4039114 --- /dev/null +++ b/projects/clone/index.js @@ -0,0 +1,35 @@ +const anchor = require("@coral-xyz/anchor"); +const { sumTokens2, getProvider, } = require("../helper/solana"); + +const programId = new anchor.web3.PublicKey( + 'C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr') + +async function tvl() { + const provider = getProvider() + const idl = await anchor.Program.fetchIdl(programId, provider) + const program = new anchor.Program(idl, programId, provider) + + let owners = [] + let tokens = [] + + const cloneAccountAddress = anchor.web3.PublicKey.findProgramAddressSync( + [Buffer.from("clone")], programId)[0] + + const cloneAccount = await program.account.clone.fetch(cloneAccountAddress) + owners.push(cloneAccount.collateral.vault.toString()) + tokens.push(cloneAccount.collateral.mint.toString()) + + return sumTokens2({ + tokens, + owners, + }) +} + +module.exports = { + timetravel: false, + solana: { + tvl, + }, + methodology: + 'Return the amount of collateral in the vault.' +} From 81e84ff188e7562d3ac5dbf8381e9980643336c3 Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Sat, 9 Mar 2024 00:21:58 +0000 Subject: [PATCH 073/168] add clone treasury --- projects/treasury/clone.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/treasury/clone.js diff --git a/projects/treasury/clone.js b/projects/treasury/clone.js new file mode 100644 index 000000000000..5d14ac9dcda3 --- /dev/null +++ b/projects/treasury/clone.js @@ -0,0 +1,10 @@ +const { treasuryExports } = require("../helper/treasury"); + +module.exports = treasuryExports({ + solana: { + owners: [ + 'GPJyF8fTgKKPykRW1XSrXiEXdJTJLHnhUqdDyyek66Z', + ], + ownTokens: [] + }, +}) \ No newline at end of file From d03606c95fab6c10aa41578c77db9862b5c606e7 Mon Sep 17 00:00:00 2001 From: 0xkaidev <92993009+0xkaidev@users.noreply.github.com> Date: Sat, 9 Mar 2024 15:35:26 +0700 Subject: [PATCH 074/168] moraswap v3 (#9258) * moraswap v2 * add neon evm chain * code refactor * sMora staking * import lib * code refactor * moraswap v3 * Update fromBlock --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/moraswap-v3/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 projects/moraswap-v3/index.js diff --git a/projects/moraswap-v3/index.js b/projects/moraswap-v3/index.js new file mode 100644 index 000000000000..67d7c38a920c --- /dev/null +++ b/projects/moraswap-v3/index.js @@ -0,0 +1,9 @@ +const { uniV3Export } = require('../helper/uniswapV3') + +module.exports = uniV3Export({ + neon_evm: { + factory: '0x58122246F7e33669cde3486Dd72f95c2e886E375', + fromBlock: 237396579, + isAlgebra: false, + } +}) From 48730f3a134179b8926cc071531276f1554780a2 Mon Sep 17 00:00:00 2001 From: ZeroTwoDAO Date: Sat, 9 Mar 2024 09:54:02 +0100 Subject: [PATCH 075/168] Add gasline protocol (#9238) * Add gasline protocol * Make linter happy * Only track TVL for WETH deposits on gasline * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/gasline/index.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 projects/gasline/index.js diff --git a/projects/gasline/index.js b/projects/gasline/index.js new file mode 100644 index 000000000000..0c107fd06318 --- /dev/null +++ b/projects/gasline/index.js @@ -0,0 +1,17 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); + +const config = { + blast: { gasline: '0xD5400cAc1D76f29bBb8Daef9824317Aaf9d3C0a1', weth: '0x4300000000000000000000000000000000000004', }, + bsc: { gasline: '0x35138Ddfa39e00C642a483d5761C340E7b954F94', weth: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', }, +} + +Object.keys(config).forEach(chain => { + const {gasline, weth} = config[chain] + module.exports[chain] = { + tvl: sumTokensExport({ owner: gasline, tokens: [weth] }), + borrowed: async (_, _b, _cb, { api, }) => { + const supply = await api.call({ abi: 'erc20:totalSupply', target: gasline}) + api.addGasToken(supply) + }, + } +}) \ No newline at end of file From a42897f4d5b2c46d6203fa91c3623fa2dfe4b9df Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 9 Mar 2024 11:56:26 +0100 Subject: [PATCH 076/168] bugfix --- projects/clone/index.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/projects/clone/index.js b/projects/clone/index.js index e9c5e4039114..88136f79d806 100644 --- a/projects/clone/index.js +++ b/projects/clone/index.js @@ -1,28 +1,22 @@ const anchor = require("@coral-xyz/anchor"); const { sumTokens2, getProvider, } = require("../helper/solana"); -const programId = new anchor.web3.PublicKey( - 'C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr') +const programId = new anchor.web3.PublicKey('C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr') async function tvl() { const provider = getProvider() const idl = await anchor.Program.fetchIdl(programId, provider) const program = new anchor.Program(idl, programId, provider) - let owners = [] - let tokens = [] + let tokenAccounts = [] const cloneAccountAddress = anchor.web3.PublicKey.findProgramAddressSync( - [Buffer.from("clone")], programId)[0] + [Buffer.from("clone")], programId)[0] const cloneAccount = await program.account.clone.fetch(cloneAccountAddress) - owners.push(cloneAccount.collateral.vault.toString()) - tokens.push(cloneAccount.collateral.mint.toString()) + tokenAccounts.push(cloneAccount.collateral.vault.toString()) - return sumTokens2({ - tokens, - owners, - }) + return sumTokens2({ tokenAccounts }) } module.exports = { From a1642acceb329a35d2c523f4732078738d037b4f Mon Sep 17 00:00:00 2001 From: Dan Hsu Date: Sat, 9 Mar 2024 18:58:44 +0800 Subject: [PATCH 077/168] Add new Fee Rate BUCK-USDC vault to TVL (#9259) * feature: add strater project * feature: set the package-lock.json to the same version of original repo * feature: replace decimal.js to bignumber.js --- projects/strater/index.js | 43 ++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/projects/strater/index.js b/projects/strater/index.js index b849082024be..3c4587bfba0d 100644 --- a/projects/strater/index.js +++ b/projects/strater/index.js @@ -2,11 +2,20 @@ const ADDRESSES = require("../helper/coreAssets.json"); const sui = require("../helper/chain/sui"); const { addUniV3LikePosition } = require("../helper/unwrapLPs"); -const BUCKETUS_VAULT_ID = "0x1a0b93fd2965ce3ceb4039c90b232ddee7b0e79015cab0ca10528bb5f4285188"; -const BUCK_USDC_POOL_ID = "0x6ecf6d01120f5f055f9a605b56fd661412a81ec7c8b035255e333c664a0c12e7"; +const BUCKETUS_VAULT_ID = + "0x1a0b93fd2965ce3ceb4039c90b232ddee7b0e79015cab0ca10528bb5f4285188"; +const BUCK_USDC_POOL_ID = + "0x6ecf6d01120f5f055f9a605b56fd661412a81ec7c8b035255e333c664a0c12e7"; -const CETABLE_VAULT_ID = "0xeed4e7948f88f1f044b653717a7855eef6fe188e9cbbb103d5169f9bc3edd257"; -const USDC_USDT_POOL_ID = "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20"; +const FEE_RATE_BUCKETUS_VAULT_ID = + "0x6edfc992f6e775fe926a5e850661c151ad01e6149e9b34792a2102e1721065fc"; +const FEE_RATE_BUCK_USDC_POOL_ID = + "0x81fe26939ed676dd766358a60445341a06cea407ca6f3671ef30f162c84126d5"; + +const CETABLE_VAULT_ID = + "0xeed4e7948f88f1f044b653717a7855eef6fe188e9cbbb103d5169f9bc3edd257"; +const USDC_USDT_POOL_ID = + "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20"; function asIntN(int, bits = 32) { return Number(BigInt.asIntN(bits, BigInt(int))); @@ -27,7 +36,28 @@ async function tvl(_, _1, _2, { api }) { liquidity: bucketusPosition.liquidity, token0: ADDRESSES.sui.BUCK, token1: ADDRESSES.sui.USDC, - }) + }); + + const feeRateBucketusVaultObjs = await sui.getObject( + FEE_RATE_BUCKETUS_VAULT_ID + ); + const feeRateBucketusPoolObjs = await sui.getObject( + FEE_RATE_BUCK_USDC_POOL_ID + ); + + const feeRateBucketusPool = feeRateBucketusPoolObjs.fields; + const feeRateBucketusPosition = + feeRateBucketusVaultObjs.fields.position.fields; + + addUniV3LikePosition({ + api, + tickLower: asIntN(feeRateBucketusPosition.tick_lower_index.fields.bits), + tickUpper: asIntN(feeRateBucketusPosition.tick_upper_index.fields.bits), + tick: asIntN(feeRateBucketusPool.current_tick_index.fields.bits), + liquidity: feeRateBucketusPosition.liquidity, + token0: ADDRESSES.sui.BUCK, + token1: ADDRESSES.sui.USDC, + }); const cetableVaultObjs = await sui.getObject(CETABLE_VAULT_ID); const cetablePoolObjs = await sui.getObject(USDC_USDT_POOL_ID); @@ -35,7 +65,6 @@ async function tvl(_, _1, _2, { api }) { const cetablePool = cetablePoolObjs.fields; const cetablePosition = cetableVaultObjs.fields.position.fields; - addUniV3LikePosition({ api, tickLower: asIntN(cetablePosition.tick_lower_index.fields.bits), @@ -44,7 +73,7 @@ async function tvl(_, _1, _2, { api }) { liquidity: cetablePosition.liquidity, token0: ADDRESSES.sui.USDT, token1: ADDRESSES.sui.USDC, - }) + }); } module.exports = { From 29ce7562bfb2cb2b5e3e3c077ca67feada6a412e Mon Sep 17 00:00:00 2001 From: Bill Clippy <80559444+bill-clippy@users.noreply.github.com> Date: Sun, 10 Mar 2024 00:48:42 -0800 Subject: [PATCH 078/168] fix incorrect asset address use on ETH (#9262) --- projects/tranchess/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/tranchess/index.js b/projects/tranchess/index.js index 7b2b6c4f13ec..9a3f46b0dae8 100644 --- a/projects/tranchess/index.js +++ b/projects/tranchess/index.js @@ -202,7 +202,7 @@ async function ethereum(timestamp, blockETH, chainBlocks){ block: blockETH })).output - sdk.util.sumSingleBalance(balances, getBSCAddress(quoteAddress), balancesInSwap[1]) + sdk.util.sumSingleBalance(balances, quoteAddress, balancesInSwap[1]) } return balances From e383541693625f5e4e4010e329b687f76cc9bdc4 Mon Sep 17 00:00:00 2001 From: Aleksei Lushnikov Date: Sun, 10 Mar 2024 10:11:43 +0000 Subject: [PATCH 079/168] symbiosis adds wbtc pool (#9265) --- projects/symbiosis-finance/config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/symbiosis-finance/config.js b/projects/symbiosis-finance/config.js index fd9a65b2427f..6e8898695707 100644 --- a/projects/symbiosis-finance/config.js +++ b/projects/symbiosis-finance/config.js @@ -9,6 +9,7 @@ module.exports = { ADDRESSES.ethereum.USDC, ADDRESSES.ethereum.USDT, ADDRESSES.ethereum.WETH, + ADDRESSES.ethereum.WBTC, XDAO, ], holders: [ @@ -23,6 +24,7 @@ module.exports = { ADDRESSES.bsc.BUSD, ADDRESSES.bsc.USDC, ADDRESSES.bsc.ETH, + ADDRESSES.bsc.BTCB, XDAO, ], holders: [ @@ -128,6 +130,7 @@ module.exports = { tokens: [ ADDRESSES.era.USDC, ADDRESSES.era.WETH, + ADDRESSES.era.WBTC, ], holders: [ '0x39dE19C9fF25693A2311AAD1dc5C790194084A39', // portal v2 From 425364848c26f76dd9b262f3455e45f38e8e0466 Mon Sep 17 00:00:00 2001 From: 0xShad0w <44497716+0xShad0w@users.noreply.github.com> Date: Sun, 10 Mar 2024 10:28:45 +0000 Subject: [PATCH 080/168] fix tvl (#9267) --- projects/nile-exchange/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/nile-exchange/index.js b/projects/nile-exchange/index.js index 002bd78b4de5..bd0eee8cda73 100644 --- a/projects/nile-exchange/index.js +++ b/projects/nile-exchange/index.js @@ -1,5 +1,5 @@ const { uniV3Export } = require('../helper/uniswapV3') module.exports = uniV3Export({ - linea: { factory: '0xAAA32926fcE6bE95ea2c51cB4Fcb60836D320C42', fromBlock: 1822530, }, + linea: { factory: '0xAAA32926fcE6bE95ea2c51cB4Fcb60836D320C42', fromBlock: 1768897, }, }) \ No newline at end of file From 15f2d0a49c92ad2f60c72755dd5d788431dee172 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 10 Mar 2024 11:35:19 +0100 Subject: [PATCH 081/168] update standard mode --- projects/standard-mode/index.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/projects/standard-mode/index.js b/projects/standard-mode/index.js index 7f8e071e94ef..27125032b1e1 100644 --- a/projects/standard-mode/index.js +++ b/projects/standard-mode/index.js @@ -1,16 +1,19 @@ const { getLogs } = require('../helper/cache/getLogs') const config = { - mode: { factory: '0x4D1b18A7BDB8D0a02f692398337aBde8DeB8FB09', fromBlock: 4381503, }, - blast: { factory: '0x2CC505C4bc86B28503B5b8C450407D32e5E20A9f', fromBlock: 434946, }, + mode: [{ factory: '0x4D1b18A7BDB8D0a02f692398337aBde8DeB8FB09', fromBlock: 4381503, }, { factory: '0xaA0075035b814eA7638C15100cFa86a03397bE91', fromBlock: 4937855, },], + blast: [{ factory: '0x2CC505C4bc86B28503B5b8C450407D32e5E20A9f', fromBlock: 434946, }, { factory: '0xA8a336Ec4D546c2Dc9F188E0Be4B3FB174791813', fromBlock: 616605, },] } Object.keys(config).forEach(chain => { - const { factory, fromBlock } = config[chain] module.exports[chain] = { tvl: async (_, _b, _cb, { api, }) => { - const logs = await getLogs({ api, target: factory, eventAbi: 'event PairAdded(address orderbook, address base, address quote, uint8 bDecimal, uint8 qDecimal)', onlyArgs: true, fromBlock, }) - const ownerTokens = logs.map(log => [[log.base, log.quote], log.orderbook]) - return api.sumTokens({ ownerTokens}) + const ownerTokens = [] + for (const { factory, fromBlock } of config[chain]) { + const logs = await getLogs({ api, target: factory, eventAbi: 'event PairAdded(address orderbook, address base, address quote, uint8 bDecimal, uint8 qDecimal)', onlyArgs: true, fromBlock, }) + const _ownerTokens = logs.map(log => [[log.base, log.quote], log.orderbook]) + ownerTokens.push(..._ownerTokens) + } + return api.sumTokens({ ownerTokens }) } } -}) +}) \ No newline at end of file From 2aff1a123569e0a81b02344d7c69346c5d64c55d Mon Sep 17 00:00:00 2001 From: Deadshot Ryker <151393124+deadshotryker@users.noreply.github.com> Date: Sun, 10 Mar 2024 16:07:14 +0530 Subject: [PATCH 082/168] added linea and the mainnet lrt markets (#9264) --- projects/zerolend/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/zerolend/index.js b/projects/zerolend/index.js index aebd87b1538d..56cc7747a40b 100644 --- a/projects/zerolend/index.js +++ b/projects/zerolend/index.js @@ -10,4 +10,10 @@ module.exports = { blast: aaveExports("blast", undefined, undefined, [ "0xc6DF4ddDBFaCb866e78Dcc01b813A41C15A08C10", ]), + linea: aaveExports("linea", undefined, undefined, [ + "0x67f93d36792c49a4493652B91ad4bD59f428AD15", + ]), + ethereum: aaveExports("ethereum", undefined, undefined, [ + "0x47223D4eA966a93b2cC96FFB4D42c22651FADFcf", + ]), }; From 7cad9ff23cdf378c0dc4e8f9beb9a05328c6c67d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Sun, 10 Mar 2024 11:40:10 +0100 Subject: [PATCH 083/168] Refactor Aave chain configurations --- projects/zerolend/index.js | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/projects/zerolend/index.js b/projects/zerolend/index.js index 56cc7747a40b..92a769822b77 100644 --- a/projects/zerolend/index.js +++ b/projects/zerolend/index.js @@ -1,19 +1,13 @@ const { aaveExports } = require("../helper/aave"); -module.exports = { - era: aaveExports("era", undefined, undefined, [ - "0xB73550bC1393207960A385fC8b34790e5133175E", - ]), - manta: aaveExports("manta", undefined, undefined, [ - "0x67f93d36792c49a4493652B91ad4bD59f428AD15", - ]), - blast: aaveExports("blast", undefined, undefined, [ - "0xc6DF4ddDBFaCb866e78Dcc01b813A41C15A08C10", - ]), - linea: aaveExports("linea", undefined, undefined, [ - "0x67f93d36792c49a4493652B91ad4bD59f428AD15", - ]), - ethereum: aaveExports("ethereum", undefined, undefined, [ - "0x47223D4eA966a93b2cC96FFB4D42c22651FADFcf", - ]), -}; +const config = { + era: "0xB73550bC1393207960A385fC8b34790e5133175E", + manta: "0x67f93d36792c49a4493652B91ad4bD59f428AD15", + blast: "0xc6DF4ddDBFaCb866e78Dcc01b813A41C15A08C10", + linea: "0x67f93d36792c49a4493652B91ad4bD59f428AD15", + ethereum: "0x47223D4eA966a93b2cC96FFB4D42c22651FADFcf", +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = aaveExports(chain, undefined, undefined, [config[chain]]) +}) \ No newline at end of file From ff502b607daf2385a91a7e4d6bb0ff4d17f3c5a4 Mon Sep 17 00:00:00 2001 From: hmMachghoul <97662562+hmMachghoul@users.noreply.github.com> Date: Sun, 10 Mar 2024 11:42:34 +0100 Subject: [PATCH 084/168] add Opulous OVault TVL (#8994) * add Opulous OVault TVL * mark lent assets as borrowed --------- Co-authored-by: hmMachghoul Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/opulous/index.js | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/projects/opulous/index.js b/projects/opulous/index.js index 33c11ad41032..41c3280c4f75 100644 --- a/projects/opulous/index.js +++ b/projects/opulous/index.js @@ -1,6 +1,6 @@ const { lookupApplications } = require("../helper/chain/algorand"); -async function staking() { +async function algorandStaking() { const poolIds = [843061415, 1127413236, 1020347200]; let totalPoolAmount = 0; @@ -21,6 +21,16 @@ async function staking() { 'opulous': totalPoolAmount }; } +const arbitrumTVL = async (_, _b, _cb, { api }) => { + // getting the total supply of OVault tokens + const LPSupply = await api.call({ abi: 'uint256:LPSupply', target: '0xF27181a734BF6bd2bbbdFA8bdfcdef066759EdBa' }) + // convert OVault tokens to USDC using the LPToUsdc function + const TVL = await api.call({ abi: 'function LPToUsdc(uint256 LPNAmount) public view returns (uint256)', target: '0xF27181a734BF6bd2bbbdFA8bdfcdef066759EdBa' , params: LPSupply}) + // getting the USDC token address + const USDCToken = await api.call({ abi: 'address:usdcToken', target: '0xF27181a734BF6bd2bbbdFA8bdfcdef066759EdBa' }) + // adding the USDC TVL to the balances + api.add(USDCToken, TVL) +} module.exports = { // timetravel: true, @@ -28,7 +38,11 @@ module.exports = { methodology: `Counts the number of OPUL tokens locked in the staking pool.`, algorand: { tvl: () => ({}), - staking: staking + staking: algorandStaking + }, + arbitrum: { + tvl: () => ({}), + borrowed: arbitrumTVL, } }; From 3954cb87da1bca5af52231e5f36f4c88a6891ce2 Mon Sep 17 00:00:00 2001 From: ZeroTwoDAO Date: Sun, 10 Mar 2024 11:49:16 +0100 Subject: [PATCH 085/168] Add gasline staking (#9263) --- projects/gasline/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/projects/gasline/index.js b/projects/gasline/index.js index 0c107fd06318..e4ea19c8fcd7 100644 --- a/projects/gasline/index.js +++ b/projects/gasline/index.js @@ -1,17 +1,19 @@ +const { staking } = require("../helper/staking"); const { sumTokensExport } = require("../helper/unwrapLPs"); const config = { - blast: { gasline: '0xD5400cAc1D76f29bBb8Daef9824317Aaf9d3C0a1', weth: '0x4300000000000000000000000000000000000004', }, - bsc: { gasline: '0x35138Ddfa39e00C642a483d5761C340E7b954F94', weth: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', }, + blast: { gasline: '0xD5400cAc1D76f29bBb8Daef9824317Aaf9d3C0a1', gas: '0x5d61c3f602579873Bb58d8DF53a9d82942de5267', weth: '0x4300000000000000000000000000000000000004', }, + bsc: { gasline: '0x35138Ddfa39e00C642a483d5761C340E7b954F94', gas: '0xd0245a9fe3D8366e8c019ce9CE4cAdFF0cEabB76', weth: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', }, } Object.keys(config).forEach(chain => { - const {gasline, weth} = config[chain] + const {gasline, gas, weth} = config[chain] module.exports[chain] = { tvl: sumTokensExport({ owner: gasline, tokens: [weth] }), + staking: staking(gasline, gas, chain), borrowed: async (_, _b, _cb, { api, }) => { const supply = await api.call({ abi: 'erc20:totalSupply', target: gasline}) api.addGasToken(supply) }, } -}) \ No newline at end of file +}) From f7b48d680cbe46565cfba4ce2629269989bbb5df Mon Sep 17 00:00:00 2001 From: Define101 <93603962+Define101@users.noreply.github.com> Date: Sun, 10 Mar 2024 14:04:25 +0000 Subject: [PATCH 086/168] remove old wallets okcoin (#9268) --- projects/okcoin/index.js | 81 ---------------------------------------- 1 file changed, 81 deletions(-) diff --git a/projects/okcoin/index.js b/projects/okcoin/index.js index f97b4f305e72..c3ec17a84c5e 100644 --- a/projects/okcoin/index.js +++ b/projects/okcoin/index.js @@ -15,88 +15,7 @@ const config = { bitcoin: { owners: [ // we only added wallets with more than 0.1 BTC - 'bc1q39q4hqvchfq2ynyl5xttshkpvdsvp958uq94m0ddv4gt92xhnlvsj32mfy', - 'bc1qv3ertag30cfd58e9krg7ee2etp2628yapwfv27scf3t4yaqvz5wslag54w', - "36Y1UJBWGGreKCKNYQPVPr41rgG2sQF7SC", - "bc1qwkq9e5teav7n4v5v9msdyxh3tdl8782xhf9y02ffnkutppkm4rxsq5wes2", - "bc1qzrz29mxxlv3lnsng50lzpa6xrl848jp3lwmcn67t082k2xv45muswkwelc", - "bc1quktu2u654pelsn7qtmv839yyg0xecmdr59r6tuu0t5hcxq5nsxwqc5fzpu", - "bc1q65v48necseqseqm7dggtz5wf6clvwj8t8a0wswucgy8664uad7ysyf705a", - "bc1q8hnvhz3kdpxv7p7nzh2pm5qn95kfp0ff8sfk435ega90cxae374sgd8658", - "bc1qwqtm4d9x4fa7lvc88xl0autp42lkqgmp6pdpw9hpsvt9ac8k2xvq83dkz4", - "bc1qsrdlqttu69x44z9ch4r2e4t9x099rpf3p7rtu3yzpufrz4dsse0qcpqxjn", - "bc1q0peyk5wv6uathf6jlal3sqd4s66y5hfux2vh5x9z47kkt6cu4dxq05t57u", - "bc1qnp7julzx0qyyz7dapdjjyuvlhd696frj0puu9gptwdutvhryyvcsuvc3na", - "bc1qyc54t9mc7rh0srk5ctyshykqmz793y30r6jrn372v8wx76gydgwqafugxu", - "bc1qx0v26ajsfq07j4l9c60eqa7putpcvakz2u234ywh9yk3lsrd5u0s8zh9hr", - "bc1qmsdxj3j3fq9mw2733dhpvc5d79u3nhekt6fqz4y3h40gqzq7kvgq0fwjku", - "bc1qxty7nz6zwk6lfxtzsldksfsgfpvem2hewn72mc9dm09y3xq7dh7qcnyul9", - "bc1q6pgpwufv42jrq724waqdhsv9vg3wrgrcw93mj0kpdpy3d622uyyspfc9nr", - "bc1qvc6tmyr9pas29d09hu7l0n8q5eqmcepptls3lrdkhxvdc4jhatzsa6wfls", - "bc1qlaltsl05swgtvweq9uc9qmy94n2l8t92y2rxy0wnxz72jdt3qugschn0rt", - "bc1qy3s7efla47m9s32pqwg220p3a4de4f2uqe0rfmqhdfh30h52rguspl52g6", - "bc1q0708h4g2g35xfwujrrgxj6e0j2et6qkfr3a85dc2lzmyyezg4eeszmkrae", - "35EyyC2Q7UTTzmcWeuVd7b96cjkR2ykadT", - "36igHhLGsmCt4Qh1TZTgzinEjU3AQipVDi", - "36j6PzEU83pmM1PbHCP3uBH9HcuwYX1igb", - "361SutatvucBNkTBZvmNPaXThLbDm1XK5i", - "38xvfmxwR81ZtdQRw8j5XLwP38J2AioW6i", - "33qUcf4RyoysAn1TxQgzEBodvq22pDT32H", - "3HPQGA5BDsfk2Wxy4jjkg9bNpxKz33kN5o", - "3FJ6vkm44vwPQz7X82S2q9poh55tTgECM7", - "3EunnmL6LhqcB9u3PVbUAdtj1vZdGQgFBP", - "3JnxnGXVn1iSkjhsAtNRq2GGgZaDXz9SZv", - "3BiJA1srAFWoaoCPAjvNiwSmgFGGnRXCQA", - "3Mn6GnHRtA5S9HWgKdJnTfGyCgj5r8a7d8", "bc1q2s3rjwvam9dt2ftt4sqxqjf3twav0gdx0k0q2etxflx38c3x8tnssdmnjq", - "3DekqjWw33GGZi6ER4QLTsyDZV8gEycLnt", - "3DFiiWYGszd44qADZFMae4vSwVkzKH9D1J", - "3BQ2ZssxxTpkDhSC1kanGpQ2ofNfZHfqdE", - "3L8Jow9gos1tewxYKvhxUeE43dzxFP7jfw", - "3Jcus23RVs6iyCLS4x67o64wZJuxyLJPEy", - "3EsXfkx4hdLdX6GhzthGw4G4QJSPymGyqY", - "39yNTRaotoLsGtUWrJQ2FTg4uT9i8jETNs", - "34Hx5KffA1mUQG23ZdcZ7zhpPj1jdHRPB7", - "336RCi69KyksFvfd5K8nVgv2V6L4TzPo5e", - "33Us9LTox4pPCyDRucWAeAgv5HFJ3F8QEY", - "33Miwhfghqp2fPre272zM6bBPjU6fFBjdP", - "3JrDVvApcDrJvYUhGoSXAkwCxJkxH37uRY", - "3ARVBKq7MESv4aKXeXZVjhMxmBBC7Uohvt", - "37jUoYXzKb5M2kvdXRxGnwmRrHLXuBPkGR", - "358DzMfBG2fzVMYTZjktqUQaDMR5WpYFGJ", - "35tt48ioWimAbPLxk4MfWkp6La2B7gRbRd", - "3MWUMsGmx3y1iBDCwjkZp1XdUxEHYNzUq2", - "3L39V5WF9422tHSjK7joFPnriioCrPim7j", - "35PTstw2PqGrquLnUhmye3A2nMZJzeK5MF", - "39uKss4GEpj7F8Z39tSThmatWivVW9N3cV", - "bc1qngnta9lvmht9z6y4nq5kc8x57pzan0e5daxrxtg3llgpd2jfumts8056hj", - "bc1q73cqllektyf7wgkfl9ar85sr56vuz7w8lre75ux8m0r3vcplqjmq6d8jkd", - "3Bbyo51FEEM8jzw2JQEwu7DQmBPMJzWRj4", - "3Kib3E62NKnL4bAy425G14BPofYH5qMgMF", - "3H36uhmRugEN9ySYSh4ZftP1GerUfvseXP", - "3EXXcxmcfAtMG5SeUshEZMGD3NEuDZWSXg", - "3PTcMGdNKYV5ZZDQorNYmMxoVDoghFcwWn", - "3FmNm3byE5qwzfgQbQod3jHoKGy5r4Qapp", - "36LdQB5Ae5BbnQv18R61qotgicbG1dTaBj", - "3HWqMWUcDxFjyCKvSBSmYDpGXWNqPaYoW1", - "3MxBjHLRhvV1jPLTtgUAdfDw8xJ4ww5R3z", - "3GVHA98byHdxekZjBhHBWdHCMH4GRNC61e", - "35t1TFTbUcTH5ZnZiMVqQUPUtfT4sRcTrC", - "3AxGEYCt8Hq13E6LhENzL1q6ieP7fv9M8s", - "bc1qp8gd6xakvqqg7qt9ktfpq4wrsfhp0jlyzy4npfk22xh5qk83fztqsuuspf", - "3NMQ4igWQVAZq1NeUSd4a2NLJ65w8JqmFS", - "33L5akK2tnaupkERpCndewo9hVNFkSuzFw", - "37J1MywnA1NY1mmC9ny4EgmkKEFB8zmg33", - "3Ad6D5e83PfTxZpdYQumYiMrFnc7S6hE1P", - "35VhixfJ7PhxF12F6oCSnzm6Cgu5RZUoMu", - "3FFyv1BR5r93YN8aVpmJ7JDeMH7TeccZw7", - "32UxKDSVdSeaNyAQQd5UfHveJzAikbGLmT", - "37HNTMRUGWFMzws1RF6fAp2sDP5m6tMwec", - "3JeBScBZpYp4szgK1R8LCZvA2tzkXr9VRD", - "38Tqph89kZ7pACYfB3QEWMmcqwT6iLYzsF", - "38E56tLzMHxpmwfdgB6BaPgNkHFh5FzaTi", - "3Kv5DCmHU64wN68hiD6hGyTgfEv3E7czDd", - "377313tZcAthF8jq2Z7zsfYPAHTvA3mg9P" ] }, tron: { From 3d834460fae43ad620ea657b3324284e43c0161b Mon Sep 17 00:00:00 2001 From: Decrypt <90518536+Decryptu@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:00:08 +0100 Subject: [PATCH 087/168] Update README.md (#9270) A word was missing in the readme, just a simple typo fix! --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ef286254b56..ab14d8212ac7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Also, don't hesitate to send a message on [our discord](https://discord.defillam 1. PLEASE PLEASE **enable "Allow edits by maintainers" while putting up the PR.** 2. Once your adapter has been merged, it takes time to show on the UI. No need to notify us on Discord. -3. Sorry, We no longer accept fetch adapter for new projects (reason: https://github.com/DefiLlama/DefiLlama-Adapters/discussions/432), we prefer the tvl to computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you. +3. Sorry, We no longer accept fetch adapter for new projects (reason: https://github.com/DefiLlama/DefiLlama-Adapters/discussions/432), we prefer the tvl to be computed from blockchain data, if you have trouble with creating a the adapter, please hop onto our discord, we are happy to assist you. 4. **For updating listing info** It is a different repo, you can find your listing in this file: https://github.com/DefiLlama/defillama-server/blob/master/defi/src/protocols/data2.ts, you can edit it there and put up a PR 5. Do not edit/push `package-lock.json` file as part of your changes, we use lockfileVersion 2, and most use v1 and using that messes up our CI 6. No need to go to our discord and announce that you've created a PR, we monitor all PRs and will review it asap From 10a03ce1a2e3e529d805768bee24fa169d3acf89 Mon Sep 17 00:00:00 2001 From: PandoraBox <161485024+pandorabok@users.noreply.github.com> Date: Sun, 10 Mar 2024 23:08:24 +0200 Subject: [PATCH 088/168] Add perfectswap (#9271) * add perfectswap * add perfectswap: change contract adrress --------- Co-authored-by: perfect-swap --- projects/perfectswap/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 projects/perfectswap/index.js diff --git a/projects/perfectswap/index.js b/projects/perfectswap/index.js new file mode 100644 index 000000000000..50a5e3d22ea1 --- /dev/null +++ b/projects/perfectswap/index.js @@ -0,0 +1,11 @@ +const { uniTvlExport } = require('../helper/calculateUniTvl.js') + +module.exports = { + misrepresentedTokens: true, + arbitrum: { + tvl: uniTvlExport("0x6df18f08dF448ca2336dA5Fe1db9c6Fef7D5dFD5", undefined, undefined, { + allPairsLength: 'uint256:allPoolsLength', + allPairs: 'function allPools(uint256) view returns (address)', + }, { useDefaultCoreAssets: true, hasStablePools: true, }), + }, +} \ No newline at end of file From 67f2e9d03f02e8269bf859606489ba4eb0f317dd Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 01:22:10 +0100 Subject: [PATCH 089/168] fix broken adapters --- projects/augmented-finance/index.js | 44 +++++++++---------- projects/elektrik/index.js | 2 +- projects/extra/index.js | 2 +- projects/helper/chain/cosmos.js | 48 ++++++++++---------- projects/helper/chain/waves.js | 38 ++++++++++++++++ projects/socean/index.js | 17 +++----- projects/solfarm.js | 4 +- projects/sora.js | 2 +- projects/sushiswap-trident/trident.js | 6 +-- projects/teahouse-v3/index.js | 4 +- projects/teahouse/index.js | 4 +- projects/tulip/index.js | 4 +- projects/vires/index.js | 63 +++++++++++++++++++-------- 13 files changed, 147 insertions(+), 91 deletions(-) diff --git a/projects/augmented-finance/index.js b/projects/augmented-finance/index.js index ff4618c85656..7f335b378421 100644 --- a/projects/augmented-finance/index.js +++ b/projects/augmented-finance/index.js @@ -1,36 +1,32 @@ -const sdk = require('@defillama/sdk'); -const { nullAddress } = require('../helper/unwrapLPs') -const abi = { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "getReservesData", "outputs": [{ "components": [{ "internalType": "address", "name": "underlyingAsset", "type": "address" }, { "internalType": "address", "name": "pricingAsset", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "baseLTVasCollateral", "type": "uint256" }, { "internalType": "uint256", "name": "reserveLiquidationThreshold", "type": "uint256" }, { "internalType": "uint256", "name": "reserveLiquidationBonus", "type": "uint256" }, { "internalType": "uint256", "name": "reserveFactor", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }, { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" }, { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" }, { "internalType": "bool", "name": "isActive", "type": "bool" }, { "internalType": "bool", "name": "isFrozen", "type": "bool" }, { "internalType": "uint128", "name": "liquidityIndex", "type": "uint128" }, { "internalType": "uint128", "name": "variableBorrowIndex", "type": "uint128" }, { "internalType": "uint128", "name": "liquidityRate", "type": "uint128" }, { "internalType": "uint128", "name": "variableBorrowRate", "type": "uint128" }, { "internalType": "uint128", "name": "stableBorrowRate", "type": "uint128" }, { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }, { "internalType": "address", "name": "depositTokenAddress", "type": "address" }, { "internalType": "address", "name": "stableDebtTokenAddress", "type": "address" }, { "internalType": "address", "name": "variableDebtTokenAddress", "type": "address" }, { "internalType": "address", "name": "strategy", "type": "address" }, { "internalType": "bool", "name": "isExternalStrategy", "type": "bool" }, { "internalType": "uint256", "name": "availableLiquidity", "type": "uint256" }, { "internalType": "uint256", "name": "totalPrincipalStableDebt", "type": "uint256" }, { "internalType": "uint256", "name": "averageStableRate", "type": "uint256" }, { "internalType": "uint256", "name": "totalStableDebt", "type": "uint256" }, { "internalType": "uint256", "name": "stableDebtLastUpdateTimestamp", "type": "uint256" }, { "internalType": "uint256", "name": "totalScaledVariableDebt", "type": "uint256" }, { "internalType": "uint256", "name": "priceInEth", "type": "uint256" }], "internalType": "struct IUiPoolDataProvider.AggregatedReserveData[]", "name": "", "type": "tuple[]" }, { "components": [{ "internalType": "address", "name": "underlyingAsset", "type": "address" }, { "internalType": "uint256", "name": "scaledDepositTokenBalance", "type": "uint256" }, { "internalType": "bool", "name": "usageAsCollateralEnabledOnUser", "type": "bool" }, { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" }, { "internalType": "uint256", "name": "scaledVariableDebt", "type": "uint256" }, { "internalType": "uint256", "name": "principalStableDebt", "type": "uint256" }, { "internalType": "uint256", "name": "stableBorrowLastUpdateTimestamp", "type": "uint256" }], "internalType": "struct IUiPoolDataProvider.UserReserveData[]", "name": "", "type": "tuple[]" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" } const config = { - ethereum: '0x8F5273c5aa638e946BC5dD2171Ae9E9184C75228', - bsc: '0xa450547F27F0947760C9C818d9fd2CD51DFA7441', - avax: '0x483B76b13B14DB4fF49359aF9DF3A51F25FaB6a0', + ethereum: '0x9276635Ec39C72866f3cF70298eFe501EB5dcDf1', + bsc: '0xEdBDF91ac20287e332c761179FaCe71eba9FBc93', + avax: '0xb2e7216F2f70ac9d9Eec70e1Ca6f2f1CADf218D5', xdai: '0x75e5cF901f3A576F72AB6bCbcf7d81F1619C6a12', } 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.", + // deadFrom: 2024-02-22 }; Object.keys(config).forEach(chain => { const provider = config[chain] module.exports[chain] = { - tvl: async (_, _b, _cb, { api, }) => { - const balances = {} - const data = await api.call({ abi, target: provider, params: nullAddress }) - data[0].forEach(i => { - sdk.util.sumSingleBalance(balances, i.underlyingAsset, i.availableLiquidity, chain) - }) - return balances - }, - borrowed: async (_, _b, _cb, { api, }) => { - const balances = {} - const data = await api.call({ abi, target: provider, params: nullAddress }) - data[0].forEach(i => { - sdk.util.sumSingleBalance(balances, i.underlyingAsset, +i.totalPrincipalStableDebt + +i.totalScaledVariableDebt, chain) - }) - return balances - }, - } -}) + borrowed: () => ({}), // project abandoned? + tvl: async (_, _1, _2, { api }) => { + if (chain === 'xdai') return {} + const tokens = await api.call({ abi: abi.getReservesList, target: config[chain] }) + const data = await api.multiCall({ abi: abi.getReserveData, calls: tokens, target: config[chain]}) + const owners = data.map(c=>c.depositTokenAddress) + return api.sumTokens({ tokensAndOwners2: [tokens, owners] }) + } + }}) + +const abi = { + "getReserveData": "function getReserveData(address asset) view returns (((uint256 data) configuration, uint128 liquidityIndex, uint128 variableBorrowIndex, uint128 currentLiquidityRate, uint128 currentVariableBorrowRate, uint128 currentStableBorrowRate, uint40 lastUpdateTimestamp, address depositTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress, address strategy, uint8 id))", + "getReserveNormalizedIncome": "function getReserveNormalizedIncome(address asset) view returns (uint256)", + "getReserveNormalizedVariableDebt": "function getReserveNormalizedVariableDebt(address asset) view returns (uint256)", + "getReservesList": "address[]:getReservesList", +} \ No newline at end of file diff --git a/projects/elektrik/index.js b/projects/elektrik/index.js index 5e2a28a80ab1..7bd0f583d092 100644 --- a/projects/elektrik/index.js +++ b/projects/elektrik/index.js @@ -10,7 +10,7 @@ const query = `{ }` async function tvl(_, _b, _cb, { api, }) { - const { pools } = await cachedGraphQuery('elektrik-1', 'https://subgraph.elektrik.network/subgraphs/name/ELEKTRIK-GRAPH', query) + const { pools } = await cachedGraphQuery('elektrik/test-2', 'https://subgraph.elektrik.network/subgraphs/name/ELEKTRIK-GRAPH', query) const ownerTokens = pools.map(i => [[i.token0.id, i.token1.id], i.id]) return sumTokens2({ api, ownerTokens, }) } diff --git a/projects/extra/index.js b/projects/extra/index.js index edabd63e72ce..bc4851a56cf5 100644 --- a/projects/extra/index.js +++ b/projects/extra/index.js @@ -34,7 +34,7 @@ Object.keys(config).forEach(chain => { const calls = [] for (let i = 1; i <= vaultLogs.length; i++) calls.push(i) - const data = await api.multiCall({ target: positionViewer, abi: getVaultAbi, calls }) + const data = (await api.multiCall({ target: positionViewer, abi: getVaultAbi, calls, permitFailure: true })).filter(i => i) data.forEach(({ pair, totalLp }) => api.add(pair, totalLp)) const tokensAndOwners = logs.map(i => [i.reserve, i.eTokenAddress]) diff --git a/projects/helper/chain/cosmos.js b/projects/helper/chain/cosmos.js index b63b7e145e77..e2cbba1fb8bc 100644 --- a/projects/helper/chain/cosmos.js +++ b/projects/helper/chain/cosmos.js @@ -1,6 +1,6 @@ -const axios = require("axios"); 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 ADDRESSES = require('../coreAssets.json') @@ -27,7 +27,7 @@ const endPoints = { persistence: "https://rest.cosmos.directory/persistence", secret: "https://rpc.ankr.com/http/scrt_cosmos", // chihuahua: "https://api.chihuahua.wtf", - injective: "https://sentry.lcd.injective.network:443", + injective: "https://injective-rest.publicnode.com", migaloo: "https://migaloo-api.polkachu.com", fxcore: "https://fx-rest.functionx.io", xpla: "https://dimension-lcd.xpla.dev", @@ -35,7 +35,7 @@ const endPoints = { neutron: "https://rest-kralum.neutron-1.neutron.org", quasar: "https://quasar-api.polkachu.com", gravitybridge: "https://gravitychain.io:1317", - sei: "https://sei-api.polkachu.com", + sei: "https://sei-rest.publicnode.com", aura: "https://lcd.aura.network", archway: "https://api.mainnet.archway.io", sifchain: "https://sifchain-api.polkachu.com", @@ -53,7 +53,7 @@ const chainSubpaths = { // some contract calls need endpoint with higher gas limit const highGasLimitEndpoints = { - 'sei1xr3rq8yvd7qplsw5yx90ftsr2zdhg4e9z60h5duusgxpv72hud3shh3qfl': "https://rest.sei-apis.com", + // 'sei1xr3rq8yvd7qplsw5yx90ftsr2zdhg4e9z60h5duusgxpv72hud3shh3qfl': "https://rest.sei-apis.com", } function getEndpoint(chain, { contract } = {}) { @@ -69,7 +69,7 @@ async function query(url, block, chain) { if (block !== undefined) { endpoint += `&height=${block - (block % 100)}`; } - return (await axios.get(endpoint)).data.result; + return (await get(endpoint)).result; } async function queryV1Beta1({ chain, paginationKey, block, url } = {}) { @@ -87,7 +87,7 @@ async function queryV1Beta1({ chain, paginationKey, block, url } = {}) { } endpoint += paginationQueryParam; } - return (await axios.get(endpoint)).data; + return get(endpoint) } async function getTokenBalance({ token, owner, block, chain }) { @@ -130,7 +130,7 @@ async function getDenomBalance({ denom, owner, block, chain } = {}) { if (block !== undefined) { endpoint += `?height=${block - (block % 100)}`; } - let { data } = await axios.get(endpoint) + let data = await get(endpoint) data = chain === 'terra' ? data.balances : data.result const balance = data.find((balance) => balance.denom === denom); return balance ? Number(balance.amount) : 0; @@ -145,8 +145,8 @@ async function getBalance2({ balances = {}, owner, block, chain, tokens, blackli endpoint += `?height=${block - (block % 100)}`; } const { - data: { balances: data }, - } = await axios.get(endpoint); + balances: data, + } = await get(endpoint); for (const { denom, amount } of data) { if (blacklistedTokens?.includes(denom)) continue; if (tokens && !tokens.includes(denom)) continue; @@ -178,13 +178,13 @@ async function queryContract({ contract, chain, data }) { if (typeof data !== "string") data = JSON.stringify(data); data = Buffer.from(data).toString("base64"); return ( - await axios.get( + await get( `${getEndpoint(chain, { contract })}/cosmwasm/wasm/v1/contract/${contract}/smart/${data}` ) - ).data.data; + ).data; } -const multipleEndpoints={ +const multipleEndpoints = { sei: [ "https://sei-api.polkachu.com", "https://sei-rest.brocha.in", @@ -197,20 +197,20 @@ const multipleEndpoints={ async function queryContractWithRetries({ contract, chain, data }) { const rpcs = multipleEndpoints[chain] - if(rpcs === undefined){ - return queryContract({contract, chain, data}) + if (rpcs === undefined) { + return queryContract({ contract, chain, data }) } if (typeof data !== "string") data = JSON.stringify(data); data = Buffer.from(data).toString("base64"); - for(let i=0; i= rpcs.length - 1){ + ).data; + } catch (e) { + if (i >= rpcs.length - 1) { throw e } } @@ -222,7 +222,7 @@ async function queryManyContracts({ contracts = [], chain, data }) { const { results, errors } = await PromisePool .withConcurrency(parallelLimit) .for(contracts) - .process(async (contract) => queryContract({ contract, chain, data })) + .process(async (contract) => queryContract({ contract, chain, data })) if (errors && errors.length) throw errors[0] @@ -237,9 +237,9 @@ async function queryContracts({ chain, codeId, }) { do { let endpoint = `${getEndpoint(chain)}/cosmwasm/wasm/v1/code/${codeId}/contracts?pagination.limit=${limit}${paginationKey ? `&pagination.key=${encodeURIComponent(paginationKey)}` : ''}` - const { data: { contracts, pagination } } = await axios.get(endpoint) - paginationKey = pagination.next_key - res.push(...contracts) + const { contracts, pagination } = await get(endpoint) + paginationKey = pagination.next_key + res.push(...contracts) } while (paginationKey) return res diff --git a/projects/helper/chain/waves.js b/projects/helper/chain/waves.js index 30fd46c1e4bc..7671b2a03b29 100644 --- a/projects/helper/chain/waves.js +++ b/projects/helper/chain/waves.js @@ -1,4 +1,5 @@ const axios = require('axios') +const { get } = require('../http') const API_HOST = "https://nodes.wavesnodes.com/"; // https://docs.waves.tech/en/waves-node/node-api/#api-of-pool-of-public-nodes const axiosObj = axios.create({ @@ -65,8 +66,45 @@ async function data(address, key) { return response.data; } +const tokenMapping = { + '3VuV5WTmDz47Dmdn3QpcYjzbSdipjQE4JMdNe1xZpX13': { cgId: 'ethereum', decimals: 8 }, + '2Fge5HEBRD3XTeg7Xg3FW5yiB9HVJFQtMXiWMQo72Up6': { cgId: 'wrapped-bitcoin', decimals: 8 }, + '9wc3LXNA4TEBsXyKtoLE9mrbDD7WMHXvXrCjZvabLAsi': { cgId: 'tether', decimals: 6 }, + 'HGgabTqUS8WtVFUJzfmrTDMgEccJuZLBPhFgQFxvnsoW': { cgId: 'usd-coin', decimals: 6 }, +} + +async function sumTokens({ owners, api, includeWaves = true, }) { + await Promise.all( + owners.map(async (owner) => { + const { balances } = await get(API_HOST + `assets/balance/${owner}`); + balances.forEach(({ assetId, balance }) => { + if (tokenMapping[assetId]) { + const { cgId, decimals } = tokenMapping[assetId] + api.addCGToken(cgId, balance / (10 ** decimals)) + } else { + api.add(assetId, balance) + } + }) + }) + ) + if (includeWaves) + await Promise.all( + owners.map(async (owner) => { + const { balance } = await get(API_HOST + `addresses/balance/${owner}`); + api.addCGToken('waves', balance / 1e8) + }) + ) +} + +async function call({ target, key}) { + const { value } = await await get(API_HOST + `addresses/data/${target}/${key}`) + return value; +} + module.exports = { + call, assetDetails, scriptEvaluate, data, + sumTokens, }; diff --git a/projects/socean/index.js b/projects/socean/index.js index 39b0753a82da..35433fae130f 100644 --- a/projects/socean/index.js +++ b/projects/socean/index.js @@ -1,15 +1,10 @@ -const { getConnection, decodeAccount, sumTokens2 } = require('../helper/solana') -const { PublicKey } = require("@solana/web3.js") -const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokens2, } = require('../helper/solana') -async function tvl(_, _1, _2, { api }) { - const connection = getConnection() -// const programPublicKey = new PublicKey('5ocnV1qiCgaQR8Jb8xWnVbApfaygJ8tNoZfgPwsgx9kx') - const stakeAccount = new PublicKey('5oc4nmbNTda9fx8Tw57ShLD132aqDK65vuHH4RU1K4LZ') - const data = await connection.getAccountInfo(stakeAccount) - const i = decodeAccount('scnStakePool', data) - api.add(ADDRESSES.solana.SOL, i.totalStakeLamports.toString()) - return api.getBalances() +// https://www.npmjs.com/package/@unstake-it/sol +// https://learn.sanctum.so/docs/contracts + +async function tvl() { + return sumTokens2({ solOwners: ['3rBnnH9TTgd3xwu48rnzGsaQkSr1hR64nY71DrDt6VrQ'],}) } module.exports = { diff --git a/projects/solfarm.js b/projects/solfarm.js index 98bef94e1308..687f1e8d1c23 100644 --- a/projects/solfarm.js +++ b/projects/solfarm.js @@ -1,9 +1,9 @@ const { get } = require('./helper/http') async function fetch() { - var response = await get('https://api.solfarm.io/tvl') + var response = await get('https://api.tulip.garden/tvl') - return response.TOTAL; + return response.total; } module.exports = { diff --git a/projects/sora.js b/projects/sora.js index fa05e920acf0..e01d0984871d 100644 --- a/projects/sora.js +++ b/projects/sora.js @@ -1,7 +1,7 @@ const { post } = require('./helper/http') async function tvl(timestamp) { - const { data: { entities: { nodes } } } = await post('https://api.subquery.network/sq/sora-xor/sora-prod-sub4', { + const { data: { entities: { nodes } } } = await post('https://api.subquery.network/sq/sora-xor/sora-prod', { "query": "query NetworkTvlQuery($after: Cursor, $type: SnapshotType, $from: Int, $to: Int) {\n entities: networkSnapshots(\n after: $after\n orderBy: TIMESTAMP_DESC\n filter: {and: [{type: {equalTo: $type}}, {timestamp: {lessThanOrEqualTo: $from}}, {timestamp: {greaterThanOrEqualTo: $to}}]}\n ) {\n pageInfo {\n hasNextPage\n endCursor\n \n }\n nodes {\n timestamp\n liquidityUSD\n }\n }\n}", "operationName": "NetworkTvlQuery", "variables": { diff --git a/projects/sushiswap-trident/trident.js b/projects/sushiswap-trident/trident.js index 268baae7e79d..9f4ca6729965 100644 --- a/projects/sushiswap-trident/trident.js +++ b/projects/sushiswap-trident/trident.js @@ -19,7 +19,7 @@ const tridentQueryWithBlock = ` query get_tokens($block: Int) { tokens( block: { number: $block } - first: 1000 + first: 100 orderBy: liquidityUSD orderDirection: desc where: { liquidityUSD_gt: 0 } @@ -34,7 +34,7 @@ const tridentQueryWithBlock = ` const tridentQuery = ` query get_tokens { tokens( - first: 1000 + first: 100 orderBy: liquidityUSD orderDirection: desc where: { liquidityUSD_gt: 0 } @@ -63,7 +63,7 @@ function trident(chain) { result.tokens.forEach((token) => { api.add(token.id, token.liquidity); }); - + return api.getBalances() }; } diff --git a/projects/teahouse-v3/index.js b/projects/teahouse-v3/index.js index 87ed0b4265ae..656dc66cf8ec 100644 --- a/projects/teahouse-v3/index.js +++ b/projects/teahouse-v3/index.js @@ -7,7 +7,7 @@ const teahouseVaultAPI = "https://vault-content-api.teahouse.finance/vaults"; // get vault contract addresses from teahouse api async function getVaultContractsAddress(chain) { let plAddress = []; - const { vaults } = await getConfig("teahouse", teahouseVaultAPI); + const { vaults } = await getConfig("teahouse/v3", teahouseVaultAPI); vaults.forEach((element) => { // v3 vaults if (element.isDeFi == true && element.isActive == true) { @@ -34,7 +34,7 @@ chains.forEach((chain) => { api.addTokens(tokens, bals); if (['boba', 'mantle'].includes(chain)) { const tvl = await api.getUSDValue() - if (+tvl === 0) throw new Error('tvl is 0') + if (+tvl === 0) throw new Error('tvl is 0 Balances:' + JSON.stringify(api.getBalances())) } return api.getBalances(); }, diff --git a/projects/teahouse/index.js b/projects/teahouse/index.js index 60ca2fc68bbc..3dc57db8b121 100644 --- a/projects/teahouse/index.js +++ b/projects/teahouse/index.js @@ -8,7 +8,7 @@ const teahouseVaultAPI = "https://vault-content-api.teahouse.finance/vaults"; // get vault contract addresses from teahouse api async function getVaultContractsAddress(chain) { let htAddress = []; - const { vaults } = await getConfig("teahouse", teahouseVaultAPI); + const { vaults } = await getConfig("teahouse/v1", teahouseVaultAPI); vaults.forEach((element) => { // v2 vaults if (element.isDeFi == false && element.isActive == true) { @@ -44,7 +44,7 @@ chains.forEach((chain) => { api.addTokens(tokens, bals); if (chain === 'bsc') { const tvl = await api.getUSDValue() - if (+tvl === 0) throw new Error('tvl is 0') + if (+tvl === 0) throw new Error('tvl is 0 Balances:' + JSON.stringify(api.getBalances())) } return api.getBalances(); }, diff --git a/projects/tulip/index.js b/projects/tulip/index.js index 1448c45638c4..6b3b7f7e98fa 100644 --- a/projects/tulip/index.js +++ b/projects/tulip/index.js @@ -6,7 +6,7 @@ const garden = "0xceF2f95f185D49bcd1c10DE7f23BEaCBaae6eD0f"; module.exports = { oasis: { - staking: staking(garden, petal, "oasis"), - tvl: getUniTVL({ factory: '0x90a5e676EFBdeFeeeb015cd87484B712fd54C96A', chain: 'oasis', useDefaultCoreAssets: true }), + staking: staking(garden, petal), + tvl: getUniTVL({ factory: '0x90a5e676EFBdeFeeeb015cd87484B712fd54C96A', useDefaultCoreAssets: true }), } }; diff --git a/projects/vires/index.js b/projects/vires/index.js index dead9c5c394d..61afd1f2f732 100644 --- a/projects/vires/index.js +++ b/projects/vires/index.js @@ -1,23 +1,50 @@ -const { wavesAdapter } = require('../helper/chain/wavesAdapter') +const { sumTokens, call } = require('../helper/chain/waves') const endpoint = "/vires" module.exports = { - timetravel: false, - 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`, - waves: { - tvl: wavesAdapter(endpoint, item => { - let tvl = 0; - item.meta.forEach(market => tvl += market.currentTotalDepositUsd - market.currentTotalDebtUsd + market.protectedSupply * market.assetPriceUsd) - return tvl - }), - borrowed: wavesAdapter(endpoint, item => { - let tvl = 0; - item.meta.forEach(market => tvl += Number(market.currentTotalDebtUsd)) - return tvl - }), - }, - hallmarks:[ - [1659092400, "Bad debt settlement in USDN"], - ], + timetravel: false, + 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`, + waves: { + tvl, borrowed, + }, + hallmarks: [ + [1659092400, "Bad debt settlement in USDN"], + ], } +const aTokens = [ + // v2 pepe + '3PMYady7KzUNnRrFGzMBnq7akMDWiCQyoQz', + '3PHxubMUtynEY2AeHq3K1kUizRPN9HUC2rt', + '3PByijo1xaCSYNKnQb98U7YMPwp5tNF84JQ', + '3PLLikQB5JEREMhjQMD1ZX7HkYZJMRW6J1q', + '3P5ggc5ssBHp1Dr7HwGLYf8SQimta99q5QT', + + // v1 + "3PCwFXSq8vj8iKitA5zrrLRbuqehfmimpce", + "3PEiD1zJWTMZNWSCyzhvBw9pxxAWeEwaghR", + "3P8G747fnB1DTQ4d5uD114vjAaeezCW4FaM", + "3PA7QMFyHMtHeP66SUQnwCgwKQHKpCyXWwd", + "3PPdeWwrzaxqgr6BuReoF3sWfxW8SYv743D", + "3PGCkrHBxFMi7tz1xqnxgBpeNvn5E4M4g8S", + "3PBjqiMwwag72VWUtHNnVrxTBrNK8D7bVcN", + "3PGzUA7Yp2RFobH9mPFYsZC1wkwWHNsP14q", + "3PNKc29PsUULxcHexjcZu7cMBqAAEYNfXnH", + "3PBEwUv36ZXRiDEaVmXR41sPvbGfm3nyC6k", + "3PN1LXdwuFWH3paF3fpMNCWk7oWRzXCeMSC" + +] + +async function tvl(_, _b, _cb, { api, }) { + return sumTokens({ + owners: aTokens, api, includeWaves: true, + }) +} + +async function borrowed(_, _b, _cb, { api, }) { + await Promise.all(aTokens.map(async (token) => { + const assetId = (await call({ target: token, key: 'assetId'})).split('_')[0] + const res = (await call({ target: token, key: 'reserveGlobalData'})).split('|')[2] + api.add(assetId, res) + })) +} \ No newline at end of file From 23359106f74d895fd2082210550542295c2cee1c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 01:39:15 +0100 Subject: [PATCH 090/168] updates neutrino adapter --- projects/helper/chain/waves.js | 4 +++- projects/neutrino/index.js | 12 +++++++++--- projects/vires/index.js | 2 -- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/projects/helper/chain/waves.js b/projects/helper/chain/waves.js index 7671b2a03b29..6ba52b31a495 100644 --- a/projects/helper/chain/waves.js +++ b/projects/helper/chain/waves.js @@ -73,11 +73,13 @@ const tokenMapping = { 'HGgabTqUS8WtVFUJzfmrTDMgEccJuZLBPhFgQFxvnsoW': { cgId: 'usd-coin', decimals: 6 }, } -async function sumTokens({ owners, api, includeWaves = true, }) { +async function sumTokens({ owners, api, includeWaves = true, blacklistedTokens = [] }) { + blacklistedTokens = new Set(blacklistedTokens) await Promise.all( owners.map(async (owner) => { const { balances } = await get(API_HOST + `assets/balance/${owner}`); balances.forEach(({ assetId, balance }) => { + if (blacklistedTokens.has(assetId)) return; if (tokenMapping[assetId]) { const { cgId, decimals } = tokenMapping[assetId] api.addCGToken(cgId, balance / (10 ** decimals)) diff --git a/projects/neutrino/index.js b/projects/neutrino/index.js index 2efa357ff40f..e9d538021fec 100644 --- a/projects/neutrino/index.js +++ b/projects/neutrino/index.js @@ -1,5 +1,11 @@ -const { wavesExport } = require('../helper/chain/wavesAdapter') +const { sumTokens } = require('../helper/chain/waves') -const endpoint = "/neutrino" -module.exports = wavesExport(endpoint, item => item.usdnLocked + item.defoLocked) \ No newline at end of file +module.exports = { + waves: { tvl } +} + +async function tvl(_, _b, _cb, { api, }) { + return sumTokens({ owners: ['3PC9BfRwJWWiw9AREE2B3eWzCks3CYtg4yo',], includeWaves: true, api, blacklistedTokens: ['DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p', '6nSpVyNH7yM69eg446wrQR94ipbbcmZMU1ENPwanC97g'] }) + +} \ No newline at end of file diff --git a/projects/vires/index.js b/projects/vires/index.js index 61afd1f2f732..53df644167b0 100644 --- a/projects/vires/index.js +++ b/projects/vires/index.js @@ -1,7 +1,5 @@ const { sumTokens, call } = require('../helper/chain/waves') -const endpoint = "/vires" - module.exports = { timetravel: false, 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`, From 15c99b5588e4b2c6b4707357df8b36d991e0b253 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 10:12:33 +0100 Subject: [PATCH 091/168] track overnight usdc+ on base --- projects/overnight-usdPlus/index.js | 41 +++++++++++++---------------- 1 file changed, 18 insertions(+), 23 deletions(-) diff --git a/projects/overnight-usdPlus/index.js b/projects/overnight-usdPlus/index.js index dae6f2820201..95751dfa1182 100644 --- a/projects/overnight-usdPlus/index.js +++ b/projects/overnight-usdPlus/index.js @@ -1,38 +1,33 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk"); const m2m = { - polygon: "0x33efB0868A6f12aEce19B451e0fcf62302Ec4A72", - bsc: "0x9Af655c4DBe940962F776b685d6700F538B90fcf", - optimism: "0x9Af655c4DBe940962F776b685d6700F538B90fcf", - arbitrum: "0x9Af655c4DBe940962F776b685d6700F538B90fcf", - era: "0x240aad990FFc5F04F11593fF4dCF1fF714d6fc80", - base: "0x1F4947Cd5A5c058DD5EA6Fd1CCd5c311aDa9E6Fb", - linea: "0x1F4947Cd5A5c058DD5EA6Fd1CCd5c311aDa9E6Fb" + polygon: ["0x33efB0868A6f12aEce19B451e0fcf62302Ec4A72"], + bsc: ["0x9Af655c4DBe940962F776b685d6700F538B90fcf",], + optimism: ["0x9Af655c4DBe940962F776b685d6700F538B90fcf",], + arbitrum: ["0x9Af655c4DBe940962F776b685d6700F538B90fcf",], + era: ["0x240aad990FFc5F04F11593fF4dCF1fF714d6fc80"], + base: ["0x1F4947Cd5A5c058DD5EA6Fd1CCd5c311aDa9E6Fb", "0x96aa0bBe4D0dea7C4AF4739c53dBFA0300262253"], + linea: ["0x1F4947Cd5A5c058DD5EA6Fd1CCd5c311aDa9E6Fb"], } const assets = { - polygon: ADDRESSES.polygon.USDC, //USDC - bsc: ADDRESSES.bsc.BUSD, //BUSD - optimism: ADDRESSES.optimism.USDC, //USDC - arbitrum: ADDRESSES.arbitrum.USDC, //USDC - era: ADDRESSES.era.USDC, - base: ADDRESSES.base.USDbC, //USDC - linea: ADDRESSES.linea.USDC //USDC + polygon: ADDRESSES.polygon.USDC, //USDC + bsc: ADDRESSES.bsc.BUSD, //BUSD + optimism: ADDRESSES.optimism.USDC, //USDC + arbitrum: ADDRESSES.arbitrum.USDC, //USDC + era: ADDRESSES.era.USDC, + base: ADDRESSES.base.USDbC, //USDC + linea: ADDRESSES.linea.USDC //USDC } const abi = "uint256:totalNetAssets" -module.exports = {}; - Object.keys(m2m).forEach(chain => { + const asset = assets[chain] module.exports[chain] = { - tvl: async (_, _b, cb) => { - const block = cb[chain] - const { output } = await sdk.api.abi.call({ chain, block, abi, target: m2m[chain]}) - return { - [`${chain}:${assets[chain]}`]: output - } + tvl: async (_, _b, cb, { api }) => { + const balances = await api.multiCall({ abi, calls: m2m[chain]}) + api.add(asset, balances) } } }) \ No newline at end of file From 0522e4d5e3b70dc075825345ff8268dad684a335 Mon Sep 17 00:00:00 2001 From: henrio123 Date: Mon, 11 Mar 2024 11:13:58 +0200 Subject: [PATCH 092/168] Sommelier: Turbo-rsETH vault (#9278) * Sommelier: Add RYBTC launch and remove Steady, Trend, & MOM vault launches * Sommelier: Add Turbo GHO vault * Update start block * Sommelier: Dedupe vaults taking position in ssister vaults from TVL * Add ETH Growth vault * Add turbo steth cellar * Add Turbo SOMM * Add Turbo eETH vault * Add new somm cellar * Sommelier: Add Morpho Maximizer * Add turbo diveth and turbo ethx vaults * Sommelier: Add Turbo eETH V2 * Sommelier: Add Turbo eETH V2 vault * Sommelier: Arbitrum vaults * Fix Arbitrum TVL cals * RYUSD-ARB * Turbo-RSETH --------- Co-authored-by: Phil Co-authored-by: Phil <30321052+philipjames44@users.noreply.github.com> --- projects/sommelier/cellar-constants.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/sommelier/cellar-constants.js b/projects/sommelier/cellar-constants.js index cf684756e2a5..5c662d52455e 100644 --- a/projects/sommelier/cellar-constants.js +++ b/projects/sommelier/cellar-constants.js @@ -55,6 +55,7 @@ const MORPHO_MAXIMIZER = "0xcf4b531b4cde95bd35d71926e09b2b54c564f5b6"; const TURBO_DIVETH = "0x6c1edce139291Af5b84fB1e496c9747F83E876c9"; const TURBO_ETHX = "0x19B8D8FC682fC56FbB42653F68c7d48Dd3fe597E"; const TURBO_EETH_V2 = "0xdAdC82e26b3739750E036dFd9dEfd3eD459b877A"; +const TURBO_RSETH = "0x1dffb366b5c5A37A12af2C127F31e8e0ED86BDbe"; const cellarsV2p5 = [ { id: TURBO_SWETH, startBlock: 17910374 }, @@ -68,6 +69,7 @@ const cellarsV2p5 = [ { id: TURBO_DIVETH, startBlock: 19117472 }, { id: TURBO_ETHX, startBlock: 19117547 }, { id: TURBO_EETH_V2, startBlock: 19163705 }, + { id: TURBO_RSETH, startBlock: 19338456 }, ]; // v2.5 Cellars on Arbitrum From a26b2f9feb81c03e7c9230ab99662206c5cd3e6e Mon Sep 17 00:00:00 2001 From: Marc Puig Date: Mon, 11 Mar 2024 10:14:23 +0100 Subject: [PATCH 093/168] add stars TVL (#9276) --- projects/pstake/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/pstake/index.js b/projects/pstake/index.js index 34a4e5b6cedb..ad9e0c742a68 100644 --- a/projects/pstake/index.js +++ b/projects/pstake/index.js @@ -28,6 +28,11 @@ const chainInfos = { name: "dydx-chain", decimals: 1e18, endpoint: "/stkdydx/dydx_tvu" + }, + stargaze: { + name: "stargaze", + decimals: 1e6, + endpoint: "/stkstars/stars_tvu" } } From 08a7c8059fcbefc25d7467d98871bcd288a849c6 Mon Sep 17 00:00:00 2001 From: Ryan C Date: Mon, 11 Mar 2024 18:16:41 +0900 Subject: [PATCH 094/168] feat: add blast config (#9274) --- projects/xy-finance/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/xy-finance/index.js b/projects/xy-finance/index.js index b57d8fa567e0..a4b7179baf29 100644 --- a/projects/xy-finance/index.js +++ b/projects/xy-finance/index.js @@ -62,6 +62,9 @@ const config = { scroll: { chainId: '534352', }, + blast: { + chainId: '81457', + }, } const ethAddress = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' @@ -374,6 +377,12 @@ const yPoolDepositContract = { "tokenAddress": ADDRESSES.scroll.USDC } }, + "81457": { + "ETH": { + "contractAddress": "0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762", + "tokenAddress": ethAddress + }, + } } module.exports={} From 468908c219401144f29f5c94ceb8a3799644411e Mon Sep 17 00:00:00 2001 From: allush Date: Mon, 11 Mar 2024 10:35:13 +0000 Subject: [PATCH 095/168] symbiosis adds Bahamut support --- projects/helper/coreAssets.json | 3 +++ projects/symbiosis-finance/config.js | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index e2afac19e3ac..a92b23a2e2bf 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1637,5 +1637,8 @@ "merlin": { "WBTC": "0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA", "VOYA": "0x480e158395cc5b41e5584347c495584ca2caf78d" + }, + "ftn": { + "USDC": "0x4237e0A5b55233D5B6D6d1D9BF421723954130D8" } } diff --git a/projects/symbiosis-finance/config.js b/projects/symbiosis-finance/config.js index 6e8898695707..7bcc46497951 100644 --- a/projects/symbiosis-finance/config.js +++ b/projects/symbiosis-finance/config.js @@ -289,5 +289,14 @@ module.exports = { '0x292fC50e4eB66C3f6514b9E402dBc25961824D62', // portal v2 ] }, + { + name: 'ftn', + tokens: [ + ADDRESSES.ftn.USDC, + ], + holders: [ + '0x318C2B9a03C37702742C3d40C72e4056e430135A', // portal v2 + ] + }, ] } \ No newline at end of file From 03545bcb9e4341056426ca64286965aa67d3d95c Mon Sep 17 00:00:00 2001 From: yepp4you Date: Mon, 11 Mar 2024 14:35:36 +0400 Subject: [PATCH 096/168] Adding new Klaytn STAKING CONTRACT addresses and deleting old ones --- projects/neopin-staking/index.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/projects/neopin-staking/index.js b/projects/neopin-staking/index.js index c4559746bb8a..05ca37668657 100644 --- a/projects/neopin-staking/index.js +++ b/projects/neopin-staking/index.js @@ -1,27 +1,31 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const { getStakedTron } = require('../helper/chain/tron'); -const { staking } = require('../helper/staking') -const { sumTokensExport } = require('../helper/sumTokens'); -const { nullAddress } = require('../helper/unwrapLPs'); +const ADDRESSES = require("../helper/coreAssets.json"); +const { getStakedTron } = require("../helper/chain/tron"); +const { staking } = require("../helper/staking"); +const { sumTokensExport } = require("../helper/sumTokens"); +const { nullAddress } = require("../helper/unwrapLPs"); module.exports = { klaytn: { tvl: sumTokensExport({ owners: [ - '0xf9d92BAd7b1410dfFB0a204B7aa418C9fd5A898F', - '0xf20816C9bdcb25da3ba79b206e9b7107ae02ae10', - '0x489d6d679F1CA4cFE6976C55B54427D1AaDb8057' + "0xf9d92BAd7b1410dfFB0a204B7aa418C9fd5A898F", + "0xf20816C9bdcb25da3ba79b206e9b7107ae02ae10", + "0x489d6d679F1CA4cFE6976C55B54427D1AaDb8057", ], tokens: [nullAddress], }), - staking: staking('0x306ee01a6ba3b4a8e993fa2c1adc7ea24462000c', ADDRESSES.klaytn.NPT, 'klaytn'), + staking: staking( + "0x306ee01a6ba3b4a8e993fa2c1adc7ea24462000c", + ADDRESSES.klaytn.NPT, + "klaytn", + ), }, tron: { tvl: async () => { return { - tron: await getStakedTron('TTjacDH5PL8hpWirqU7HQQNZDyF723PuCg') - } + tron: await getStakedTron("TTjacDH5PL8hpWirqU7HQQNZDyF723PuCg"), + }; }, }, timetravel: false, -} +}; From 84cb628a4ca9facd770207df6c339ab1bc5142a7 Mon Sep 17 00:00:00 2001 From: bitcoincashautist <80100588+A60AB5450353F40E@users.noreply.github.com> Date: Mon, 11 Mar 2024 13:07:26 +0100 Subject: [PATCH 097/168] Optimize AnyHedge I updated the scanner to split data to 1 csv per day: https://gitlab.com/0353F40E/anyhedge-stats/-/commit/6e59580091a9a3ab2b1c87d2de46b07f484e43d7 so now adapter can just download the data for 1 day instead of downloading the whole history just to extract data for 1 day --- projects/anyhedge/index.js | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/projects/anyhedge/index.js b/projects/anyhedge/index.js index 8f638c3920f8..79947df67f5e 100644 --- a/projects/anyhedge/index.js +++ b/projects/anyhedge/index.js @@ -1,24 +1,20 @@ const axios = require("axios"); - -const dayHistory = {}; - -async function GetDailyHistory() { +async function GetDailyHistory(day) { // Data & calculation method is fully reproducible, see: // https://gitlab.com/0353F40E/anyhedge-stats/-/blob/master/readme.md - - let { data } = await axios.get('https://gitlab.com/0353F40E/anyhedge-stats/-/raw/master/stats_daily.csv'); - data = parseCSV(data); - - data.forEach((row) => { - if (!row.tvl) return; - dayHistory[row.day] = row.tvl; - }); + try { + let { data } = await axios.get(`https://gitlab.com/0353F40E/anyhedge-stats/-/raw/master/stats_daily/${day}.csv`); + data = parseCSV(data); + return data[0].tvl; + } catch { + return null; + } } async function getTVLAnyHedge(timestamp) { const day = new Date(timestamp * 1000).toISOString().slice(0,10) - return dayHistory[day] + return await GetDailyHistory(day); } async function tvl(timestamp) { @@ -32,8 +28,6 @@ async function tvl(timestamp) { if (timestamp > lastTimestamp) throw "Data for the date is incomplete, awaiting contract reveals." - await GetDailyHistory(); - tvlAnyHedge = await getTVLAnyHedge(timestamp) testDataSource = await getTVLAnyHedge(timestamp + 31*86400) From 028037c9d3e83e1b3c0b63a263488471d0de3281 Mon Sep 17 00:00:00 2001 From: arth-dev <162883763+arth-dev@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:34:12 +0900 Subject: [PATCH 098/168] ArthSwap v3 (#9273) * fix staking * add arthswap v3 * fix core assets * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/arthswap-v3/index.js | 5 +++++ projects/arthswap/index.js | 27 ++++----------------------- projects/helper/coreAssets.json | 12 +++++++++++- test.js | 32 ++------------------------------ 4 files changed, 22 insertions(+), 54 deletions(-) create mode 100644 projects/arthswap-v3/index.js diff --git a/projects/arthswap-v3/index.js b/projects/arthswap-v3/index.js new file mode 100644 index 000000000000..de47f5edb361 --- /dev/null +++ b/projects/arthswap-v3/index.js @@ -0,0 +1,5 @@ +const { uniV3Export } = require('../helper/uniswapV3') +module.exports = uniV3Export({ + astar: { factory: '0x69E92b56e4BF4C0FFa2cFB087c7EA47E846a7244', fromBlock: 3957189, }, + astrzk: { factory: '0xAeaaf0e2c81Af264101B9129C00F4440cCF0F720', fromBlock: 179999, }, +}) diff --git a/projects/arthswap/index.js b/projects/arthswap/index.js index ad7bdb436da7..227944c3cf2e 100644 --- a/projects/arthswap/index.js +++ b/projects/arthswap/index.js @@ -1,31 +1,12 @@ -const ADDRESSES = require('../helper/coreAssets.json') const { getUniTVL } = require("../helper/unknownTokens"); -const { stakingPricedLP } = require("../helper/staking"); +const { staking } = require("../helper/staking"); const FACTORIES = "0xA9473608514457b4bF083f9045fA63ae5810A03E"; -const TOKENS = { - ARSW: ADDRESSES.astar.ARSW, -}; - -const STAKING_CONTRACTS = { - astar: "0x42d175a498Cb517Ad29d055ea7DcFD3D99045404", -}; - module.exports = { - timetravel: true, - methodology: "Arthswap Tvl Calculation", + misrepresentedTokens: true, astar: { - tvl: getUniTVL({ - factory: FACTORIES, - useDefaultCoreAssets: true, - }), - staking: stakingPricedLP( - STAKING_CONTRACTS.astar, - TOKENS.ARSW, - "astar", - "0x50497E7181eB9e8CcD70a9c44FB997742149482a", - "arthswap" - ), + tvl: getUniTVL({ factory: FACTORIES, useDefaultCoreAssets: true, }), + staking: staking('0x42d175a498Cb517Ad29d055ea7DcFD3D99045404', '0xde2578edec4669ba7f41c5d5d2386300bcea4678'), }, }; diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index a92b23a2e2bf..7f12fb6c273b 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -531,6 +531,7 @@ "BUSDbs": "5RpUwQ8wtdPCZHhu6MERp2RGrpobsbZ6MH5dDHkUjs2" }, "astar": { + "WASTR_1": "0xaeaaf0e2c81af264101b9129c00f4440ccf0f720", "WASTR": "0xecc867de9f5090f55908aaa1352950b9eed390cd", "WETH": "0x81ecac0d6be0550a00ff064a4f9dd2400585fe9c", "WBTC": "0xad543f18cff85c77e140e3e5e3c3392f6ba9d5ca", @@ -540,7 +541,6 @@ "USDC": "0x6a2d262d56735dba19dd70682b39f6be9a931d98", "USDT": "0x3795c36e7d12a8c252a20c5a7b455f7c57b60283", "nativeUSDT": "0xffffffff000000000000000000000001000007c0", - "ARSW": "0xde2578edec4669ba7f41c5d5d2386300bcea4678", "DOT": "0xffffffffffffffffffffffffffffffffffffffff", "DAI": "0x6de33698e9e9b787e09d3bd7771ef63557e148bb", "MUUU": "0xc5bcac31cf55806646017395ad119af2441aee37", @@ -565,6 +565,16 @@ "vDOT": "0xFfFfFfff00000000000000010000000000000008", "ASTR": "0xffffffff00000000000000010000000000000010" }, + "astarzk": { + "WETH": "0xe9cc37904875b459fa5d0fe37680d36f1ed55e38", + "USDC": "0xa8ce8aee21bc2a48a5ef670afcc9274c7bbbc035", + "USDT": "0x1e4a5963abfd975d8c9021ce480b42188849d41d", + "WBTC": "0xea034fb02eb1808c2cc3adbc15f447b93cbe08e1", + "DAI": "0xc5015b9d9161dca7e18e32f6f25c4ad850731fd4", + "MATIC": "0xa2036f0538221a77a3937f1379699f44945018d0", + "wstETH": "0x5d8cff95d7a57c0bf50b30b43c7cc0d52825d4a9", + "weETH": "0xcd68dff4415358c35a28f96fd5bf7083b22de1d6" + }, "cardano": { "ADA": "ADA" }, diff --git a/test.js b/test.js index bc0018f98717..8515d4466f26 100644 --- a/test.js +++ b/test.js @@ -4,9 +4,9 @@ const handleError = require('./utils/handleError') process.on('unhandledRejection', handleError) process.on('uncaughtException', handleError) -const { ENV_KEYS } = require("./projects/helper/env"); const path = require("path"); require("dotenv").config(); +const { ENV_KEYS } = require("./projects/helper/env"); const { util: { blocks: { getCurrentBlocks }, humanizeNumber: { humanizeNumber }, @@ -29,24 +29,6 @@ if (process.env.LLAMA_SANITIZE) delete process.env[key] }) -const locks = []; -function getCoingeckoLock() { - return new Promise((resolve) => { - locks.push(resolve); - }); -} -function releaseCoingeckoLock() { - const firstLock = locks.shift(); - if (firstLock !== undefined) { - firstLock(null); - } -} -// Rate limit is 50 calls/min for coingecko's API -// So we'll release one every 1.2 seconds to match it -setInterval(() => { - releaseCoingeckoLock(); -}, 2000); -const maxCoingeckoRetries = 5; async function getTvl( unixTimestamp, @@ -58,7 +40,6 @@ async function getTvl( tvlFunction, isFetchFunction, storedKey, - knownTokenPrices ) { if (!isFetchFunction) { const chain = storedKey.split('-')[0] @@ -66,14 +47,7 @@ async function getTvl( const api = new sdk.ChainApi({ chain, block: chainBlocks[chain], timestamp: unixTimestamp, }) let tvlBalances = await tvlFunction(unixTimestamp, ethBlock, chainBlocks, { api, chain, block, storedKey }); if (!tvlBalances && Object.keys(api.getBalances()).length) tvlBalances = api.getBalances() - const tvlResults = await computeTVL( - tvlBalances, - "now", - false, - knownTokenPrices, - getCoingeckoLock, - maxCoingeckoRetries - ); + const tvlResults = await computeTVL(tvlBalances, "now"); await diplayUnknownTable({ tvlResults, storedKey, tvlBalances, }) usdTvls[storedKey] = tvlResults.usdTvl; tokensBalances[storedKey] = tvlResults.tokenBalances; @@ -170,7 +144,6 @@ sdk.api.abi.call = async (...args) => { tvlFunction, tvlFunctionIsFetch, storedKey, - knownTokenPrices ); let keyToAddChainBalances = tvlType; if (tvlType === "tvl" || tvlType === "fetch") { @@ -201,7 +174,6 @@ sdk.api.abi.call = async (...args) => { mainTvlIsFetch ? module.fetch : module.tvl, mainTvlIsFetch, "tvl", - knownTokenPrices ); tvlPromises.push(mainTvlPromise); } From 36652ba7c58a76d48ed8c21bf619ba514d47193d Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:33:21 +0100 Subject: [PATCH 099/168] 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 c21fd4f1674f..d7e0e17b5fd8 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -40,6 +40,9 @@ const fixBalancesTokens = { "0x4F90055b8670B21d64146577152aE52975075900": { coingeckoId: "ethereum", decimals: 18 }, "0xBD0adB3Ee21e0A75D3021384177238883D69e883": { coingeckoId: "ordinals", decimals: 18 }, }, + astrzk: { + '0xe9cc37904875b459fa5d0fe37680d36f1ed55e38': { coingeckoId: "ethereum", decimals: 18 }, + }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain From 5a25fe09d8d21efd2c76accfdc2e5287ea082085 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:34:32 +0100 Subject: [PATCH 100/168] Add ASTRZK_RPC_MULTICALL to env.js --- projects/helper/env.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/helper/env.js b/projects/helper/env.js index bba612ac2706..52273461ce17 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -23,6 +23,7 @@ const DEFAULTS = { MERLIN_RPC: "https://rpc.merlinchain.io", MERLIN_RPC_MULTICALL: '0x830E7E548F4D80947a40A7Cf3a2a53166a0C3980', BITROCK_RPC_MULTICALL: '0x40DD0342A46Ab0893251211F6626E82c09A75345', + ASTRZK_RPC_MULTICALL: '0x36eabf148272BA81A5225C6a3637972F0EE17771', NAKA_RPC: 'https://node.nakachain.xyz', RONIN_RPC: 'https://api.roninchain.com/rpc', ETHF_RPC: 'https://rpc.dischain.xyz/', From 925039464587b1f829b18f9e151752a58481fdfb Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 14:42:26 +0100 Subject: [PATCH 101/168] 0xlend (#9285) * update 0xlend * update 0xlend * update 0xlend * Refactor config object and import compoundExports2 function --------- Co-authored-by: haokang --- projects/0xLend/index.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/projects/0xLend/index.js b/projects/0xLend/index.js index 35c4577f9a96..476433c6431c 100644 --- a/projects/0xLend/index.js +++ b/projects/0xLend/index.js @@ -1,4 +1,13 @@ -const { usdCompoundExports } = require("../helper/compound"); -module.exports = { - kcc: usdCompoundExports("0x337d8719f70D514367aBe780F7c1eAd1c0113Bc7", "kcc", "0x309f1639018e8B272126C4B99af442AA25Dcd1F2") -} \ No newline at end of file +const { compoundExports2 } = require('../helper/compound') + +const config = { + kcc: { comptroller: '0x337d8719f70D514367aBe780F7c1eAd1c0113Bc7', cether: '0x309f1639018e8b272126c4b99af442aa25dcd1f2' }, + era: { comptroller: '0x599bb9202EE2D2F95EDe9f88F622854f7ef2c371', cether: '0x9dae6c8c431ffc6d21b836e0d8d113e8365defb9' }, + blast: { comptroller: '0x1DD821C9E27fB2399DAb75AedB113c80C755DCa6', cether: '0xd9fcbd7b60966d013a28ff87925f75bb49e9b5ee' }, +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = compoundExports2(config[chain]) +}) + +module.exports.kcc.borrowed = () => ({}) \ No newline at end of file From e073443404b45753df53fa7d8b6fee54b7d7ed27 Mon Sep 17 00:00:00 2001 From: hoomp3 Date: Mon, 11 Mar 2024 09:44:27 -0400 Subject: [PATCH 102/168] Update Juice Finance (#9272) * feat: add weth lending pool * feat: add weth lending pool * feat: add weth lending pool --- projects/juice-finance/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/juice-finance/index.js b/projects/juice-finance/index.js index c10b38692437..6d90accadb45 100644 --- a/projects/juice-finance/index.js +++ b/projects/juice-finance/index.js @@ -1,17 +1,17 @@ const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require('../helper/unwrapLPs') -const LENDING_POOL = "0x4A1d9220e11a47d8Ab22Ccd82DA616740CF0920a" +const LENDING_POOL_USDB = "0x4A1d9220e11a47d8Ab22Ccd82DA616740CF0920a" +const LENDING_POOL_WETH = "0x44f33bC796f7d3df55040cd3C631628B560715C2"; const COLLATERAL_VAULT = "0x6301795aa55B90427CF74C18C8636E0443F2100b" const COLLATERAL_VAULT_V2 = "0x105e285f1a2370D325046fed1424D4e73F6Fa2B0" const vaults = [ - // This vault holds a Thruster LP token, but it is not being priced. ["0x12c69BFA3fb3CbA75a1DEFA6e976B87E233fc7df", "0x72E4ce9b7cC5d9C017F64ad58e512C253a11d30a"], [ADDRESSES.blast.WETH, "0x4A355D57fc1A5eEB33C0a19539744A2144220027"] ] async function tvl(timestamp, _, _1, { api }) { - return sumTokens2({ api, resolveLP: true, tokensAndOwners: [[ADDRESSES.blast.USDB, LENDING_POOL], [ADDRESSES.blast.WETH, COLLATERAL_VAULT], [ADDRESSES.blast.WETH, COLLATERAL_VAULT_V2], ...vaults] }) + return sumTokens2({ api, resolveLP: true, tokensAndOwners: [[ADDRESSES.blast.USDB, LENDING_POOL_USDB], [ADDRESSES.blast.WETH, LENDING_POOL_WETH], [ADDRESSES.blast.WETH, COLLATERAL_VAULT], [ADDRESSES.blast.WETH, COLLATERAL_VAULT_V2], ...vaults] }) } module.exports = { From 010b4e98e640089ea079408cf9fc139581922b03 Mon Sep 17 00:00:00 2001 From: Bitstable <154438863+pi-bitstable@users.noreply.github.com> Date: Mon, 11 Mar 2024 22:03:43 +0800 Subject: [PATCH 103/168] BitStable add BTC Assets to TVL (#9275) --- projects/bitstable-finance/index.js | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/projects/bitstable-finance/index.js b/projects/bitstable-finance/index.js index db845956ec13..29e3a3b63f69 100644 --- a/projects/bitstable-finance/index.js +++ b/projects/bitstable-finance/index.js @@ -1,8 +1,6 @@ const ADDRESS = require("../helper/coreAssets.json"); -const { sumTokensExport } = require("../helper/unwrapLPs"); -const { - sumTokensExport: sumBRC20TokensExport, -} = require("../helper/chain/brc20"); +const { sumTokensExport } = require("../helper/sumTokens"); +const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); const owner = "0x103dd1184599c7511a3016E0a383E11F84AE7173"; const tokens = { @@ -13,19 +11,20 @@ const tokens = { module.exports = { methodology: "Staking tokens via BitStable counts as TVL", bitcoin: { - tvl: sumBRC20TokensExport({ - // Deposit Address - owners: [ - "bc1p0uw83vg0h32v7kypyvjn9nextku2h7axjdeefy2ewstevnqffaksjzhrdf", - ], - blacklistedTokens: ['BSSB', 'DAII'], - }), + tvl: [ + // Native(BTC) + sumTokensExport({ owners: ["bc1p36wvtxursam9cq8zmc9ppvsqf9ulefm7grvlfc4tzc5j83rcggsqh6nxw5"] }), + // BRC20 + sumBRC20TokensExport({ + // Deposit Address + owners: ["bc1p0uw83vg0h32v7kypyvjn9nextku2h7axjdeefy2ewstevnqffaksjzhrdf"], + blacklistedTokens: ["BSSB", "DAII"], + }), + ], staking: sumBRC20TokensExport({ // Farm Address - owners: [ - "bc1pvngqf24g3hhr5s4ptv472prz576uye8qmagy880ydq5gzpd30pdqtua3rd", - ], - blacklistedTokens: ['DAII'], + owners: ["bc1pvngqf24g3hhr5s4ptv472prz576uye8qmagy880ydq5gzpd30pdqtua3rd"], + blacklistedTokens: ["DAII"], }), }, }; From 752853d019ee7edffb026299963c5aab278cd908 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:05:28 +0100 Subject: [PATCH 104/168] minor fix --- projects/bitstable-finance/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/bitstable-finance/index.js b/projects/bitstable-finance/index.js index 29e3a3b63f69..39f2780ef949 100644 --- a/projects/bitstable-finance/index.js +++ b/projects/bitstable-finance/index.js @@ -1,5 +1,6 @@ const ADDRESS = require("../helper/coreAssets.json"); const { sumTokensExport } = require("../helper/sumTokens"); +const sdk = require('@defillama/sdk') const { sumTokensExport: sumBRC20TokensExport } = require("../helper/chain/brc20"); const owner = "0x103dd1184599c7511a3016E0a383E11F84AE7173"; @@ -11,7 +12,7 @@ const tokens = { module.exports = { methodology: "Staking tokens via BitStable counts as TVL", bitcoin: { - tvl: [ + tvl: sdk.util.sumChainTvls([ // Native(BTC) sumTokensExport({ owners: ["bc1p36wvtxursam9cq8zmc9ppvsqf9ulefm7grvlfc4tzc5j83rcggsqh6nxw5"] }), // BRC20 @@ -20,7 +21,7 @@ module.exports = { owners: ["bc1p0uw83vg0h32v7kypyvjn9nextku2h7axjdeefy2ewstevnqffaksjzhrdf"], blacklistedTokens: ["BSSB", "DAII"], }), - ], + ]), staking: sumBRC20TokensExport({ // Farm Address owners: ["bc1pvngqf24g3hhr5s4ptv472prz576uye8qmagy880ydq5gzpd30pdqtua3rd"], From 52614bb318c438ec36e6b097034e8c71f62ff901 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:16:13 +0100 Subject: [PATCH 105/168] update juice fi --- projects/juice-finance/index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/projects/juice-finance/index.js b/projects/juice-finance/index.js index 6d90accadb45..0346a170270b 100644 --- a/projects/juice-finance/index.js +++ b/projects/juice-finance/index.js @@ -7,11 +7,20 @@ const COLLATERAL_VAULT_V2 = "0x105e285f1a2370D325046fed1424D4e73F6Fa2B0" const vaults = [ ["0x12c69BFA3fb3CbA75a1DEFA6e976B87E233fc7df", "0x72E4ce9b7cC5d9C017F64ad58e512C253a11d30a"], - [ADDRESSES.blast.WETH, "0x4A355D57fc1A5eEB33C0a19539744A2144220027"] + [ADDRESSES.blast.WETH, "0x4A355D57fc1A5eEB33C0a19539744A2144220027"], + ['0x4bed2a922654cacc2be974689619768fabf24855', "0x0CA56aa647E83A8F0a5f7a81a2fdcA393bC68D78"], ] async function tvl(timestamp, _, _1, { api }) { - return sumTokens2({ api, resolveLP: true, tokensAndOwners: [[ADDRESSES.blast.USDB, LENDING_POOL_USDB], [ADDRESSES.blast.WETH, LENDING_POOL_WETH], [ADDRESSES.blast.WETH, COLLATERAL_VAULT], [ADDRESSES.blast.WETH, COLLATERAL_VAULT_V2], ...vaults] }) + const thrusterv2LPs = [ // [LP, contract] + ['0x12c69bfa3fb3cba75a1defa6e976b87e233fc7df', '0x8034b01555487C26D4e21F4E33b7A30fbc90d181'], + ['0x12c69bfa3fb3cba75a1defa6e976b87e233fc7df', "0x72E4ce9b7cC5d9C017F64ad58e512C253a11d30a"], + ] + const stakedLPCalls = thrusterv2LPs.map(lp => ({ params: [lp[1], lp[0]] })) + const v2Bals = await api.multiCall({ abi: 'function staked(address, address) view returns (uint256)', calls: stakedLPCalls, target: '0xc3ecadb7a5fab07c72af6bcfbd588b7818c4a40e' }) + const v2Tokens = thrusterv2LPs.map(lp => lp[0]) + api.add(v2Tokens, v2Bals) + await sumTokens2({ api, resolveLP: true, tokensAndOwners: [[ADDRESSES.blast.USDB, LENDING_POOL_USDB], [ADDRESSES.blast.WETH, LENDING_POOL_WETH], [ADDRESSES.blast.WETH, COLLATERAL_VAULT], [ADDRESSES.blast.WETH, COLLATERAL_VAULT_V2], ...vaults], }) } module.exports = { From b1ad9417276ab0cdf1d51e38e2b2609d59fa8fe7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:37:21 +0100 Subject: [PATCH 106/168] track inevm --- package-lock.json | 6 +++--- projects/helper/chains.json | 1 + projects/helper/env.js | 1 - projects/helper/tokenMapping.js | 6 ++++++ projects/interport-finance/index.js | 2 +- projects/poolshark/index.js | 4 +++- projects/thetanuts/index.js | 6 ++++++ projects/timeswap-v2/index.js | 12 +++++++----- 8 files changed, 27 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 496134da871d..a54e000d2ddf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -886,9 +886,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.38", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.38.tgz", - "integrity": "sha512-XhcqNwaKvbnXwcHO+oIUx5vcdP/PpkdtNHAPR7sdZ5vjnAvSQgSMCgSqH0qu0gvqiJgblULdqJ5rf77QSIAHgg==", + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.40.tgz", + "integrity": "sha512-YtMaOKKaGKovmReEfgDRd+cLaXGFiBbAnAHdDJE8eb6BVkjhR2N9l+OvgLSMgLY6I/Bpu3pkJiiweEdCuvqfEA==", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@supercharge/promise-pool": "^2.1.0", diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 2f9d6467ec0e..389d4974bf80 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -124,6 +124,7 @@ "injective", "interlay", "iotex", + "inevm", "jbc", "juno", "kadena", diff --git a/projects/helper/env.js b/projects/helper/env.js index 52273461ce17..bba612ac2706 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -23,7 +23,6 @@ const DEFAULTS = { MERLIN_RPC: "https://rpc.merlinchain.io", MERLIN_RPC_MULTICALL: '0x830E7E548F4D80947a40A7Cf3a2a53166a0C3980', BITROCK_RPC_MULTICALL: '0x40DD0342A46Ab0893251211F6626E82c09A75345', - ASTRZK_RPC_MULTICALL: '0x36eabf148272BA81A5225C6a3637972F0EE17771', NAKA_RPC: 'https://node.nakachain.xyz', RONIN_RPC: 'https://api.roninchain.com/rpc', ETHF_RPC: 'https://rpc.dischain.xyz/', diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index d7e0e17b5fd8..a9ee84f8b62e 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -43,6 +43,12 @@ const fixBalancesTokens = { astrzk: { '0xe9cc37904875b459fa5d0fe37680d36f1ed55e38': { coingeckoId: "ethereum", decimals: 18 }, }, + inevm: { + "0x97423a68bae94b5de52d767a17abcc54c157c0e5": { coingeckoId: "tether", decimals: 6 }, + "0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147": { coingeckoId: "usd-coin", decimals: 6 }, + "0x69011706b3f6c6eaed7d2bc13801558b4fd94cbf": { coingeckoId: "injective-protocol", decimals: 18 }, + "0x4c3a213bd5e8c4bd70a8396d6f3c8302571598cd": { coingeckoId: "injective-protocol", decimals: 18 }, + }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain diff --git a/projects/interport-finance/index.js b/projects/interport-finance/index.js index 6590b7562234..55242b791f58 100644 --- a/projects/interport-finance/index.js +++ b/projects/interport-finance/index.js @@ -15,7 +15,7 @@ module.exports = { methodology: 'Interport TVL is calculated by summing the USDT and USDC balance of the vaults contracts, ITP token balance in the ITP Revenue Share contract and LP token balance in the LP Revenue Share contract.', }; -['ethereum', 'avax', 'bsc', 'fantom', 'arbitrum', 'polygon', 'polygon_zkevm', 'base', 'era', 'optimism', 'linea', 'eon', 'op_bnb', 'scroll', 'manta'].forEach(chain => { +['ethereum', 'avax', 'bsc', 'fantom', 'arbitrum', 'polygon', 'polygon_zkevm', 'base', 'era', 'optimism', 'linea', 'eon', 'op_bnb', 'scroll', 'manta', 'inevm'].forEach(chain => { module.exports[chain] = { tvl: async (_, _1, _2, { api }) => { const vaults = config[chain]?.vaults || defaultVaults diff --git a/projects/poolshark/index.js b/projects/poolshark/index.js index 5342dee01ac7..f67b21448db6 100644 --- a/projects/poolshark/index.js +++ b/projects/poolshark/index.js @@ -1,10 +1,12 @@ const { getLogs } = require('../helper/cache/getLogs') +const { sumTokens2 } = require('../helper/unwrapLPs') // https://github.com/poolshark-protocol/limit/blob/master/scripts/autogen/contract-deployments.json const config = { arbitrum: { limitPoolFactory: '0x8bb5db1625adb4ae4beb94a188d33062303f8fb7', limitPoolFromBlock: 158864748 }, scroll: { limitPoolFactory: '0x3FA761492f411EBC64A81FCf3292fdC0b677c00f', limitPoolFromBlock: 2632885 }, mode: { limitPoolFactory: '0x3FA761492f411EBC64A81FCf3292fdC0b677c00f', limitPoolFromBlock: 3371958 }, + inevm: { limitPoolFactory: '0x3FA761492f411EBC64A81FCf3292fdC0b677c00f', limitPoolFromBlock: 126842 }, } Object.keys(config).forEach(chain => { @@ -31,7 +33,7 @@ Object.keys(config).forEach(chain => { }) ownerTokens.push(...logs.map(log => [[log.token0, log.token1], log.pool])) } - return api.sumTokens({ ownerTokens }) + return sumTokens2({ ownerTokens, api }) } } }) diff --git a/projects/thetanuts/index.js b/projects/thetanuts/index.js index 90d3f49e9fc4..2a4c2d3bad33 100644 --- a/projects/thetanuts/index.js +++ b/projects/thetanuts/index.js @@ -270,6 +270,12 @@ const config = { [stMatic, stMaticCallVault,], ] }, + inevm: { + tokensAndOwners: [ + ['0x69011706b3f6C6eaeD7D2Bc13801558B4fd94CBF', '0x6950D30996e8EC8D93dd1602b059b3a38389Bb88'], + ['0x8358D8291e3bEDb04804975eEa0fe9fe0fAfB147', '0xEc9284b92B8039c4180Ac99863ed73Ee5Ff33E63'], + ] + } } Object.keys(config).forEach(chain => { diff --git a/projects/timeswap-v2/index.js b/projects/timeswap-v2/index.js index aed50ee66af0..5b75e74b07c6 100644 --- a/projects/timeswap-v2/index.js +++ b/projects/timeswap-v2/index.js @@ -4,7 +4,7 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); async function tvl(_, _b, _cb, { api }) { const { factory, oldFactory, fromBlock, newFactory, oldEthFactory,factory__2_5, factory__2_5_block } = config[api.chain]; let logs; - let ownerTokens; + let ownerTokens = [] if (factory){ logs = await getLogs({ api, @@ -15,12 +15,12 @@ async function tvl(_, _b, _cb, { api }) { fromBlock, }); - ownerTokens = logs.map((i) => { + ownerTokens.push(...logs.map((i) => { return [ [getAddress(i.topics[2]), getAddress(i.topics[3])], getAddress(i.data), ]; - }); + })) } if (factory__2_5) { const Logs = await getLogs({ @@ -149,10 +149,12 @@ const config = { factory__2_5_block: 114721107, fromBlock: 112818437, }, + inevm: { + factory__2_5: "0x17385e95cb74A20150E4fA092Aa72D57330896C4", + factory__2_5_block: 118420, + }, }; -module.exports = {}; - Object.keys(config).forEach((chain) => { module.exports[chain] = { tvl }; }); \ No newline at end of file From b890ea95df951b13accf7bce4cd8798ec87b41b4 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Mon, 11 Mar 2024 18:49:44 +0000 Subject: [PATCH 107/168] fix cether 2 --- projects/orbitlending-io/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/orbitlending-io/index.js b/projects/orbitlending-io/index.js index fa887efde693..ffafb1329bd6 100644 --- a/projects/orbitlending-io/index.js +++ b/projects/orbitlending-io/index.js @@ -4,6 +4,6 @@ module.exports = { blast: compoundExports2({ comptroller: '0x1E18C3cb491D908241D0db14b081B51be7B6e652', cether: '0xF9B3B455f5d900f62bC1792A6Ca6e1d47B989389', - blacklistedTokens: ['0xf92996ddc677a8dcb032ac5fe62bbf00f92ae2ec'] + blacklistedTokens: ['0xf92996ddc677a8dcb032ac5fe62bbf00f92ae2ec', '0x0872b71efc37cb8dde22b2118de3d800427fdba0'] }), }; From d8c67fc73b5c814c63c041c6649ebfa2c9ebc108 Mon Sep 17 00:00:00 2001 From: Shell Yu Date: Tue, 12 Mar 2024 05:27:52 +0800 Subject: [PATCH 108/168] add Ngad Artemis Finance (#9287) Co-authored-by: sheldon --- projects/ngad-artemis/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/ngad-artemis/index.js diff --git a/projects/ngad-artemis/index.js b/projects/ngad-artemis/index.js new file mode 100644 index 000000000000..d25ea65001b9 --- /dev/null +++ b/projects/ngad-artemis/index.js @@ -0,0 +1,10 @@ +const { sumTokensExport } = require("../helper/unwrapLPs"); + +module.exports = { + metis: { + tvl: sumTokensExport({ + owner: '0x96C4A48Abdf781e9c931cfA92EC0167Ba219ad8E', + tokens: ['0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000'] + }) + } +}; From 875b0e7697c8f891ab86cccfd00e6b504cac39aa Mon Sep 17 00:00:00 2001 From: Altug Durmaz Date: Tue, 12 Mar 2024 00:56:06 +0300 Subject: [PATCH 109/168] wasabi perps tvl integration (#9290) * wasabi perps tvl integration * fix async * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/wasabi/index.js | 47 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/projects/wasabi/index.js b/projects/wasabi/index.js index c707425e49c9..3506aa7feac0 100644 --- a/projects/wasabi/index.js +++ b/projects/wasabi/index.js @@ -1,21 +1,34 @@ -const { getLogs } = require('../helper/cache/getLogs') -const { sumTokens2, nullAddress } = require('../helper/unwrapLPs') +const { getLogs } = require('../helper/cache/getLogs'); -async function tvl(_, _b, _cb, { api, }) { - const logs = await getLogs({ - api, - target: '0x8e2b50413a53f50e2a059142a9be060294961e40', - topics: ['0xd02da1bec30f7f750aa0a131745dfb9ce96767c45a192dc26409f5d690e0b967'], - eventAbi: 'event NewPool(address poolAddress, address indexed nftAddress, address indexed owner)', - onlyArgs: true, - fromBlock: 17082136, - }) - const ownerTokens = logs.map(i => [[i.nftAddress, nullAddress], i.poolAddress]) - return sumTokens2({ api, ownerTokens, blacklistedTokens: ['0xedb61f74b0d09b2558f1eeb79b247c1f363ae452'] }) +const config = { + ethereum: { + pools: { + "WASABI_LONG_POOL": "0x8e0edfd6d15f858adbb41677b82ab64797d5afc0", + "WASABI_SHORT_POOL": "0x0fdc7b5ce282763d5372a44b01db65e14830d8ff" + }, fromBlock: 18810700, + }, + blast: { + pools: { + "WASABI_LONG_POOL": "0x046299143A880C4d01a318Bc6C9f2C0A5C1Ed355", + "WASABI_SHORT_POOL": "0x0301079DaBdC9A2c70b856B2C51ACa02bAc10c3a" + }, fromBlock: 185200, + }, } -module.exports = { - ethereum: { - tvl + +Object.keys(config).forEach(chain => { + let { pools, fromBlock, tokens = [], } = config[chain] + pools = Object.values(pools) + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const logs = (await Promise.all(pools.map(target => getLogs({ + api, + target, + eventAbi: "event NewVault(address indexed pool, address indexed asset, address vault)", + onlyArgs: true, + fromBlock, + })))).flat(); + return api.erc4626Sum({ calls: logs.map(log => log.vault), isOG4626: true, }); + } } -} \ No newline at end of file +}) \ No newline at end of file From 98b2540de7989b20057fbce8e8af5419b1648e14 Mon Sep 17 00:00:00 2001 From: party-for-illuminati <143411128+party-for-illuminati@users.noreply.github.com> Date: Tue, 12 Mar 2024 01:46:06 +0300 Subject: [PATCH 110/168] illuminex TVL tracking added (#9289) * illuminex TVL tracking added * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 7 +++++++ projects/illuminex/index.js | 15 +++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 projects/illuminex/index.js diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 389d4974bf80..108eeb4063a9 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -214,6 +214,7 @@ "quicksilver", "quasar", "radixdlt", + "sapphire", "reef", "regen", "rei", diff --git a/projects/helper/env.js b/projects/helper/env.js index bba612ac2706..e200a18bbbea 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -26,6 +26,7 @@ const DEFAULTS = { NAKA_RPC: 'https://node.nakachain.xyz', RONIN_RPC: 'https://api.roninchain.com/rpc', ETHF_RPC: 'https://rpc.dischain.xyz/', + SAPPHIRE_RPC_MULTICALL: '0xcA11bde05977b3631167028862bE2a173976CA11', } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index a9ee84f8b62e..7c05165b5b34 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -49,6 +49,13 @@ const fixBalancesTokens = { "0x69011706b3f6c6eaed7d2bc13801558b4fd94cbf": { coingeckoId: "injective-protocol", decimals: 18 }, "0x4c3a213bd5e8c4bd70a8396d6f3c8302571598cd": { coingeckoId: "injective-protocol", decimals: 18 }, }, + sapphire: { + "0x8bc2b030b299964eefb5e1e0b36991352e56d2d3": { coingeckoId: "oasis-network", decimals: 18 }, + "0x1ffd8a218fdc5b38210d64cbb45f40dc55a4e019": { coingeckoId: "oasis-network", decimals: 18 }, + "0x9ca066f00e55b90623efe323feb2a649686538b6": { coingeckoId: "tether", decimals: 6 }, + "0x013e54bee29813bd786b24f9cb08f47c4b75955c": { coingeckoId: "usd-coin", decimals: 6 }, + "0x3e4079ad76c83760e22b5c0105670ebab88b8d0e": { coingeckoId: "tether", decimals: 18 }, + }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain diff --git a/projects/illuminex/index.js b/projects/illuminex/index.js new file mode 100644 index 000000000000..e4f0b39cd6e6 --- /dev/null +++ b/projects/illuminex/index.js @@ -0,0 +1,15 @@ +const { getUniTVL } = require("../helper/unknownTokens"); +const { stakingPricedLP } = require("../helper/staking"); + +const stakingFarmingContractAddress = "0x494847e173D6CE28b6eF7a5596df6Bc7830175e1"; +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, + sapphire: { + tvl: getUniTVL({ factory: '0x045551B6A4066db850A1160B8bB7bD9Ce3A2B5A5', useDefaultCoreAssets: true,}), + staking: stakingPricedLP(stakingFarmingContractAddress, ixToken, "sapphire", "0xf0f7c4e8edb9edcbe200a4eaec384e8a48fc7815", "oasis-network", true), + } +} \ No newline at end of file From a39b390cc84f3842f76fb4eb71cf2922c3f11b6a Mon Sep 17 00:00:00 2001 From: Da Sichuan <86024678+DaSichuan@users.noreply.github.com> Date: Mon, 11 Mar 2024 15:55:05 -0700 Subject: [PATCH 111/168] Add Suilend (#9291) * Add suilend * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/suilend/index.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 projects/suilend/index.js diff --git a/projects/suilend/index.js b/projects/suilend/index.js new file mode 100644 index 000000000000..880b64a3429d --- /dev/null +++ b/projects/suilend/index.js @@ -0,0 +1,29 @@ +const sui = require("../helper/chain/sui"); + +const SUILEND_LENDING_MARKET_ID = "0x84030d26d85eaa7035084a057f2f11f701b7e2e4eda87551becbc7c97505ece1"; + +async function tvl() { + const { api } = arguments[3] + 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) + } +} + +async function borrowed() { + const { api } = arguments[3] + 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) + } +} + +module.exports = { + timetravel: false, + sui: { + tvl: tvl, + borrowed: borrowed, + }, +} \ No newline at end of file From a0f4b171df6fdc7eead4f1dcd0688578c8ce931f Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Mar 2024 00:36:27 +0100 Subject: [PATCH 112/168] track cian lst --- projects/cian-lst/index.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 projects/cian-lst/index.js diff --git a/projects/cian-lst/index.js b/projects/cian-lst/index.js new file mode 100644 index 000000000000..cd740248820b --- /dev/null +++ b/projects/cian-lst/index.js @@ -0,0 +1,22 @@ +const config = { + ethereum: [ + '0xcDd374F491fBF3f4FcF6E9023c99043774005137', + '0xB8c0c50D255B93f5276549cbA7F4bf78751A5D34', + '0x88508306E43FCe43F7f2c1e7D73c88cf6a523f6C', + ], + optimism: ['0x907883da917ca9750ad202ff6395C4C6aB14e60E'], + bsc: ['0xEa5f10A0E612316A47123D818E2b597437D19a17'], + arbitrum: ['0xE946Dd7d03F6F5C440F68c84808Ca88d26475FC5'], +} + +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 }) + } + } +}) \ No newline at end of file From ae25e7bcb3fe55c447046fe02cab5c010ed01505 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Mar 2024 01:31:39 +0100 Subject: [PATCH 113/168] update sudoswap v2 --- projects/sudoswap-v2/index.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/projects/sudoswap-v2/index.js b/projects/sudoswap-v2/index.js index fa8e48b75ec8..d16438cc7d47 100644 --- a/projects/sudoswap-v2/index.js +++ b/projects/sudoswap-v2/index.js @@ -2,33 +2,34 @@ const { sumTokens2, nullAddress } = require('../helper/unwrapLPs') const { getLogs } = require('../helper/cache/getLogs') async function tvl(_, _b, _cb, { api, }) { + const { target, fromBlock } = config[api.chain] const multicallAddy = '0xca11bde05977b3631167028862be2a173976ca11' const logs1155 = await getLogs({ - api, - target: '0xA020d57aB0448Ef74115c112D18a9C231CC86000', + target, fromBlock, api, onlyArgs: true, topics: ['0x2966b6b401975e778520aec46cbefbe73799119a5670feda3e8f884c7c3ffb11'], eventAbi: 'event NewERC1155Pair(address indexed pool, uint256 initialBalance)', - onlyArgs: true, - fromBlock: 17309203, extraKey: 'erc1155', }) const logs721 = await getLogs({ - api, - target: '0xA020d57aB0448Ef74115c112D18a9C231CC86000', + target, fromBlock, api, onlyArgs: true, topics: ['0xe8e1cee58c33f242c87d563bbc00f2ac82eb90f10a252b0ba8498ae6c1dc241a'], eventAbi: 'event NewERC721Pair(address indexed pool, uint256[] initialIds)', - onlyArgs: true, - fromBlock: 17309203, extraKey: 'erc721', }) const pools = logs721.map(i => i.pool) const allPools = [...logs1155, ...logs721].map(log => log.pool) - const nfts = await api.multiCall({ abi: 'address:nft', calls: pools}) - const ethBals = await api.multiCall({ abi: 'function getEthBalance(address) view returns (uint256)', calls: allPools, target: multicallAddy}) + const nfts = await api.multiCall({ abi: 'address:nft', calls: pools }) + const ethBals = await api.multiCall({ abi: 'function getEthBalance(address) view returns (uint256)', calls: allPools, target: multicallAddy }) ethBals.forEach(i => api.add(nullAddress, i)) await sumTokens2({ api, tokensAndOwners2: [nfts, pools], permitFailure: true, sumChunkSize: 22 }) } -module.exports = { - ethereum: { tvl, } -} \ No newline at end of file +const config = { + ethereum: { target: '0xA020d57aB0448Ef74115c112D18a9C231CC86000', fromBlock: 17309203 }, + arbitrum: { target: '0x4f1627be4C72aEB9565D4c751550C4D262a96B51', fromBlock: 168473054 }, + base: { target: '0x605145d263482684590f630e9e581b21e4938eb8', fromBlock: 7529192 }, +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { tvl } +}) \ No newline at end of file From 2aa6bd606ef270cd4c830673186bca94b9fcdb06 Mon Sep 17 00:00:00 2001 From: atozICT <60227992+atozICT20@users.noreply.github.com> Date: Mon, 11 Mar 2024 20:36:57 -0400 Subject: [PATCH 114/168] [Sturdy V2]: add Mode network (#9293) --- projects/sturdy-v2/index.js | 47 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/projects/sturdy-v2/index.js b/projects/sturdy-v2/index.js index 259300d795de..5a691474e7cb 100644 --- a/projects/sturdy-v2/index.js +++ b/projects/sturdy-v2/index.js @@ -1,25 +1,32 @@ const abi = require("./abi.json"); -const REGISTRY_ADDR = "0x69764E3e0671747A7768A1C1AfB7C0C39868CC9e" - -async function tvl(timestamp, block, chainBlocks, { api }) { - const aggregators = await api.call({target: REGISTRY_ADDR, abi: abi['getVaults'], }) - aggregators.forEach((aggregator) => api.add(aggregator.asset, aggregator.totalAssets)) - - const strategies = await api.call({ target: REGISTRY_ADDR, abi: abi['getStrategies'], }) - strategies.forEach((strategy) => api.add(strategy.pairData.collateral, strategy.pairData.totalCollateral)) -} -async function borrowed(timestamp, block, chainBlocks, { api }) { - const strategies = await api.call({ target: REGISTRY_ADDR, abi: abi['getStrategies'], }) - const pairs = strategies.map((strategy) => strategy.pair); - const assets = strategies.map((strategy) => strategy.pairData.asset); - const bals = await api.multiCall({ abi: 'function totalBorrow() view returns (uint128 amount, uint128 shares)', calls: pairs }) - bals.forEach((bal, i) => api.add(assets[i], bal.amount)) +// DataProvider Addresses +const config = { + ethereum: '0x69764E3e0671747A7768A1C1AfB7C0C39868CC9e', + mode: '0xF0382A9Eca5276d7B4BbcC503e4159C046c120ec', } module.exports = { - methodology: 'Gets the aggregators & strategies from the REGISTRY_ADDRESS and adds the asset amounts from each of them', - ethereum: { - tvl, borrowed, - }, -} \ No newline at end of file + methodology: 'Gets the aggregators & strategies from the DataProvider contract and adds the asset amounts from each of them', +} + +Object.keys(config).forEach(chain => { + const dataProvider = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const aggregators = await api.call({target: dataProvider, abi: abi['getVaults'], }) + aggregators.forEach((aggregator) => api.add(aggregator.asset, (aggregator.totalAssets - aggregator.totalDebt))) + + const strategies = await api.call({ target: dataProvider, abi: abi['getStrategies'], }) + strategies.forEach((strategy) => api.add(strategy.pairData.asset, strategy.pairData.totalAsset)) + strategies.forEach((strategy) => api.add(strategy.pairData.collateral, strategy.pairData.totalCollateral)) + }, + borrowed: async (_, _b, _cb, { api, }) => { + const strategies = await api.call({ target: dataProvider, abi: abi['getStrategies'], }) + const pairs = strategies.map((strategy) => strategy.pair); + const assets = strategies.map((strategy) => strategy.pairData.asset); + const bals = await api.multiCall({ abi: 'function totalBorrow() view returns (uint128 amount, uint128 shares)', calls: pairs }) + bals.forEach((bal, i) => api.add(assets[i], bal.amount)) + } + } +}) From e569cfe09f7a89eb9822337f821517056b82ac77 Mon Sep 17 00:00:00 2001 From: jack-lvsjack <106633601+jack-lvsjack@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:48:14 +0800 Subject: [PATCH 115/168] feat: add l2x (#9300) Co-authored-by: Jack Yin --- projects/l2x/index.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/l2x/index.js diff --git a/projects/l2x/index.js b/projects/l2x/index.js new file mode 100644 index 000000000000..339e31f99dc5 --- /dev/null +++ b/projects/l2x/index.js @@ -0,0 +1,4 @@ +const { uniV3Export } = require('../helper/uniswapV3') +module.exports = uniV3Export({ + astrzk: { factory: '0x350B0F09EE6659e18a2642d6B25b909d59271e3c', fromBlock: 177553, }, +}) From 455ff7439900b01866b4fd7abc2ca12a0fa2e240 Mon Sep 17 00:00:00 2001 From: killbond007 Date: Tue, 12 Mar 2024 09:49:42 +0100 Subject: [PATCH 116/168] feat:Add vastr in astar-zkevm (#9299) --- projects/omni/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/omni/index.js b/projects/omni/index.js index 7edb0da0f038..f2ab82d74436 100644 --- a/projects/omni/index.js +++ b/projects/omni/index.js @@ -9,6 +9,9 @@ const config = { "0xFfFfFfff00000000000000010000000000000008", "0xfffFffff00000000000000010000000000000010", ], + astrzk: [ + "0x7746ef546d562b443AE4B4145541a3b1a3D75717", + ], moonbeam: [ "0xFFFfffFf15e1b7E3dF971DD813Bc394deB899aBf", "0xFfFfFFff99dABE1a8De0EA22bAa6FD48fdE96F6c", From ba2a616d6a6e3775546a9a5540e98324cf818864 Mon Sep 17 00:00:00 2001 From: kappayield-range <131840920+kappayield-range@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:50:12 +0800 Subject: [PATCH 117/168] [Range Protocol] Update Thruster Factory (#9297) * Add ethereum-uniswap factory vault * Add zeta chain factory for izumi * Add Scroll Factory * code refactor * Add zkfair factory * Update thruster factory --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/range/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/range/index.js b/projects/range/index.js index 5303ce5b6291..a4c9c49ce45e 100644 --- a/projects/range/index.js +++ b/projects/range/index.js @@ -43,7 +43,7 @@ const config ={ { factory: '0x873fD467A2A7e4E0A71aD3c45966A84797e55B5B', fromBlock: 6740958, factoryType: 'izumi' } // izumi ], blast: [ - { factory: '0x72Add08DE88121007b48F964aFCf77A5AE1Da0a2', fromBlock: 228630 } // Thruster + { factory: '0x6b12399172036db8a8E2b7e2206175080C981A4D', fromBlock: 228630 } // Thruster ] } From 2a46b8f93aca783152601fe704cc3d105b8df251 Mon Sep 17 00:00:00 2001 From: 0xShad0w <44497716+0xShad0w@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:20:00 +0000 Subject: [PATCH 118/168] add cleo-v1 pools (#9304) --- projects/cleopatra-exchange-v1/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/cleopatra-exchange-v1/index.js diff --git a/projects/cleopatra-exchange-v1/index.js b/projects/cleopatra-exchange-v1/index.js new file mode 100644 index 000000000000..bfa36b95e9ef --- /dev/null +++ b/projects/cleopatra-exchange-v1/index.js @@ -0,0 +1,10 @@ +const {getUniTVL} = require('../helper/unknownTokens') +const { staking } = require('../helper/staking') + +module.exports = { + misrepresentedTokens: true, + mantle:{ + tvl: getUniTVL({ factory: '0xAAA16c016BF556fcD620328f0759252E29b1AB57', useDefaultCoreAssets: true, hasStablePools: true, stablePoolSymbol: 'crAMM' }), + staking: staking("0xAAAEa1fB9f3DE3F70E89f37B69Ab11B47eb9Ce6F", "0xC1E0C8C30F251A07a894609616580ad2CEb547F2"), + }, +} \ No newline at end of file From 707ad270d19a90dfb96f44ab6302adf608f2e44c Mon Sep 17 00:00:00 2001 From: oogway112 <106013294+oogway112@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:50:13 +0530 Subject: [PATCH 119/168] Add mode network to MantisSwap (#9303) --- projects/MantisSwap/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/MantisSwap/index.js b/projects/MantisSwap/index.js index 439b3c14a5cf..9431558c4a16 100644 --- a/projects/MantisSwap/index.js +++ b/projects/MantisSwap/index.js @@ -3,6 +3,7 @@ const { sumTokens2 } = require("../helper/unwrapLPs"); const config = { polygon: { vaults: ['0x62Ba5e1AB1fa304687f132f67E35bFC5247166aD'] }, polygon_zkevm: { vaults: ['0x12d41b6DF938C739F00c392575e3FD9292d98215'] }, + mode: { vaults: ['0x4af97f73343b226C5a5872dCd2d1c4944BDb3E77'] }, } const MAX_LP_TOKENS = 3 From f54a54d41ffe52dc8f0ba8e94e89a3499c563d82 Mon Sep 17 00:00:00 2001 From: Produs <162736252+produstoken@users.noreply.github.com> Date: Tue, 12 Mar 2024 02:20:40 -0700 Subject: [PATCH 120/168] Create index.js (#9298) --- projects/Produs/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 projects/Produs/index.js diff --git a/projects/Produs/index.js b/projects/Produs/index.js new file mode 100644 index 000000000000..be8684fb5cd9 --- /dev/null +++ b/projects/Produs/index.js @@ -0,0 +1,8 @@ +const { getUniTVL, } = require('../helper/unknownTokens') + +module.exports = { + misrepresentedTokens: true, + bsc: { + tvl: getUniTVL({ factory: '0x8ae5527706446943cBA8589313EC217a4a7288a4', useDefaultCoreAssets: true, fetchBalances: true, }), + }, +}; From 5769df8ae81e538eae13179cade9048f51a5e02a Mon Sep 17 00:00:00 2001 From: Maduck Club <162635234+maduck-club@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:21:11 +0000 Subject: [PATCH 121/168] Maduck Club (#9292) --- projects/maduck/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 projects/maduck/index.js diff --git a/projects/maduck/index.js b/projects/maduck/index.js new file mode 100644 index 000000000000..e7b6d92b9d9b --- /dev/null +++ b/projects/maduck/index.js @@ -0,0 +1,18 @@ +const { pool2BalanceFromMasterChefExports} = require("../helper/pool2.js"); +const masterchefAbi = require("../helper/abis/masterchef.json"); + +//BSC staking contracts +const bscContract = "0x944dFb7f7caB8bbA2F74882784742C39b8495F5e"; + +const maduck = "0xb976d9684412f75f7AeE24E56D846fd404b1B329"; + + +module.exports = { + methodology: 'Pool2 TVL BSC LPs', + bsc: { + tvl: async ()=>({}), + pool2: pool2BalanceFromMasterChefExports(bscContract, maduck, "bsc", addr=>`bsc:${addr}`, masterchefAbi.poolInfo) + }, +} + + From d4e2a194b63fc8b970ac7927ea9a9533194c05f1 Mon Sep 17 00:00:00 2001 From: Stone <125890624+Stonepapa@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:21:53 +0800 Subject: [PATCH 122/168] Update index.js (#9296) The Btc asset address was added --- projects/bsquared/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/bsquared/index.js b/projects/bsquared/index.js index 615e604250c5..0dca597dfc39 100644 --- a/projects/bsquared/index.js +++ b/projects/bsquared/index.js @@ -4,6 +4,7 @@ const { sumTokensExport } = require('../helper/sumTokens'); const ADDRESSES = require('../helper/coreAssets.json') const BTCOwners = [ + "bc1q4fsk5pgnmnu7ngp79xclsw2t0yk46sjqw22ffz", "bc1qva5m5e7da2zm590z03tdnj42u9q2uye3hgrehwrzgg8j4kxq9seq9rvw0m", ]; const BRC20Owners = [ From cf842f3c3b5d3185e9e747319b90653a6b1e93be Mon Sep 17 00:00:00 2001 From: empm0ney <99704063+empm0ney@users.noreply.github.com> Date: Tue, 12 Mar 2024 05:32:11 -0400 Subject: [PATCH 123/168] Update: Sparkswap dex contracts & migrated farm (#9295) * upd: sparkswap dex contracts & migrated farm * minor refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/sparkswap/index.js | 50 +++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/projects/sparkswap/index.js b/projects/sparkswap/index.js index 31366b2084d5..f84ff6d30bcc 100644 --- a/projects/sparkswap/index.js +++ b/projects/sparkswap/index.js @@ -1,45 +1,41 @@ +const { getUniTVL } = require("../helper/unknownTokens"); const { - masterchefExports, sumTokensExport, nullAddress, sumUnknownTokens, } = require("../helper/unknownTokens"); const { mergeExports } = require("../helper/utils"); -const abi = require("../helper/abis/masterchef.json"); const pendleAbi = require("../pendle/abi.json"); -const MASTER_CHEF_CONTRACT = "0x2c8BBd2cecC77F2d18A04027Cc03CDB8Ab103214"; -const NATIVE_TOKEN = "0x6386704cD6f7A584EA9D23cccA66aF7EBA5a727e"; -const NATIVE_LP_TOKEN = "0x1B044593a78E374bD0E558Aa6633D2ff13fD5Bb7"; -const SPARKLER_CONTRACT = "0x7b1C460d0Ad91c8A453B7b0DBc0Ae4F300423FFB"; - -const chefExport = masterchefExports({ - chain: "pulse", - masterchef: MASTER_CHEF_CONTRACT, - nativeToken: NATIVE_TOKEN, - lps: [NATIVE_LP_TOKEN], - useDefaultCoreAssets: true, -}); -delete chefExport.staking; +const FACTORY = "0x955219A87eB0C6754fd247266af970F7d16906CD"; +const SPARK_TOKEN = "0x6386704cD6f7A584EA9D23cccA66aF7EBA5a727e"; +const SPARK_LP = "0x33208439e1B28B1d6fCfbB6334e9950027Ee3B52"; +const SDAI_TOKEN = "0x30FCB23A906493371b1721C8feb8815804808D74"; +const SDAI_DAI_LP = "0xf32B9398a7277609772F328Fc2005D7DA5420E77"; +const SDAI_SPARK_LP = "0x9095D464A29Abd1B840C1C5205FB602ae5b011FF"; +const MASTERCHEF = "0x63c2a0083861F8C496A0A29BD8BA223E1180664e"; +const SPARKLER = "0x44Ee223D0a9Eec269b1757685F438bddB311F1AE"; module.exports = mergeExports([ - chefExport, { pulse: { tvl, - pool2: sumTokensExport({ - owner: SPARKLER_CONTRACT, - tokens: [NATIVE_LP_TOKEN], - useDefaultCoreAssets: true, - }), + }, + }, + { + misrepresentedTokens: true, + methodology: + "TVL accounts for the liquidity on all AMM pools. Staking accounts for the SPARK locked in SPARKLER", + pulse: { + tvl: getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true }), staking: sumTokensExport({ - owners: [SPARKLER_CONTRACT, MASTER_CHEF_CONTRACT], - tokens: [NATIVE_TOKEN], + owners: [SPARKLER, MASTERCHEF], + tokens: [SPARK_TOKEN, SDAI_TOKEN], useDefaultCoreAssets: true, - lps: [NATIVE_LP_TOKEN], + lps: [SPARK_LP, SDAI_DAI_LP, SDAI_SPARK_LP], }), }, - }, + } ]); // add amount in pulsex farm @@ -48,14 +44,14 @@ async function tvl(_, _b, _cb, { api }) { lengthAbi: "uint256:poolLength", itemAbi: "function rehypothecations(uint256) view returns (address farm, uint256 pid)", - target: MASTER_CHEF_CONTRACT, + target: MASTERCHEF, }); rehypothecations = rehypothecations.filter((i) => i.farm !== nullAddress); const bals = await api.multiCall({ abi: pendleAbi.userInfo, calls: rehypothecations.map(({ farm, pid }) => ({ target: farm, - params: [pid, MASTER_CHEF_CONTRACT], + params: [pid, MASTERCHEF], })), }); const pInfos = await api.multiCall({ From 327e2fa76d40ea6a20acb81530723bed6543f795 Mon Sep 17 00:00:00 2001 From: Shane K Moore <41407272+shane-moore@users.noreply.github.com> Date: Tue, 12 Mar 2024 02:37:23 -0700 Subject: [PATCH 124/168] chore: mito tvl (#9294) * chore: mito tvl * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/mito/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/mito/index.js diff --git a/projects/mito/index.js b/projects/mito/index.js new file mode 100644 index 000000000000..4468e98b092d --- /dev/null +++ b/projects/mito/index.js @@ -0,0 +1,19 @@ +const { get } = require('../helper/http') + +async function getVaultBalances(vaultAddress, api) { + const vaultBalances = `https://sentry.exchange.grpc-web.injective.network/api/exchange/portfolio/v2/portfolio/${vaultAddress}/balances`; + const response = await get(vaultBalances); + const subaccounts = response.portfolio.subaccounts; + return subaccounts.map(i => api.add(i.denom, +i.deposit.availableBalance)) +} + +async function tvl(_, _1, _2, { api }) { + const MASTER_VAULT_ADDRESS = 'inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3'; + await getVaultBalances(MASTER_VAULT_ADDRESS, api); +} + +module.exports = { + timetravel: false, + methodology: 'TVL accounts for the liquidity locked up in the Injective protocol vaults that is not being used towards posting orders to orderbook. The data comes back from the Injective API.', + injective: { tvl } +} From 35996b173d87c5e0db67078623ea6163ded620ac Mon Sep 17 00:00:00 2001 From: 0xShad0w <44497716+0xShad0w@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:38:18 +0000 Subject: [PATCH 125/168] add nile-v1 pools (#9305) --- projects/nile-exchange-v1/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/nile-exchange-v1/index.js diff --git a/projects/nile-exchange-v1/index.js b/projects/nile-exchange-v1/index.js new file mode 100644 index 000000000000..b5d73fca5516 --- /dev/null +++ b/projects/nile-exchange-v1/index.js @@ -0,0 +1,10 @@ +const {getUniTVL} = require('../helper/unknownTokens') +const { staking } = require('../helper/staking') + +module.exports = { + misrepresentedTokens: true, + linea:{ + tvl: getUniTVL({ factory: '0xAAA16c016BF556fcD620328f0759252E29b1AB57', useDefaultCoreAssets: true, hasStablePools: true, stablePoolSymbol: 'crAMM' }), + staking: staking("0xAAAEa1fB9f3DE3F70E89f37B69Ab11B47eb9Ce6F", "0xAAAac83751090C6ea42379626435f805DDF54DC8"), + }, +} \ No newline at end of file From 0bbfdfc36a5309d7bc2a4e911ee2ef29426cef4c Mon Sep 17 00:00:00 2001 From: 0xShad0w <44497716+0xShad0w@users.noreply.github.com> Date: Tue, 12 Mar 2024 09:38:31 +0000 Subject: [PATCH 126/168] add phar-v1 pools (#9306) --- projects/pharaoh-exchange-v1/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 projects/pharaoh-exchange-v1/index.js diff --git a/projects/pharaoh-exchange-v1/index.js b/projects/pharaoh-exchange-v1/index.js new file mode 100644 index 000000000000..8e88a5573923 --- /dev/null +++ b/projects/pharaoh-exchange-v1/index.js @@ -0,0 +1,10 @@ +const {getUniTVL} = require('../helper/unknownTokens') +const { staking } = require('../helper/staking') + +module.exports = { + misrepresentedTokens: true, + avax:{ + tvl: getUniTVL({ factory: '0xAAA91e283126774b3bb513fD5922976d5212dc49', useDefaultCoreAssets: true, hasStablePools: true, stablePoolSymbol: 'crAMM' }), + staking: staking("0xAAA3249511DE3E7A5c61FbA8313170c1Bef9A65e", "0xAAAB9D12A30504559b0C5a9A5977fEE4A6081c6b"), + }, +} \ No newline at end of file From 423dafbcb4eae7a5b32a2e4bf903a98968e1fdaf Mon Sep 17 00:00:00 2001 From: BlasterDEX <160229589+BlasterDEX@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:45:55 +0800 Subject: [PATCH 127/168] Add Blaster DEX adapter (#9307) --- projects/Blaster/index.js | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 projects/Blaster/index.js diff --git a/projects/Blaster/index.js b/projects/Blaster/index.js new file mode 100644 index 000000000000..b527e6c48752 --- /dev/null +++ b/projects/Blaster/index.js @@ -0,0 +1,6 @@ +const { uniV3Export } = require("../helper/uniswapV3"); +const { mergeExports } = require('../helper/utils') + +module.exports = mergeExports([ + uniV3Export({ blast: { factory: "0x9792FaeA53Af241bCE57C7C8D6622d5DaAD0D4Fc", fromBlock: 693561, }, }), +]) From 91536801175e0fc6f352541439f1e07afb382546 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:34:08 +0100 Subject: [PATCH 128/168] track methlab.xyz --- projects/methlab-xyz/index.js | 43 +++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 projects/methlab-xyz/index.js diff --git a/projects/methlab-xyz/index.js b/projects/methlab-xyz/index.js new file mode 100644 index 000000000000..9041d9bdc8b4 --- /dev/null +++ b/projects/methlab-xyz/index.js @@ -0,0 +1,43 @@ +const { getLogs } = require('../helper/cache/getLogs') +const config = { + mantle: { + factories: [{ target: '0x6Cc0c2D8F9533dFd2276337DdEaBBCEE9dd0747F', fromBlock: 51253051 },], + } +} + +Object.keys(config).forEach(chain => { + const { factories } = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { 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) }) + } + } +}) + +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", +} \ No newline at end of file From a78ef31d93f6b1cdb757835259995ba4da2451f2 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:54:03 +0100 Subject: [PATCH 129/168] fix nolus --- projects/helper/chain/cosmos.js | 4 ++-- projects/nolus/index.js | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/helper/chain/cosmos.js b/projects/helper/chain/cosmos.js index e2cbba1fb8bc..3acbd43e3aed 100644 --- a/projects/helper/chain/cosmos.js +++ b/projects/helper/chain/cosmos.js @@ -217,14 +217,14 @@ async function queryContractWithRetries({ contract, chain, data }) { } } -async function queryManyContracts({ contracts = [], chain, data }) { +async function queryManyContracts({ contracts = [], chain, data, permitFailure = false}) { const parallelLimit = 25 const { results, errors } = await PromisePool .withConcurrency(parallelLimit) .for(contracts) .process(async (contract) => queryContract({ contract, chain, data })) - if (errors && errors.length) throw errors[0] + if (!permitFailure && errors && errors.length) throw errors[0] return results } diff --git a/projects/nolus/index.js b/projects/nolus/index.js index a19812435af5..905c6af37657 100644 --- a/projects/nolus/index.js +++ b/projects/nolus/index.js @@ -39,6 +39,7 @@ async function getLeaseContracts(leaseCodeId) { async function getLeases(leaseAddresses) { return await queryManyContracts({ + permitFailure: true, contracts: leaseAddresses, chain: chain, data: {} @@ -80,7 +81,7 @@ async function getLppTvl(lppAddresses) { const lpps = await queryManyContracts({ contracts: lppAddresses, chain: chain, - data: { "lpp_balance": [] } + data: { "lpp_balance": [] }, }) let totalLpp = 0 From 7a9b2e8abed2fbb8295c76803bdfa98e035a2542 Mon Sep 17 00:00:00 2001 From: Sindermann <163030670+Sindermann@users.noreply.github.com> Date: Tue, 12 Mar 2024 11:55:18 +0000 Subject: [PATCH 130/168] Update GoGoPool TVL Adapter (#9308) --- projects/gogopool/index.js | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/projects/gogopool/index.js b/projects/gogopool/index.js index ea7a4d75d30c..20826fc61337 100644 --- a/projects/gogopool/index.js +++ b/projects/gogopool/index.js @@ -1,11 +1,30 @@ -async function tvl(_, _b, _cb, { api, }) { - const ggAVAX = '0xA25EaF2906FA1a3a13EdAc9B9657108Af7B703e3' - const token = await api.call({ abi: 'address:asset', target: ggAVAX }) - const bal= await api.call({ abi: 'uint256:totalAssets', target: ggAVAX }) - api.add(token, bal) +const GGAVAX_CONTRACT = '0xA25EaF2906FA1a3a13EdAc9B9657108Af7B703e3'; +const GGP_STAKING_CONTRACT = '0xB6dDbf75e2F0C7FC363B47B84b5C03959526AecB'; +const MINIPOOL_MANAGER_CONTRACT = '0xb84fA022c7fE1CE3a1F94C49f2F13236C3d1Ed08'; + +const ggAVAXTotalAssetsAbi = "function totalAssets() view returns (uint256)"; +const AvaxInMinipoolsABI = "function getTotalAVAXLiquidStakerAmt() view returns (uint256)"; +const GGPStakedAbi = "function getTotalGGPStake() view returns (uint256)"; + +const wavax = "0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7"; +const ggp = "0x69260B9483F9871ca57f81A90D91E2F96c2Cd11d"; + +async function tvl(timestamp, block, chainBlocks, { api }) { + const avax_lst_side = await api.call({ abi: ggAVAXTotalAssetsAbi, target: GGAVAX_CONTRACT }); + // Minipool operators are matched with LST AVAX 1:1 + const avax_minipool_side = await api.call({ abi: AvaxInMinipoolsABI, target: MINIPOOL_MANAGER_CONTRACT }); + + // Minipool operators must deposit GGP in the protocol to be matched with AVAX + const ggp_staked = await api.call({ abi: GGPStakedAbi, target: GGP_STAKING_CONTRACT }); + + const AVAX_TVL = parseFloat(avax_lst_side) + parseFloat(avax_minipool_side); + const GGP_tvl = ggp_staked; + + api.addTokens([wavax, ggp], [AVAX_TVL, GGP_tvl]) // add tokens to api (balances) } module.exports = { + methodology: "GoGoPool TVL = AVAX on the LST side + AVAX on the Minipool side + GGP staked by GGP operators.", avax: { tvl, } From 40a929c0ea8f100457779e36fad31765af4dc85e Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:35:26 +0100 Subject: [PATCH 131/168] update pancakeswap --- projects/pancake-swap-stableswap/index.js | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/projects/pancake-swap-stableswap/index.js b/projects/pancake-swap-stableswap/index.js index e73aff10af5d..4311ddbcbf01 100644 --- a/projects/pancake-swap-stableswap/index.js +++ b/projects/pancake-swap-stableswap/index.js @@ -1,14 +1,21 @@ const { sumTokens2 } = require('../helper/unwrapLPs') const { getLogs } = require('../helper/cache/getLogs') -const factories = [ - // { target: '0x36bbb126e75351c0dfb651e39b38fe0bc436ffd2', fromBlock: 21456599, }, - { target: '0x25a55f9f2279a54951133d503490342b50e5cd15', fromBlock: 25535459, token3: true, }, -] module.exports = { methodology: "TVL accounts for the liquidity on all StableSwap pools, using the TVL chart on https://pancakeswap.finance/info?type=stableSwap as the source.", - bsc: { +} + + +const config = { + bsc: [{ target: '0x25a55f9f2279a54951133d503490342b50e5cd15', fromBlock: 25535459, token3: true, },], + arbitrum: [{ target: '0x5D5fBB19572c4A89846198c3DBEdB2B6eF58a77a', fromBlock: 169319653, token3: true, },], +} + + +Object.keys(config).forEach(chain => { + const factories = config[chain] + module.exports[chain] = { tvl: async (_, _b, _cb, { api }) => { const configs = await Promise.all(factories.map(getTvlConfig)) return sumTokens2({ api, ownerTokens: configs.flat() }) @@ -35,5 +42,5 @@ module.exports = { return getOwnTokens(logs) } } - }, -}; + } +}) \ No newline at end of file From d0791af010c27b80d920db3cf315ec039e3466a6 Mon Sep 17 00:00:00 2001 From: Ivan <3238603+ivivanov@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:00:17 +0200 Subject: [PATCH 132/168] add newly listed assets on Nolus (#9310) --- projects/nolus/index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/projects/nolus/index.js b/projects/nolus/index.js index 905c6af37657..504ea20629c4 100644 --- a/projects/nolus/index.js +++ b/projects/nolus/index.js @@ -3,6 +3,7 @@ const { queryContract, queryManyContracts, queryContracts } = require('../helper const chain = 'nolus' const _6Zeros = 1000000 const _8Zeros = 100000000 +const _12Zeros = 1000000000000 const _18Zeros = 1000000000000000000 // Osmosis @@ -61,10 +62,14 @@ async function getPrices(oracleAddr) { case "CRO": price = (p.amount_quote.amount / (p.amount.amount / _8Zeros)) / _6Zeros break + case "PICA": + price = (p.amount_quote.amount / (p.amount.amount / _12Zeros)) / _6Zeros + break case "WETH": case "EVMOS": case "INJ": case "DYDX": + case "DYM": price = (p.amount_quote.amount / (p.amount.amount / _18Zeros)) / _6Zeros break default: @@ -119,10 +124,14 @@ function getAssetsTvl(assets, prices) { case "CRO": amount = Number(assets[ticker]) / _8Zeros break + case "PICA": + amount = Number(assets[ticker]) / _12Zeros + break case "WETH": case "EVMOS": case "INJ": case "DYDX": + case "DYM": amount = Number(assets[ticker]) / _18Zeros break default: From eb86b619b40ab8db772b07acf37b7fcab9adab91 Mon Sep 17 00:00:00 2001 From: henrio123 Date: Tue, 12 Mar 2024 16:00:29 +0200 Subject: [PATCH 133/168] Sommelier: Turbo-ezETH vault (#9309) * Sommelier: Add RYBTC launch and remove Steady, Trend, & MOM vault launches * Sommelier: Add Turbo GHO vault * Update start block * Sommelier: Dedupe vaults taking position in ssister vaults from TVL * Add ETH Growth vault * Add turbo steth cellar * Add Turbo SOMM * Add Turbo eETH vault * Add new somm cellar * Sommelier: Add Morpho Maximizer * Add turbo diveth and turbo ethx vaults * Sommelier: Add Turbo eETH V2 * Sommelier: Add Turbo eETH V2 vault * Sommelier: Arbitrum vaults * Fix Arbitrum TVL cals * RYUSD-ARB * Turbo-RSETH * Turbo-ezETH --------- Co-authored-by: Phil Co-authored-by: Phil <30321052+philipjames44@users.noreply.github.com> --- projects/sommelier/cellar-constants.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/sommelier/cellar-constants.js b/projects/sommelier/cellar-constants.js index 5c662d52455e..59505a4f0504 100644 --- a/projects/sommelier/cellar-constants.js +++ b/projects/sommelier/cellar-constants.js @@ -56,6 +56,7 @@ const TURBO_DIVETH = "0x6c1edce139291Af5b84fB1e496c9747F83E876c9"; const TURBO_ETHX = "0x19B8D8FC682fC56FbB42653F68c7d48Dd3fe597E"; const TURBO_EETH_V2 = "0xdAdC82e26b3739750E036dFd9dEfd3eD459b877A"; const TURBO_RSETH = "0x1dffb366b5c5A37A12af2C127F31e8e0ED86BDbe"; +const TURBO_EZETH = "0x27500De405a3212D57177A789E30bb88b0AdbeC5"; const cellarsV2p5 = [ { id: TURBO_SWETH, startBlock: 17910374 }, @@ -70,6 +71,7 @@ const cellarsV2p5 = [ { id: TURBO_ETHX, startBlock: 19117547 }, { id: TURBO_EETH_V2, startBlock: 19163705 }, { id: TURBO_RSETH, startBlock: 19338456 }, + { id: TURBO_EZETH, startBlock: 19260727 }, ]; // v2.5 Cellars on Arbitrum @@ -89,3 +91,4 @@ module.exports = { cellarsV2p5, arbitrumCellarsV2p5, }; + From b3836140df5f51f624f023503b79f8caf84b511f Mon Sep 17 00:00:00 2001 From: Shell Yu Date: Wed, 13 Mar 2024 00:41:37 +0800 Subject: [PATCH 134/168] update ngad-artemis (#9313) Co-authored-by: sheldon --- projects/ngad-artemis/index.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/projects/ngad-artemis/index.js b/projects/ngad-artemis/index.js index d25ea65001b9..d3c1049d43ff 100644 --- a/projects/ngad-artemis/index.js +++ b/projects/ngad-artemis/index.js @@ -1,10 +1,14 @@ -const { sumTokensExport } = require("../helper/unwrapLPs"); +async function tvl(_, _1, _2, {api}) { + const depositedMetis = await api.call({ + abi: 'function totalDeposits() view returns (uint256)', + target: '0x96C4A48Abdf781e9c931cfA92EC0167Ba219ad8E' + }); + + api.add('0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000', depositedMetis); +} module.exports = { metis: { - tvl: sumTokensExport({ - owner: '0x96C4A48Abdf781e9c931cfA92EC0167Ba219ad8E', - tokens: ['0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000'] - }) + tvl } }; From 8b8110f99d7d638e92d7680b5d0abe4a2cae0062 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:47:09 +0100 Subject: [PATCH 135/168] Add Arbitrum chain TVL for IPOR Protocol (#9315) * IPOR Protocol - add Arbitrum chain tvl * IPOR Protocol - get arbitrum assets from the official IPOR github repository to be prepared for the next pools * minor fix --------- Co-authored-by: adam --- projects/ipor/index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/ipor/index.js b/projects/ipor/index.js index 727cc47b64b4..85b5df29cc55 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -1,8 +1,10 @@ const ADDRESSES = require('../helper/coreAssets.json') const { abi } = require("./abi"); +const { getConfig } = require('../helper/cache') -const V2DeploymentBlockNumber = 18333744 +const IPOR_GITHUB_ADDRESSES_URL = "https://raw.githubusercontent.com/IPOR-Labs/ipor-abi/main/mainnet/addresses.json"; +const V2DeploymentBlockNumber = 18333744 async function tvlEthereum(_, block, _1, { api }) { if (block >= V2DeploymentBlockNumber) { return await calculateTvlForV2(api); @@ -11,8 +13,11 @@ async function tvlEthereum(_, block, _1, { api }) { } } async function tvlArbitrum(_, block, _1, {api}) { - const ammTreasuryWstEthArbitrum = '0xBd013Ea2E01C2Ab3462dd67e9C83aa3834882A5D' - return api.sumTokens({owner: ammTreasuryWstEthArbitrum, tokens: [ADDRESSES.arbitrum.WSTETH]}) + const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL); + for (const pool of addresses.arbitrum.pools) { + await api.sumTokens({owner: pool.AmmTreasury, tokens: [pool.asset]}); + } + return api.getBalances(); } async function calculateTvlForV2(api) { From 26da82eec2e4e4e68c0756d6278ca71758c22e9c Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Tue, 12 Mar 2024 21:43:05 +0000 Subject: [PATCH 136/168] fix double cether --- projects/helper/compound.js | 2 +- projects/orbitlending-io/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/helper/compound.js b/projects/helper/compound.js index 0ee8d93bcea6..5c41e120fbcb 100644 --- a/projects/helper/compound.js +++ b/projects/helper/compound.js @@ -33,7 +33,7 @@ async function getMarkets(comptroller, block, chain, cether, cetheEquivalent, bl allCTokens.forEach(cToken => { cToken = cToken.toLowerCase() if (blacklist.includes(cToken)) return; - if (cether && cToken === cether.toLowerCase()) { + if (cether && (cToken === cether.toLowerCase?.() || cether.includes(cToken))) { markets.push({ underlying: cetheEquivalent, cToken }) return; } diff --git a/projects/orbitlending-io/index.js b/projects/orbitlending-io/index.js index ffafb1329bd6..e5c480b9ed44 100644 --- a/projects/orbitlending-io/index.js +++ b/projects/orbitlending-io/index.js @@ -3,7 +3,7 @@ const { compoundExports2 } = require('../helper/compound'); module.exports = { blast: compoundExports2({ comptroller: '0x1E18C3cb491D908241D0db14b081B51be7B6e652', - cether: '0xF9B3B455f5d900f62bC1792A6Ca6e1d47B989389', - blacklistedTokens: ['0xf92996ddc677a8dcb032ac5fe62bbf00f92ae2ec', '0x0872b71efc37cb8dde22b2118de3d800427fdba0'] + cether: ['0xf9b3b455f5d900f62bc1792a6ca6e1d47b989389', '0x0872b71efc37cb8dde22b2118de3d800427fdba0'], + blacklistedTokens: ['0xf92996ddc677a8dcb032ac5fe62bbf00f92ae2ec'] }), }; From 58f6c1f90a176402780e0554db5e97d15b8c45b7 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 07:53:49 +0100 Subject: [PATCH 137/168] track unilend v2 --- projects/helper/chain/ton.js | 4 +-- projects/unilend-v2/index.js | 35 ++++++++++++++++++ projects/unilend/index.js | 69 ++++-------------------------------- 3 files changed, 43 insertions(+), 65 deletions(-) create mode 100644 projects/unilend-v2/index.js diff --git a/projects/helper/chain/ton.js b/projects/helper/chain/ton.js index 898c3ccce022..36d2d8c6c48f 100644 --- a/projects/helper/chain/ton.js +++ b/projects/helper/chain/ton.js @@ -7,7 +7,7 @@ const rateLimited = fn => (...args) => _rateLimited(() => fn(...args)) const { getUniqueAddresses, sleep } = require('../utils') async function getTonBalance(addr) { - const res = await get(`https://tonapi.io/v2/accounts/${addr}`) + const res = await get(`https://toncenter.com/api/v3/account?address=${addr}`) return res.balance } @@ -17,7 +17,7 @@ async function _sumTokensAccount({ api, addr, tokens = [], onlyWhitelistedTokens api.add(ADDRESSES.null, balance) } const { balances } = await get(`https://tonapi.io/v2/accounts/${addr}/jettons?currencies=usd`) - await sleep(1000 * (10 * Math.random() + 3)) + await sleep(1000 * (3 * Math.random() + 3)) balances.forEach(({ balance, price, jetton }) => { if (onlyWhitelistedTokens && !tokens.includes(jetton.address)) return; const decimals = jetton.decimals diff --git a/projects/unilend-v2/index.js b/projects/unilend-v2/index.js new file mode 100644 index 000000000000..5e00561466b2 --- /dev/null +++ b/projects/unilend-v2/index.js @@ -0,0 +1,35 @@ +const { getLogs } = require('../helper/cache/getLogs') +const config = { + ethereum: { factory: '0x7f2E24D2394f2bdabb464B888cb02EbA6d15B958', fromBlock: 19213560 }, +} + +Object.keys(config).forEach(chain => { + const { factory, fromBlock, } = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const data = await getPools(api) + const ownerTokens = data.map(i => [[i.token0, i.token1], i.pool]) + return api.sumTokens({ ownerTokens }) + }, + borrowed: async (_, _b, _cb, { api, }) => { + const data = await getPools(api) + const pools = data.map(i => i.pool) + const token0s = data.map(i => i.token0) + const token1s = data.map(i => i.token1) + const tokenOdata = await api.multiCall({ abi: 'function token0Data() view returns (uint256, uint256, uint256 totalBorrow)', calls: pools }) + const token1data = await api.multiCall({ abi: 'function token1Data() view returns (uint256, uint256, uint256 totalBorrow)', calls: pools }) + api.add(token0s, tokenOdata.map(i => i.totalBorrow)) + api.add(token1s, token1data.map(i => i.totalBorrow)) + }, + } + + async function getPools(api) { + return getLogs({ + api, + target: factory, + eventAbi: 'event PoolCreated (address indexed token0, address indexed token1, address pool, uint256)', + onlyArgs: true, + fromBlock, + }) + } +}) \ No newline at end of file diff --git a/projects/unilend/index.js b/projects/unilend/index.js index 9055c53dab20..e29c2370588f 100644 --- a/projects/unilend/index.js +++ b/projects/unilend/index.js @@ -1,70 +1,13 @@ -const { getConfig } = require('../helper/cache') -const { sumTokensAndLPsSharedOwners } = require("../helper/unwrapLPs"); -const UnilendContract = "0x13A145D215182924c89F2aBc7D358DCc72F8F788"; - -const API_URL = "https://unilend.finance/list.json"; - -const calcTvl = async (balances, Id, block, chain, transformAddr) => { - const tokenList = (await getConfig('unilend', API_URL)).tokens - .filter((CHAIN) => CHAIN.chainId == Id) - .map((token) => token.address); - - for (const token of tokenList) { - await sumTokensAndLPsSharedOwners( - balances, - [[token, false]], - [UnilendContract], - block, - chain, - transformAddr - ); - } -}; - -const ethTvl = async () => { - const balances = {}; - - await calcTvl(balances, 1); - - return balances; -}; +const { sumTokensExport } = require("../helper/unwrapLPs"); -const polygonTvl = async (chainBlocks) => { - const balances = {}; - - const transformAddress = i => `polygon:${i}`; - await calcTvl( - balances, - 137, - chainBlocks["polygon"], - "polygon", - transformAddress - ); - - return balances; -}; - -const bscTvl = async (chainBlocks) => { - const balances = {}; - - const transformAddress = i => `bsc:${i}`; - await calcTvl(balances, 56, chainBlocks["bsc"], "bsc", transformAddress); - - return balances; -}; +const UnilendContract = "0x13A145D215182924c89F2aBc7D358DCc72F8F788"; +const tvl = { tvl: sumTokensExport({ owners: [UnilendContract], fetchCoValentTokens: true, blacklistedTokens: ['0x0202Be363B8a4820f3F4DE7FaF5224fF05943AB1', '0x5b4cf2c120a9702225814e18543ee658c5f8631e']})} module.exports = { - misrepresentedTokens: true, - ethereum: { - tvl: ethTvl, - }, - polygon: { - tvl: polygonTvl, - }, - bsc: { - tvl: bscTvl, - }, + ethereum: tvl, + polygon: tvl, + bsc: tvl, methodology: "We count liquidity on the Pools through UnilendFlashLoansCore Contract", }; From 5debc40396ab281fed81dda6ff6544f0c1c46544 Mon Sep 17 00:00:00 2001 From: Nova <127639799+BuzzSeagull@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:03:42 +0800 Subject: [PATCH 138/168] add more collateral to goku money (#9319) * add more collateral to goku money * chore: remove gai in goku money --- projects/goku-money/index.js | 42 ++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/projects/goku-money/index.js b/projects/goku-money/index.js index ba5680818fbf..b79f9955f870 100644 --- a/projects/goku-money/index.js +++ b/projects/goku-money/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens2, sumTokensExport } = require('../helper/unwrapLPs') +const { sumTokensExport } = require('../helper/unwrapLPs') const COLLATERALS = { [ADDRESSES.manta.USDC]: { @@ -10,6 +10,7 @@ const COLLATERALS = { activePool: "0x74242b001869037594c8b59b191DF7284c6A3801", defaultPool: "0xF42cE1F6F90Ea3B6254E2390B7E9467Fb1584AAA", }, + // TIA "0x6Fae4D9935E2fcb11fC79a64e917fb2BF14DaFaa": { activePool: "0x00A14CF3A66De2D4585F399Ed4240d0F2730fFCB", defaultPool: "0x6851255D2CEc9D66502282D3C6F11f552186eDA7", @@ -17,34 +18,43 @@ const COLLATERALS = { [ADDRESSES.manta.WETH]: { activePool: "0xd58300481551F2bB81343abB5C6288fEaCC72Be4", defaultPool: "0x2C903a6858374925f5020B8EA2D88E545515eD4D", - } -} - -const GAI_TOKEN_ADDRESS = "0xcd91716ef98798A85E79048B78287B13ae6b99b2" -const GOK_TOKEN_ADDRESS = "0x387660bc95682587efc12c543c987abf0fb9778f" - -const GOK_STAKES = { - USDC: "0x60e47C06E3999c1Ef8bC5A424FCd665925CB0FB1", - USDT: "0x1343804D5936EA6E98988F27870b913b1c93081e", - TIA: "0xD2fBB34Bd69EC810AF2D243eA2192e7c89a696dA", - WETH: "0x4CF0Ac5Ac97E8d58e798eBc4EaB9afF17481c5F5", + }, + // MANTA + "0x95CeF13441Be50d20cA4558CC0a27B601aC544E5": { + activePool: "0xEBC3E41176C1d63E8B99271cD75dD3FBa907CbAf", + defaultPool: "0x64a602a31030D531Ca0dF336A811ab0247b87165", + }, + // wUSDM + "0xbdAd407F77f44F7Da6684B416b1951ECa461FB07": { + activePool: "0xdf4A63E03A327E1Fc68460622937A7BcC300e66b", + defaultPool: "0xF79BA93C02dD2B0529eF254075428aAdb2416595", + }, + // STONE + "0xEc901DA9c68E90798BbBb74c11406A32A70652C3": { + activePool: "0x5Ee4DC855Ca71158CB0516a27e01bDB18C05D923", + defaultPool: "0x558a64CB6e2e335Fc468ab3215d5c7Fe5dF26F31", + }, } -async function tvl(ts, _block, chainBlocks, { api }) { +function getCollateralOwnersAndToken() { const tokensAndOwners = [] for (const [collateral, collateralInfo] of Object.entries(COLLATERALS)) { const { activePool, defaultPool } = collateralInfo tokensAndOwners.push([collateral, activePool]) tokensAndOwners.push([collateral, defaultPool]) } - return sumTokens2({ api, tokensAndOwners, }) + return tokensAndOwners; } + module.exports = { start: 1698768000, // 01 Nov 2023 methodology: "Total locked collateral assets (in ERC-20 form) in ActivePool and DefaultPool, plus total staked GAI in StabilityPool", manta: { - tvl, - staking: sumTokensExport({ owners: Object.values(GOK_STAKES), tokens: [GOK_TOKEN_ADDRESS], }), + tvl: sumTokensExport({ + tokensAndOwners: [ + ...getCollateralOwnersAndToken(), + ] + }), }, }; From 057b650b7782f5bc7609477be508a32bec0ff56d Mon Sep 17 00:00:00 2001 From: 0xShad0w <44497716+0xShad0w@users.noreply.github.com> Date: Wed, 13 Mar 2024 07:04:11 +0000 Subject: [PATCH 139/168] Pharaoh v1 (#9318) * add phar-v1 pools * fix factory address * fix factory address --- projects/pharaoh-exchange-v1/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/pharaoh-exchange-v1/index.js b/projects/pharaoh-exchange-v1/index.js index 8e88a5573923..1059009c1f26 100644 --- a/projects/pharaoh-exchange-v1/index.js +++ b/projects/pharaoh-exchange-v1/index.js @@ -4,7 +4,7 @@ const { staking } = require('../helper/staking') module.exports = { misrepresentedTokens: true, avax:{ - tvl: getUniTVL({ factory: '0xAAA91e283126774b3bb513fD5922976d5212dc49', useDefaultCoreAssets: true, hasStablePools: true, stablePoolSymbol: 'crAMM' }), + tvl: getUniTVL({ factory: '0xAAA16c016BF556fcD620328f0759252E29b1AB57', useDefaultCoreAssets: true, hasStablePools: true, stablePoolSymbol: 'crAMM' }), staking: staking("0xAAA3249511DE3E7A5c61FbA8313170c1Bef9A65e", "0xAAAB9D12A30504559b0C5a9A5977fEE4A6081c6b"), }, } \ No newline at end of file From 5c15e06009d0f471f01e308b01ea372e7cace713 Mon Sep 17 00:00:00 2001 From: Jeremy Crane Date: Wed, 13 Mar 2024 01:04:52 -0600 Subject: [PATCH 140/168] Update index.js (#9316) --- projects/alta-finance/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/alta-finance/index.js b/projects/alta-finance/index.js index f927d9da39ab..08700bdc0be4 100644 --- a/projects/alta-finance/index.js +++ b/projects/alta-finance/index.js @@ -3,7 +3,7 @@ module.exports = { } const config = { - polygon: { investments: ['0xcf152E9f60E197A44FAdce961c6B822Dcb6c9dcc'], debts: ['0xE92F580C930dd24aACB38Ab0EA18F6c1dEf31369'], token: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174' }, + polygon: { investments: ['0xcf152E9f60E197A44FAdce961c6B822Dcb6c9dcc'], debts: ['0xE92F580C930dd24aACB38Ab0EA18F6c1dEf31369','0x64D6583b81716a4d141f07E264805CaCd3f484bB'], token: '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174' }, } Object.keys(config).forEach(chain => { From 924d383d3d015e636e00a01d7d3fb97174f1073d Mon Sep 17 00:00:00 2001 From: Maduck Club <162635234+maduck-club@users.noreply.github.com> Date: Wed, 13 Mar 2024 07:11:57 +0000 Subject: [PATCH 141/168] Maduck (#9317) * Maduck Club * fix TVL Maduck * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/maduck/index.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/projects/maduck/index.js b/projects/maduck/index.js index e7b6d92b9d9b..ffb12036c14c 100644 --- a/projects/maduck/index.js +++ b/projects/maduck/index.js @@ -1,18 +1,4 @@ -const { pool2BalanceFromMasterChefExports} = require("../helper/pool2.js"); -const masterchefAbi = require("../helper/abis/masterchef.json"); - -//BSC staking contracts -const bscContract = "0x944dFb7f7caB8bbA2F74882784742C39b8495F5e"; - -const maduck = "0xb976d9684412f75f7AeE24E56D846fd404b1B329"; - - -module.exports = { - methodology: 'Pool2 TVL BSC LPs', - bsc: { - tvl: async ()=>({}), - pool2: pool2BalanceFromMasterChefExports(bscContract, maduck, "bsc", addr=>`bsc:${addr}`, masterchefAbi.poolInfo) - }, -} +const { masterchefExports } = require('../helper/unknownTokens') +module.exports = masterchefExports({ chain: 'bsc', masterchef: '0x944dFb7f7caB8bbA2F74882784742C39b8495F5e', nativeToken: '0xb976d9684412f75f7aee24e56d846fd404b1b329', useDefaultCoreAssets: true, }) \ No newline at end of file From 775d3dbedcffe00cdd50148b6e09d059215189b0 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 08:51:41 +0100 Subject: [PATCH 142/168] update sdk version --- package-lock.json | 6 +++--- projects/helper/env.js | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/package-lock.json b/package-lock.json index a54e000d2ddf..d98d4027d9f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -886,9 +886,9 @@ } }, "node_modules/@defillama/sdk": { - "version": "5.0.40", - "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.40.tgz", - "integrity": "sha512-YtMaOKKaGKovmReEfgDRd+cLaXGFiBbAnAHdDJE8eb6BVkjhR2N9l+OvgLSMgLY6I/Bpu3pkJiiweEdCuvqfEA==", + "version": "5.0.41", + "resolved": "https://registry.npmjs.org/@defillama/sdk/-/sdk-5.0.41.tgz", + "integrity": "sha512-53cAjD+P+gotPGLUMTRqbeL14HEe4zR/t6sYqOIHIKO9dHX6HkCpIgwkjGRoM+lUQwEEkH9QFhfLzeUCZ6+DVQ==", "dependencies": { "@aws-sdk/client-s3": "^3.400.0", "@supercharge/promise-pool": "^2.1.0", diff --git a/projects/helper/env.js b/projects/helper/env.js index e200a18bbbea..08dcf6129743 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -11,22 +11,6 @@ const DEFAULTS = { MULTIVERSX_RPC: 'https://api.multiversx.com', ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", - CORE_RPC: "https://rpc.coredao.org,https://rpc.ankr.com/core,https://1rpc.io/core,https://rpc-core.icecreamswap.com", - BITGERT_RPC: "https://flux-rpc2.brisescan.com,https://mainnet-rpc.brisescan.com,https://chainrpc.com,https://serverrpc.com,https://flux-rpc.brisescan.com", - LYRA_RPC: "https://rpc.lyra.finance", - BITCHAIN_RPC: "https://rpc.bitchain.biz/", - ALV_RPC: "https://elves-core3.alvey.io/", - OZONE_RPC: "https://node1.ozonechain.io", - XDC_RPC: "https://erpc.xinfin.network", - ZETA_RPC: "https://zetachain-evm.blockpi.network/v1/rpc/public,https://zetachain-mainnet-archive.allthatnode.com:8545", - DEFIVERSE_RPC: "https://rpc.defi-verse.org/", - MERLIN_RPC: "https://rpc.merlinchain.io", - MERLIN_RPC_MULTICALL: '0x830E7E548F4D80947a40A7Cf3a2a53166a0C3980', - BITROCK_RPC_MULTICALL: '0x40DD0342A46Ab0893251211F6626E82c09A75345', - NAKA_RPC: 'https://node.nakachain.xyz', - RONIN_RPC: 'https://api.roninchain.com/rpc', - ETHF_RPC: 'https://rpc.dischain.xyz/', - SAPPHIRE_RPC_MULTICALL: '0xcA11bde05977b3631167028862bE2a173976CA11', } const ENV_KEYS = [ From 8c276147e052573a1b88a27481268178d7c48b67 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:12:08 +0100 Subject: [PATCH 143/168] Add Cian Automation module with configuration --- projects/cian-automation/index.js | 70 +++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 projects/cian-automation/index.js diff --git a/projects/cian-automation/index.js b/projects/cian-automation/index.js new file mode 100644 index 000000000000..394e3442273b --- /dev/null +++ b/projects/cian-automation/index.js @@ -0,0 +1,70 @@ +module.exports = { + doublecounted: true, +} + +const { getLogs } = require('../helper/cache/getLogs') +const ADDRESSES = require('../helper/coreAssets.json') + +const config = { + ethereum: { + factories: [ + { factory: '0x8B46CB994218767f07C86Ba62fecAfdcb19cc001', fromBlock: 16036873, }, + { factory: '0x17F453846E407409c22621d465d2838F7DcE22aE', fromBlock: 15300131, }, + ], + tokens: [ADDRESSES.null, ADDRESSES.ethereum.STETH, ADDRESSES.ethereum.WETH, '0x1982b2f5814301d4e9a8b0201555376e62f82428', '0xf63b34710400cad3e044cffdcab00a0f32e33ecf'] + }, + polygon: { + factories: [ + { factory: '0x1cb9cf5439dced63d8f5b7f1a5bf9834d8076a9a', fromBlock: 34735173, }, + ], + tokens: [ADDRESSES.null, ADDRESSES.polygon.WMATIC, ADDRESSES.polygon.MATICX, '0xfa68fb4628dff1028cfec22b4162fccd0d45efb6', '0x4a1c3ad6ed28a636ee1751c69071f6be75deb8b8', '0x80ca0d8c38d2e2bcbab66aa1648bd1c7160500fe'] + }, + avax: { + factories: [ + { factory: '0x15cbFF12d53e7BdE3f1618844CaaEf99b2836d2A', fromBlock: 20869027, }, + ], + tokens: [ + ADDRESSES.null, ADDRESSES.avax.WAVAX, ADDRESSES.avax.SAVAX, + '0xF362feA9659cf036792c9cb02f8ff8198E21B4cB','0x4a1c3ad6ed28a636ee1751c69071f6be75deb8b8', '0x513c7E3a9c69cA3e22550eF58AC1C0088e918FFf', + ] + }, +} + +Object.keys(config).forEach(chain => { + const { factories, tokens } = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const owners = [] + for (const { factory, fromBlock, } of factories) { + const mainAccounts = await getLogs({ + target: factory, fromBlock, api, + eventAbi: 'event mainAccountCreate(address _userAddress, address _newAccount)', + onlyArgs: true, + extraKey: 'mainAccountCreate', + }) + owners.push(...mainAccounts.map(i => i._newAccount)) + const subAccounts = await getLogs({ + target: factory, fromBlock, api, + eventAbi: 'event subAccountCreate (address _mainAccount, address _newSubAccount)', + onlyArgs: true, + extraKey: 'subAccountCreate', + }) + owners.push(...subAccounts.map(i => i._newSubAccount)) + } + console.log(chain, owners.length, tokens.length) + if (chain === 'avax') { + const avaxDebt = await api.multiCall({ abi: 'function borrowBalanceStored(address) view returns (uint256)', calls: owners, target: '0x5C0401e81Bc07Ca70fAD469b451682c0d747Ef1c' }) + const avaxDebtSum = avaxDebt.reduce((acc, borrow) => acc + +borrow, 0) + api.addGasToken(avaxDebtSum * -1) + } + return api.sumTokens({ owners, tokens }) + } + } +}) + +/* +backup: +`https://data.cian.app/${network}/api/v1/${accountType}?page=${page}&size=${size} +"accounts", "sub_accounts" +networks: ethereum, polygon, avalanche +*/ From 97c14c1abd77793dfbe3bf67d34a9d47a0c494ed Mon Sep 17 00:00:00 2001 From: charq <73696209+buchaoqun@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:40:37 +0800 Subject: [PATCH 144/168] borrow filter depositAddress (#9320) * add arbitrum tvl * solv protocol funds add KLP * klp amount * refactor: dont fetch fsKLP price * Change the configuration of contract address * Modify judgment logic * Modify judgment logic * change cache file name * fix bug * add iziswap lp * fix * reduce usage of BigNumber * add lendle * add mux lp count * filter depositAddress * getSubscribeNav params time to millisecond --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/solv-protocol-funds/index.js | 38 ++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/projects/solv-protocol-funds/index.js b/projects/solv-protocol-funds/index.js index b784f893dfa4..8a584fabbd73 100644 --- a/projects/solv-protocol-funds/index.js +++ b/projects/solv-protocol-funds/index.js @@ -22,20 +22,22 @@ async function borrowed(ts) { const network = api.chain; let address = (await getConfig('solv-protocol/funds', addressUrl)); - let gm = address[api.chain]["gm"]; + const depositAddress = filterDepositAddress(network, address); const graphData = await getGraphData(ts, network, api); if (graphData.pools.length > 0) { const poolLists = graphData.pools; + var pools = poolLists.filter((value) => { - return gm == undefined || gm["depositAddress"].indexOf(value.vault) == -1; + return depositAddress.length == 0 || depositAddress.indexOf(value.vault) == -1; }); + const poolConcretes = await concrete(pools, api); const nav = await api.multiCall({ abi: abi.getSubscribeNav, calls: pools.map((index) => ({ target: index.navOracle, - params: [index.poolId, ts] + params: [index.poolId, ts * 1000] })), }) @@ -249,6 +251,36 @@ async function getGraphData(timestamp, chain, api) { pools: poolList }; } + +function filterDepositAddress(network, address) { + let depositAddresses = []; + if (address[network]) { + if (address[network]["gm"]) { + for (let depositAddress of address[network]["gm"]["depositAddress"]) { + depositAddresses.push(depositAddress.toLowerCase()) + } + } + if (address[network]["mux"]) { + depositAddresses.push(address[network]["mux"]["account"].toLowerCase()) + } + if (address[network]["klp"]) { + for (let poolAddress of address[network]["klp"]["klpPool"]) { + depositAddresses.push(poolAddress.toLowerCase()) + } + } + if (address[network]["iziswap"]) { + for (let owner of address[network]["iziswap"]["owner"]) { + depositAddresses.push(owner.toLowerCase()) + } + } + if (address[network]["lendle"]) { + depositAddresses.push(address[network]["lendle"]["account"]["user"].toLowerCase()) + } + } + + return depositAddresses; +} + // node test.js projects/solv-protocol-funds module.exports = { arbitrum: { From ac7ef03d23486a27b3bf3c0ddd652347b1b89960 Mon Sep 17 00:00:00 2001 From: Roch Date: Wed, 13 Mar 2024 15:41:48 +0100 Subject: [PATCH 145/168] Add polygon chain to Owna (#9328) * Adding polygon mainnet to Owna * fix network name * update backend subdomain depending on chain id --- projects/owna/config.js | 11 ++++++++++- projects/owna/index.js | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/projects/owna/config.js b/projects/owna/config.js index ad8b5edca061..110232327464 100644 --- a/projects/owna/config.js +++ b/projects/owna/config.js @@ -1,4 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') + module.exports = { chains: [ { @@ -9,5 +10,13 @@ module.exports = { nftContract: '0xa0db7ef54eeffb7a3a5d9e7a95fb853392573b90', lendingContract: '0x27Ca3D6c64398FF9BcF2E66896EC4B3BEc5e1959', }, + { + name: 'polygon', + tokens: [ + ADDRESSES.polygon.USDC, + ], + nftContract: '0x666E30E3cdB0A920deA6Cd52E6d1cF0C344CC218', + lendingContract: '0x514F4FC7A3F5CF4c8bD14957C19997b42269c9Ce', + }, ] -} \ No newline at end of file +} diff --git a/projects/owna/index.js b/projects/owna/index.js index 4bb4f8a0a403..6410e55c5c58 100644 --- a/projects/owna/index.js +++ b/projects/owna/index.js @@ -46,7 +46,8 @@ config.chains.forEach(async chainInfo => { } async function getOffersCount(tokenId) { - return parseInt(await get('https://backend.owna.io/offer/getOffersCount?mintId=' + tokenId)); + const backendUrl = chain === 'polygon' ? 'https://polygon-backend.owna.io' : 'https://backend.owna.io'; + return parseInt(await get(`${backendUrl}/offer/getOffersCount?mintId=` + tokenId)); } async function totalOffers() { From a8c13754f895b828bacbf97d3d7dcd9b43aaa281 Mon Sep 17 00:00:00 2001 From: Georgi Popov Date: Wed, 13 Mar 2024 16:44:02 +0200 Subject: [PATCH 146/168] Added project return-finance project (#9311) * Added project return-finance project * code refactor * Minor changes --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/return-finance/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 projects/return-finance/index.js diff --git a/projects/return-finance/index.js b/projects/return-finance/index.js new file mode 100644 index 000000000000..73c4b6961b51 --- /dev/null +++ b/projects/return-finance/index.js @@ -0,0 +1,19 @@ +const { sumERC4626VaultsExport } = require("../helper/erc4626") + +module.exports = { + doublecounted: true, +}; + +const config = { + ethereum: ['0xFD360A096E4a4c3C424fc3aCd85da8010D0Db9a5', '0x201254227f9fE57296C257397Be6c617389a8cCb'], + avax: ['0x3B6385493a1d4603809dDbaE647200eF8baA53F5'], + polygon: ['0x3B6385493a1d4603809dDbaE647200eF8baA53F5'], + base: ['0x3B6385493a1d4603809dDbaE647200eF8baA53F5'], +} + + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: sumERC4626VaultsExport({ vaults: config[chain], isOG4626: true, }) + } +}); From f31f66d5a436a7a7656a906276bf7089c92065c3 Mon Sep 17 00:00:00 2001 From: webmass Date: Wed, 13 Mar 2024 18:48:17 +0400 Subject: [PATCH 147/168] inverse treasury: blacklist scam token adding fake value (#9325) --- projects/treasury/inverse.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/treasury/inverse.js b/projects/treasury/inverse.js index fdad759c766f..35b10eb5e47e 100644 --- a/projects/treasury/inverse.js +++ b/projects/treasury/inverse.js @@ -47,13 +47,13 @@ module.exports = treasuryExports({ ownTokens: [ inv, "0x73E02EAAb68a41Ea63bdae9Dbd4b7678827B2352", // Uniswap INV/ETH LP - "0xA5D7A7690B72a89B7b720E43fC9cBda5419d0C71", // 50INV-50DOLA Aura Deposit Vault - // "0x9c7305eb78a432ced5C4D14Cac27E8Ed569A2e26", // veNFT + "0xA5D7A7690B72a89B7b720E43fC9cBda5419d0C71", // 50INV-50DOLA Aura Deposit Vault ], resolveUniV3: true, resolveLP: true, blacklistedTokens: [ - '0x21e83dbfd8f11d885eba9f9ba126da11ae0671b7' + '0x21e83dbfd8f11d885eba9f9ba126da11ae0671b7', + '0x265befe2b1a0f4f646dea96ba09c1656b74bda91', ] }, optimism: { From 319338e8da1a42d2e6e2c68fcaa7cf5a40c4e291 Mon Sep 17 00:00:00 2001 From: GausPeerzade <116433573+GausPeerzade@users.noreply.github.com> Date: Wed, 13 Mar 2024 20:18:42 +0530 Subject: [PATCH 148/168] Added Arbitrum vaults (#9324) --- projects/rivera_money/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/rivera_money/index.js b/projects/rivera_money/index.js index 4f83b1069966..33f1739f2352 100644 --- a/projects/rivera_money/index.js +++ b/projects/rivera_money/index.js @@ -30,6 +30,9 @@ const config = { "0xA0dD02ef78570a4d93b7eE334EA9c593F7A0ebc4", "0x4778CAAa0E52F0B58eAF5e947Ae81A0a10cDe707", ], + arbitrum: [ + "0x8E99B66dE170b53b39D9B54f189a12D7c6AC0cd9" + ], } module.exports = { @@ -39,6 +42,6 @@ module.exports = { Object.keys(config).forEach(chain => { const vaults = config[chain] module.exports[chain] = { - tvl: sumERC4626VaultsExport({ vaults, tokenAbi: 'asset', balanceAbi: 'totalAssets'}) + tvl: sumERC4626VaultsExport({ vaults, tokenAbi: 'asset', balanceAbi: 'totalAssets' }) } }) \ No newline at end of file From 3dde0df8518991adac4736a9297b55091ca6c7f8 Mon Sep 17 00:00:00 2001 From: "Guillermo M. Narvaja" Date: Wed, 13 Mar 2024 11:50:43 -0300 Subject: [PATCH 149/168] Ensuro: new pools and Premiums accounts + v1 deprecated (#9322) * Ensuro: new pools and Premiums accounts Adds new eTokens (liquidity pool) and Premiums Accounts for recently onboarded risks. * Ensuro: new pools and Premiums accounts + remove v1 Adds new eTokens (liquidity pool) and Premiums Accounts for recently onboarded risks. Also, I'm removing the code for v1 since is no longer in use. --- projects/ensuro/index.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/projects/ensuro/index.js b/projects/ensuro/index.js index 3eb3881ec3fe..b56951a94924 100644 --- a/projects/ensuro/index.js +++ b/projects/ensuro/index.js @@ -16,6 +16,10 @@ const addressBook = { {name: "eToken Junior Spot", address: "0x6229D78658305a301E177f9dAEa3a0799fd1528C"}, {name: "eToken Junior Revo", address: "0x6A0e61C757e384eB1E4A2b94F7E02E68e4b4515e"}, {name: "eToken Junior StormStrong", address: "0xE36D6585F0c200195b196C66644C519e7674b476"}, + {name: "eToken Junior Barker", address: "0x9F967c614c9573cc4eabE68ae0354E5d11F7eC9D"}, + {name: "eToken Junior DLT", address: "0x9078dDdeA2F82c27791EF78A9ec9ab0f66bfb6F9"}, + {name: "eToken Junior Otonomi", address: "0x32a9CBeb2cA148E55F327c6B4673351dD03eD858"}, + {name: "eToken Junior Bliss", address: "0x71d390C243706b713B5D2b077E942223f7A55d00"}, // PremiumsAccounts {name: "PremiumsAccount Koala", address: "0xCCf5C404d32eB6E777088AB13837a1b8dCBA9328"}, {name: "PremiumsAccount Innov Zone", address: "0x4f43B8F252887F814ED689346fdb5Bd266394520"}, @@ -23,11 +27,11 @@ const addressBook = { {name: "PremiumsAccount StormStrong", address: "0x06347eA3dA6a5B44eEAe3B8F4a65992Ae073e6F4"}, {name: "PremiumsAccount Revo", address: "0x47f35B4876138b5d96FfDed1e46aE6b58E6e7B31"}, {name: "PremiumsAccount Spot", address: "0x42118Df6EBb18346ca425f1c67AC739E95aD9358"}, + {name: "PremiumsAccount Barker", address: "0xa5A8c6b6cb08dB75F5d487F0838D0743871d80a7"}, + {name: "PremiumsAccount DLT", address: "0x8908d99a4E2fF6b7Bf4563593B02AcBc7bBfaBC1"}, + {name: "PremiumsAccount Otonomi", address: "0xE43587386E6e8FA127dd008770cdC07dE2Df91E9"}, + {name: "PremiumsAccount Bliss", address: "0x11b490292799a0edFE37797592F77151C4483442"}, ], - v1: { - pool: "0xF7ED72430bEA07D8dB6eC264603811381F5af8e0", - asset_manager: "0x09d9Dd252659a497F3525F257e204E7192beF132", - } } }; @@ -35,10 +39,6 @@ async function tvl(_timestamp, _block, _blocksOthers, { api }) { const addresses = addressBook[api.chain]; const ownerTokens = addresses.reserves.map(i => [[addresses.usdc, addresses.aave_v3_usdc], i.address]) - if (addresses.v1) { - ownerTokens.push([[addresses.usdc], addresses.v1.pool]) - ownerTokens.push([[addresses.aave_v2_usdc], addresses.v1.asset_manager]) - } return sumTokens2({ api, ownerTokens, }); } From dfa4ce095c3f6aff4e5f034771eac357db12e1c5 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:51:22 +0100 Subject: [PATCH 150/168] code refactor (#9329) * Update Metavault Derivatives V2 chains * code refactor --------- Co-authored-by: 0xR <0xr@metavault.org> --- projects/metavault-derivatives-v2/index.js | 25 +++++++++++----------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/projects/metavault-derivatives-v2/index.js b/projects/metavault-derivatives-v2/index.js index 115e839b512e..67f1cd8ccee3 100644 --- a/projects/metavault-derivatives-v2/index.js +++ b/projects/metavault-derivatives-v2/index.js @@ -1,15 +1,14 @@ -const ADDRESSES = require("../helper/coreAssets.json"); - -const { nullAddress } = require("../helper/unwrapLPs"); - -async function LineaTvl(_time, _ethBlock, _cb, { api}) { - const tokens = [nullAddress, ADDRESSES.linea.USDC]; - const owners = ["0xf3Ef1c95aecf5B5025815014890dC14488599883"]; - return api.sumTokens({ owners, tokens}) +const config = { + linea: '0xb514Ee8a1e00B102cE2312048abcbc3E57bfED94', + polygon: '0xAb36984e4952e5a9d08536C4dE5190ed37725017' } -module.exports = { - linea: { - tvl: LineaTvl, - }, -}; +Object.keys(config).forEach(chain => { + const target = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const tokens= await api.call({ abi: 'address[]:getAssetList', target}) + return api.sumTokens({ owner: target, tokens }) + } + } +}) \ No newline at end of file From a41ebaa2994f147036abcebad8e83f5cfe9f8069 Mon Sep 17 00:00:00 2001 From: Nova <127639799+BuzzSeagull@users.noreply.github.com> Date: Wed, 13 Mar 2024 22:55:49 +0800 Subject: [PATCH 151/168] add u235 (#9323) * add u235 * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/u235/index.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 projects/u235/index.js diff --git a/projects/u235/index.js b/projects/u235/index.js new file mode 100644 index 000000000000..a909f9abf707 --- /dev/null +++ b/projects/u235/index.js @@ -0,0 +1,7 @@ +const { aaveExports } = require('../helper/aave'); +const methodologies = require('../helper/methodologies'); + +module.exports = { + methodology: methodologies.lendingMarket, + scroll: aaveExports('scroll', undefined, undefined, ['0xeB3C203418f0cb55b351C3E45A5C4f47bE5DA77A']), +} \ No newline at end of file From 252f13289fd721d820faa96b6c304a6f3735a545 Mon Sep 17 00:00:00 2001 From: crews <64375250+TheYoungCrews@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:56:17 -0500 Subject: [PATCH 152/168] Add new Index Coop Leverage Indices, Remove old FLI products (#9331) We migrated all TVL from the old FLI products into new 2x tokens built on Aave v3 instead of Compound v2. I've also removed ethFLI and btcFLI from `sets` to prevent double counting TVL as the old FLI tokens hold the new 2x tokens for simplified user migration see announcement: https://discord.com/channels/762061559744299010/814879319633428540/1217264332635902134 cc @g1nt0ki let me know if you have any questions at t.me/theyoungcrews --- projects/indexcoop/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/indexcoop/index.js b/projects/indexcoop/index.js index cd168d8a821c..3907cff413a4 100644 --- a/projects/indexcoop/index.js +++ b/projects/indexcoop/index.js @@ -4,9 +4,11 @@ const sdk = require("@defillama/sdk") const dpiAddress = "0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b"; const ethFliAddress = "0xaa6e8127831c9de45ae56bb1b0d4d4da6e5665bd"; +const eth2x = "0x65c4C0517025Ec0843C9146aF266A2C5a2D148A2"; const mviAddress = "0x72e364f2abdc788b7e918bc238b21f109cd634d7"; const cgiAddress = "0xada0a1202462085999652dc5310a7a9e2bf3ed42"; const btcFliAddress = "0x0b498ff89709d3838a063f1dfa463091f9801c2b"; +const btc2x = "0xD2AC55cA3Bbd2Dd1e9936eC640dCb4b745fDe759"; const bedAddress = "0x2aF1dF3AB0ab157e1E2Ad8F88A7D04fbea0c7dc6"; const dataAddress = "0x33d63Ba1E57E54779F7dDAeaA7109349344cf5F1"; const gmiAddress = "0x47110d43175f7f2c2425e7d15792acc5817eb44f"; @@ -17,10 +19,10 @@ const USDC = ADDRESSES.ethereum.USDC const gtcETH = '0x36c833Eed0D376f75D1ff9dFDeE260191336065e' const sets = [ dpiAddress, - ethFliAddress, + eth2x, + btc2x, mviAddress, cgiAddress, - btcFliAddress, bedAddress, dataAddress, gmiAddress, From 1ba6ddd7f8066471e086fe61288f1844f58dde8c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 16:59:49 +0100 Subject: [PATCH 153/168] Add new tokens to the list --- projects/indexcoop/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/indexcoop/index.js b/projects/indexcoop/index.js index 3907cff413a4..587c515ddd62 100644 --- a/projects/indexcoop/index.js +++ b/projects/indexcoop/index.js @@ -36,6 +36,8 @@ async function tvl(timestamp, block, _, { api }) { const toa = [] sets.forEach((o, i) => toa.push([tokens[i], o])) toa.push([[aaveDebtToken], icethAddress]) + toa.push([['0x72e95b8931767c79ba4eee721354d6e99a61d004'], eth2x]) + toa.push([['0x72E95b8931767C79bA4EeE721354d6E99a61D004'], btc2x]) const balances = await sumTokens2({ api, ownerTokens: toa, blacklistedTokens: sets }) const usdcDebt = await api. multiCall({abi:"function borrowBalanceStored(address account) view returns (uint256)", target: "0x39aa39c021dfbae8fac545936693ac917d5e7563", calls:[ethFliAddress, btcFliAddress]}) usdcDebt.forEach(i => sdk.util.sumSingleBalance(balances,USDC,i * -1, api.chain)) From f0b18d80e3ac840d5675c277954ba133d330da91 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 17:12:34 +0100 Subject: [PATCH 154/168] pangolin: disable hedera --- projects/pangolin/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/pangolin/index.js b/projects/pangolin/index.js index bee01ff67d2f..0a3bde87a92c 100644 --- a/projects/pangolin/index.js +++ b/projects/pangolin/index.js @@ -46,6 +46,7 @@ module.exports = { }, hedera: { tvl: async () => { + return {} const block = await getCurrentBlock() const data = await graphQuery('https://graph-hedera-main.pangolin.network/subgraphs/name/pangolin', `{ pangolinFactory(id: "1" block: { number: ${block - 1000} }) { From 9cb20bb536ad3f2ca15d7ea27a8a615b70689ab3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vuka=C5=A1in=20Manojlovi=C4=87?= Date: Wed, 13 Mar 2024 20:40:42 +0100 Subject: [PATCH 155/168] Add Nostra Staked STRK (#9332) * Add Nostra Staked STRK * Update STARKNET_RPC URL in starknet.js --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/chain/starknet.js | 3 ++- projects/helper/env.js | 1 + projects/nostra-staked-strk/abi.js | 20 ++++++++++++++++++++ projects/nostra-staked-strk/index.js | 24 ++++++++++++++++++++++++ projects/nostra/index.js | 6 ++++++ 5 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 projects/nostra-staked-strk/abi.js create mode 100644 projects/nostra-staked-strk/index.js diff --git a/projects/helper/chain/starknet.js b/projects/helper/chain/starknet.js index 7082821298b3..436c5cb12217 100644 --- a/projects/helper/chain/starknet.js +++ b/projects/helper/chain/starknet.js @@ -9,11 +9,12 @@ const plimit = require('p-limit') const { sliceIntoChunks, sleep } = require('../utils') const { getUniTVL } = require('../cache/uniswap') const { getCache } = require('../cache') +const { getEnv } = require('../env') const _rateLimited = plimit(1) const rateLimited = fn => (...args) => _rateLimited(() => fn(...args)) -const STARKNET_RPC = 'https://starknet-mainnet.public.blastapi.io' +const STARKNET_RPC = getEnv('STARKNET_RPC') function formCallBody({ abi, target, params = [], allAbi = [] }, id = 0) { if ((params || params === 0) && !Array.isArray(params)) diff --git a/projects/helper/env.js b/projects/helper/env.js index 08dcf6129743..334d3c95012f 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -4,6 +4,7 @@ const BOOL_KEYS = [ ] 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', APTOS_RPC: 'https://aptos-mainnet.pontem.network', diff --git a/projects/nostra-staked-strk/abi.js b/projects/nostra-staked-strk/abi.js new file mode 100644 index 000000000000..e75d6939fa94 --- /dev/null +++ b/projects/nostra-staked-strk/abi.js @@ -0,0 +1,20 @@ +const stakedStrk = [ + { + name: "total_assets", + type: "function", + inputs: [], + outputs: [ + { + type: "core::integer::u256", + }, + ], + state_mutability: "view", + }, +]; + +const stakedStrkAbi = {}; +stakedStrk.forEach((i) => (stakedStrkAbi[i.name] = i)); + +module.exports = { + stakedStrkAbi, +}; diff --git a/projects/nostra-staked-strk/index.js b/projects/nostra-staked-strk/index.js new file mode 100644 index 000000000000..502505ebf201 --- /dev/null +++ b/projects/nostra-staked-strk/index.js @@ -0,0 +1,24 @@ +const { call } = require("../helper/chain/starknet"); +const { stakedStrkAbi } = require("./abi"); + +const STAKED_STRK = + "0x04619e9ce4109590219c5263787050726be63382148538f3f936c22aa87d2fc2"; +const STRK = + "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"; + +async function tvl(_, _1, _2, { api }) { + const totalAssets = await call({ + target: STAKED_STRK, + abi: stakedStrkAbi.total_assets, + }); + api.addToken(STRK, totalAssets); +} + +module.exports = { + methodology: + "The TVL is calculated as a sum of total STRK deposited into the staking contract.", + starknet: { + tvl, + }, + hallmarks: [[1710349200, "Nostra Staked STRK launch"]], +}; diff --git a/projects/nostra/index.js b/projects/nostra/index.js index e7df5965930a..0144e1a17a46 100644 --- a/projects/nostra/index.js +++ b/projects/nostra/index.js @@ -42,6 +42,11 @@ const supplyTokens = [ "0x40f5a6b7a6d3c472c12ca31ae6250b462c6d35bbdae17bd52f6c6ca065e30cf", "0x26c5994c2462770bbf940552c5824fb0e0920e2a8a5ce1180042da1b3e489db", "0x7c2e1e733f28daa23e78be3a4f6c724c0ab06af65f6a95b5e0545215f1abc1b", + // nstSTRK + "0x4b11c750ae92c13fdcbe514f9c47ba6f8266c81014501baa8346d3b8ba55342", + "0x0142af5b6c97f02cac9c91be1ea9895d855c5842825cb2180673796e54d73dc5", + "0x78a40c85846e3303bf7982289ca7def68297d4b609d5f588208ac553cff3a18", + "0x67a34ff63ec38d0ccb2817c6d3f01e8b0c4792c77845feb43571092dcf5ebb5", ]; const debtTokens = [ "0x0491480f21299223b9ce770f23a2c383437f9fbf57abc2ac952e9af8cdb12c97", @@ -52,6 +57,7 @@ const debtTokens = [ "0x348cc417fc877a7868a66510e8e0d0f3f351f5e6b0886a86b652fcb30a3d1fb", "0x35778d24792bbebcf7651146896df5f787641af9e2a3db06480a637fbc9fff8", "0x1258eae3eae5002125bebf062d611a772e8aea3a1879b64a19f363ebd00947", + "0x292be6baee291a148006db984f200dbdb34b12fb2136c70bfe88649c12d934b", ]; function* chunks(arr, n) { From 5b9981743c568d022aab2a04af44d8781adab8f3 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Wed, 13 Mar 2024 21:22:16 +0100 Subject: [PATCH 156/168] Add blacklisted tokens to sumTokens2 function --- projects/polygon/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/polygon/index.js b/projects/polygon/index.js index 871ea9740400..90168975dadd 100644 --- a/projects/polygon/index.js +++ b/projects/polygon/index.js @@ -86,7 +86,7 @@ async function tvl(_, block, _c) { }) toa.push([maticToken, plasmaDepositManager]) toa.push([maticToken, stakeManager]) - return sumTokens2({ block, tokensAndOwners: toa }) + return sumTokens2({ block, tokensAndOwners: toa, blacklistedTokens: ['0x99fe3b1391503a1bc1788051347a1324bff41452'] }) } module.exports = { From d710dbea6fbd572fdfdf9556a07468c06a10d107 Mon Sep 17 00:00:00 2001 From: Sahitya77 <77379621+Sahitya777@users.noreply.github.com> Date: Thu, 14 Mar 2024 12:54:32 +0530 Subject: [PATCH 157/168] Updated index.js (#9341) --- projects/hashstack/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/hashstack/index.js b/projects/hashstack/index.js index 82fed28e8161..94fe6ec068b1 100644 --- a/projects/hashstack/index.js +++ b/projects/hashstack/index.js @@ -6,7 +6,8 @@ const supplyTokens = [ "0x436d8d078de345c11493bd91512eae60cd2713e05bcaa0bb9f0cba90358c6e", "0x5fa6cc6185eab4b0264a4134e2d4e74be11205351c7c91196cb27d5d97f8d21", "0x3bcecd40212e9b91d92bbe25bb3643ad93f0d230d93237c675f46fac5187e8c", - "0x19c981ec23aa9cbac1cc1eb7f92cf09ea2816db9cbd932e251c86a2e8fb725f" + "0x19c981ec23aa9cbac1cc1eb7f92cf09ea2816db9cbd932e251c86a2e8fb725f", + "0x7514ee6fa12f300ce293c60d60ecce0704314defdb137301dae78a7e5abbdd7" ] const debtTokens = [ @@ -14,7 +15,8 @@ const debtTokens = [ "0x1ef7f9f8bf01678dc6d27e2c26fb7e8eac3812a24752e6a1d6a49d153bec9f3", "0x12b8185e237dd0340340faeb3351dbe53f8a42f5a9bf974ddf90ced56e301c7", "0x21d8d8519f5464ec63c6b9a80a5229c5ddeed57ecded4c8a9dfc34e31b49990", - "0x7eeed99c095f83716e465e2c52a3ec8f47b323041ddc4f97778ac0393b7f358" + "0x7eeed99c095f83716e465e2c52a3ec8f47b323041ddc4f97778ac0393b7f358", + "0x1bdbaaa456c7d6bbba9ff740af3cfcd40bec0e85cd5cefc3fbb05a552fd14df" ] async function tvl(_, _1, _2, { api }) { From 1499243fe2bc77f442126c50c5bef5516f1d3020 Mon Sep 17 00:00:00 2001 From: Nova <127639799+BuzzSeagull@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:27:29 +0800 Subject: [PATCH 158/168] upgrade counting methond to v3 in u235 (#9339) --- projects/u235/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/u235/index.js b/projects/u235/index.js index a909f9abf707..9f7271c20cec 100644 --- a/projects/u235/index.js +++ b/projects/u235/index.js @@ -3,5 +3,5 @@ const methodologies = require('../helper/methodologies'); module.exports = { methodology: methodologies.lendingMarket, - scroll: aaveExports('scroll', undefined, undefined, ['0xeB3C203418f0cb55b351C3E45A5C4f47bE5DA77A']), + scroll: aaveExports('scroll', "0xE58Ebf93885c8Ea0368fCe84aF79EC983b80c8D5", undefined, ['0xeB3C203418f0cb55b351C3E45A5C4f47bE5DA77A'], { v3: true }), } \ No newline at end of file From 99f6e46cd73da1d3568e44c273472f13a7c9f0b7 Mon Sep 17 00:00:00 2001 From: Wayne Kuo <95527849+WayneAl@users.noreply.github.com> Date: Thu, 14 Mar 2024 15:31:00 +0800 Subject: [PATCH 159/168] trans MFUD to FUD (#9340) --- projects/typus-finance/index.js | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/projects/typus-finance/index.js b/projects/typus-finance/index.js index 4852ccf55f8d..6da24de79ae7 100644 --- a/projects/typus-finance/index.js +++ b/projects/typus-finance/index.js @@ -1,7 +1,7 @@ const sui = require("../helper/chain/sui"); -const SINGLE_DEPOSIT_VAULT_REGISTRY = - "0xd67cf93a0df61b4b3bbf6170511e0b28b21578d9b87a8f4adafec96322dd284d"; +const SINGLE_DEPOSIT_VAULT_REGISTRY = "0xd67cf93a0df61b4b3bbf6170511e0b28b21578d9b87a8f4adafec96322dd284d"; +const fud_token = "0x76cb819b01abed502bee8a702b4c2d547532c12f25001c9dea795a5e631c26f1::fud::FUD"; async function tvl(timestamp, block, chainBlocks, { api }) { const depositVaultFields = await sui.getDynamicFieldObjects({ @@ -14,11 +14,22 @@ async function tvl(timestamp, block, chainBlocks, { api }) { depositVaults.forEach(({ fields }) => { const deposit_token = "0x" + fields.deposit_token.fields.name; const bid_token = "0x" + fields.bid_token.fields.name; - api.add(deposit_token, fields.active_share_supply); - api.add(deposit_token, fields.deactivating_share_supply); - api.add(deposit_token, fields.inactive_share_supply); - api.add(deposit_token, fields.warmup_share_supply); - api.add(bid_token, fields.premium_share_supply); + if (deposit_token.endsWith("MFUD")) { + api.add(fud_token, Number(fields.active_share_supply) * 10 ** 5); + api.add(fud_token, Number(fields.deactivating_share_supply) * 10 ** 5); + api.add(fud_token, Number(fields.inactive_share_supply) * 10 ** 5); + api.add(fud_token, Number(fields.warmup_share_supply) * 10 ** 5); + } else { + api.add(deposit_token, fields.active_share_supply); + api.add(deposit_token, fields.deactivating_share_supply); + api.add(deposit_token, fields.inactive_share_supply); + api.add(deposit_token, fields.warmup_share_supply); + } + if (bid_token.endsWith("MFUD")) { + api.add(fud_token, Number(fields.premium_share_supply) * 10 ** 5); + } else { + api.add(bid_token, fields.premium_share_supply); + } }); } From 34b3f350211d4a838a80b7a6225b443e618ad8d1 Mon Sep 17 00:00:00 2001 From: hmMachghoul <97662562+hmMachghoul@users.noreply.github.com> Date: Thu, 14 Mar 2024 08:33:03 +0100 Subject: [PATCH 160/168] add Opulous OVault TVL (#9335) * add Opulous OVault TVL * mark lent assets as borrowed * update Algo pools for Opulous --------- Co-authored-by: hmMachghoul Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/opulous/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/opulous/index.js b/projects/opulous/index.js index 41c3280c4f75..ce5667a8cfb6 100644 --- a/projects/opulous/index.js +++ b/projects/opulous/index.js @@ -2,7 +2,7 @@ const { lookupApplications } = require("../helper/chain/algorand"); async function algorandStaking() { - const poolIds = [843061415, 1127413236, 1020347200]; + const poolIds = [843061415, 1127413236, 1020347200,929851093]; let totalPoolAmount = 0; for (const poolId of poolIds) { From 6bf6bd8af19ee979ebca9c0a9f004a2cb415b53b Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:37:23 +0100 Subject: [PATCH 161/168] Update methodologies in project files --- projects/aave/index.js | 3 ++- projects/aave/v3.js | 3 ++- projects/agave.js | 5 +++-- projects/agora/index.js | 24 ++++++------------------ projects/apeswap-lending/index.js | 3 ++- projects/augmented-finance/index.js | 3 ++- projects/benddao/index.js | 5 ++--- projects/blizzfinance/index.js | 3 ++- projects/deepr-finance/index.js | 4 ++-- projects/exactly/index.js | 4 ++-- projects/geist/index.js | 4 ++-- projects/goledo/index.js | 4 ++-- projects/helper/aave.js | 4 +++- projects/helper/compound.js | 3 +++ projects/kinza/index.js | 4 ++-- projects/klap/index.js | 4 ++-- projects/knightswap-lending/index.js | 3 ++- projects/lava/index.js | 5 +++-- projects/monolend/index.js | 4 ++-- projects/omniprotocol/index.js | 4 ++-- projects/opensky/index.js | 5 +++-- projects/pangolin/index.js | 4 ++-- projects/paperdao/index.js | 8 ++++---- projects/phiat/index.js | 5 ++--- projects/planet-green/index.js | 9 ++++----- projects/qubit/index.js | 4 ++-- projects/radiant-v2/index.js | 5 ++--- projects/radiant/index.js | 5 ++--- projects/realtmarkets/index.js | 5 ++--- projects/realtoken-rmm-v3/index.js | 4 ++-- projects/sculptor-finance/index.js | 5 ++--- projects/seamless/index.js | 3 ++- projects/shoebillFinance/index.js | 4 ++-- projects/sio2/index.js | 5 ++--- projects/starlay/index.js | 4 ++-- projects/sturdy/index.js | 8 ++++---- projects/tonpound.js | 4 ++-- projects/toreus/index.js | 5 ++--- projects/tropykus-zkevm/index.js | 4 ++-- projects/union-finance/index.js | 6 +++--- projects/unlockd/index.js | 3 ++- projects/uwulend/index.js | 5 ++--- projects/valas/index.js | 5 ++--- projects/vee-finance/index.js | 6 +++--- projects/vires/index.js | 3 ++- projects/wanlend/index.js | 4 ++-- projects/xcarnival/index.js | 4 ++-- 47 files changed, 111 insertions(+), 117 deletions(-) diff --git a/projects/aave/index.js b/projects/aave/index.js index aaad00a8671d..ce351ed5ee45 100644 --- a/projects/aave/index.js +++ b/projects/aave/index.js @@ -4,6 +4,7 @@ const { getV2Reserves, getTvl, getBorrowed, aaveChainTvl } = require('../helper/ const { staking } = require('../helper/staking'); const { ammMarket } = require('./amm'); const { unwrapBalancerToken } = require('../helper/unwrapLPs'); +const methodologies = require('../helper/methodologies'); const addressesProviderRegistryETH = "0x52D306e36E3B6B02c153d0266ff0f85d18BCD413"; @@ -49,7 +50,7 @@ function v2(chain, v2Registry){ module.exports = { timetravel: true, - 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`, + methodology: methodologies.lendingMarket, ethereum: { staking: staking(aaveStakingContract, aaveTokenAddress), pool2: stakingBalancerTvl, diff --git a/projects/aave/v3.js b/projects/aave/v3.js index d07e380324f9..a515119da1e0 100644 --- a/projects/aave/v3.js +++ b/projects/aave/v3.js @@ -1,4 +1,5 @@ const { aaveChainTvl } = require('../helper/aave'); +const methodologies = require('../helper/methodologies'); const v3params = ["0x770ef9f4fe897e59daCc474EF11238303F9552b6", undefined, ["0x69FA688f1Dc47d4B5d8029D5a35FB7a548310654"]] @@ -24,7 +25,7 @@ function v3(chain) { } 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`, + methodology: methodologies.lendingMarket, avax: v3("avax"), ...["optimism", "fantom", "harmony", "arbitrum", "polygon", "ethereum", "metis", "base", "xdai", "scroll", "bsc"].reduce((t, c) => ({ ...t, [c]: v3(c) }), {}), hallmarks: [ diff --git a/projects/agave.js b/projects/agave.js index 50b367f9ecc7..d3a43b188398 100644 --- a/projects/agave.js +++ b/projects/agave.js @@ -1,6 +1,7 @@ const { staking } = require("./helper/staking.js"); const { aaveChainTvl } = require('./helper/aave.js'); -const sdk = require('@defillama/sdk') +const sdk = require('@defillama/sdk'); +const methodologies = require("./helper/methodologies.js"); // Staking TVLs const agaveTokenAddress = '0x3a97704a1b25F08aa230ae53B352e2e72ef52843' @@ -22,7 +23,7 @@ module.exports = { hallmarks: [ [1647302400, "Reentrancy attack"] ], - 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`, + methodology: methodologies.lendingMarket, xdai: { tvl: sdk.util.sumChainTvls([ aaveChainTvl("xdai", addressesProviderRegistryXDAI, addr => `xdai:${addr}`, [protocolDataHelper], false), diff --git a/projects/agora/index.js b/projects/agora/index.js index aef9b34a536b..60c8624464af 100644 --- a/projects/agora/index.js +++ b/projects/agora/index.js @@ -1,31 +1,20 @@ const ADDRESSES = require('../helper/coreAssets.json') const sdk = require("@defillama/sdk"); -const { compoundExports } = require("../helper/compound"); +const { compoundExports, methodology, } = require("../helper/compound"); const { getUniTVL } = require('../helper/unknownTokens') const factory = '0x3c4063B964B1b3bF229315fCc4df61a694B0aE84' const metis = ADDRESSES.metis.Metis const agora = '0x0Ed0Ca6872073E02cd3aE005BaF04bA43BE947fA' -const whitelist = [ - agora, // AGORA - ADDRESSES.metis.m_USDC, // USDC - ADDRESSES.metis.m_USDT, // USDT - ADDRESSES.metis.WETH, // WETH - '0x94e56c0c59433599ba857a9a7243b2826745cf91', //kWBTC - '0x6d11f074131e3fc61c983cce538f5d0ca3553c0f', //kUSDC - '0xcfd482dce13ca1d27834d381af1b570e9e6c6810', //kmetis - '0x2e9347dda00b3ec1b188963b590ca1ecbd73145a', //kweth -] - -const { tvl: agoraTvl, borrowed: agoraBorrowed } = compoundExports( +const { tvl: agoraTvl, } = compoundExports( "0x3fe29D7412aCDade27e21f55a65a7ddcCE23d9B3", "metis", "0xcFd482DcE13cA1d27834D381AF1b570E9E6C6810", metis, ); -const { tvl: agoraPlusTvl, borrowed: agoraPlusBorrowed } = compoundExports( +const { tvl: agoraPlusTvl, } = compoundExports( "0x92DcecEaF4c0fDA373899FEea00032E8E8Da58Da", "metis", "0xE85A1ae1A2A21135c49ADEd398D3FD5Ed032B28e", @@ -34,7 +23,7 @@ const { tvl: agoraPlusTvl, borrowed: agoraPlusBorrowed } = compoundExports( symbol => symbol.indexOf('appuffNetswap') > -1 ); -const { tvl: agoraStakeTvl, borrowed: agoraStakeBorrowed } = compoundExports( +const { tvl: agoraStakeTvl, } = compoundExports( "0xb36DF0773AbD23081516F54f9dbB9a99Ec27dbB0", "metis", "0xc3034143816398d37Ec9447c9CA17c407e96Dc12", @@ -42,7 +31,7 @@ const { tvl: agoraStakeTvl, borrowed: agoraStakeBorrowed } = compoundExports( undefined, ); -const { tvl: agoraFarmTvl, borrowed: agoraFarmBorrowed } = compoundExports( +const { tvl: agoraFarmTvl, } = compoundExports( "0xEC1A06f320E6e295Ab6892BB4e0f9e29c712F11F", "metis", "0x13Cb104a1D94A89a260b27DfAAB07C862da622E5", @@ -56,9 +45,8 @@ module.exports = { hallmarks: [ [1649376000, "STARS collateral Exploit"] ], - incentivized: true, + methodology, misrepresentedTokens: true, - methodology: `As in Compound Finance, TVL counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield. Borrowed coins are counted as "Borrowed" TVL and can be toggled towards the regular TVL.`, metis: { tvl: sdk.util.sumChainTvls([chainTvl, agoraTvl, agoraPlusTvl, agoraFarmTvl, agoraStakeTvl]), borrowed: ()=>({}), diff --git a/projects/apeswap-lending/index.js b/projects/apeswap-lending/index.js index de0d05409f0c..93852f88a41c 100644 --- a/projects/apeswap-lending/index.js +++ b/projects/apeswap-lending/index.js @@ -1,4 +1,5 @@ const {usdCompoundExports} = require('../helper/compound'); +const methodologies = require('../helper/methodologies'); const unitroller_bsc = "0xad48b2c9dc6709a560018c678e918253a65df86e" @@ -18,5 +19,5 @@ module.exports = { tvl: lendingMarket.tvl, borrowed: lendingMarket.borrowed }, - 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.. TVL is calculated by getting the market addresses from comptroller and calling the getCash() on-chain method to get the amount of tokens locked in each of these addresses, then we get the price of each token from coingecko. To view the Borrowed amounts along with the currently liquidity, click the 'Borrowed' check box", + methodology: methodologies.lendingMarket, } \ No newline at end of file diff --git a/projects/augmented-finance/index.js b/projects/augmented-finance/index.js index 7f335b378421..d98cb1356d98 100644 --- a/projects/augmented-finance/index.js +++ b/projects/augmented-finance/index.js @@ -1,3 +1,4 @@ +const methodologies = require("../helper/methodologies"); const config = { ethereum: '0x9276635Ec39C72866f3cF70298eFe501EB5dcDf1', @@ -7,7 +8,7 @@ const config = { } 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.", + methodology: methodologies.lendingMarket, // deadFrom: 2024-02-22 }; diff --git a/projects/benddao/index.js b/projects/benddao/index.js index 2908f6496988..75b1913f6683 100644 --- a/projects/benddao/index.js +++ b/projects/benddao/index.js @@ -1,11 +1,10 @@ -const sdk = require("@defillama/sdk"); const { staking } = require("../helper/staking"); const { tvl, borrowed } = require("./helper/index"); const address = require("./helper/address"); +const methodologies = require("../helper/methodologies"); module.exports = { - timetravel: true, - 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`, + methodology: methodologies.lendingMarket, ethereum: { tvl, borrowed, diff --git a/projects/blizzfinance/index.js b/projects/blizzfinance/index.js index 2f8a9e59043f..420e6e7bf6a4 100644 --- a/projects/blizzfinance/index.js +++ b/projects/blizzfinance/index.js @@ -1,8 +1,9 @@ const { aaveExports } = require('../helper/aave') +const methodologies = require('../helper/methodologies') module.exports={ timetravel: true, - 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", + methodology: methodologies.lendingMarket, avax:{ tvl: aaveExports("avax", "0xfF50b540c9152F1841edF47b49dA69696Be59783").tvl, borrowed: ()=>({}) // hacked, it's all bad debt diff --git a/projects/deepr-finance/index.js b/projects/deepr-finance/index.js index 5271245ab673..b252e40e0b5b 100644 --- a/projects/deepr-finance/index.js +++ b/projects/deepr-finance/index.js @@ -1,6 +1,6 @@ -const { compoundExports2 } = require('../helper/compound'); +const { compoundExports2, methodology, } = require('../helper/compound'); module.exports = { shimmer_evm: compoundExports2({ comptroller: '0xF7E452A8685D57083Edf4e4CC8064EcDcF71D7B7', }), - 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.", + methodology, } \ No newline at end of file diff --git a/projects/exactly/index.js b/projects/exactly/index.js index e03d76c5ae7d..08afe5d89402 100644 --- a/projects/exactly/index.js +++ b/projects/exactly/index.js @@ -1,8 +1,8 @@ const sdk = require("@defillama/sdk"); +const methodologies = require("../helper/methodologies"); 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 are multiple reasons behind this but one of the main ones is to avoid inflating the TVL through cycled lending.", + methodology: methodologies.lendingMarket, }; /** @type {Record} */ diff --git a/projects/geist/index.js b/projects/geist/index.js index 412fc9f4e11a..9258983a75ee 100644 --- a/projects/geist/index.js +++ b/projects/geist/index.js @@ -1,6 +1,7 @@ const { staking } = require("../helper/staking"); const { pool2 } = require("../helper/pool2"); const { aaveChainTvl } = require("../helper/aave"); +const methodologies = require("../helper/methodologies"); const stakingContract = "0x49c93a95dbcc9A6A4D8f77E59c038ce5020e82f8"; const GEIST = "0xd8321aa83fb0a4ecd6348d4577431310a6e0814d"; @@ -23,8 +24,7 @@ function lending(borrowed) { module.exports = { timetravel: true, - 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", + methodology: methodologies.lendingMarket, fantom: { tvl: lending(false), borrowed: lending(true), diff --git a/projects/goledo/index.js b/projects/goledo/index.js index b623c146a49e..a3db0f4a2c4d 100644 --- a/projects/goledo/index.js +++ b/projects/goledo/index.js @@ -1,4 +1,5 @@ const { aaveV2Export } = require('../helper/aave'); +const methodologies = require('../helper/methodologies'); const { staking } = require('../helper/unknownTokens') const stakingContract = "0x7d236c0486c9579507C67B36d175990CAb5100fC"; @@ -9,8 +10,7 @@ const stakedToken_WrappedCurrency_spLP = "0x93D4Be3C0B11fe52818cD96A5686Db1E21D7 const lendingpool = "0x9aeba63d77d25c95dadd057db74741517862f360"; 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.. TVL is calculated by getting the market addresses from comptroller and calling the getCash() on-chain method to get the amount of tokens locked in each of these addresses, then we get the price of each token from coingecko. To view the Borrowed amounts along with the currently liquidity, click the 'Borrowed' check box`, + methodology: methodologies.lendingMarket, conflux: { ...aaveV2Export(lendingpool), staking: staking({ owner: stakingContract, tokens: [stakedToken], lps: [stakedToken_WrappedCurrency_spLP], useDefaultCoreAssets: true, }), diff --git a/projects/helper/aave.js b/projects/helper/aave.js index 04d96b1c2816..e9fc466f7641 100644 --- a/projects/helper/aave.js +++ b/projects/helper/aave.js @@ -4,7 +4,8 @@ const sdk = require('@defillama/sdk'); const { default: BigNumber } = require('bignumber.js'); const abi = require('./abis/aave.json'); const { getChainTransform, getFixBalancesSync, } = require('../helper/portedTokens') -const { sumTokens2 } = require('../helper/unwrapLPs') +const { sumTokens2 } = require('../helper/unwrapLPs'); +const methodologies = require('./methodologies'); async function getV2Reserves(block, addressesProviderRegistry, chain, dataHelperAddress, abis = {}) { let validProtocolDataHelpers @@ -132,6 +133,7 @@ function aaveExports(chain, addressesProviderRegistry, transform = undefined, da } module.exports = { + methodology: methodologies.lendingMarket, aaveChainTvl, getV2Reserves, getTvl, diff --git a/projects/helper/compound.js b/projects/helper/compound.js index 5c41e120fbcb..976bd5871638 100644 --- a/projects/helper/compound.js +++ b/projects/helper/compound.js @@ -8,6 +8,8 @@ const { getChainTransform, transformBalances } = require('./portedTokens'); const { usdtAddress } = require('./balances'); const agoraAbi = require("./../agora/abi.json"); const { sumTokens2, nullAddress, unwrapLPsAuto, } = require('./unwrapLPs') +const methodologies = require('./methodologies'); + // ask comptroller for all markets array async function getAllCTokens(comptroller, block, chain, allMarketsAbi = abi['getAllMarkets']) { return (await sdk.api.abi.call({ @@ -330,6 +332,7 @@ function compoundExports2({ comptroller, chain, cether, cetheEquivalent = nullAd } module.exports = { + methodology: methodologies.lendingMarket, getCompoundV2Tvl, compoundExports, compoundExports2, diff --git a/projects/kinza/index.js b/projects/kinza/index.js index d80991fbfa7b..bb3d496bbb1c 100644 --- a/projects/kinza/index.js +++ b/projects/kinza/index.js @@ -1,8 +1,8 @@ const { aaveExports } = require("../helper/aave"); +const methodologies = require("../helper/methodologies"); 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", + methodology: methodologies.lendingMarket, bsc: aaveExports('bsc', '0x37D7Eb561E189895E5c8601Cd03EEAB67C269189', undefined, ['0x09ddc4ae826601b0f9671b9edffdf75e7e6f5d61'], { v3: true, }), op_bnb: aaveExports('op_bnb', '0x37D7Eb561E189895E5c8601Cd03EEAB67C269189', undefined, ['0xBb5f2d30c0fC9B0f71f7B19DaF19e7Cf3D23eb5E'], { v3: true, }), }; diff --git a/projects/klap/index.js b/projects/klap/index.js index 07c27607cabd..6cec8bd3c3ca 100644 --- a/projects/klap/index.js +++ b/projects/klap/index.js @@ -1,8 +1,8 @@ const { aaveExports } = require("../helper/aave"); +const methodologies = require("../helper/methodologies"); module.exports = { timetravel: true, - 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", + methodology: methodologies.lendingMarket, klaytn: aaveExports('klaytn', '0x969E4A05c2F3F3029048e7943274eC2E762497AB'), } diff --git a/projects/knightswap-lending/index.js b/projects/knightswap-lending/index.js index c6412cd55279..1cffb381a69c 100644 --- a/projects/knightswap-lending/index.js +++ b/projects/knightswap-lending/index.js @@ -1,8 +1,9 @@ const {compoundExports2} = require('../helper/compound'); +const methodologies = require('../helper/methodologies'); const unitroller_bsc = "0x4f92913b86d5e79593fa2e475a8232b22ef17ed1" module.exports = { bsc:compoundExports2({ comptroller: unitroller_bsc}), - 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.. TVL is calculated by getting the market addresses from comptroller and calling the getCash() on-chain method to get the amount of tokens locked in each of these addresses, then we get the price of each token from coingecko. To view the Borrowed amounts along with the currently liquidity, click the 'Borrowed' check box", + methodology: methodologies.lendingMarket, } \ No newline at end of file diff --git a/projects/lava/index.js b/projects/lava/index.js index 4b1974e0ce90..c34c21003c82 100644 --- a/projects/lava/index.js +++ b/projects/lava/index.js @@ -1,3 +1,5 @@ +const methodologies = require("../helper/methodologies"); + const DATA_PROVIDER_ADDRESS = { arbitrum: "0x8CfA3a5105e87e6e5568b80F64d05eD5fc53F0a9", base: "0x22d6Ab83EEe06B7EE815420a7F2e737D64E534ef", @@ -85,8 +87,7 @@ function getMetrics() { } module.exports = { - methodology: - "Counts the tokens locked in the contracts to be used as collateral to borrow or to earn lending interest. Tokens also include various wrapped liquidity positions, the tokens comprising these positions are counted as well. Borrowed tokens are not counted towards the TVL, so only the tokens actually locked in the contracts are counted. The main reason for this is to avoid inflating the TVL through cycled lending.", + methodology: methodologies.lendingMarket, arbitrum: getMetrics(), base: getMetrics(), }; diff --git a/projects/monolend/index.js b/projects/monolend/index.js index c38eb994ab69..0e6b0815f55b 100644 --- a/projects/monolend/index.js +++ b/projects/monolend/index.js @@ -1,6 +1,6 @@ -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology, } = require("../helper/aave"); 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 are multiple reasons behind this but one of the main ones is to avoid inflating the TVL through cycled lending.", + methodology, polygon: aaveExports('polygon', '0x49Ce0308F3F55955D224453aECe7610b6983c123'), }; diff --git a/projects/omniprotocol/index.js b/projects/omniprotocol/index.js index 617e207341a8..8ba29232f9a3 100644 --- a/projects/omniprotocol/index.js +++ b/projects/omniprotocol/index.js @@ -1,12 +1,12 @@ const abi = require("./omni.json"); -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology, } = require("../helper/aave"); const validProtocolDataHelper = "0x8AAc97e25c79195aC77817287Cf512b0Acc9da44"; const omniOracle = "0x08Eaf1C8c270a485DD9c8aebb2EDE3FcAe72e04f"; module.exports = { misrepresentedTokens: true, - methodology: `Counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield. NFT's are counted as their floor price for both collateral and debt. 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`, + methodology, ethereum: aaveExports('ethereum', undefined, undefined, [validProtocolDataHelper], { oracle: omniOracle, abis: { getAllATokens: abi.getAllOTokens, diff --git a/projects/opensky/index.js b/projects/opensky/index.js index 1466f2914a41..1bc3cc2f21d4 100644 --- a/projects/opensky/index.js +++ b/projects/opensky/index.js @@ -1,4 +1,5 @@ -const { getLogs } = require('../helper/cache/getLogs') +const { getLogs } = require('../helper/cache/getLogs'); +const methodologies = require('../helper/methodologies'); const { sumTokens2 } = require('../helper/unwrapLPs') const sdk = require('@defillama/sdk') @@ -39,7 +40,7 @@ async function borrowed(timestamp, block, chainBlocks, { api }) { } 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`, + methodology: methodologies.lendingMarket, ethereum: { tvl, borrowed, diff --git a/projects/pangolin/index.js b/projects/pangolin/index.js index 0a3bde87a92c..f5de076000cf 100644 --- a/projects/pangolin/index.js +++ b/projects/pangolin/index.js @@ -47,13 +47,13 @@ module.exports = { hedera: { tvl: async () => { return {} - const block = await getCurrentBlock() + /* const block = await getCurrentBlock() const data = await graphQuery('https://graph-hedera-main.pangolin.network/subgraphs/name/pangolin', `{ pangolinFactory(id: "1" block: { number: ${block - 1000} }) { totalLiquidityUSD } }`) - return toUSDTBalances(data.pangolinFactory.totalLiquidityUSD) + return toUSDTBalances(data.pangolinFactory.totalLiquidityUSD) */ } }, start: 1612715300, // 7th-Feb-2021 diff --git a/projects/paperdao/index.js b/projects/paperdao/index.js index d70f520098f6..b3ef80894e35 100644 --- a/projects/paperdao/index.js +++ b/projects/paperdao/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { compoundExports } = require("../helper/compound"); +const { compoundExports, methodology, } = require("../helper/compound"); const blacklist = [ '0x4002a65e13f87C897B8018Fd7329af17339346ba', @@ -8,8 +8,8 @@ const blacklist = [ '0x1611Ac5e87aC082e016d60dB63eccb50F45B8b4e', '0x438DDA002CaDBe95F72b7b9acB1FEf4782418566', ]; - + module.exports = { - methodology: `As in Compound Finance, TVL counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield. Borrowed coins are counted as "Borrowed" TVL and can be toggled towards the regular TVL.`, - ethpow: compoundExports("0x5e496e7F241B13c514A78B7E840bc3cC744D7215", "ethpow", "0xb9e008f2C039fB994C8adD806F8aF709899aA95e", ADDRESSES.ethereum.WETH , undefined, undefined, {blacklistedTokens: blacklist}) + methodology, + ethpow: compoundExports("0x5e496e7F241B13c514A78B7E840bc3cC744D7215", "ethpow", "0xb9e008f2C039fB994C8adD806F8aF709899aA95e", ADDRESSES.ethereum.WETH, undefined, undefined, { blacklistedTokens: blacklist }) } \ No newline at end of file diff --git a/projects/phiat/index.js b/projects/phiat/index.js index 9c22cb0db669..3aff9055358e 100644 --- a/projects/phiat/index.js +++ b/projects/phiat/index.js @@ -1,5 +1,5 @@ const { staking } = require("../helper/staking"); -const { aaveChainTvl } = require("../helper/aave"); +const { aaveChainTvl, methodology, } = require("../helper/aave"); const stakingContract = "0xeAa92F835757a8B3fA4cbCA3Db9D2Ea342651D44"; @@ -22,8 +22,7 @@ function lending(borrowed) { module.exports = { timetravel: true, - 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", + methodology, pulse: { tvl: lending(false), borrowed: lending(true), diff --git a/projects/planet-green/index.js b/projects/planet-green/index.js index f798ee1ef5a9..a03e3671059a 100644 --- a/projects/planet-green/index.js +++ b/projects/planet-green/index.js @@ -1,7 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk"); -const { compoundExports } = require("../helper/compound"); -const { staking } = require("../helper/staking.js"); +const { compoundExports, methodology, } = require("../helper/compound"); const { mergeExports } = require("../helper/utils"); @@ -22,9 +20,10 @@ const compoundTVL2 = compoundExports( // node test.js projects/planet-green/index.js module.exports = mergeExports([ -{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.. TVL is calculated by getting the market addresses from comptroller and calling the getCash() on-chain method to get the amount of tokens locked in each of these addresses, then we get the price of each token from coingecko."}, { bsc: { tvl: compoundTVL1.tvl }, }, { bsc: compoundTVL2, }, -]); \ No newline at end of file +]); + +module.exports.methodology = methodology; \ No newline at end of file diff --git a/projects/qubit/index.js b/projects/qubit/index.js index 38a82bfc25fa..1fbbd87256b7 100644 --- a/projects/qubit/index.js +++ b/projects/qubit/index.js @@ -1,6 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const sdk = require("@defillama/sdk"); const abi = require("./abi.json"); +const methodologies = require('../helper/methodologies'); const qBnb = "0xbE1B5D17777565D67A5D2793f879aBF59Ae5D351"; // qBNB const wBnb = ADDRESSES.bsc.WBNB; //wBNB @@ -79,8 +80,7 @@ module.exports = { ], timetravel: true, doublecounted: false, - 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 are multiple reasons behind this but one of the main ones is to avoid inflating the TVL through cycled lending", + methodology: methodologies.lendingMarket, bsc: { tvl: tvl(false), //borrowed: tvl(true), // hacked diff --git a/projects/radiant-v2/index.js b/projects/radiant-v2/index.js index 6cba59aee5f1..fe7426a4f178 100644 --- a/projects/radiant-v2/index.js +++ b/projects/radiant-v2/index.js @@ -1,13 +1,12 @@ const { staking } = require("../helper/staking"); const { sumTokensExport } = require("../helper/unknownTokens"); -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology, } = require("../helper/aave"); module.exports = { hallmarks: [ [1704178500,"flash loan exploit"] ], - 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", + methodology, arbitrum: { ...aaveExports('arbitrum', '0x9D36DCe6c66E3c206526f5D7B3308fFF16c1aa5E'), // balancer pool is not unwrapped properly, so we use staking and rely on price api instead diff --git a/projects/radiant/index.js b/projects/radiant/index.js index f34f56249c3d..00463ae298f8 100644 --- a/projects/radiant/index.js +++ b/projects/radiant/index.js @@ -1,6 +1,6 @@ const { staking } = require("../helper/staking"); const { pool2 } = require("../helper/pool2"); -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology } = require("../helper/aave"); const stakingContract = "0xc2054A8C33bfce28De8aF4aF548C48915c455c13"; const RADIANT = "0x0C4681e6C0235179ec3D4F4fc4DF3d14FDD96017"; @@ -9,8 +9,7 @@ const stakingContractPool2 = "0xc963ef7d977ECb0Ab71d835C4cb1Bf737f28d010"; const RADIANT_WETH_sushiLP = "0x24704aFF49645D32655A76Df6d407E02d146dAfC"; 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", + methodology, arbitrum: { ...aaveExports('arbitrum', '0x7BB843f889e3a0B307299c3B65e089bFfe9c0bE0'), staking: staking(stakingContract, RADIANT, "arbitrum"), diff --git a/projects/realtmarkets/index.js b/projects/realtmarkets/index.js index a3f0b673fc77..4a82bff910c1 100644 --- a/projects/realtmarkets/index.js +++ b/projects/realtmarkets/index.js @@ -1,9 +1,8 @@ -const { aaveExports } = require('../helper/aave') +const { aaveExports, methodology, } = require('../helper/aave') module.exports={ - timetravel: true, misrepresentedTokens: true, - 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", + methodology: methodology, xdai: aaveExports('xdai', '0xae6933231Fb83257696E29B050cA6068D6E6Cc84', undefined, undefined, { oracle: '0x1a88d967936a73326562d2310062eCE226Ed6664', }), diff --git a/projects/realtoken-rmm-v3/index.js b/projects/realtoken-rmm-v3/index.js index c5563d5c7640..eda380666e8a 100644 --- a/projects/realtoken-rmm-v3/index.js +++ b/projects/realtoken-rmm-v3/index.js @@ -1,6 +1,6 @@ -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology } = require("../helper/aave"); 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`, + methodology, xdai: aaveExports('xdai', '0x11B45acC19656c6C52f93d8034912083AC7Dd756', undefined, ["0x11B45acC19656c6C52f93d8034912083AC7Dd756"],), }; diff --git a/projects/sculptor-finance/index.js b/projects/sculptor-finance/index.js index 5a3d12117fb3..ea87f2f98fe9 100644 --- a/projects/sculptor-finance/index.js +++ b/projects/sculptor-finance/index.js @@ -1,6 +1,6 @@ const { staking } = require("../helper/staking"); const { pool2 } = require("../helper/pool2"); -const { aaveChainTvl } = require("../helper/aave"); +const { aaveChainTvl, methodology } = require("../helper/aave"); const stakingContract = "0xd4F7F739488f5C9930A60e85afbE26a8B71BA795"; const SCULPT = "0xAd3E02e83b886543D1171FF446C130D52068C106"; @@ -23,8 +23,7 @@ function lending(borrowed) { module.exports = { timetravel: true, - 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", + methodology, bsc: { tvl: lending(false), borrowed: lending(true), diff --git a/projects/seamless/index.js b/projects/seamless/index.js index 9d4a131e34bc..f56122d9c981 100644 --- a/projects/seamless/index.js +++ b/projects/seamless/index.js @@ -2,6 +2,7 @@ const { aaveExports } = require("../helper/aave"); const { sumTokens2 } = require("../helper/unwrapLPs"); const abi = require("./abis.json"); const { mergeExports } = require("../helper/utils"); +const methodologies = require("../helper/methodologies"); const AAVE_ADDRESSES_PROVIDER_REGISTRY = "0x90C5055530C0465AbB077FA016a3699A3F53Ef99"; const AAVE_POOL_DATA_PROVIDER = "0x2A0979257105834789bC6b9E1B00446DFbA8dFBa"; @@ -44,6 +45,6 @@ async function geyserTvl(_, _1, _2, { api }) { const baseAAVE = aaveExports("base", AAVE_ADDRESSES_PROVIDER_REGISTRY, undefined, [AAVE_POOL_DATA_PROVIDER], { v3: true }); module.exports = mergeExports([{ - 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`, + methodology: methodologies.lendingMarket, base: baseAAVE, }, { base: { tvl: geyserTvl } }]); diff --git a/projects/shoebillFinance/index.js b/projects/shoebillFinance/index.js index 9db30a8c8194..03c32faf648c 100644 --- a/projects/shoebillFinance/index.js +++ b/projects/shoebillFinance/index.js @@ -1,4 +1,5 @@ const { toUSDTBalances } = require("../helper/balances"); +const methodologies = require("../helper/methodologies"); const protocolDataProviderAbi = "function getAllAggregatedReservesData() view returns (tuple(tuple(string internalSymbol, address internalAddress, string externalSymbol, address externalAddress, address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress) token, tuple(uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, uint256 reserveFactor, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive, bool isFrozen, uint256 decimals) configuration, tuple(uint256 availableLiquidity, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 liquidityRate, uint256 variableBorrowRate, uint256 stableBorrowRate, uint256 averageStableBorrowRate, uint256 liquidityIndex, uint256 variableBorrowIndex, uint40 lastUpdateTimestamp, bool isCollateral, address yieldAddress) overview, uint256 oraclePrice)[])" @@ -32,8 +33,7 @@ async function borrowed(timestamp, ethBlock, chainBlocks, { api }) { module.exports = { misrepresentedTokens: true, doublecounted: true, - 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", + methodology: methodologies.lendingMarket, }; const config = { diff --git a/projects/sio2/index.js b/projects/sio2/index.js index cc7942e89610..3d228a24222d 100644 --- a/projects/sio2/index.js +++ b/projects/sio2/index.js @@ -1,8 +1,7 @@ -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology, } = require("../helper/aave"); module.exports = { - timetravel: true, - 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.`, + methodology, astar: aaveExports("astar", '0x9D8bB85b1c728f69672923dD4A0209EC8b75EFda', undefined, undefined, { abis: { getAllATokens: "function getAllSTokens() view returns (tuple(string symbol, address tokenAddress)[])" diff --git a/projects/starlay/index.js b/projects/starlay/index.js index 4aae71089791..4c515b8c911f 100644 --- a/projects/starlay/index.js +++ b/projects/starlay/index.js @@ -1,10 +1,10 @@ -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology, } = require("../helper/aave"); const ADDRESSES = require('../helper/coreAssets.json') const VOTING_ESCROW_ADDRESS = "0xDf32D28c1BdF25c457E82797316d623C2fcB29C8"; const { staking } = require("../helper/staking"); 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.`, + methodology, astar: { ...aaveExports("astar", '0xF6206297b6857779443eF7Eca4a3cFFb1660F952', undefined, undefined, { abis: { diff --git a/projects/sturdy/index.js b/projects/sturdy/index.js index 73cb695f2527..14f26051b2e0 100644 --- a/projects/sturdy/index.js +++ b/projects/sturdy/index.js @@ -1,6 +1,6 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { aaveV2Export, } = require('../helper/aave'); -const { mergeExports, } = require('../helper/utils'); +const { aaveV2Export, methodology, } = require('../helper/aave'); +const { mergeExports, } = require('../helper/utils'); module.exports = mergeExports([ { @@ -10,10 +10,10 @@ module.exports = mergeExports([ misrepresentedTokens: true, ethereum: aaveV2Export('0xA422CA380bd70EeF876292839222159E41AAEe17', { useOracle: true }), fantom: aaveV2Export('0x7ff2520cd7b76e8c49b5db51505b842d665f3e9a', { useOracle: true, baseCurrency: ADDRESSES.fantom.DAI }), - 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.. TVL is calculated by getting the market addresses from comptroller and calling the getCash() on-chain method to get the amount of tokens locked in each of these addresses, then we get the price of each token from coingecko. To view the Borrowed amounts along with the currently liquidity, click the 'Borrowed' check box", + methodology, } ]) module.exports.hallmarks = [ - [Math.floor(new Date('2023-06-11')/1e3), 'Protocol was hacked'], + [Math.floor(new Date('2023-06-11') / 1e3), 'Protocol was hacked'], ] module.exports.doublecounted = true diff --git a/projects/tonpound.js b/projects/tonpound.js index f3477dd18fef..bcb4108f5f39 100644 --- a/projects/tonpound.js +++ b/projects/tonpound.js @@ -1,6 +1,6 @@ -const { compoundExports2 } = require('./helper/compound'); +const { compoundExports2, methodology, } = require('./helper/compound'); module.exports = { ethereum:compoundExports2({ comptroller: '0x1775286Cbe9db126a95AbF52c58a3214FCA26803',}), - 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.", + methodology, } \ No newline at end of file diff --git a/projects/toreus/index.js b/projects/toreus/index.js index 01ee42023250..8d7ed1824083 100644 --- a/projects/toreus/index.js +++ b/projects/toreus/index.js @@ -1,12 +1,11 @@ const { staking } = require("../helper/staking"); -const { aaveExports } = require("../helper/aave"); +const { aaveExports, methodology, } = require("../helper/aave"); const stakingContract = "0x2911c3a3b497Af71aAcbB9B1E9FD3ee5D50f959D"; const TOREUS = "0x8549724fcC84ee9ee6c7A676F1Ba2Cc2f43AAF5B"; 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", + methodology, kava: { ...aaveExports("kava", "0xcCe311383b0f4A41c82D8d03a1f4214A3c8E70Bd"), staking: staking(stakingContract, TOREUS, "kava"), diff --git a/projects/tropykus-zkevm/index.js b/projects/tropykus-zkevm/index.js index 70dce7d07551..2ccc4b964425 100644 --- a/projects/tropykus-zkevm/index.js +++ b/projects/tropykus-zkevm/index.js @@ -1,6 +1,6 @@ -const { aaveExports } = require('../helper/aave'); +const { aaveExports, methodology } = require('../helper/aave'); 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`, + methodology, polygon_zkevm: aaveExports("polygon_zkevm", "0x4Dac514F520D051551372d277d1b2Fa3cF2AfdFF"), } \ No newline at end of file diff --git a/projects/union-finance/index.js b/projects/union-finance/index.js index 4b6a8e473cf2..d459713331be 100644 --- a/projects/union-finance/index.js +++ b/projects/union-finance/index.js @@ -1,5 +1,6 @@ -const ADDRESSES = require('../helper/coreAssets.json') +const ADDRESSES = require('../helper/coreAssets.json'); +const methodologies = require('../helper/methodologies'); const config = { ethereum: { @@ -45,8 +46,7 @@ async function borrowed() { } module.exports = { - methodology: - "Counts the tokens locked in the contracts to be used to underwrite or to borrow. Borrowed coins are not counted towards the TVL, so only the coins actually locked in the contracts are counted.", + methodology: methodologies.lendingMarket, }; Object.keys(config).forEach(chain => { diff --git a/projects/unlockd/index.js b/projects/unlockd/index.js index b6f939f11d6b..856ee506c023 100644 --- a/projects/unlockd/index.js +++ b/projects/unlockd/index.js @@ -1,7 +1,8 @@ +const methodologies = require("../helper/methodologies.js"); const { tvl, borrowed } = require("./helper/index.js"); 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`, + methodology: methodologies.lendingMarket, ethereum: { tvl, borrowed, diff --git a/projects/uwulend/index.js b/projects/uwulend/index.js index c5d4b0ba0be6..3ca5e71d1e46 100644 --- a/projects/uwulend/index.js +++ b/projects/uwulend/index.js @@ -1,4 +1,4 @@ -const { aaveChainTvl } = require("../helper/aave"); +const { aaveChainTvl, methodology } = require("../helper/aave"); const { stakings } = require("../helper/staking"); const PoolV1 = "0x7c0bF1108935e7105E218BBB4f670E5942c5e237"; @@ -20,8 +20,7 @@ function lending(borrowed) { module.exports = { timetravel: true, - 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. The staking TVL is the protocol's revenue sharing pool locking UwU-ETH LP (SLP) tokens.", + methodology, ethereum: { tvl: lending(false), borrowed: lending(true), diff --git a/projects/valas/index.js b/projects/valas/index.js index 108399f52914..27753bd5a06d 100644 --- a/projects/valas/index.js +++ b/projects/valas/index.js @@ -1,6 +1,6 @@ const { staking } = require("../helper/staking"); const { pool2 } = require("../helper/pool2"); -const { aaveChainTvl } = require("../helper/aave"); +const { aaveChainTvl, methodology } = require("../helper/aave"); const stakingContract = "0x685D3b02b9b0F044A3C01Dbb95408FC2eB15a3b3"; const VALAS = "0xB1EbdD56729940089Ecc3aD0BBEEB12b6842ea6F"; @@ -23,8 +23,7 @@ function lending(borrowed) { module.exports = { timetravel: true, - 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", + methodology, bsc: { tvl: lending(false), borrowed: lending(true), diff --git a/projects/vee-finance/index.js b/projects/vee-finance/index.js index e8b32ad3ef8a..c145a9c61055 100644 --- a/projects/vee-finance/index.js +++ b/projects/vee-finance/index.js @@ -1,9 +1,9 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const {getCompoundV2Tvl} = require('../helper/compound') +const ADDRESSES = require('../helper/coreAssets.json') +const {getCompoundV2Tvl, methodology} = require('../helper/compound') const sdk = require('@defillama/sdk') module.exports={ - methodology: 'As in Compound Finance, TVL counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield on Avalanche and Heco. Borrowed coins are not counted towards the TVL, so only the coins actually locked in the contracts are counted.', + methodology, avax:{ tvl: sdk.util.sumChainTvls([ //V1&V2 on Avalanche diff --git a/projects/vires/index.js b/projects/vires/index.js index 53df644167b0..5440a28609f3 100644 --- a/projects/vires/index.js +++ b/projects/vires/index.js @@ -1,8 +1,9 @@ const { sumTokens, call } = require('../helper/chain/waves') +const methodologies = require('../helper/methodologies') module.exports = { timetravel: false, - 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`, + methodology: methodologies.lendingMarket, waves: { tvl, borrowed, }, diff --git a/projects/wanlend/index.js b/projects/wanlend/index.js index ae7445b7ee7f..5c75f29d9d75 100644 --- a/projects/wanlend/index.js +++ b/projects/wanlend/index.js @@ -1,5 +1,5 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { compoundExports2 } = require("../helper/compound"); +const { compoundExports2, methodology, } = require("../helper/compound"); const { mergeExports } = require("../helper/utils"); const cetheEquivalent=ADDRESSES.wan.WWAN @@ -8,6 +8,6 @@ const tvlV2 = compoundExports2( { comptroller: '0xd6980C52C20Fb106e54cC6c8AE04c delete tvlV1.borrowed module.exports = mergeExports([{ - methodology: `As in Compound Finance, TVL counts the tokens locked in the contracts to be used as collateral to borrow or to earn yield. Borrowed coins are counted as "Borrowed" TVL and can be toggled towards the regular TVL.`, + methodology, wan: tvlV1, }, { wan: tvlV2}]) diff --git a/projects/xcarnival/index.js b/projects/xcarnival/index.js index af039bf46b2a..e4b18692628d 100644 --- a/projects/xcarnival/index.js +++ b/projects/xcarnival/index.js @@ -1,3 +1,4 @@ +const methodologies = require("../helper/methodologies"); const { getTVL, getBorrowed } = require("./helper/index"); async function tvl(timestamp, block, chainBlocks) { @@ -13,8 +14,7 @@ async function borrowed(timestamp, block, chainBlocks) { } module.exports = { - timetravel: true, - 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`, + methodology: methodologies.lendingMarket, ethereum: { tvl, borrowed, From 15374b1b2d9d74c4026ea106fcb432983325f213 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Mar 2024 09:56:39 +0100 Subject: [PATCH 162/168] Refactor code and update TVL calculation (#9345) * infusion * code refactor --------- Co-authored-by: infusiondev7 --- projects/infusion/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 projects/infusion/index.js diff --git a/projects/infusion/index.js b/projects/infusion/index.js new file mode 100644 index 000000000000..65c9f6f5d959 --- /dev/null +++ b/projects/infusion/index.js @@ -0,0 +1,8 @@ +const { getUniTVL } = require('../helper/unknownTokens.js') + +module.exports = { + misrepresentedTokens: true, + base: { + tvl: getUniTVL({ factory: '0x2D9A3a2bd6400eE28d770c7254cA840c82faf23f', hasStablePools: true, useDefaultCoreAssets: true, fetchBalances: true, }), + }, +} From a7ac31d9a73d576ea396162cc1f518aebaec7152 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:09:11 +0100 Subject: [PATCH 163/168] Add let's get hai protocol and refactor code (#9347) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add let’s get hai protocol * code refactor --------- Co-authored-by: Luke Hamilton --- projects/hai/index.js | 19 +++++++++++++++++++ projects/helper/coreAssets.json | 1 + 2 files changed, 20 insertions(+) create mode 100644 projects/hai/index.js diff --git a/projects/hai/index.js b/projects/hai/index.js new file mode 100644 index 000000000000..df4c55841ae2 --- /dev/null +++ b/projects/hai/index.js @@ -0,0 +1,19 @@ +const { getLogs } = require('../helper/cache/getLogs') +const config = { + optimism: { factory: '0xfe7987b1ee45a8d592b15e8e924d50bfc8536143', fromBlock: 116055146 } +} + +module.exports = { + start: 1709780769, // globalDebtCeiling raised > 0 +}; + +Object.keys(config).forEach(chain => { + const { factory, fromBlock, } = config[chain] + module.exports[chain] = { + tvl: async (_, _b, _cb, { api, }) => { + const logs = await getLogs({ api, target: factory, eventAbi: 'event DeployCollateralJoin (bytes32 indexed _cType, address indexed _collateral, address indexed _collateralJoin)', onlyArgs: true, fromBlock, }) + const tokensAndOwners = logs.map(log => [log._collateral, log._collateralJoin]) + return api.sumTokens({ tokensAndOwners }) + } + } +}) diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 7f12fb6c273b..e5cbd50b13a7 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -198,6 +198,7 @@ "OP": "0x4200000000000000000000000000000000000042", "WETH": "0x121ab82b49b2bc4c7901ca46b8277962b4350204", "WETH_1": "0x4200000000000000000000000000000000000006", + "WSTETH": "0x1F32b1c2345538c0c6f582fCB022739c4A194Ebb", "BitANT": "0x5029c236320b8f15ef0a657054b84d90bfbeded3", "FEI": "0x35d48a789904e9b15705977192e5d95e2af7f1d3", "alUSD": "0xcb8fa9a76b8e203d8c3797bf438d8fb81ea3326a", From 8d8d72b19f55b71c0ba18a2cd9a6b130b2455b73 Mon Sep 17 00:00:00 2001 From: amydlarz Date: Thu, 14 Mar 2024 10:18:04 +0100 Subject: [PATCH 164/168] IPOR Protocol - get ethereum addresses from the official IPOR github repository. The new weETH pool on ethereum (#9346) * IPOR Protocol - add Arbitrum chain tvl * IPOR Protocol - get ethereum addresses from the official IPOR github repository. The new weETH pool --- projects/ipor/index.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/projects/ipor/index.js b/projects/ipor/index.js index 85b5df29cc55..033b57bdf862 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -21,25 +21,28 @@ async function tvlArbitrum(_, block, _1, {api}) { } async function calculateTvlForV2(api) { + const addresses = await getConfig('ipor/assets', IPOR_GITHUB_ADDRESSES_URL) + const assets = [ ADDRESSES.ethereum.USDT, // USDT ADDRESSES.ethereum.USDC, // USDC ADDRESSES.ethereum.DAI, // DAI ] - const iporRouter = '0x16d104009964e694761C0bf09d7Be49B7E3C26fd' - const ammTreasuryEth = '0x63395EDAF74a80aa1155dB7Cd9BBA976a88DeE4E' - - const output = await api.multiCall({ abi: abi.getAmmBalance, calls: assets, target: iporRouter, }) + const output = await api.multiCall({ abi: abi.getAmmBalance, calls: assets, target: addresses.ethereum.IporProtocolRouter }) const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: assets }) output.forEach(({ totalCollateralPayFixed, totalCollateralReceiveFixed, liquidityPool, vault }, i) => { const balance = +totalCollateralPayFixed + +totalCollateralReceiveFixed + +liquidityPool const decimal = 18 - decimals[i] api.add(assets[i], balance / (10 ** decimal)) - }) + }); - return api.sumTokens({ owner: ammTreasuryEth, tokens: [ADDRESSES.ethereum.STETH] }) + for (const pool of addresses.ethereum.pools) { + await api.sumTokens({owner: pool.AmmTreasury, tokens: [pool.asset]}); + } + + return api.getBalances(); } async function calculateTvlForV1(api) { From 95b8b73e1322d1d2604e692e573dcf677eeaa383 Mon Sep 17 00:00:00 2001 From: robin yang Date: Thu, 14 Mar 2024 17:28:31 +0800 Subject: [PATCH 165/168] Add zkex DEX adapter (#9343) * Add zkex DEX adapter * code refactor --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/zkex/index.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 projects/zkex/index.js diff --git a/projects/zkex/index.js b/projects/zkex/index.js new file mode 100644 index 000000000000..4824471ce34a --- /dev/null +++ b/projects/zkex/index.js @@ -0,0 +1,20 @@ +const ADDRESSES = require("../helper/coreAssets.json") +const { sumTokensExport } = require('../helper/unwrapLPs') + +const config = { + polygon: { owners: ["0x3C7c0ebFCD5786ef48df5ed127cdDEb806db976c"], tokens: [ADDRESSES.polygon.USDC, ADDRESSES.polygon.DAI, ADDRESSES.polygon.USDT, ADDRESSES.polygon.WMATIC_1] }, + avax: { owners: ["0xfB0Ad0B3C2605A7CA33d6badd0C685E11b8F5585"], tokens: [ADDRESSES.avax.USDC, ADDRESSES.avax.USDt] }, + bsc: { owners: ["0x7bd79DEd935B542fb22c74305a4d2A293C18483a"], tokens: ['0x1AF3F329e8BE154074D8769D1FFa4eE058B1DBc3'] }, + arbitrum: { owners: ["0xe469c1330ceecc375fe17e7d649ea270186d344f"], tokens: [ADDRESSES.arbitrum.USDC_CIRCLE, ADDRESSES.arbitrum.USDT, ADDRESSES.arbitrum.ARB], }, + optimism: { owners: ["0xa194fb4eab262ec9886a119609bbb2800bdd3a2e"], tokens: [ADDRESSES.optimism.USDC, ADDRESSES.optimism.USDT, ADDRESSES.optimism.OP], }, + era: { owners: ["0x3E3C7c1DCbAf343d14da4F0A0CD7E3c4b9765A4c"], tokens: [ADDRESSES.era.USDC], }, + linea: { owners: ["0x2Fad6cB2A9Db68395Ba4f87ff05768485C7fa6Fd"], tokens: [ADDRESSES.linea.USDC, ADDRESSES.linea.USDT], }, + base: { owners: ["0xaa46d98049cd895e980b60abc4af18cae681865a"], }, + op_bnb: { owners: ["0x85079cb83b6cadba34e64bc0f24493f49d8b1f4e"], }, +} + +Object.keys(config).forEach(chain => { + const { owners, tokens = [] } = config[chain] + tokens.push(ADDRESSES.null) + module.exports[chain] = { tvl: sumTokensExport({ tokens, owners, }) } +}) \ No newline at end of file From e9bf8b736cc9fce95ca8f9722e15547d48c016d8 Mon Sep 17 00:00:00 2001 From: Kyrylo Riabov Date: Thu, 14 Mar 2024 11:45:16 +0200 Subject: [PATCH 166/168] Add Q Saving adapter (#9193) * Added DRAFT for the Q Saving adapter * Updated TVL function * Updated TVL function * Adapted adapter for Borrowing contract * code refactor * bugfix --------- Co-authored-by: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> --- projects/helper/coreAssets.json | 5 +++++ projects/helper/tokenMapping.js | 5 +++++ projects/q-borrowing/index.js | 7 +++++++ 3 files changed, 17 insertions(+) create mode 100644 projects/q-borrowing/index.js diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index e5cbd50b13a7..c7ebbe074671 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1651,5 +1651,10 @@ }, "ftn": { "USDC": "0x4237e0A5b55233D5B6D6d1D9BF421723954130D8" + }, + "q": { + "WBTC": "0xde397e6C442A3E697367DecBF0d50733dc916b79", + "WDAI": "0xDeb87c37Dcf7F5197026f574cd40B3Fc8Aa126D1", + "WUSDC": "0x79Cb92a2806BF4f82B614A84b6805963b8b1D8BB" } } diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 7c05165b5b34..7ca123b13e42 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -56,6 +56,11 @@ const fixBalancesTokens = { "0x013e54bee29813bd786b24f9cb08f47c4b75955c": { coingeckoId: "usd-coin", decimals: 6 }, "0x3e4079ad76c83760e22b5c0105670ebab88b8d0e": { coingeckoId: "tether", decimals: 18 }, }, + q: { + [ADDRESSES.q.WUSDC]: { coingeckoId: "usd-coin", decimals: 6 }, + [ADDRESSES.q.WDAI]: { coingeckoId: "dai", decimals: 18 }, + [ADDRESSES.q.WBTC]: { coingeckoId: "wrapped-bitcoin", decimals: 8 }, + }, // Sample Code ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain diff --git a/projects/q-borrowing/index.js b/projects/q-borrowing/index.js new file mode 100644 index 000000000000..7d1ed743afd2 --- /dev/null +++ b/projects/q-borrowing/index.js @@ -0,0 +1,7 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { sumTokensExport } = require('../helper/unwrapLPs') +const BORROWING_CONTRACT = "0xb9c29d9A24B233C53020891D47F82043da615Dcc" + +module.exports = { + q: { tvl: sumTokensExport({ owner: BORROWING_CONTRACT, tokens: Object.values(ADDRESSES.q)}) }, +}; From c2c2f0f4052bad31ada48893bbbc2af493817489 Mon Sep 17 00:00:00 2001 From: lsblk07 <154802093+lsblk07@users.noreply.github.com> Date: Thu, 14 Mar 2024 20:23:17 +0800 Subject: [PATCH 167/168] blasterswap-v2 tvl (#9350) Co-authored-by: lsblk07 --- projects/blasterswap-v2/index.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 projects/blasterswap-v2/index.js diff --git a/projects/blasterswap-v2/index.js b/projects/blasterswap-v2/index.js new file mode 100644 index 000000000000..f6287ad59af0 --- /dev/null +++ b/projects/blasterswap-v2/index.js @@ -0,0 +1,3 @@ +const { uniTvlExport } = require('../helper/unknownTokens') + +module.exports = uniTvlExport("blast", "0x9CC1599D4378Ea41d444642D18AA9Be44f709ffD") From 886b5bb517f3f7d502da9cdc2137852538fb3cb8 Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Thu, 14 Mar 2024 14:08:17 +0100 Subject: [PATCH 168/168] reveert change --- projects/helper/env.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/projects/helper/env.js b/projects/helper/env.js index 334d3c95012f..532df877e0e7 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -12,6 +12,14 @@ const DEFAULTS = { MULTIVERSX_RPC: 'https://api.multiversx.com', ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", + NAKA_RPC: 'https://node.nakachain.xyz', + ETHF_RPC: 'https://rpc.dischain.xyz/', + CORE_RPC: "https://rpc.coredao.org,https://rpc.ankr.com/core,https://1rpc.io/core,https://rpc-core.icecreamswap.com", + BITGERT_RPC: "https://flux-rpc2.brisescan.com,https://mainnet-rpc.brisescan.com,https://chainrpc.com,https://serverrpc.com,https://flux-rpc.brisescan.com", + BITCHAIN_RPC: "https://rpc.bitchain.biz/", + OZONE_RPC: "https://node1.ozonechain.io", + ZETA_RPC: "https://zetachain-evm.blockpi.network/v1/rpc/public,https://zetachain-mainnet-archive.allthatnode.com:8545", + DEFIVERSE_RPC: "https://rpc.defi-verse.org/", } const ENV_KEYS = [