From 6c4e587d9ee7f70595177eac83ed8d52e4dd2d7b Mon Sep 17 00:00:00 2001 From: realdealshaman Date: Fri, 13 Sep 2024 23:27:47 +0100 Subject: [PATCH 1/7] add new adapters for electroswap --- projects/electroswap-v2/index.js | 7 +++++++ projects/electroswap-v3/index.js | 8 ++++++++ projects/helper/chains.json | 1 + projects/helper/env.js | 1 + projects/helper/tokenMapping.js | 4 ++++ 5 files changed, 21 insertions(+) create mode 100644 projects/electroswap-v2/index.js create mode 100644 projects/electroswap-v3/index.js diff --git a/projects/electroswap-v2/index.js b/projects/electroswap-v2/index.js new file mode 100644 index 00000000000..35fbf2c4a3c --- /dev/null +++ b/projects/electroswap-v2/index.js @@ -0,0 +1,7 @@ +const { getUniTVL } = require('../helper/unknownTokens') + +module.exports={ + etn: { + tvl: getUniTVL({ factory: '0x203D550ed6fA9dAB8A4190720CF9F65138abd15B', useDefaultCoreAssets: false }), + } +} \ No newline at end of file diff --git a/projects/electroswap-v3/index.js b/projects/electroswap-v3/index.js new file mode 100644 index 00000000000..b580d9c6e93 --- /dev/null +++ b/projects/electroswap-v3/index.js @@ -0,0 +1,8 @@ +const { uniV3Export } = require("../helper/uniswapV3"); + +module.exports = uniV3Export({ + etn: { + factory: "0xbF6Bcbe2be545135391777F3B4698be92E2EB8cA", + fromBlock: 1242016, + }, +}); diff --git a/projects/helper/chains.json b/projects/helper/chains.json index 4e98db8806e..5f339a813f1 100644 --- a/projects/helper/chains.json +++ b/projects/helper/chains.json @@ -112,6 +112,7 @@ "ethereumclassic", "ethf", "ethpow", + "etn", "europa", "everscale", "evmos", diff --git a/projects/helper/env.js b/projects/helper/env.js index ebdf0c7329f..69b6c82ea8f 100644 --- a/projects/helper/env.js +++ b/projects/helper/env.js @@ -13,6 +13,7 @@ const DEFAULTS = { ANKR_API_KEY: '79258ce7f7ee046decc3b5292a24eb4bf7c910d7e39b691384c7ce0cfb839a01', RENEC_RPC: "https://api-mainnet-beta.renec.foundation:8899/", IDEX_RPC: "https://xchain-rpc.idex.io", + ETN_RPC: "https://rpc.ankr.com/electroneum" } const ENV_KEYS = [ diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index b67ae6f720f..90e0b745157 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -1,3 +1,4 @@ +const { decimals } = require('@defillama/sdk/build/erc20') let coreAssets = require('./coreAssets.json') const ADDRESSES = coreAssets const nullAddress = ADDRESSES.null @@ -127,6 +128,9 @@ const fixBalancesTokens = { '0x6c76971f98945ae98dd7d4dfca8711ebea946ea6': { coingeckoId: "wrapped-steth", decimals: 18 }, '0xaf204776c7245bf4147c2612bf6e5972ee483701': { coingeckoId: "savings-dai", decimals: 18 }, }, + etn: { + '0x138dafbda0ccb3d8e39c19edb0510fc31b7c1c77': { coingeckoId: "electroneum", decimals: 18 } + } } ibcChains.forEach(chain => fixBalancesTokens[chain] = { ...ibcMappings, ...(fixBalancesTokens[chain] || {}) }) From c3bad51e5d0c9702830de41bbc63f53bbe637f9b Mon Sep 17 00:00:00 2001 From: g1ntoki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:44:40 +0200 Subject: [PATCH 2/7] zerolend: add pools #11629 --- projects/zerolend/index.js | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/projects/zerolend/index.js b/projects/zerolend/index.js index 6f56ea6d819..52ce59c015b 100644 --- a/projects/zerolend/index.js +++ b/projects/zerolend/index.js @@ -1,14 +1,22 @@ +const sdk = require('@defillama/sdk') const { aaveExports } = require("../helper/aave"); const { staking } = require("../helper/staking"); const { pool2s } = require("../helper/pool2"); const config = { - era: "0xB73550bC1393207960A385fC8b34790e5133175E", - manta: "0x67f93d36792c49a4493652B91ad4bD59f428AD15", - blast: "0xc6DF4ddDBFaCb866e78Dcc01b813A41C15A08C10", - linea: "0x67f93d36792c49a4493652B91ad4bD59f428AD15", - xlayer: "0x97e59722318F1324008484ACA9C343863792cBf6", - ethereum: "0x47223D4eA966a93b2cC96FFB4D42c22651FADFcf", + era: ["0xB73550bC1393207960A385fC8b34790e5133175E"], + manta: ["0x67f93d36792c49a4493652B91ad4bD59f428AD15"], + blast: ["0xc6DF4ddDBFaCb866e78Dcc01b813A41C15A08C10"], + linea: [ + "0x67f93d36792c49a4493652B91ad4bD59f428AD15", // main linea market + '0x9aFB91a3cfB9aBc8Cbc8429aB57b6593FE36E173', // croak linea market + '0xEe9ec60657B714E3FAC5255a5443AC5EC7Ba5bB0', // foxy linea market + ], + xlayer: ["0x97e59722318F1324008484ACA9C343863792cBf6"], + ethereum: [ + "0x47223D4eA966a93b2cC96FFB4D42c22651FADFcf", // ethereum lrt market + '0x31063F7CA8ef4089Db0dEdf8D6e35690B468A611' // bitcoin lrt market + ], }; const linea = { @@ -23,7 +31,11 @@ const linea = { const data = {}; Object.keys(config).forEach((chain) => { - data[chain] = aaveExports(chain, undefined, undefined, [config[chain]]); + const chainExports = config[chain].map((address) => aaveExports(chain, undefined, undefined, [address])) + data[chain] = { + tvl: sdk.util.sumChainTvls(chainExports.map(i => i.tvl)), + borrowed: sdk.util.sumChainTvls(chainExports.map(i => i.borrowed)) + } }); data.linea.staking = staking(linea.zeroLocker, linea.zero, "linea"); From ccf35dcf05c228aa399f35d14c602fe2d5d5784c Mon Sep 17 00:00:00 2001 From: Evgeny Date: Sat, 14 Sep 2024 12:45:20 +0400 Subject: [PATCH 3/7] Oasis sapphire (#11628) Co-authored-by: Evgeny Rozanov --- projects/accumulated-finance/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/accumulated-finance/index.js b/projects/accumulated-finance/index.js index 95eed412e76..8779d0c22f5 100644 --- a/projects/accumulated-finance/index.js +++ b/projects/accumulated-finance/index.js @@ -62,6 +62,12 @@ const config = { "LST": "0xcba2aeec821b0b119857a9ab39e09b034249681a" }, } + ], + "oasis": [ + { + "sapphire": { + "LST": "0xed57966f1566de1a90042d07403021ea52ad4724" + }} ] } From 1618324dc14302647466fb5d17ba580c63bb0176 Mon Sep 17 00:00:00 2001 From: rav <85165079+rav-ipor@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:47:24 +0200 Subject: [PATCH 4/7] Add hallmarks and logo update in IPOR protocol (#11626) Co-authored-by: adam Co-authored-by: kris-ipor <98769272+kris-ipor@users.noreply.github.com> --- projects/ipor/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/ipor/index.js b/projects/ipor/index.js index f4e7758c56f..40b79070e39 100644 --- a/projects/ipor/index.js +++ b/projects/ipor/index.js @@ -93,5 +93,8 @@ module.exports = { }, arbitrum: { tvl: tvlArbitrum - } + }, + hallmarks:[ + [1674648000, "Liquidity Mining Start"] + ], }; From 45766fbace13356077ba71b2716787def99bb664 Mon Sep 17 00:00:00 2001 From: g1ntoki <99907941+g1nt0ki@users.noreply.github.com> Date: Sat, 14 Sep 2024 10:53:11 +0200 Subject: [PATCH 5/7] track clTON #11625 --- projects/cygnus-fi-ton/index.js | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 projects/cygnus-fi-ton/index.js diff --git a/projects/cygnus-fi-ton/index.js b/projects/cygnus-fi-ton/index.js new file mode 100644 index 00000000000..f795f9a54f1 --- /dev/null +++ b/projects/cygnus-fi-ton/index.js @@ -0,0 +1,31 @@ +const { call } = require("../helper/chain/ton") +const { get } = require('../helper/http') + +// helper function of getting jetton metadata +async function getJettonMetadata(addr) { + const res = await get(`https://tonapi.io/v2/jettons/${addr}`) + return res +} + +async function tvl(api) { + const CLTON_MINTER_ADDRESS = 'EQDz48al4FfPnapvXYJOfkBOIj3xvNZ0t5vSpQN-Qukqwm7W' + const CLTON_TOKEN_ADDRESS = 'EQCxd6SJQ8KiLkEpN3OoBfUIHqPE3yp0j80UnPysQqcTikNF' + + const cltonMinterResult = await call({ target: CLTON_MINTER_ADDRESS, abi: "get_minter_data", stack: [] }) + // exchange rate from clTON to TON: decimal 9 + + const cltonToTon = cltonMinterResult[4] / 1e9 + const cltonMetadata = await getJettonMetadata(CLTON_TOKEN_ADDRESS) + + // Now the tokens in the withdrawal vault will be correctly destroyed, so the TOTAL SUPPLY can be a true indication of tvl + const cltonTotalSupply = (cltonMetadata['total_supply']) / 1e9 + + const cltonTvl = cltonTotalSupply * cltonToTon + api.addCGToken("the-open-network", cltonTvl) +} + +module.exports = { + ton: { + tvl + } +}; \ No newline at end of file From 6be3c60110dc816f4b3e644d15ec61f5641385a4 Mon Sep 17 00:00:00 2001 From: daedboi <87483308+daedboi@users.noreply.github.com> Date: Sat, 14 Sep 2024 11:54:37 +0300 Subject: [PATCH 6/7] feat: Update subgraph link for BMX Freestyle (#11624) --- projects/freestyle/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/freestyle/index.js b/projects/freestyle/index.js index 4aadb02a6e1..fce0e463725 100644 --- a/projects/freestyle/index.js +++ b/projects/freestyle/index.js @@ -5,7 +5,7 @@ const freestyleConfig = { base: { token: ADDRESSES.base.USDC, start: 1700006400, - graphUrl: "https://api.studio.thegraph.com/query/62454/analytics_base_8_2/version/latest", + graphUrl: "https://api-v2.morphex.trade/subgraph/3KhmYXgsM3CM1bbUCX8ejhcxQCtWwpUGhP7p9aDKZ94Z", accountSource: '0x6D63921D8203044f6AbaD8F346d3AEa9A2719dDD' }, } From f7f546a2a781cb20ac833cd1caaf9af19c90ac6d Mon Sep 17 00:00:00 2001 From: Strategic Reserve Date: Sat, 14 Sep 2024 01:55:52 -0700 Subject: [PATCH 7/7] Add Velo/Aero/Edits (#11623) --- projects/visor/config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/visor/config.js b/projects/visor/config.js index 336cd3e712a..026bae0e928 100644 --- a/projects/visor/config.js +++ b/projects/visor/config.js @@ -34,6 +34,7 @@ const HYPE_REGISTRY = { ], optimism: [ ["0xF5BFA20F4A77933fEE0C7bB7F39E7642A070d599", 6538026], // Uniswap + ["0xF802D5c44dC4E3bB0eCcf680a6bA82Cbd24B9F33", 125319599], // Velodrome ], arbitrum: [ ["0x66CD859053c458688044d816117D5Bdf42A56813", 10617223], // Uniswap @@ -87,6 +88,7 @@ const HYPE_REGISTRY = { ["0x8118C33513feC13f8cf488CCb4509190650F0e92", 7310111], // Baseswap ["0xf1DF4F17e34Ba710DfFC487F73f1e19476E815a6", 8743213], // Thick ["0xe1cd1c2d2e4B44dE211D554649BC7dc49eF07784", 15063294], // Kinetix + ["0x6809f4881707459Ad0287C6467365E3C910e9373", 19631061], // Aerodrome ], kava: [ ["0x683292172E2175bd08e3927a5e72FC301b161300", 6384272], // Kinetix @@ -141,7 +143,7 @@ const HYPE_REGISTRY = { ], core: [ ["0x32e27fF479454e32868ff67Ee9F06BAFDC1E908F", 17268275], // Glyph - ["0xFc13Ebe7FEB9595D70195E9168aA7F3acE153621", 17164390], // Glyph + ["0xFc13Ebe7FEB9595D70195E9168aA7F3acE153621", 17164390], // CoreX ], };