diff --git a/projects/helper/tokenMapping.js b/projects/helper/tokenMapping.js index be2dd53c0695..ed931fd087bb 100644 --- a/projects/helper/tokenMapping.js +++ b/projects/helper/tokenMapping.js @@ -78,6 +78,7 @@ const fixBalancesTokens = { "0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3": { "coingeckoId": "lorenzo-stbtc", "decimals": 18 }, "0x2826D136F5630adA89C1678b64A61620Aab77Aea": { "coingeckoId": "swell-network", "decimals": 18 }, "0x1cf7b5f266A0F39d6f9408B90340E3E71dF8BF7B": { "coingeckoId": "swell-restaked-btc", "decimals": 8 }, + "0xFA3198ecF05303a6d96E57a45E6c815055D255b1": { "coingeckoId": "universal-btc", "decimals": 18 }, "0xb89c6ED617f5F46175E41551350725A09110bbCE": { "coingeckoId": "tether", "decimals": 6 }, "0x99a38322cAF878Ef55AE4d0Eda535535eF8C7960": { "coingeckoId": "usd-coin", "decimals": 6 }, "0xA6cB988942610f6731e664379D15fFcfBf282b44": { "coingeckoId": "wrapped-eeth", "decimals": 18 }, diff --git a/projects/swell-earn-eth/index.js b/projects/swell-earn-eth/index.js index 6eb2e6e2684b..7b69fb2c1bfa 100644 --- a/projects/swell-earn-eth/index.js +++ b/projects/swell-earn-eth/index.js @@ -1,3 +1,4 @@ +const sdk = require('@defillama/sdk') const { sumTokens2, PANCAKE_NFT_ADDRESS } = require('../helper/unwrapLPs') const ADDRESSES = require('../helper/coreAssets.json') @@ -9,6 +10,22 @@ const ethTokens = [ '0xf951E335afb289353dc249e82926178EaC7DEd78', // swETH ADDRESSES.ethereum.WSTETH, // wstETH ADDRESSES.ethereum.WETH, // WETH + "0x9Ba021B0a9b958B5E75cE9f6dff97C7eE52cb3E6", // apxETH + "0x04C154b66CB340F3Ae24111CC767e0184Ed00Cc6", // pxETH + "0xCd5fE23C85820F7B72D0926FC9b05b43E359b7ee", // weETH + "0xbf5495Efe5DB9ce00f80364C8B423567e58d2110", // ezETH + "0xC329400492c6ff2438472D4651Ad17389fCb843a", // sym_wstETH + "0x38B86004842D3FA4596f0b7A0b53DE90745Ab654", // sym_swETH + "0xB26ff591F44b04E78de18f43B46f8b70C6676984", // sym_cbETH + "0x5fD13359Ba15A84B76f7F87568309040176167cd", // Amphor_ETH + "0x8a053350ca5F9352a16deD26ab333e2D251DAd7c", // mmETH + "0x32bd822d615A3658A68b6fDD30c2fcb2C996D678", // mswETH + "0x49446A0874197839D15395B908328a74ccc96Bc0", // mstETH + "0x997949eEA781c04E4801d9c0902540236A317B07", // PT_rstETH_25JUL2024 + "0x6ee2b5E19ECBa773a352E5B21415Dc419A700d1d", // PT_weETH_26DEC2024 + "0xf7906F274c174A52d444175729E3fa98f9bde285", // PT_ezETH_26DEC2024 + "0x5cb12D56F5346a016DBBA8CA90635d82e6D1bcEa", // PT_rswETH_27JUN2024 + "0xc69Ad9baB1dEE23F4605a82b3354F8E40d1E5966", // PT_weETH_27JUN2024 ] const pendleLPTokens = [ @@ -20,6 +37,12 @@ const vaultTokens = [ "0x78Fc2c2eD1A4cDb5402365934aE5648aDAd094d0", // Re7 WETH ] +const swellTokens = [ + '0x18d33689AE5d02649a859A1CF16c9f0563975258', // rswETH + '0x09341022ea237a4DB1644DE7CCf8FA0e489D85B7', // swETH + '0xC3d33a0Ea1582410075567c589af895fcaF1127c', // tempest weeth/eth +] + const tokens = [ ...ethTokens, ...pendleLPTokens, @@ -27,17 +50,55 @@ const tokens = [ ] -const tvl = async (api) => { +const ethTvl = async (api) => { return sumTokens2({ api, owner: earnETHVault, tokens, uniV3nftsAndOwners: [[PANCAKE_NFT_ADDRESS, earnETHVault]], - uniV3ExtraConfig: { nftIdFetcher: pancakeswapMasterChef } + uniV3ExtraConfig: { nftIdFetcher: pancakeswapMasterChef }, + fetchCoValentTokens: true + }) +} + +const swellTvl = async (api) => { + return sumTokens2({ + api, + owner: earnETHVault, + tokens: swellTokens }) } +const earnBTCVault = '0x66E47E6957B85Cf62564610B76dD206BB04d831a'; + +const ethBTCTvl = async (api) => { + const ethTokens = [ + ADDRESSES.ethereum.WBTC, // WBTC + '0x8DB2350D78aBc13f5673A411D4700BCF87864dDE', // swBTC + '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf', // cbBTC + '0xC96dE26018A54D51c097160568752c4E3BD6C364', // fBTC + '0xF469fBD2abcd6B9de8E169d128226C0Fc90a012e', // pumpBTC + '0x8dAEBADE922dF735c38C80C7eBD708Af50815fAa', // tBTC + '0x8236a87084f8B84306f72007F36F2618A5634494', // LBTC + '0x7A56E1C57C7475CCf742a1832B028F0456652F97', // solvBTC + ] + + return sumTokens2({ api, owner: earnBTCVault, tokens: ethTokens, fetchCoValentTokens: true }) +} + +const swellBTCTvl = async (api) => { + + const swellTokens = [ + '0xf6718b2701D4a6498eF77D7c152b2137Ab28b8A3', // stBTC + '0xFA3198ecF05303a6d96E57a45E6c815055D255b1', // uBTC + ] + + return sumTokens2({ api, owner: earnBTCVault, tokens: swellTokens }) + +} + module.exports = { methodology: 'TVL represents the sum of tokens deposited in the vault + LP positions', doublecounted: true, - ethereum: { tvl } + ethereum: { tvl: sdk.util.sumChainTvls([ethTvl, ethBTCTvl]) }, + swellchain: { tvl: sdk.util.sumChainTvls([swellTvl, swellBTCTvl]) }, } \ No newline at end of file