@strkfarm/sdk 1.0.46 → 1.0.49

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.
@@ -1963,8 +1963,9 @@ var AvnuWrapper = class _AvnuWrapper {
1963
1963
  }
1964
1964
  };
1965
1965
 
1966
- // src/interfaces/common.ts
1966
+ // src/interfaces/common.tsx
1967
1967
  import { RpcProvider as RpcProvider2 } from "starknet";
1968
+ import { Fragment, jsx } from "react/jsx-runtime";
1968
1969
  var RiskType = /* @__PURE__ */ ((RiskType2) => {
1969
1970
  RiskType2["MARKET_RISK"] = "Market Risk";
1970
1971
  RiskType2["IMPERMANENT_LOSS"] = "Impermanent Loss Risk";
@@ -2020,8 +2021,8 @@ var getRiskExplaination = (riskType) => {
2020
2021
  };
2021
2022
  var getRiskColor = (risk) => {
2022
2023
  const value = risk.value;
2023
- if (value === 0) return "green";
2024
- if (value < 2.5) return "yellow";
2024
+ if (value <= 1) return "light_green_2";
2025
+ if (value < 3) return "yellow";
2025
2026
  return "red";
2026
2027
  };
2027
2028
  var getNoRiskTags = (risks) => {
@@ -2030,8 +2031,20 @@ var getNoRiskTags = (risks) => {
2030
2031
  (risk) => !risks.map((risk2) => risk2.type).includes(risk)
2031
2032
  );
2032
2033
  const mergedUnique = [.../* @__PURE__ */ new Set([...noRisks1, ...noRisks2])];
2033
- return mergedUnique.map((risk) => `No ${risk}`);
2034
+ return mergedUnique;
2034
2035
  };
2036
+ function highlightTextWithLinks(put, highlights) {
2037
+ const escapeRegExp = (text) => text.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
2038
+ const pattern = new RegExp(
2039
+ `(${highlights.map((m) => escapeRegExp(m.highlight)).join("|")})`,
2040
+ "gi"
2041
+ );
2042
+ const parts = put.split(pattern);
2043
+ return /* @__PURE__ */ jsx(Fragment, { children: parts.map((part, i) => {
2044
+ const match = highlights.find((m) => m.highlight.toLowerCase() === part.toLowerCase());
2045
+ return match ? /* @__PURE__ */ jsx("a", { href: match.link, target: "_blank", style: { color: "var(--chakra-colors-white)", background: "var(--chakra-colors-highlight)" }, children: part }, i) : /* @__PURE__ */ jsx("span", { children: part }, i);
2046
+ }) });
2047
+ }
2035
2048
 
2036
2049
  // src/interfaces/initializable.ts
2037
2050
  var Initializable = class {
@@ -9153,8 +9166,15 @@ var vesu_pools_default = {
9153
9166
  ]
9154
9167
  };
9155
9168
 
9169
+ // src/strategies/constants.ts
9170
+ var COMMON_CONTRACTS = [{
9171
+ address: ContractAddr.from("0x0636a3f51cc37f5729e4da4b1de6a8549a28f3c0d5bf3b17f150971e451ff9c2"),
9172
+ name: "Access Controller",
9173
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
9174
+ }];
9175
+
9156
9176
  // src/strategies/vesu-rebalance.tsx
9157
- import { jsx, jsxs } from "react/jsx-runtime";
9177
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
9158
9178
  var VesuRebalance = class _VesuRebalance extends BaseStrategy {
9159
9179
  // 10000 bps = 100%
9160
9180
  /**
@@ -9795,9 +9815,9 @@ var _protocol = {
9795
9815
  logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
9796
9816
  };
9797
9817
  var _riskFactor = [
9798
- { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
9799
- { type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50 },
9800
- { type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25 }
9818
+ { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25, reason: "Audited by CSC" },
9819
+ { type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50, reason: "Reasonable max LTV ratios and Curated by well-known risk managers like Re7" },
9820
+ { type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25, reason: "Uses Pragma price feeds, Most reputable price feed on Starknet" }
9801
9821
  ];
9802
9822
  var AUDIT_URL = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
9803
9823
  var faqs = [
@@ -9837,7 +9857,7 @@ var faqs = [
9837
9857
  question: "Is the strategy audited?",
9838
9858
  answer: /* @__PURE__ */ jsxs("div", { children: [
9839
9859
  "Yes, the strategy has been audited. You can review the audit report in our docs ",
9840
- /* @__PURE__ */ jsx("a", { href: "https://docs.strkfarm.com/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
9860
+ /* @__PURE__ */ jsx2("a", { href: "https://docs.strkfarm.com/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
9841
9861
  "."
9842
9862
  ] })
9843
9863
  }
@@ -9845,7 +9865,7 @@ var faqs = [
9845
9865
  var VesuRebalanceStrategies = [
9846
9866
  {
9847
9867
  name: "Vesu Fusion STRK",
9848
- description: _description.replace("{{TOKEN}}", "STRK"),
9868
+ description: _description,
9849
9869
  address: ContractAddr.from(
9850
9870
  "0x7fb5bcb8525954a60fde4e8fb8220477696ce7117ef264775a1770e23571929"
9851
9871
  ),
@@ -9865,7 +9885,9 @@ var VesuRebalanceStrategies = [
9865
9885
  additionalInfo: {
9866
9886
  feeBps: 1e3
9867
9887
  },
9868
- faqs
9888
+ faqs,
9889
+ contractDetails: [],
9890
+ investmentSteps: []
9869
9891
  },
9870
9892
  {
9871
9893
  name: "Vesu Fusion ETH",
@@ -9889,7 +9911,9 @@ var VesuRebalanceStrategies = [
9889
9911
  additionalInfo: {
9890
9912
  feeBps: 1e3
9891
9913
  },
9892
- faqs
9914
+ faqs,
9915
+ contractDetails: [],
9916
+ investmentSteps: []
9893
9917
  },
9894
9918
  {
9895
9919
  name: "Vesu Fusion USDC",
@@ -9913,7 +9937,9 @@ var VesuRebalanceStrategies = [
9913
9937
  additionalInfo: {
9914
9938
  feeBps: 1e3
9915
9939
  },
9916
- faqs
9940
+ faqs,
9941
+ contractDetails: [],
9942
+ investmentSteps: []
9917
9943
  },
9918
9944
  {
9919
9945
  name: "Vesu Fusion USDT",
@@ -9937,7 +9963,9 @@ var VesuRebalanceStrategies = [
9937
9963
  additionalInfo: {
9938
9964
  feeBps: 1e3
9939
9965
  },
9940
- faqs
9966
+ faqs,
9967
+ contractDetails: [],
9968
+ investmentSteps: []
9941
9969
  // }, {
9942
9970
  // name: 'Vesu Fusion WBTC',
9943
9971
  // description: _description.replace('{{TOKEN}}', 'WBTC'),
@@ -9956,6 +9984,32 @@ var VesuRebalanceStrategies = [
9956
9984
  // },
9957
9985
  }
9958
9986
  ];
9987
+ VesuRebalanceStrategies.forEach((s) => {
9988
+ s.contractDetails = [
9989
+ {
9990
+ address: s.address,
9991
+ name: "Vault",
9992
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
9993
+ },
9994
+ ...COMMON_CONTRACTS
9995
+ ];
9996
+ s.docs = "https://docs.strkfarm.com/p/strategies/vesu-fusion-rebalancing-vaults";
9997
+ s.description = highlightTextWithLinks(
9998
+ _description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
9999
+ [{
10000
+ highlight: "Vesu pools",
10001
+ link: "https://vesu.xyz/pools"
10002
+ }, {
10003
+ highlight: "Defi spring STRK Rewards",
10004
+ link: "https://defispring.starknet.io/"
10005
+ }]
10006
+ );
10007
+ s.investmentSteps = [
10008
+ "Split the amount and Supply to configured Vesu pools",
10009
+ "Monitor and Rebalance funds across multiple Vesu pools to maximize yield",
10010
+ "Harvest and supply Defi Spring STRK rewards every week (Auto-compound)"
10011
+ ];
10012
+ });
9959
10013
 
9960
10014
  // src/strategies/ekubo-cl-vault.tsx
9961
10015
  import {
@@ -14864,7 +14918,7 @@ var erc4626_abi_default = [
14864
14918
  ];
14865
14919
 
14866
14920
  // src/strategies/ekubo-cl-vault.tsx
14867
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
14921
+ import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
14868
14922
  var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
14869
14923
  /**
14870
14924
  * Creates a new VesuRebalance strategy instance.
@@ -15271,18 +15325,16 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
15271
15325
  console.log(
15272
15326
  `EkuboCLVault: getCurrentPrice: blockIdentifier: ${blockIdentifier}, sqrtRatio: ${sqrtRatio}, ${priceInfo.sqrt_ratio.toString()}`
15273
15327
  );
15274
- const price = sqrtRatio * sqrtRatio;
15275
- const tick = _EkuboCLVault.priceToTick(
15276
- price,
15277
- true,
15278
- Number(poolKey.tick_spacing)
15279
- );
15328
+ const token0Info = await Global.getTokenInfoFromAddr(poolKey.token0);
15329
+ const token1Info = await Global.getTokenInfoFromAddr(poolKey.token1);
15330
+ const price = sqrtRatio * sqrtRatio * 10 ** token0Info.decimals / 10 ** token1Info.decimals;
15331
+ const tick = priceInfo.tick;
15280
15332
  console.log(
15281
15333
  `EkuboCLVault: getCurrentPrice: blockIdentifier: ${blockIdentifier}, price: ${price}, tick: ${tick.mag}, ${tick.sign}`
15282
15334
  );
15283
15335
  return {
15284
15336
  price,
15285
- tick: tick.mag * (tick.sign == 0 ? 1 : -1),
15337
+ tick: Number(tick.mag) * (tick.sign ? -1 : 1),
15286
15338
  sqrtRatio: priceInfo.sqrt_ratio.toString()
15287
15339
  };
15288
15340
  }
@@ -15929,14 +15981,15 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
15929
15981
  return [baseFlow, rebalanceFlow];
15930
15982
  }
15931
15983
  };
15932
- var _description2 = "Deploys your {{POOL_NAME}} into an Ekubo liquidity pool, automatically rebalancing positions around the current price to optimize yield and reduce the need for manual adjustments. Trading fees and DeFi Spring rewards are automatically compounded back into the strategy. In return, you receive an ERC-20 token representing your share of the strategy. The APY is calculated based on 7-day historical performance.";
15984
+ var _description2 = "Deploys your {{POOL_NAME}} into an Ekubo liquidity pool, automatically rebalancing positions around the current price to optimize yield and reduce the need for manual adjustments. Trading fees and DeFi Spring rewards are automatically compounded back into the strategy. In return, you receive an ERC-20 token representing your share of the strategy";
15933
15985
  var _protocol2 = {
15934
15986
  name: "Ekubo",
15935
15987
  logo: "https://app.ekubo.org/favicon.ico"
15936
15988
  };
15937
15989
  var _riskFactor2 = [
15938
- { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
15939
- { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 1, weight: 75 }
15990
+ { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 34, reason: "Audited smart contracts" },
15991
+ { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 0.75, weight: 33, reason: "Low risk due to co-related assets" },
15992
+ { type: "Market Risk" /* MARKET_RISK */, value: 0.75, weight: 33, reason: "Low risk due to co-related assets" }
15940
15993
  ];
15941
15994
  var _riskFactorStable = [
15942
15995
  { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 }
@@ -15960,7 +16013,7 @@ var faqs2 = [
15960
16013
  answer: /* @__PURE__ */ jsxs2("div", { children: [
15961
16014
  "Yes, the strategy has been audited. You can review the audit report in our docs",
15962
16015
  " ",
15963
- /* @__PURE__ */ jsx2(
16016
+ /* @__PURE__ */ jsx3(
15964
16017
  "a",
15965
16018
  {
15966
16019
  href: "https://docs.strkfarm.com/p/ekubo-cl-vaults#technical-details",
@@ -15974,23 +16027,7 @@ var faqs2 = [
15974
16027
  ];
15975
16028
  var xSTRKSTRK = {
15976
16029
  name: "Ekubo xSTRK/STRK",
15977
- description: /* @__PURE__ */ jsxs2("div", { children: [
15978
- /* @__PURE__ */ jsx2("p", { children: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK") }),
15979
- /* @__PURE__ */ jsxs2(
15980
- "ul",
15981
- {
15982
- style: {
15983
- marginLeft: "20px",
15984
- listStyle: "circle",
15985
- fontSize: "12px"
15986
- },
15987
- children: [
15988
- /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
15989
- /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
15990
- ]
15991
- }
15992
- )
15993
- ] }),
16030
+ description: /* @__PURE__ */ jsx3(Fragment2, {}),
15994
16031
  address: ContractAddr.from(
15995
16032
  "0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"
15996
16033
  ),
@@ -16036,48 +16073,25 @@ var xSTRKSTRK = {
16036
16073
  multiplier: 1,
16037
16074
  logo: "https://endur.fi/favicon.ico",
16038
16075
  toolTip: "This strategy holds xSTRK and STRK tokens. Earn 1x Endur points on your xSTRK portion of Liquidity. STRK portion will earn Endur's DEX Bonus points. Points can be found on endur.fi."
16039
- }]
16076
+ }],
16077
+ contractDetails: [],
16078
+ investmentSteps: []
16040
16079
  };
16041
16080
  var EkuboCLVaultStrategies = [
16042
16081
  xSTRKSTRK,
16043
16082
  {
16083
+ ...xSTRKSTRK,
16044
16084
  name: "Ekubo USDC/USDT",
16045
- description: /* @__PURE__ */ jsxs2("div", { children: [
16046
- /* @__PURE__ */ jsx2("p", { children: _description2.replace("{{POOL_NAME}}", "USDC/USDT") }),
16047
- /* @__PURE__ */ jsx2(
16048
- "ul",
16049
- {
16050
- style: {
16051
- marginLeft: "20px",
16052
- listStyle: "circle",
16053
- fontSize: "12px"
16054
- },
16055
- children: /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." })
16056
- }
16057
- )
16058
- ] }),
16085
+ description: /* @__PURE__ */ jsx3(Fragment2, {}),
16059
16086
  address: ContractAddr.from(
16060
16087
  "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16061
16088
  ),
16062
16089
  launchBlock: 1385576,
16063
- type: "Other",
16064
16090
  // must be same order as poolKey token0 and token1
16065
16091
  depositTokens: [
16066
16092
  Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
16067
16093
  Global.getDefaultTokens().find((t) => t.symbol === "USDT")
16068
16094
  ],
16069
- protocols: [_protocol2],
16070
- auditUrl: AUDIT_URL2,
16071
- maxTVL: Web3Number.fromWei("0", 6),
16072
- risk: {
16073
- riskFactor: _riskFactorStable,
16074
- netRisk: _riskFactorStable.reduce(
16075
- (acc, curr) => acc + curr.value * curr.weight,
16076
- 0
16077
- ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16078
- notARisks: getNoRiskTags(_riskFactorStable)
16079
- },
16080
- apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
16081
16095
  additionalInfo: {
16082
16096
  newBounds: {
16083
16097
  lower: -1,
@@ -16090,51 +16104,71 @@ var EkuboCLVaultStrategies = [
16090
16104
  minWaitHours: 6,
16091
16105
  direction: "any"
16092
16106
  }
16093
- },
16094
- faqs: [...faqs2]
16095
- }
16096
- // {
16097
- // ...xSTRKSTRK,
16098
- // name: "Ekubo STRK/USDC",
16099
- // description: (
16100
- // <div>
16101
- // <p>{_description.replace("{{POOL_NAME}}", "STRK/USDC")}</p>
16102
- // <ul
16103
- // style={{
16104
- // marginLeft: "20px",
16105
- // listStyle: "circle",
16106
- // fontSize: "12px",
16107
- // }}
16108
- // >
16109
- // <li style={{ marginTop: "10px" }}>
16110
- // During withdrawal, you may receive either or both tokens depending
16111
- // on market conditions and prevailing prices.
16112
- // </li>
16113
- // </ul>
16114
- // </div>
16115
- // ),
16116
- // address: ContractAddr.from(
16117
- // "0xb7bd37121041261446d8eedec618955a4490641034942da688e8cbddea7b23"
16118
- // ),
16119
- // launchBlock: 1492136,
16120
- // // must be same order as poolKey token0 and token1
16121
- // depositTokens: [
16122
- // Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
16123
- // Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
16124
- // ],
16125
- // maxTVL: Web3Number.fromWei("0", 6),
16126
- // additionalInfo: {
16127
- // newBounds: "Managed by Re7",
16128
- // feeBps: 1000,
16129
- // rebalanceConditions: {
16130
- // customShouldRebalance: async (currentPrice: number) =>
16131
- // true,
16132
- // minWaitHours: 6,
16133
- // direction: "any",
16134
- // },
16135
- // },
16136
- // },
16107
+ }
16108
+ },
16109
+ {
16110
+ ...xSTRKSTRK,
16111
+ name: "Ekubo STRK/USDC",
16112
+ description: /* @__PURE__ */ jsx3(Fragment2, {}),
16113
+ address: ContractAddr.from(
16114
+ "0xb7bd37121041261446d8eedec618955a4490641034942da688e8cbddea7b23"
16115
+ ),
16116
+ launchBlock: 1492136,
16117
+ // must be same order as poolKey token0 and token1
16118
+ depositTokens: [
16119
+ Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
16120
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC")
16121
+ ],
16122
+ maxTVL: Web3Number.fromWei("0", 6),
16123
+ additionalInfo: {
16124
+ newBounds: "Managed by Re7",
16125
+ feeBps: 1e3,
16126
+ rebalanceConditions: {
16127
+ customShouldRebalance: async (currentPrice) => true,
16128
+ minWaitHours: 6,
16129
+ direction: "any"
16130
+ }
16131
+ }
16132
+ }
16137
16133
  ];
16134
+ EkuboCLVaultStrategies.forEach((s) => {
16135
+ s.contractDetails = [
16136
+ {
16137
+ address: s.address,
16138
+ name: "Vault",
16139
+ sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/cl_vault"
16140
+ },
16141
+ ...COMMON_CONTRACTS
16142
+ ];
16143
+ s.docs = "https://docs.strkfarm.com/p/ekubo-cl-vaults";
16144
+ s.description = /* @__PURE__ */ jsxs2("div", { children: [
16145
+ /* @__PURE__ */ jsx3("p", { children: highlightTextWithLinks(
16146
+ _description2.replace("{{POOL_NAME}}", s.name.split(" ")[1]),
16147
+ [{
16148
+ highlight: "Ekubo liquidity pool",
16149
+ link: "https://app.ekubo.org/positions"
16150
+ }, {
16151
+ highlight: "DeFi Spring rewards",
16152
+ link: "https://defispring.starknet.io/"
16153
+ }, {
16154
+ highlight: "ERC-20 token",
16155
+ link: "https://www.investopedia.com/news/what-erc20-and-what-does-it-mean-ethereum/"
16156
+ }]
16157
+ ) }),
16158
+ /* @__PURE__ */ jsxs2("div", { style: { padding: "16px 16px", background: "var(--chakra-colors-mycard_light)", marginTop: "16px", borderRadius: "16px" }, children: [
16159
+ /* @__PURE__ */ jsx3("h4", { style: { fontWeight: "bold" }, children: "Key points to note:" }),
16160
+ /* @__PURE__ */ jsxs2("div", { style: { display: "flex", flexDirection: "column", gap: "10px", color: "var(--chakra-colors-text_secondary)" }, children: [
16161
+ /* @__PURE__ */ jsx3("p", { style: {}, children: "1. During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
16162
+ s.name.includes("xSTRK/STRK") && /* @__PURE__ */ jsx3("p", { style: {}, children: "2. Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
16163
+ ] })
16164
+ ] })
16165
+ ] });
16166
+ s.investmentSteps = [
16167
+ "Supply tokens to Ekubo's pool",
16168
+ "Monitor and Rebalance position to optimize yield",
16169
+ "Harvest and supply Defi Spring STRK rewards every week (Auto-compound)"
16170
+ ];
16171
+ });
16138
16172
  export {
16139
16173
  AutoCompounderSTRK,
16140
16174
  AvnuWrapper,
@@ -16161,5 +16195,6 @@ export {
16161
16195
  getMainnetConfig,
16162
16196
  getNoRiskTags,
16163
16197
  getRiskColor,
16164
- getRiskExplaination
16198
+ getRiskExplaination,
16199
+ highlightTextWithLinks
16165
16200
  };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import BigNumber from 'bignumber.js';
2
2
  import * as starknet from 'starknet';
3
3
  import { RpcProvider, BlockIdentifier, Contract, Uint256, Call, Account } from 'starknet';
4
- import React from 'react';
4
+ import React, { ReactNode } from 'react';
5
5
  import { Quote } from '@avnu/avnu-sdk';
6
6
  import TelegramBot from 'node-telegram-bot-api';
7
7
 
@@ -54,6 +54,7 @@ interface RiskFactor {
54
54
  type: RiskType;
55
55
  value: number;
56
56
  weight: number;
57
+ reason?: string;
57
58
  }
58
59
  interface TokenInfo {
59
60
  name: string;
@@ -105,16 +106,23 @@ interface IStrategyMetadata<T> {
105
106
  risk: {
106
107
  riskFactor: RiskFactor[];
107
108
  netRisk: number;
108
- notARisks: string[];
109
+ notARisks: RiskType[];
109
110
  };
110
111
  apyMethodology?: string;
111
112
  additionalInfo: T;
113
+ contractDetails: {
114
+ address: ContractAddr;
115
+ name: string;
116
+ sourceCodeUrl?: string;
117
+ }[];
112
118
  faqs: FAQ[];
113
119
  points?: {
114
120
  multiplier: number;
115
121
  logo: string;
116
122
  toolTip?: string;
117
123
  }[];
124
+ docs?: string;
125
+ investmentSteps: string[];
118
126
  }
119
127
  interface IInvestmentFlow {
120
128
  id?: string;
@@ -128,8 +136,13 @@ interface IInvestmentFlow {
128
136
  }
129
137
  declare function getMainnetConfig(rpcUrl?: string, blockIdentifier?: BlockIdentifier): IConfig;
130
138
  declare const getRiskExplaination: (riskType: RiskType) => "The risk of the market moving against the position." | "The temporary loss of value experienced by liquidity providers in AMMs when asset prices diverge compared to simply holding them." | "The risk of losing funds due to the position being liquidated." | "The risk of low liquidity in the pool, which can lead to high slippages or reduced in-abilities to quickly exit the position." | "The risk of the oracle being manipulated or incorrect." | "The risk of the smart contract being vulnerable to attacks." | "The risk of technical issues e.g. backend failure." | "The risk of the counterparty defaulting e.g. bad debt on lending platforms.";
131
- declare const getRiskColor: (risk: RiskFactor) => "green" | "yellow" | "red";
132
- declare const getNoRiskTags: (risks: RiskFactor[]) => string[];
139
+ declare const getRiskColor: (risk: RiskFactor) => "light_green_2" | "yellow" | "red";
140
+ declare const getNoRiskTags: (risks: RiskFactor[]) => RiskType[];
141
+ interface HighlightLink {
142
+ highlight: string;
143
+ link: string;
144
+ }
145
+ declare function highlightTextWithLinks(put: string, highlights: HighlightLink[]): ReactNode;
133
146
 
134
147
  interface ILendingMetadata {
135
148
  name: string;
@@ -859,4 +872,4 @@ declare class PasswordJsonCryptoUtil {
859
872
  decrypt(encryptedData: string, password: string): any;
860
873
  }
861
874
 
862
- export { type AccountInfo, type AllAccountsStore, AutoCompounderSTRK, AvnuWrapper, BaseStrategy, type CLVaultStrategySettings, ContractAddr, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type FAQ, FatalError, FlowChartColors, Global, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, Initializable, type LendingToken, MarginType, Network, PasswordJsonCryptoUtil, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerRedis, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type SingleActionAmount, type SingleTokenInfo, Store, type StoreConfig, type SwapInfo, TelegramNotif, type TokenInfo, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, getAPIUsingHeadlessBrowser, getDefaultStoreConfig, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, logger };
875
+ export { type AccountInfo, type AllAccountsStore, AutoCompounderSTRK, AvnuWrapper, BaseStrategy, type CLVaultStrategySettings, ContractAddr, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type FAQ, FatalError, FlowChartColors, Global, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, Initializable, type LendingToken, MarginType, Network, PasswordJsonCryptoUtil, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerRedis, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type SingleActionAmount, type SingleTokenInfo, Store, type StoreConfig, type SwapInfo, TelegramNotif, type TokenInfo, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, getAPIUsingHeadlessBrowser, getDefaultStoreConfig, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, highlightTextWithLinks, logger };