@strkfarm/sdk 1.0.43 → 1.0.45

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.
@@ -38109,7 +38109,7 @@ var strkfarm_risk_engine = (() => {
38109
38109
 
38110
38110
  // src/modules/avnu.ts
38111
38111
  var AvnuWrapper = class _AvnuWrapper {
38112
- async getQuotes(fromToken, toToken, amountWei, taker, retry = 0) {
38112
+ async getQuotes(fromToken, toToken, amountWei, taker, retry = 0, excludeSources = ["Haiko(Solvers)"]) {
38113
38113
  const MAX_RETRY = 5;
38114
38114
  logger.verbose(`${_AvnuWrapper.name}: getQuotes => Getting quotes for ${fromToken} -> ${toToken}, amount: ${amountWei}, taker: ${taker}, retry: ${retry}`);
38115
38115
  const params = {
@@ -38117,9 +38117,9 @@ var strkfarm_risk_engine = (() => {
38117
38117
  buyTokenAddress: toToken,
38118
38118
  sellAmount: amountWei,
38119
38119
  takerAddress: taker,
38120
- // excludeSources: ['Nostra', 'Haiko(Solvers)']
38121
- excludeSources: ["Haiko(Solvers)"]
38122
- // to resolve InvalidOraclePrice error
38120
+ // excludeSources: ['Nostra', 'Haiko(Solvers)']
38121
+ excludeSources
38122
+ // excludeSources: ['Haiko(Solvers)'] // to resolve InvalidOraclePrice error
38123
38123
  };
38124
38124
  assert3(fromToken != toToken, "From and to tokens are the same");
38125
38125
  const quotes = await fetchQuotes(params);
@@ -52237,67 +52237,66 @@ var strkfarm_risk_engine = (() => {
52237
52237
  question: "Why might I see a negative APY?",
52238
52238
  answer: "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."
52239
52239
  }
52240
- ]
52240
+ ],
52241
+ points: [{
52242
+ multiplier: 1,
52243
+ logo: "https://endur.fi/favicon.ico",
52244
+ 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."
52245
+ }]
52246
+ },
52247
+ {
52248
+ name: "Ekubo USDC/USDT",
52249
+ description: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
52250
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: _description2.replace("{{POOL_NAME}}", "USDC/USDT") }),
52251
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
52252
+ "ul",
52253
+ {
52254
+ style: {
52255
+ marginLeft: "20px",
52256
+ listStyle: "circle",
52257
+ fontSize: "12px"
52258
+ },
52259
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." })
52260
+ }
52261
+ )
52262
+ ] }),
52263
+ address: ContractAddr.from(
52264
+ "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
52265
+ ),
52266
+ launchBlock: 1385576,
52267
+ type: "Other",
52268
+ // must be same order as poolKey token0 and token1
52269
+ depositTokens: [
52270
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
52271
+ Global.getDefaultTokens().find((t) => t.symbol === "USDT")
52272
+ ],
52273
+ protocols: [_protocol2],
52274
+ auditUrl: AUDIT_URL2,
52275
+ maxTVL: Web3Number.fromWei("0", 6),
52276
+ risk: {
52277
+ riskFactor: _riskFactorStable,
52278
+ netRisk: _riskFactorStable.reduce(
52279
+ (acc, curr) => acc + curr.value * curr.weight,
52280
+ 0
52281
+ ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
52282
+ notARisks: getNoRiskTags(_riskFactorStable)
52283
+ },
52284
+ apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
52285
+ additionalInfo: {
52286
+ newBounds: {
52287
+ lower: -1,
52288
+ upper: 1
52289
+ },
52290
+ truePrice: 1,
52291
+ feeBps: 1e3,
52292
+ rebalanceConditions: {
52293
+ customShouldRebalance: async (currentPrice) => currentPrice > 0.99 && currentPrice < 1.01,
52294
+ minWaitHours: 6,
52295
+ direction: "any"
52296
+ }
52297
+ },
52298
+ faqs: [...faqs2]
52241
52299
  }
52242
- // {
52243
- // name: "Ekubo USDC/USDT",
52244
- // description: (
52245
- // <div>
52246
- // <p>{_description.replace("{{POOL_NAME}}", "USDC/USDT")}</p>
52247
- // <ul
52248
- // style={{
52249
- // marginLeft: "20px",
52250
- // listStyle: "circle",
52251
- // fontSize: "12px",
52252
- // }}
52253
- // >
52254
- // <li style={{ marginTop: "10px" }}>
52255
- // During withdrawal, you may receive either or both tokens depending
52256
- // on market conditions and prevailing prices.
52257
- // </li>
52258
- // </ul>
52259
- // </div>
52260
- // ),
52261
- // address: ContractAddr.from(
52262
- // "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
52263
- // ),
52264
- // launchBlock: 1385576,
52265
- // type: "Other",
52266
- // // must be same order as poolKey token0 and token1
52267
- // depositTokens: [
52268
- // Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
52269
- // Global.getDefaultTokens().find((t) => t.symbol === "USDT")!,
52270
- // ],
52271
- // protocols: [_protocol],
52272
- // auditUrl: AUDIT_URL,
52273
- // maxTVL: Web3Number.fromWei("0", 6),
52274
- // risk: {
52275
- // riskFactor: _riskFactorStable,
52276
- // netRisk:
52277
- // _riskFactorStable.reduce(
52278
- // (acc, curr) => acc + curr.value * curr.weight,
52279
- // 0
52280
- // ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
52281
- // notARisks: getNoRiskTags(_riskFactorStable),
52282
- // },
52283
- // apyMethodology:
52284
- // "APY based on 7-day historical performance, including fees and rewards.",
52285
- // additionalInfo: {
52286
- // newBounds: {
52287
- // lower: -1,
52288
- // upper: 1,
52289
- // },
52290
- // truePrice: 1,
52291
- // feeBps: 1000,
52292
- // rebalanceConditions: {
52293
- // customShouldRebalance: async (currentPrice: number) =>
52294
- // currentPrice > 0.99 && currentPrice < 1.01,
52295
- // minWaitHours: 6,
52296
- // direction: "any",
52297
- // },
52298
- // },
52299
- // faqs: [...faqs],
52300
- // },
52301
52300
  ];
52302
52301
  return __toCommonJS(index_browser_exports);
52303
52302
  })();
@@ -1889,7 +1889,7 @@ function assert(condition, message) {
1889
1889
 
1890
1890
  // src/modules/avnu.ts
1891
1891
  var AvnuWrapper = class _AvnuWrapper {
1892
- async getQuotes(fromToken, toToken, amountWei, taker, retry = 0) {
1892
+ async getQuotes(fromToken, toToken, amountWei, taker, retry = 0, excludeSources = ["Haiko(Solvers)"]) {
1893
1893
  const MAX_RETRY = 5;
1894
1894
  logger.verbose(`${_AvnuWrapper.name}: getQuotes => Getting quotes for ${fromToken} -> ${toToken}, amount: ${amountWei}, taker: ${taker}, retry: ${retry}`);
1895
1895
  const params = {
@@ -1897,9 +1897,9 @@ var AvnuWrapper = class _AvnuWrapper {
1897
1897
  buyTokenAddress: toToken,
1898
1898
  sellAmount: amountWei,
1899
1899
  takerAddress: taker,
1900
- // excludeSources: ['Nostra', 'Haiko(Solvers)']
1901
- excludeSources: ["Haiko(Solvers)"]
1902
- // to resolve InvalidOraclePrice error
1900
+ // excludeSources: ['Nostra', 'Haiko(Solvers)']
1901
+ excludeSources
1902
+ // excludeSources: ['Haiko(Solvers)'] // to resolve InvalidOraclePrice error
1903
1903
  };
1904
1904
  assert(fromToken != toToken, "From and to tokens are the same");
1905
1905
  const quotes = await fetchQuotes(params);
@@ -16031,67 +16031,66 @@ var EkuboCLVaultStrategies = [
16031
16031
  question: "Why might I see a negative APY?",
16032
16032
  answer: "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."
16033
16033
  }
16034
- ]
16034
+ ],
16035
+ points: [{
16036
+ multiplier: 1,
16037
+ logo: "https://endur.fi/favicon.ico",
16038
+ 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
+ }]
16040
+ },
16041
+ {
16042
+ name: "Ekubo USDC/USDT",
16043
+ description: /* @__PURE__ */ jsxs2("div", { children: [
16044
+ /* @__PURE__ */ jsx2("p", { children: _description2.replace("{{POOL_NAME}}", "USDC/USDT") }),
16045
+ /* @__PURE__ */ jsx2(
16046
+ "ul",
16047
+ {
16048
+ style: {
16049
+ marginLeft: "20px",
16050
+ listStyle: "circle",
16051
+ fontSize: "12px"
16052
+ },
16053
+ children: /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." })
16054
+ }
16055
+ )
16056
+ ] }),
16057
+ address: ContractAddr.from(
16058
+ "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16059
+ ),
16060
+ launchBlock: 1385576,
16061
+ type: "Other",
16062
+ // must be same order as poolKey token0 and token1
16063
+ depositTokens: [
16064
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
16065
+ Global.getDefaultTokens().find((t) => t.symbol === "USDT")
16066
+ ],
16067
+ protocols: [_protocol2],
16068
+ auditUrl: AUDIT_URL2,
16069
+ maxTVL: Web3Number.fromWei("0", 6),
16070
+ risk: {
16071
+ riskFactor: _riskFactorStable,
16072
+ netRisk: _riskFactorStable.reduce(
16073
+ (acc, curr) => acc + curr.value * curr.weight,
16074
+ 0
16075
+ ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16076
+ notARisks: getNoRiskTags(_riskFactorStable)
16077
+ },
16078
+ apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
16079
+ additionalInfo: {
16080
+ newBounds: {
16081
+ lower: -1,
16082
+ upper: 1
16083
+ },
16084
+ truePrice: 1,
16085
+ feeBps: 1e3,
16086
+ rebalanceConditions: {
16087
+ customShouldRebalance: async (currentPrice) => currentPrice > 0.99 && currentPrice < 1.01,
16088
+ minWaitHours: 6,
16089
+ direction: "any"
16090
+ }
16091
+ },
16092
+ faqs: [...faqs2]
16035
16093
  }
16036
- // {
16037
- // name: "Ekubo USDC/USDT",
16038
- // description: (
16039
- // <div>
16040
- // <p>{_description.replace("{{POOL_NAME}}", "USDC/USDT")}</p>
16041
- // <ul
16042
- // style={{
16043
- // marginLeft: "20px",
16044
- // listStyle: "circle",
16045
- // fontSize: "12px",
16046
- // }}
16047
- // >
16048
- // <li style={{ marginTop: "10px" }}>
16049
- // During withdrawal, you may receive either or both tokens depending
16050
- // on market conditions and prevailing prices.
16051
- // </li>
16052
- // </ul>
16053
- // </div>
16054
- // ),
16055
- // address: ContractAddr.from(
16056
- // "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16057
- // ),
16058
- // launchBlock: 1385576,
16059
- // type: "Other",
16060
- // // must be same order as poolKey token0 and token1
16061
- // depositTokens: [
16062
- // Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
16063
- // Global.getDefaultTokens().find((t) => t.symbol === "USDT")!,
16064
- // ],
16065
- // protocols: [_protocol],
16066
- // auditUrl: AUDIT_URL,
16067
- // maxTVL: Web3Number.fromWei("0", 6),
16068
- // risk: {
16069
- // riskFactor: _riskFactorStable,
16070
- // netRisk:
16071
- // _riskFactorStable.reduce(
16072
- // (acc, curr) => acc + curr.value * curr.weight,
16073
- // 0
16074
- // ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16075
- // notARisks: getNoRiskTags(_riskFactorStable),
16076
- // },
16077
- // apyMethodology:
16078
- // "APY based on 7-day historical performance, including fees and rewards.",
16079
- // additionalInfo: {
16080
- // newBounds: {
16081
- // lower: -1,
16082
- // upper: 1,
16083
- // },
16084
- // truePrice: 1,
16085
- // feeBps: 1000,
16086
- // rebalanceConditions: {
16087
- // customShouldRebalance: async (currentPrice: number) =>
16088
- // currentPrice > 0.99 && currentPrice < 1.01,
16089
- // minWaitHours: 6,
16090
- // direction: "any",
16091
- // },
16092
- // },
16093
- // faqs: [...faqs],
16094
- // },
16095
16094
  ];
16096
16095
  export {
16097
16096
  AutoCompounderSTRK,
package/dist/index.d.ts CHANGED
@@ -110,6 +110,11 @@ interface IStrategyMetadata<T> {
110
110
  apyMethodology?: string;
111
111
  additionalInfo: T;
112
112
  faqs: FAQ[];
113
+ points?: {
114
+ multiplier: number;
115
+ logo: string;
116
+ toolTip?: string;
117
+ }[];
113
118
  }
114
119
  interface IInvestmentFlow {
115
120
  id?: string;
@@ -287,8 +292,8 @@ interface SwapInfo {
287
292
  routes: Route[];
288
293
  }
289
294
  declare class AvnuWrapper {
290
- getQuotes(fromToken: string, toToken: string, amountWei: string, taker: string, retry?: number): Promise<Quote>;
291
- getSwapInfo(quote: Quote, taker: string, integratorFeeBps: number, integratorFeeRecipient: string, minAmount?: string): Promise<SwapInfo>;
295
+ getQuotes(fromToken: string, toToken: string, amountWei: string, taker: string, retry?: number, excludeSources?: string[]): Promise<Quote>;
296
+ getSwapInfo(quote: Pick<Quote, 'quoteId' | 'buyTokenAddress' | 'buyAmount' | 'sellTokenAddress' | 'sellAmount'>, taker: string, integratorFeeBps: number, integratorFeeRecipient: string, minAmount?: string): Promise<SwapInfo>;
292
297
  static buildZeroSwap(tokenToSell: ContractAddr, address: string): SwapInfo;
293
298
  }
294
299
 
package/dist/index.js CHANGED
@@ -2007,7 +2007,7 @@ function assert(condition, message) {
2007
2007
 
2008
2008
  // src/modules/avnu.ts
2009
2009
  var AvnuWrapper = class _AvnuWrapper {
2010
- async getQuotes(fromToken, toToken, amountWei, taker, retry = 0) {
2010
+ async getQuotes(fromToken, toToken, amountWei, taker, retry = 0, excludeSources = ["Haiko(Solvers)"]) {
2011
2011
  const MAX_RETRY = 5;
2012
2012
  logger.verbose(`${_AvnuWrapper.name}: getQuotes => Getting quotes for ${fromToken} -> ${toToken}, amount: ${amountWei}, taker: ${taker}, retry: ${retry}`);
2013
2013
  const params = {
@@ -2015,9 +2015,9 @@ var AvnuWrapper = class _AvnuWrapper {
2015
2015
  buyTokenAddress: toToken,
2016
2016
  sellAmount: amountWei,
2017
2017
  takerAddress: taker,
2018
- // excludeSources: ['Nostra', 'Haiko(Solvers)']
2019
- excludeSources: ["Haiko(Solvers)"]
2020
- // to resolve InvalidOraclePrice error
2018
+ // excludeSources: ['Nostra', 'Haiko(Solvers)']
2019
+ excludeSources
2020
+ // excludeSources: ['Haiko(Solvers)'] // to resolve InvalidOraclePrice error
2021
2021
  };
2022
2022
  assert(fromToken != toToken, "From and to tokens are the same");
2023
2023
  const quotes = await (0, import_avnu_sdk.fetchQuotes)(params);
@@ -16145,67 +16145,66 @@ var EkuboCLVaultStrategies = [
16145
16145
  question: "Why might I see a negative APY?",
16146
16146
  answer: "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."
16147
16147
  }
16148
- ]
16148
+ ],
16149
+ points: [{
16150
+ multiplier: 1,
16151
+ logo: "https://endur.fi/favicon.ico",
16152
+ 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."
16153
+ }]
16154
+ },
16155
+ {
16156
+ name: "Ekubo USDC/USDT",
16157
+ description: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
16158
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { children: _description2.replace("{{POOL_NAME}}", "USDC/USDT") }),
16159
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
16160
+ "ul",
16161
+ {
16162
+ style: {
16163
+ marginLeft: "20px",
16164
+ listStyle: "circle",
16165
+ fontSize: "12px"
16166
+ },
16167
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." })
16168
+ }
16169
+ )
16170
+ ] }),
16171
+ address: ContractAddr.from(
16172
+ "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16173
+ ),
16174
+ launchBlock: 1385576,
16175
+ type: "Other",
16176
+ // must be same order as poolKey token0 and token1
16177
+ depositTokens: [
16178
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
16179
+ Global.getDefaultTokens().find((t) => t.symbol === "USDT")
16180
+ ],
16181
+ protocols: [_protocol2],
16182
+ auditUrl: AUDIT_URL2,
16183
+ maxTVL: Web3Number.fromWei("0", 6),
16184
+ risk: {
16185
+ riskFactor: _riskFactorStable,
16186
+ netRisk: _riskFactorStable.reduce(
16187
+ (acc, curr) => acc + curr.value * curr.weight,
16188
+ 0
16189
+ ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16190
+ notARisks: getNoRiskTags(_riskFactorStable)
16191
+ },
16192
+ apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
16193
+ additionalInfo: {
16194
+ newBounds: {
16195
+ lower: -1,
16196
+ upper: 1
16197
+ },
16198
+ truePrice: 1,
16199
+ feeBps: 1e3,
16200
+ rebalanceConditions: {
16201
+ customShouldRebalance: async (currentPrice) => currentPrice > 0.99 && currentPrice < 1.01,
16202
+ minWaitHours: 6,
16203
+ direction: "any"
16204
+ }
16205
+ },
16206
+ faqs: [...faqs2]
16149
16207
  }
16150
- // {
16151
- // name: "Ekubo USDC/USDT",
16152
- // description: (
16153
- // <div>
16154
- // <p>{_description.replace("{{POOL_NAME}}", "USDC/USDT")}</p>
16155
- // <ul
16156
- // style={{
16157
- // marginLeft: "20px",
16158
- // listStyle: "circle",
16159
- // fontSize: "12px",
16160
- // }}
16161
- // >
16162
- // <li style={{ marginTop: "10px" }}>
16163
- // During withdrawal, you may receive either or both tokens depending
16164
- // on market conditions and prevailing prices.
16165
- // </li>
16166
- // </ul>
16167
- // </div>
16168
- // ),
16169
- // address: ContractAddr.from(
16170
- // "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16171
- // ),
16172
- // launchBlock: 1385576,
16173
- // type: "Other",
16174
- // // must be same order as poolKey token0 and token1
16175
- // depositTokens: [
16176
- // Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
16177
- // Global.getDefaultTokens().find((t) => t.symbol === "USDT")!,
16178
- // ],
16179
- // protocols: [_protocol],
16180
- // auditUrl: AUDIT_URL,
16181
- // maxTVL: Web3Number.fromWei("0", 6),
16182
- // risk: {
16183
- // riskFactor: _riskFactorStable,
16184
- // netRisk:
16185
- // _riskFactorStable.reduce(
16186
- // (acc, curr) => acc + curr.value * curr.weight,
16187
- // 0
16188
- // ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16189
- // notARisks: getNoRiskTags(_riskFactorStable),
16190
- // },
16191
- // apyMethodology:
16192
- // "APY based on 7-day historical performance, including fees and rewards.",
16193
- // additionalInfo: {
16194
- // newBounds: {
16195
- // lower: -1,
16196
- // upper: 1,
16197
- // },
16198
- // truePrice: 1,
16199
- // feeBps: 1000,
16200
- // rebalanceConditions: {
16201
- // customShouldRebalance: async (currentPrice: number) =>
16202
- // currentPrice > 0.99 && currentPrice < 1.01,
16203
- // minWaitHours: 6,
16204
- // direction: "any",
16205
- // },
16206
- // },
16207
- // faqs: [...faqs],
16208
- // },
16209
16208
  ];
16210
16209
 
16211
16210
  // src/notifs/telegram.ts
package/dist/index.mjs CHANGED
@@ -1938,7 +1938,7 @@ function assert(condition, message) {
1938
1938
 
1939
1939
  // src/modules/avnu.ts
1940
1940
  var AvnuWrapper = class _AvnuWrapper {
1941
- async getQuotes(fromToken, toToken, amountWei, taker, retry = 0) {
1941
+ async getQuotes(fromToken, toToken, amountWei, taker, retry = 0, excludeSources = ["Haiko(Solvers)"]) {
1942
1942
  const MAX_RETRY = 5;
1943
1943
  logger.verbose(`${_AvnuWrapper.name}: getQuotes => Getting quotes for ${fromToken} -> ${toToken}, amount: ${amountWei}, taker: ${taker}, retry: ${retry}`);
1944
1944
  const params = {
@@ -1946,9 +1946,9 @@ var AvnuWrapper = class _AvnuWrapper {
1946
1946
  buyTokenAddress: toToken,
1947
1947
  sellAmount: amountWei,
1948
1948
  takerAddress: taker,
1949
- // excludeSources: ['Nostra', 'Haiko(Solvers)']
1950
- excludeSources: ["Haiko(Solvers)"]
1951
- // to resolve InvalidOraclePrice error
1949
+ // excludeSources: ['Nostra', 'Haiko(Solvers)']
1950
+ excludeSources
1951
+ // excludeSources: ['Haiko(Solvers)'] // to resolve InvalidOraclePrice error
1952
1952
  };
1953
1953
  assert(fromToken != toToken, "From and to tokens are the same");
1954
1954
  const quotes = await fetchQuotes(params);
@@ -16080,67 +16080,66 @@ var EkuboCLVaultStrategies = [
16080
16080
  question: "Why might I see a negative APY?",
16081
16081
  answer: "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."
16082
16082
  }
16083
- ]
16083
+ ],
16084
+ points: [{
16085
+ multiplier: 1,
16086
+ logo: "https://endur.fi/favicon.ico",
16087
+ 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."
16088
+ }]
16089
+ },
16090
+ {
16091
+ name: "Ekubo USDC/USDT",
16092
+ description: /* @__PURE__ */ jsxs2("div", { children: [
16093
+ /* @__PURE__ */ jsx2("p", { children: _description2.replace("{{POOL_NAME}}", "USDC/USDT") }),
16094
+ /* @__PURE__ */ jsx2(
16095
+ "ul",
16096
+ {
16097
+ style: {
16098
+ marginLeft: "20px",
16099
+ listStyle: "circle",
16100
+ fontSize: "12px"
16101
+ },
16102
+ children: /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." })
16103
+ }
16104
+ )
16105
+ ] }),
16106
+ address: ContractAddr.from(
16107
+ "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16108
+ ),
16109
+ launchBlock: 1385576,
16110
+ type: "Other",
16111
+ // must be same order as poolKey token0 and token1
16112
+ depositTokens: [
16113
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
16114
+ Global.getDefaultTokens().find((t) => t.symbol === "USDT")
16115
+ ],
16116
+ protocols: [_protocol2],
16117
+ auditUrl: AUDIT_URL2,
16118
+ maxTVL: Web3Number.fromWei("0", 6),
16119
+ risk: {
16120
+ riskFactor: _riskFactorStable,
16121
+ netRisk: _riskFactorStable.reduce(
16122
+ (acc, curr) => acc + curr.value * curr.weight,
16123
+ 0
16124
+ ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16125
+ notARisks: getNoRiskTags(_riskFactorStable)
16126
+ },
16127
+ apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
16128
+ additionalInfo: {
16129
+ newBounds: {
16130
+ lower: -1,
16131
+ upper: 1
16132
+ },
16133
+ truePrice: 1,
16134
+ feeBps: 1e3,
16135
+ rebalanceConditions: {
16136
+ customShouldRebalance: async (currentPrice) => currentPrice > 0.99 && currentPrice < 1.01,
16137
+ minWaitHours: 6,
16138
+ direction: "any"
16139
+ }
16140
+ },
16141
+ faqs: [...faqs2]
16084
16142
  }
16085
- // {
16086
- // name: "Ekubo USDC/USDT",
16087
- // description: (
16088
- // <div>
16089
- // <p>{_description.replace("{{POOL_NAME}}", "USDC/USDT")}</p>
16090
- // <ul
16091
- // style={{
16092
- // marginLeft: "20px",
16093
- // listStyle: "circle",
16094
- // fontSize: "12px",
16095
- // }}
16096
- // >
16097
- // <li style={{ marginTop: "10px" }}>
16098
- // During withdrawal, you may receive either or both tokens depending
16099
- // on market conditions and prevailing prices.
16100
- // </li>
16101
- // </ul>
16102
- // </div>
16103
- // ),
16104
- // address: ContractAddr.from(
16105
- // "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
16106
- // ),
16107
- // launchBlock: 1385576,
16108
- // type: "Other",
16109
- // // must be same order as poolKey token0 and token1
16110
- // depositTokens: [
16111
- // Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
16112
- // Global.getDefaultTokens().find((t) => t.symbol === "USDT")!,
16113
- // ],
16114
- // protocols: [_protocol],
16115
- // auditUrl: AUDIT_URL,
16116
- // maxTVL: Web3Number.fromWei("0", 6),
16117
- // risk: {
16118
- // riskFactor: _riskFactorStable,
16119
- // netRisk:
16120
- // _riskFactorStable.reduce(
16121
- // (acc, curr) => acc + curr.value * curr.weight,
16122
- // 0
16123
- // ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
16124
- // notARisks: getNoRiskTags(_riskFactorStable),
16125
- // },
16126
- // apyMethodology:
16127
- // "APY based on 7-day historical performance, including fees and rewards.",
16128
- // additionalInfo: {
16129
- // newBounds: {
16130
- // lower: -1,
16131
- // upper: 1,
16132
- // },
16133
- // truePrice: 1,
16134
- // feeBps: 1000,
16135
- // rebalanceConditions: {
16136
- // customShouldRebalance: async (currentPrice: number) =>
16137
- // currentPrice > 0.99 && currentPrice < 1.01,
16138
- // minWaitHours: 6,
16139
- // direction: "any",
16140
- // },
16141
- // },
16142
- // faqs: [...faqs],
16143
- // },
16144
16143
  ];
16145
16144
 
16146
16145
  // src/notifs/telegram.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
5
  "typings": "dist/index.d.ts",
6
6
  "types": "dist/index.d.ts",
@@ -52,17 +52,16 @@
52
52
  },
53
53
  "peerDependencies": {
54
54
  "react": "19.1.0",
55
- "starknet": "^6.11.0"
55
+ "starknet": "^6.11.0",
56
+ "axios": "^1.7.2"
56
57
  },
57
58
  "dependencies": {
58
59
  "@avnu/avnu-sdk": "^3.0.2",
59
- "axios": "^1.7.2",
60
60
  "bignumber.js": "4.0.4",
61
61
  "browser-assert": "^1.2.1",
62
62
  "chalk": "^4.1.2",
63
63
  "commander": "^12.1.0",
64
64
  "ethers": "^6.13.5",
65
- "form-data": "^4.0.2",
66
65
  "inquirer": "^10.1.2",
67
66
  "node-telegram-bot-api": "^0.66.0",
68
67
  "proxy-from-env": "^1.1.0",
@@ -84,6 +84,7 @@ export interface IStrategyMetadata<T> {
84
84
  apyMethodology?: string;
85
85
  additionalInfo: T;
86
86
  faqs: FAQ[];
87
+ points?: {multiplier: number, logo: string, toolTip?: string}[];
87
88
  }
88
89
 
89
90
  export interface IInvestmentFlow {
@@ -33,7 +33,8 @@ export class AvnuWrapper {
33
33
  toToken: string,
34
34
  amountWei: string,
35
35
  taker: string,
36
- retry = 0
36
+ retry = 0,
37
+ excludeSources = ['Haiko(Solvers)']
37
38
  ): Promise<Quote> {
38
39
  const MAX_RETRY = 5;
39
40
  logger.verbose(`${AvnuWrapper.name}: getQuotes => Getting quotes for ${fromToken} -> ${toToken}, amount: ${amountWei}, taker: ${taker}, retry: ${retry}`);
@@ -42,8 +43,9 @@ export class AvnuWrapper {
42
43
  buyTokenAddress: toToken,
43
44
  sellAmount: amountWei,
44
45
  takerAddress: taker,
45
- // excludeSources: ['Nostra', 'Haiko(Solvers)']
46
- excludeSources: ['Haiko(Solvers)'] // to resolve InvalidOraclePrice error
46
+ // excludeSources: ['Nostra', 'Haiko(Solvers)']
47
+ excludeSources
48
+ // excludeSources: ['Haiko(Solvers)'] // to resolve InvalidOraclePrice error
47
49
  };
48
50
  assert(fromToken != toToken, "From and to tokens are the same");
49
51
 
@@ -59,7 +61,7 @@ export class AvnuWrapper {
59
61
  }
60
62
 
61
63
  async getSwapInfo(
62
- quote: Quote,
64
+ quote: Pick<Quote, 'quoteId' | 'buyTokenAddress' | 'buyAmount' | 'sellTokenAddress' | 'sellAmount'>,
63
65
  taker: string,
64
66
  integratorFeeBps: number,
65
67
  integratorFeeRecipient: string,
@@ -1625,64 +1625,69 @@ export const EkuboCLVaultStrategies: IStrategyMetadata<CLVaultStrategySettings>[
1625
1625
  "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.",
1626
1626
  },
1627
1627
  ],
1628
+ points: [{
1629
+ multiplier: 1,
1630
+ logo: 'https://endur.fi/favicon.ico',
1631
+ 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.",
1632
+ }]
1633
+ },
1634
+ {
1635
+ name: "Ekubo USDC/USDT",
1636
+ description: (
1637
+ <div>
1638
+ <p>{_description.replace("{{POOL_NAME}}", "USDC/USDT")}</p>
1639
+ <ul
1640
+ style={{
1641
+ marginLeft: "20px",
1642
+ listStyle: "circle",
1643
+ fontSize: "12px",
1644
+ }}
1645
+ >
1646
+ <li style={{ marginTop: "10px" }}>
1647
+ During withdrawal, you may receive either or both tokens depending
1648
+ on market conditions and prevailing prices.
1649
+ </li>
1650
+ </ul>
1651
+ </div>
1652
+ ),
1653
+ address: ContractAddr.from(
1654
+ "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
1655
+ ),
1656
+ launchBlock: 1385576,
1657
+ type: "Other",
1658
+ // must be same order as poolKey token0 and token1
1659
+ depositTokens: [
1660
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
1661
+ Global.getDefaultTokens().find((t) => t.symbol === "USDT")!,
1662
+ ],
1663
+ protocols: [_protocol],
1664
+ auditUrl: AUDIT_URL,
1665
+ maxTVL: Web3Number.fromWei("0", 6),
1666
+ risk: {
1667
+ riskFactor: _riskFactorStable,
1668
+ netRisk:
1669
+ _riskFactorStable.reduce(
1670
+ (acc, curr) => acc + curr.value * curr.weight,
1671
+ 0
1672
+ ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
1673
+ notARisks: getNoRiskTags(_riskFactorStable),
1674
+ },
1675
+ apyMethodology:
1676
+ "APY based on 7-day historical performance, including fees and rewards.",
1677
+ additionalInfo: {
1678
+ newBounds: {
1679
+ lower: -1,
1680
+ upper: 1,
1681
+ },
1682
+ truePrice: 1,
1683
+ feeBps: 1000,
1684
+ rebalanceConditions: {
1685
+ customShouldRebalance: async (currentPrice: number) =>
1686
+ currentPrice > 0.99 && currentPrice < 1.01,
1687
+ minWaitHours: 6,
1688
+ direction: "any",
1689
+ },
1690
+ },
1691
+ faqs: [...faqs],
1628
1692
  },
1629
- // {
1630
- // name: "Ekubo USDC/USDT",
1631
- // description: (
1632
- // <div>
1633
- // <p>{_description.replace("{{POOL_NAME}}", "USDC/USDT")}</p>
1634
- // <ul
1635
- // style={{
1636
- // marginLeft: "20px",
1637
- // listStyle: "circle",
1638
- // fontSize: "12px",
1639
- // }}
1640
- // >
1641
- // <li style={{ marginTop: "10px" }}>
1642
- // During withdrawal, you may receive either or both tokens depending
1643
- // on market conditions and prevailing prices.
1644
- // </li>
1645
- // </ul>
1646
- // </div>
1647
- // ),
1648
- // address: ContractAddr.from(
1649
- // "0xd647ed735f0db52f2a5502b6e06ed21dc4284a43a36af4b60d3c80fbc56c91"
1650
- // ),
1651
- // launchBlock: 1385576,
1652
- // type: "Other",
1653
- // // must be same order as poolKey token0 and token1
1654
- // depositTokens: [
1655
- // Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
1656
- // Global.getDefaultTokens().find((t) => t.symbol === "USDT")!,
1657
- // ],
1658
- // protocols: [_protocol],
1659
- // auditUrl: AUDIT_URL,
1660
- // maxTVL: Web3Number.fromWei("0", 6),
1661
- // risk: {
1662
- // riskFactor: _riskFactorStable,
1663
- // netRisk:
1664
- // _riskFactorStable.reduce(
1665
- // (acc, curr) => acc + curr.value * curr.weight,
1666
- // 0
1667
- // ) / _riskFactorStable.reduce((acc, curr) => acc + curr.weight, 0),
1668
- // notARisks: getNoRiskTags(_riskFactorStable),
1669
- // },
1670
- // apyMethodology:
1671
- // "APY based on 7-day historical performance, including fees and rewards.",
1672
- // additionalInfo: {
1673
- // newBounds: {
1674
- // lower: -1,
1675
- // upper: 1,
1676
- // },
1677
- // truePrice: 1,
1678
- // feeBps: 1000,
1679
- // rebalanceConditions: {
1680
- // customShouldRebalance: async (currentPrice: number) =>
1681
- // currentPrice > 0.99 && currentPrice < 1.01,
1682
- // minWaitHours: 6,
1683
- // direction: "any",
1684
- // },
1685
- // },
1686
- // faqs: [...faqs],
1687
- // },
1688
1693
  ];