diff --git a/src/components/btc-defi.tsx b/src/components/btc-defi.tsx index 0991671c..da968a16 100644 --- a/src/components/btc-defi.tsx +++ b/src/components/btc-defi.tsx @@ -10,11 +10,11 @@ import { SupportedDApp, trovesHyperxWBTCYieldAtom, trovesHyperxtBTCYieldAtom, - trovesHyperxLBTCYieldAtom, + // trovesHyperxLBTCYieldAtom, trovesHyperxsBTCYieldAtom, trovesEkuboBTCxWBTCYieldAtom, trovesEkuboBTCxtBTCYieldAtom, - trovesEkuboBTCxLBTCYieldAtom, + // trovesEkuboBTCxLBTCYieldAtom, trovesEkuboBTCxsBTCYieldAtom, } from "@/store/defi.store"; import { useAtom } from "jotai"; @@ -95,33 +95,33 @@ export const btcProtocolConfigs: Partial< }, }, }, - ekuboBTCxLBTC: { - tokens: [ - { icon: , name: "xLBTC" }, - { icon: , name: "LBTC" }, - ], - protocolIcon: , - protocolName: "Troves", - badges: [ - { - type: "Automated Liquidity Pool", - color: "bg-[#E9F3F0] text-[#17876D]", - }, - ], - description: - "Auto-managed liquidity vault for Ekubo's xLBTC/LBTC pool. Rebalances range and compounds fees and rewards automatically.", - action: { - type: "pool", - link: "https://app.troves.fi/strategy/ekubo_cl_xlbtclbtc", - buttonText: "Add Liquidity", - onClick: () => { - MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { - protocol: "trovesEkuboBTCxLBTC", - buttonText: "Add Liquidity", - }); - }, - }, - }, + // ekuboBTCxLBTC: { + // tokens: [ + // { icon: , name: "xLBTC" }, + // { icon: , name: "LBTC" }, + // ], + // protocolIcon: , + // protocolName: "Troves", + // badges: [ + // { + // type: "Automated Liquidity Pool", + // color: "bg-[#E9F3F0] text-[#17876D]", + // }, + // ], + // description: + // "Auto-managed liquidity vault for Ekubo's xLBTC/LBTC pool. Rebalances range and compounds fees and rewards automatically.", + // action: { + // type: "pool", + // link: "https://app.troves.fi/strategy/ekubo_cl_xlbtclbtc", + // buttonText: "Add Liquidity", + // onClick: () => { + // MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { + // protocol: "trovesEkuboBTCxLBTC", + // buttonText: "Add Liquidity", + // }); + // }, + // }, + // }, ekuboBTCxsBTC: { tokens: [ { icon: , name: "xsBTC" }, @@ -228,32 +228,32 @@ export const btcProtocolConfigs: Partial< }, }, }, - hyperxLBTC: { - tokens: [ - { icon: , name: "xLBTC" }, - ], - protocolIcon: , - protocolName: "Troves", - badges: [ - { - type: "Hyper Vault", - color: "bg-[#E9F3F0] text-[#17876D]", - }, - ], - description: - "Automated hyper vault strategy for xLBTC. Maximizes yield through advanced DeFi strategies and auto-compounding.", - action: { - type: "vault", - link: "https://app.troves.fi/strategy/hyper_xlbtc", - buttonText: "Invest", - onClick: () => { - MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { - protocol: "trovesHyperBTCxLBTC", - buttonText: "Invest", - }); - }, - }, - }, + // hyperxLBTC: { + // tokens: [ + // { icon: , name: "xLBTC" }, + // ], + // protocolIcon: , + // protocolName: "Troves", + // badges: [ + // { + // type: "Hyper Vault", + // color: "bg-[#E9F3F0] text-[#17876D]", + // }, + // ], + // description: + // "Automated hyper vault strategy for xLBTC. Maximizes yield through advanced DeFi strategies and auto-compounding.", + // action: { + // type: "vault", + // link: "https://app.troves.fi/strategy/hyper_xlbtc", + // buttonText: "Invest", + // onClick: () => { + // MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { + // protocol: "trovesHyperBTCxLBTC", + // buttonText: "Invest", + // }); + // }, + // }, + // }, // BTC Token Swapping on Avnu avnuBTCxWBTC: { tokens: [ @@ -297,27 +297,27 @@ export const btcProtocolConfigs: Partial< }, }, }, - avnuBTCxLBTC: { - tokens: [ - { icon: , name: "xLBTC" }, - { icon: , name: "LBTC" }, - ], - protocolIcon: , - protocolName: "Avnu", - badges: [{ type: "DEX Aggregator", color: "bg-[#F3E8FF] text-[#9333EA]" }], - description: "Swap xLBTC for LBTC on Avnu DEX aggregator", - action: { - type: "swap", - link: "https://app.avnu.fi/en?mode=simple&tokenFrom=0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0&tokenTo=0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4&amount=100", - buttonText: "Swap Tokens", - onClick: () => { - MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { - protocol: "avnuBTCxLBTC", - buttonText: "Swap Tokens", - }); - }, - }, - }, + // avnuBTCxLBTC: { + // tokens: [ + // { icon: , name: "xLBTC" }, + // { icon: , name: "LBTC" }, + // ], + // protocolIcon: , + // protocolName: "Avnu", + // badges: [{ type: "DEX Aggregator", color: "bg-[#F3E8FF] text-[#9333EA]" }], + // description: "Swap xLBTC for LBTC on Avnu DEX aggregator", + // action: { + // type: "swap", + // link: "https://app.avnu.fi/en?mode=simple&tokenFrom=0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0&tokenTo=0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4&amount=100", + // buttonText: "Swap Tokens", + // onClick: () => { + // MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { + // protocol: "avnuBTCxLBTC", + // buttonText: "Swap Tokens", + // }); + // }, + // }, + // }, avnuBTCxsBTC: { tokens: [ { icon: , name: "xsBTC" }, @@ -380,26 +380,26 @@ export const btcProtocolConfigs: Partial< }, }, }, - vesuBTCxLBTC: { - tokens: [ - { icon: , name: "xLBTC" }, - ], - protocolIcon: , - protocolName: "Vesu", - badges: [{ type: "Lending Pool", color: "bg-[#E8F4FD] text-[#1E40AF]" }], - description: "Lend and borrow against xLBTC on Vesu", - action: { - type: "lend", - link: "http://vesu.xyz/earn?onlyV2Markets=true&includeIsolatedMarkets=true", - buttonText: "Lend & Borrow", - onClick: () => { - MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { - protocol: "vesuBTCxLBTC", - buttonText: "Lend & Borrow", - }); - }, - }, - }, + // vesuBTCxLBTC: { + // tokens: [ + // { icon: , name: "xLBTC" }, + // ], + // protocolIcon: , + // protocolName: "Vesu", + // badges: [{ type: "Lending Pool", color: "bg-[#E8F4FD] text-[#1E40AF]" }], + // description: "Lend and borrow against xLBTC on Vesu", + // action: { + // type: "lend", + // link: "http://vesu.xyz/earn?onlyV2Markets=true&includeIsolatedMarkets=true", + // buttonText: "Lend & Borrow", + // onClick: () => { + // MyAnalytics.track(AnalyticsEvents.OPPORTUNITIES, { + // protocol: "vesuBTCxLBTC", + // buttonText: "Lend & Borrow", + // }); + // }, + // }, + // }, vesuBTCxsBTC: { tokens: [ { icon: , name: "xsBTC" }, @@ -428,13 +428,13 @@ const BtcDefi: React.FC = () => { // Troves Hyper Vault yields const [trovesHyperxWBTCYield] = useAtom(trovesHyperxWBTCYieldAtom); const [trovesHyperxtBTCYield] = useAtom(trovesHyperxtBTCYieldAtom); - const [trovesHyperxLBTCYield] = useAtom(trovesHyperxLBTCYieldAtom); + // const [trovesHyperxLBTCYield] = useAtom(trovesHyperxLBTCYieldAtom); const [trovesHyperxsBTCYield] = useAtom(trovesHyperxsBTCYieldAtom); // Troves Ekubo yields const [trovesEkuboXWBTCYield] = useAtom(trovesEkuboBTCxWBTCYieldAtom); const [trovesEkuboXtBTCYield] = useAtom(trovesEkuboBTCxtBTCYieldAtom); - const [trovesEkuboXLBTCYield] = useAtom(trovesEkuboBTCxLBTCYieldAtom); + // const [trovesEkuboXLBTCYield] = useAtom(trovesEkuboBTCxLBTCYieldAtom); const [trovesEkuboXsBTCYield] = useAtom(trovesEkuboBTCxsBTCYieldAtom); const sortedProtocols = useMemo(() => { @@ -448,26 +448,26 @@ const BtcDefi: React.FC = () => { yieldA = trovesHyperxWBTCYield?.value ?? -Infinity; else if (a === "hyperxtBTC") yieldA = trovesHyperxtBTCYield?.value ?? -Infinity; - else if (a === "hyperxLBTC") - yieldA = trovesHyperxLBTCYield?.value ?? -Infinity; + // else if (a === "hyperxLBTC") + // yieldA = trovesHyperxLBTCYield?.value ?? -Infinity; else if (a === "hyperxsBTC") yieldA = trovesHyperxsBTCYield?.value ?? -Infinity; else if (a === "ekuboBTCxWBTC") yieldA = trovesEkuboXWBTCYield?.value ?? -Infinity; else if (a === "ekuboBTCxtBTC") yieldA = trovesEkuboXtBTCYield?.value ?? -Infinity; - else if (a === "ekuboBTCxLBTC") - yieldA = trovesEkuboXLBTCYield?.value ?? -Infinity; + // else if (a === "ekuboBTCxLBTC") + // yieldA = trovesEkuboXLBTCYield?.value ?? -Infinity; else if (a === "ekuboBTCxsBTC") yieldA = trovesEkuboXsBTCYield?.value ?? -Infinity; else if ( a === "avnuBTCxWBTC" || a === "avnuBTCxtBTC" || - a === "avnuBTCxLBTC" || + // a === "avnuBTCxLBTC" || a === "avnuBTCxsBTC" || a === "vesuBTCxWBTC" || a === "vesuBTCxtBTC" || - a === "vesuBTCxLBTC" || + // a === "vesuBTCxLBTC" || a === "vesuBTCxsBTC" ) yieldA = -Infinity; // Avnu and Vesu strategies don't have yield data yet @@ -477,26 +477,26 @@ const BtcDefi: React.FC = () => { yieldB = trovesHyperxWBTCYield?.value ?? -Infinity; else if (b === "hyperxtBTC") yieldB = trovesHyperxtBTCYield?.value ?? -Infinity; - else if (b === "hyperxLBTC") - yieldB = trovesHyperxLBTCYield?.value ?? -Infinity; + // else if (b === "hyperxLBTC") + // yieldB = trovesHyperxLBTCYield?.value ?? -Infinity; else if (b === "hyperxsBTC") yieldB = trovesHyperxsBTCYield?.value ?? -Infinity; else if (b === "ekuboBTCxWBTC") yieldB = trovesEkuboXWBTCYield?.value ?? -Infinity; else if (b === "ekuboBTCxtBTC") yieldB = trovesEkuboXtBTCYield?.value ?? -Infinity; - else if (b === "ekuboBTCxLBTC") - yieldB = trovesEkuboXLBTCYield?.value ?? -Infinity; + // else if (b === "ekuboBTCxLBTC") + // yieldB = trovesEkuboXLBTCYield?.value ?? -Infinity; else if (b === "ekuboBTCxsBTC") yieldB = trovesEkuboXsBTCYield?.value ?? -Infinity; else if ( b === "avnuBTCxWBTC" || b === "avnuBTCxtBTC" || - b === "avnuBTCxLBTC" || + // b === "avnuBTCxLBTC" || b === "avnuBTCxsBTC" || b === "vesuBTCxWBTC" || b === "vesuBTCxtBTC" || - b === "vesuBTCxLBTC" || + // b === "vesuBTCxLBTC" || b === "vesuBTCxsBTC" ) yieldB = -Infinity; // Avnu strategies don't have yield data yet @@ -508,11 +508,11 @@ const BtcDefi: React.FC = () => { }, [ trovesHyperxWBTCYield, trovesHyperxtBTCYield, - trovesHyperxLBTCYield, + // trovesHyperxLBTCYield, trovesHyperxsBTCYield, trovesEkuboXWBTCYield, trovesEkuboXtBTCYield, - trovesEkuboXLBTCYield, + // trovesEkuboXLBTCYield, trovesEkuboXsBTCYield, ]); @@ -567,12 +567,12 @@ const BtcDefi: React.FC = () => { error: trovesHyperxtBTCYield?.error ?? null, isLoading: trovesHyperxtBTCYield?.isLoading ?? false, }; - } else if (protocol === "hyperxLBTC") { - yieldData = { - value: trovesHyperxLBTCYield?.value ?? null, - error: trovesHyperxLBTCYield?.error ?? null, - isLoading: trovesHyperxLBTCYield?.isLoading ?? false, - }; + // } else if (protocol === "hyperxLBTC") { + // yieldData = { + // value: trovesHyperxLBTCYield?.value ?? null, + // error: trovesHyperxLBTCYield?.error ?? null, + // isLoading: trovesHyperxLBTCYield?.isLoading ?? false, + // }; } else if (protocol === "hyperxsBTC") { yieldData = { value: trovesHyperxsBTCYield?.value ?? null, @@ -591,12 +591,12 @@ const BtcDefi: React.FC = () => { error: trovesEkuboXtBTCYield?.error ?? null, isLoading: trovesEkuboXtBTCYield?.isLoading ?? false, }; - } else if (protocol === "ekuboBTCxLBTC") { - yieldData = { - value: trovesEkuboXLBTCYield?.value ?? null, - error: trovesEkuboXLBTCYield?.error ?? null, - isLoading: trovesEkuboXLBTCYield?.isLoading ?? false, - }; + // } else if (protocol === "ekuboBTCxLBTC") { + // yieldData = { + // value: trovesEkuboXLBTCYield?.value ?? null, + // error: trovesEkuboXLBTCYield?.error ?? null, + // isLoading: trovesEkuboXLBTCYield?.isLoading ?? false, + // }; } else if (protocol === "ekuboBTCxsBTC") { yieldData = { value: trovesEkuboXsBTCYield?.value ?? null, diff --git a/src/components/defi.tsx b/src/components/defi.tsx index 2d58c7b2..ba81fe02 100644 --- a/src/components/defi.tsx +++ b/src/components/defi.tsx @@ -18,23 +18,23 @@ import { SupportedDApp, vesuBTCxWBTCYieldAtom, vesuBTCxtBTCYieldAtom, - vesuBTCxLBTCYieldAtom, + // vesuBTCxLBTCYieldAtom, vesuBTCxsBTCYieldAtom, trovesHyperxWBTCYieldAtom, trovesHyperxtBTCYieldAtom, - trovesHyperxLBTCYieldAtom, + // trovesHyperxLBTCYieldAtom, trovesHyperxsBTCYieldAtom, trovesHyperxSTRKYieldAtom, trovesEkuboBTCxWBTCYieldAtom, trovesEkuboBTCxtBTCYieldAtom, - trovesEkuboBTCxLBTCYieldAtom, + // trovesEkuboBTCxLBTCYieldAtom, trovesEkuboBTCxsBTCYieldAtom, vesuBorrowPoolsAtom, vesuPoolsFilteredAtom, VesuBorrowPool, hyperxWBTCVaultCapacityAtom, hyperxtBTCVaultCapacityAtom, - hyperxLBTCVaultCapacityAtom, + // hyperxLBTCVaultCapacityAtom, hyperxsBTCVaultCapacityAtom, hyperxSTRKVaultCapacityAtom, vesuContributorSupplyPoolsAtom, @@ -426,13 +426,13 @@ export const btcProtocolConfigs: Partial< "0x43a35c1425a0125ef8c171f1a75c6f31ef8648edcc8324b55ce1917db3f9b91", // xtBTC "ekuboxtBTC", ), - ekuboxLBTC: createEkuboPoolConfig( - { icon: , name: "xLBTC" }, - { icon: , name: "LBTC" }, - "0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4", // LBTC - "0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0", // xLBTC - "ekuboxLBTC", - ), + // ekuboxLBTC: createEkuboPoolConfig( + // { icon: , name: "xLBTC" }, + // { icon: , name: "LBTC" }, + // "0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4", // LBTC + // "0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0", // xLBTC + // "ekuboxLBTC", + // ), ekuboxsBTC: createEkuboPoolConfig( { icon: , name: "xsBTC" }, { icon: , name: "solvBTC" }, @@ -456,13 +456,13 @@ export const btcProtocolConfigs: Partial< "ekubo_cl_xtbtctbtc", "trovesEkuboBTCxtBTC", ), - ekuboBTCxLBTC: createTrovesEkuboLiquidityConfig( - "ekuboBTCxLBTC", - { icon: , name: "xLBTC" }, - { icon: , name: "LBTC" }, - "ekubo_cl_xlbtclbtc", - "trovesEkuboBTCxLBTC", - ), + // ekuboBTCxLBTC: createTrovesEkuboLiquidityConfig( + // "ekuboBTCxLBTC", + // { icon: , name: "xLBTC" }, + // { icon: , name: "LBTC" }, + // "ekubo_cl_xlbtclbtc", + // "trovesEkuboBTCxLBTC", + // ), ekuboBTCxsBTC: createTrovesEkuboLiquidityConfig( "ekuboBTCxsBTC", { icon: , name: "xsBTC" }, @@ -496,12 +496,12 @@ export const btcProtocolConfigs: Partial< "hyper_xsbtc", "trovesHyperBTCxsBTC", ), - hyperxLBTC: createHyperVaultConfig( - { icon: , name: "xLBTC" }, - "LBTC", - "hyper_xlbtc", - "trovesHyperBTCxLBTC", - ), + // hyperxLBTC: createHyperVaultConfig( + // { icon: , name: "xLBTC" }, + // "LBTC", + // "hyper_xlbtc", + // "trovesHyperBTCxLBTC", + // ), // BTC Token Swapping on Avnu avnuBTCxWBTC: createAvnuSwapConfig( @@ -518,13 +518,13 @@ export const btcProtocolConfigs: Partial< "0x4daa17763b286d1e59b97c283c0b8c949994c361e426a28f743c67bdfe9a32f", "avnuBTCxtBTC", ), - avnuBTCxLBTC: createAvnuSwapConfig( - { icon: , name: "xLBTC" }, - { icon: , name: "LBTC" }, - "0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0", - "0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4", - "avnuBTCxLBTC", - ), + // avnuBTCxLBTC: createAvnuSwapConfig( + // { icon: , name: "xLBTC" }, + // { icon: , name: "LBTC" }, + // "0x7dd3c80de9fcc5545f0cb83678826819c79619ed7992cc06ff81fc67cd2efe0", + // "0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4", + // "avnuBTCxLBTC", + // ), avnuBTCxsBTC: createAvnuSwapConfig( { icon: , name: "xsBTC" }, { icon: , name: "solvBTC" }, @@ -544,6 +544,17 @@ export const protocolConfigs: Partial> = { ...btcProtocolConfigs, }; +const HIDDEN_DEFI_LST_ASSETS = new Set(["xLBTC"]); +const HIDDEN_DEFI_UNDERLYING_ASSETS = new Set(["LBTC"]); + +// Hidden xLBTC strategies — used to filter dynamic Vesu pools from API +const isHiddenDefiAsset = (tokenName: string): boolean => + HIDDEN_DEFI_LST_ASSETS.has(tokenName) || + HIDDEN_DEFI_UNDERLYING_ASSETS.has(tokenName); + +const configUsesHiddenDefiAsset = (config: ProtocolConfig): boolean => + config.tokens.some((token) => isHiddenDefiAsset(token.name)); + // Categorize protocols by type const supplyProtocols: SupportedDApp[] = [ "strkfarm", @@ -552,7 +563,7 @@ const supplyProtocols: SupportedDApp[] = [ "ekuboSTRK", "ekuboxWBTC", "ekuboxtBTC", - "ekuboxLBTC", + // "ekuboxLBTC", "ekuboxsBTC", "nostraDex", // "opus", @@ -560,10 +571,10 @@ const supplyProtocols: SupportedDApp[] = [ "hyperxWBTC", "hyperxtBTC", "hyperxsBTC", - "hyperxLBTC", + // "hyperxLBTC", "ekuboBTCxWBTC", "ekuboBTCxtBTC", - "ekuboBTCxLBTC", + // "ekuboBTCxLBTC", "ekuboBTCxsBTC", // Vesu lending pools are now dynamically added via vesuLendingConfigs // "avnu", @@ -988,16 +999,16 @@ const Defi: React.FC = () => { // BTC yield atoms - using a map for easier access const [trovesHyperxWBTCYield] = useAtom(trovesHyperxWBTCYieldAtom); const [trovesHyperxtBTCYield] = useAtom(trovesHyperxtBTCYieldAtom); - const [trovesHyperxLBTCYield] = useAtom(trovesHyperxLBTCYieldAtom); + // const [trovesHyperxLBTCYield] = useAtom(trovesHyperxLBTCYieldAtom); const [trovesHyperxsBTCYield] = useAtom(trovesHyperxsBTCYieldAtom); const [trovesHyperxSTRKYield] = useAtom(trovesHyperxSTRKYieldAtom); const [trovesEkuboXWBTCYield] = useAtom(trovesEkuboBTCxWBTCYieldAtom); const [trovesEkuboXtBTCYield] = useAtom(trovesEkuboBTCxtBTCYieldAtom); - const [trovesEkuboXLBTCYield] = useAtom(trovesEkuboBTCxLBTCYieldAtom); + // const [trovesEkuboXLBTCYield] = useAtom(trovesEkuboBTCxLBTCYieldAtom); const [trovesEkuboXsBTCYield] = useAtom(trovesEkuboBTCxsBTCYieldAtom); const [vesuBTCxWBTCYield] = useAtom(vesuBTCxWBTCYieldAtom); const [vesuBTCxtBTCYield] = useAtom(vesuBTCxtBTCYieldAtom); - const [vesuBTCxLBTCYield] = useAtom(vesuBTCxLBTCYieldAtom); + // const [vesuBTCxLBTCYield] = useAtom(vesuBTCxLBTCYieldAtom); const [vesuBTCxsBTCYield] = useAtom(vesuBTCxsBTCYieldAtom); const vesuBorrowPools = useAtomValue(vesuBorrowPoolsAtom); const vesuPoolsFilterFn = useAtomValue(vesuPoolsFilteredAtom); @@ -1008,7 +1019,10 @@ const Defi: React.FC = () => { // Get all Vesu pools for lending (all verified pools with LST assets) const vesuLendingPools = useMemo(() => { - return vesuPoolsFilterFn({ isVerified: true, collateralIsLST: true }); + return vesuPoolsFilterFn({ isVerified: true, collateralIsLST: true }).filter( + // hidden xLBTC strategies + (pool) => !isHiddenDefiAsset(pool.collateralSymbol), + ); }, [vesuPoolsFilterFn]); // Generate lending configs from pools @@ -1046,6 +1060,9 @@ const Defi: React.FC = () => { // 1. Vesu supply pools from Re7 xSTRK and Re7 xBTC vesuContributorSupplyPools.forEach((pool) => { + // hidden xLBTC strategies + if (isHiddenDefiAsset(pool.assetSymbol)) return; + const tokenIcon = getTokenIcon(pool.assetSymbol); const vesuUrl = process.env.NEXT_PUBLIC_VESU_URL || "http://vesu.xyz/pro"; const vesuEarnEndpoint = `${vesuUrl}/earn`; @@ -1122,19 +1139,19 @@ const Defi: React.FC = () => { yield: trovesEkuboXtBTCYield, strategyPath: "ekubo_cl_xtbtctbtc", }, - { - key: "trovesEkuboBTCxLBTC", - token1: { - icon: , - name: "xLBTC", - }, - token2: { - icon: , - name: "LBTC", - }, - yield: trovesEkuboXLBTCYield, - strategyPath: "ekubo_cl_xlbtclbtc", - }, + // { + // key: "trovesEkuboBTCxLBTC", + // token1: { + // icon: , + // name: "xLBTC", + // }, + // token2: { + // icon: , + // name: "LBTC", + // }, + // yield: trovesEkuboXLBTCYield, + // strategyPath: "ekubo_cl_xlbtclbtc", + // }, { key: "trovesEkuboBTCxsBTC", token1: { @@ -1222,7 +1239,7 @@ const Defi: React.FC = () => { vesuContributorSupplyPools, trovesEkuboXWBTCYield, trovesEkuboXtBTCYield, - trovesEkuboXLBTCYield, + // trovesEkuboXLBTCYield, trovesEkuboXsBTCYield, ekuboYield, ]); @@ -1230,7 +1247,7 @@ const Defi: React.FC = () => { // Vault capacity atoms const [hyperxWBTCVaultCapacity] = useAtom(hyperxWBTCVaultCapacityAtom); const [hyperxtBTCVaultCapacity] = useAtom(hyperxtBTCVaultCapacityAtom); - const [hyperxLBTCVaultCapacity] = useAtom(hyperxLBTCVaultCapacityAtom); + // const [hyperxLBTCVaultCapacity] = useAtom(hyperxLBTCVaultCapacityAtom); const [hyperxsBTCVaultCapacity] = useAtom(hyperxsBTCVaultCapacityAtom); const [hyperxSTRKVaultCapacity] = useAtom(hyperxSTRKVaultCapacityAtom); @@ -1243,31 +1260,31 @@ const Defi: React.FC = () => { () => ({ hyperxWBTC: trovesHyperxWBTCYield, hyperxtBTC: trovesHyperxtBTCYield, - hyperxLBTC: trovesHyperxLBTCYield, + // hyperxLBTC: trovesHyperxLBTCYield, hyperxsBTC: trovesHyperxsBTCYield, hyperxSTRK: trovesHyperxSTRKYield, ekuboBTCxWBTC: trovesEkuboXWBTCYield, ekuboBTCxtBTC: trovesEkuboXtBTCYield, - ekuboBTCxLBTC: trovesEkuboXLBTCYield, + // ekuboBTCxLBTC: trovesEkuboXLBTCYield, ekuboBTCxsBTC: trovesEkuboXsBTCYield, vesuBTCxWBTC: vesuBTCxWBTCYield, vesuBTCxtBTC: vesuBTCxtBTCYield, - vesuBTCxLBTC: vesuBTCxLBTCYield, + // vesuBTCxLBTC: vesuBTCxLBTCYield, vesuBTCxsBTC: vesuBTCxsBTCYield, }), [ trovesHyperxWBTCYield, trovesHyperxtBTCYield, - trovesHyperxLBTCYield, + // trovesHyperxLBTCYield, trovesHyperxsBTCYield, trovesHyperxSTRKYield, trovesEkuboXWBTCYield, trovesEkuboXtBTCYield, - trovesEkuboXLBTCYield, + // trovesEkuboXLBTCYield, trovesEkuboXsBTCYield, vesuBTCxWBTCYield, vesuBTCxtBTCYield, - vesuBTCxLBTCYield, + // vesuBTCxLBTCYield, vesuBTCxsBTCYield, ], ); @@ -1276,7 +1293,7 @@ const Defi: React.FC = () => { () => ({ hyperxWBTC: hyperxWBTCVaultCapacity, hyperxtBTC: hyperxtBTCVaultCapacity, - hyperxLBTC: hyperxLBTCVaultCapacity, + // hyperxLBTC: hyperxLBTCVaultCapacity, hyperxsBTC: hyperxsBTCVaultCapacity, hyperxSTRK: hyperxSTRKVaultCapacity, trovesHyper: hyperxSTRKVaultCapacity, @@ -1284,7 +1301,7 @@ const Defi: React.FC = () => { [ hyperxWBTCVaultCapacity, hyperxtBTCVaultCapacity, - hyperxLBTCVaultCapacity, + // hyperxLBTCVaultCapacity, hyperxsBTCVaultCapacity, hyperxSTRKVaultCapacity, ], @@ -1356,6 +1373,11 @@ const Defi: React.FC = () => { // Filter contributor pools based on selected filters const filteredContributorPools = useMemo(() => { return contributorPools.filter((pool) => { + // hidden xLBTC strategies + if (pool.tokens.some((token) => isHiddenDefiAsset(token.name))) { + return false; + } + // Asset filter if (selectedAsset !== "all") { const allowedNames = assetFilterMap[selectedAsset]; @@ -1390,7 +1412,10 @@ const Defi: React.FC = () => { const configs: Record = {}; const vesuUrl = process.env.NEXT_PUBLIC_VESU_URL || "http://vesu.xyz/pro"; const vesuBorrowEndpoint = `${vesuUrl}/borrow`; - vesuBorrowPools.forEach((pool, index) => { + vesuBorrowPools + // hidden xLBTC strategies + .filter((pool) => !isHiddenDefiAsset(pool.collateralSymbol)) + .forEach((pool, index) => { const key = `vesuBorrow_${pool.collateralSymbol}_${pool.debtSymbol}_${index}`; const isDebtUSDC = pool.debtSymbol === "USDC"; configs[key] = { @@ -1462,7 +1487,7 @@ const Defi: React.FC = () => { "fibrous", "avnuBTCxWBTC", "avnuBTCxtBTC", - "avnuBTCxLBTC", + // "avnuBTCxLBTC", "avnuBTCxsBTC", ]); @@ -1471,7 +1496,7 @@ const Defi: React.FC = () => { "vesu", "ekuboBTCxWBTC", "ekuboBTCxtBTC", - "ekuboBTCxLBTC", + // "ekuboBTCxLBTC", "ekuboBTCxsBTC", "strkfarmEkubo", ]); @@ -1546,6 +1571,11 @@ const Defi: React.FC = () => { return false; } + if (configUsesHiddenDefiAsset(config)) { + // hidden xLBTC strategies + return false; + } + // Filter for stables only in borrow tab if (activeTab === "borrow" && showStablesOnly) { // Check if the debt token (second token) is USDC or USDC.e @@ -1609,16 +1639,16 @@ const Defi: React.FC = () => { yields, trovesHyperxWBTCYield, trovesHyperxtBTCYield, - trovesHyperxLBTCYield, + // trovesHyperxLBTCYield, trovesHyperxsBTCYield, trovesHyperxSTRKYield, trovesEkuboXWBTCYield, trovesEkuboXtBTCYield, - trovesEkuboXLBTCYield, + // trovesEkuboXLBTCYield, trovesEkuboXsBTCYield, vesuBTCxWBTCYield, vesuBTCxtBTCYield, - vesuBTCxLBTCYield, + // vesuBTCxLBTCYield, vesuBTCxsBTCYield, borrowProtocolKeys, lendingProtocolKeys, @@ -1736,7 +1766,7 @@ const Defi: React.FC = () => { "all", "xSTRK", "xtBTC", - "xLBTC", + // "xLBTC", "xWBTC", "xsBTC", ]; diff --git a/src/components/stake.tsx b/src/components/stake.tsx index 0347cf7b..99efca8e 100644 --- a/src/components/stake.tsx +++ b/src/components/stake.tsx @@ -67,7 +67,7 @@ import { cn } from "@/lib/utils"; import LSTService from "@/services/lst"; import { lstConfigAtom, assetPriceAtom } from "@/store/common.store"; import { - hyperxLBTCVaultCapacityAtom, + // hyperxLBTCVaultCapacityAtom, hyperxSTRKVaultCapacityAtom, hyperxsBTCVaultCapacityAtom, hyperxtBTCVaultCapacityAtom, @@ -202,8 +202,8 @@ const Stake: React.FC = () => { return hyperxWBTCVaultCapacityAtom; case "xtBTC": return hyperxtBTCVaultCapacityAtom; - case "xLBTC": - return hyperxLBTCVaultCapacityAtom; + // case "xLBTC": + // return hyperxLBTCVaultCapacityAtom; case "xsBTC": return hyperxsBTCVaultCapacityAtom; default: @@ -603,29 +603,29 @@ const Stake: React.FC = () => { }); }, [data, form, isPending]); - // if (lstConfig.SYMBOL === "LBTC") { - // return ( - //
- // - //
- // Note: - // LBTC is discontinued, we encourage users to withdraw their staked - // assets. Learn more:{" "} - // - // here - // - //
- //
- // ); - // } + if (lstConfig.SYMBOL === "LBTC") { + return ( +
+ +
+ Note: + LBTC is discontinued, we encourage users to withdraw their staked + assets. Learn more:{" "} + + here + +
+
+ ); + } return (
@@ -1057,7 +1057,7 @@ const Stake: React.FC = () => {
{!address && ( - + )} {address && ( diff --git a/src/store/defi.store.ts b/src/store/defi.store.ts index 6b50c4d9..5fdf1cc5 100644 --- a/src/store/defi.store.ts +++ b/src/store/defi.store.ts @@ -341,11 +341,11 @@ const vesuBTCxtBTCYieldQueryAtom = createVesuBTCYieldQueryAtom( "vesuBTCxtBTCYield", ); -const vesuBTCxLBTCYieldQueryAtom = createVesuBTCYieldQueryAtom( - "PLACEHOLDER_POOL_ID_xLBTC", // Replace with actual pool ID - "xLBTC", - "vesuBTCxLBTCYield", -); +// const vesuBTCxLBTCYieldQueryAtom = createVesuBTCYieldQueryAtom( +// "PLACEHOLDER_POOL_ID_xLBTC", // Replace with actual pool ID +// "xLBTC", +// "vesuBTCxLBTCYield", +// ); const vesuBTCxsBTCYieldQueryAtom = createVesuBTCYieldQueryAtom( "PLACEHOLDER_POOL_ID_xsBTC", // Replace with actual pool ID @@ -739,10 +739,10 @@ const trovesHyperxtBTCYieldQueryAtom = createTrovesYieldQueryAtom( "trovesHyperxtBTCYield", ); -const trovesHyperxLBTCYieldQueryAtom = createTrovesYieldQueryAtom( - "hyper_xlbtc", - "trovesHyperBTCxLBTCYield", -); +// const trovesHyperxLBTCYieldQueryAtom = createTrovesYieldQueryAtom( +// "hyper_xlbtc", +// "trovesHyperBTCxLBTCYield", +// ); const trovesHyperxsBTCYieldQueryAtom = createTrovesYieldQueryAtom( "hyper_xsbtc", @@ -760,10 +760,10 @@ const trovesEkuboBTCxtBTCYieldQueryAtom = createTrovesYieldQueryAtom( "trovesEkuboBTCxtBTCYield", ); -const trovesEkuboBTCxLBTCYieldQueryAtom = createTrovesYieldQueryAtom( - "ekubo_cl_xlbtclbtc", - "trovesEkuboBTCxLBTCYield", -); +// const trovesEkuboBTCxLBTCYieldQueryAtom = createTrovesYieldQueryAtom( +// "ekubo_cl_xlbtclbtc", +// "trovesEkuboBTCxLBTCYield", +// ); const trovesEkuboBTCxsBTCYieldQueryAtom = createTrovesYieldQueryAtom( "ekubo_cl_xsbtcsolvbtc", @@ -906,15 +906,15 @@ export const vesuBTCxtBTCYieldAtom = atom((get) => { }; }); -export const vesuBTCxLBTCYieldAtom = atom((get) => { - const { data, error } = get(vesuBTCxLBTCYieldQueryAtom); - return { - value: error || !data ? null : data.value, - totalSupplied: error || !data ? null : data.totalSupplied || null, - error, - isLoading: !data && !error, - }; -}); +// export const vesuBTCxLBTCYieldAtom = atom((get) => { +// const { data, error } = get(vesuBTCxLBTCYieldQueryAtom); +// return { +// value: error || !data ? null : data.value, +// totalSupplied: error || !data ? null : data.totalSupplied || null, +// error, +// isLoading: !data && !error, +// }; +// }); export const vesuBTCxsBTCYieldAtom = atom((get) => { const { data, error } = get(vesuBTCxsBTCYieldQueryAtom); @@ -965,9 +965,9 @@ export const trovesHyperxtBTCYieldAtom = createTrovesYieldAtom( trovesHyperxtBTCYieldQueryAtom, ); -export const trovesHyperxLBTCYieldAtom = createTrovesYieldAtom( - trovesHyperxLBTCYieldQueryAtom, -); +// export const trovesHyperxLBTCYieldAtom = createTrovesYieldAtom( +// trovesHyperxLBTCYieldQueryAtom, +// ); export const trovesHyperxsBTCYieldAtom = createTrovesYieldAtom( trovesHyperxsBTCYieldQueryAtom, @@ -982,9 +982,9 @@ export const trovesEkuboBTCxtBTCYieldAtom = createTrovesYieldAtom( trovesEkuboBTCxtBTCYieldQueryAtom, ); -export const trovesEkuboBTCxLBTCYieldAtom = createTrovesYieldAtom( - trovesEkuboBTCxLBTCYieldQueryAtom, -); +// export const trovesEkuboBTCxLBTCYieldAtom = createTrovesYieldAtom( +// trovesEkuboBTCxLBTCYieldQueryAtom, +// ); export const trovesEkuboBTCxsBTCYieldAtom = createTrovesYieldAtom( trovesEkuboBTCxsBTCYieldQueryAtom, @@ -1085,6 +1085,12 @@ export const vesuPoolsFilteredAtom = atom((get) => { if (lstEntry) { const [collateralSymbol] = lstEntry; + + // hidden xLBTC strategies + if (collateralSymbol === "xLBTC") { + continue; + } + const debtNormalized = normalizeAddress(pair.debtAssetAddress); const collateralAsset = pool.assets.find( (a) => normalizeAddress(a.address) === collateralNormalized, @@ -1254,7 +1260,7 @@ export const vesuContributorSupplyPoolsAtom = atom((get) => { STRK: "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", WBTC: "0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac", tBTC: "0x4daa17763b286d1e59b97c283c0b8c949994c361e426a28f743c67bdfe9a32f", - LBTC: "0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4", + // LBTC: "0x036834a40984312f7f7de8d31e3f6305b325389eaeea5b1c0664b2fb936461a4", solvBTC: "0x0593e034dda23eea82d2ba9a30960ed42cf4a01502cc2351dc9b9881f9931a68", }; @@ -1456,10 +1462,10 @@ export const hyperxtBTCVaultCapacityAtom = createVaultCapacityAtom( "xtBTC", "hyper_xtbtc", ); -export const hyperxLBTCVaultCapacityAtom = createVaultCapacityAtom( - "xLBTC", - "hyper_xlbtc", -); +// export const hyperxLBTCVaultCapacityAtom = createVaultCapacityAtom( +// "xLBTC", +// "hyper_xlbtc", +// ); export const hyperxsBTCVaultCapacityAtom = createVaultCapacityAtom( "xsBTC", "hyper_xsbtc", @@ -1525,13 +1531,13 @@ export const protocolYieldsAtom = atom< hyperxSTRK: get(trovesHyperYieldAtom), hyperxWBTC: get(trovesHyperYieldAtom), hyperxtBTC: get(trovesHyperYieldAtom), - hyperxLBTC: get(trovesHyperYieldAtom), + // hyperxLBTC: get(trovesHyperYieldAtom), hyperxsBTC: get(trovesHyperYieldAtom), hyperxstrkBTC: get(trovesHyperYieldAtom), vesu: get(vesuYieldAtom), vesuBTCxWBTC: get(vesuBTCxWBTCYieldAtom), vesuBTCxtBTC: get(vesuBTCxtBTCYieldAtom), - vesuBTCxLBTC: get(vesuBTCxLBTCYieldAtom), + // vesuBTCxLBTC: get(vesuBTCxLBTCYieldAtom), vesuBTCxsBTC: get(vesuBTCxsBTCYieldAtom), ekubo: get(ekuboYieldAtom), nostraDex: get(nostraLPYieldAtom),