@strkfarm/sdk 1.1.61 → 1.1.63
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 +176 -158
- package/dist/index.browser.mjs +39 -21
- package/dist/index.js +43 -25
- package/dist/index.mjs +39 -21
- package/package.json +1 -1
- package/src/global.ts +10 -1
- package/src/modules/pricer.ts +1 -0
- package/src/strategies/ekubo-cl-vault.tsx +28 -14
- package/src/strategies/universal-strategy.tsx +4 -4
- package/src/strategies/vesu-rebalance.tsx +3 -3
package/dist/index.browser.mjs
CHANGED
|
@@ -171,11 +171,20 @@ var defaultTokens = [{
|
|
|
171
171
|
coingeckId: void 0,
|
|
172
172
|
priceCheckAmount: 0.1,
|
|
173
173
|
displayDecimals: 6
|
|
174
|
+
}, {
|
|
175
|
+
name: "USDC.e",
|
|
176
|
+
symbol: "USDC.e",
|
|
177
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
178
|
+
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
179
|
+
decimals: 6,
|
|
180
|
+
coingeckId: void 0,
|
|
181
|
+
displayDecimals: 2,
|
|
182
|
+
priceCheckAmount: 1e3
|
|
174
183
|
}, {
|
|
175
184
|
name: "USDC",
|
|
176
185
|
symbol: "USDC",
|
|
177
186
|
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
178
|
-
address: ContractAddr.from("
|
|
187
|
+
address: ContractAddr.from("0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb"),
|
|
179
188
|
decimals: 6,
|
|
180
189
|
coingeckId: void 0,
|
|
181
190
|
displayDecimals: 2,
|
|
@@ -393,6 +402,7 @@ var Pricer = class extends PricerBase {
|
|
|
393
402
|
/**
|
|
394
403
|
* TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
|
|
395
404
|
*/
|
|
405
|
+
// ! switch to USDC (new) later
|
|
396
406
|
this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
|
|
397
407
|
this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
|
|
398
408
|
this.refreshInterval = refreshInterval;
|
|
@@ -10438,8 +10448,8 @@ var VesuRebalanceStrategies = [
|
|
|
10438
10448
|
investmentSteps: []
|
|
10439
10449
|
},
|
|
10440
10450
|
{
|
|
10441
|
-
name: "Vesu Fusion USDC",
|
|
10442
|
-
description: _description.replace("{{TOKEN}}", "USDC"),
|
|
10451
|
+
name: "Vesu Fusion USDC.e",
|
|
10452
|
+
description: _description.replace("{{TOKEN}}", "USDC.e"),
|
|
10443
10453
|
address: ContractAddr.from(
|
|
10444
10454
|
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
10445
10455
|
),
|
|
@@ -10447,7 +10457,7 @@ var VesuRebalanceStrategies = [
|
|
|
10447
10457
|
type: "ERC4626",
|
|
10448
10458
|
auditUrl: AUDIT_URL,
|
|
10449
10459
|
depositTokens: [
|
|
10450
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
10460
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
10451
10461
|
],
|
|
10452
10462
|
protocols: [_protocol],
|
|
10453
10463
|
maxTVL: Web3Number.fromWei("0", 6),
|
|
@@ -15839,7 +15849,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
15839
15849
|
* @returns {Promise<number>} The weighted average APY across all pools
|
|
15840
15850
|
*/
|
|
15841
15851
|
async netAPY(blockIdentifier = "latest", sinceBlocks = 6e5, timeperiod = "24h") {
|
|
15842
|
-
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC";
|
|
15852
|
+
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC.e";
|
|
15843
15853
|
if (!isUSDCQouteToken) {
|
|
15844
15854
|
return this.netSharesBasedTrueAPY(blockIdentifier, sinceBlocks);
|
|
15845
15855
|
} else {
|
|
@@ -16255,6 +16265,12 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16255
16265
|
amount1: availableAmount1.minus(y),
|
|
16256
16266
|
ratio: 0
|
|
16257
16267
|
};
|
|
16268
|
+
} else if (ratio.eq(Infinity)) {
|
|
16269
|
+
return {
|
|
16270
|
+
amount0: availableAmount0,
|
|
16271
|
+
amount1: Web3Number.fromWei("0", availableAmount1.decimals),
|
|
16272
|
+
ratio: Infinity
|
|
16273
|
+
};
|
|
16258
16274
|
}
|
|
16259
16275
|
return {
|
|
16260
16276
|
amount0: availableAmount0.plus(x),
|
|
@@ -16362,6 +16378,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16362
16378
|
// Helper to determine which token to sell, which to buy, and the amounts to use
|
|
16363
16379
|
getSwapParams(expectedAmounts, poolKey, token0Bal, token1Bal) {
|
|
16364
16380
|
const tokenToSell = expectedAmounts.amount0.lessThan(token0Bal) ? poolKey.token0 : poolKey.token1;
|
|
16381
|
+
logger.verbose(`getSwapParams => tokenToSell: ${tokenToSell.address}, expectedAmounts: ${expectedAmounts.amount0.toString()}, bal0: ${token0Bal.toString()}`);
|
|
16365
16382
|
const tokenToBuy = tokenToSell == poolKey.token0 ? poolKey.token1 : poolKey.token0;
|
|
16366
16383
|
const amountToSell = tokenToSell == poolKey.token0 ? token0Bal.minus(expectedAmounts.amount0) : token1Bal.minus(expectedAmounts.amount1);
|
|
16367
16384
|
if (amountToSell.eq(0)) {
|
|
@@ -16516,6 +16533,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16516
16533
|
throw new Error(`Rebalance failed after ${MAX_SAME_ERROR_COUNT} same errors`);
|
|
16517
16534
|
}
|
|
16518
16535
|
const fromAmount = uint2564.uint256ToBN(swapInfo.token_from_amount);
|
|
16536
|
+
const fromTokenInfo = await Global.getTokenInfoFromAddr(ContractAddr.from(swapInfo.token_from_address));
|
|
16519
16537
|
logger.verbose(
|
|
16520
16538
|
`Selling ${fromAmount.toString()} of token ${swapInfo.token_from_address}`
|
|
16521
16539
|
);
|
|
@@ -16532,7 +16550,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16532
16550
|
`Rebalance attempt ${retry + 1} failed, adjusting swap amount...`
|
|
16533
16551
|
);
|
|
16534
16552
|
const newSwapInfo = { ...swapInfo };
|
|
16535
|
-
const currentAmount = Web3Number.fromWei(fromAmount.toString(),
|
|
16553
|
+
const currentAmount = Web3Number.fromWei(fromAmount.toString(), fromTokenInfo.decimals);
|
|
16536
16554
|
logger.verbose(`Current amount: ${currentAmount.toString()}, lowerLimit: ${lowerLimit.toString()}, upperLimit: ${upperLimit.toString()}`);
|
|
16537
16555
|
if (err.message.includes("invalid token0 balance") || err.message.includes("invalid token0 amount")) {
|
|
16538
16556
|
if (!isSellTokenToken0) {
|
|
@@ -17214,7 +17232,7 @@ var lstStrategies = [
|
|
|
17214
17232
|
];
|
|
17215
17233
|
var ETHUSDCRe7Strategy = {
|
|
17216
17234
|
...xSTRKSTRK,
|
|
17217
|
-
name: "Ekubo ETH/USDC",
|
|
17235
|
+
name: "Ekubo ETH/USDC.e",
|
|
17218
17236
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17219
17237
|
address: ContractAddr.from(
|
|
17220
17238
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -17223,7 +17241,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17223
17241
|
// must be same order as poolKey token0 and token1
|
|
17224
17242
|
depositTokens: [
|
|
17225
17243
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17226
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17244
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17227
17245
|
],
|
|
17228
17246
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17229
17247
|
additionalInfo: {
|
|
@@ -17235,7 +17253,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17235
17253
|
minWaitHours: 6,
|
|
17236
17254
|
direction: "any"
|
|
17237
17255
|
},
|
|
17238
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17256
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17239
17257
|
},
|
|
17240
17258
|
faqs: [
|
|
17241
17259
|
...faqs2,
|
|
@@ -17260,7 +17278,7 @@ var RE7Strategies = [
|
|
|
17260
17278
|
ETHUSDCRe7Strategy,
|
|
17261
17279
|
{
|
|
17262
17280
|
...ETHUSDCRe7Strategy,
|
|
17263
|
-
name: "Ekubo USDC/USDT",
|
|
17281
|
+
name: "Ekubo USDC.e/USDT",
|
|
17264
17282
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17265
17283
|
address: ContractAddr.from(
|
|
17266
17284
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -17268,7 +17286,7 @@ var RE7Strategies = [
|
|
|
17268
17286
|
launchBlock: 1506139,
|
|
17269
17287
|
// must be same order as poolKey token0 and token1
|
|
17270
17288
|
depositTokens: [
|
|
17271
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
17289
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
17272
17290
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
17273
17291
|
],
|
|
17274
17292
|
risk: {
|
|
@@ -17279,7 +17297,7 @@ var RE7Strategies = [
|
|
|
17279
17297
|
},
|
|
17280
17298
|
{
|
|
17281
17299
|
...ETHUSDCRe7Strategy,
|
|
17282
|
-
name: "Ekubo STRK/USDC",
|
|
17300
|
+
name: "Ekubo STRK/USDC.e",
|
|
17283
17301
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17284
17302
|
address: ContractAddr.from(
|
|
17285
17303
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -17288,7 +17306,7 @@ var RE7Strategies = [
|
|
|
17288
17306
|
// must be same order as poolKey token0 and token1
|
|
17289
17307
|
depositTokens: [
|
|
17290
17308
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
17291
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17309
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17292
17310
|
],
|
|
17293
17311
|
risk: highRisk
|
|
17294
17312
|
},
|
|
@@ -17309,7 +17327,7 @@ var RE7Strategies = [
|
|
|
17309
17327
|
},
|
|
17310
17328
|
{
|
|
17311
17329
|
...ETHUSDCRe7Strategy,
|
|
17312
|
-
name: "Ekubo WBTC/USDC",
|
|
17330
|
+
name: "Ekubo WBTC/USDC.e",
|
|
17313
17331
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17314
17332
|
address: ContractAddr.from(
|
|
17315
17333
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -17318,13 +17336,13 @@ var RE7Strategies = [
|
|
|
17318
17336
|
// must be same order as poolKey token0 and token1
|
|
17319
17337
|
depositTokens: [
|
|
17320
17338
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
17321
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17339
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17322
17340
|
],
|
|
17323
17341
|
risk: mediumRisk
|
|
17324
17342
|
},
|
|
17325
17343
|
{
|
|
17326
17344
|
...ETHUSDCRe7Strategy,
|
|
17327
|
-
name: "Ekubo tBTC/USDC",
|
|
17345
|
+
name: "Ekubo tBTC/USDC.e",
|
|
17328
17346
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17329
17347
|
address: ContractAddr.from(
|
|
17330
17348
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -17333,7 +17351,7 @@ var RE7Strategies = [
|
|
|
17333
17351
|
// must be same order as poolKey token0 and token1
|
|
17334
17352
|
depositTokens: [
|
|
17335
17353
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
17336
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17354
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17337
17355
|
],
|
|
17338
17356
|
risk: mediumRisk
|
|
17339
17357
|
},
|
|
@@ -30639,13 +30657,13 @@ var investmentSteps = [
|
|
|
30639
30657
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
30640
30658
|
var UniversalStrategies = [
|
|
30641
30659
|
{
|
|
30642
|
-
name: "USDC Evergreen",
|
|
30643
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
30660
|
+
name: "USDC.e Evergreen",
|
|
30661
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
30644
30662
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
30645
30663
|
launchBlock: 0,
|
|
30646
30664
|
type: "ERC4626",
|
|
30647
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
30648
|
-
additionalInfo: getLooperSettings("USDC", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
30665
|
+
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC.e")],
|
|
30666
|
+
additionalInfo: getLooperSettings("USDC.e", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
30649
30667
|
risk: {
|
|
30650
30668
|
riskFactor: _riskFactor3,
|
|
30651
30669
|
netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
|
package/dist/index.js
CHANGED
|
@@ -9,11 +9,11 @@ var __export = (target, all) => {
|
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
var __copyProps = (to,
|
|
13
|
-
if (
|
|
14
|
-
for (let key of __getOwnPropNames(
|
|
12
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
13
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from2))
|
|
15
15
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () =>
|
|
16
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
@@ -318,11 +318,20 @@ var defaultTokens = [{
|
|
|
318
318
|
coingeckId: void 0,
|
|
319
319
|
priceCheckAmount: 0.1,
|
|
320
320
|
displayDecimals: 6
|
|
321
|
+
}, {
|
|
322
|
+
name: "USDC.e",
|
|
323
|
+
symbol: "USDC.e",
|
|
324
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
325
|
+
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
326
|
+
decimals: 6,
|
|
327
|
+
coingeckId: void 0,
|
|
328
|
+
displayDecimals: 2,
|
|
329
|
+
priceCheckAmount: 1e3
|
|
321
330
|
}, {
|
|
322
331
|
name: "USDC",
|
|
323
332
|
symbol: "USDC",
|
|
324
333
|
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
325
|
-
address: ContractAddr.from("
|
|
334
|
+
address: ContractAddr.from("0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb"),
|
|
326
335
|
decimals: 6,
|
|
327
336
|
coingeckId: void 0,
|
|
328
337
|
displayDecimals: 2,
|
|
@@ -540,6 +549,7 @@ var Pricer = class extends PricerBase {
|
|
|
540
549
|
/**
|
|
541
550
|
* TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
|
|
542
551
|
*/
|
|
552
|
+
// ! switch to USDC (new) later
|
|
543
553
|
this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
|
|
544
554
|
this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
|
|
545
555
|
this.refreshInterval = refreshInterval;
|
|
@@ -10442,8 +10452,8 @@ var VesuRebalanceStrategies = [
|
|
|
10442
10452
|
investmentSteps: []
|
|
10443
10453
|
},
|
|
10444
10454
|
{
|
|
10445
|
-
name: "Vesu Fusion USDC",
|
|
10446
|
-
description: _description.replace("{{TOKEN}}", "USDC"),
|
|
10455
|
+
name: "Vesu Fusion USDC.e",
|
|
10456
|
+
description: _description.replace("{{TOKEN}}", "USDC.e"),
|
|
10447
10457
|
address: ContractAddr.from(
|
|
10448
10458
|
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
10449
10459
|
),
|
|
@@ -10451,7 +10461,7 @@ var VesuRebalanceStrategies = [
|
|
|
10451
10461
|
type: "ERC4626",
|
|
10452
10462
|
auditUrl: AUDIT_URL,
|
|
10453
10463
|
depositTokens: [
|
|
10454
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
10464
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
10455
10465
|
],
|
|
10456
10466
|
protocols: [_protocol],
|
|
10457
10467
|
maxTVL: Web3Number.fromWei("0", 6),
|
|
@@ -15839,7 +15849,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
15839
15849
|
* @returns {Promise<number>} The weighted average APY across all pools
|
|
15840
15850
|
*/
|
|
15841
15851
|
async netAPY(blockIdentifier = "latest", sinceBlocks = 6e5, timeperiod = "24h") {
|
|
15842
|
-
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC";
|
|
15852
|
+
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC.e";
|
|
15843
15853
|
if (!isUSDCQouteToken) {
|
|
15844
15854
|
return this.netSharesBasedTrueAPY(blockIdentifier, sinceBlocks);
|
|
15845
15855
|
} else {
|
|
@@ -16255,6 +16265,12 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16255
16265
|
amount1: availableAmount1.minus(y),
|
|
16256
16266
|
ratio: 0
|
|
16257
16267
|
};
|
|
16268
|
+
} else if (ratio.eq(Infinity)) {
|
|
16269
|
+
return {
|
|
16270
|
+
amount0: availableAmount0,
|
|
16271
|
+
amount1: Web3Number.fromWei("0", availableAmount1.decimals),
|
|
16272
|
+
ratio: Infinity
|
|
16273
|
+
};
|
|
16258
16274
|
}
|
|
16259
16275
|
return {
|
|
16260
16276
|
amount0: availableAmount0.plus(x),
|
|
@@ -16362,6 +16378,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16362
16378
|
// Helper to determine which token to sell, which to buy, and the amounts to use
|
|
16363
16379
|
getSwapParams(expectedAmounts, poolKey, token0Bal, token1Bal) {
|
|
16364
16380
|
const tokenToSell = expectedAmounts.amount0.lessThan(token0Bal) ? poolKey.token0 : poolKey.token1;
|
|
16381
|
+
logger.verbose(`getSwapParams => tokenToSell: ${tokenToSell.address}, expectedAmounts: ${expectedAmounts.amount0.toString()}, bal0: ${token0Bal.toString()}`);
|
|
16365
16382
|
const tokenToBuy = tokenToSell == poolKey.token0 ? poolKey.token1 : poolKey.token0;
|
|
16366
16383
|
const amountToSell = tokenToSell == poolKey.token0 ? token0Bal.minus(expectedAmounts.amount0) : token1Bal.minus(expectedAmounts.amount1);
|
|
16367
16384
|
if (amountToSell.eq(0)) {
|
|
@@ -16516,6 +16533,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16516
16533
|
throw new Error(`Rebalance failed after ${MAX_SAME_ERROR_COUNT} same errors`);
|
|
16517
16534
|
}
|
|
16518
16535
|
const fromAmount = import_starknet11.uint256.uint256ToBN(swapInfo.token_from_amount);
|
|
16536
|
+
const fromTokenInfo = await Global.getTokenInfoFromAddr(ContractAddr.from(swapInfo.token_from_address));
|
|
16519
16537
|
logger.verbose(
|
|
16520
16538
|
`Selling ${fromAmount.toString()} of token ${swapInfo.token_from_address}`
|
|
16521
16539
|
);
|
|
@@ -16532,7 +16550,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16532
16550
|
`Rebalance attempt ${retry + 1} failed, adjusting swap amount...`
|
|
16533
16551
|
);
|
|
16534
16552
|
const newSwapInfo = { ...swapInfo };
|
|
16535
|
-
const currentAmount = Web3Number.fromWei(fromAmount.toString(),
|
|
16553
|
+
const currentAmount = Web3Number.fromWei(fromAmount.toString(), fromTokenInfo.decimals);
|
|
16536
16554
|
logger.verbose(`Current amount: ${currentAmount.toString()}, lowerLimit: ${lowerLimit.toString()}, upperLimit: ${upperLimit.toString()}`);
|
|
16537
16555
|
if (err.message.includes("invalid token0 balance") || err.message.includes("invalid token0 amount")) {
|
|
16538
16556
|
if (!isSellTokenToken0) {
|
|
@@ -17214,7 +17232,7 @@ var lstStrategies = [
|
|
|
17214
17232
|
];
|
|
17215
17233
|
var ETHUSDCRe7Strategy = {
|
|
17216
17234
|
...xSTRKSTRK,
|
|
17217
|
-
name: "Ekubo ETH/USDC",
|
|
17235
|
+
name: "Ekubo ETH/USDC.e",
|
|
17218
17236
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17219
17237
|
address: ContractAddr.from(
|
|
17220
17238
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -17223,7 +17241,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17223
17241
|
// must be same order as poolKey token0 and token1
|
|
17224
17242
|
depositTokens: [
|
|
17225
17243
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17226
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17244
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17227
17245
|
],
|
|
17228
17246
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17229
17247
|
additionalInfo: {
|
|
@@ -17235,7 +17253,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17235
17253
|
minWaitHours: 6,
|
|
17236
17254
|
direction: "any"
|
|
17237
17255
|
},
|
|
17238
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17256
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17239
17257
|
},
|
|
17240
17258
|
faqs: [
|
|
17241
17259
|
...faqs2,
|
|
@@ -17260,7 +17278,7 @@ var RE7Strategies = [
|
|
|
17260
17278
|
ETHUSDCRe7Strategy,
|
|
17261
17279
|
{
|
|
17262
17280
|
...ETHUSDCRe7Strategy,
|
|
17263
|
-
name: "Ekubo USDC/USDT",
|
|
17281
|
+
name: "Ekubo USDC.e/USDT",
|
|
17264
17282
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17265
17283
|
address: ContractAddr.from(
|
|
17266
17284
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -17268,7 +17286,7 @@ var RE7Strategies = [
|
|
|
17268
17286
|
launchBlock: 1506139,
|
|
17269
17287
|
// must be same order as poolKey token0 and token1
|
|
17270
17288
|
depositTokens: [
|
|
17271
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
17289
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
17272
17290
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
17273
17291
|
],
|
|
17274
17292
|
risk: {
|
|
@@ -17279,7 +17297,7 @@ var RE7Strategies = [
|
|
|
17279
17297
|
},
|
|
17280
17298
|
{
|
|
17281
17299
|
...ETHUSDCRe7Strategy,
|
|
17282
|
-
name: "Ekubo STRK/USDC",
|
|
17300
|
+
name: "Ekubo STRK/USDC.e",
|
|
17283
17301
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17284
17302
|
address: ContractAddr.from(
|
|
17285
17303
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -17288,7 +17306,7 @@ var RE7Strategies = [
|
|
|
17288
17306
|
// must be same order as poolKey token0 and token1
|
|
17289
17307
|
depositTokens: [
|
|
17290
17308
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
17291
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17309
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17292
17310
|
],
|
|
17293
17311
|
risk: highRisk
|
|
17294
17312
|
},
|
|
@@ -17309,7 +17327,7 @@ var RE7Strategies = [
|
|
|
17309
17327
|
},
|
|
17310
17328
|
{
|
|
17311
17329
|
...ETHUSDCRe7Strategy,
|
|
17312
|
-
name: "Ekubo WBTC/USDC",
|
|
17330
|
+
name: "Ekubo WBTC/USDC.e",
|
|
17313
17331
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17314
17332
|
address: ContractAddr.from(
|
|
17315
17333
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -17318,13 +17336,13 @@ var RE7Strategies = [
|
|
|
17318
17336
|
// must be same order as poolKey token0 and token1
|
|
17319
17337
|
depositTokens: [
|
|
17320
17338
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
17321
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17339
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17322
17340
|
],
|
|
17323
17341
|
risk: mediumRisk
|
|
17324
17342
|
},
|
|
17325
17343
|
{
|
|
17326
17344
|
...ETHUSDCRe7Strategy,
|
|
17327
|
-
name: "Ekubo tBTC/USDC",
|
|
17345
|
+
name: "Ekubo tBTC/USDC.e",
|
|
17328
17346
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17329
17347
|
address: ContractAddr.from(
|
|
17330
17348
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -17333,7 +17351,7 @@ var RE7Strategies = [
|
|
|
17333
17351
|
// must be same order as poolKey token0 and token1
|
|
17334
17352
|
depositTokens: [
|
|
17335
17353
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
17336
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17354
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17337
17355
|
],
|
|
17338
17356
|
risk: mediumRisk
|
|
17339
17357
|
},
|
|
@@ -30639,13 +30657,13 @@ var investmentSteps = [
|
|
|
30639
30657
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
30640
30658
|
var UniversalStrategies = [
|
|
30641
30659
|
{
|
|
30642
|
-
name: "USDC Evergreen",
|
|
30643
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
30660
|
+
name: "USDC.e Evergreen",
|
|
30661
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
30644
30662
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
30645
30663
|
launchBlock: 0,
|
|
30646
30664
|
type: "ERC4626",
|
|
30647
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
30648
|
-
additionalInfo: getLooperSettings("USDC", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
30665
|
+
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC.e")],
|
|
30666
|
+
additionalInfo: getLooperSettings("USDC.e", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
30649
30667
|
risk: {
|
|
30650
30668
|
riskFactor: _riskFactor3,
|
|
30651
30669
|
netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
|
package/dist/index.mjs
CHANGED
|
@@ -212,11 +212,20 @@ var defaultTokens = [{
|
|
|
212
212
|
coingeckId: void 0,
|
|
213
213
|
priceCheckAmount: 0.1,
|
|
214
214
|
displayDecimals: 6
|
|
215
|
+
}, {
|
|
216
|
+
name: "USDC.e",
|
|
217
|
+
symbol: "USDC.e",
|
|
218
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
219
|
+
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
220
|
+
decimals: 6,
|
|
221
|
+
coingeckId: void 0,
|
|
222
|
+
displayDecimals: 2,
|
|
223
|
+
priceCheckAmount: 1e3
|
|
215
224
|
}, {
|
|
216
225
|
name: "USDC",
|
|
217
226
|
symbol: "USDC",
|
|
218
227
|
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
219
|
-
address: ContractAddr.from("
|
|
228
|
+
address: ContractAddr.from("0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb"),
|
|
220
229
|
decimals: 6,
|
|
221
230
|
coingeckId: void 0,
|
|
222
231
|
displayDecimals: 2,
|
|
@@ -434,6 +443,7 @@ var Pricer = class extends PricerBase {
|
|
|
434
443
|
/**
|
|
435
444
|
* TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
|
|
436
445
|
*/
|
|
446
|
+
// ! switch to USDC (new) later
|
|
437
447
|
this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
|
|
438
448
|
this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
|
|
439
449
|
this.refreshInterval = refreshInterval;
|
|
@@ -10336,8 +10346,8 @@ var VesuRebalanceStrategies = [
|
|
|
10336
10346
|
investmentSteps: []
|
|
10337
10347
|
},
|
|
10338
10348
|
{
|
|
10339
|
-
name: "Vesu Fusion USDC",
|
|
10340
|
-
description: _description.replace("{{TOKEN}}", "USDC"),
|
|
10349
|
+
name: "Vesu Fusion USDC.e",
|
|
10350
|
+
description: _description.replace("{{TOKEN}}", "USDC.e"),
|
|
10341
10351
|
address: ContractAddr.from(
|
|
10342
10352
|
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
10343
10353
|
),
|
|
@@ -10345,7 +10355,7 @@ var VesuRebalanceStrategies = [
|
|
|
10345
10355
|
type: "ERC4626",
|
|
10346
10356
|
auditUrl: AUDIT_URL,
|
|
10347
10357
|
depositTokens: [
|
|
10348
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
10358
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
10349
10359
|
],
|
|
10350
10360
|
protocols: [_protocol],
|
|
10351
10361
|
maxTVL: Web3Number.fromWei("0", 6),
|
|
@@ -15737,7 +15747,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
15737
15747
|
* @returns {Promise<number>} The weighted average APY across all pools
|
|
15738
15748
|
*/
|
|
15739
15749
|
async netAPY(blockIdentifier = "latest", sinceBlocks = 6e5, timeperiod = "24h") {
|
|
15740
|
-
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC";
|
|
15750
|
+
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC.e";
|
|
15741
15751
|
if (!isUSDCQouteToken) {
|
|
15742
15752
|
return this.netSharesBasedTrueAPY(blockIdentifier, sinceBlocks);
|
|
15743
15753
|
} else {
|
|
@@ -16153,6 +16163,12 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16153
16163
|
amount1: availableAmount1.minus(y),
|
|
16154
16164
|
ratio: 0
|
|
16155
16165
|
};
|
|
16166
|
+
} else if (ratio.eq(Infinity)) {
|
|
16167
|
+
return {
|
|
16168
|
+
amount0: availableAmount0,
|
|
16169
|
+
amount1: Web3Number.fromWei("0", availableAmount1.decimals),
|
|
16170
|
+
ratio: Infinity
|
|
16171
|
+
};
|
|
16156
16172
|
}
|
|
16157
16173
|
return {
|
|
16158
16174
|
amount0: availableAmount0.plus(x),
|
|
@@ -16260,6 +16276,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16260
16276
|
// Helper to determine which token to sell, which to buy, and the amounts to use
|
|
16261
16277
|
getSwapParams(expectedAmounts, poolKey, token0Bal, token1Bal) {
|
|
16262
16278
|
const tokenToSell = expectedAmounts.amount0.lessThan(token0Bal) ? poolKey.token0 : poolKey.token1;
|
|
16279
|
+
logger.verbose(`getSwapParams => tokenToSell: ${tokenToSell.address}, expectedAmounts: ${expectedAmounts.amount0.toString()}, bal0: ${token0Bal.toString()}`);
|
|
16263
16280
|
const tokenToBuy = tokenToSell == poolKey.token0 ? poolKey.token1 : poolKey.token0;
|
|
16264
16281
|
const amountToSell = tokenToSell == poolKey.token0 ? token0Bal.minus(expectedAmounts.amount0) : token1Bal.minus(expectedAmounts.amount1);
|
|
16265
16282
|
if (amountToSell.eq(0)) {
|
|
@@ -16414,6 +16431,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16414
16431
|
throw new Error(`Rebalance failed after ${MAX_SAME_ERROR_COUNT} same errors`);
|
|
16415
16432
|
}
|
|
16416
16433
|
const fromAmount = uint2564.uint256ToBN(swapInfo.token_from_amount);
|
|
16434
|
+
const fromTokenInfo = await Global.getTokenInfoFromAddr(ContractAddr.from(swapInfo.token_from_address));
|
|
16417
16435
|
logger.verbose(
|
|
16418
16436
|
`Selling ${fromAmount.toString()} of token ${swapInfo.token_from_address}`
|
|
16419
16437
|
);
|
|
@@ -16430,7 +16448,7 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
16430
16448
|
`Rebalance attempt ${retry + 1} failed, adjusting swap amount...`
|
|
16431
16449
|
);
|
|
16432
16450
|
const newSwapInfo = { ...swapInfo };
|
|
16433
|
-
const currentAmount = Web3Number.fromWei(fromAmount.toString(),
|
|
16451
|
+
const currentAmount = Web3Number.fromWei(fromAmount.toString(), fromTokenInfo.decimals);
|
|
16434
16452
|
logger.verbose(`Current amount: ${currentAmount.toString()}, lowerLimit: ${lowerLimit.toString()}, upperLimit: ${upperLimit.toString()}`);
|
|
16435
16453
|
if (err.message.includes("invalid token0 balance") || err.message.includes("invalid token0 amount")) {
|
|
16436
16454
|
if (!isSellTokenToken0) {
|
|
@@ -17112,7 +17130,7 @@ var lstStrategies = [
|
|
|
17112
17130
|
];
|
|
17113
17131
|
var ETHUSDCRe7Strategy = {
|
|
17114
17132
|
...xSTRKSTRK,
|
|
17115
|
-
name: "Ekubo ETH/USDC",
|
|
17133
|
+
name: "Ekubo ETH/USDC.e",
|
|
17116
17134
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17117
17135
|
address: ContractAddr.from(
|
|
17118
17136
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -17121,7 +17139,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17121
17139
|
// must be same order as poolKey token0 and token1
|
|
17122
17140
|
depositTokens: [
|
|
17123
17141
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17124
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17142
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17125
17143
|
],
|
|
17126
17144
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17127
17145
|
additionalInfo: {
|
|
@@ -17133,7 +17151,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17133
17151
|
minWaitHours: 6,
|
|
17134
17152
|
direction: "any"
|
|
17135
17153
|
},
|
|
17136
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17154
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17137
17155
|
},
|
|
17138
17156
|
faqs: [
|
|
17139
17157
|
...faqs2,
|
|
@@ -17158,7 +17176,7 @@ var RE7Strategies = [
|
|
|
17158
17176
|
ETHUSDCRe7Strategy,
|
|
17159
17177
|
{
|
|
17160
17178
|
...ETHUSDCRe7Strategy,
|
|
17161
|
-
name: "Ekubo USDC/USDT",
|
|
17179
|
+
name: "Ekubo USDC.e/USDT",
|
|
17162
17180
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17163
17181
|
address: ContractAddr.from(
|
|
17164
17182
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -17166,7 +17184,7 @@ var RE7Strategies = [
|
|
|
17166
17184
|
launchBlock: 1506139,
|
|
17167
17185
|
// must be same order as poolKey token0 and token1
|
|
17168
17186
|
depositTokens: [
|
|
17169
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
17187
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
17170
17188
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
17171
17189
|
],
|
|
17172
17190
|
risk: {
|
|
@@ -17177,7 +17195,7 @@ var RE7Strategies = [
|
|
|
17177
17195
|
},
|
|
17178
17196
|
{
|
|
17179
17197
|
...ETHUSDCRe7Strategy,
|
|
17180
|
-
name: "Ekubo STRK/USDC",
|
|
17198
|
+
name: "Ekubo STRK/USDC.e",
|
|
17181
17199
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17182
17200
|
address: ContractAddr.from(
|
|
17183
17201
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -17186,7 +17204,7 @@ var RE7Strategies = [
|
|
|
17186
17204
|
// must be same order as poolKey token0 and token1
|
|
17187
17205
|
depositTokens: [
|
|
17188
17206
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
17189
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17207
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17190
17208
|
],
|
|
17191
17209
|
risk: highRisk
|
|
17192
17210
|
},
|
|
@@ -17207,7 +17225,7 @@ var RE7Strategies = [
|
|
|
17207
17225
|
},
|
|
17208
17226
|
{
|
|
17209
17227
|
...ETHUSDCRe7Strategy,
|
|
17210
|
-
name: "Ekubo WBTC/USDC",
|
|
17228
|
+
name: "Ekubo WBTC/USDC.e",
|
|
17211
17229
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17212
17230
|
address: ContractAddr.from(
|
|
17213
17231
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -17216,13 +17234,13 @@ var RE7Strategies = [
|
|
|
17216
17234
|
// must be same order as poolKey token0 and token1
|
|
17217
17235
|
depositTokens: [
|
|
17218
17236
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
17219
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17237
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17220
17238
|
],
|
|
17221
17239
|
risk: mediumRisk
|
|
17222
17240
|
},
|
|
17223
17241
|
{
|
|
17224
17242
|
...ETHUSDCRe7Strategy,
|
|
17225
|
-
name: "Ekubo tBTC/USDC",
|
|
17243
|
+
name: "Ekubo tBTC/USDC.e",
|
|
17226
17244
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17227
17245
|
address: ContractAddr.from(
|
|
17228
17246
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -17231,7 +17249,7 @@ var RE7Strategies = [
|
|
|
17231
17249
|
// must be same order as poolKey token0 and token1
|
|
17232
17250
|
depositTokens: [
|
|
17233
17251
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
17234
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17252
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17235
17253
|
],
|
|
17236
17254
|
risk: mediumRisk
|
|
17237
17255
|
},
|
|
@@ -30537,13 +30555,13 @@ var investmentSteps = [
|
|
|
30537
30555
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
30538
30556
|
var UniversalStrategies = [
|
|
30539
30557
|
{
|
|
30540
|
-
name: "USDC Evergreen",
|
|
30541
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
30558
|
+
name: "USDC.e Evergreen",
|
|
30559
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
30542
30560
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
30543
30561
|
launchBlock: 0,
|
|
30544
30562
|
type: "ERC4626",
|
|
30545
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
30546
|
-
additionalInfo: getLooperSettings("USDC", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
30563
|
+
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC.e")],
|
|
30564
|
+
additionalInfo: getLooperSettings("USDC.e", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
30547
30565
|
risk: {
|
|
30548
30566
|
riskFactor: _riskFactor3,
|
|
30549
30567
|
netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
|
package/package.json
CHANGED
package/src/global.ts
CHANGED
|
@@ -41,11 +41,20 @@ const defaultTokens: TokenInfo[] = [{
|
|
|
41
41
|
coingeckId: undefined,
|
|
42
42
|
priceCheckAmount: 0.1,
|
|
43
43
|
displayDecimals: 6,
|
|
44
|
+
}, {
|
|
45
|
+
name: 'USDC.e',
|
|
46
|
+
symbol: 'USDC.e',
|
|
47
|
+
logo: 'https://assets.troves.fi/integrations/tokens/usdc.svg',
|
|
48
|
+
address: ContractAddr.from('0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'),
|
|
49
|
+
decimals: 6,
|
|
50
|
+
coingeckId: undefined,
|
|
51
|
+
displayDecimals: 2,
|
|
52
|
+
priceCheckAmount: 1000,
|
|
44
53
|
}, {
|
|
45
54
|
name: 'USDC',
|
|
46
55
|
symbol: 'USDC',
|
|
47
56
|
logo: 'https://assets.troves.fi/integrations/tokens/usdc.svg',
|
|
48
|
-
address: ContractAddr.from('
|
|
57
|
+
address: ContractAddr.from('0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb'),
|
|
49
58
|
decimals: 6,
|
|
50
59
|
coingeckId: undefined,
|
|
51
60
|
displayDecimals: 2,
|