@strkfarm/sdk 1.1.62 → 1.1.64
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 +31 -21
- package/dist/index.browser.mjs +31 -21
- package/dist/index.js +31 -21
- package/dist/index.mjs +31 -21
- package/package.json +1 -1
- package/src/global.ts +10 -1
- package/src/modules/pricer.ts +2 -1
- package/src/strategies/ekubo-cl-vault.tsx +13 -12
- package/src/strategies/universal-strategy.tsx +4 -4
- package/src/strategies/vesu-rebalance.tsx +3 -3
|
@@ -49091,11 +49091,20 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
49091
49091
|
coingeckId: void 0,
|
|
49092
49092
|
priceCheckAmount: 0.1,
|
|
49093
49093
|
displayDecimals: 6
|
|
49094
|
+
}, {
|
|
49095
|
+
name: "USDC.e",
|
|
49096
|
+
symbol: "USDC.e",
|
|
49097
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
49098
|
+
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
49099
|
+
decimals: 6,
|
|
49100
|
+
coingeckId: void 0,
|
|
49101
|
+
displayDecimals: 2,
|
|
49102
|
+
priceCheckAmount: 1e3
|
|
49094
49103
|
}, {
|
|
49095
49104
|
name: "USDC",
|
|
49096
49105
|
symbol: "USDC",
|
|
49097
49106
|
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
49098
|
-
address: ContractAddr.from("
|
|
49107
|
+
address: ContractAddr.from("0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb"),
|
|
49099
49108
|
decimals: 6,
|
|
49100
49109
|
coingeckId: void 0,
|
|
49101
49110
|
displayDecimals: 2,
|
|
@@ -49313,6 +49322,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
49313
49322
|
/**
|
|
49314
49323
|
* TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
|
|
49315
49324
|
*/
|
|
49325
|
+
// ! switch to USDC (new) later
|
|
49316
49326
|
this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
|
|
49317
49327
|
this.EKUBO_API = "https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8";
|
|
49318
49328
|
this.refreshInterval = refreshInterval;
|
|
@@ -49370,7 +49380,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
49370
49380
|
let retry = 0;
|
|
49371
49381
|
while (retry < MAX_RETRIES) {
|
|
49372
49382
|
try {
|
|
49373
|
-
if (token.symbol === "USDT") {
|
|
49383
|
+
if (token.symbol === "USDT" || token.symbol === "USDC") {
|
|
49374
49384
|
this.prices[token.symbol] = {
|
|
49375
49385
|
price: 1,
|
|
49376
49386
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -62038,8 +62048,8 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
62038
62048
|
investmentSteps: []
|
|
62039
62049
|
},
|
|
62040
62050
|
{
|
|
62041
|
-
name: "Vesu Fusion USDC",
|
|
62042
|
-
description: _description.replace("{{TOKEN}}", "USDC"),
|
|
62051
|
+
name: "Vesu Fusion USDC.e",
|
|
62052
|
+
description: _description.replace("{{TOKEN}}", "USDC.e"),
|
|
62043
62053
|
address: ContractAddr.from(
|
|
62044
62054
|
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
62045
62055
|
),
|
|
@@ -62047,7 +62057,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
62047
62057
|
type: "ERC4626",
|
|
62048
62058
|
auditUrl: AUDIT_URL,
|
|
62049
62059
|
depositTokens: [
|
|
62050
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
62060
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
62051
62061
|
],
|
|
62052
62062
|
protocols: [_protocol],
|
|
62053
62063
|
maxTVL: Web3Number.fromWei("0", 6),
|
|
@@ -79762,7 +79772,7 @@ spurious results.`);
|
|
|
79762
79772
|
* @returns {Promise<number>} The weighted average APY across all pools
|
|
79763
79773
|
*/
|
|
79764
79774
|
async netAPY(blockIdentifier = "latest", sinceBlocks = 6e5, timeperiod = "24h") {
|
|
79765
|
-
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC";
|
|
79775
|
+
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC.e";
|
|
79766
79776
|
if (!isUSDCQouteToken) {
|
|
79767
79777
|
return this.netSharesBasedTrueAPY(blockIdentifier, sinceBlocks);
|
|
79768
79778
|
} else {
|
|
@@ -81145,7 +81155,7 @@ spurious results.`);
|
|
|
81145
81155
|
];
|
|
81146
81156
|
var ETHUSDCRe7Strategy = {
|
|
81147
81157
|
...xSTRKSTRK,
|
|
81148
|
-
name: "Ekubo ETH/USDC",
|
|
81158
|
+
name: "Ekubo ETH/USDC.e",
|
|
81149
81159
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
81150
81160
|
address: ContractAddr.from(
|
|
81151
81161
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -81154,7 +81164,7 @@ spurious results.`);
|
|
|
81154
81164
|
// must be same order as poolKey token0 and token1
|
|
81155
81165
|
depositTokens: [
|
|
81156
81166
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
81157
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
81167
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
81158
81168
|
],
|
|
81159
81169
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
81160
81170
|
additionalInfo: {
|
|
@@ -81166,7 +81176,7 @@ spurious results.`);
|
|
|
81166
81176
|
minWaitHours: 6,
|
|
81167
81177
|
direction: "any"
|
|
81168
81178
|
},
|
|
81169
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
81179
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
81170
81180
|
},
|
|
81171
81181
|
faqs: [
|
|
81172
81182
|
...faqs2,
|
|
@@ -81191,7 +81201,7 @@ spurious results.`);
|
|
|
81191
81201
|
ETHUSDCRe7Strategy,
|
|
81192
81202
|
{
|
|
81193
81203
|
...ETHUSDCRe7Strategy,
|
|
81194
|
-
name: "Ekubo USDC/USDT",
|
|
81204
|
+
name: "Ekubo USDC.e/USDT",
|
|
81195
81205
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
81196
81206
|
address: ContractAddr.from(
|
|
81197
81207
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -81199,7 +81209,7 @@ spurious results.`);
|
|
|
81199
81209
|
launchBlock: 1506139,
|
|
81200
81210
|
// must be same order as poolKey token0 and token1
|
|
81201
81211
|
depositTokens: [
|
|
81202
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
81212
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
81203
81213
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
81204
81214
|
],
|
|
81205
81215
|
risk: {
|
|
@@ -81210,7 +81220,7 @@ spurious results.`);
|
|
|
81210
81220
|
},
|
|
81211
81221
|
{
|
|
81212
81222
|
...ETHUSDCRe7Strategy,
|
|
81213
|
-
name: "Ekubo STRK/USDC",
|
|
81223
|
+
name: "Ekubo STRK/USDC.e",
|
|
81214
81224
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
81215
81225
|
address: ContractAddr.from(
|
|
81216
81226
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -81219,7 +81229,7 @@ spurious results.`);
|
|
|
81219
81229
|
// must be same order as poolKey token0 and token1
|
|
81220
81230
|
depositTokens: [
|
|
81221
81231
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
81222
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
81232
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
81223
81233
|
],
|
|
81224
81234
|
risk: highRisk
|
|
81225
81235
|
},
|
|
@@ -81240,7 +81250,7 @@ spurious results.`);
|
|
|
81240
81250
|
},
|
|
81241
81251
|
{
|
|
81242
81252
|
...ETHUSDCRe7Strategy,
|
|
81243
|
-
name: "Ekubo WBTC/USDC",
|
|
81253
|
+
name: "Ekubo WBTC/USDC.e",
|
|
81244
81254
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
81245
81255
|
address: ContractAddr.from(
|
|
81246
81256
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -81249,13 +81259,13 @@ spurious results.`);
|
|
|
81249
81259
|
// must be same order as poolKey token0 and token1
|
|
81250
81260
|
depositTokens: [
|
|
81251
81261
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
81252
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
81262
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
81253
81263
|
],
|
|
81254
81264
|
risk: mediumRisk
|
|
81255
81265
|
},
|
|
81256
81266
|
{
|
|
81257
81267
|
...ETHUSDCRe7Strategy,
|
|
81258
|
-
name: "Ekubo tBTC/USDC",
|
|
81268
|
+
name: "Ekubo tBTC/USDC.e",
|
|
81259
81269
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
81260
81270
|
address: ContractAddr.from(
|
|
81261
81271
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -81264,7 +81274,7 @@ spurious results.`);
|
|
|
81264
81274
|
// must be same order as poolKey token0 and token1
|
|
81265
81275
|
depositTokens: [
|
|
81266
81276
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
81267
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
81277
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
81268
81278
|
],
|
|
81269
81279
|
risk: mediumRisk
|
|
81270
81280
|
},
|
|
@@ -94557,13 +94567,13 @@ spurious results.`);
|
|
|
94557
94567
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
94558
94568
|
var UniversalStrategies = [
|
|
94559
94569
|
{
|
|
94560
|
-
name: "USDC Evergreen",
|
|
94561
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
94570
|
+
name: "USDC.e Evergreen",
|
|
94571
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
94562
94572
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
94563
94573
|
launchBlock: 0,
|
|
94564
94574
|
type: "ERC4626",
|
|
94565
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
94566
|
-
additionalInfo: getLooperSettings("USDC", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
94575
|
+
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC.e")],
|
|
94576
|
+
additionalInfo: getLooperSettings("USDC.e", "ETH", usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
94567
94577
|
risk: {
|
|
94568
94578
|
riskFactor: _riskFactor3,
|
|
94569
94579
|
netRisk: _riskFactor3.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor3.reduce((acc, curr) => acc + curr.weight, 0),
|
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;
|
|
@@ -450,7 +460,7 @@ var Pricer = class extends PricerBase {
|
|
|
450
460
|
let retry = 0;
|
|
451
461
|
while (retry < MAX_RETRIES) {
|
|
452
462
|
try {
|
|
453
|
-
if (token.symbol === "USDT") {
|
|
463
|
+
if (token.symbol === "USDT" || token.symbol === "USDC") {
|
|
454
464
|
this.prices[token.symbol] = {
|
|
455
465
|
price: 1,
|
|
456
466
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -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 {
|
|
@@ -17222,7 +17232,7 @@ var lstStrategies = [
|
|
|
17222
17232
|
];
|
|
17223
17233
|
var ETHUSDCRe7Strategy = {
|
|
17224
17234
|
...xSTRKSTRK,
|
|
17225
|
-
name: "Ekubo ETH/USDC",
|
|
17235
|
+
name: "Ekubo ETH/USDC.e",
|
|
17226
17236
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17227
17237
|
address: ContractAddr.from(
|
|
17228
17238
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -17231,7 +17241,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17231
17241
|
// must be same order as poolKey token0 and token1
|
|
17232
17242
|
depositTokens: [
|
|
17233
17243
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17234
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17244
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17235
17245
|
],
|
|
17236
17246
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17237
17247
|
additionalInfo: {
|
|
@@ -17243,7 +17253,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17243
17253
|
minWaitHours: 6,
|
|
17244
17254
|
direction: "any"
|
|
17245
17255
|
},
|
|
17246
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17256
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17247
17257
|
},
|
|
17248
17258
|
faqs: [
|
|
17249
17259
|
...faqs2,
|
|
@@ -17268,7 +17278,7 @@ var RE7Strategies = [
|
|
|
17268
17278
|
ETHUSDCRe7Strategy,
|
|
17269
17279
|
{
|
|
17270
17280
|
...ETHUSDCRe7Strategy,
|
|
17271
|
-
name: "Ekubo USDC/USDT",
|
|
17281
|
+
name: "Ekubo USDC.e/USDT",
|
|
17272
17282
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17273
17283
|
address: ContractAddr.from(
|
|
17274
17284
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -17276,7 +17286,7 @@ var RE7Strategies = [
|
|
|
17276
17286
|
launchBlock: 1506139,
|
|
17277
17287
|
// must be same order as poolKey token0 and token1
|
|
17278
17288
|
depositTokens: [
|
|
17279
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
17289
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
17280
17290
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
17281
17291
|
],
|
|
17282
17292
|
risk: {
|
|
@@ -17287,7 +17297,7 @@ var RE7Strategies = [
|
|
|
17287
17297
|
},
|
|
17288
17298
|
{
|
|
17289
17299
|
...ETHUSDCRe7Strategy,
|
|
17290
|
-
name: "Ekubo STRK/USDC",
|
|
17300
|
+
name: "Ekubo STRK/USDC.e",
|
|
17291
17301
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17292
17302
|
address: ContractAddr.from(
|
|
17293
17303
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -17296,7 +17306,7 @@ var RE7Strategies = [
|
|
|
17296
17306
|
// must be same order as poolKey token0 and token1
|
|
17297
17307
|
depositTokens: [
|
|
17298
17308
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
17299
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17309
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17300
17310
|
],
|
|
17301
17311
|
risk: highRisk
|
|
17302
17312
|
},
|
|
@@ -17317,7 +17327,7 @@ var RE7Strategies = [
|
|
|
17317
17327
|
},
|
|
17318
17328
|
{
|
|
17319
17329
|
...ETHUSDCRe7Strategy,
|
|
17320
|
-
name: "Ekubo WBTC/USDC",
|
|
17330
|
+
name: "Ekubo WBTC/USDC.e",
|
|
17321
17331
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17322
17332
|
address: ContractAddr.from(
|
|
17323
17333
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -17326,13 +17336,13 @@ var RE7Strategies = [
|
|
|
17326
17336
|
// must be same order as poolKey token0 and token1
|
|
17327
17337
|
depositTokens: [
|
|
17328
17338
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
17329
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17339
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17330
17340
|
],
|
|
17331
17341
|
risk: mediumRisk
|
|
17332
17342
|
},
|
|
17333
17343
|
{
|
|
17334
17344
|
...ETHUSDCRe7Strategy,
|
|
17335
|
-
name: "Ekubo tBTC/USDC",
|
|
17345
|
+
name: "Ekubo tBTC/USDC.e",
|
|
17336
17346
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17337
17347
|
address: ContractAddr.from(
|
|
17338
17348
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -17341,7 +17351,7 @@ var RE7Strategies = [
|
|
|
17341
17351
|
// must be same order as poolKey token0 and token1
|
|
17342
17352
|
depositTokens: [
|
|
17343
17353
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
17344
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17354
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17345
17355
|
],
|
|
17346
17356
|
risk: mediumRisk
|
|
17347
17357
|
},
|
|
@@ -30647,13 +30657,13 @@ var investmentSteps = [
|
|
|
30647
30657
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
30648
30658
|
var UniversalStrategies = [
|
|
30649
30659
|
{
|
|
30650
|
-
name: "USDC Evergreen",
|
|
30651
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
30660
|
+
name: "USDC.e Evergreen",
|
|
30661
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
30652
30662
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
30653
30663
|
launchBlock: 0,
|
|
30654
30664
|
type: "ERC4626",
|
|
30655
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
30656
|
-
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),
|
|
30657
30667
|
risk: {
|
|
30658
30668
|
riskFactor: _riskFactor3,
|
|
30659
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
|
@@ -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;
|
|
@@ -597,7 +607,7 @@ var Pricer = class extends PricerBase {
|
|
|
597
607
|
let retry = 0;
|
|
598
608
|
while (retry < MAX_RETRIES) {
|
|
599
609
|
try {
|
|
600
|
-
if (token.symbol === "USDT") {
|
|
610
|
+
if (token.symbol === "USDT" || token.symbol === "USDC") {
|
|
601
611
|
this.prices[token.symbol] = {
|
|
602
612
|
price: 1,
|
|
603
613
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -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 {
|
|
@@ -17222,7 +17232,7 @@ var lstStrategies = [
|
|
|
17222
17232
|
];
|
|
17223
17233
|
var ETHUSDCRe7Strategy = {
|
|
17224
17234
|
...xSTRKSTRK,
|
|
17225
|
-
name: "Ekubo ETH/USDC",
|
|
17235
|
+
name: "Ekubo ETH/USDC.e",
|
|
17226
17236
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17227
17237
|
address: ContractAddr.from(
|
|
17228
17238
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -17231,7 +17241,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17231
17241
|
// must be same order as poolKey token0 and token1
|
|
17232
17242
|
depositTokens: [
|
|
17233
17243
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17234
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17244
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17235
17245
|
],
|
|
17236
17246
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17237
17247
|
additionalInfo: {
|
|
@@ -17243,7 +17253,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17243
17253
|
minWaitHours: 6,
|
|
17244
17254
|
direction: "any"
|
|
17245
17255
|
},
|
|
17246
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17256
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17247
17257
|
},
|
|
17248
17258
|
faqs: [
|
|
17249
17259
|
...faqs2,
|
|
@@ -17268,7 +17278,7 @@ var RE7Strategies = [
|
|
|
17268
17278
|
ETHUSDCRe7Strategy,
|
|
17269
17279
|
{
|
|
17270
17280
|
...ETHUSDCRe7Strategy,
|
|
17271
|
-
name: "Ekubo USDC/USDT",
|
|
17281
|
+
name: "Ekubo USDC.e/USDT",
|
|
17272
17282
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17273
17283
|
address: ContractAddr.from(
|
|
17274
17284
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -17276,7 +17286,7 @@ var RE7Strategies = [
|
|
|
17276
17286
|
launchBlock: 1506139,
|
|
17277
17287
|
// must be same order as poolKey token0 and token1
|
|
17278
17288
|
depositTokens: [
|
|
17279
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
17289
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
17280
17290
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
17281
17291
|
],
|
|
17282
17292
|
risk: {
|
|
@@ -17287,7 +17297,7 @@ var RE7Strategies = [
|
|
|
17287
17297
|
},
|
|
17288
17298
|
{
|
|
17289
17299
|
...ETHUSDCRe7Strategy,
|
|
17290
|
-
name: "Ekubo STRK/USDC",
|
|
17300
|
+
name: "Ekubo STRK/USDC.e",
|
|
17291
17301
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17292
17302
|
address: ContractAddr.from(
|
|
17293
17303
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -17296,7 +17306,7 @@ var RE7Strategies = [
|
|
|
17296
17306
|
// must be same order as poolKey token0 and token1
|
|
17297
17307
|
depositTokens: [
|
|
17298
17308
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
17299
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17309
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17300
17310
|
],
|
|
17301
17311
|
risk: highRisk
|
|
17302
17312
|
},
|
|
@@ -17317,7 +17327,7 @@ var RE7Strategies = [
|
|
|
17317
17327
|
},
|
|
17318
17328
|
{
|
|
17319
17329
|
...ETHUSDCRe7Strategy,
|
|
17320
|
-
name: "Ekubo WBTC/USDC",
|
|
17330
|
+
name: "Ekubo WBTC/USDC.e",
|
|
17321
17331
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17322
17332
|
address: ContractAddr.from(
|
|
17323
17333
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -17326,13 +17336,13 @@ var RE7Strategies = [
|
|
|
17326
17336
|
// must be same order as poolKey token0 and token1
|
|
17327
17337
|
depositTokens: [
|
|
17328
17338
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
17329
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17339
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17330
17340
|
],
|
|
17331
17341
|
risk: mediumRisk
|
|
17332
17342
|
},
|
|
17333
17343
|
{
|
|
17334
17344
|
...ETHUSDCRe7Strategy,
|
|
17335
|
-
name: "Ekubo tBTC/USDC",
|
|
17345
|
+
name: "Ekubo tBTC/USDC.e",
|
|
17336
17346
|
description: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}),
|
|
17337
17347
|
address: ContractAddr.from(
|
|
17338
17348
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -17341,7 +17351,7 @@ var RE7Strategies = [
|
|
|
17341
17351
|
// must be same order as poolKey token0 and token1
|
|
17342
17352
|
depositTokens: [
|
|
17343
17353
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
17344
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17354
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17345
17355
|
],
|
|
17346
17356
|
risk: mediumRisk
|
|
17347
17357
|
},
|
|
@@ -30647,13 +30657,13 @@ var investmentSteps = [
|
|
|
30647
30657
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
30648
30658
|
var UniversalStrategies = [
|
|
30649
30659
|
{
|
|
30650
|
-
name: "USDC Evergreen",
|
|
30651
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
30660
|
+
name: "USDC.e Evergreen",
|
|
30661
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
30652
30662
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
30653
30663
|
launchBlock: 0,
|
|
30654
30664
|
type: "ERC4626",
|
|
30655
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
30656
|
-
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),
|
|
30657
30667
|
risk: {
|
|
30658
30668
|
riskFactor: _riskFactor3,
|
|
30659
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;
|
|
@@ -491,7 +501,7 @@ var Pricer = class extends PricerBase {
|
|
|
491
501
|
let retry = 0;
|
|
492
502
|
while (retry < MAX_RETRIES) {
|
|
493
503
|
try {
|
|
494
|
-
if (token.symbol === "USDT") {
|
|
504
|
+
if (token.symbol === "USDT" || token.symbol === "USDC") {
|
|
495
505
|
this.prices[token.symbol] = {
|
|
496
506
|
price: 1,
|
|
497
507
|
timestamp: /* @__PURE__ */ new Date()
|
|
@@ -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 {
|
|
@@ -17120,7 +17130,7 @@ var lstStrategies = [
|
|
|
17120
17130
|
];
|
|
17121
17131
|
var ETHUSDCRe7Strategy = {
|
|
17122
17132
|
...xSTRKSTRK,
|
|
17123
|
-
name: "Ekubo ETH/USDC",
|
|
17133
|
+
name: "Ekubo ETH/USDC.e",
|
|
17124
17134
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17125
17135
|
address: ContractAddr.from(
|
|
17126
17136
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -17129,7 +17139,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17129
17139
|
// must be same order as poolKey token0 and token1
|
|
17130
17140
|
depositTokens: [
|
|
17131
17141
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17132
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17142
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17133
17143
|
],
|
|
17134
17144
|
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17135
17145
|
additionalInfo: {
|
|
@@ -17141,7 +17151,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17141
17151
|
minWaitHours: 6,
|
|
17142
17152
|
direction: "any"
|
|
17143
17153
|
},
|
|
17144
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17154
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17145
17155
|
},
|
|
17146
17156
|
faqs: [
|
|
17147
17157
|
...faqs2,
|
|
@@ -17166,7 +17176,7 @@ var RE7Strategies = [
|
|
|
17166
17176
|
ETHUSDCRe7Strategy,
|
|
17167
17177
|
{
|
|
17168
17178
|
...ETHUSDCRe7Strategy,
|
|
17169
|
-
name: "Ekubo USDC/USDT",
|
|
17179
|
+
name: "Ekubo USDC.e/USDT",
|
|
17170
17180
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17171
17181
|
address: ContractAddr.from(
|
|
17172
17182
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -17174,7 +17184,7 @@ var RE7Strategies = [
|
|
|
17174
17184
|
launchBlock: 1506139,
|
|
17175
17185
|
// must be same order as poolKey token0 and token1
|
|
17176
17186
|
depositTokens: [
|
|
17177
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC"),
|
|
17187
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e"),
|
|
17178
17188
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")
|
|
17179
17189
|
],
|
|
17180
17190
|
risk: {
|
|
@@ -17185,7 +17195,7 @@ var RE7Strategies = [
|
|
|
17185
17195
|
},
|
|
17186
17196
|
{
|
|
17187
17197
|
...ETHUSDCRe7Strategy,
|
|
17188
|
-
name: "Ekubo STRK/USDC",
|
|
17198
|
+
name: "Ekubo STRK/USDC.e",
|
|
17189
17199
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17190
17200
|
address: ContractAddr.from(
|
|
17191
17201
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -17194,7 +17204,7 @@ var RE7Strategies = [
|
|
|
17194
17204
|
// must be same order as poolKey token0 and token1
|
|
17195
17205
|
depositTokens: [
|
|
17196
17206
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK"),
|
|
17197
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17207
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17198
17208
|
],
|
|
17199
17209
|
risk: highRisk
|
|
17200
17210
|
},
|
|
@@ -17215,7 +17225,7 @@ var RE7Strategies = [
|
|
|
17215
17225
|
},
|
|
17216
17226
|
{
|
|
17217
17227
|
...ETHUSDCRe7Strategy,
|
|
17218
|
-
name: "Ekubo WBTC/USDC",
|
|
17228
|
+
name: "Ekubo WBTC/USDC.e",
|
|
17219
17229
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17220
17230
|
address: ContractAddr.from(
|
|
17221
17231
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -17224,13 +17234,13 @@ var RE7Strategies = [
|
|
|
17224
17234
|
// must be same order as poolKey token0 and token1
|
|
17225
17235
|
depositTokens: [
|
|
17226
17236
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC"),
|
|
17227
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17237
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17228
17238
|
],
|
|
17229
17239
|
risk: mediumRisk
|
|
17230
17240
|
},
|
|
17231
17241
|
{
|
|
17232
17242
|
...ETHUSDCRe7Strategy,
|
|
17233
|
-
name: "Ekubo tBTC/USDC",
|
|
17243
|
+
name: "Ekubo tBTC/USDC.e",
|
|
17234
17244
|
description: /* @__PURE__ */ jsx3(Fragment2, {}),
|
|
17235
17245
|
address: ContractAddr.from(
|
|
17236
17246
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -17239,7 +17249,7 @@ var RE7Strategies = [
|
|
|
17239
17249
|
// must be same order as poolKey token0 and token1
|
|
17240
17250
|
depositTokens: [
|
|
17241
17251
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC"),
|
|
17242
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17252
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")
|
|
17243
17253
|
],
|
|
17244
17254
|
risk: mediumRisk
|
|
17245
17255
|
},
|
|
@@ -30545,13 +30555,13 @@ var investmentSteps = [
|
|
|
30545
30555
|
var AUDIT_URL3 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
30546
30556
|
var UniversalStrategies = [
|
|
30547
30557
|
{
|
|
30548
|
-
name: "USDC Evergreen",
|
|
30549
|
-
description: getDescription("USDC", ["vesu", "extended"]),
|
|
30558
|
+
name: "USDC.e Evergreen",
|
|
30559
|
+
description: getDescription("USDC.e", ["vesu", "extended"]),
|
|
30550
30560
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
30551
30561
|
launchBlock: 0,
|
|
30552
30562
|
type: "ERC4626",
|
|
30553
|
-
depositTokens: [Global.getDefaultTokens().find((token) => token.symbol === "USDC")],
|
|
30554
|
-
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),
|
|
30555
30565
|
risk: {
|
|
30556
30566
|
riskFactor: _riskFactor3,
|
|
30557
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,
|
package/src/modules/pricer.ts
CHANGED
|
@@ -26,6 +26,7 @@ export class Pricer extends PricerBase {
|
|
|
26
26
|
/**
|
|
27
27
|
* TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
|
|
28
28
|
*/
|
|
29
|
+
// ! switch to USDC (new) later
|
|
29
30
|
protected PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
|
|
30
31
|
protected EKUBO_API = 'https://quoter-mainnet-api.ekubo.org/{{AMOUNT}}/{{TOKEN_ADDRESS}}/0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'; // e.g. ETH/USDC
|
|
31
32
|
|
|
@@ -93,7 +94,7 @@ export class Pricer extends PricerBase {
|
|
|
93
94
|
let retry = 0;
|
|
94
95
|
while (retry < MAX_RETRIES) {
|
|
95
96
|
try {
|
|
96
|
-
if (token.symbol === 'USDT') {
|
|
97
|
+
if (token.symbol === 'USDT' || token.symbol === 'USDC') {
|
|
97
98
|
this.prices[token.symbol] = {
|
|
98
99
|
price: 1,
|
|
99
100
|
timestamp: new Date()
|
|
@@ -504,7 +504,8 @@ export class EkuboCLVault extends BaseStrategy<
|
|
|
504
504
|
sinceBlocks = 600000,
|
|
505
505
|
timeperiod: '24h' | '7d' | '30d' | '3m' = '24h' // temp thing for fee based APY
|
|
506
506
|
): Promise<number> {
|
|
507
|
-
|
|
507
|
+
// ! switch to USDC later
|
|
508
|
+
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC.e";
|
|
508
509
|
if (!isUSDCQouteToken) {
|
|
509
510
|
// good for LSTs and stables
|
|
510
511
|
return this.netSharesBasedTrueAPY(blockIdentifier, sinceBlocks);
|
|
@@ -2302,7 +2303,7 @@ const lstStrategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2302
2303
|
|
|
2303
2304
|
const ETHUSDCRe7Strategy: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
2304
2305
|
...xSTRKSTRK,
|
|
2305
|
-
name: "Ekubo ETH/USDC",
|
|
2306
|
+
name: "Ekubo ETH/USDC.e",
|
|
2306
2307
|
description: <></>,
|
|
2307
2308
|
address: ContractAddr.from(
|
|
2308
2309
|
"0x160d8fa4569ef6a12e6bf47cb943d7b5ebba8a41a69a14c1d943050ba5ff947"
|
|
@@ -2311,7 +2312,7 @@ const ETHUSDCRe7Strategy: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
|
2311
2312
|
// must be same order as poolKey token0 and token1
|
|
2312
2313
|
depositTokens: [
|
|
2313
2314
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH")!,
|
|
2314
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
2315
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
|
|
2315
2316
|
],
|
|
2316
2317
|
apyMethodology:
|
|
2317
2318
|
"Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
@@ -2325,7 +2326,7 @@ const ETHUSDCRe7Strategy: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
|
2325
2326
|
minWaitHours: 6,
|
|
2326
2327
|
direction: "any"
|
|
2327
2328
|
},
|
|
2328
|
-
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
|
|
2329
|
+
quoteAsset: Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!,
|
|
2329
2330
|
},
|
|
2330
2331
|
faqs: [
|
|
2331
2332
|
...faqs,
|
|
@@ -2349,7 +2350,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2349
2350
|
ETHUSDCRe7Strategy,
|
|
2350
2351
|
{
|
|
2351
2352
|
...ETHUSDCRe7Strategy,
|
|
2352
|
-
name: "Ekubo USDC/USDT",
|
|
2353
|
+
name: "Ekubo USDC.e/USDT",
|
|
2353
2354
|
description: <></>,
|
|
2354
2355
|
address: ContractAddr.from(
|
|
2355
2356
|
"0x3a4f8debaf12af97bb911099bc011d63d6c208d4c5ba8e15d7f437785b0aaa2"
|
|
@@ -2357,7 +2358,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2357
2358
|
launchBlock: 1506139,
|
|
2358
2359
|
// must be same order as poolKey token0 and token1
|
|
2359
2360
|
depositTokens: [
|
|
2360
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!,
|
|
2361
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!,
|
|
2361
2362
|
Global.getDefaultTokens().find((t) => t.symbol === "USDT")!
|
|
2362
2363
|
],
|
|
2363
2364
|
risk: {
|
|
@@ -2370,7 +2371,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2370
2371
|
},
|
|
2371
2372
|
{
|
|
2372
2373
|
...ETHUSDCRe7Strategy,
|
|
2373
|
-
name: "Ekubo STRK/USDC",
|
|
2374
|
+
name: "Ekubo STRK/USDC.e",
|
|
2374
2375
|
description: <></>,
|
|
2375
2376
|
address: ContractAddr.from(
|
|
2376
2377
|
"0x351b36d0d9d8b40010658825adeeddb1397436cd41acd0ff6c6e23aaa8b5b30"
|
|
@@ -2379,7 +2380,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2379
2380
|
// must be same order as poolKey token0 and token1
|
|
2380
2381
|
depositTokens: [
|
|
2381
2382
|
Global.getDefaultTokens().find((t) => t.symbol === "STRK")!,
|
|
2382
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
2383
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
|
|
2383
2384
|
],
|
|
2384
2385
|
risk: highRisk,
|
|
2385
2386
|
},
|
|
@@ -2400,7 +2401,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2400
2401
|
},
|
|
2401
2402
|
{
|
|
2402
2403
|
...ETHUSDCRe7Strategy,
|
|
2403
|
-
name: "Ekubo WBTC/USDC",
|
|
2404
|
+
name: "Ekubo WBTC/USDC.e",
|
|
2404
2405
|
description: <></>,
|
|
2405
2406
|
address: ContractAddr.from(
|
|
2406
2407
|
"0x2bcaef2eb7706875a5fdc6853dd961a0590f850bc3a031c59887189b5e84ba1"
|
|
@@ -2409,13 +2410,13 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2409
2410
|
// must be same order as poolKey token0 and token1
|
|
2410
2411
|
depositTokens: [
|
|
2411
2412
|
Global.getDefaultTokens().find((t) => t.symbol === "WBTC")!,
|
|
2412
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
2413
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
|
|
2413
2414
|
],
|
|
2414
2415
|
risk: mediumRisk,
|
|
2415
2416
|
},
|
|
2416
2417
|
{
|
|
2417
2418
|
...ETHUSDCRe7Strategy,
|
|
2418
|
-
name: "Ekubo tBTC/USDC",
|
|
2419
|
+
name: "Ekubo tBTC/USDC.e",
|
|
2419
2420
|
description: <></>,
|
|
2420
2421
|
address: ContractAddr.from(
|
|
2421
2422
|
"0x4aad891a2d4432fba06b6558631bb13f6bbd7f6f33ab8c3111e344889ea4456"
|
|
@@ -2424,7 +2425,7 @@ const RE7Strategies: IStrategyMetadata<CLVaultStrategySettings>[] = [
|
|
|
2424
2425
|
// must be same order as poolKey token0 and token1
|
|
2425
2426
|
depositTokens: [
|
|
2426
2427
|
Global.getDefaultTokens().find((t) => t.symbol === "tBTC")!,
|
|
2427
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
2428
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
|
|
2428
2429
|
],
|
|
2429
2430
|
risk: mediumRisk,
|
|
2430
2431
|
},
|
|
@@ -1143,13 +1143,13 @@ const AUDIT_URL = 'https://docs.troves.fi/p/security#starknet-vault-kit'
|
|
|
1143
1143
|
export const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[] =
|
|
1144
1144
|
[
|
|
1145
1145
|
{
|
|
1146
|
-
name: "USDC Evergreen",
|
|
1147
|
-
description: getDescription('USDC', ['vesu', 'extended']),
|
|
1146
|
+
name: "USDC.e Evergreen",
|
|
1147
|
+
description: getDescription('USDC.e', ['vesu', 'extended']),
|
|
1148
1148
|
address: ContractAddr.from('0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e'),
|
|
1149
1149
|
launchBlock: 0,
|
|
1150
1150
|
type: 'ERC4626',
|
|
1151
|
-
depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'USDC')!],
|
|
1152
|
-
additionalInfo: getLooperSettings('USDC', 'ETH', usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
1151
|
+
depositTokens: [Global.getDefaultTokens().find(token => token.symbol === 'USDC.e')!],
|
|
1152
|
+
additionalInfo: getLooperSettings('USDC.e', 'ETH', usdcVaultSettings, VesuPools.Genesis, VesuPools.Genesis),
|
|
1153
1153
|
risk: {
|
|
1154
1154
|
riskFactor: _riskFactor,
|
|
1155
1155
|
netRisk:
|
|
@@ -1014,8 +1014,8 @@ export const VesuRebalanceStrategies: IStrategyMetadata<VesuRebalanceSettings>[]
|
|
|
1014
1014
|
investmentSteps: []
|
|
1015
1015
|
},
|
|
1016
1016
|
{
|
|
1017
|
-
name: "Vesu Fusion USDC",
|
|
1018
|
-
description: _description.replace("{{TOKEN}}", "USDC"),
|
|
1017
|
+
name: "Vesu Fusion USDC.e",
|
|
1018
|
+
description: _description.replace("{{TOKEN}}", "USDC.e"),
|
|
1019
1019
|
address: ContractAddr.from(
|
|
1020
1020
|
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
1021
1021
|
),
|
|
@@ -1023,7 +1023,7 @@ export const VesuRebalanceStrategies: IStrategyMetadata<VesuRebalanceSettings>[]
|
|
|
1023
1023
|
type: "ERC4626",
|
|
1024
1024
|
auditUrl: AUDIT_URL,
|
|
1025
1025
|
depositTokens: [
|
|
1026
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
1026
|
+
Global.getDefaultTokens().find((t) => t.symbol === "USDC.e")!
|
|
1027
1027
|
],
|
|
1028
1028
|
protocols: [_protocol],
|
|
1029
1029
|
maxTVL: Web3Number.fromWei("0", 6),
|