diff --git a/projects/Astra/index.js b/projects/Astra/index.js new file mode 100644 index 000000000000..49a217f9d9f0 --- /dev/null +++ b/projects/Astra/index.js @@ -0,0 +1,13 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +const FACTORY = "0x2b6852CeDEF193ece9814Ee99BE4A4Df7F463557" // This factory is on AirDAO Mainnet (Chain Id: 16718) + +const dexTVL = getUniTVL({ factory: FACTORY, useDefaultCoreAssets: true, fetchBalances: true, }) + +module.exports = { + misrepresentedTokens: true, + methodology: `Uses factory(${FACTORY}) address to find and price Liquidity Pool pairs.`, + airdao: { + tvl: dexTVL + } +}; diff --git a/projects/aark/index.js b/projects/aark/index.js index 83e1c5288389..8f2f40192199 100644 --- a/projects/aark/index.js +++ b/projects/aark/index.js @@ -5,7 +5,7 @@ async function tvl(api) { return api.sumTokens({ owner: VAULT_CONTRACT_ADDRESS, tokens: [ ADDRESSES.arbitrum.WETH, ADDRESSES.arbitrum.USDC, - '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', //FRAX + ADDRESSES.arbitrum.FRAX, //FRAX ADDRESSES.arbitrum.USDC_CIRCLE, ADDRESSES.arbitrum.WSTETH, ADDRESSES.arbitrum.DAI, diff --git a/projects/airpuff/index.js b/projects/airpuff/index.js index 037b5ccdcd41..8c0a498dace4 100644 --- a/projects/airpuff/index.js +++ b/projects/airpuff/index.js @@ -45,22 +45,22 @@ module.exports = { tvl: async (api) => { const KUSDC = { vault: "0x4c18E80b801AA24066D8B1C6E65ee245497Cb741", - token: "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D", + token: ADDRESSES.karak.USDC, }; const KWETH = { vault: "0x9a9631F7BEcE5C6E0aBA1f73f0e5796c534dc4db", - token: "0x4200000000000000000000000000000000000006", + token: ADDRESSES.optimism.WETH_1, }; const wethLending = { vault: "0xd6034F9147CF7528e857403Dea93bc45743295eb", - token: "0x4200000000000000000000000000000000000006", + token: ADDRESSES.optimism.WETH_1, }; const usdcLending = { vault: "0x475820E4bCE0E3d233Ad7f6A8c9DD1f66974c5d6", - token: "0xa415021bC5c4C3b5B989116DC35Ae95D9C962c8D", + token: ADDRESSES.karak.USDC, }; const KarakUSDCBal = await api.call({ target: KUSDC.vault, abi: contractAbis.getTotalSupply }); diff --git a/projects/akronswap/index.js b/projects/akronswap/index.js index fea9a6e6afa7..ed0555999c95 100644 --- a/projects/akronswap/index.js +++ b/projects/akronswap/index.js @@ -1,17 +1,11 @@ const { getUniTVL } = require('../helper/unknownTokens'); - + +const tvl = getUniTVL({ factory: '0xAf39606bec181887951Ab6912Ac7EA216Bd6E4B4', useDefaultCoreAssets: true, fetchBalances: true, }) + module.exports = { misrepresentedTokens: true, - ethereum:{ - tvl: getUniTVL({ factory: '0x6624Ac5F9abFA36174511607860e81C8dB9e84E9', useDefaultCoreAssets: true, fetchBalances: true, }), - }, - arbitrum:{ - tvl: getUniTVL({ factory: '0x40Cbdf84475f8Dd7C9a9c665eDE551EeaaF21F8d', useDefaultCoreAssets: true, fetchBalances: true, }), - }, - base:{ - tvl: getUniTVL({ factory: '0xD2156Bb9ed200FE88705443BfFcA788BA8b205f6', useDefaultCoreAssets: true, fetchBalances: true, }), - }, - bsc:{ - tvl: getUniTVL({ factory: '0x40Cbdf84475f8Dd7C9a9c665eDE551EeaaF21F8d', useDefaultCoreAssets: true, fetchBalances: true, }), - }, + ethereum: { tvl, }, + arbitrum: { tvl, }, + base: { tvl, }, + bsc: { tvl, }, } \ No newline at end of file diff --git a/projects/alienworlds/index.js b/projects/alienworlds/index.js new file mode 100644 index 000000000000..d5c46289a0d0 --- /dev/null +++ b/projects/alienworlds/index.js @@ -0,0 +1,26 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +const accounts = ["nftmt.worlds", "stake.worlds", "lore.worlds", "arena.worlds", "boost.worlds"] + +// AlienWorlds +// https://alienworlds.io/ +async function wax() { + const tokens = [ + ["eosio.token", "WAX", "wax"], + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} +async function staking() { + const tokens = [ + ["alien.worlds", "TLM", "alien-worlds"], + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `AlienWorlds TVL is achieved by querying token balances from Staking, Voting & Gaming smart contract(s).`, + wax: { + tvl: wax, + staking, + }, +} diff --git a/projects/alphaX-protocol/index.js b/projects/alphaX-protocol/index.js new file mode 100644 index 000000000000..0eb194a9a8e4 --- /dev/null +++ b/projects/alphaX-protocol/index.js @@ -0,0 +1,29 @@ +const ADDRESSES = require('../helper/coreAssets.json'); +const { sumTokensExport } = require('../helper/unwrapLPs'); + +const tokens = [ + ADDRESSES.ethereum.USDT, +]; + +const walletAddresses = { + ethereum: ['0xA61a6E696B7C566DA42B80dA27d96e7104bcec99'], + arbitrum: ['0x552E7A55802f3350C707a243E402aa50Eda9D286'] + +}; + +const tokenAddress = { + ethereum: [ADDRESSES.ethereum.USDT], + arbitrum: [ADDRESSES.arbitrum.USDT], + + +} + +module.exports = { + ethereum: { + tvl: sumTokensExport({ owners: walletAddresses.ethereum, tokens: tokenAddress.ethereum }), + }, + arbitrum: { + tvl: sumTokensExport({ owners: walletAddresses.arbitrum, tokens: tokenAddress.arbitrum }), + }, + +}; diff --git a/projects/alphafi/index.js b/projects/alphafi/index.js index 6eb43895fe03..4119f2420f76 100644 --- a/projects/alphafi/index.js +++ b/projects/alphafi/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const sui = require("../helper/chain/sui") const { addUniV3LikePosition } = require("../helper/unwrapLPs") @@ -7,50 +8,50 @@ const ALPHAFI_CETUS_TVL_IDS = [ poolID: "0x30066d9879374276dc01177fbd239a9377b497bcd347c82811d75fcda35b18e5", cetusPoolID: "0xc8d7a1503dc2f9f5b05449a87d8733593e2f0f3e7bffd90541252782e4d2ca20", investorID: "0x87a76889bf4ed211276b16eb482bf6df8d4e27749ebecd13017d19a63f75a6d5", - token0Type: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token0Type: ADDRESSES.sui.USDT, + token1Type: ADDRESSES.sui.USDC }, { poolID: "0xa7239a0c727c40ee3a139689b16b281acfd0682a06c23531b184a61721ece437", cetusPoolID: "0x0e809689d04d87f4bd4e660cd1b84bf5448c5a7997e3d22fc480e7e5e0b3f58d", investorID: "0x1b923520f19660d4eb013242c6d03c84fdea034b8f784cfd71173ef72ece50e1", token0Type: "0x960b531667636f39e85867775f52f6b1f220a058c4de786905bdf761e06a56bb::usdy::USDY", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token1Type: ADDRESSES.sui.USDC }, { poolID: "0xee6f6392cbd9e1997f6e4cf71db0c1ae1611f1f5f7f23f90ad2c64b8f23cceab", cetusPoolID: "0xcf994611fd4c48e277ce3ffd4d4364c914af2c3cbb05f7bf6facd371de688630", investorID: "0xb6ca8aba0fb26ed264a3ae3d9c1461ac7c96cdcbeabb01e71086e9a8340b9c55", - token0Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", - token1Type: "0x2::sui::SUI" + token0Type: ADDRESSES.sui.USDC, + token1Type: ADDRESSES.sui.SUI }, { poolID: "0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a", cetusPoolID: "0xaa57c66ba6ee8f2219376659f727f2b13d49ead66435aa99f57bb008a64a8042", investorID: "0x9ae0e56aa0ebc27f9d8a17b5a9118d368ba262118d878977b6194a10a671bbbc", - token0Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", - token1Type: "0x027792d9fed7f9844eb4839566001bb6f6cb4804f66aa2da6fe1ee242d896881::coin::COIN" + token0Type: ADDRESSES.sui.USDC, + token1Type: ADDRESSES.sui.WBTC }, { poolID: "0xbdf4f673b34274f36be284bca3f765083380fefb29141f971db289294bf679c6", cetusPoolID: "0x5b0b24c27ccf6d0e98f3a8704d2e577de83fa574d3a9060eb8945eeb82b3e2df", investorID: "0x05fa099d1df7b5bfb2e420d5ee2d63508db17c40ce7c4e0ca0305cd5df974e43", - token0Type: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token0Type: ADDRESSES.sui.WETH, + token1Type: ADDRESSES.sui.USDC }, { poolID: "0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0", cetusPoolID: "0x0254747f5ca059a1972cd7f6016485d51392a3fde608107b93bbaebea550f703", investorID: "0xdd9018247d579bd7adfdbced4ed39c28821c6019461d37dbdf32f0d409959b1c", token0Type: "0xa99b8952d4f7d947ea77fe0ecdcc9e5fc0bcab2841d6e2a5aa00c3044e5544b5::navx::NAVX", - token1Type: "0x2::sui::SUI" + token1Type: ADDRESSES.sui.SUI }, { poolID: "0x59ff9c5df31bfd0a59ac8393cf6f8db1373252e845958953e6199952d194dae4", cetusPoolID: "0x81fe26939ed676dd766358a60445341a06cea407ca6f3671ef30f162c84126d5", investorID: "0x8051a9ce43f9c21e58331b1ba2b1925e4ae4c001b1400459236d86d5d3d2888b", - token0Type: "0xce7ff77a83ea0cb6fd39bd8748e2ec89a3f41e8efdc3f4eb123e0ca37b184db2::buck::BUCK", - token1Type: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN" + token0Type: ADDRESSES.sui.BUCK, + token1Type: ADDRESSES.sui.USDC }, ] @@ -58,7 +59,7 @@ const ALPHAFI_CETUS_TVL_IDS = [ const ALPHAFI_NAVI_TVL_IDS = [ { poolID: "0x643f84e0a33b19e2b511be46232610c6eb38e772931f582f019b8bbfb893ddb3", - tokenType: "0x2::sui::SUI", + tokenType: ADDRESSES.sui.SUI, expo: 9 }, { @@ -68,17 +69,17 @@ const ALPHAFI_NAVI_TVL_IDS = [ }, { poolID: "0xc696ca5b8f21a1f8fcd62cff16bbe5a396a4bed6f67909cfec8269eb16e60757", - tokenType: "0xc060006111016b8a020ad5b33834984a437aaa7d3c74c18e09a95d48aceab08c::coin::COIN", + tokenType: ADDRESSES.sui.USDT, expo: 6, }, { poolID: "0x01493446093dfcdcfc6c16dc31ffe40ba9ac2e99a3f6c16a0d285bff861944ae", - tokenType: "0x5d4b302506645c37ff133b98c4b50a5ae14841659738d6d733d59d0d217a93bf::coin::COIN", + tokenType: ADDRESSES.sui.USDC, expo: 6 }, { poolID: "0xe4eef7d4d8cafa3ef90ea486ff7d1eec347718375e63f1f778005ae646439aad", - tokenType: "0xaf8cd5edc19c4512f4259f0bee101a40d41ebed738ade5874359610ef8eeced5::coin::COIN", + tokenType: ADDRESSES.sui.WETH, expo: 8 }, ] @@ -88,7 +89,7 @@ const ALPHAFI_POOL2_IDS = [{ cetusPoolID: "0xda7347c3192a27ddac32e659c9d9cbed6f8c9d1344e605c71c8886d7b787d720", investorID: "0x46d901d5e1dba34103038bd2ba789b775861ea0bf4d6566afd5029cf466a3d88", token0Type: "0xfe3afec26c59e874f3c1d60b8203cb3852d2bb2aa415df9548b8d688e6683f93::alpha::ALPHA", - token1Type: "0x2::sui::SUI" + token1Type: ADDRESSES.sui.SUI }, ] diff --git a/projects/angle/addresses.js b/projects/angle/addresses.js index e36103f28ef3..6f2cadb65e29 100644 --- a/projects/angle/addresses.js +++ b/projects/angle/addresses.js @@ -14,7 +14,7 @@ const TreasuryTokenAddresses = { ADDRESSES.ethereum.CVX, '0x875773784Af8135eA0ef43b5a374AaD105c5D39e', '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490', - '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', + ADDRESSES.ethereum.FXS, '0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F', '0x4da27a545c0c5B758a6BA100e3a049001de870f5', ADDRESSES.ethereum.USDC, @@ -122,7 +122,7 @@ const chains = [ const tokens = { ethereum: { EURA: '0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', bC3M: '0x2F123cF3F37CE3328CC9B5b8415f9EC5109b45e7', @@ -133,7 +133,7 @@ const tokens = { }, arbitrum: { EURA: '0xFA5Ed56A203466CbBC2430a43c66b9D8723528E7', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', }, @@ -154,7 +154,7 @@ const tokens = { }, xdai: { EURA: '0x4b1E2c2762667331Bc91648052F646d1b0d35984', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', }, @@ -165,7 +165,7 @@ const tokens = { }, celo: { EURA: '0xC16B81Af351BA9e64C1a069E3Ab18c244A1E3049', - stEUR: '0x004626A008B1aCdC4c74ab51644093b155e59A23', + stEUR: ADDRESSES.celo.STEUR, USDA: '0x0000206329b97DB379d5E1Bf586BbDB969C63274', stUSD: '0x0022228a2cc5E7eF0274A7Baa600d44da5aB5776', }, diff --git a/projects/aura-finance/index.js b/projects/aura-finance/index.js index d4ecb17a4387..07dc07649b39 100644 --- a/projects/aura-finance/index.js +++ b/projects/aura-finance/index.js @@ -68,6 +68,7 @@ const config = { xdai: { factory: '0x83E443EF4f9963C77bd860f94500075556668cb8', fromBlock: 27088527, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, polygon_zkevm: { factory: '0x2498A2B0d6462d2260EAC50aE1C3e03F4829BA95', fromBlock: 203652, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, avax: { factory: '0xf23b4DB826DbA14c0e857029dfF076b1c0264843', fromBlock: 32558551, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, + fraxtal: { factory: '0xc3ccacE87f6d3A81724075ADcb5ddd85a8A1bB68', fromBlock: 4712390, voterProxy: '0xC181Edc719480bd089b94647c2Dc504e2700a2B0' }, } module.exports = { diff --git a/projects/avalance-btc/index.js b/projects/avalance-btc/index.js new file mode 100644 index 000000000000..9ccfdf9a1a76 --- /dev/null +++ b/projects/avalance-btc/index.js @@ -0,0 +1,16 @@ +const sdk = require('@defillama/sdk'); +const { sumTokensExport } = require('../helper/sumTokens'); + +//https://support.avax.network/en/articles/6349640-how-does-the-avalanche-bridge-work +const owners = [ +'bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', // https://prnt.sc/unrBvLvw3z1t +] + +module.exports = { + methodology: 'BTC wallets on bc1q2f0tczgrukdxjrhhadpft2fehzpcrwrz549u90', + bitcoin: { + tvl: sdk.util.sumChainTvls([ + sumTokensExport({ owners }), + ]), + }, +}; diff --git a/projects/balus/index.js b/projects/balus/index.js new file mode 100644 index 000000000000..c06b764c3953 --- /dev/null +++ b/projects/balus/index.js @@ -0,0 +1,14 @@ +const ADDRESSES = require("../helper/coreAssets.json") +const { sumTokensExport } = require("../helper/chain/ton") +const CONTRACT = "EQDswKn606G8kwS8RuUJg9baJbgAhixb6bYJC6VmIPU873uq" + +module.exports = { + methodology: "Counts all TON balance in the smart contract as the TVL", + timetravel: false, + ton: { + tvl: sumTokensExport({ + owners: [CONTRACT], + tokens: ADDRESSES.ton.TON, + }) + }, +}; diff --git a/projects/bifi/index.js b/projects/bifi/index.js index c22a620cfbeb..c5a0511bf930 100644 --- a/projects/bifi/index.js +++ b/projects/bifi/index.js @@ -51,7 +51,7 @@ const chainPools = { UnifiedDAI: { pool: '0x2168dAb12A6A93181bbAD9C9dc769307C36fB45C', token: ADDRESSES.bfc.UnifiedDAI }, UnifiedWBTC: { pool: '0xEa3b4a2dA5DbE8379AD4c60aaD5184df69D7C9AD', token: ADDRESSES.bfc.WBTC}, UnifiedBTCB: { pool: '0x0B31FeE8bF53bFe2f5F7083B73A4c9C8B517E32F', token: ADDRESSES.bfc.BTCB}, - BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: '0x6906Ccda405926FC3f04240187dd4fAd5DF6d555' } + BitcoinUSD: { pool: '0xcF2FC1d354018A39D5Ef036aA865Ad8cbF7B611E', token: ADDRESSES.bfc.BitcoinUSD } }, } diff --git a/projects/bitdrome/index.js b/projects/bitdrome/index.js new file mode 100644 index 000000000000..a8e4e946a5b7 --- /dev/null +++ b/projects/bitdrome/index.js @@ -0,0 +1,13 @@ +async function tvl(api) { + const TwoPoolFactory = '0x634FB7F07BDb77281c64a57F69E1EB19583E727a' + const pools = await api.fetchList({ lengthAbi: 'pool_count', itemAbi: 'pool_list', target: TwoPoolFactory }) + const tokens = await api.multiCall({ target: TwoPoolFactory, calls: pools, abi: 'function get_coins(address _pool) view returns (address[2])' }) + const ownerTokens = tokens.map((v, i) => [v, pools[i]]) + return api.sumTokens({ ownerTokens }) +} + +module.exports = { + bevm: { + tvl + } +} \ No newline at end of file diff --git a/projects/blasterswap-vaults/index.js b/projects/blasterswap-vaults/index.js index 8bde49169e06..80d01bcd8ee4 100644 --- a/projects/blasterswap-vaults/index.js +++ b/projects/blasterswap-vaults/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { staking } = require("../helper/staking.js"); const vaults = ['0xC52fb7E613e401a0195C2fdB369618580D58C91D', '0x013249266842e078999088807033D80531A84260']; @@ -5,7 +6,7 @@ const tokens = ['0xd43D8aDAC6A4C7d9Aeece7c3151FcA8f23752cf8', '0x5ffd9EbD27f2fcA module.exports = { blast: { - tvl: staking('0x0464a36beCf9967111D2dCAb57CAf4a2376f6E3F', '0xb1a5700fa2358173fe465e6ea4ff52e36e88e2ad'), + tvl: staking('0x0464a36beCf9967111D2dCAb57CAf4a2376f6E3F', ADDRESSES.blast.BLAST), staking: staking(vaults, tokens) }, } diff --git a/projects/bracket-fi/index.js b/projects/bracket-fi/index.js index ea9e7f0d6a9f..9581a2b6cc94 100644 --- a/projects/bracket-fi/index.js +++ b/projects/bracket-fi/index.js @@ -21,7 +21,7 @@ const config = { "0xEC70Dcb4A1EFa46b8F2D97C310C9c4790ba5ffA8", "0x35751007a407ca6FEFfE80b3cB397736D2cf4dbe", "0x4186BFC76E2E237523CBC30FD220FE055156b41F", - "0x2416092f143378750bb29b79eD961ab195CcEea5" + ADDRESSES.blast.ezETH ] }, } diff --git a/projects/bridgers-ai/index.js b/projects/bridgers-ai/index.js index c5e4cb897bb1..4d6ddf8a6720 100644 --- a/projects/bridgers-ai/index.js +++ b/projects/bridgers-ai/index.js @@ -137,7 +137,7 @@ const tokensConf = { TON: ADDRESSES.ton.TON, USDT: ADDRESSES.ton.USDT, USDC: ADDRESSES.ton.USDC, - NOT: 'EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT', + NOT: ADDRESSES.ton.NOT, }, era: { ETH: nullAddress, diff --git a/projects/buzz-farming/index.js b/projects/buzz-farming/index.js index 158f1ddda7db..0c8950c9e5cb 100644 --- a/projects/buzz-farming/index.js +++ b/projects/buzz-farming/index.js @@ -1,15 +1,15 @@ const {sumTokensExport} = require('../helper/sumTokens'); const ADDRESSES = require('../helper/coreAssets.json') -const ADDRESSES_BSQUARED_BSTONE = '0x7537C1F80c9E157ED7AFD93a494be3e1f04f1462'; -const ADDRESSES_BSQUARED_FDUSD = '0xC2Fe4f673455Ef92299770a09CDB5E8756A525D5'; -const ADDRESSES_BSQUARED_MATIC = '0xc3ee2Df14B1Bc526c24ED802f1873d49664a0d5c'; -const ADDRESSES_BSQUARED_ORDI = '0xa0f4470B714677AEEcE0d20074c540b3Cf6a477E'; -const ADDRESSES_BSQUARED_SATS = '0x7eBFcE05E418C380a2b6EB0F65995cA04ef4bc00'; +const ADDRESSES_BSQUARED_BSTONE = ADDRESSES.bsquared.BSTONE; +const ADDRESSES_BSQUARED_FDUSD = ADDRESSES.bsquared.FDUSD; +const ADDRESSES_BSQUARED_MATIC = ADDRESSES.bsquared.MATIC; +const ADDRESSES_BSQUARED_ORDI = ADDRESSES.bsquared.ORDI; +const ADDRESSES_BSQUARED_SATS = ADDRESSES.bsquared.SATS; const ADDRESSES_BSQUARED_FBTC = '0x5d247f32b792a61f7b4078cf7752a878aff152e2'; -const ADDRESSES_BSQUARED_UBTC = '0x796e4d53067ff374b89b2ac101ce0c1f72ccaac2'; +const ADDRESSES_BSQUARED_UBTC = ADDRESSES.bsquared.UBTC; const ADDRESSES_BSQUARED_USDA = '0x46fecc5bef70615ee3bfdbd2b278944368b78cf5'; -const ADDRESSES_BSQUARED_ETH = '0xd48d3a551757ac47655fce25bde1b0b6b1cb2a5a'; +const ADDRESSES_BSQUARED_ETH = ADDRESSES.bsquared.ETH; const tokenList = [ADDRESSES.null, ADDRESSES.bsquared.USDT, ADDRESSES.bsquared.USDC, ADDRESSES.bsquared.WBTC, ADDRESSES_BSQUARED_BSTONE, ADDRESSES_BSQUARED_FDUSD, ADDRESSES_BSQUARED_MATIC, ADDRESSES_BSQUARED_ORDI, ADDRESSES_BSQUARED_SATS, ADDRESSES_BSQUARED_FBTC, ADDRESSES_BSQUARED_UBTC, ADDRESSES_BSQUARED_USDA, ADDRESSES_BSQUARED_ETH,]; diff --git a/projects/carbondefi/index.js b/projects/carbondefi/index.js index 36f28828d07d..8fd3768e9430 100644 --- a/projects/carbondefi/index.js +++ b/projects/carbondefi/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokens2 } = require("../helper/unwrapLPs"); const config = { @@ -12,7 +13,7 @@ const config = { celo: { fromBlock: 26828280, controller: "0x6619871118D144c1c28eC3b23036FC1f0829ed3a", - gasToken: "0x471EcE3750Da237f93B8E339c536989b8978a438", + gasToken: ADDRESSES.celo.CELO, }, }; diff --git a/projects/celerbridge/index.js b/projects/celerbridge/index.js index 448459932383..1d10495e01b7 100644 --- a/projects/celerbridge/index.js +++ b/projects/celerbridge/index.js @@ -376,7 +376,7 @@ const liquidityBridgeTokens = [ }, { // FXS - ethereum: "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ethereum: ADDRESSES.ethereum.FXS, }, { // MAI diff --git a/projects/chiliz-governance-staking/index.js b/projects/chiliz-governance-staking/index.js index 02b95529187e..72f3cb4aef44 100644 --- a/projects/chiliz-governance-staking/index.js +++ b/projects/chiliz-governance-staking/index.js @@ -1,5 +1,6 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport, nullAddress } = require("../helper/unwrapLPs"); -const STAKING_CONTRACT = '0x0000000000000000000000000000000000001000'; +const STAKING_CONTRACT = ADDRESSES.findora.FRA; module.exports = { methodology: 'Total CHZ Locked in Staking System Contract.', diff --git a/projects/concentrator/index.js b/projects/concentrator/index.js index 343424b532be..1a89013741f8 100644 --- a/projects/concentrator/index.js +++ b/projects/concentrator/index.js @@ -23,7 +23,7 @@ const arUSDAddress = "0x549716F858aefF9CB845d4C78c67A7599B0Df240"; const arUSD4626Address = "0x07D1718fF05a8C53C8F05aDAEd57C0d672945f9a"; const rUSDAddress = "0x65D72AA8DA931F047169112fcf34f52DbaAE7D18"; const aFXNAddress = "0x00Bac667a4cCf9089aB1Db978238C555C4349545"; -const fxnAddress = "0x365AccFCa291e7D3914637ABf1F7635dB165Bb09"; +const fxnAddress = ADDRESSES.ethereum.FXN; const concentratorNewVault = "0x3Cf54F3A1969be9916DAD548f3C084331C4450b5"; const concentratorAfxsVault = "0xD6E3BB7b1D6Fa75A71d48CFB10096d59ABbf99E1"; diff --git a/projects/convex/index.js b/projects/convex/index.js index 10505a93fb82..35e6962b2dab 100644 --- a/projects/convex/index.js +++ b/projects/convex/index.js @@ -10,7 +10,7 @@ const boosterAddresses = { const staker = '0x989aeb4d175e16225e39e87d0d97a3360524ad80' const cvxRewardsAddress = "0xCF50b810E57Ac33B91dCF525C6ddd9881B139332"; -const cvxLockerAddress = "0x72a19342e8F1838460eBFCCEf09F6585e32db86E"; +const cvxLockerAddress = ADDRESSES.ethereum.vlCVX; const arbiPoolInfoABI = 'function poolInfo(uint256) view returns (address lptoken, address gauge, address rewards, bool shutdown, address factory)' diff --git a/projects/djed-alliance/index.js b/projects/djed-alliance/index.js index 705e632a15c4..f1dad7c7d5ea 100644 --- a/projects/djed-alliance/index.js +++ b/projects/djed-alliance/index.js @@ -6,9 +6,9 @@ const { sumTokensExport } = require("../helper/chain/cardano"); module.exports = { - methodology: 'The TVL of each Djed deployment is the reserve belonging to the deployment. The TVL within a given blockchain is the sum of the TVLs of all known Djed deployments within that blockchain. The total TVL is the sum of the Djed TVLs on all blockchains.', + methodology: 'The TVL of Djed is the reserve belonging to the deployment. The TVL within a given blockchain is the sum of the TVLs of all known Djed deployments within that blockchain.', cardano: { - tvl: sumTokensExport({ owner: 'addr1zxem3j9xw7gyqnry0mfdhku7grrzu0707dc9fs68zwkln5sm5kjdmrpmng059yellupyvwgay2v0lz6663swmds7hp0qul0eqc', tokens: ['lovelace']}), + tvl: sumTokensExport({ owner: 'addr1zx82ru5f7p8ewhhdvahueg2s4gxs3gxl66fkygdekkjs74sm5kjdmrpmng059yellupyvwgay2v0lz6663swmds7hp0q4vpw0l', tokens: ['lovelace']}), }, }; diff --git a/projects/dotoracle/index.js b/projects/dotoracle/index.js index 0911ba1624c9..c131683560be 100644 --- a/projects/dotoracle/index.js +++ b/projects/dotoracle/index.js @@ -14,7 +14,7 @@ const config = { usdt: ADDRESSES.ethereum.USDT, DAI: ADDRESSES.ethereum.DAI, frax: ADDRESSES.ethereum.FRAX, - fxs: '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', + fxs: ADDRESSES.ethereum.FXS, maker: ADDRESSES.ethereum.MKR, aave: ADDRESSES.ethereum.AAVE, } diff --git a/projects/doubler/index.js b/projects/doubler/index.js index 4ecc77fbf9b3..98a8ad562867 100644 --- a/projects/doubler/index.js +++ b/projects/doubler/index.js @@ -1,4 +1,5 @@ -const WETH_CONTRACT = '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'; +const ADDRESSES = require('../helper/coreAssets.json') +const WETH_CONTRACT = ADDRESSES.arbitrum.WETH; const DOUBLER_CONTRACT = '0x56386f04111057a5D8DF8d719827038B716333F0'; async function tvl(api) { diff --git a/projects/duet/bsc.js b/projects/duet/bsc.js index c833afef31ad..3480ab750bf2 100644 --- a/projects/duet/bsc.js +++ b/projects/duet/bsc.js @@ -1,14 +1,11 @@ const { getConfig } = require("../helper/cache"); -const collateralReaderContractABI = require("./abis/collateral-reader.json"); const ebcakeReaderContractABI = require("./abis/ebcake-reader.json"); const { getUniqueAddresses } = require('../helper/utils') -const BigNumber = require("bignumber.js"); const { sumTokens2 } = require("../helper/unwrapLPs"); const { staking } = require("../helper/staking"); const TOKEN_LIST_URL = "https://app.duet.finance/tokens.json"; -const COLLATERAL_READER_CONTRACT = "0xFfB8FD0E5eA13bb71401B19e00f9F934746f0b7A"; const DUET = '0x95EE03e1e2C5c4877f9A298F1C0D6c98698FAB7B' async function getEBCakeTvl(api) { @@ -51,16 +48,9 @@ async function tvl(api) { if (!tokens[i]) return; tokensAndOwners.push([tokens[i], underlyingMap[v]]) }) - // api.add('tether', (await getEBCakeTvl(api)) / 1e8, { skipChain: true }) await getEBCakeTvl(api) return sumTokens2({ tokensAndOwners, api, resolveLP: true, blacklistedTokens: [DUET]}) - - // const tokenTvls = await api.multiCall({ abi: collateralReaderContractABI.depositVaultValues, target: COLLATERAL_READER_CONTRACT, calls: uniqueVaults.map(i => ({ params: [[i], false] })) }) - // api.add('tether', (await getEBCakeTvl(api)) / 1e8, { skipChain: true }) - // tokenTvls.forEach(v => { - // if (v) api.add('tether', v[1][0] / 1e8, { skipChain: true }) - // }) } module.exports = { diff --git a/projects/dyad/index.js b/projects/dyad/index.js index ec95d77124b5..2e7871765d9d 100644 --- a/projects/dyad/index.js +++ b/projects/dyad/index.js @@ -9,8 +9,6 @@ const vaults = [ async function tvl(api) { const tokens = await api.multiCall({ abi: 'address:asset', calls: vaults }) - tokens.push(ADDRESSES.null) - vaults.push('0xdc400bbe0b8b79c07a962ea99a642f5819e3b712') return api.sumTokens({ tokensAndOwners2: [tokens, vaults] }) } diff --git a/projects/ease/index.js b/projects/ease/index.js index 953cbceadcbf..266eca108145 100644 --- a/projects/ease/index.js +++ b/projects/ease/index.js @@ -1,5 +1,3 @@ -const sdk = require('@defillama/sdk'); -const { default: BigNumber } = require('bignumber.js'); const { stakings } = require("../helper/staking"); const { getConfig } = require('../helper/cache') @@ -9,17 +7,11 @@ const NXM = "0xd7c49CEE7E9188cCa6AD8FF264C1DA2e69D4Cf3B"; // const ARNXM_VAULT = "0x1337DEF1FC06783D4b03CB8C1Bf3EBf7D0593FC4"; const STAKING_CONTRACTS = [ //BRIBE_POT - "0xEA5EdeF17C9be57228389962ba50b98397f1E28C", + "0xEA5EdeF17C9be57228389962ba50b98397f1E28C", //GV_EASE "0xEa5edeF1eDB2f47B9637c029A6aC3b80a7ae1550", ]; -const RCA_SHIELD = { - abis: { - uBalance: "uint256:uBalance" - }, -}; - const ARNXM_VAULT = { abis: { aum: "uint256:aum", @@ -31,17 +23,17 @@ async function tvl(api) { //get TVL of Uninsurance vaults let resp = await getConfig('ease', VAULT_LIST_URL); let vaults = resp.map(i => i.address.toLowerCase()).filter(i => i !== '0x8f247eb2d71beeacdf212f8bc748f09cdf7144c0') - const bals = await api.multiCall({ abi: 'uint256:uBalance', calls: vaults }) - const tokens = await api.multiCall({ abi: 'address:uToken', calls: vaults }) - const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: tokens }) + const bals = await api.multiCall({ abi: 'uint256:uBalance', calls: vaults }) + const tokens = await api.multiCall({ abi: 'address:uToken', calls: vaults }) + const decimals = await api.multiCall({ abi: 'erc20:decimals', calls: tokens }) api.addTokens(tokens, bals.map((v, i) => v / 10 ** (18 - decimals[i]))) //get TVL of arNXM vault - const balNXM = await api.call({ target: ARNXM_VAULT.address, abi: ARNXM_VAULT.abis.aum, }); + const balNXM = await api.call({ target: ARNXM_VAULT.address, abi: ARNXM_VAULT.abis.aum, }); api.add(NXM, balNXM) } module.exports = { - ethereum:{ + ethereum: { tvl, staking: stakings(STAKING_CONTRACTS, EASE), }, diff --git a/projects/echo-bridge/index.js b/projects/echo-bridge/index.js index 14381d72ad44..60fe3a95d0de 100644 --- a/projects/echo-bridge/index.js +++ b/projects/echo-bridge/index.js @@ -1,7 +1,8 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/sumTokens') module.exports = { bsquared: { - tvl: sumTokensExport({ owner: '0x5b1399B8b97fBC3601D8B60Cc0F535844C411Bd5', tokens: ['0x796e4D53067FF374B89b2Ac101ce0c1f72ccaAc2']}) + tvl: sumTokensExport({ owner: '0x5b1399B8b97fBC3601D8B60Cc0F535844C411Bd5', tokens: [ADDRESSES.bsquared.UBTC]}) } } \ No newline at end of file diff --git a/projects/econia.js b/projects/econia.js index 43682d065cee..c6fc3d330e78 100644 --- a/projects/econia.js +++ b/projects/econia.js @@ -1,5 +1,4 @@ const axios = require("axios"); -const BigNumber = require("bignumber.js"); const URL = 'https://aptos-mainnet-econia.nodeinfra.com'; diff --git a/projects/ensuro/index.js b/projects/ensuro/index.js index 47ac5caf0486..231b15184a0c 100644 --- a/projects/ensuro/index.js +++ b/projects/ensuro/index.js @@ -7,7 +7,7 @@ const addressBook = { aave_v3_usdc: "0x625E7708f30cA75bfd92586e17077590C60eb4cD", // aPolUSDC aave_v2_usdc: "0x1a13F4Ca1d028320A707D99520AbFefca3998b7F", // amUSDC compound_v3_usdc: "0xF25212E676D1F7F89Cd72fFEe66158f541246445", // Compound USDC - mountain_usdm: "0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C", // Mountain USDM + mountain_usdm: ADDRESSES.ethereum.USDM, // Mountain USDM reserves: [ // eTokens {name: "eToken Junior Koala", address: "0x8d2Ee82c4172B2138B06b8037d769cBfAf9C0274"}, diff --git a/projects/ethereum-classic-stable-dollar/index.js b/projects/ethereum-classic-stable-dollar/index.js new file mode 100644 index 000000000000..a7d96f22adfa --- /dev/null +++ b/projects/ethereum-classic-stable-dollar/index.js @@ -0,0 +1,14 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const { nullAddress, } = require('../helper/unwrapLPs') +const { sumTokensExport, } = require('../helper/sumTokens') + +module.exports = { + methodology: "The TVL of ECSD is the amount of ETC in the contract's reserve.", + ethereumclassic: { + tvl: sumTokensExport({ + owner: '0xCc3664d7021FD36B1Fe2b136e2324710c8442cCf', + tokens: [nullAddress], + }) + }, +} + diff --git a/projects/fpi/index.js b/projects/fpi/index.js index 24cf40c7a7fb..99d24c8518ed 100644 --- a/projects/fpi/index.js +++ b/projects/fpi/index.js @@ -1,7 +1,7 @@ const ADDRESSES = require('../helper/coreAssets.json') const frax = ADDRESSES.ethereum.FRAX -const fxs = "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0" +const fxs = ADDRESSES.ethereum.FXS async function tvl(api){ const balances = {} diff --git a/projects/fraxfinance/index.js b/projects/fraxfinance/index.js index 7203aed3a44a..acb073dfecc8 100644 --- a/projects/fraxfinance/index.js +++ b/projects/fraxfinance/index.js @@ -4,7 +4,7 @@ const { staking, } = require("../helper/staking"); const { sumTokens2, nullAddress, } = require("../helper/unwrapLPs"); const USDC = ADDRESSES.ethereum.USDC; -const FXS = "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0"; +const FXS = ADDRESSES.ethereum.FXS; const FRAX_3CRV = '0xd632f22692fac7611d2aa1c0d552930d43caed3b' const T_3CRV = '0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490' diff --git a/projects/fraxlend/index.js b/projects/fraxlend/index.js index c8bb6771f3fb..ef6e0a08debc 100644 --- a/projects/fraxlend/index.js +++ b/projects/fraxlend/index.js @@ -15,8 +15,8 @@ const registry_config = { const frax_config = { ethereum: ADDRESSES.ethereum.FRAX, - fraxtal: "0xFc00000000000000000000000000000000000001", - arbitrum: "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F" + fraxtal: ADDRESSES.fraxtal.FRAX, + arbitrum: ADDRESSES.arbitrum.FRAX } async function tvl(api) { diff --git a/projects/fwx-dex/index.js b/projects/fwx-dex/index.js new file mode 100644 index 000000000000..5a1bd24e4a6a --- /dev/null +++ b/projects/fwx-dex/index.js @@ -0,0 +1,37 @@ +const { getLogs } = require('../helper/cache/getLogs') +const { transformDexBalances } = require('../helper/portedTokens') + +const config = { + avax: { factory: '0x2131Bdb0E0B451BC1C5A53F2cBC80B16D43634Fa', fromBlock: 46372045 }, +} + +module.exports = { + misrepresentedTokens: true, +}; + +Object.keys(config).forEach(chain => { + module.exports[chain] = { tvl } +}) + + +async function tvl(api) { + const { factory, fromBlock } = config[api.chain] + const logs = await getLogs({ + api, + target: factory, + topics: ['0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9'], + eventAbi: 'event PairCreated(address indexed token0, address indexed token1, address pair, uint256 )', + onlyArgs: true, + fromBlock, + }) + const tok0Bals = await api.multiCall({ abi: 'erc20:balanceOf', calls: logs.map(i => ({ target: i.token0, params: i.pair })) }) + const tok1Bals = await api.multiCall({ abi: 'erc20:balanceOf', calls: logs.map(i => ({ target: i.token1, params: i.pair })) }) + return transformDexBalances({ + chain: api.chain, data: logs.map((log, i) => ({ + token0: log.token0, + token0Bal: tok0Bals[i], + token1: log.token1, + token1Bal: tok1Bals[i], + })) + }) +} \ No newline at end of file diff --git a/projects/fyde/index.js b/projects/fyde/index.js index ca92d3c59305..802dfef06c96 100644 --- a/projects/fyde/index.js +++ b/projects/fyde/index.js @@ -5,6 +5,8 @@ const RESTAKING_AGGREGATOR = "0x3f69F62e25441Cf72E362508f4d6711d53B05341"; const DEPOSIT_ESCROW = "0x63ec950633Eb85797477166084AD0a7121910470"; const ORACLE = "0x05198327206123E89c24ABd9A482316449bD2aEe" const WETH = ADDRESSES.ethereum.WETH; +const YIELDMANAGER = "0xB615A7E4D1Ed426470Ac2Df14F3153fA2DcCC3ba" +const PTTOKENS = ["0x1c085195437738d73d75DC64bC5A3E098b7f93b1", "0x6ee2b5e19ecba773a352e5b21415dc419a700d1d"] async function tvl(api) { const tokens = await api.fetchList({ lengthAbi: 'getAssetsListLength', itemAbi: 'assetsList', target: FYDE_CONTRACT }) @@ -38,7 +40,10 @@ async function tvl(api) { // add assets in the deposit escrow const tokensEscrow = await api.fetchList({ lengthAbi: 'getAssetListLength', itemAbi: 'assetList', target: DEPOSIT_ESCROW }) - return api.sumTokens({ tokens: tokensEscrow, owner: DEPOSIT_ESCROW }) + return api.sumTokens({ ownerTokens: [ + [tokensEscrow, DEPOSIT_ESCROW], + [PTTOKENS, YIELDMANAGER], + ],}) } module.exports = { diff --git a/projects/gudchain/index.js b/projects/gudchain/index.js index 3d6d22fec118..05acdf355112 100644 --- a/projects/gudchain/index.js +++ b/projects/gudchain/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require("../helper/unwrapLPs"); const launchBridge = "0xd759e176DEF0F14e5C2D300238d41b1CBB5585BF"; @@ -8,14 +9,14 @@ module.exports = { owner: launchBridge, start: 20203960, tokens: [ - "0x0000000000000000000000000000000000000000", - "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", + ADDRESSES.null, + ADDRESSES.ethereum.STETH, "0xa2E3356610840701BDf5611a53974510Ae27E2e1", "0xd5F7838F5C461fefF7FE49ea5ebaF7728bB0ADfa", - "0x6B175474E89094C44Da98b954EedeAC495271d0F", - "0x83F20F44975D03b1b09e64809B757c47f942BEeA", - "0xdAC17F958D2ee523a2206206994597C13D831ec7", - "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" + ADDRESSES.ethereum.DAI, + ADDRESSES.ethereum.SDAI, + ADDRESSES.ethereum.USDT, + ADDRESSES.ethereum.USDC ] }) } diff --git a/projects/helper/cex.js b/projects/helper/cex.js index 84d348027480..1ab2338cb615 100644 --- a/projects/helper/cex.js +++ b/projects/helper/cex.js @@ -86,7 +86,7 @@ const defaultTokens = { '0xaaef88cea01475125522e117bfe45cf32044e238', // GF '0x949d48eca67b17269629c7194f4b727d4ef9e5d6', // MC '0xbb0e17ef65f82ab018d8edd776e8dd940327b28b', // AXS - '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', // FXS + ADDRESSES.ethereum.FXS, // FXS '0xd417144312dbf50465b1c641d016962017ef6240',// cqt '0xcb84d72e61e383767c4dfeb2d8ff7f4fb89abc6e', //VEGA '0xcccd1ba9f7acd6117834e0d28f25645decb1736a', //ecox diff --git a/projects/helper/coreAssets.json b/projects/helper/coreAssets.json index 9fd47702a747..afed2434df2a 100644 --- a/projects/helper/coreAssets.json +++ b/projects/helper/coreAssets.json @@ -1294,7 +1294,8 @@ "MEGA": "EQBf6-YoR9xylol_NwjHrLkrTFAZJCX-bsd-Xx_902OaPaBf", "WEMIX": "EQCf7Nb341dxOE3N0jimngRxGEV8T3zo-eU2EZVs_nchNhhZ", "jUSDT": "EQBynBO23ywHy_CgarY9NK9FTz0yDsG82PtcbSTQgGoXwiuA", - "USDT": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs" + "USDT": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs", + "NOT": "EQAvlWFDxGF2lXm67y4yzC17wYKD9A0guwPkMs1gOsM__NOT" }, "defichain": { "DFI": "DFI", @@ -1420,7 +1421,8 @@ "USDC": "0x15D38573d2feeb82e7ad5187aB8c1D52810B1f07", "USDT": "0x0Cb6F5a34ad42ec934882A05265A7d5F59b51A2f", "HEX": "0x2b591e99afe9f32eaa6214f7b7629768c40eeb39", - "DAI": "0xefd766ccb38eaf1dfd701853bfce31359239f305" + "DAI": "0xefd766ccb38eaf1dfd701853bfce31359239f305", + "sDAI": "0x30fcb23a906493371b1721c8feb8815804808d74" }, "onus": { "WONUS": "0x4c761e48d1e735af551cc38abcbdce1d7faac6e4", @@ -1470,7 +1472,8 @@ "WETH": "0x4200000000000000000000000000000000000006", "USDbC": "0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA", "USDC": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", - "DAI": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb" + "DAI": "0x50c5725949a6f0c72e6c4a641f24049a917db0cb", + "USDT": "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2" }, "sei": { "SEI": "usei", @@ -1575,7 +1578,8 @@ "BIFI": "0x047938C3aD13c1eB821C8e310B2B6F889b6d0003", "WBTC": "0x7b8FAC5F29E101BaaB33c5f9c39d4F85ba2cc7C1", "BTCB": "0xd267F821F1b8344B5A63626c8c824697194A173E", - "BitcoinUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555" + "BitcoinUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555", + "BtcUSD": "0x6906Ccda405926FC3f04240187dd4fAd5DF6d555" }, "scroll": { "WETH": "0x5300000000000000000000000000000000000004", @@ -1810,7 +1814,8 @@ "TBTC": "0xbba2ef945d523c4e2608c9e1214c2cc64d4fc2e2" }, "btr": { - "ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2" + "ETH": "0xef63d4e178b3180beec9b0e143e0f37f4c93f4c2", + "WBTC": "0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f" }, "taiko": { "USDC": "0x07d83526730c7438048D55A4fc0b850e2aaB6f0b", @@ -1860,5 +1865,20 @@ "rari": { "WETH": "0xf037540e51d71b2d2b1120e8432ba49f29edfbd0", "USDC.e": "0xfbda5f676cb37624f28265a144a48b0d6e87d3b6" + }, + "real": { + "RWA": "0x4644066f535ead0cde82d209df78d94572fcbf14" + }, + "saakuru": { + "WOAS": "0x557a526472372f1F222EcC6af8818C1e6e78A85f", + "USDC.e": "0x739222D8A9179fE05129C77a8fa354049c088CaA" + }, + "bouncebit": { + "wstBBTC": "0x8f083eafcbba2e126ad9757639c3a1e25a061a08" + }, + "reya": { + "WETH": "0x6b48c2e6a32077ec17e8ba0d98ffc676dfab1a30", + "USDC": "0x3B860c0b53f2e8bd5264AA7c3451d41263C933F2", + "RUSD": "0xa9f32a851b1800742e47725da54a09a7ef2556a3" } -} +} \ No newline at end of file diff --git a/projects/helper/curvePools.js b/projects/helper/curvePools.js index 4c4cd6f354bb..b87da2c8dde2 100644 --- a/projects/helper/curvePools.js +++ b/projects/helper/curvePools.js @@ -347,7 +347,7 @@ module.exports = { swapContract: '0x59bf0545fca0e5ad48e13da269facd2e8c886ba4', underlyingTokens: [ '0x64343594ab9b56e99087bfa6f2335db24c2d1f17', - '0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F', + ADDRESSES.arbitrum.FRAX, ] }, // pBTC-sBTC Ethereum @@ -389,7 +389,7 @@ module.exports = { }, '0x961226b64ad373275130234145b96d100dc0b655': { swapContract: '0x961226b64ad373275130234145b96d100dc0b655', - underlyingTokens: ['0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0'] + underlyingTokens: [ADDRESSES.ethereum.FXS] }, // TOKEMAKS END diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index 5174afb0993f..a91afada5323 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -40,58 +40,6 @@ const fixBalancesTokens = { ozone: { // '0x83048f0bf34feed8ced419455a4320a735a92e9d': { coingeckoId: "ozonechain", decimals: 18 }, // was mapped to wrong chain }, - xdc: { - '0x8f9920283470f52128bf11b0c14e798be704fd15': { coingeckoId: 'comtech-gold', decimals: 18 }, - }, - - real: { - '0x4644066f535ead0cde82d209df78d94572fcbf14': { coingeckoId: 're-al', decimals: 18 }, - '0xaec9e50e3397f9ddc635c6c429c8c7eca418a143': { coingeckoId: 'arcana-2', decimals: 18 }, - '0xce1581d7b4ba40176f0e219b2cac30088ad50c7a': { coingeckoId: 'pearl', decimals: 18 }, - }, - airdao: { - [ADDRESSES.null]: { coingeckoId: 'amber', decimals: 18 }, - [ADDRESSES.airdao.USDC]: { coingeckoId: 'usd-coin', decimals: 18 }, - }, - lukso: { - [ADDRESSES.null]: { coingeckoId: "lukso-token-2", decimals: 18 }, - [ADDRESSES.lukso.WLYX]: { coingeckoId: 'lukso-token-2', decimals: 18 }, - }, - bfc: { - '0x6906Ccda405926FC3f04240187dd4fAd5DF6d555': { coingeckoId: "bitcoin-usd-btcfi", decimals: 18, }, - }, - pulse: { - '0x30fcb23a906493371b1721c8feb8815804808d74': { coingeckoId: 'savings-dai', decimals: 18 }, - }, - saakuru: { - '0x557a526472372f1F222EcC6af8818C1e6e78A85f': { coingeckoId: 'oasys', decimals: 18 }, - '0x739222D8A9179fE05129C77a8fa354049c088CaA': { coingeckoId: 'usd-coin', decimals: 6 } - }, - bouncebit: { - '0x8f083eafcbba2e126ad9757639c3a1e25a061a08': { coingeckoId: 'bouncebit-btc', decimals: 18 } - }, - ripple: { - "XRP": { coingeckoId: "ripple", decimals: 6 }, - }, - moonriver: { - '0x8b29344f368b5fa35595325903fe0eaab70c8e1f': { coingeckoId: 'polkamarkets', decimals: 18 }, - }, - moonbeam: { - '0x8b29344f368b5fa35595325903fe0eaab70c8e1f': { coingeckoId: 'polkamarkets', decimals: 18 }, - }, - xdai: { - '0x9a2a80c38abb1fdc3cb0fbf94fefe88bef828e00': { coingeckoId: 'polkamarkets', decimals: 18 }, - }, - celo: { - '0xb4d8a602fff7790eec3f2c0c1a51a475ee399b2d': { coingeckoId: 'polkamarkets', decimals: 18 }, - }, - reya: { - "0x6b48c2e6a32077ec17e8ba0d98ffc676dfab1a30": { coingeckoId: "ethereum", decimals: 18 }, - "0xa9f32a851b1800742e47725da54a09a7ef2556a3": { coingeckoId: "usd-coin", decimals: 6 }, - }, - base: { - "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2": { coingeckoId: "tether", decimals: 6 }, - }, islm: { '0x0ce35b0d42608ca54eb7bcc8044f7087c18e7717': { coingeckoId: 'usd-coin', decimals: 6 }, } diff --git a/projects/hinkal/registryTokens.js b/projects/hinkal/registryTokens.js index f85eef475e5d..2b653c698edb 100644 --- a/projects/hinkal/registryTokens.js +++ b/projects/hinkal/registryTokens.js @@ -45,7 +45,7 @@ const ETHEREUM_REGISTRY_TOKENS = [ "0xAf5191B0De278C7286d6C7CC6ab6BB8A73bA2Cd6", "0xdf55670e27bE5cDE7228dD0A6849181891c9ebA1", "0x9D0464996170c6B9e75eED71c68B99dDEDf279e8", - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, ADDRESSES.ethereum.cvxFXS, "0xBC6DA0FE9aD5f3b0d58160288917AA56653660E9", "0xB30dA2376F63De30b42dC055C93fa474F31330A5", @@ -264,7 +264,7 @@ const ARBITRUM_REGISTRY_TOKENS = [ ADDRESSES.optimism.DAI, ADDRESSES.arbitrum.MIM, "0x7f90122BF0700F9E7e1F688fe926940E8839F353", - "0x17FC002b466eEc40DaE837Fc4bE5c67993ddBd6F", + ADDRESSES.arbitrum.FRAX, "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978", "0x64343594Ab9b56e99087BfA6F2335Db24c2d1F17", "0x641441c631e2F909700d2f41FD87F0aA6A6b4EDb", @@ -570,7 +570,7 @@ const POLYGON_REGISTRY_TOKENS = [ "0x4e3Decbb3645551B8A19f0eA1678079FCB33fB4c", ADDRESSES.polygon.WMATIC_2, "0xf8a57c1d3b9629b77b6726a042ca48990A84Fb49", - "0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89", + ADDRESSES.polygon.FRAX, "0xA691D34Abf93C0A77998e53B564bEcfaf46Dae27", "0xaA91CDD7abb47F821Cf07a2d38Cc8668DEAf1bdc", "0x8343091F2499FD4b6174A46D067A920a3b851FF9", diff --git a/projects/huobi/index.js b/projects/huobi/index.js index 5c5744cc79d9..2eee4134fae1 100644 --- a/projects/huobi/index.js +++ b/projects/huobi/index.js @@ -8,7 +8,7 @@ const config = { owners: [ '12qTdZHx6f77aQ74CPCZGSY47VaRwYjVD8', '143gLvWYUojXaWZRrxquRKpVNTkhmr415B', - '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', + // '1KVpuCfhftkzJ67ZUegaMuaYey7qni7pPj', this wallet is backing USDD acording here https://prnt.sc/i3cFaak7H9Y8. For that reason, it should not included as HTX. //These 3 addresses has 48,555 #Bitcoin. This is only less than 3% of the total high value assets we have, including btc, usd, stablecoins, T-bills.. According to Justin Sun https://twitter.com/justinsuntron/status/1590311559242612743 '14XKsv8tT6tt8P8mfDQZgNF8wtN5erNu5D', '1LXzGrDQqKqVBqxfGDUyhC6rTRBN5s8Sbj', @@ -54,11 +54,8 @@ const config = { '0xf881bcb3705926cea9c598ab05a837cf41a833a9', // add on 08/08/2023 (we defillama) '0xa03400e098f4421b34a3a44a1b4e571419517687', '0x598273ea2cabd9f798564877851788c5e0d5b7b9', // start add on 23/02/2024 (we defillama) - '0x18709e89bd403f470088abdacebe86cc60dda12e', '0x4fb312915b779b1339388e14b6d079741ca83128', '0x30741289523c2e4d2a62c7d6722686d14e723851', - '0x5c985e89dde482efe97ea9f1950ad149eb73829b', - '0xe4818f8fde0c977a01da4fa467365b8bf22b071e', '0xe93381fb4c4f14bda253907b18fad305d799241a', // end add on 23/02/2024 (we defillama) '0x6663613FbD927cE78abBF7F5Ca7e2c3FE0d96d18', // add on 22/07/2024 ], @@ -102,7 +99,7 @@ const config = { 'TAuUCiH4JVNBZmDnEDZkXEUXDARdGpXTmX', 'TF2fmSbg5HAD34KPUH7WtWCxxvgXHohzYM', 'THZovMcKoZaV9zzFTWteQYd2f3NEvnzxAM', - 'TZ1SsapyhKNWaVLca6P2qgVzkHTdk6nkXa', + // 'TZ1SsapyhKNWaVLca6P2qgVzkHTdk6nkXa', // this wallet is backing USDD acording here https://prnt.sc/lvIQUtCNbk2X. For that reason, it should not included as HTX. 'TDvf1dSBhR7dEskJs17HxGHheJrjXhiFyM', 'TUJGLHo3rq4EAUY1LHRhNkHPX8qmrv9WFs', // add on 08/08/2023 (we defillama) 'TRSXRWudzfzY4jH7AaMowdMNUXDkHisbcd', // add on 08/08/2023 (we defillama) @@ -165,6 +162,9 @@ module.exports = mergeExports([ { ethereum: { tvl: stakingTVL, } } ]) module.exports.methodology = 'We added the wallets from here https://github.com/huobiapi/Tool-Node.js-VerifyAddress/blob/main/snapshot/huobi_por_20230701.csv . We are not tracking 3 wallets, 2 on Heco Chain, 1 on BTTC chain. We also count stUSDT.' +module.exports.hallmarks = [ + [1723066836,"remove usdd collateral"] +] async function stakingTVL() { diff --git a/projects/imf-money/index.js b/projects/imf-money/index.js index 486c45d8afed..3a1aa03f603f 100644 --- a/projects/imf-money/index.js +++ b/projects/imf-money/index.js @@ -1,10 +1,11 @@ const { sumTokensExport } = require('../helper/unwrapLPs') const PEPE_TOKEN_CONTRACT = '0x6982508145454Ce325dDbE47a25d4ec3d2311933'; +const MOG_TOKEN_CONTRACT = '0xaaee1a9723aadb7afa2810263653a34ba2c21c7a'; const LOCKED_MONEY_CONTRACT = '0x30F75834cB406b7093208Fda7F689938aCBD1EeB'; //wallet that has all the locked money module.exports = { methodology: 'Sums the value of deposited memes', ethereum: { - tvl: sumTokensExport({ owner: LOCKED_MONEY_CONTRACT, token: PEPE_TOKEN_CONTRACT}), + tvl: sumTokensExport({ owner: LOCKED_MONEY_CONTRACT, tokens: [PEPE_TOKEN_CONTRACT,MOG_TOKEN_CONTRACT]}), } }; diff --git a/projects/kalax/index.js b/projects/kalax/index.js index ed945f180c71..49a4905a40c5 100644 --- a/projects/kalax/index.js +++ b/projects/kalax/index.js @@ -1,20 +1,55 @@ const { sumTokens2 } = require("../helper/unwrapLPs") -const KALAX = "0x2F67F59b3629Bf24962290DB9edE0CD4127e606D" -const farms = ['0xE63153C3360aCa0F4e7Ca7A1FC61c2215FAEF5A1', '0xFe899401A1d86cC1113020fb40878c76239142a5',"0x1CB8f6cecf7c8FBB9863417f8371Cb2A076C9115"] +const blastKalax = "0x2F67F59b3629Bf24962290DB9edE0CD4127e606D" +const blastfarms = ['0xE63153C3360aCa0F4e7Ca7A1FC61c2215FAEF5A1', '0xFe899401A1d86cC1113020fb40878c76239142a5',"0x1CB8f6cecf7c8FBB9863417f8371Cb2A076C9115"] +const scrollKalax = "0x1f4F171676f8cb3B1C3FD38867B3B160679F934A" +const scrollFarms = ['0xB99AeDd16714A7393768273F9AbFF4C4F48980eD'] async function tvl(api) { + let farms = api.chain === 'blast'?blastfarms:scrollFarms + let kalax = api.chain === 'blast'?blastKalax:scrollKalax + let pools = (await api.multiCall({ abi: abiInfo.poolInfos, calls: farms })).flat() - pools - .filter((i) => i.assets !== KALAX) - .forEach((i) => api.add(i.assets, i.tvl)) + if(api.chain === 'blast'){ + pools + .filter((i) => i.assets !== kalax) + .forEach((i) => api.add(i.assets, i.tvl)) + }else{ + pools + .filter((i) => i.assets !== kalax) + .forEach((i)=>{ + if(i.assets === '0x0000000000000000000000000000000000000001'){ + i.assets ='0x0000000000000000000000000000000000000000' + } + api.add(i.assets, i.tvl) + }) + } return sumTokens2({ api, resolveLP: true }) } + +const usdt = "0xf55BEC9cafDbE8730f096Aa55dad6D22d44099Df" +const scrollKalaLp = "0x4fc09BE6eB49764CcAE4e95Bd2B93f67a34c0188" async function staking(api) { + let farms = api.chain === 'blast'?blastfarms:scrollFarms + let kalax = api.chain === 'blast'?blastKalax:scrollKalax + let pools = (await api.multiCall({ abi: abiInfo.poolInfos, calls: farms })).flat() - pools.filter((i) => i.assets === KALAX).forEach((i) => api.add(i.assets, i.tvl)) + if(api.chain === 'blast'){ + pools.filter((i) => i.assets === kalax).forEach((i) => api.add(i.assets, i.tvl)) + }else{ + let pool = pools.find(i=>i.assets === kalax) + let poolTvl = pool.tvl + let sqrtPriceX96 =await api.call({ + abi:abiInfo.state, + target:scrollKalaLp + }) + let p = (sqrtPriceX96 / 2 ** 96) ** 2 + let rate = p * 10**12 + let usdtNum = poolTvl/10**18 * rate * 10**6 + api.add(usdt,usdtNum) + } } module.exports = { @@ -22,9 +57,15 @@ module.exports = { tvl, staking, }, + scroll:{ + tvl, + staking + } } const abiInfo = { poolInfos: "function getPoolTotalTvl() view returns (tuple(uint256 pid, address assets, uint256 tvl)[])", + state: + "function state()external view returns(uint160 sqrtPrice_96)" } diff --git a/projects/kiloex/index.js b/projects/kiloex/index.js index d2a5863fafb8..04eb9a113c00 100644 --- a/projects/kiloex/index.js +++ b/projects/kiloex/index.js @@ -10,9 +10,9 @@ const taiko_owners = ["0x735D00A9368164B9dcB2e008d5Cd15b367649aD5", "0x235C5C450 module.exports = { start: 1690971144, - bsc: { tvl: sumTokensExport({ owners, tokens: [ADDRESSES.bsc.USDT, "0xc5f0f7b66764F6ec8C8Dff7BA683102295E16409", "0x80137510979822322193FC997d400D5A6C747bf7"], }) }, + bsc: { tvl: sumTokensExport({ owners, tokens: [ADDRESSES.bsc.USDT, ADDRESSES.ethereum.FDUSD, ADDRESSES.scroll.STONE], }) }, op_bnb: { - tvl: sumTokensExport({ owners: opbnb_owners, tokens: [ADDRESSES.op_bnb.USDT, "0x50c5725949a6f0c72e6c4a641f24049a917db0cb","0x4200000000000000000000000000000000000006"] }) + tvl: sumTokensExport({ owners: opbnb_owners, tokens: [ADDRESSES.op_bnb.USDT, ADDRESSES.base.DAI,ADDRESSES.optimism.WETH_1] }) }, manta: { tvl: sumTokensExport({ owners: manta_owners, tokens: [ADDRESSES.manta.USDT, manta_stone_token, manat_manta_token] }) diff --git a/projects/limitless/index.js b/projects/limitless/index.js index a0edc079acc5..da315123fc9b 100644 --- a/projects/limitless/index.js +++ b/projects/limitless/index.js @@ -4,10 +4,11 @@ const { getUniqueAddresses } = require("../helper/utils") const sdk = require('@defillama/sdk') const config = { - base: { postionManager: '0x3eF54A2Cf152f6E06C0928722412883D448F92eC', factory: '0x33128a8fC17869897dcE68Ed026d694621f6FDfD', limWETH: '0x845d629D2485555514B93F05Bdbe344cC2e4b0ce', marginContract: '0x536801AaE40cb214c08f178c6727d7594a7c655b', graphEndpoint: 'https://api.studio.thegraph.com/query/71042/limitless-subgraph-base/version/latest', dataProvider: '0x87E697c3EBe41eD707E4AD52541f19292Be81177', lmQuoter: '0xED14586763578147136e55D20a0Ee884Cd8fBC6d', }, - arbitrum: { postionManager: '0x6D73fc6F4C299E369377C0e60CebFef2409f86A0', factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984', limWETH: '0xdEe4326E0a8B5eF94E50a457F7c70d4821be9f4C', }, + base: { postionManager: '0x6822063E39f1b8F40373402Ac96963B383877B3C', factory: '0x33128a8fC17869897dcE68Ed026d694621f6FDfD', limWETH: '0x845d629D2485555514B93F05Bdbe344cC2e4b0ce', marginContract: '0x536801AaE40cb214c08f178c6727d7594a7c655b', graphEndpoint: 'https://api.studio.thegraph.com/query/71042/limitless-subgraph-base/version/latest', dataProvider: '0x87E697c3EBe41eD707E4AD52541f19292Be81177', lmQuoter: '0xED14586763578147136e55D20a0Ee884Cd8fBC6d', }, + arbitrum: { postionManager: '0xf3B0362a5F210Fd826E74b3b10b269D4044085e5', factory: '0x1F98431c8aD98523631AE4a59f267346ea31F984', limWETH: '0x3a4F8E8512624226d2aC14fE496Bb9A4DdB73a9a', marginContract: '0x3611CD2B957514222a94C93e1A9a5be66b0b2841', graphEndpoint: 'https://api.studio.thegraph.com/query/71042/limitless-subgraph-arbitrum/version/latest', dataProvider: '0x9139929dFbEeDfB03bbF8B59b4005BC631529b14', lmQuoter: '0x2E4a9Eb87375D518F4c4473a845D56AAbf1967FE', }, linea: { postionManager: '0x726e3116AE07f43A7E1921c635352B75e2DEa4Ad', factory: '0x31FAfd4889FA1269F7a13A66eE0fB458f27D72A9', limWETH: '0x5188b47Cb80D1A3E22Cc6221792F199f1Fb0DD3c', }, } + const liquidityProvidedQuery = ` query($lastId: String, $block: Int) { liquidityProvideds( diff --git a/projects/lobis.js b/projects/lobis.js index 5ca84c198591..444a4e7c517e 100644 --- a/projects/lobis.js +++ b/projects/lobis.js @@ -6,7 +6,7 @@ module.exports = ohmTvl(treasury, [ //curve [ADDRESSES.ethereum.CRV, false], //frax - ["0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0", false], + [ADDRESSES.ethereum.FXS, false], //Sushi LP ["0x2734f4a846d1127f4b5d3bab261facfe51df1d9a", true], ], "ethereum", "0x3818eff63418e0a0ba3980aba5ff388b029b6d90", "0xdec41db0c33f3f6f3cb615449c311ba22d418a8d") diff --git a/projects/lore/index.js b/projects/lore/index.js new file mode 100644 index 000000000000..35520fc00160 --- /dev/null +++ b/projects/lore/index.js @@ -0,0 +1,5 @@ +const { aaveExports } = require('../helper/aave') + +module.exports = { + scroll: aaveExports("scroll", "0xBc6DE4458b7D6fbf82240ce8cC0CA6a2f4986eb5"), +} diff --git a/projects/lynx/index.js b/projects/lynx/index.js index 38ecda6e9e89..84a8d36aee6f 100644 --- a/projects/lynx/index.js +++ b/projects/lynx/index.js @@ -22,7 +22,7 @@ const config = { ], [ // USDC Token - "0x04068da6c83afcfa0e13ba15a6696662335d5b75", + ADDRESSES.fantom.USDC, // OFTChipAdapter (owner) "0x194609ea1C1D77e66eaB28C48CE266A48f3bC30a", ], @@ -90,7 +90,7 @@ const config = { tokenAndOwnerPair: [ [ // stEUR Token - "0x004626a008b1acdc4c74ab51644093b155e59a23", + ADDRESSES.celo.STEUR, // OFTChipAdapter (owner) "0xc5e782e2a4e2cfcb7ed454cf5a7b6aa2bb424b90", ], diff --git a/projects/mangrove/index.js b/projects/mangrove/index.js index 30240ab1cbb6..4063ddd38040 100644 --- a/projects/mangrove/index.js +++ b/projects/mangrove/index.js @@ -1,9 +1,12 @@ const abi = require("./abi.json"); const { BigNumber } = require("bignumber.js"); -const mgvReader = "0x26fD9643Baf1f8A44b752B28f0D90AEBd04AB3F8"; +const mgvReaders = { + blast: "0x26fD9643Baf1f8A44b752B28f0D90AEBd04AB3F8", + arbitrum: "0x7E108d7C9CADb03E026075Bf242aC2353d0D1875", +}; -const getOffers = async (api, { tkn0, tkn1, tickSpacing }) => { +const getOffers = async (api, mgvReader, { tkn0, tkn1, tickSpacing }) => { let total = BigNumber(0); let currentId = 0; do { @@ -25,7 +28,7 @@ const getOffers = async (api, { tkn0, tkn1, tickSpacing }) => { return total; }; -async function getMangroveTVL(api) { +async function getMangroveTVL(api, mgvReader) { const markets = await api.call({ target: mgvReader, abi: abi.openMarkets, @@ -33,18 +36,30 @@ async function getMangroveTVL(api) { for (const market of markets) { const [tkn0, tkn1, tickSpacing] = market; - const tkn0TPV = await getOffers(api, { tkn0, tkn1, tickSpacing }); - const tkn1TPV = await getOffers(api, { tkn0: tkn1, tkn1: tkn0, tickSpacing }); + const tkn0TPV = await getOffers(api, mgvReader, { + tkn0, + tkn1, + tickSpacing, + }); + const tkn1TPV = await getOffers(api, mgvReader, { + tkn0: tkn1, + tkn1: tkn0, + tickSpacing, + }); api.addTokens([tkn0, tkn1], [tkn0TPV, tkn1TPV]); } } module.exports = { - blast: { - tvl: getMangroveTVL, - }, misrepresentedTokens: false, - methodology: "TVL is calculated by getting the total promised liquidity on the orderbook on a specific block.", + methodology: + "TVL is calculated by getting the total promised liquidity on the orderbook on a specific block.", start: 1708992000, }; + +for (const chain in mgvReaders) { + module.exports[chain] = { + tvl: (api) => getMangroveTVL(api, mgvReaders[chain]), + }; +} diff --git a/projects/meanfinance/addresses.js b/projects/meanfinance/addresses.js index e06c3fb11a5d..5139a45ed63a 100644 --- a/projects/meanfinance/addresses.js +++ b/projects/meanfinance/addresses.js @@ -44,7 +44,7 @@ const TOKENS_IN_LEGACY_VERSIONS = { '0x2c89bbc92bd86f8075d1decc58c7f4e0107f286b', // AVAX '0x3066818837c5e6ed6601bd5a91b0762877a6b731', // UMA '0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4', // stMATIC - '0x45c32fa6df82ead1e2ef74d17b76547eddfaff89', // FRAX + ADDRESSES.polygon.FRAX, // FRAX '0x4e3decbb3645551b8a19f0ea1678079fcb33fb4c', // jEUR '0x50b728d8d964fd00c2d0aad81718b71311fef68a', // SNX '0x53e0bca35ec356bd5dddfebbd1fc0fd03fabad39', // LINK diff --git a/projects/nearlenddao/index.js b/projects/nearlenddao/index.js new file mode 100644 index 000000000000..c3591ac0b1a8 --- /dev/null +++ b/projects/nearlenddao/index.js @@ -0,0 +1,29 @@ +const { call, sumSingleBalance, sumTokens } = require('../helper/chain/near') +const NEARLEND_DAO_CONTRACT = 'v1.nearlend-official.near' + +async function borrowed() { + const balances = {}; + const assetsCallResponse = await call(NEARLEND_DAO_CONTRACT, 'get_assets_paged', {}); + + assetsCallResponse.forEach(([token, asset]) => { + const extraDecimals = asset.config.extra_decimals; + sumSingleBalance(balances, token, asset.borrowed.balance / (10 ** extraDecimals)); + }) + + return balances; +} + +async function tvl(api) { + const assetsCallResponse = await call(NEARLEND_DAO_CONTRACT, 'get_assets_paged', {}); + const tokens = assetsCallResponse.map(([token]) => token); + return sumTokens({ owners: [NEARLEND_DAO_CONTRACT], tokens }); +} + +module.exports = { + near: { + tvl, + borrowed, + }, + timetravel: false, + methodology: 'Summed up all the tokens deposited in their main lending contract' +} diff --git a/projects/nimbora-yield/index.js b/projects/nimbora-yield/index.js index 41ba202628e5..70f2db349333 100644 --- a/projects/nimbora-yield/index.js +++ b/projects/nimbora-yield/index.js @@ -28,7 +28,7 @@ async function tvl(api) { const strategyData = await getConfig('nimbora-yield', undefined, { fetcher }) for (let index = 0; index < strategyData.length; index++) { const strategyInfo = strategyData[index]; - const underlying = parseAddress(strategyInfo.underlying) == "0x05574eb6b8789a91466f902c380d978e472db68170ff82a5b650b95a58ddf4ad" ? ADDRESSES.starknet.DAI : parseAddress(strategyInfo.underlying); + const underlying = parseAddress(strategyInfo.underlying) == ADDRESSES.starknet.DAI_1 ? ADDRESSES.starknet.DAI : parseAddress(strategyInfo.underlying); const strategyTvl = await call({ target: strategyInfo.tokenManager, abi: totalAssetsAbi }); api.add(underlying, strategyTvl) } diff --git a/projects/nomad/index.js b/projects/nomad/index.js index 03d5464f891f..a9b18f894b41 100644 --- a/projects/nomad/index.js +++ b/projects/nomad/index.js @@ -29,7 +29,7 @@ const TOKEN_ADDRESSES = [ }, { // FXS - 'ethereum': '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0' + 'ethereum': ADDRESSES.ethereum.FXS }, { 'ethereum': ADDRESSES.ethereum.WETH diff --git a/projects/olympus/index.js b/projects/olympus/index.js index 2a83b091b661..f3713bd1ac6a 100644 --- a/projects/olympus/index.js +++ b/projects/olympus/index.js @@ -31,7 +31,7 @@ const addressMap = { "0xb23dfc0c4502a271976f1ee65321c51be2529640": "0x76fcf0e8c7ff37a47a799fa2cd4c13cde0d981c9", //aura50OHM-50DAI -> 50OHM-50DAI "0xc8418af6358ffdda74e09ca9cc3fe03ca6adc5b0": - "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0", // veFXS -> FXS + ADDRESSES.ethereum.FXS, // veFXS -> FXS "0x3fa73f1e5d8a792c80f426fc8f84fbf7ce9bbcac": "0xc0c293ce456ff0ed870add98a0828dd4d2903dbf", //vlAURA -> AURA [ADDRESSES.ethereum.vlCVX]: diff --git a/projects/pancake-stryke/index.js b/projects/pancake-stryke/index.js new file mode 100644 index 000000000000..c73068a60ff7 --- /dev/null +++ b/projects/pancake-stryke/index.js @@ -0,0 +1,21 @@ +const config = { + arbitrum: { + pools: [ + "0x501B03BdB431154b8Df17BF1c00756E3a8F21744", // WETHUSDC + "0x550e7E236912DaA302F7d5D0d6e5D7b6EF191f04", // WBTCUSDC + "0x4eed3A2b797Bf5630517EcCe2e31C1438A76bb92", // ARBUSDC + ], + }, +} + +Object.keys(config).forEach(chain => { + const { pools } = config[chain] + module.exports[chain] = { + tvl: async (api) => { + const callAssets = await api.multiCall({ abi: 'address:callAsset', calls: pools }) + const putAssets = await api.multiCall({ abi: 'address:putAsset', calls: pools }) + + return api.sumTokens({ tokensAndOwners2: [callAssets.concat(putAssets), pools.concat(pools)]}) + } + } +}) \ No newline at end of file diff --git a/projects/polkamarkets/index.js b/projects/polkamarkets/index.js index 1ef688224453..8d654cd55e4f 100644 --- a/projects/polkamarkets/index.js +++ b/projects/polkamarkets/index.js @@ -41,7 +41,7 @@ const config = { ], v2: { contract: '0x60d7956805ec5a698173def4d0e1ecdefb06cc57', - tokens: ['0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'], + tokens: [ADDRESSES.polygon.WMATIC_2, ADDRESSES.polygon.USDC, ADDRESSES.polygon.USDT], }, }, xdai: { diff --git a/projects/polygon/index.js b/projects/polygon/index.js index 90168975dadd..4af516fc7fe1 100644 --- a/projects/polygon/index.js +++ b/projects/polygon/index.js @@ -74,7 +74,7 @@ async function tvl(_, block, _c) { '0x1494ca1f11d487c2bbe4543e90080aeba4ba3c2b', '0xc944e90c64b2c07662a292be6244bdf05cda44a7', '0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828', - '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0', + ADDRESSES.ethereum.FXS, '0x43Dfc4159D86F3A37A5A4B3D4580b888ad7d4DDd', '0x0cec1a9154ff802e7934fc916ed7ca50bde6844e', '0xa47c8bf37f92abed4a126bda807a7b7498661acd', diff --git a/projects/poolz-vesting/index.js b/projects/poolz-vesting/index.js new file mode 100644 index 000000000000..a5f64f55e856 --- /dev/null +++ b/projects/poolz-vesting/index.js @@ -0,0 +1,27 @@ +const config = { + bsc: { factory: '0xd82c03bd0543b567c9cec7b822373be2b167f00f', POOLX: '0xbAeA9aBA1454DF334943951d51116aE342eAB255',lockedDealV2: '0x436CE2ce8d8d2Ccc062f6e92faF410DB4d397905', }, + base: { factory: '0x7ff9315f538df7ec76ec4815249dd30519726460', }, + arbitrum: { factory: '0x9cfd8c7834be0dfe41f3fe68c29124066d5cd13b', lockedDealV2: '0x7Ff9315f538dF7eC76Ec4815249Dd30519726460', }, + ethereum: { factory: '0x9ff1db30c66cd9d3311b4b22da49791610922b13', lockedDealV2: '0x285B4866257eF51FfBDD239c10dE5f9493413d8f', }, + manta: { factory: '0x7Ff9315f538dF7eC76Ec4815249Dd30519726460', }, + telos: { factory: '0x2Bb9cFF524C76eb2eA27bC6cDbB93447115D8dcC', }, + polygon: { factory: '0x06fd710fD167f1f08b61e457F41D6e7c7DD9AF3D', lockedDealV2: '0x9D13B213852669077131f8A24A676f27ab0C2931', }, +} + +Object.keys(config).forEach(chain => { + const { factory, POOLX, blacklistedTokens = [], lockedDealV2, } = config[chain] + module.exports[chain] = { + tvl: () => ({}), + vesting: async (api) => { + if (POOLX) blacklistedTokens.push(POOLX) + const tokens = await api.fetchList({ lengthAbi: 'totalVaults', itemAbi: 'vaultIdToTokenAddress', target: factory }) + const vaults = await api.fetchList({ lengthAbi: 'totalVaults', itemAbi: 'vaultIdToVault', target: factory }) + if (lockedDealV2) await api.sumTokens({ owner: lockedDealV2, tokens, blacklistedTokens, }) + return api.sumTokens({ tokensAndOwners2: [tokens, vaults], blacklistedTokens }) + } + } + if (POOLX) module.exports[chain].staking = async (api) => { + const vaults = await api.fetchList({ lengthAbi: 'totalVaults', itemAbi: 'vaultIdToVault', target: factory }) + return api.sumTokens({ owners: vaults, tokens: [POOLX] }) + } +}) \ No newline at end of file diff --git a/projects/predx/index.js b/projects/predx/index.js index c3b0100d2eee..cde2245fe818 100644 --- a/projects/predx/index.js +++ b/projects/predx/index.js @@ -1,16 +1,17 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { zklink: { tvl: sumTokensExport({ owners: ["0x986Ca3A4F05AA7EA5733d81Da6649043f43cB9A8"], - tokens: ["0x2F8A25ac62179B31D62D7F80884AE57464699059"] + tokens: [ADDRESSES.zklink.USDT] }), }, base: { tvl: sumTokensExport({ owners: ["0xa6368fd44e699f6bca2ab3a02C44beFCA7257cF4"], - tokens: ["0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"] + tokens: [ADDRESSES.base.USDC] }), }, sei: { @@ -22,19 +23,19 @@ module.exports = { linea: { tvl: sumTokensExport({ owners: ["0xF9AD26Bb325f4C82F26bF2549b65e6f9a4a04a78"], - tokens: ["0x176211869cA2b568f2A7D4EE941E073a821EE1ff"] + tokens: [ADDRESSES.linea.USDC] }), }, bsc: { tvl: sumTokensExport({ owners: ["0x38Db024F8EA400A57c15C25D1DC46aE868C08a2F"], - tokens: ["0x55d398326f99059fF775485246999027B3197955"] + tokens: [ADDRESSES.bsc.USDT] }), }, mantle: { tvl: sumTokensExport({ owners: ["0x38Db024F8EA400A57c15C25D1DC46aE868C08a2F"], - tokens: ["0x09Bc4E0D864854c6aFB6eB9A9cdF58aC190D0dF9"] + tokens: [ADDRESSES.mantle.USDC] }), }, btr: { diff --git a/projects/primex-finance/index.js b/projects/primex-finance/index.js index d2bc988eaba0..78d3fb750c23 100644 --- a/projects/primex-finance/index.js +++ b/projects/primex-finance/index.js @@ -21,7 +21,7 @@ const config = { EPMX: "0xDc6D1bd104E1efa4A1bf0BBCf6E0BD093614E31A", OM: "0xc3ec80343d2bae2f8e680fdadde7c17e71e114ea", SAND: "0xbbba073c31bf03b8acf7c28ef0738decf3695683", - QUICK: "0xb5c064f955d8e7f38fe0460c556a72987494ee17", + QUICK: ADDRESSES.polygon.QUICK, UNI: "0xb33eaad8d922b1083446dc23f610c2567fb5180f", MANA: "0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4", BAL: "0x9a71012b13ca4d3d0cdc72a177df3ef03b0e76a3", diff --git a/projects/primitive/abi.json b/projects/primitive/abi.json deleted file mode 100644 index bb002254d713..000000000000 --- a/projects/primitive/abi.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "risky": "address:risky", - "stable": "address:stable" -} \ No newline at end of file diff --git a/projects/primitive/index.js b/projects/primitive/index.js index 4ef2810089dd..92c9ae42a13b 100644 --- a/projects/primitive/index.js +++ b/projects/primitive/index.js @@ -5,6 +5,6 @@ const v1TVL = require('./v1') module.exports = { ethereum: { start: 1647932400, // unix timestamp (utc 0) specifying when the project began, or where live data begins - tvl: sdk.util.sumChainTvls([rmmTVL, v1TVL]), // + tvl: sdk.util.sumChainTvls([rmmTVL, v1TVL, ]), // }, } \ No newline at end of file diff --git a/projects/primitive/rmm.js b/projects/primitive/rmm.js index 74bfe74e2274..2656aace690e 100644 --- a/projects/primitive/rmm.js +++ b/projects/primitive/rmm.js @@ -1,29 +1,11 @@ -const sdk = require('@defillama/sdk') -const {sumTokens} = require("../helper/unwrapLPs"); -const abi = require("./abi.json"); - const engine_weth_usdc = '0xd3541aD19C9523c268eDe8792310867C57BE39e4' // WETH-USDC Pair const engines = [engine_weth_usdc] -module.exports = async function tvl(time, ethBlock, chainBlocks) { - const [{output: risky}, {output: stable}] = await Promise.all([ - sdk.api.abi.multiCall({ - abi: abi['risky'], - calls: engines.map(e => ({target: e})), - block: ethBlock, - }), - sdk.api.abi.multiCall({ - abi: abi['stable'], - calls: engines.map(e => ({target: e})), - block: ethBlock, - }) - ]) - - const tokensAndOwners = risky.map((call, idx) => [ - [call.output, call.input.target], - [stable[idx].output, call.input.target] - ]).flat() - const balances = {} - await sumTokens(balances, tokensAndOwners, ethBlock, 'ethereum') - return balances +module.exports = async function tvl(api) { + const risky = await api.multiCall({ abi: 'address:risky', calls: engines}) + const stable = await api.multiCall({ abi: 'address:stable', calls: engines}) + const toa = [] + risky.forEach((v, i) => toa.push([v, engines[i]])) + stable.forEach((v, i) => toa.push([v, engines[i]])) + return api.sumTokens({ tokensAndOwners: toa }) } \ No newline at end of file diff --git a/projects/primitive/v1.js b/projects/primitive/v1.js index da4c2082b7f8..ecf1b391b98f 100644 --- a/projects/primitive/v1.js +++ b/projects/primitive/v1.js @@ -1,270 +1,24 @@ -const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require('@defillama/sdk') -const BigNumber = require('bignumber.js') -const getCacheBalances = 'function getCacheBalances() view returns (uint256, uint256)' const getUnderlyingTokenAddress = "address:getUnderlyingTokenAddress" const getStrikeTokenAddress = "address:getStrikeTokenAddress" -const redeemToken = "address:redeemToken" -const getPair = 'function getPair(address, address) view returns (address)' -const token0 = 'address:token0' -const token1 = 'address:token1' -const getReserves = 'function getReserves() view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)' const { getLogs } = require('../helper/cache/getLogs') const START_BLOCK = 11142900 const REGISTRY = '0x16274044dab9635Df2B5AeAF7CeCb5f381c71680' -const FACTORY = '0xC0AEe478e3658e2610c5F7A4A2E1777cE9e4f2Ac' -const ZERO_ADDRESS = ADDRESSES.null module.exports = async function tvl(api) { - const block = api.block - - const logs = ( - await getLogs({ - api, - target: REGISTRY, - fromBlock: START_BLOCK, - topic: 'DeployedOptionClone(address,address,address)', - }) - ) - - const optionAddresses = logs - .map((log) => `0x${log.topics[2].substring(26)}`) - .map((optionAddress) => optionAddress.toLowerCase()) - - const allRedeemAddresses = logs - .map((log) => `0x${log.topics[3].substring(26)}`) - .map((redeemAddress) => redeemAddress.toLowerCase()) - - const [ - underlyingAddresses, - strikeAddresses, - redeemAddresses, - ] = await Promise.all([ - sdk.api.abi - .multiCall({ - abi: getUnderlyingTokenAddress, - calls: optionAddresses.map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - .then(({ output }) => output), - sdk.api.abi - .multiCall({ - abi: getStrikeTokenAddress, - calls: optionAddresses.map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - .then(({ output }) => output), - sdk.api.abi - .multiCall({ - abi: redeemToken, - calls: optionAddresses.map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - .then(({ output }) => output), - ]) - - const options = {} - // add underlyingAddresses - underlyingAddresses.forEach((underlyingAddress) => { - const tokenAddress = underlyingAddress.output.toLowerCase() - - const optionAddress = underlyingAddress.input.target.toLowerCase() - options[optionAddress] = { - underlyingAddress: tokenAddress, - } - }) - - // add strikeAddresses - strikeAddresses.forEach((strikeAddress) => { - const tokenAddress = strikeAddress.output.toLowerCase() - const optionAddress = strikeAddress.input.target.toLowerCase() - options[optionAddress] = { - ...(options[optionAddress] || {}), - strikeAddress: tokenAddress, - } - }) - - redeemAddresses.forEach((redeemAddress) => { - const tokenAddress = redeemAddress.output.toLowerCase() - const optionAddress = redeemAddress.input.target.toLowerCase() - options[optionAddress] = { - ...(options[optionAddress] || {}), - redeemAddress: tokenAddress, - } - }) - - // The internally tracked balances of underlying and strike tokens in the Primitive option contracts - const caches = ( - await sdk.api.abi.multiCall({ - abi: getCacheBalances, - calls: Object.keys(options).map((optionAddress) => ({ - target: optionAddress, - })), - block, - }) - ).output - - // ===== Sushiswap Pools ===== - - const optionPairAddresses = ( - await sdk.api.abi.multiCall({ - abi: getPair, - calls: Object.keys(options).map((optionAddress, i) => ({ - target: FACTORY, - params: [ - options[optionAddress].underlyingAddress, - options[optionAddress].redeemAddress, - ], - })), - block, - }) - ).output - - const optionPairs = [] - - optionPairAddresses.forEach((optionPairAddress) => { - const marketAddress = optionPairAddress.output.toLowerCase() - if (marketAddress !== ZERO_ADDRESS) optionPairs.push(marketAddress) - }) - - const [token0Addresses, token1Addresses] = await Promise.all([ - sdk.api.abi - .multiCall({ - abi: token0, - calls: optionPairs.map((marketAddress) => ({ - target: marketAddress, - })), - block, - }) - .then(({ output }) => output), - sdk.api.abi - .multiCall({ - abi: token1, - calls: optionPairs.map((marketAddress) => ({ - target: marketAddress, - })), - block, - }) - .then(({ output }) => output), - ]) - - const pairs = {} - // add token0Addresses - token0Addresses.forEach((token0Address) => { - const tokenAddress = token0Address.output.toLowerCase() - - if ( - allRedeemAddresses.indexOf(tokenAddress) != -1 - ) { - const pairAddress = token0Address.input.target.toLowerCase() - pairs[pairAddress] = { - token0Address: tokenAddress, - } - } - }) - - // add token1Addresses - token1Addresses.forEach((token1Address) => { - const tokenAddress = token1Address.output.toLowerCase() - if ( - allRedeemAddresses.indexOf(tokenAddress) != -1 - ) { - const pairAddress = token1Address.input.target.toLowerCase() - pairs[pairAddress] = { - ...(pairs[pairAddress] || {}), - token1Address: tokenAddress, - } - } - }) - - // Reserves of option pools in Sushiswap - const reserves = ( - await sdk.api.abi.multiCall({ - abi: getReserves, - calls: Object.keys(pairs).map((pairAddress) => ({ - target: pairAddress, - })), - block, - }) - ).output - - // ===== Accumulators ===== - - // accumulate the balances in the Sushiswap option pools - const inSushiSwap = reserves.reduce((accumulator, reserve, i) => { - const pairAddress = reserve.input.target.toLowerCase() - const pair = pairs[pairAddress] || {} - - // handle reserve0 - if (pair.token0Address) { - const reserve0 = new BigNumber(reserve.output['0']) - if (!reserve0.isZero()) { - const existingBalance = new BigNumber( - accumulator[pair.token0Address] || '0' - ) - - accumulator[pair.token0Address] = existingBalance - .plus(reserve0) - .toFixed() - } - } - - // handle reserve1 - if (pair.token1Address) { - const reserve1 = new BigNumber(reserve.output['1']) - - if (!reserve1.isZero()) { - const existingBalance = new BigNumber( - accumulator[pair.token1Address] || '0' - ) - - accumulator[pair.token1Address] = existingBalance - .plus(reserve1) - .toFixed() - } - } - - return accumulator - }, {}) - - // accumulate the caches of Primitive with the reserves of Sushiswap - return caches.reduce((accumulator, cache, i) => { - const optionAddress = cache.input.target.toLowerCase() - const option = options[optionAddress] || {} - - // handle underlyingCache - if (option.underlyingAddress) { - const underlyingCache = new BigNumber(cache.output['0']) - - const existingBalance = new BigNumber( - accumulator[option.underlyingAddress] || '0' - ) - - accumulator[option.underlyingAddress] = existingBalance - .plus(underlyingCache) - .toFixed() - } - - // handle strikeCache - if (option.strikeAddress) { - const strikeCache = new BigNumber(cache.output['1']) - - const existingBalance = new BigNumber( - accumulator[option.strikeAddress] || '0' - ) - - accumulator[option.strikeAddress] = existingBalance - .plus(strikeCache) - .toFixed() - } - - return accumulator - }, inSushiSwap) + const logs = (await getLogs({ + api, + target: REGISTRY, + fromBlock: START_BLOCK, + onlyArgs: true, + eventAbi: 'event DeployedOptionClone (address indexed from, address indexed optionAddress, address indexed redeemAddress)' + })) + + const tokensAndOwners = [] + const options = logs.map(i => i.optionAddress) + const underlying = await api.multiCall({ abi: getUnderlyingTokenAddress, calls: options}) + const strikes = await api.multiCall({ abi: getStrikeTokenAddress, calls: options}) + underlying.forEach((v, i) => tokensAndOwners.push([v, options[i]])) + strikes.forEach((v, i) => tokensAndOwners.push([v, options[i]])) + return api.sumTokens({ tokensAndOwners }) } diff --git a/projects/prosper/index.js b/projects/prosper/index.js deleted file mode 100644 index f4ee0239426b..000000000000 --- a/projects/prosper/index.js +++ /dev/null @@ -1,20 +0,0 @@ -const utils = require('../helper/utils') -const BigNumber = require('bignumber.js') - -const currentPoolEndpoint = 'https://avax.prosper.so/api/actualPool?chainId=43114&asset=AVAX%2FUSD&duration=60&token=AVAX' -const avaxCoingeckoId = 'avalanche-2' - -async function tvl(timestamp, block) { - const currentPool = await utils.fetchURL(currentPoolEndpoint) - const tvl = BigNumber(currentPool.data.bearsQuote).plus(currentPool.data.bullsQuote).div(1e18) - - return { - [avaxCoingeckoId]: tvl.toNumber() - } -} - -module.exports = { - avax:{ - tvl, - }, -} \ No newline at end of file diff --git a/projects/pstake-btc/index.js b/projects/pstake-btc/index.js new file mode 100644 index 000000000000..8fc11f236578 --- /dev/null +++ b/projects/pstake-btc/index.js @@ -0,0 +1,11 @@ +const { sumTokensExport } = require("../helper/sumTokens"); +const sdk = require("@defillama/sdk"); + +const owner = "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d"; + +module.exports = { + methodology: `Total amount of BTC in ${owner}.`, + bitcoin: { + tvl: sdk.util.sumChainTvls([sumTokensExport({ owner })]), + }, +}; \ No newline at end of file diff --git a/projects/pstake/index.js b/projects/pstake/index.js index 152e4a171359..000d7f5832c2 100644 --- a/projects/pstake/index.js +++ b/projects/pstake/index.js @@ -66,13 +66,8 @@ function cosmostvl() { }; } -const owner = "bc1qajcp935tuvqakut95f0sc9qm09hxjj6egexl9d"; - module.exports = { methodology: `Total amount of liquid staked tokens on Persistence.`, bsc: { tvl: bsctvl }, persistence: { tvl: cosmostvl() }, - bitcoin: { - tvl: sdk.util.sumChainTvls([sumTokensExport({ owner })]), - }, }; diff --git a/projects/pumpbtc/index.js b/projects/pumpbtc/index.js index bce675989a47..f49afeaa69e2 100644 --- a/projects/pumpbtc/index.js +++ b/projects/pumpbtc/index.js @@ -5,7 +5,7 @@ module.exports = { } const config = { ethereum: { owners: ['0x1fCca65fb6Ae3b2758b9b2B394CB227eAE404e1E', '0x3d9bCcA8Bc7D438a4c5171435f41a0AF5d5E6083'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364', ADDRESSES.ethereum.WBTC], }, - bsc: { owners: ['0x2Ee808F769AB697C477E0aF8357315069b66bCBb'], tokens: ['0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c'], }, + bsc: { owners: ['0x2Ee808F769AB697C477E0aF8357315069b66bCBb'], tokens: [ADDRESSES.bsc.BTCB], }, mantle: { owners: ['0xd6Ab15B2458B6EC3E94cE210174d860FdBdd6b96'], tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364'], }, } diff --git a/projects/radial/index.js b/projects/radial/index.js index 3ba2035c4e1d..f3d6c0ce01e4 100644 --- a/projects/radial/index.js +++ b/projects/radial/index.js @@ -1,243 +1,18 @@ const { - standardPoolInfoAbi, - getPoolInfo, - getSymbolsAndBalances, - isLP, - isYV, - } = require("../helper/masterchef"); - const sdk = require("@defillama/sdk"); - const { default: BigNumber } = require("bignumber.js"); - const { handleYearnTokens } = require("../creditum/helper.js"); - const { unwrapUniswapLPs } = require("../helper/unwrapLPs"); - - const tokenAbi = 'address:token' - const token0Abi = 'address:token0' - const token1Abi = 'address:token1' - const getReservesAbi = 'function getReserves() view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast)' - const shareValue = "uint256:getShareValue"; - const xSCREAM = "0xe3D17C7e840ec140a7A51ACA351a482231760824"; - const xCREDIT = "0xd9e28749e80D867d5d14217416BFf0e668C10645"; - const shareTarot = 'function shareValuedAsUnderlying(uint256 _share) returns (uint256 underlyingAmount_)'; - const xTAROT = "0x74D1D2A851e339B8cB953716445Be7E8aBdf92F4"; - const fBEET = "0xfcef8a994209d6916EB2C86cDD2AFD60Aa6F54b1"; - const masterChef = "0x6f536B36d02F362CfF4278190f922582d59E7e08"; - const chain = "fantom"; - const tokenIsOnCoingecko = true; - const includeYVTokens = true; - const stakingToken = "0xf04d7f53933becbf51ddf1f637fe7ecaf3d4ff94"; - - async function tvl(timestamp, ethBlock, {[chain]: block}) { - const transform = i => `fantom:${i}`; - - const poolInfo = await getPoolInfo( - masterChef, - block, - chain, - standardPoolInfoAbi - ); - const [symbols, tokenBalances] = await getSymbolsAndBalances( - masterChef, - block, - chain, - poolInfo - ); - - const balances = {}; - - const lpPositions = []; - - await Promise.all( - symbols.output.map(async (symbol, idx) => { - const balance = tokenBalances.output[idx].output; - const token = symbol.input.target.toLowerCase(); - if (token === stakingToken) { - return; - } else if (isLP(symbol.output, token, chain)) { - lpPositions.push({ - balance, - token, - }); - } else if (includeYVTokens && isYV(symbol.output)) { - let underlyingToken = ( - await sdk.api.abi.call({ - target: token, - abi: tokenAbi, - block, - chain, - }) - ).output; - sdk.util.sumSingleBalance( - balances, - transform(underlyingToken), - balance - ); - } else { - sdk.util.sumSingleBalance(balances, transform(token), balance); - } - }) - ); - - const [token0, token1] = await Promise.all([ - sdk.api.abi.multiCall({ - calls: lpPositions.map((p) => ({ - target: p.token, - })), - abi: token0Abi, - block, - chain, - }), - sdk.api.abi.multiCall({ - calls: lpPositions.map((p) => ({ - target: p.token, - })), - abi: token1Abi, - block, - chain, - }), - ]); - - const pool2LpPositions = []; - const outsideLpPositions = []; - lpPositions.forEach((position, idx) => { - if ( - token0.output[idx].output.toLowerCase() === stakingToken || - token1.output[idx].output.toLowerCase() === stakingToken - ) { - pool2LpPositions.push(position); - } else { - outsideLpPositions.push(position); - } - }); - await unwrapUniswapLPs(balances, outsideLpPositions, block, chain, transform); - - if (!tokenIsOnCoingecko) { - const maxPool2ByToken = ( - await sdk.api.abi.multiCall({ - calls: pool2LpPositions.map((p) => ({ - target: stakingToken, - params: [p.token], - })), - abi: "erc20:balanceOf", - block, - chain, - }) - ).output.reduce((max, curr) => { - if (BigNumber(curr.output).gt(max.output)) { - return curr; - } - return max; - }); - const poolAddress = maxPool2ByToken.input.params[0].toLowerCase(); - const poolReserves = await sdk.api.abi.call({ - block, - chain, - abi: getReservesAbi, - target: poolAddress, - }); - const posToken0 = token0.output.find( - (t) => t.input.target.toLowerCase() === poolAddress - ).output; - const posToken1 = token1.output.find( - (t) => t.input.target.toLowerCase() === poolAddress - ).output; - let price, otherToken; - if (posToken0.toLowerCase() === stakingToken) { - price = poolReserves.output[1] / poolReserves.output[0]; - otherToken = transform(posToken1); - } else { - price = poolReserves.output[0] / poolReserves.output[1]; - otherToken = transform(posToken0); - } - const transformedStakingToken = transform(stakingToken); - Object.values(balances).forEach((balance) => { - Object.entries(balance).forEach(([addr, bal]) => { - if (addr.toLowerCase() === transformedStakingToken) { - balance[otherToken] = BigNumber(bal).times(price).toFixed(0); - delete balance[addr]; - } - }); - }); - } - const calldata = { - chain, - block, - }; - - await handleYearnTokens( - balances, - [ - "0x637ec617c86d24e421328e6caea1d92114892439", - "0xef0210eb96c7eb36af8ed1c20306462764935607", - "0x0dec85e74a92c52b7f708c4b10207d9560cefaf0", - "0x0A0b23D9786963DE69CB2447dC125c49929419d8", - "0xCe2Fc0bDc18BD6a4d9A725791A3DEe33F3a23BB7", - "0x2C850cceD00ce2b14AA9D658b7Cad5dF659493Db", - "0xd817A100AB8A29fE3DBd925c2EB489D67F758DA9", - ], - "0x6f536B36d02F362CfF4278190f922582d59E7e08", - block, - chain, - transform - ); - - const screamShare = await sdk.api.abi.call({ - ...calldata, - target: xSCREAM, - abi: shareValue, - }); - - sdk.util.sumSingleBalance( - balances, - transform("0xe0654C8e6fd4D733349ac7E09f6f23DA256bF475"), - BigNumber(screamShare.output) - .times(balances['fantom:0xe3d17c7e840ec140a7a51aca351a482231760824']) - .div(1e18) - .toFixed(0) - ); - delete balances[transform(xSCREAM)]; - // node test.js projects/radial/index.js - const creditShare = await sdk.api.abi.call({ - ...calldata, - target: xCREDIT, - abi: shareValue, - }); - sdk.util.sumSingleBalance( - balances, - transform("0x77128dfdd0ac859b33f44050c6fa272f34872b5e"), - BigNumber(creditShare.output) - .times(balances['fantom:0xd9e28749e80d867d5d14217416bff0e668c10645']) - .div(1e18) - .toFixed(0) - ); - delete balances[transform(xCREDIT)]; - - const tarotShare = await sdk.api.abi.call({ - ...calldata, - target: xTAROT, - abi: shareTarot, - params: balances['fantom:0x74d1d2a851e339b8cb953716445be7e8abdf92f4'], - }); - sdk.util.sumSingleBalance( - balances, - transform("0xc5e2b037d30a390e62180970b3aa4e91868764cd"), - tarotShare.output - ); - delete balances[transform(xTAROT)]; - - sdk.util.sumSingleBalance( - balances, - transform("0xf24bcf4d1e507740041c9cfd2dddb29585adce1e"), - balances['fantom:0xfcef8a994209d6916eb2c86cdd2afd60aa6f54b1'] - ); - delete balances[transform(fBEET)]; - return balances; - } - - module.exports = { - fantom: { - tvl, - }, - }; - - // node test.js projects/radial/index.js - \ No newline at end of file + standardPoolInfoAbi, +} = require("../helper/masterchef"); +const { sumTokens2 } = require("../helper/unwrapLPs"); + +const masterChef = "0x6f536B36d02F362CfF4278190f922582d59E7e08"; +const stakingToken = "0xf04d7f53933becbf51ddf1f637fe7ecaf3d4ff94"; + +async function tvl(api) { + const info = await api.fetchList({ lengthAbi: 'poolLength', itemAbi: standardPoolInfoAbi, target: masterChef }) + return sumTokens2({ api, owner: masterChef, tokens: info.map(i => i.lpToken), blacklistedTokens: [stakingToken] }) +} + +module.exports = { + fantom: { + tvl, + }, +} \ No newline at end of file diff --git a/projects/redacted/index.js b/projects/redacted/index.js index 8aedcf51b413..fdb21318cae0 100644 --- a/projects/redacted/index.js +++ b/projects/redacted/index.js @@ -7,7 +7,7 @@ const treasuries = ["0xa52fd396891e7a74b641a2cb1a6999fcf56b077e", "0x086c98855df const cvxCRVStaking = '0x3Fe65692bfCD0e6CF84cB1E7d24108E434A7587e' const CVX = ADDRESSES.ethereum.CVX const cvxCRV = ADDRESSES.ethereum.cvxCRV -const FXS = '0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0' +const FXS = ADDRESSES.ethereum.FXS const veFXS = '0xc8418aF6358FFddA74e09Ca9CC3Fe03Ca6aDC5b0' const CRV = ADDRESSES.ethereum.CRV const veCRV = '0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2' diff --git a/projects/rose/abi.json b/projects/rose/abi.json deleted file mode 100644 index 5df5018200b8..000000000000 --- a/projects/rose/abi.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "balanceOf": "function balanceOf(address, address) view returns (uint256)", - "balances": "function balances(uint256 arg0) view returns (uint256)", - "totalBorrow": "function totalBorrow() view returns (uint128 elastic, uint128 base)" -} \ No newline at end of file diff --git a/projects/rose/index.js b/projects/rose/index.js index 3f6d920792ba..51ec625430e4 100644 --- a/projects/rose/index.js +++ b/projects/rose/index.js @@ -1,181 +1,47 @@ const ADDRESSES = require('../helper/coreAssets.json') -const sdk = require("@defillama/sdk"); -const { default: BigNumber } = require("bignumber.js"); +const { staking } = require('../helper/staking') + +const stablesPool = "0xc90dB0d8713414d78523436dC347419164544A3f" +const fraxPool = "0xa34315F1ef49392387Dd143f4578083A9Bd33E94" +const atustPool = "0x8fe44f5cce02D5BE44e3446bBc2e8132958d22B8" +const maiPool = "0x65a761136815B45A9d78d9781d22d47247B49D23" + +const DAI = "0xe3520349F477A5F6EB06107066048508498A291b" +const USDC = ADDRESSES.aurora.USDC_e +const USDT = ADDRESSES.aurora.USDT_e +const FRAX = ADDRESSES.aurora.FRAX +const UST = "0x5ce9F0B6AFb36135b5ddBF11705cEB65E634A9dC" +const MAI = ADDRESSES.moonbeam.MAI +const ROSE = "0xdcD6D4e2B3e1D1E1E6Fa8C21C8A323DcbecfF970" +const STROSE = "0xe23d2289FBca7De725DC21a13fC096787A85e16F" +const NEAR = ADDRESSES.aurora.NEAR +const WETH = "0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB" +const WBTC = "0xf4eb217ba2454613b15dbdea6e5f22276410e89e" + +const VASE = "0xee793001Ce9Fa988712B15a59CCf5dC7d54b22FF" -const abi = require("./abi.json"); - -// pool addresses -const stablesPool = "0xc90dB0d8713414d78523436dC347419164544A3f"; -const fraxPool = "0xa34315F1ef49392387Dd143f4578083A9Bd33E94"; -const atustPool = "0x8fe44f5cce02D5BE44e3446bBc2e8132958d22B8"; -const maiPool = "0x65a761136815B45A9d78d9781d22d47247B49D23"; -// const busdPool = "0xD6cb7Bb7D63f636d1cA72A1D3ed6f7F67678068a"; -const rusdPool = "0x79B0a67a4045A7a8DC04b17456F4fe15339cBA34"; - -// token addresses -const DAI = "0xe3520349F477A5F6EB06107066048508498A291b"; -const USDC = ADDRESSES.aurora.USDC_e; -const USDT = ADDRESSES.aurora.USDT_e; -const FRAX = ADDRESSES.aurora.FRAX; -const UST = "0x5ce9F0B6AFb36135b5ddBF11705cEB65E634A9dC"; -const MAI = ADDRESSES.moonbeam.MAI; -// const BUSD = "0x5C92A4A7f59A9484AFD79DbE251AD2380E589783"; -const RUSD = "0x19cc40283B057D6608C22F1D20F17e16C245642E"; -const ROSE = "0xdcD6D4e2B3e1D1E1E6Fa8C21C8A323DcbecfF970"; -const STROSE = "0xe23d2289FBca7De725DC21a13fC096787A85e16F"; -const NEAR = ADDRESSES.aurora.NEAR; -const WETH = "0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB"; -const WBTC = "0xf4eb217ba2454613b15dbdea6e5f22276410e89e"; - -// garden addresses -const gardenNear = "0x64C922E3824ab40cbbEdd6C8092d148C283d3D3D"; -const gardenUsdc = "0xfbAF3eBF228eB712b1267285787e51aDd70086bB"; -const gardenUsdt = "0x0F44fCD177098Cb2B063B50f6C62e4F1E1f9d596"; -const gardenWeth = "0x084355FDd5fcfd55d60C5B8626756a6906576f13"; -const gardenAtust = "0xe8F7F08D50e12145Cb722cfF861e6A9b43EADBA1"; -const gardenWbtc = "0x6bA5B45149996597d96e6dB19E4E1eFA81a6df97"; - -const VASE = "0xee793001Ce9Fa988712B15a59CCf5dC7d54b22FF"; - -// pool to underlying tokens map const poolToTokensMap = { [stablesPool]: [DAI, USDC, USDT], [fraxPool]: [FRAX], [atustPool]: [UST], [maiPool]: [MAI], - // [busdPool]: [BUSD], - [rusdPool]: [RUSD], -}; - -// garden to underlying tokens map -const gardenToTokensMap = { - [gardenNear]: [NEAR], - [gardenUsdc]: [USDC], - [gardenUsdt]: [USDT], - [gardenWeth]: [WETH], - [gardenAtust]: [UST], - [gardenWbtc]: [WBTC], -}; - -// tvl calculation -const tvl = async (timestamp, ethBlock, chainBlock) => { - let tvl = {}; - let calls = []; - - const block = chainBlock.aurora; - - Object.entries(poolToTokensMap).forEach(([poolAddress, poolTokens]) => { - poolTokens.forEach((_, tokenIndex) => { - calls.push({ - target: poolAddress, - params: tokenIndex, - }); - }); - }); - - // pool balances - const balances = await sdk.api.abi.multiCall({ - calls: calls, - block, - abi: abi.balances, - chain: "aurora", - }); - - balances.output.forEach((res) => { - const amount = res.output; - const poolAddress = res.input.target; - const tokenAddress = poolToTokensMap[poolAddress][res.input.params[0]]; - sdk.util.sumSingleBalance(tvl, `aurora:${tokenAddress}`, amount); - }); - - // unsupported stablecoin tokens - tvl["FRAX"] = new BigNumber(tvl[`aurora:${FRAX}`]) - .div(new BigNumber(10).pow(18)) - .toNumber(); - delete tvl[`aurora:${FRAX}`]; - tvl["RUSD"] = new BigNumber(tvl[`aurora:${RUSD}`]) - .div(new BigNumber(10).pow(18)) - .toNumber(); - delete tvl[`aurora:${RUSD}`]; - - // format calls to vase for collateral - calls = []; - Object.entries(gardenToTokensMap).forEach(([gardenAddress, gardenTokens]) => { - gardenTokens.forEach((gardenToken) => { - calls.push({ - target: VASE, - params: [gardenToken, gardenAddress], - }); - }); - }); - - const vaseCollateralBalances = await sdk.api.abi.multiCall({ - calls: calls, - block, - abi: abi.balanceOf, - chain: "aurora", - }); - - vaseCollateralBalances.output.forEach((res) => { - const amount = res.output; - const tokenAddress = res.input.params[0]; - sdk.util.sumSingleBalance(tvl, `aurora:${tokenAddress}`, amount); - }); - - return tvl; -}; - -// staking calculation -const staking = async (timestamp, ethBlock, chainBlock) => { - const balances = {}; - const stRoseTvl = await sdk.api.erc20.balanceOf({ - target: ROSE, - owner: STROSE, - chain: "aurora", - block: chainBlock.aurora, - }); - - sdk.util.sumSingleBalance(balances, `aurora:${ROSE}`, stRoseTvl.output); - return balances; -}; - -const borrowed = async (timestamp, ethBlock, chainBlock) => { - const calls = []; - Object.entries(gardenToTokensMap).forEach(([gardenAddress, gardenTokens]) => { - gardenTokens.forEach((_) => { - calls.push({ - target: gardenAddress, - params: [], - }); - }); - }); - - const borrowedAmounts = await sdk.api.abi.multiCall({ - calls: calls, - block: chainBlock.aurora, - abi: abi.totalBorrow, - chain: "aurora", - }); +} - borrowedAmounts.output.forEach((res) => { - const amount = res.output[0]; - sdk.util.sumSingleBalance(borrowed, `aurora:${RUSD}`, amount); - }); +const tvl = async (api) => { + const ownerTokens = [] - borrowed["RUSD"] = new BigNumber(borrowed[`aurora:${RUSD}`]) - .div(new BigNumber(10).pow(18)) - .toNumber(); - delete borrowed[`aurora:${RUSD}`]; + Object.entries(poolToTokensMap).forEach(([pool, tokens]) => ownerTokens.push([tokens, pool])) + const gardenTokens = [NEAR, USDC, USDT, WETH, UST, WBTC] + ownerTokens.push([gardenTokens, VASE]) - return borrowed; -}; + return api.sumTokens({ ownerTokens}) +} module.exports = { methodology: - "TVL is computed as the sum of the underlying token balances on all Rose liquidity pools. Staking accounts for total ROSE token staked. Borrowed accounts for debt in RUSD for all open collateralized debt positions.", + "TVL is computed as the sum of the underlying token balances on all Rose liquidity pools", aurora: { tvl, - staking, - borrowed + staking: staking(STROSE, ROSE), }, -}; +} diff --git a/projects/sailing-portfolios/index.js b/projects/sailing-portfolios/index.js index 4eefd2366bd4..40fab41fd1a4 100644 --- a/projects/sailing-portfolios/index.js +++ b/projects/sailing-portfolios/index.js @@ -10,7 +10,7 @@ async function tvl(api) { }) const tokens = await api.multiCall({ abi: 'address[]:getPortfolioAssets', calls: portfolios}) const ownerTokens = portfolios.map((portfolio, i) => [tokens[i], portfolio]) - return api.sumTokens({ ownerTokens }) + return api.sumTokens({ ownerTokens, blacklistedTokens: ['0x47a663C082926d0d913cAcB89240c3f4bc409a88'] }) } module.exports = { diff --git a/projects/satori/index.js b/projects/satori/index.js index cd0d499a0ea2..585ac7c448be 100644 --- a/projects/satori/index.js +++ b/projects/satori/index.js @@ -2,8 +2,8 @@ const ADDRESSES = require("../helper/coreAssets.json"); const { sumTokensExport } = require("../helper/unwrapLPs"); const USDT_TOKEN_CONTRACT = ADDRESSES.astarzk.USDT; -const EZETH_BASE = "0x2416092f143378750bb29b79eD961ab195CcEea5"; -const EZETH_LINEA = "0x2416092f143378750bb29b79eD961ab195CcEea5"; +const EZETH_BASE = ADDRESSES.blast.ezETH; +const EZETH_LINEA = ADDRESSES.blast.ezETH; const ZK = "0x5A7d6b2F92C77FAD6CCaBd7EE0624E64907Eaf3E"; const WALLET_ADDR = [ "0x62e724cB4d6C6C7317e2FADe4A03001Fe7856940", @@ -63,4 +63,13 @@ module.exports = { tokens: [ADDRESSES.xlayer.USDC], }), }, + arbitrum:{ + tvl: sumTokensExport({ + owners: [ + "0x5aCCEb99De5cc07168C193396C1fdC3E3abEEED7", + "0xAE9a83510cbB26c58595BA671f131e0A03Fe9A03", + ], + tokens: [ADDRESSES.arbitrum.USDC_CIRCLE], + }), + }, }; diff --git a/projects/solace-finance/config.js b/projects/solace-finance/config.js index 51f428ae11d8..71d2817f982b 100644 --- a/projects/solace-finance/config.js +++ b/projects/solace-finance/config.js @@ -40,7 +40,7 @@ module.exports = { TokenTicker: "WMATIC", }, { - PoolToken: "0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89", + PoolToken: ADDRESSES.polygon.FRAX, TokenTicker: "FRAX", }, { diff --git a/projects/stablejack/index.js b/projects/stablejack/index.js index e44943b7302f..ae8f8296c2ae 100644 --- a/projects/stablejack/index.js +++ b/projects/stablejack/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') module.exports = { @@ -6,9 +7,9 @@ module.exports = { async function tvl(api) { const wsAVAX = '0x7aa5c727270c7e1642af898e0ea5b85a094c17a1' - const sAVAX = '0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE' + const sAVAX = ADDRESSES.avax.SAVAX const wsAvaxBal= await api.call({ abi: 'erc20:balanceOf', target: wsAVAX, params: '0xDC325ad34C762C19FaAB37d439fbf219715f9D58'}) const wsAvaxSupply = await api.call({ abi: 'uint256:totalSupply', target: wsAVAX }) - const sAvaxBal= await api.call({ abi: 'erc20:balanceOf', target: '0x2b2C81e08f1Af8835a78Bb2A90AE924ACE0eA4bE', params: wsAVAX}) + const sAvaxBal= await api.call({ abi: 'erc20:balanceOf', target: ADDRESSES.avax.SAVAX, params: wsAVAX}) api.add(sAVAX, wsAvaxBal * sAvaxBal / wsAvaxSupply) } \ No newline at end of file diff --git a/projects/stablekoi/abi.json b/projects/stablekoi/abi.json deleted file mode 100644 index 7e8058d689af..000000000000 --- a/projects/stablekoi/abi.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "totalSupply": "uint256:totalSupply" -} \ No newline at end of file diff --git a/projects/stablekoi/index.js b/projects/stablekoi/index.js index 1d575933f521..a4d6392f42a2 100644 --- a/projects/stablekoi/index.js +++ b/projects/stablekoi/index.js @@ -1,76 +1,28 @@ const ADDRESSES = require('../helper/coreAssets.json') -const { sumTokens } = require("../helper/unwrapLPs"); -const { GraphQLClient, gql } = require("graphql-request"); -const abi = require("./abi.json"); -const sdk = require("@defillama/sdk"); -const { default: BigNumber } = require("bignumber.js"); -const { toUSDTBalances } = require("../helper/balances"); const { getConfig } = require('../helper/cache') -const chain = "godwoken"; - -async function tvl(ts, _block, chainBlocks) { - const balances = {}; +async function tvl(api) { const tokensAndOwners = []; const poolInfo = await getConfig('stable-koi-v0', "https://app.stablekoi.com/lists/poollist.json"); poolInfo.forEach((pool) => { pool.tokens.forEach((token) => tokensAndOwners.push([token, pool.address])); }); - await sumTokens(balances, tokensAndOwners, chainBlocks[chain], chain); - return balances + return api.sumTokens({ tokensAndOwners }) } -async function tvl_v1(ts, _block, chainBlocks) { - const balances = {}; - const chain = "godwoken_v1"; +async function tvl_v1(api) { const tokensAndOwners = []; - // const poolInfo = await get('https://app-v1.stablekoi.com/api/pools'); v1Pools.forEach((pool) => { pool.tokens.forEach((token) => tokensAndOwners.push([token.address, pool.address])); }); - await sumTokens(balances, tokensAndOwners, chainBlocks[chain], chain); - return balances + return api.sumTokens({ tokensAndOwners }) } -const yokaiInfoAPI = - "https://www.yokaiswap.com/subgraphs/name/yokaiswap/exchange"; -async function fetchTokenPriceFromYokaiSwap(token) { - const graphQLClient = new GraphQLClient(yokaiInfoAPI); - - const query = gql` - query tokens { - tokens(where:{id:\"${token.toLowerCase()}\"}) { - derivedUSD - } - } - `; - - const data = await graphQLClient.request(query); - - return (data.tokens[0] || { derivedUSD: 0 }).derivedUSD; -} - -const koi = "0xd66eb642eE33837531FdA61eb7Ab15B15658BcaB"; -const koiStakingRewards = "0x9d7AACf560e493A7B0666d85BDE216d6d38Ec429"; -async function staking(ts, _block, chainBlocks) { - const [{ output: totalStakedKOI }, { output: koiDecimals }, koiPrice] = - await Promise.all([ - sdk.api.abi.call({ - abi: abi.totalSupply, - target: koiStakingRewards, - chain, - block: chainBlocks[chain], - }), - sdk.api.erc20.decimals(koi, chain), - fetchTokenPriceFromYokaiSwap(koi), - ]); - - return toUSDTBalances( - BigNumber(totalStakedKOI) - .multipliedBy(BigNumber(koiPrice)) - .dividedBy(BigNumber(10).pow(BigNumber(koiDecimals))) - .toFixed(0) - ); +async function staking(api) { + const koi = "0xd66eb642eE33837531FdA61eb7Ab15B15658BcaB"; + const koiStakingRewards = "0x9d7AACf560e493A7B0666d85BDE216d6d38Ec429"; + const totalStakedKOI = await api.call({ abi: 'erc20:totalSupply', target: koiStakingRewards }) + api.add(koi, totalStakedKOI) } module.exports = { @@ -82,65 +34,39 @@ module.exports = { tvl: tvl_v1, }, hallmarks: [ - [Math.floor(new Date('2022-08-26')/1e3), "Add godwoken v1 chain tvl"], + [Math.floor(new Date('2022-08-26') / 1e3), "Add godwoken v1 chain tvl"], ], } const v1Pools = [ { - "name": "USDC|eth↔USDC|bsc", "address": "0xB76B94bA69f0C2c556ee86F57e57F5F20A705d18", "tokens": [ { - "name": "USD Coin (Ethereum)", "address": "0x186181e225dc1Ad85a4A94164232bD261e351C33", }, - { - "symbol": "USDC|bsc", - "address": ADDRESSES.godwoken_v1.USDC_bsc, - } + { "address": ADDRESSES.godwoken_v1.USDC_bsc, } ] }, { - "name": "USDC|eth↔USDT|eth", "address": "0xA1F83F8F142c1069d33a898498AFEA6257387133", "tokens": [ - { - "symbol": "USDC|eth", - "address": "0x186181e225dc1Ad85a4A94164232bD261e351C33", - }, - { - "symbol": "USDT|eth", - "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", - } + { "address": "0x186181e225dc1Ad85a4A94164232bD261e351C33", }, + { "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", } ] }, { - "name": "USDT|eth↔USDT|bsc", "address": "0x2c13f5DB105C6ab13ba183Abb7c0CBe38bE45A92", "tokens": [ - { - "symbol": "USDT|eth", - "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", - }, - { - "symbol": "USDT|bsc", - "address": ADDRESSES.godwoken_v1.USDT_bsc, - } + { "address": "0x8E019acb11C7d17c26D334901fA2ac41C1f44d50", }, + { "address": ADDRESSES.godwoken_v1.USDT_bsc, } ] }, { - "name": "WBTC|eth↔BTCB|bsc", "address": "0x2360D9699dc82b684F986fBcc2ddf3Ab54Ff60dD", "tokens": [ - { - "symbol": "WBTC|eth", - "address": ADDRESSES.godwoken_v1.WBTC_eth, - }, - { - "symbol": "BTCB|bsc", - "address": ADDRESSES.godwoken_v1.BTCB_bsc, - } + { "address": ADDRESSES.godwoken_v1.WBTC_eth, }, + { "address": ADDRESSES.godwoken_v1.BTCB_bsc, } ] } ] \ No newline at end of file diff --git a/projects/stader/index.js b/projects/stader/index.js index 8a5746897459..617a0aef1de2 100644 --- a/projects/stader/index.js +++ b/projects/stader/index.js @@ -7,21 +7,13 @@ async function getData() { return _res; } -async function hbarTvl(timestamp) { +async function hbarTvl() { const res = await get("https://universe.staderlabs.com/common/tvl"); return { "hedera-hashgraph": res.hedera.native, }; } -async function fantomTvl() { - const res = await getData(); - return { - "fantom": res.fantom.native, - }; -} - - async function maticTvl() { const res = await getData(); return { @@ -29,13 +21,6 @@ async function maticTvl() { }; } -async function terra2Tvl() { - const res = await getData(); - return { - "terra-luna-2": res.terra.native || 0, - }; -} - async function bscTvl() { const res = await getData(); return { @@ -43,13 +28,6 @@ async function bscTvl() { }; } -async function nearTvl() { - const res = await getData(); - return { - near: res.near.native, - }; -} - async function ethTvl(api) { return await api.call({ abi: "uint256:totalAssets", @@ -75,13 +53,13 @@ module.exports = { tvl: () => ({}), }, terra2: { - tvl: terra2Tvl, + tvl: () => ({}), }, bsc: { tvl: bscTvl, }, near: { - tvl: nearTvl, + tvl: () => ({}), }, ethereum: { tvl: async (api) => { diff --git a/projects/stakedicp/index.js b/projects/stakedicp/index.js index 1f9728e2c097..54a68c79086f 100644 --- a/projects/stakedicp/index.js +++ b/projects/stakedicp/index.js @@ -1,4 +1,3 @@ -const BigNumber = require("bignumber.js"); const { get } = require("../helper/http"); const url = 'https://h6uvl-xiaaa-aaaap-qaawa-cai.raw.ic0.app/tvl'; @@ -10,7 +9,7 @@ async function tvl(_timestamp, _block) { throw new Error("Unknown"); } return { - "coingecko:internet-computer": BigNumber(tvl).div(1e8).toFixed(0), + "coingecko:internet-computer": tvl/1e8, }; } diff --git a/projects/stargatefinance-v2/index.js b/projects/stargatefinance-v2/index.js index a06659ce58e8..cff96fe32721 100644 --- a/projects/stargatefinance-v2/index.js +++ b/projects/stargatefinance-v2/index.js @@ -83,6 +83,12 @@ const CONFIG = { '0x81F6138153d473E8c5EcebD3DC8Cd4903506B075', ], }, + sei: { + pools: [ + '0x45d417612e177672958dC0537C45a8f8d754Ac2E', //usdc pool + '0x0dB9afb4C33be43a0a0e396Fd1383B4ea97aB10a' + ], + }, } const createTvlFunction = (pools) => { diff --git a/projects/steakHut-lb/index.js b/projects/steakHut-lb/index.js index c1150bedcf04..2fd3a0043f77 100644 --- a/projects/steakHut-lb/index.js +++ b/projects/steakHut-lb/index.js @@ -33,6 +33,17 @@ const _vaults = { } async function tvl(api) { + //function to grab the tvl of enigma pools + async function fetchEnigmaData(factoryAddress) { + const enigmas = await api.fetchList({ lengthAbi: 'enigmaPositionNumber', itemAbi: 'enigmaAtIndex', target: factoryAddress }) + const token0s = await api.multiCall({ abi: 'address:token0', calls: enigmas }) + const token1s = await api.multiCall({ abi: 'address:token1', calls: enigmas }) + const bals = await api.multiCall({ abi: 'function getTotalAmounts() view returns (uint256 bal0, uint256 bal1)', calls: enigmas }) + bals.forEach(({ bal0, bal1 }, i) => { + api.add(token0s[i], bal0) + api.add(token1s[i], bal1) + }) + } //get the total shares from all vaults const vaults = _vaults[api.chain] const depositTokens = await api.multiCall({ abi: abi.want, calls: vaults }) @@ -61,15 +72,14 @@ async function tvl(api) { api.add(JOE_ADDRESS, await api.call({ target: HJOE_ADDRESS, abi: 'erc20:totalSupply' })) // engima tvl + const enigmaFactory_AVAX = `0xD751E0940CfadC35f84e60075d0f940a2545FB8d`; - const enigmas = await api.fetchList({ lengthAbi: 'enigmaPositionNumber', itemAbi: 'enigmaAtIndex', target: enigmaFactory_AVAX }) - const token0s = await api.multiCall({ abi: 'address:token0', calls: enigmas }) - const token1s = await api.multiCall({ abi: 'address:token1', calls: enigmas }) - const bals = await api.multiCall({ abi: 'function getTotalAmounts() view returns (uint256 bal0, uint256 bal1)', calls: enigmas }) - bals.forEach(({ bal0, bal1 }, i) => { - api.add(token0s[i], bal0) - api.add(token1s[i], bal1) - }) + const enigmaFactory_AVAX_PHAR = `0x653b809a4fa6ba0fc0a6dc1b3f92a362fcb6086d`; // Example BSC address + + // Fetch data for both factories + await fetchEnigmaData(enigmaFactory_AVAX); + await fetchEnigmaData(enigmaFactory_AVAX_PHAR); + } } diff --git a/projects/stormtrade/index.js b/projects/stormtrade/index.js index 2e1eda396769..29a9b0ff2f85 100644 --- a/projects/stormtrade/index.js +++ b/projects/stormtrade/index.js @@ -11,9 +11,9 @@ module.exports = { 'EQDynReiCeK8xlKRbYArpp4jyzZuF6-tYfhFM0O5ulOs5H0L', // jUSDT vault 'EQDpJnZP89Jyxz3euDaXXFUhwCWtaOeRmiUJTi3jGYgF8fnj', // TON-M vault 'EQAz6ehNfL7_8NI7OVh1Qg46HsuC4kFpK-icfqK9J3Frd6CJ', // USDT vault - 'EQBwfRtqEf3ZzhkeGsmXiC7hzTh1C5zZZzLgDH5VL8gENQ2A' // Notcoin pre-market vault + 'EQAG8_BzwlWkmqb9zImr9RJjjgZZCLMOQXP9PR0B1PYHvfSS', // Notcoin vault ], - tokens: [ADDRESSES.ton.jUSDT, ADDRESSES.ton.USDT, ADDRESSES.ton.TON] + tokens: [ADDRESSES.ton.jUSDT, ADDRESSES.ton.USDT, ADDRESSES.ton.TON, ADDRESSES.ton.NOT] }) ) } diff --git a/projects/sushiswap-kashi/kashi-lending.js b/projects/sushiswap-kashi/kashi-lending.js index 5fce7a573002..6f047d904bff 100644 --- a/projects/sushiswap-kashi/kashi-lending.js +++ b/projects/sushiswap-kashi/kashi-lending.js @@ -43,6 +43,9 @@ const kashiQuery = ` function kashiLending(chain, borrowed) { return async (api) => { + if(borrowed === true && api.timestamp > 1672534861){ + return {} + } const graphUrl = graphUrls[chain]; // Query graphql endpoint diff --git a/projects/taco/index.js b/projects/taco/index.js new file mode 100644 index 000000000000..79a2ccfdbf9f --- /dev/null +++ b/projects/taco/index.js @@ -0,0 +1,23 @@ +const { get_account_tvl } = require("../helper/chain/eos"); + +// Taco Studios +// https://swap.tacocrypto.io +async function wax() { + const accounts = ["swap.taco"]; + const tokens = [ + ["eosio.token", "WAX", "wax"], + ["token.nefty", "NEFTY", "nefty"], + ["alien.worlds", "TLM", "alien-worlds"], + ["usdt.alcor", "USDT", "alcor-ibc-bridged-usdt-wax"], + ["wombattokens", "WOMBAT", "wombat"], + ["wuffi", "WUF", "wuffi"] + ]; + return await get_account_tvl(accounts, tokens, "wax"); +} + +module.exports = { + methodology: `Taco Studios TVL is achieved by querying token balances from a (v2 uniswap fork) swap contract`, + wax: { + tvl: wax + }, +} \ No newline at end of file diff --git a/projects/tangible-ustb/index.js b/projects/tangible-ustb/index.js index b04203fbda1b..1b0d2ba68578 100644 --- a/projects/tangible-ustb/index.js +++ b/projects/tangible-ustb/index.js @@ -1,8 +1,9 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { sumTokensExport } = require('../helper/unwrapLPs') const USTB = '0x83fedbc0b85c6e29b589aa6bdefb1cc581935ecd' module.exports = { ethereum: { - tvl: sumTokensExport({ owner: USTB, tokens: ["0x59D9356E565Ab3A36dD77763Fc0d87fEaf85508C"]}), + tvl: sumTokensExport({ owner: USTB, tokens: [ADDRESSES.ethereum.USDM]}), }, } \ No newline at end of file diff --git a/projects/tbtc/index.js b/projects/tbtc/index.js index 0ac5ec61809c..fac1e605c8d9 100644 --- a/projects/tbtc/index.js +++ b/projects/tbtc/index.js @@ -27,6 +27,7 @@ const owners = [ module.exports = { methodology: "BTC on btc chain", + ethereum: {tvl: () => ({}) }, bitcoin: { tvl: sdk.util.sumChainTvls([ sumTokensExport({ owners }), diff --git a/projects/templedao/index.js b/projects/templedao/index.js index 31116013d66a..94488f4ec8f8 100644 --- a/projects/templedao/index.js +++ b/projects/templedao/index.js @@ -16,7 +16,7 @@ const auraLocker = '0x3Fa73f1E5d8A792C80F426fc8F84FBF7Ce9bBCAC'; const templeTreasuryContract = "0x5c8898f8e0f9468d4a677887bc03ee2659321012"; const FRAX = ADDRESSES.ethereum.FRAX; -const FXS = "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0"; +const FXS = ADDRESSES.ethereum.FXS; const CVX_FXS = ADDRESSES.ethereum.cvxFXS; const AURA = '0xC0c293ce456fF0ED870ADd98a0828Dd4d2903DBF' const TEMPLE_DENDEND1 = '0x8A5058100E60e8F7C42305eb505B12785bbA3BcA'; diff --git a/projects/tokemak/index.js b/projects/tokemak/index.js index 91a870b2828a..6f52e0e1ea29 100644 --- a/projects/tokemak/index.js +++ b/projects/tokemak/index.js @@ -27,7 +27,7 @@ const gohm = "0x0ab87046fbb341d058f17cbc4c1133f25a20a52f"; const alcxPool = "0xD3B5D9a561c293Fb42b446FE7e237DaA9BF9AA84"; const alcx = "0xdBdb4d16EdA451D0503b854CF79D55697F90c8DF"; const fxsPool = "0xADF15Ec41689fc5b6DcA0db7c53c9bFE7981E655"; -const fxs = "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0"; +const fxs = ADDRESSES.ethereum.FXS; const tcrPool = "0x15A629f0665A3Eb97D7aE9A7ce7ABF73AeB79415"; const tcr = "0x9C4A4204B79dd291D6b6571C5BE8BbcD0622F050"; const toke = ADDRESSES.ethereum.TOKE; diff --git a/projects/treasury/aavegotchi.js b/projects/treasury/aavegotchi.js index 295ca69cecd4..a175c5d5ef63 100644 --- a/projects/treasury/aavegotchi.js +++ b/projects/treasury/aavegotchi.js @@ -1,31 +1,36 @@ -const ADDRESSES = require('../helper/coreAssets.json') +const ADDRESSES = require("../helper/coreAssets.json"); const { nullAddress, treasuryExports } = require("../helper/treasury"); const aavegotchiTreasury2 = "0xFFE6280ae4E864D9aF836B562359FD828EcE8020"; -const treasury2 = "0xfb76e9be55758d0042e003c1e46e186360f0627e" +const treasury2 = "0xfb76e9be55758d0042e003c1e46e186360f0627e"; const GHST = "0x3F382DbD960E3a9bbCeaE22651E88158d2791550"; - module.exports = treasuryExports({ ethereum: { - tokens: [ - nullAddress, - ADDRESSES.ethereum.DAI//DAI - ], - owners: [aavegotchiTreasury2, treasury2, '0x53c3CA81EA03001a350166D2Cc0fcd9d4c1b7B62'], + tokens: [ + nullAddress, + ADDRESSES.ethereum.DAI, //DAI + ], + owners: [aavegotchiTreasury2, treasury2, "0x53c3CA81EA03001a350166D2Cc0fcd9d4c1b7B62"], ownTokens: [GHST], }, polygon: { - tokens: [ - nullAddress, - ADDRESSES.polygon.DAI, - ADDRESSES.polygon.USDC - ], - owners: ['0xb208f8BB431f580CC4b216826AFfB128cd1431aB', '0x27DF5C6dcd360f372e23d5e63645eC0072D0C098', '0x939b67F6F6BE63E09B0258621c5A24eecB92631c', - '0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E', '0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6', '0x48eA1d45142fC645fDcf78C133Ac082eF159Fe14', '0x6fb7e0AAFBa16396Ad6c1046027717bcA25F821f', -'0x921D8FDF089775D5AC61b2d6e8f34F1edd554D8f', -'0xa8D00712abE7af3446cdC651c159737cCFB43255', '0xed7cb3973C7bFE4bf78dA8E5f52EB04c0dF53d3B', '0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E', '0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6', -'0xAbA69f6E893B18bE066a237f723F43315BBF9D9A'], - ownTokens: ['0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7'], + tokens: [nullAddress, ADDRESSES.polygon.DAI, ADDRESSES.polygon.USDC], + owners: [ + "0xb208f8BB431f580CC4b216826AFfB128cd1431aB", + "0x27DF5C6dcd360f372e23d5e63645eC0072D0C098", + "0x939b67F6F6BE63E09B0258621c5A24eecB92631c", + "0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E", + "0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6", + "0x48eA1d45142fC645fDcf78C133Ac082eF159Fe14", + "0x6fb7e0AAFBa16396Ad6c1046027717bcA25F821f", + "0x921D8FDF089775D5AC61b2d6e8f34F1edd554D8f", + "0xa8D00712abE7af3446cdC651c159737cCFB43255", + "0xed7cb3973C7bFE4bf78dA8E5f52EB04c0dF53d3B", + "0x62DE034b1A69eF853c9d0D8a33D26DF5cF26682E", + "0x8c8E076Cd7D2A17Ba2a5e5AF7036c2b2B7F790f6", + "0xAbA69f6E893B18bE066a237f723F43315BBF9D9A", + ], + ownTokens: ["0x385eeac5cb85a38a9a07a70c73e0a3271cfb54a7"], }, -}) \ No newline at end of file +}); diff --git a/projects/treasury/alchemix.js b/projects/treasury/alchemix.js index bc0f2b8cdba6..9faea3c7b1a3 100644 --- a/projects/treasury/alchemix.js +++ b/projects/treasury/alchemix.js @@ -27,10 +27,10 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.CRV, ADDRESSES.ethereum.YFI, "0xa258C4606Ca8206D8aA700cE2143D7db854D168c", - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, "0x6c3F90f043a72FA612cbac8115EE7e52BDe6E490", "0xF1bB87563A122211d40d393eBf1c633c330377F9", //xpremia - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, "0x7f50786A0b15723D741727882ee99a0BF34e3466" ], owners: [alchemixTreasury, operations_treasury, treasury2, treasury3, treasury4, treasury5], diff --git a/projects/treasury/dexfinance.js b/projects/treasury/dexfinance.js index d336eb63cc5f..db92c5584afd 100644 --- a/projects/treasury/dexfinance.js +++ b/projects/treasury/dexfinance.js @@ -19,10 +19,10 @@ module.exports = treasuryExports({ '0xd56734d7f9979dd94fae3d67c7e928234e71cd4c', //tia '0x0c880f6761f1af8d9aa9c466984b80dab9a8c9e8', //pendle '0x25d887ce7a35172c62febfd67a1856f20faebb00', //pepe - '0xf97f4df75117a78c1a5a0dbb814af92458539fb4', //link - '0xfc5a1a6eb076a2c7ad06ed22c90d7e710e35ad0a', //gmx - '0x912ce59144191c1204e64559fe8253a0e49e6548', //arb - '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f', //wbtc + ADDRESSES.arbitrum.LINK, //link + ADDRESSES.arbitrum.GMX, //gmx + ADDRESSES.arbitrum.ARB, //arb + ADDRESSES.arbitrum.WBTC, //wbtc ] }, avax: { @@ -55,7 +55,7 @@ module.exports = treasuryExports({ // owners: [mainTreasury], // tokens: [ // ADDRESSES.pulse.WETH, - // '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', //usdc(fork) + // ADDRESSES.ethereum.USDC, //usdc(fork) // '0x30fcb23a906493371b1721c8feb8815804808d74', //sdai // '0xaa2c47a35c1298795b5271490971ec4874c8e53d', //usdex // '0x6386704cd6f7a584ea9d23ccca66af7eba5a727e', //spark diff --git a/projects/treasury/frax.js b/projects/treasury/frax.js index 744f04050e09..1ceb3a51181a 100644 --- a/projects/treasury/frax.js +++ b/projects/treasury/frax.js @@ -3,7 +3,7 @@ const { nullAddress, treasuryExports } = require("../helper/treasury"); const treasury = "0x9AA7Db8E488eE3ffCC9CdFD4f2EaECC8ABeDCB48"; const fpis = "0xc2544A32872A91F4A553b404C6950e89De901fdb"; -const fxs = "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0"; +const fxs = ADDRESSES.ethereum.FXS; const treasuryarb = "0xe61d9ed1e5dc261d1e90a99304fadcef2c76fd10" module.exports = treasuryExports({ diff --git a/projects/treasury/iq.js b/projects/treasury/iq.js index d7e909d3eed8..caa545cdbd24 100644 --- a/projects/treasury/iq.js +++ b/projects/treasury/iq.js @@ -13,7 +13,7 @@ module.exports = treasuryExports({ "0x9D45081706102E7aadDD0973268457527722E274", ADDRESSES.ethereum.WETH, ADDRESSES.ethereum.WBTC, - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", + ADDRESSES.ethereum.FXS, "0xEF9F994A74CB6EF21C38B13553caa2E3E15F69d0" ], owners: [treasury], diff --git a/projects/treasury/jade-protocol.js b/projects/treasury/jade-protocol.js index ca55cdf63ca8..9ea92d434bbc 100644 --- a/projects/treasury/jade-protocol.js +++ b/projects/treasury/jade-protocol.js @@ -19,7 +19,7 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.USDC, ADDRESSES.ethereum.WBTC, ADDRESSES.ethereum.sfrxETH, - '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0', // FXS + ADDRESSES.ethereum.FXS, // FXS ], owners: [treasury, treasury1], }, diff --git a/projects/treasury/perpetual-protocol.js b/projects/treasury/perpetual-protocol.js index 720990d2d430..6da27dbd951a 100644 --- a/projects/treasury/perpetual-protocol.js +++ b/projects/treasury/perpetual-protocol.js @@ -9,7 +9,7 @@ module.exports = treasuryExports({ ethereum: { tokens: [ nullAddress, - '0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0',//FXS + ADDRESSES.ethereum.FXS,//FXS '0xca1207647Ff814039530D7d35df0e1Dd2e91Fa84',//DHT '0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F',//SDT '0x1494CA1F11D487c2bBe4543E90080AeBa4BA3C2b',//DPI diff --git a/projects/treasury/railgun.js b/projects/treasury/railgun.js index f303f476c7fd..ef4d5f5acb93 100644 --- a/projects/treasury/railgun.js +++ b/projects/treasury/railgun.js @@ -22,12 +22,12 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.USDC, ADDRESSES.ethereum.USDT, ADDRESSES.ethereum.DAI, - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",//fxs + ADDRESSES.ethereum.FXS,//fxs ADDRESSES.ethereum.WSTETH, ADDRESSES.ethereum.CVX, "0xEB4C2781e4ebA804CE9a9803C67d0893436bB27D",//renbtc ADDRESSES.ethereum.cvxCRV, - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0",//wbtc + ADDRESSES.ethereum.FXS,//wbtc "0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3",//mim ADDRESSES.ethereum.LUSD, "0x090185f2135308BaD17527004364eBcC2D37e5F6",//spell @@ -101,7 +101,7 @@ module.exports = treasuryExports({ "0x8f006D1e1D9dC6C98996F50a4c810F17a47fBF19",//nsfw ADDRESSES.fantom.renBTC, "0x9c891326Fd8b1a713974f73bb604677E1E63396D",//islami - "0x45c32fA6DF82ead1e2EF74d17b76547EDdFaFF89",//frax + ADDRESSES.polygon.FRAX,//frax "0xB0B195aEFA3650A6908f15CdaC7D92F8a5791B0B",//bob "0x580A84C73811E1839F75d86d75d88cCa0c241fF4",//qi "0x980111ae1B84E50222C8843e3A7a038F36Fecd2b",//stack diff --git a/projects/treasury/saddle.js b/projects/treasury/saddle.js index 21e629170a46..8eaa74b41d59 100644 --- a/projects/treasury/saddle.js +++ b/projects/treasury/saddle.js @@ -6,7 +6,7 @@ module.exports = treasuryExports({ tokens: [ '0x5575552988a3a80504bbaeb1311674fcfd40ad4b', '0x2cab3abfc1670d1a452df502e216a66883cdf079', - '0x17fc002b466eec40dae837fc4be5c67993ddbd6f', + ADDRESSES.arbitrum.FRAX, ADDRESSES.arbitrum.USDC, ], owners: ['0x8e6e84ddab9d13a17806d34b097102605454d147'], diff --git a/projects/treasury/silo-finance.js b/projects/treasury/silo-finance.js index 169f4f5fbb19..790fdb9f0fc8 100644 --- a/projects/treasury/silo-finance.js +++ b/projects/treasury/silo-finance.js @@ -38,7 +38,7 @@ module.exports = mergeExports([ ADDRESSES.ethereum.CRV, // CRV ADDRESSES.ethereum.CRVUSD, // crvUSD "0xc944E90C64B2c07662A292be6244BDf05Cda44a7", // GRT - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0" // FXS + ADDRESSES.ethereum.FXS // FXS ], owners: ETHEREUM_MAINNET_TREASURIES, ownTokens: [SILO_ETHEREUM_MAINNET, XAI_ETHEREUM_MAINNET], diff --git a/projects/treasury/venus.js b/projects/treasury/venus.js index 2098881e8064..6933612a32f8 100644 --- a/projects/treasury/venus.js +++ b/projects/treasury/venus.js @@ -18,7 +18,7 @@ module.exports = treasuryExports({ ADDRESSES.bsc.BETH, //BETH ADDRESSES.bsc.WBNB, venusBTC, - "0x2170Ed0880ac9A755fd29B2688956BD959F933F8", //eth + ADDRESSES.bsc.ETH, //eth "0xecA88125a5ADbe82614ffC12D0DB554E2e2867C8", // venusUSDC "0xf508fCD89b8bd15579dc79A6827cB4686A3592c8", // venusETH "0xfD5840Cd36d94D7229439859C0112a4185BC0255", // venusUSDT @@ -37,10 +37,10 @@ module.exports = treasuryExports({ "0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47", //ada "0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD", //link "0xbA2aE424d960c26247Dd6c32edC70B295c744C43", //doge - "0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9", //tusd + ADDRESSES.bsc.TUSD, //tusd "0x0D8Ce2A99Bb6e3B7Db580eD848240e4a0F9aE153", //fil "0xCC42724C6683B7E57334c4E856f4c9965ED682bD", //matic - "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56", //busd + ADDRESSES.bsc.BUSD, //busd "0x52F24a5e03aee338Da5fd9Df68D2b6FAe1178827", //ankrbnb "0xCE7de646e7208a4Ef112cb6ed5038FA6cC6b12e3", //trx "0x352Cb5E19b12FC216548a2677bD0fce83BaE434B", //btt diff --git a/projects/treasury/zunami.js b/projects/treasury/zunami.js index fe860711528e..ed61bfd4fc15 100644 --- a/projects/treasury/zunami.js +++ b/projects/treasury/zunami.js @@ -15,7 +15,7 @@ module.exports = treasuryExports({ ADDRESSES.ethereum.CVX, ADDRESSES.ethereum.vlCVX, "0x73968b9a57c6E53d41345FD57a6E6ae27d6CDB2F", // SDT - "0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0" // FXS + ADDRESSES.ethereum.FXS // FXS ], owners: [treasury], ownTokens: [ZUN] diff --git a/projects/umoja/index.js b/projects/umoja/index.js new file mode 100644 index 000000000000..9d749591da38 --- /dev/null +++ b/projects/umoja/index.js @@ -0,0 +1,16 @@ +const Address = require("../helper/coreAssets.json"); +const Http = require("../helper/http"); +const token = Address.arbitrum.USDC_CIRCLE + +module.exports = { + timetravel: false, + misrepresentedTokens: true, + arbitrum: { + tvl: async function (api) { + const data = await Http.get("https://api.protocol.umoja.xyz/tokens/tvl/d-llama"); + + for (const entry of data) + if (entry.currency == "USDC") api.add(token, entry.tvl * 1e6) + } + } +}; \ No newline at end of file diff --git a/projects/unibtc/index.js b/projects/unibtc/index.js new file mode 100644 index 000000000000..d6ec58d87706 --- /dev/null +++ b/projects/unibtc/index.js @@ -0,0 +1,41 @@ +const ADDRESSES = require('../helper/coreAssets.json') +const defaultVault = '0xF9775085d726E782E83585033B58606f7731AB18' + +const config = { + ethereum: { + vault: '0x047D41F2544B7F63A8e991aF2068a363d210d6Da', + tokens: [ADDRESSES['ethereum'].WBTC, '0xc96de26018a54d51c097160568752c4e3bd6c364'] + }, + optimism: { + vault: defaultVault, + tokens: [ADDRESSES['optimism'].WBTC] + }, + mantle: { + vault: defaultVault, + tokens: ['0xC96dE26018A54D51c097160568752c4E3BD6C364'] + }, + bsquared: { + vault: defaultVault, + tokens: [ADDRESSES.null,ADDRESSES['bsquared'].WBTC] + }, + merlin: { + vault: defaultVault, + tokens: [ADDRESSES.null,ADDRESSES['merlin'].WBTC,ADDRESSES['merlin'].WBTC_1] + }, + btr: { + vault: defaultVault, + tokens: [ADDRESSES.null, ADDRESSES['btr'].WBTC] + }, +} + +const tvl = (chainConfig) => { + return async (api) => { + return api.sumTokens({ tokens: chainConfig.tokens, owner: chainConfig.vault }) + } +} + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: tvl(config[chain]) + } +}) diff --git a/projects/vesq/index.js b/projects/vesq/index.js index 01cf8e6b395a..78916b6cd3ff 100644 --- a/projects/vesq/index.js +++ b/projects/vesq/index.js @@ -8,7 +8,7 @@ const treasuryTokens = [ [ADDRESSES.polygon.DAI, false], //DAI ["0x2e1ad108ff1d8c782fcbbb89aad783ac49586756", false], //TUSD ["0xa3fa99a148fa48d14ed51d610c367c61876997f1", false], //MAI - ["0x45c32fa6df82ead1e2ef74d17b76547eddfaff89", false], //FRAX + [ADDRESSES.polygon.FRAX, false], //FRAX ["0x692597b009d13c4049a947cab2239b7d6517875f", false], //UST ["0x27f8d03b3a2196956ed754badc28d73be8830a6e", false], //amDAI ["0xd8cA34fd379d9ca3C6Ee3b3905678320F5b45195", false], //gOHM diff --git a/projects/vesu/index.js b/projects/vesu/index.js index 2e85366489a4..665a01f14ff8 100644 --- a/projects/vesu/index.js +++ b/projects/vesu/index.js @@ -1,3 +1,4 @@ +const ADDRESSES = require('../helper/coreAssets.json') const { multiCall, sumTokens } = require("../helper/chain/starknet"); const { abi, allAbi } = require("./abi"); @@ -5,12 +6,12 @@ const INTERNAL_SCALE = 10 ** 18; const SINGLETON = "0x02545b2e5d519fc230e9cd781046d3a64e092114f07e44771e0d719d148725ef"; const POOL_ID = "0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28"; const ASSETS = [ - "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", - "0x03fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac", - "0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8", - "0x068f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8", - "0x042b8f0484674ca266ac5d08e4ac6a3fe65bd3129795def2dca5c34ecc5f96d2", - "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", + ADDRESSES.starknet.ETH, + ADDRESSES.starknet.WBTC, + ADDRESSES.starknet.USDC, + ADDRESSES.starknet.USDT, + ADDRESSES.starknet.WSTETH, + ADDRESSES.starknet.STRK, ]; async function tvl(api) { diff --git a/projects/wing.js b/projects/wing.js index b68791d482dd..0d8e4c5aa2e6 100644 --- a/projects/wing.js +++ b/projects/wing.js @@ -69,7 +69,7 @@ module.exports = mergeExports([ ADDRESSES.ethereum.WETH, '0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643', '0x39AA39c021dfbaE8faC545936693aC917d5E7563', - '0xdAC17F958D2ee523a2206206994597C13D831ec7', + ADDRESSES.ethereum.USDT, '0x70e36f6BF80a52b3B46b3aF8e106CC0ed743E8e4', '0xc00e94Cb662C3520282E6f5717214004A7f26888', '0x4Ddc2D193948926D02f9B1fE9e1daa0718270ED5', diff --git a/projects/wonderland/index.js b/projects/wonderland/index.js index 10028e4ccf44..023a1f9903d4 100644 --- a/projects/wonderland/index.js +++ b/projects/wonderland/index.js @@ -44,7 +44,7 @@ async function ethTvl(timestamp, ethBlock, chainBlocks) { balances, [ [ADDRESSES.ethereum.LUSD, false], - ["0x3432B6A60D23Ca0dFCa7761B7ab56459D9C964D0", false], // FRAX + [ADDRESSES.ethereum.FXS, false], // FRAX [ADDRESSES.ethereum.CVX, false], [ADDRESSES.ethereum.cvxCRV, false], ["0x55C08ca52497e2f1534B59E2917BF524D4765257", false], // UwU diff --git a/projects/xy-finance/index.js b/projects/xy-finance/index.js index 307d67cbecb6..7124d5d4d7d3 100644 --- a/projects/xy-finance/index.js +++ b/projects/xy-finance/index.js @@ -145,14 +145,16 @@ const yPoolDepositContract = { "contractAddress": "0xEC8476DCC72b4AB6Cbc3C2bD7f50A15891485fDB", "tokenAddress": "0xA2ae6273Dd65F9fA76C3d383eDe9c1261e025DAC" }, - "DBX": { - "contractAddress": "0x812e9eE2437a3e4FE0A4A4A7f195536844301f07", - "tokenAddress": "0x061E31e7768b39a4282822b65569F8d814dC15f6" - }, - "DBC": { - "contractAddress": "0xD99995b63F44fc500B702251262B7d9f35adA0BC", - "tokenAddress": "0x730B05d100EeFb92f04016C6c0cF6f2bBB2C3A57" - }, + // DBX is already counted from DBX tvl on Arbitrum since its just a mint on Cronos + // "DBX": { + // "contractAddress": "0x812e9eE2437a3e4FE0A4A4A7f195536844301f07", + // "tokenAddress": "0x061E31e7768b39a4282822b65569F8d814dC15f6" + // }, + // DBC is already counted from DBC tvl on Arbitrum since its just a mint on Cronos + // "DBC": { + // "contractAddress": "0xD99995b63F44fc500B702251262B7d9f35adA0BC", + // "tokenAddress": "0x730B05d100EeFb92f04016C6c0cF6f2bBB2C3A57" + // }, "SINGLE": { "contractAddress": "0x9A4cC214782Fea5880394eFDE60187797a2FEF01", "tokenAddress": "0x0804702a4E749d39A35FDe73d1DF0B1f1D6b8347" @@ -161,14 +163,20 @@ const yPoolDepositContract = { "contractAddress": "0x58F29F7d759aef5B8e34C8e4152d6117893017aB", "tokenAddress": "0xae620DC4B9b6e44FBeb4a949F63AC957Cc43b5dD" }, - "LLT": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0x92073dE2706eB8f0265998bCf7B8F751e1349b8F" - }, + // LLT is already counted from LLT tvl on Polygon since its just a mint on Cronos + // "LLT": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0x92073dE2706eB8f0265998bCf7B8F751e1349b8F" + // }, "RIP": { "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", "tokenAddress": "0x34aceA6Cc02578aF041a5E976b7289ca23cCB7A8" + }, + "STUCK": { + "contractAddress": "0xc1Ae654b7D9C6a2Cfb0f97254AB5246AAbd2Ce7b", + "tokenAddress": "0xa0D445dC147f598d63518b5783CA97Cd8Bd9f5Bc" } + }, "56": { "ETH": { @@ -211,10 +219,11 @@ const yPoolDepositContract = { "contractAddress": "0xf4137e5D07b476e5A30f907C3e31F9FAAB00716b", "tokenAddress": ADDRESSES.polygon.USDC }, - "BLU": { - "contractAddress": "0x7C1C974367Ee28D3d7aBb088f5FCd748B3759EA4", - "tokenAddress": "0x759d34685468604c695De301ad11A9418e2f1038", - }, + // BLU is already counted from BLU tvl on Cronos since its just a mint on Polygon + // "BLU": { + // "contractAddress": "0x7C1C974367Ee28D3d7aBb088f5FCd748B3759EA4", + // "tokenAddress": "0x759d34685468604c695De301ad11A9418e2f1038", + // }, "CANDY": { "contractAddress": "0x5Bd40e579Cb7D37784689044E6C7c333E2E300e6", "tokenAddress": "0x54E53ed24C12c1d3Df7D653587E2f27d3FbaE3d2", @@ -269,10 +278,11 @@ const yPoolDepositContract = { "contractAddress": "0x680ab543ACd0e52035E9d409014dd57861FA1eDf", "tokenAddress": ADDRESSES.arbitrum.USDC }, - "DBF": { - "contractAddress": "0xa1fB1F1E5382844Ee2D1BD69Ef07D5A6Abcbd388", - "tokenAddress": "0x38A896c29Eb54c566A3fD593f559174520Dc6F75" - }, + // DBF is already counted from DBF tvl on Cronos since its just a mint on Arbitrum + // "DBF": { + // "contractAddress": "0xa1fB1F1E5382844Ee2D1BD69Ef07D5A6Abcbd388", + // "tokenAddress": "0x38A896c29Eb54c566A3fD593f559174520Dc6F75" + // }, "DBX": { "contractAddress": "0x156C04ca75f11817DdbF887692990F3E46e8982B", "tokenAddress": "0x0b257fe969d8782fAcb4ec790682C1d4d3dF1551" @@ -389,14 +399,21 @@ const yPoolDepositContract = { "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", "tokenAddress": ADDRESSES.base.USDbC }, - "LOOT": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" - }, - "RIP": { - "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", - "tokenAddress": "0x34aceA6Cc02578aF041a5E976b7289ca23cCB7A8" - } + // LOOT is already counted from LOOT tvl on Ethereum since its just a mint on Base + // "LOOT": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" + // }, + // RIP is already counted from RIP tvl on Cronos since its just a mint on Base + // "RIP": { + // "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", + // "tokenAddress": "0x34aceA6Cc02578aF041a5E976b7289ca23cCB7A8" + // }, + // STUCK is already counted from STUCK tvl on Cronos since its just a mint on Base + // "STUCK": { + // "contractAddress": "0xc1Ae654b7D9C6a2Cfb0f97254AB5246AAbd2Ce7b", + // "tokenAddress": "0xa0D445dC147f598d63518b5783CA97Cd8Bd9f5Bc" + // } }, "5000": { "ETH": { @@ -411,10 +428,11 @@ const yPoolDepositContract = { "contractAddress": "0x0241fb446d6793866245b936F2C3418F818bDcD3", "tokenAddress": ADDRESSES.mantle.USDT }, - "LOOT": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" - } + // LOOT is already counted from LOOT tvl on Ethereum since its just a mint on Mantle + // "LOOT": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0x94a42083948d86432246eAD625B30d49014A4BFF" + // } }, "534352": { "ETH": { @@ -431,10 +449,11 @@ const yPoolDepositContract = { "contractAddress": "0xFa77c2DecCB21ACb9Bf196408Bf6aD5973D07762", "tokenAddress": ethAddress }, - "LOOT": { - "contractAddress": "0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c", - "tokenAddress": "0x1C559a960aE5293eA56C40EFC3c0169B413DDcF3" - } + // LOOT is already counted from LOOT tvl on Ethereum since its just a mint on Blast + // "LOOT": { + // "contractAddress": "0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c", + // "tokenAddress": "0x1C559a960aE5293eA56C40EFC3c0169B413DDcF3" + // } }, "196": { "ETH": { @@ -457,22 +476,26 @@ const yPoolDepositContract = { } }, "6699": { - "USDC": { - "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", - "tokenAddress": "0xcE8f4E26e2532A78DAcD7A497A1827692b14b31D" - }, - "ETH": { - "contractAddress": "0x4F19699cb57543B76167b7d38040f34db4d11fEC", - "tokenAddress": "0x7e6ecF974310d75325Ab1209253250aC7fCCe09b" - }, - "PEPE": { - "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", - "tokenAddress": "0x4aE774bF3dEfF2eaD31D5D51Aa636EE216fBE274" - }, - "MOG": { - "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", - "tokenAddress": "0xfaffa4b4D8538A2ba63bEa39ACbF709E3A972714" - }, + // USDC is already counted from USDC tvl on Base since its just a mint on OxChain + // "USDC": { + // "contractAddress": "0xd15f36e89e08A67AEe910629fCe9aBA7D2e8Ac80", + // "tokenAddress": "0xcE8f4E26e2532A78DAcD7A497A1827692b14b31D" + // }, + // ETH is already counted from ETH tvl on Base since its just a mint on OxChain + // "ETH": { + // "contractAddress": "0x4F19699cb57543B76167b7d38040f34db4d11fEC", + // "tokenAddress": "0x7e6ecF974310d75325Ab1209253250aC7fCCe09b" + // }, + // PEPE is already counted from PEPE tvl on Ethereum since its just a mint on OxChain + // "PEPE": { + // "contractAddress": "0x0790eF241DC85Adf32998aae5E5738579c417701", + // "tokenAddress": "0x4aE774bF3dEfF2eaD31D5D51Aa636EE216fBE274" + // }, + // MOG is already counted from MOG tvl on Ethereum since its just a mint on OxChain + // "MOG": { + // "contractAddress": "0x141E379505C3b89C5BBE4Bd2353f12CA4681e3D2", + // "tokenAddress": "0xfaffa4b4D8538A2ba63bEa39ACbF709E3A972714" + // }, // "BITCOIN": { // "contractAddress": "0xD95841e7eC6b61f708829B57a3433C3Fd24B2A8c", // "tokenAddress": "0x92073dE2706eB8f0265998bCf7B8F751e1349b8F"