@strkfarm/sdk 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.global.js +541 -253
- package/dist/index.browser.mjs +364 -90
- package/dist/index.d.ts +10 -2
- package/dist/index.js +367 -95
- package/dist/index.mjs +367 -95
- package/package.json +2 -1
- package/src/global.ts +51 -1
- package/src/interfaces/common.tsx +2 -0
- package/src/interfaces/risks.ts +175 -0
- package/src/modules/harvests.ts +2 -1
- package/src/modules/pricer.ts +25 -8
- package/src/notifs/telegram.ts +3 -3
- package/src/strategies/constants.ts +5 -1
- package/src/strategies/ekubo-cl-vault.tsx +288 -81
- package/src/strategies/universal-adapters/vesu-adapter.ts +2 -1
- package/src/strategies/vesu-rebalance.tsx +3 -3
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
IStrategyMetadata,
|
|
11
11
|
RiskFactor,
|
|
12
12
|
RiskType,
|
|
13
|
+
TokenInfo,
|
|
13
14
|
} from "@/interfaces";
|
|
14
15
|
import { PricerBase } from "@/modules/pricerBase";
|
|
15
16
|
import { assert } from "@/utils";
|
|
@@ -34,6 +35,7 @@ import { log } from "winston";
|
|
|
34
35
|
import { EkuboHarvests } from "@/modules/harvests";
|
|
35
36
|
import { logger } from "@/utils/logger";
|
|
36
37
|
import { COMMON_CONTRACTS } from "./constants";
|
|
38
|
+
import { ImpermanentLossLevel, MarketRiskLevel, SmartContractRiskLevel } from "@/interfaces/risks";
|
|
37
39
|
|
|
38
40
|
export interface EkuboPoolKey {
|
|
39
41
|
token0: ContractAddr;
|
|
@@ -69,6 +71,7 @@ export interface CLVaultStrategySettings {
|
|
|
69
71
|
direction: "any" | "uponly"; // any for pools like USDC/USDT, uponly for pools like xSTRK/STRK
|
|
70
72
|
customShouldRebalance: (currentPoolPrice: number) => Promise<boolean>; // any additional logic for deciding factor to rebalance or not based on pools
|
|
71
73
|
};
|
|
74
|
+
quoteAsset: TokenInfo
|
|
72
75
|
}
|
|
73
76
|
|
|
74
77
|
export class EkuboCLVault extends BaseStrategy<
|
|
@@ -1588,15 +1591,41 @@ const _protocol: IProtocol = {
|
|
|
1588
1591
|
logo: "https://app.ekubo.org/favicon.ico",
|
|
1589
1592
|
};
|
|
1590
1593
|
// need to fine tune better
|
|
1591
|
-
const
|
|
1592
|
-
{ type: RiskType.SMART_CONTRACT_RISK, value:
|
|
1593
|
-
{ type: RiskType.IMPERMANENT_LOSS, value:
|
|
1594
|
-
{ type: RiskType.MARKET_RISK, value:
|
|
1594
|
+
const _corelatedPoolRiskFactors: RiskFactor[] = [
|
|
1595
|
+
{ type: RiskType.SMART_CONTRACT_RISK, value: SmartContractRiskLevel.WELL_AUDITED, weight: 34, reason: "Audited smart contracts" },
|
|
1596
|
+
{ type: RiskType.IMPERMANENT_LOSS, value: ImpermanentLossLevel.HIGHLY_CORRELATED, weight: 33, reason: "Low risk due to co-related assets" },
|
|
1597
|
+
{ type: RiskType.MARKET_RISK, value: MarketRiskLevel.VERY_LOW_VOLATILITY, weight: 33, reason: "Low risk due to co-related assets" },
|
|
1595
1598
|
];
|
|
1596
1599
|
|
|
1597
|
-
const
|
|
1598
|
-
{ type: RiskType.SMART_CONTRACT_RISK, value:
|
|
1600
|
+
const mediumVolatilityPoolRiskFactors: RiskFactor[] = [
|
|
1601
|
+
{ type: RiskType.SMART_CONTRACT_RISK, value: SmartContractRiskLevel.WELL_AUDITED, weight: 34, reason: "Audited smart contracts" },
|
|
1602
|
+
{ type: RiskType.IMPERMANENT_LOSS, value: ImpermanentLossLevel.NON_CORRELATED, weight: 33, reason: "Low risk due to co-related assets" },
|
|
1603
|
+
{ type: RiskType.MARKET_RISK, value: MarketRiskLevel.MODERATE_VOLATILITY, weight: 33, reason: "Low risk due to co-related assets" },
|
|
1599
1604
|
];
|
|
1605
|
+
|
|
1606
|
+
const highVolatilityPoolRiskFactors: RiskFactor[] = [
|
|
1607
|
+
{ type: RiskType.SMART_CONTRACT_RISK, value: SmartContractRiskLevel.WELL_AUDITED, weight: 34, reason: "Audited smart contracts" },
|
|
1608
|
+
{ type: RiskType.IMPERMANENT_LOSS, value: ImpermanentLossLevel.NON_CORRELATED, weight: 33, reason: "Low risk due to co-related assets" },
|
|
1609
|
+
{ type: RiskType.MARKET_RISK, value: MarketRiskLevel.HIGH_VOLATILITY, weight: 33, reason: "Low risk due to co-related assets" },
|
|
1610
|
+
];
|
|
1611
|
+
|
|
1612
|
+
const mediumRisk = {
|
|
1613
|
+
riskFactor: mediumVolatilityPoolRiskFactors,
|
|
1614
|
+
netRisk:
|
|
1615
|
+
mediumVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1616
|
+
mediumVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1617
|
+
notARisks: getNoRiskTags(mediumVolatilityPoolRiskFactors),
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
const highRisk = {
|
|
1621
|
+
riskFactor: highVolatilityPoolRiskFactors,
|
|
1622
|
+
netRisk:
|
|
1623
|
+
highVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1624
|
+
highVolatilityPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1625
|
+
notARisks: getNoRiskTags(highVolatilityPoolRiskFactors),
|
|
1626
|
+
};
|
|
1627
|
+
|
|
1628
|
+
|
|
1600
1629
|
const AUDIT_URL =
|
|
1601
1630
|
"https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
1602
1631
|
|
|
@@ -1616,6 +1645,11 @@ const faqs: FAQ[] = [
|
|
|
1616
1645
|
answer:
|
|
1617
1646
|
"During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices.",
|
|
1618
1647
|
},
|
|
1648
|
+
{
|
|
1649
|
+
question: "Are there any deposit/withdrawal fees?",
|
|
1650
|
+
answer:
|
|
1651
|
+
"No, there are no deposit/withdrawal fees. However, there is a performance fee varying between 10-20% of the fees and rewards generated. The exact fee is determined by the strategy and the APY shown is net of this fee.",
|
|
1652
|
+
},
|
|
1619
1653
|
{
|
|
1620
1654
|
question: "Is the strategy audited?",
|
|
1621
1655
|
answer: (
|
|
@@ -1634,6 +1668,17 @@ const faqs: FAQ[] = [
|
|
|
1634
1668
|
},
|
|
1635
1669
|
];
|
|
1636
1670
|
|
|
1671
|
+
function getLSTFAQs(lstSymbol: string): FAQ[] {
|
|
1672
|
+
return [
|
|
1673
|
+
...faqs,
|
|
1674
|
+
{
|
|
1675
|
+
question: "Why might I see a negative APY?",
|
|
1676
|
+
answer:
|
|
1677
|
+
`A negative APY can occur when ${lstSymbol}'s price drops on DEXes. This is usually temporary and tends to recover within a few days or a week.`,
|
|
1678
|
+
},
|
|
1679
|
+
]
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1637
1682
|
const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
1638
1683
|
name: "Ekubo xSTRK/STRK",
|
|
1639
1684
|
description: <></>,
|
|
@@ -1651,11 +1696,11 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
|
1651
1696
|
auditUrl: AUDIT_URL,
|
|
1652
1697
|
maxTVL: Web3Number.fromWei("0", 18),
|
|
1653
1698
|
risk: {
|
|
1654
|
-
riskFactor:
|
|
1699
|
+
riskFactor: _corelatedPoolRiskFactors,
|
|
1655
1700
|
netRisk:
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
notARisks: getNoRiskTags(
|
|
1701
|
+
_corelatedPoolRiskFactors.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1702
|
+
_corelatedPoolRiskFactors.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1703
|
+
notARisks: getNoRiskTags(_corelatedPoolRiskFactors),
|
|
1659
1704
|
},
|
|
1660
1705
|
apyMethodology:
|
|
1661
1706
|
"APY based on 7-day historical performance, including fees and rewards.",
|
|
@@ -1673,15 +1718,9 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
|
1673
1718
|
minWaitHours: 24,
|
|
1674
1719
|
direction: "uponly",
|
|
1675
1720
|
},
|
|
1721
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
|
|
1676
1722
|
},
|
|
1677
|
-
faqs:
|
|
1678
|
-
...faqs,
|
|
1679
|
-
{
|
|
1680
|
-
question: "Why might I see a negative APY?",
|
|
1681
|
-
answer:
|
|
1682
|
-
"A negative APY can occur when xSTRK's price drops on DEXes. This is usually temporary and tends to recover within a few days or a week.",
|
|
1683
|
-
},
|
|
1684
|
-
],
|
|
1723
|
+
faqs: getLSTFAQs("xSTRK"),
|
|
1685
1724
|
points: [{
|
|
1686
1725
|
multiplier: 1,
|
|
1687
1726
|
logo: 'https://endur.fi/favicon.ico',
|
|
@@ -1691,76 +1730,244 @@ const xSTRKSTRK: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
|
1691
1730
|
investmentSteps: []
|
|
1692
1731
|
};
|
|
1693
1732
|
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
)
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
additionalInfo: {
|
|
1714
|
-
newBounds: {
|
|
1715
|
-
lower: -1,
|
|
1716
|
-
upper: 1,
|
|
1717
|
-
},
|
|
1718
|
-
truePrice: 1,
|
|
1719
|
-
feeBps: 1000,
|
|
1720
|
-
rebalanceConditions: {
|
|
1721
|
-
customShouldRebalance: async (currentPrice: number) =>
|
|
1722
|
-
currentPrice > 0.99 && currentPrice < 1.01,
|
|
1723
|
-
minWaitHours: 6,
|
|
1724
|
-
direction: "any",
|
|
1725
|
-
},
|
|
1726
|
-
},
|
|
1733
|
+
const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
1734
|
+
xSTRKSTRK,
|
|
1735
|
+
{
|
|
1736
|
+
...xSTRKSTRK,
|
|
1737
|
+
name: "Ekubo xWBTC/WBTC",
|
|
1738
|
+
description: <></>,
|
|
1739
|
+
address: ContractAddr.from(
|
|
1740
|
+
"0x2ea99b4971d3c277fa4a9b4beb7d4d7d169e683393a29eef263d5d57b4380a"
|
|
1741
|
+
),
|
|
1742
|
+
launchBlock: 2338309,
|
|
1743
|
+
// must be same order as poolKey token0 and token1
|
|
1744
|
+
depositTokens: [
|
|
1745
|
+
Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
|
|
1746
|
+
Global.getDefaultTokens().find((t) => t.symbol === "xWBTC")!,
|
|
1747
|
+
],
|
|
1748
|
+
additionalInfo: {
|
|
1749
|
+
...xSTRKSTRK.additionalInfo,
|
|
1750
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
|
|
1751
|
+
lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xWBTC")!.address,
|
|
1727
1752
|
},
|
|
1753
|
+
faqs: getLSTFAQs("xWBTC"),
|
|
1754
|
+
points: [],
|
|
1755
|
+
contractDetails: [],
|
|
1756
|
+
investmentSteps: []
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
...xSTRKSTRK,
|
|
1760
|
+
name: "Ekubo xtBTC/tBTC",
|
|
1761
|
+
description: <></>,
|
|
1762
|
+
address: ContractAddr.from(
|
|
1763
|
+
"0x785dc3dfc4e80ef2690a99512481e3ed3a5266180adda5a47e856245d68a4af"
|
|
1764
|
+
),
|
|
1765
|
+
launchBlock: 2344809,
|
|
1766
|
+
// must be same order as poolKey token0 and token1
|
|
1767
|
+
depositTokens: [
|
|
1768
|
+
Global.getDefaultTokens().find((t) => t.symbol === "xtBTC")!,
|
|
1769
|
+
Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
|
|
1770
|
+
],
|
|
1771
|
+
additionalInfo: {
|
|
1772
|
+
...xSTRKSTRK.additionalInfo,
|
|
1773
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
|
|
1774
|
+
lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xtBTC")!.address,
|
|
1775
|
+
},
|
|
1776
|
+
faqs: getLSTFAQs("xtBTC"),
|
|
1777
|
+
points: [],
|
|
1778
|
+
contractDetails: [],
|
|
1779
|
+
investmentSteps: []
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
...xSTRKSTRK,
|
|
1783
|
+
name: "Ekubo xsBTC/solvBTC",
|
|
1784
|
+
description: <></>,
|
|
1785
|
+
address: ContractAddr.from(
|
|
1786
|
+
"0x3af1c7faa7c464cf2c494e988972ad1939f1103dbfb6e47e9bf0c47e49b14ef"
|
|
1787
|
+
),
|
|
1788
|
+
launchBlock: 2344809,
|
|
1789
|
+
// must be same order as poolKey token0 and token1
|
|
1790
|
+
depositTokens: [
|
|
1791
|
+
Global.getDefaultTokens().find((t) => t.symbol === "xsBTC")!,
|
|
1792
|
+
Global.getDefaultTokens().find((t) => t.symbol === "solvBTC")!,
|
|
1793
|
+
],
|
|
1794
|
+
additionalInfo: {
|
|
1795
|
+
...xSTRKSTRK.additionalInfo,
|
|
1796
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "solvBTC")!,
|
|
1797
|
+
lstContract: Global.getDefaultTokens().find((t) => t.symbol === "xsBTC")!.address,
|
|
1798
|
+
},
|
|
1799
|
+
faqs: getLSTFAQs("xsBTC"),
|
|
1800
|
+
points: [],
|
|
1801
|
+
contractDetails: [],
|
|
1802
|
+
investmentSteps: []
|
|
1803
|
+
},
|
|
1804
|
+
];
|
|
1805
|
+
|
|
1806
|
+
const ETHUSDCRe7Strategy: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
1807
|
+
...xSTRKSTRK,
|
|
1808
|
+
name: "Ekubo ETH/USDC",
|
|
1809
|
+
description: <></>,
|
|
1810
|
+
address: ContractAddr.from(
|
|
1811
|
+
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
1812
|
+
),
|
|
1813
|
+
launchBlock: 1504232,
|
|
1814
|
+
// must be same order as poolKey token0 and token1
|
|
1815
|
+
depositTokens: [
|
|
1816
|
+
Global.getDefaultTokens().find((t) => t.symbol === "ETH")!,
|
|
1817
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
1818
|
+
],
|
|
1819
|
+
additionalInfo: {
|
|
1820
|
+
newBounds: "Managed by Re7",
|
|
1821
|
+
truePrice: 1,
|
|
1822
|
+
feeBps: 1000,
|
|
1823
|
+
rebalanceConditions: {
|
|
1824
|
+
customShouldRebalance: async (currentPrice: number) =>
|
|
1825
|
+
currentPrice > 0.99 && currentPrice < 1.01,
|
|
1826
|
+
minWaitHours: 6,
|
|
1827
|
+
direction: "any"
|
|
1828
|
+
},
|
|
1829
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
|
|
1830
|
+
},
|
|
1831
|
+
faqs: [
|
|
1832
|
+
...faqs,
|
|
1728
1833
|
{
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
address: ContractAddr.from(
|
|
1733
|
-
"0xb7bd37121041261446d8eedec618955a4490641034942da688e8cbddea7b23"
|
|
1734
|
-
),
|
|
1735
|
-
launchBlock: 1492136,
|
|
1736
|
-
// must be same order as poolKey token0 and token1
|
|
1737
|
-
depositTokens: [
|
|
1738
|
-
Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
|
|
1739
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
|
|
1740
|
-
],
|
|
1741
|
-
maxTVL: Web3Number.fromWei("0", 6),
|
|
1742
|
-
additionalInfo: {
|
|
1743
|
-
newBounds: "Managed by Re7",
|
|
1744
|
-
feeBps: 1000,
|
|
1745
|
-
rebalanceConditions: {
|
|
1746
|
-
customShouldRebalance: async (currentPrice: number) =>
|
|
1747
|
-
true,
|
|
1748
|
-
minWaitHours: 6,
|
|
1749
|
-
direction: "any",
|
|
1750
|
-
},
|
|
1751
|
-
},
|
|
1834
|
+
question: "Who is the curator of this strategy?",
|
|
1835
|
+
answer:
|
|
1836
|
+
<div>Re7 Labs is the curator of this strategy. Re7 Labs is a well-known Web3 asset management firm. This strategy is completely managed by them, including ownership of the vault. Troves is developer of the smart contracts and maintains infrastructure to help users access these strategies. You can find more information about them on their website <a href='https://www.re7labs.xyz' style={{textDecoration: "underline", marginLeft: "2px"}} target="_blank">here</a>.</div>
|
|
1752
1837
|
},
|
|
1838
|
+
],
|
|
1839
|
+
risk: highRisk,
|
|
1840
|
+
points: [],
|
|
1841
|
+
curator: { name: "Re7 Labs", logo: "https://www.re7labs.xyz/favicon.ico" }
|
|
1842
|
+
};
|
|
1843
|
+
|
|
1844
|
+
const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
1845
|
+
ETHUSDCRe7Strategy,
|
|
1846
|
+
{
|
|
1847
|
+
...ETHUSDCRe7Strategy,
|
|
1848
|
+
name: "Ekubo USDC/USDT",
|
|
1849
|
+
description: <></>,
|
|
1850
|
+
address: ContractAddr.from(
|
|
1851
|
+
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
1852
|
+
),
|
|
1853
|
+
launchBlock: 1506139,
|
|
1854
|
+
// must be same order as poolKey token0 and token1
|
|
1855
|
+
depositTokens: [
|
|
1856
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
|
|
1857
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDT")!
|
|
1858
|
+
],
|
|
1859
|
+
risk: xSTRKSTRK.risk,
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
...ETHUSDCRe7Strategy,
|
|
1863
|
+
name: "Ekubo STRK/USDC",
|
|
1864
|
+
description: <></>,
|
|
1865
|
+
address: ContractAddr.from(
|
|
1866
|
+
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
1867
|
+
),
|
|
1868
|
+
launchBlock: 1504079,
|
|
1869
|
+
// must be same order as poolKey token0 and token1
|
|
1870
|
+
depositTokens: [
|
|
1871
|
+
Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
|
|
1872
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
1873
|
+
],
|
|
1874
|
+
risk: highRisk,
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
...ETHUSDCRe7Strategy,
|
|
1878
|
+
name: "Ekubo STRK/ETH",
|
|
1879
|
+
description: <></>,
|
|
1880
|
+
address: ContractAddr.from(
|
|
1881
|
+
"0x4ce3024b0ee879009112d7b0e073f8a87153dd35b029347d4247ffe48d28f51"
|
|
1882
|
+
),
|
|
1883
|
+
launchBlock: 1504149,
|
|
1884
|
+
// must be same order as poolKey token0 and token1
|
|
1885
|
+
depositTokens: [
|
|
1886
|
+
Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
|
|
1887
|
+
Global.getDefaultTokens().find((t) => t.symbol === "ETH")!
|
|
1888
|
+
],
|
|
1889
|
+
risk: highRisk,
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
...ETHUSDCRe7Strategy,
|
|
1893
|
+
name: "Ekubo WBTC/USDC",
|
|
1894
|
+
description: <></>,
|
|
1895
|
+
address: ContractAddr.from(
|
|
1896
|
+
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
1897
|
+
),
|
|
1898
|
+
launchBlock: 1506144,
|
|
1899
|
+
// must be same order as poolKey token0 and token1
|
|
1900
|
+
depositTokens: [
|
|
1901
|
+
Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
|
|
1902
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
1903
|
+
],
|
|
1904
|
+
risk: mediumRisk,
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
...ETHUSDCRe7Strategy,
|
|
1908
|
+
name: "Ekubo tBTC/USDC",
|
|
1909
|
+
description: <></>,
|
|
1910
|
+
address: ContractAddr.from(
|
|
1911
|
+
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
1912
|
+
),
|
|
1913
|
+
launchBlock: 1501764,
|
|
1914
|
+
// must be same order as poolKey token0 and token1
|
|
1915
|
+
depositTokens: [
|
|
1916
|
+
Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
|
|
1917
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
1918
|
+
],
|
|
1919
|
+
risk: mediumRisk,
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
...ETHUSDCRe7Strategy,
|
|
1923
|
+
name: "Ekubo WBTC/ETH",
|
|
1924
|
+
description: <></>,
|
|
1925
|
+
address: ContractAddr.from(
|
|
1926
|
+
"0x1c9232b8186d9317652f05055615f18a120c2ad9e5ee96c39e031c257fb945b"
|
|
1927
|
+
),
|
|
1928
|
+
launchBlock: 1506145,
|
|
1929
|
+
// must be same order as poolKey token0 and token1
|
|
1930
|
+
depositTokens: [
|
|
1931
|
+
Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
|
|
1932
|
+
Global.getDefaultTokens().find((t) => t.symbol === "ETH")!
|
|
1933
|
+
],
|
|
1934
|
+
risk: mediumRisk,
|
|
1935
|
+
},
|
|
1936
|
+
{
|
|
1937
|
+
...ETHUSDCRe7Strategy,
|
|
1938
|
+
name: "Ekubo WBTC/STRK",
|
|
1939
|
+
description: <></>,
|
|
1940
|
+
address: ContractAddr.from(
|
|
1941
|
+
"0x1248e385c23a929a015ec298a26560fa7745bbd6e41a886550e337b02714b1b"
|
|
1942
|
+
),
|
|
1943
|
+
launchBlock: 1506147,
|
|
1944
|
+
// must be same order as poolKey token0 and token1
|
|
1945
|
+
depositTokens: [
|
|
1946
|
+
Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
|
|
1947
|
+
Global.getDefaultTokens().find((t) => t.symbol === "STRK")!
|
|
1948
|
+
],
|
|
1949
|
+
risk: highRisk,
|
|
1950
|
+
}
|
|
1951
|
+
];
|
|
1952
|
+
|
|
1953
|
+
/**
|
|
1954
|
+
* Represents the Ekubo CL Vault Strategies.
|
|
1955
|
+
*/
|
|
1956
|
+
export const EkuboCLVaultStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
1957
|
+
...[lstStrategies[0]],
|
|
1958
|
+
...RE7Strategies,
|
|
1753
1959
|
];
|
|
1754
1960
|
|
|
1755
1961
|
// auto assign contract details to each strategy
|
|
1756
1962
|
EkuboCLVaultStrategies.forEach((s) => {
|
|
1757
1963
|
// set contract details
|
|
1758
1964
|
s.contractDetails = [{
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1965
|
+
address: s.address,
|
|
1966
|
+
name: "Vault",
|
|
1967
|
+
sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/cl_vault"
|
|
1968
|
+
},
|
|
1969
|
+
// ...COMMON_CONTRACTS
|
|
1970
|
+
];
|
|
1764
1971
|
// set docs link
|
|
1765
1972
|
s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults"
|
|
1766
1973
|
|
|
@@ -1786,9 +1993,9 @@ EkuboCLVaultStrategies.forEach((s) => {
|
|
|
1786
1993
|
<div style={{display: "flex", flexDirection: "column", gap: "10px", color: 'var(--chakra-colors-text_secondary)'}}>
|
|
1787
1994
|
<p style={{}}>1. During withdrawal, you may receive either or both tokens depending
|
|
1788
1995
|
on market conditions and prevailing prices.</p>
|
|
1789
|
-
{s.
|
|
1996
|
+
{s.additionalInfo.lstContract && <p style={{}}>
|
|
1790
1997
|
2. Sometimes you might see a negative APY — this is usually not a big
|
|
1791
|
-
deal. It happens when
|
|
1998
|
+
deal. It happens when {s.name.split(" ")[1].split('/')[0]}'s price drops on DEXes, but things
|
|
1792
1999
|
typically bounce back within a few days or a week.
|
|
1793
2000
|
</p>}
|
|
1794
2001
|
</div>
|
|
@@ -10,6 +10,7 @@ import VesuPoolIDs from "@/data/vesu_pools.json";
|
|
|
10
10
|
import { getAPIUsingHeadlessBrowser } from "@/node/headless";
|
|
11
11
|
import { Global } from "@/global";
|
|
12
12
|
import { VESU_REWARDS_CONTRACT } from "@/modules/harvests";
|
|
13
|
+
import { ENDPOINTS } from "../constants";
|
|
13
14
|
|
|
14
15
|
interface VesuPoolsInfo { pools: any[]; isErrorPoolsAPI: boolean };
|
|
15
16
|
|
|
@@ -350,7 +351,7 @@ export class VesuAdapter extends BaseAdapter {
|
|
|
350
351
|
let pools: any[] = [];
|
|
351
352
|
try {
|
|
352
353
|
const data = await getAPIUsingHeadlessBrowser(
|
|
353
|
-
|
|
354
|
+
`${ENDPOINTS.VESU_BASE}/pools`
|
|
354
355
|
);
|
|
355
356
|
pools = data.data;
|
|
356
357
|
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { getAPIUsingHeadlessBrowser } from "@/node/headless";
|
|
28
28
|
import { VesuHarvests } from "@/modules/harvests";
|
|
29
29
|
import VesuPoolIDs from "@/data/vesu_pools.json";
|
|
30
|
-
import { COMMON_CONTRACTS } from "./constants";
|
|
30
|
+
import { COMMON_CONTRACTS, ENDPOINTS } from "./constants";
|
|
31
31
|
|
|
32
32
|
interface PoolProps {
|
|
33
33
|
pool_id: ContractAddr;
|
|
@@ -223,7 +223,7 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
static async getAllPossibleVerifiedPools(asset: ContractAddr) {
|
|
226
|
-
const data = await getAPIUsingHeadlessBrowser(
|
|
226
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE}/pools`);
|
|
227
227
|
const verifiedPools = data.data.filter((d: any) => d.isVerified);
|
|
228
228
|
const pools = verifiedPools
|
|
229
229
|
.map((p: any) => {
|
|
@@ -490,7 +490,7 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
490
490
|
let pools: any[] = [];
|
|
491
491
|
try {
|
|
492
492
|
const data = await getAPIUsingHeadlessBrowser(
|
|
493
|
-
|
|
493
|
+
`${ENDPOINTS.VESU_BASE}/pools`
|
|
494
494
|
);
|
|
495
495
|
pools = data.data;
|
|
496
496
|
|