@strkfarm/sdk 1.0.28 → 1.0.30
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/cli.js +48 -26
- package/dist/cli.mjs +45 -23
- package/dist/index.browser.global.js +9857 -326
- package/dist/index.browser.mjs +9640 -108
- package/dist/index.d.ts +65 -16
- package/dist/index.js +9654 -121
- package/dist/index.mjs +9642 -110
- package/package.json +1 -1
- package/src/data/vesu_pools.json +9019 -0
- package/src/dataTypes/_bignumber.ts +15 -7
- package/src/global.ts +13 -6
- package/src/interfaces/common.ts +3 -0
- package/src/modules/avnu.ts +78 -59
- package/src/modules/harvests.ts +111 -0
- package/src/modules/pricer-from-api.ts +9 -8
- package/src/modules/zkLend.ts +2 -1
- package/src/strategies/base-strategy.ts +3 -3
- package/src/strategies/ekubo-cl-vault.ts +477 -55
- package/src/strategies/index.ts +2 -1
- package/src/strategies/vesu-rebalance.ts +77 -14
package/dist/cli.js
CHANGED
|
@@ -29,7 +29,7 @@ var import_inquirer = __toESM(require("inquirer"));
|
|
|
29
29
|
|
|
30
30
|
// src/utils/store.ts
|
|
31
31
|
var import_fs = __toESM(require("fs"));
|
|
32
|
-
var
|
|
32
|
+
var import_starknet10 = require("starknet");
|
|
33
33
|
var crypto2 = __toESM(require("crypto"));
|
|
34
34
|
|
|
35
35
|
// src/utils/encrypt.ts
|
|
@@ -101,19 +101,19 @@ var _Web3Number = class extends import_bignumber.default {
|
|
|
101
101
|
return this.mul(10 ** this.decimals).toFixed(0);
|
|
102
102
|
}
|
|
103
103
|
multipliedBy(value) {
|
|
104
|
-
|
|
104
|
+
const _value = this.getStandardString(value);
|
|
105
105
|
return this.construct(this.mul(_value).toString(), this.decimals);
|
|
106
106
|
}
|
|
107
107
|
dividedBy(value) {
|
|
108
|
-
|
|
108
|
+
const _value = this.getStandardString(value);
|
|
109
109
|
return this.construct(this.div(_value).toString(), this.decimals);
|
|
110
110
|
}
|
|
111
111
|
plus(value) {
|
|
112
|
-
const _value =
|
|
112
|
+
const _value = this.getStandardString(value);
|
|
113
113
|
return this.construct(this.add(_value).toString(), this.decimals);
|
|
114
114
|
}
|
|
115
115
|
minus(n, base) {
|
|
116
|
-
const _value =
|
|
116
|
+
const _value = this.getStandardString(n);
|
|
117
117
|
return this.construct(super.minus(_value, base).toString(), this.decimals);
|
|
118
118
|
}
|
|
119
119
|
construct(value, decimals) {
|
|
@@ -129,11 +129,17 @@ var _Web3Number = class extends import_bignumber.default {
|
|
|
129
129
|
return this.toString();
|
|
130
130
|
}
|
|
131
131
|
maxToFixedDecimals() {
|
|
132
|
-
return Math.min(this.decimals,
|
|
132
|
+
return Math.min(this.decimals, 18);
|
|
133
|
+
}
|
|
134
|
+
getStandardString(value) {
|
|
135
|
+
if (typeof value == "string") {
|
|
136
|
+
return value;
|
|
137
|
+
}
|
|
138
|
+
return value.toFixed(this.maxToFixedDecimals());
|
|
133
139
|
}
|
|
134
140
|
};
|
|
135
|
-
import_bignumber.default.config({ DECIMAL_PLACES: 18 });
|
|
136
|
-
_Web3Number.config({ DECIMAL_PLACES: 18 });
|
|
141
|
+
import_bignumber.default.config({ DECIMAL_PLACES: 18, ROUNDING_MODE: import_bignumber.default.ROUND_DOWN });
|
|
142
|
+
_Web3Number.config({ DECIMAL_PLACES: 18, ROUNDING_MODE: import_bignumber.default.ROUND_DOWN });
|
|
137
143
|
|
|
138
144
|
// src/dataTypes/bignumber.node.ts
|
|
139
145
|
var Web3Number = class _Web3Number2 extends _Web3Number {
|
|
@@ -205,42 +211,48 @@ var defaultTokens = [{
|
|
|
205
211
|
logo: "https://assets.coingecko.com/coins/images/26433/small/starknet.png",
|
|
206
212
|
address: ContractAddr.from("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"),
|
|
207
213
|
decimals: 18,
|
|
208
|
-
coingeckId: "starknet"
|
|
214
|
+
coingeckId: "starknet",
|
|
215
|
+
displayDecimals: 2
|
|
209
216
|
}, {
|
|
210
217
|
name: "xSTRK",
|
|
211
218
|
symbol: "xSTRK",
|
|
212
219
|
logo: "https://dashboard.endur.fi/endur-fi.svg",
|
|
213
220
|
address: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
214
221
|
decimals: 18,
|
|
215
|
-
coingeckId: void 0
|
|
222
|
+
coingeckId: void 0,
|
|
223
|
+
displayDecimals: 2
|
|
216
224
|
}, {
|
|
217
225
|
name: "ETH",
|
|
218
226
|
symbol: "ETH",
|
|
219
227
|
logo: "https://opbnb.bscscan.com/token/images/ether.svg",
|
|
220
228
|
address: ContractAddr.from("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"),
|
|
221
229
|
decimals: 18,
|
|
222
|
-
coingeckId: void 0
|
|
230
|
+
coingeckId: void 0,
|
|
231
|
+
displayDecimals: 4
|
|
223
232
|
}, {
|
|
224
233
|
name: "USDC",
|
|
225
234
|
symbol: "USDC",
|
|
226
235
|
logo: "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
|
|
227
236
|
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
228
237
|
decimals: 6,
|
|
229
|
-
coingeckId: void 0
|
|
238
|
+
coingeckId: void 0,
|
|
239
|
+
displayDecimals: 2
|
|
230
240
|
}, {
|
|
231
241
|
name: "USDT",
|
|
232
242
|
symbol: "USDT",
|
|
233
243
|
logo: "https://assets.coingecko.com/coins/images/325/small/Tether.png",
|
|
234
244
|
address: ContractAddr.from("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"),
|
|
235
245
|
decimals: 6,
|
|
236
|
-
coingeckId: void 0
|
|
246
|
+
coingeckId: void 0,
|
|
247
|
+
displayDecimals: 2
|
|
237
248
|
}, {
|
|
238
249
|
name: "WBTC",
|
|
239
250
|
symbol: "WBTC",
|
|
240
251
|
logo: "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",
|
|
241
252
|
address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
|
|
242
253
|
decimals: 8,
|
|
243
|
-
coingeckId: void 0
|
|
254
|
+
coingeckId: void 0,
|
|
255
|
+
displayDecimals: 6
|
|
244
256
|
}];
|
|
245
257
|
var tokens = defaultTokens;
|
|
246
258
|
var Global = class _Global {
|
|
@@ -272,7 +284,8 @@ var Global = class _Global {
|
|
|
272
284
|
address: ContractAddr.from(token.address),
|
|
273
285
|
decimals: token.decimals,
|
|
274
286
|
logo: token.logoUri,
|
|
275
|
-
coingeckId: token.extensions.coingeckoId
|
|
287
|
+
coingeckId: token.extensions.coingeckoId,
|
|
288
|
+
displayDecimals: 2
|
|
276
289
|
});
|
|
277
290
|
});
|
|
278
291
|
console.log(tokens);
|
|
@@ -362,7 +375,8 @@ var _ZkLend = class _ZkLend extends ILending {
|
|
|
362
375
|
logo: "",
|
|
363
376
|
decimals: pool.token.decimals,
|
|
364
377
|
borrowFactor: Web3Number2.fromWei(pool.borrow_factor.value, pool.borrow_factor.decimals),
|
|
365
|
-
collareralFactor
|
|
378
|
+
collareralFactor,
|
|
379
|
+
displayDecimals: 2
|
|
366
380
|
};
|
|
367
381
|
this.tokens.push(token);
|
|
368
382
|
});
|
|
@@ -503,11 +517,14 @@ var getNoRiskTags = (risks) => {
|
|
|
503
517
|
var import_starknet6 = require("starknet");
|
|
504
518
|
|
|
505
519
|
// src/strategies/vesu-rebalance.ts
|
|
506
|
-
var
|
|
520
|
+
var import_starknet8 = require("starknet");
|
|
507
521
|
|
|
508
522
|
// src/node/headless.browser.ts
|
|
509
523
|
var import_axios5 = __toESM(require("axios"));
|
|
510
524
|
|
|
525
|
+
// src/modules/harvests.ts
|
|
526
|
+
var import_starknet7 = require("starknet");
|
|
527
|
+
|
|
511
528
|
// src/strategies/vesu-rebalance.ts
|
|
512
529
|
var _description = "Automatically diversify {{TOKEN}} holdings into different Vesu pools while reducing risk and maximizing yield. Defi spring STRK Rewards are auto-compounded as well.";
|
|
513
530
|
var _protocol = { name: "Vesu", logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png" };
|
|
@@ -604,32 +621,37 @@ var VesuRebalanceStrategies = [{
|
|
|
604
621
|
}];
|
|
605
622
|
|
|
606
623
|
// src/strategies/ekubo-cl-vault.ts
|
|
607
|
-
var
|
|
608
|
-
var _description2 = "
|
|
624
|
+
var import_starknet9 = require("starknet");
|
|
625
|
+
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.";
|
|
609
626
|
var _protocol2 = { name: "Ekubo", logo: "https://app.ekubo.org/favicon.ico" };
|
|
610
627
|
var _riskFactor2 = [
|
|
611
628
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
|
|
612
629
|
{ type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 1, weight: 75 }
|
|
613
630
|
];
|
|
631
|
+
var AUDIT_URL2 = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
614
632
|
var EkuboCLVaultStrategies = [{
|
|
615
633
|
name: "Ekubo xSTRK/STRK",
|
|
616
|
-
description: _description2,
|
|
634
|
+
description: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK"),
|
|
617
635
|
address: ContractAddr.from("0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"),
|
|
618
636
|
type: "Other",
|
|
619
|
-
|
|
637
|
+
// must be same order as poolKey token0 and token1
|
|
638
|
+
depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"), Global.getDefaultTokens().find((t) => t.symbol === "STRK")],
|
|
620
639
|
protocols: [_protocol2],
|
|
640
|
+
auditUrl: AUDIT_URL2,
|
|
621
641
|
maxTVL: Web3Number.fromWei("0", 18),
|
|
622
642
|
risk: {
|
|
623
643
|
riskFactor: _riskFactor2,
|
|
624
644
|
netRisk: _riskFactor2.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor2.reduce((acc, curr) => acc + curr.weight, 0),
|
|
625
645
|
notARisks: getNoRiskTags(_riskFactor2)
|
|
626
646
|
},
|
|
647
|
+
apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
|
|
627
648
|
additionalInfo: {
|
|
628
649
|
newBounds: {
|
|
629
650
|
lower: -1,
|
|
630
651
|
upper: 1
|
|
631
652
|
},
|
|
632
|
-
lstContract: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a")
|
|
653
|
+
lstContract: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
654
|
+
feeBps: 1e3
|
|
633
655
|
}
|
|
634
656
|
}];
|
|
635
657
|
|
|
@@ -672,7 +694,7 @@ var Store = class _Store {
|
|
|
672
694
|
logger.warn(`This not stored anywhere, please you backup this password for future use`);
|
|
673
695
|
logger.warn(`\u26A0\uFE0F=========================================\u26A0\uFE0F`);
|
|
674
696
|
}
|
|
675
|
-
getAccount(accountKey, txVersion =
|
|
697
|
+
getAccount(accountKey, txVersion = import_starknet10.constants.TRANSACTION_VERSION.V2) {
|
|
676
698
|
const accounts = this.loadAccounts();
|
|
677
699
|
logger.verbose(`nAccounts loaded for network: ${Object.keys(accounts).length}`);
|
|
678
700
|
const data = accounts[accountKey];
|
|
@@ -681,7 +703,7 @@ var Store = class _Store {
|
|
|
681
703
|
}
|
|
682
704
|
logger.verbose(`Account loaded: ${accountKey} from network: ${this.config.network}`);
|
|
683
705
|
logger.verbose(`Address: ${data.address}`);
|
|
684
|
-
const acc = new
|
|
706
|
+
const acc = new import_starknet10.Account(this.config.provider, data.address, data.pk, void 0, txVersion);
|
|
685
707
|
return acc;
|
|
686
708
|
}
|
|
687
709
|
addAccount(accountKey, address, pk) {
|
|
@@ -745,11 +767,11 @@ var Store = class _Store {
|
|
|
745
767
|
|
|
746
768
|
// src/cli.ts
|
|
747
769
|
var import_chalk = __toESM(require("chalk"));
|
|
748
|
-
var
|
|
770
|
+
var import_starknet11 = require("starknet");
|
|
749
771
|
var program = new import_commander.Command();
|
|
750
772
|
var getConfig = (network) => {
|
|
751
773
|
return {
|
|
752
|
-
provider: new
|
|
774
|
+
provider: new import_starknet11.RpcProvider({
|
|
753
775
|
nodeUrl: "https://starknet-mainnet.public.blastapi.io"
|
|
754
776
|
}),
|
|
755
777
|
network,
|
package/dist/cli.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import inquirer from "inquirer";
|
|
|
6
6
|
|
|
7
7
|
// src/utils/store.ts
|
|
8
8
|
import fs, { readFileSync, writeFileSync } from "fs";
|
|
9
|
-
import { Account, constants } from "starknet";
|
|
9
|
+
import { Account as Account3, constants } from "starknet";
|
|
10
10
|
import * as crypto2 from "crypto";
|
|
11
11
|
|
|
12
12
|
// src/utils/encrypt.ts
|
|
@@ -78,19 +78,19 @@ var _Web3Number = class extends BigNumber {
|
|
|
78
78
|
return this.mul(10 ** this.decimals).toFixed(0);
|
|
79
79
|
}
|
|
80
80
|
multipliedBy(value) {
|
|
81
|
-
|
|
81
|
+
const _value = this.getStandardString(value);
|
|
82
82
|
return this.construct(this.mul(_value).toString(), this.decimals);
|
|
83
83
|
}
|
|
84
84
|
dividedBy(value) {
|
|
85
|
-
|
|
85
|
+
const _value = this.getStandardString(value);
|
|
86
86
|
return this.construct(this.div(_value).toString(), this.decimals);
|
|
87
87
|
}
|
|
88
88
|
plus(value) {
|
|
89
|
-
const _value =
|
|
89
|
+
const _value = this.getStandardString(value);
|
|
90
90
|
return this.construct(this.add(_value).toString(), this.decimals);
|
|
91
91
|
}
|
|
92
92
|
minus(n, base) {
|
|
93
|
-
const _value =
|
|
93
|
+
const _value = this.getStandardString(n);
|
|
94
94
|
return this.construct(super.minus(_value, base).toString(), this.decimals);
|
|
95
95
|
}
|
|
96
96
|
construct(value, decimals) {
|
|
@@ -106,11 +106,17 @@ var _Web3Number = class extends BigNumber {
|
|
|
106
106
|
return this.toString();
|
|
107
107
|
}
|
|
108
108
|
maxToFixedDecimals() {
|
|
109
|
-
return Math.min(this.decimals,
|
|
109
|
+
return Math.min(this.decimals, 18);
|
|
110
|
+
}
|
|
111
|
+
getStandardString(value) {
|
|
112
|
+
if (typeof value == "string") {
|
|
113
|
+
return value;
|
|
114
|
+
}
|
|
115
|
+
return value.toFixed(this.maxToFixedDecimals());
|
|
110
116
|
}
|
|
111
117
|
};
|
|
112
|
-
BigNumber.config({ DECIMAL_PLACES: 18 });
|
|
113
|
-
_Web3Number.config({ DECIMAL_PLACES: 18 });
|
|
118
|
+
BigNumber.config({ DECIMAL_PLACES: 18, ROUNDING_MODE: BigNumber.ROUND_DOWN });
|
|
119
|
+
_Web3Number.config({ DECIMAL_PLACES: 18, ROUNDING_MODE: BigNumber.ROUND_DOWN });
|
|
114
120
|
|
|
115
121
|
// src/dataTypes/bignumber.node.ts
|
|
116
122
|
var Web3Number = class _Web3Number2 extends _Web3Number {
|
|
@@ -182,42 +188,48 @@ var defaultTokens = [{
|
|
|
182
188
|
logo: "https://assets.coingecko.com/coins/images/26433/small/starknet.png",
|
|
183
189
|
address: ContractAddr.from("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"),
|
|
184
190
|
decimals: 18,
|
|
185
|
-
coingeckId: "starknet"
|
|
191
|
+
coingeckId: "starknet",
|
|
192
|
+
displayDecimals: 2
|
|
186
193
|
}, {
|
|
187
194
|
name: "xSTRK",
|
|
188
195
|
symbol: "xSTRK",
|
|
189
196
|
logo: "https://dashboard.endur.fi/endur-fi.svg",
|
|
190
197
|
address: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
191
198
|
decimals: 18,
|
|
192
|
-
coingeckId: void 0
|
|
199
|
+
coingeckId: void 0,
|
|
200
|
+
displayDecimals: 2
|
|
193
201
|
}, {
|
|
194
202
|
name: "ETH",
|
|
195
203
|
symbol: "ETH",
|
|
196
204
|
logo: "https://opbnb.bscscan.com/token/images/ether.svg",
|
|
197
205
|
address: ContractAddr.from("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"),
|
|
198
206
|
decimals: 18,
|
|
199
|
-
coingeckId: void 0
|
|
207
|
+
coingeckId: void 0,
|
|
208
|
+
displayDecimals: 4
|
|
200
209
|
}, {
|
|
201
210
|
name: "USDC",
|
|
202
211
|
symbol: "USDC",
|
|
203
212
|
logo: "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
|
|
204
213
|
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
205
214
|
decimals: 6,
|
|
206
|
-
coingeckId: void 0
|
|
215
|
+
coingeckId: void 0,
|
|
216
|
+
displayDecimals: 2
|
|
207
217
|
}, {
|
|
208
218
|
name: "USDT",
|
|
209
219
|
symbol: "USDT",
|
|
210
220
|
logo: "https://assets.coingecko.com/coins/images/325/small/Tether.png",
|
|
211
221
|
address: ContractAddr.from("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"),
|
|
212
222
|
decimals: 6,
|
|
213
|
-
coingeckId: void 0
|
|
223
|
+
coingeckId: void 0,
|
|
224
|
+
displayDecimals: 2
|
|
214
225
|
}, {
|
|
215
226
|
name: "WBTC",
|
|
216
227
|
symbol: "WBTC",
|
|
217
228
|
logo: "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/logo.png",
|
|
218
229
|
address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
|
|
219
230
|
decimals: 8,
|
|
220
|
-
coingeckId: void 0
|
|
231
|
+
coingeckId: void 0,
|
|
232
|
+
displayDecimals: 6
|
|
221
233
|
}];
|
|
222
234
|
var tokens = defaultTokens;
|
|
223
235
|
var Global = class _Global {
|
|
@@ -249,7 +261,8 @@ var Global = class _Global {
|
|
|
249
261
|
address: ContractAddr.from(token.address),
|
|
250
262
|
decimals: token.decimals,
|
|
251
263
|
logo: token.logoUri,
|
|
252
|
-
coingeckId: token.extensions.coingeckoId
|
|
264
|
+
coingeckId: token.extensions.coingeckoId,
|
|
265
|
+
displayDecimals: 2
|
|
253
266
|
});
|
|
254
267
|
});
|
|
255
268
|
console.log(tokens);
|
|
@@ -339,7 +352,8 @@ var _ZkLend = class _ZkLend extends ILending {
|
|
|
339
352
|
logo: "",
|
|
340
353
|
decimals: pool.token.decimals,
|
|
341
354
|
borrowFactor: Web3Number2.fromWei(pool.borrow_factor.value, pool.borrow_factor.decimals),
|
|
342
|
-
collareralFactor
|
|
355
|
+
collareralFactor,
|
|
356
|
+
displayDecimals: 2
|
|
343
357
|
};
|
|
344
358
|
this.tokens.push(token);
|
|
345
359
|
});
|
|
@@ -480,11 +494,14 @@ var getNoRiskTags = (risks) => {
|
|
|
480
494
|
import { Contract as Contract3, uint256 as uint2562 } from "starknet";
|
|
481
495
|
|
|
482
496
|
// src/strategies/vesu-rebalance.ts
|
|
483
|
-
import { CairoCustomEnum, Contract as
|
|
497
|
+
import { CairoCustomEnum, Contract as Contract5, num as num3, uint256 as uint2563 } from "starknet";
|
|
484
498
|
|
|
485
499
|
// src/node/headless.browser.ts
|
|
486
500
|
import axios5 from "axios";
|
|
487
501
|
|
|
502
|
+
// src/modules/harvests.ts
|
|
503
|
+
import { Contract as Contract4, num as num2 } from "starknet";
|
|
504
|
+
|
|
488
505
|
// src/strategies/vesu-rebalance.ts
|
|
489
506
|
var _description = "Automatically diversify {{TOKEN}} holdings into different Vesu pools while reducing risk and maximizing yield. Defi spring STRK Rewards are auto-compounded as well.";
|
|
490
507
|
var _protocol = { name: "Vesu", logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png" };
|
|
@@ -581,32 +598,37 @@ var VesuRebalanceStrategies = [{
|
|
|
581
598
|
}];
|
|
582
599
|
|
|
583
600
|
// src/strategies/ekubo-cl-vault.ts
|
|
584
|
-
import { Contract as
|
|
585
|
-
var _description2 = "
|
|
601
|
+
import { Contract as Contract6, num as num4, uint256 as uint2564 } from "starknet";
|
|
602
|
+
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.";
|
|
586
603
|
var _protocol2 = { name: "Ekubo", logo: "https://app.ekubo.org/favicon.ico" };
|
|
587
604
|
var _riskFactor2 = [
|
|
588
605
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
|
|
589
606
|
{ type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 1, weight: 75 }
|
|
590
607
|
];
|
|
608
|
+
var AUDIT_URL2 = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
591
609
|
var EkuboCLVaultStrategies = [{
|
|
592
610
|
name: "Ekubo xSTRK/STRK",
|
|
593
|
-
description: _description2,
|
|
611
|
+
description: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK"),
|
|
594
612
|
address: ContractAddr.from("0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"),
|
|
595
613
|
type: "Other",
|
|
596
|
-
|
|
614
|
+
// must be same order as poolKey token0 and token1
|
|
615
|
+
depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"), Global.getDefaultTokens().find((t) => t.symbol === "STRK")],
|
|
597
616
|
protocols: [_protocol2],
|
|
617
|
+
auditUrl: AUDIT_URL2,
|
|
598
618
|
maxTVL: Web3Number.fromWei("0", 18),
|
|
599
619
|
risk: {
|
|
600
620
|
riskFactor: _riskFactor2,
|
|
601
621
|
netRisk: _riskFactor2.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor2.reduce((acc, curr) => acc + curr.weight, 0),
|
|
602
622
|
notARisks: getNoRiskTags(_riskFactor2)
|
|
603
623
|
},
|
|
624
|
+
apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
|
|
604
625
|
additionalInfo: {
|
|
605
626
|
newBounds: {
|
|
606
627
|
lower: -1,
|
|
607
628
|
upper: 1
|
|
608
629
|
},
|
|
609
|
-
lstContract: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a")
|
|
630
|
+
lstContract: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
631
|
+
feeBps: 1e3
|
|
610
632
|
}
|
|
611
633
|
}];
|
|
612
634
|
|
|
@@ -658,7 +680,7 @@ var Store = class _Store {
|
|
|
658
680
|
}
|
|
659
681
|
logger.verbose(`Account loaded: ${accountKey} from network: ${this.config.network}`);
|
|
660
682
|
logger.verbose(`Address: ${data.address}`);
|
|
661
|
-
const acc = new
|
|
683
|
+
const acc = new Account3(this.config.provider, data.address, data.pk, void 0, txVersion);
|
|
662
684
|
return acc;
|
|
663
685
|
}
|
|
664
686
|
addAccount(accountKey, address, pk) {
|