From 5f7732f24d0f01cbfecd9e89b84f0107062941d5 Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Mon, 23 Dec 2024 15:41:33 +0300 Subject: [PATCH 01/11] added dex tvl to projects/cybro --- projects/cybro/index.js | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 0e9c8b243c5..ffb8010d9a8 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -18,12 +18,44 @@ const vaults = [ '0xc9434fbee4ec9e0bad7d067b35d2329e5f1d8915', '0x18e22f3f9a9652ee3a667d78911bac55bc2249af', '0x6654cddf2a14a06307af6a8d7731dd4e059962a1', - '0x4caec64454893c7912e6beb1e19b4714dd353748', - '0x24e72c2c7be9b07942f6f8d3cdce995df699514d', +] + +const dexes = [ + { address: '0xe9041d3483a760c7d5f8762ad407ac526fbe144f', tokenType: 'WETH' }, + { address: '0xbfb18eda8961ee33e38678caf2bceb2d23aedfea', tokenType: 'WETH' }, + { address: '0xe472ccb182a51c589034957cd6291d0b64eaaab2', tokenType: 'WETH' }, + { address: '0x370498c028564de4491b8aa2df437fb772a39ec5', tokenType: 'BLAST' }, + { address: '0xc95317e48451a97602e3ae09c237d1dd8ee83cd0', tokenType: 'WETH' }, + { address: '0x66e1bea0a5a934b96e2d7d54eddd6580c485521b', tokenType: 'WETH' }, ] async function tvl(api) { - return api.erc4626Sum2({ calls: vaults }) + const weth_address = "0x4300000000000000000000000000000000000004" + const blast_address = "0xb1a5700fA2358173Fe465e6eA4Ff52E36e88E2ad" + + let totalTVL = { + weth_address: 0, + blast_address: 0 + } + + const vaultTVL = await api.erc4626Sum2({ calls: vaults }); + totalTVL[weth_address] += vaultTVL; + + for (const dex of dexes) { + const totalSupply = await api.call({ + target: dex.address, + params: [], + abi: 'function totalSupply() view returns (uint256)' + }); + + if (dex.tokenType === 'WETH') { + totalTVL[weth_address] += totalSupply; + } else if (dex.tokenType === 'BLAST') { + totalTVL[blast_address] += totalSupply; + } + } + + return totalTVL; } module.exports = { From e15c3131dfebc7d643a34e62c251e42407b30dd5 Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Mon, 23 Dec 2024 16:01:27 +0300 Subject: [PATCH 02/11] updated addresses --- projects/cybro/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index ffb8010d9a8..0db92f8940b 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -18,6 +18,8 @@ const vaults = [ '0xc9434fbee4ec9e0bad7d067b35d2329e5f1d8915', '0x18e22f3f9a9652ee3a667d78911bac55bc2249af', '0x6654cddf2a14a06307af6a8d7731dd4e059962a1', + '0x4caec64454893c7912e6beb1e19b4714dd353748', + '0x24e72c2c7be9b07942f6f8d3cdce995df699514d', ] const dexes = [ From 3db239c40029e6f4a3e67ee7d2dbf0a2107a737c Mon Sep 17 00:00:00 2001 From: g1nt0ki <99907941+g1nt0ki@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:54:41 +0100 Subject: [PATCH 03/11] minor fix --- projects/cybro/index.js | 53 ++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 32 deletions(-) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 0db92f8940b..5a3bf2a0882 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -23,41 +23,30 @@ const vaults = [ ] const dexes = [ - { address: '0xe9041d3483a760c7d5f8762ad407ac526fbe144f', tokenType: 'WETH' }, - { address: '0xbfb18eda8961ee33e38678caf2bceb2d23aedfea', tokenType: 'WETH' }, - { address: '0xe472ccb182a51c589034957cd6291d0b64eaaab2', tokenType: 'WETH' }, - { address: '0x370498c028564de4491b8aa2df437fb772a39ec5', tokenType: 'BLAST' }, - { address: '0xc95317e48451a97602e3ae09c237d1dd8ee83cd0', tokenType: 'WETH' }, - { address: '0x66e1bea0a5a934b96e2d7d54eddd6580c485521b', tokenType: 'WETH' }, + '0xe9041d3483a760c7d5f8762ad407ac526fbe144f', + '0xbfb18eda8961ee33e38678caf2bceb2d23aedfea', + '0xe472ccb182a51c589034957cd6291d0b64eaaab2', + '0x370498c028564de4491b8aa2df437fb772a39ec5', + '0xc95317e48451a97602e3ae09c237d1dd8ee83cd0', + '0x66e1bea0a5a934b96e2d7d54eddd6580c485521b', ] async function tvl(api) { - const weth_address = "0x4300000000000000000000000000000000000004" - const blast_address = "0xb1a5700fA2358173Fe465e6eA4Ff52E36e88E2ad" - - let totalTVL = { - weth_address: 0, - blast_address: 0 - } - - const vaultTVL = await api.erc4626Sum2({ calls: vaults }); - totalTVL[weth_address] += vaultTVL; - - for (const dex of dexes) { - const totalSupply = await api.call({ - target: dex.address, - params: [], - abi: 'function totalSupply() view returns (uint256)' - }); - - if (dex.tokenType === 'WETH') { - totalTVL[weth_address] += totalSupply; - } else if (dex.tokenType === 'BLAST') { - totalTVL[blast_address] += totalSupply; - } - } - - return totalTVL; + const token0s = await api.multiCall({ abi: 'address:token0', calls: dexes}) + const token1s = await api.multiCall({ abi: 'address:token1', calls: dexes}) + const positionData = await api.multiCall({ abi: 'function getPositionAmounts() view returns (uint256 amount0, uint256 amount1)', calls: dexes}) + const ownerTokens = [] + dexes.forEach((dex, idx) => { + const token0 = token0s[idx] + const token1 = token1s[idx] + const { amount0, amount1 } = positionData[idx] + api.add(token0, amount0) + api.add(token1, amount1) + ownerTokens.push([[token0, token1], dex]) + }) + + await api.sumTokens({ ownerTokens }) + return api.erc4626Sum2({ calls: vaults }); } module.exports = { From e38423c4864bc051907acb1fd7e5b564f9be2662 Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Mon, 23 Dec 2024 20:15:42 +0300 Subject: [PATCH 04/11] added arbitrum vaults --- projects/cybro/index.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 5a3bf2a0882..1f23b2919cf 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -1,4 +1,4 @@ -const vaults = [ +const vaultsBlast = [ '0xe922bccf90d74f02a9d4203b377399314e008e41', '0xdccde9c6800bea86e2e91cf54a870ba3ff6faf9f', '0x0667ac28015ed7146f19b2d218f81218abf32951', @@ -22,6 +22,12 @@ const vaults = [ '0x24e72c2c7be9b07942f6f8d3cdce995df699514d', ] +const vaultsArbitrum = [ + '0x320cd9d00961fb45857a043efea77dc6b9db5d95', + '0x6f0acbaac51f3c72ddaa4edc6e20fc388d20adbc', + '0x951c846aa10cc3da45defed784c3802605f71769', +] + const dexes = [ '0xe9041d3483a760c7d5f8762ad407ac526fbe144f', '0xbfb18eda8961ee33e38678caf2bceb2d23aedfea', @@ -31,7 +37,7 @@ const dexes = [ '0x66e1bea0a5a934b96e2d7d54eddd6580c485521b', ] -async function tvl(api) { +async function tvlBlast(api) { const token0s = await api.multiCall({ abi: 'address:token0', calls: dexes}) const token1s = await api.multiCall({ abi: 'address:token1', calls: dexes}) const positionData = await api.multiCall({ abi: 'function getPositionAmounts() view returns (uint256 amount0, uint256 amount1)', calls: dexes}) @@ -46,11 +52,16 @@ async function tvl(api) { }) await api.sumTokens({ ownerTokens }) - return api.erc4626Sum2({ calls: vaults }); + return api.erc4626Sum2({ calls: vaultsBlast }); +} + +async function tvlArbitrum { + return api.erc4626Sum2({ calls: vaultsArbitrum }); } module.exports = { doublecounted: true, methodology: "We calculate TVL based on the Total Supply of our proxy contracts through which users interact with vault's contracts", - blast: { tvl }, + blast: { tvlBlast }, + arbitrum: { tvlArbitrum }, }; From 2bb20f190b936998f40e5402a966a50dd6a202dd Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Mon, 23 Dec 2024 20:28:46 +0300 Subject: [PATCH 05/11] fixed errors --- projects/cybro/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 1f23b2919cf..eed091e92a4 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -55,13 +55,13 @@ async function tvlBlast(api) { return api.erc4626Sum2({ calls: vaultsBlast }); } -async function tvlArbitrum { +async function tvlArbitrum(api) { return api.erc4626Sum2({ calls: vaultsArbitrum }); } module.exports = { doublecounted: true, methodology: "We calculate TVL based on the Total Supply of our proxy contracts through which users interact with vault's contracts", - blast: { tvlBlast }, - arbitrum: { tvlArbitrum }, + blast: { tvl: tvlBlast }, + arbitrum: { tvl: tvlArbitrum }, }; From 3169fd88853cc5c9881be9a8ad8b91c8810ca19f Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Mon, 13 Jan 2025 15:26:09 +0300 Subject: [PATCH 06/11] added base vaults tvl to cybro --- projects/cybro/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index eed091e92a4..48466570962 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -28,6 +28,11 @@ const vaultsArbitrum = [ '0x951c846aa10cc3da45defed784c3802605f71769', ] +const vaultsBase = [ + "0x459a3d995d66798b1ab114f702b8bc8655484e78", + "0xa7517b9930d0556175a1971bd62084e16f21881f", +] + const dexes = [ '0xe9041d3483a760c7d5f8762ad407ac526fbe144f', '0xbfb18eda8961ee33e38678caf2bceb2d23aedfea', @@ -59,9 +64,14 @@ async function tvlArbitrum(api) { return api.erc4626Sum2({ calls: vaultsArbitrum }); } +async function tvlBase(api) { + return api.erc4626Sum2({ calls: vaultsBase }); +} + module.exports = { doublecounted: true, methodology: "We calculate TVL based on the Total Supply of our proxy contracts through which users interact with vault's contracts", + base: { tvl: tvlBase }, blast: { tvl: tvlBlast }, arbitrum: { tvl: tvlArbitrum }, }; From ddcce8bde55b6924440aefc88b87854a20f3c7cb Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Mon, 13 Jan 2025 21:38:57 +0300 Subject: [PATCH 07/11] added vault address --- projects/cybro/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 48466570962..39b3241e83e 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -20,6 +20,7 @@ const vaultsBlast = [ '0x6654cddf2a14a06307af6a8d7731dd4e059962a1', '0x4caec64454893c7912e6beb1e19b4714dd353748', '0x24e72c2c7be9b07942f6f8d3cdce995df699514d', + '0xb3e2099b135b12139c4eb774f84a5808fb25c67d', ] const vaultsArbitrum = [ From 66402eeacff2635be2dfb4598549dea952529bb2 Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Fri, 16 May 2025 17:12:48 +0300 Subject: [PATCH 08/11] added bsc network and updated vaults addresses --- projects/cybro/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 47d14cda3d1..2372f8064db 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -36,12 +36,20 @@ const vaultsArbitrum = [ '0x951c846aa10cc3da45defed784c3802605f71769', '0x6f0acbaac51f3c72ddaa4edc6e20fc388d20adbc', '0x320cd9d00961fb45857a043efea77dc6b9db5d95', + '0x4e433ae90f0d1be9d88bed9f7707fcff20a455ac', + '0x1310b9de457675d65f3838c1e9d19a5ca6619440', ] const vaultsBase = [ '0x459a3d995d66798b1ab114f702b8bc8655484e78', '0xa7517b9930d0556175a1971bd62084e16f21881f', '0x0655e391e0c6e0b8cbe8c2747ae15c67c37583b9', + '0x578e7261b9d3c143700a735526bfd63713f639c5', + '0xdd996648b02bf22d9c348e11d470938f8ae50f2b', +] + +const vaultsBSC = [ + '0x5351d748eb97116755b423bcc207f3613b487ade', ] const dexes = [ @@ -79,10 +87,15 @@ async function tvlBase(api) { return api.erc4626Sum2({ calls: vaultsBase }); } +async function tvlBSC(api) { + return api.erc4626Sum2({ calls: vaultsBSC }); +} + module.exports = { doublecounted: true, methodology: "We calculate TVL based on the Total Supply of our proxy contracts through which users interact with vault's contracts", base: { tvl: tvlBase }, blast: { tvl: tvlBlast, staking: stakings(cybroStakingBlast, "0x963eec23618bbc8e1766661d5f263f18094ae4d5") }, arbitrum: { tvl: tvlArbitrum }, + bsc: { tvl: tvlBSC }, }; From df5f343310f15ab36666a4bf90f0c6835a2d8180 Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Wed, 6 Aug 2025 15:25:10 +0300 Subject: [PATCH 09/11] added addresses to arbitrum & base vaults --- projects/cybro/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/cybro/index.js b/projects/cybro/index.js index 2372f8064db..3de2db525e8 100644 --- a/projects/cybro/index.js +++ b/projects/cybro/index.js @@ -38,6 +38,7 @@ const vaultsArbitrum = [ '0x320cd9d00961fb45857a043efea77dc6b9db5d95', '0x4e433ae90f0d1be9d88bed9f7707fcff20a455ac', '0x1310b9de457675d65f3838c1e9d19a5ca6619440', + '0xbDe5296eA786a12c4BFd60408063816E36A2F4b1', ] const vaultsBase = [ @@ -46,6 +47,7 @@ const vaultsBase = [ '0x0655e391e0c6e0b8cbe8c2747ae15c67c37583b9', '0x578e7261b9d3c143700a735526bfd63713f639c5', '0xdd996648b02bf22d9c348e11d470938f8ae50f2b', + '0x84FbCde24b75F3d45863e82282683DfF16C398B7', ] const vaultsBSC = [ From aef10903efd181460b27dd30eb40c0a06203ea35 Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Fri, 21 Nov 2025 13:38:28 +0300 Subject: [PATCH 10/11] added cybro-lpmanager --- projects/cybro-lpmanager/index.js | 45 +++++++++++++++++++++++ projects/{cybro => cybro-vaults}/index.js | 0 2 files changed, 45 insertions(+) create mode 100644 projects/cybro-lpmanager/index.js rename projects/{cybro => cybro-vaults}/index.js (100%) diff --git a/projects/cybro-lpmanager/index.js b/projects/cybro-lpmanager/index.js new file mode 100644 index 00000000000..9514aef44af --- /dev/null +++ b/projects/cybro-lpmanager/index.js @@ -0,0 +1,45 @@ +const axios = require('axios'); + +const API_ENDPOINT = 'https://v2-api.cybro.io/api/v1/dashboard/aum'; + +const chainIdMap = { + arbitrum: 42161, + base: 8453, + unichain: 130, +}; + +const config = { + arbitrum: { + lpManager: '0x0964B7A10631f2139dcf2e0aa1b621F97a19e998', + }, + base: { + lpManager: '0xB3dA213b0005dF568A222876e5F5DB61C985936F', + }, + unichain: { + lpManager: '0x7aD4e1e8FAe276B9debb40340Dc65d6A2274189B', + }, +}; + +async function fetchAUM(chain) { + try { + const chainId = chainIdMap[chain]; + const response = await axios.get(API_ENDPOINT, { params: { chain_id: chainId } }); + return response.data.aum_usd || 0; + } catch (error) { + console.error(`Error fetching AUM for ${chain}:`, error); + return 0; + } +} + +module.exports = { + doublecounted: false, +}; + +Object.keys(config).forEach(chain => { + module.exports[chain] = { + tvl: async () => { + const aum = await fetchAUM(chain); + return { [chain]: aum }; + } + }; +}); diff --git a/projects/cybro/index.js b/projects/cybro-vaults/index.js similarity index 100% rename from projects/cybro/index.js rename to projects/cybro-vaults/index.js From c8b09ca3902fa0a1fc4ed6db0f06d864ba5b0f2d Mon Sep 17 00:00:00 2001 From: 0xMBro Date: Tue, 25 Nov 2025 17:14:49 +0300 Subject: [PATCH 11/11] updated --- projects/cybro-lpmanager/index.js | 5 ----- projects/{cybro-vaults => cybro}/index.js | 0 2 files changed, 5 deletions(-) rename projects/{cybro-vaults => cybro}/index.js (100%) diff --git a/projects/cybro-lpmanager/index.js b/projects/cybro-lpmanager/index.js index 9514aef44af..e39d75d87a4 100644 --- a/projects/cybro-lpmanager/index.js +++ b/projects/cybro-lpmanager/index.js @@ -21,14 +21,9 @@ const config = { }; async function fetchAUM(chain) { - try { const chainId = chainIdMap[chain]; const response = await axios.get(API_ENDPOINT, { params: { chain_id: chainId } }); return response.data.aum_usd || 0; - } catch (error) { - console.error(`Error fetching AUM for ${chain}:`, error); - return 0; - } } module.exports = { diff --git a/projects/cybro-vaults/index.js b/projects/cybro/index.js similarity index 100% rename from projects/cybro-vaults/index.js rename to projects/cybro/index.js