@strkfarm/sdk 1.0.49 → 1.0.51
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 +14 -14
- package/dist/index.browser.mjs +14 -14
- package/dist/index.d.ts +5 -1
- package/dist/index.js +14 -14
- package/dist/index.mjs +14 -14
- package/package.json +1 -1
- package/src/global.ts +7 -7
- package/src/modules/pricer-from-api.ts +1 -1
- package/src/strategies/ekubo-cl-vault.tsx +4 -4
- package/src/strategies/vesu-rebalance.tsx +3 -3
|
@@ -36032,7 +36032,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36032
36032
|
var defaultTokens = [{
|
|
36033
36033
|
name: "Starknet",
|
|
36034
36034
|
symbol: "STRK",
|
|
36035
|
-
logo: "https://assets.
|
|
36035
|
+
logo: "https://assets.troves.fi/integrations/tokens/strk.svg",
|
|
36036
36036
|
address: ContractAddr.from("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"),
|
|
36037
36037
|
decimals: 18,
|
|
36038
36038
|
coingeckId: "starknet",
|
|
@@ -36040,7 +36040,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36040
36040
|
}, {
|
|
36041
36041
|
name: "xSTRK",
|
|
36042
36042
|
symbol: "xSTRK",
|
|
36043
|
-
logo: "https://assets.
|
|
36043
|
+
logo: "https://assets.troves.fi/integrations/tokens/xstrk.svg",
|
|
36044
36044
|
address: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
36045
36045
|
decimals: 18,
|
|
36046
36046
|
coingeckId: void 0,
|
|
@@ -36048,7 +36048,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36048
36048
|
}, {
|
|
36049
36049
|
name: "ETH",
|
|
36050
36050
|
symbol: "ETH",
|
|
36051
|
-
logo: "https://assets.
|
|
36051
|
+
logo: "https://assets.troves.fi/integrations/tokens/eth.svg",
|
|
36052
36052
|
address: ContractAddr.from("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"),
|
|
36053
36053
|
decimals: 18,
|
|
36054
36054
|
coingeckId: void 0,
|
|
@@ -36056,7 +36056,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36056
36056
|
}, {
|
|
36057
36057
|
name: "USDC",
|
|
36058
36058
|
symbol: "USDC",
|
|
36059
|
-
logo: "https://assets.
|
|
36059
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
36060
36060
|
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
36061
36061
|
decimals: 6,
|
|
36062
36062
|
coingeckId: void 0,
|
|
@@ -36064,7 +36064,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36064
36064
|
}, {
|
|
36065
36065
|
name: "USDT",
|
|
36066
36066
|
symbol: "USDT",
|
|
36067
|
-
logo: "https://assets.
|
|
36067
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdt.svg",
|
|
36068
36068
|
address: ContractAddr.from("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"),
|
|
36069
36069
|
decimals: 6,
|
|
36070
36070
|
coingeckId: void 0,
|
|
@@ -36072,7 +36072,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36072
36072
|
}, {
|
|
36073
36073
|
name: "WBTC",
|
|
36074
36074
|
symbol: "WBTC",
|
|
36075
|
-
logo: "https://assets.
|
|
36075
|
+
logo: "https://assets.troves.fi/integrations/tokens/wbtc.svg",
|
|
36076
36076
|
address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
|
|
36077
36077
|
decimals: 8,
|
|
36078
36078
|
coingeckId: void 0,
|
|
@@ -36096,7 +36096,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36096
36096
|
}
|
|
36097
36097
|
static async getTokens() {
|
|
36098
36098
|
if (tokens.length) return tokens;
|
|
36099
|
-
const data = await axios_default.get("https://assets.
|
|
36099
|
+
const data = await axios_default.get("https://assets.troves.fi/integrations/tokens.json");
|
|
36100
36100
|
const tokensData = data.data.content;
|
|
36101
36101
|
tokensData.forEach((token) => {
|
|
36102
36102
|
if (!token.tags.includes("AVNU") || !token.tags.includes("Verified")) {
|
|
@@ -36624,7 +36624,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
36624
36624
|
}
|
|
36625
36625
|
async getPriceFromMyAPI(tokenSymbol) {
|
|
36626
36626
|
logger.verbose(`getPrice from redis: ${tokenSymbol}`);
|
|
36627
|
-
const endpoint = "https://app.
|
|
36627
|
+
const endpoint = "https://app.troves.fi";
|
|
36628
36628
|
const url = `${endpoint}/api/price/${tokenSymbol}`;
|
|
36629
36629
|
const priceInfoRes = await fetch(url);
|
|
36630
36630
|
const priceInfo = await priceInfoRes.json();
|
|
@@ -46033,7 +46033,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
46033
46033
|
{ type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50, reason: "Reasonable max LTV ratios and Curated by well-known risk managers like Re7" },
|
|
46034
46034
|
{ type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25, reason: "Uses Pragma price feeds, Most reputable price feed on Starknet" }
|
|
46035
46035
|
];
|
|
46036
|
-
var AUDIT_URL = "https://assets.
|
|
46036
|
+
var AUDIT_URL = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
46037
46037
|
var faqs = [
|
|
46038
46038
|
{
|
|
46039
46039
|
question: "What is the Vesu Rebalancing Strategy?",
|
|
@@ -46071,7 +46071,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
46071
46071
|
question: "Is the strategy audited?",
|
|
46072
46072
|
answer: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
46073
46073
|
"Yes, the strategy has been audited. You can review the audit report in our docs ",
|
|
46074
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href: "https://docs.
|
|
46074
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href: "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
|
|
46075
46075
|
"."
|
|
46076
46076
|
] })
|
|
46077
46077
|
}
|
|
@@ -46207,7 +46207,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
46207
46207
|
},
|
|
46208
46208
|
...COMMON_CONTRACTS
|
|
46209
46209
|
];
|
|
46210
|
-
s.docs = "https://docs.
|
|
46210
|
+
s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
|
|
46211
46211
|
s.description = highlightTextWithLinks(
|
|
46212
46212
|
_description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
|
|
46213
46213
|
[{
|
|
@@ -52201,7 +52201,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
52201
52201
|
var _riskFactorStable = [
|
|
52202
52202
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 }
|
|
52203
52203
|
];
|
|
52204
|
-
var AUDIT_URL2 = "https://assets.
|
|
52204
|
+
var AUDIT_URL2 = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
52205
52205
|
var faqs2 = [
|
|
52206
52206
|
{
|
|
52207
52207
|
question: "What is the Ekubo CL Vault strategy?",
|
|
@@ -52223,7 +52223,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
52223
52223
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
52224
52224
|
"a",
|
|
52225
52225
|
{
|
|
52226
|
-
href: "https://docs.
|
|
52226
|
+
href: "https://docs.troves.fi/p/ekubo-cl-vaults#technical-details",
|
|
52227
52227
|
style: { textDecoration: "underline", marginLeft: "5px" },
|
|
52228
52228
|
children: "Here"
|
|
52229
52229
|
}
|
|
@@ -52347,7 +52347,7 @@ var strkfarm_risk_engine = (() => {
|
|
|
52347
52347
|
},
|
|
52348
52348
|
...COMMON_CONTRACTS
|
|
52349
52349
|
];
|
|
52350
|
-
s.docs = "https://docs.
|
|
52350
|
+
s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults";
|
|
52351
52351
|
s.description = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
52352
52352
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: highlightTextWithLinks(
|
|
52353
52353
|
_description2.replace("{{POOL_NAME}}", s.name.split(" ")[1]),
|
package/dist/index.browser.mjs
CHANGED
|
@@ -115,7 +115,7 @@ var FatalError = class extends Error {
|
|
|
115
115
|
var defaultTokens = [{
|
|
116
116
|
name: "Starknet",
|
|
117
117
|
symbol: "STRK",
|
|
118
|
-
logo: "https://assets.
|
|
118
|
+
logo: "https://assets.troves.fi/integrations/tokens/strk.svg",
|
|
119
119
|
address: ContractAddr.from("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"),
|
|
120
120
|
decimals: 18,
|
|
121
121
|
coingeckId: "starknet",
|
|
@@ -123,7 +123,7 @@ var defaultTokens = [{
|
|
|
123
123
|
}, {
|
|
124
124
|
name: "xSTRK",
|
|
125
125
|
symbol: "xSTRK",
|
|
126
|
-
logo: "https://assets.
|
|
126
|
+
logo: "https://assets.troves.fi/integrations/tokens/xstrk.svg",
|
|
127
127
|
address: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
128
128
|
decimals: 18,
|
|
129
129
|
coingeckId: void 0,
|
|
@@ -131,7 +131,7 @@ var defaultTokens = [{
|
|
|
131
131
|
}, {
|
|
132
132
|
name: "ETH",
|
|
133
133
|
symbol: "ETH",
|
|
134
|
-
logo: "https://assets.
|
|
134
|
+
logo: "https://assets.troves.fi/integrations/tokens/eth.svg",
|
|
135
135
|
address: ContractAddr.from("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"),
|
|
136
136
|
decimals: 18,
|
|
137
137
|
coingeckId: void 0,
|
|
@@ -139,7 +139,7 @@ var defaultTokens = [{
|
|
|
139
139
|
}, {
|
|
140
140
|
name: "USDC",
|
|
141
141
|
symbol: "USDC",
|
|
142
|
-
logo: "https://assets.
|
|
142
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
143
143
|
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
144
144
|
decimals: 6,
|
|
145
145
|
coingeckId: void 0,
|
|
@@ -147,7 +147,7 @@ var defaultTokens = [{
|
|
|
147
147
|
}, {
|
|
148
148
|
name: "USDT",
|
|
149
149
|
symbol: "USDT",
|
|
150
|
-
logo: "https://assets.
|
|
150
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdt.svg",
|
|
151
151
|
address: ContractAddr.from("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"),
|
|
152
152
|
decimals: 6,
|
|
153
153
|
coingeckId: void 0,
|
|
@@ -155,7 +155,7 @@ var defaultTokens = [{
|
|
|
155
155
|
}, {
|
|
156
156
|
name: "WBTC",
|
|
157
157
|
symbol: "WBTC",
|
|
158
|
-
logo: "https://assets.
|
|
158
|
+
logo: "https://assets.troves.fi/integrations/tokens/wbtc.svg",
|
|
159
159
|
address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
|
|
160
160
|
decimals: 8,
|
|
161
161
|
coingeckId: void 0,
|
|
@@ -179,7 +179,7 @@ var Global = class _Global {
|
|
|
179
179
|
}
|
|
180
180
|
static async getTokens() {
|
|
181
181
|
if (tokens.length) return tokens;
|
|
182
|
-
const data = await axios.get("https://assets.
|
|
182
|
+
const data = await axios.get("https://assets.troves.fi/integrations/tokens.json");
|
|
183
183
|
const tokensData = data.data.content;
|
|
184
184
|
tokensData.forEach((token) => {
|
|
185
185
|
if (!token.tags.includes("AVNU") || !token.tags.includes("Verified")) {
|
|
@@ -714,7 +714,7 @@ var PricerFromApi = class extends PricerBase {
|
|
|
714
714
|
}
|
|
715
715
|
async getPriceFromMyAPI(tokenSymbol) {
|
|
716
716
|
logger.verbose(`getPrice from redis: ${tokenSymbol}`);
|
|
717
|
-
const endpoint = "https://app.
|
|
717
|
+
const endpoint = "https://app.troves.fi";
|
|
718
718
|
const url = `${endpoint}/api/price/${tokenSymbol}`;
|
|
719
719
|
const priceInfoRes = await fetch(url);
|
|
720
720
|
const priceInfo = await priceInfoRes.json();
|
|
@@ -9819,7 +9819,7 @@ var _riskFactor = [
|
|
|
9819
9819
|
{ type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50, reason: "Reasonable max LTV ratios and Curated by well-known risk managers like Re7" },
|
|
9820
9820
|
{ type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25, reason: "Uses Pragma price feeds, Most reputable price feed on Starknet" }
|
|
9821
9821
|
];
|
|
9822
|
-
var AUDIT_URL = "https://assets.
|
|
9822
|
+
var AUDIT_URL = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
9823
9823
|
var faqs = [
|
|
9824
9824
|
{
|
|
9825
9825
|
question: "What is the Vesu Rebalancing Strategy?",
|
|
@@ -9857,7 +9857,7 @@ var faqs = [
|
|
|
9857
9857
|
question: "Is the strategy audited?",
|
|
9858
9858
|
answer: /* @__PURE__ */ jsxs("div", { children: [
|
|
9859
9859
|
"Yes, the strategy has been audited. You can review the audit report in our docs ",
|
|
9860
|
-
/* @__PURE__ */ jsx2("a", { href: "https://docs.
|
|
9860
|
+
/* @__PURE__ */ jsx2("a", { href: "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
|
|
9861
9861
|
"."
|
|
9862
9862
|
] })
|
|
9863
9863
|
}
|
|
@@ -9993,7 +9993,7 @@ VesuRebalanceStrategies.forEach((s) => {
|
|
|
9993
9993
|
},
|
|
9994
9994
|
...COMMON_CONTRACTS
|
|
9995
9995
|
];
|
|
9996
|
-
s.docs = "https://docs.
|
|
9996
|
+
s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
|
|
9997
9997
|
s.description = highlightTextWithLinks(
|
|
9998
9998
|
_description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
|
|
9999
9999
|
[{
|
|
@@ -15994,7 +15994,7 @@ var _riskFactor2 = [
|
|
|
15994
15994
|
var _riskFactorStable = [
|
|
15995
15995
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 }
|
|
15996
15996
|
];
|
|
15997
|
-
var AUDIT_URL2 = "https://assets.
|
|
15997
|
+
var AUDIT_URL2 = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
15998
15998
|
var faqs2 = [
|
|
15999
15999
|
{
|
|
16000
16000
|
question: "What is the Ekubo CL Vault strategy?",
|
|
@@ -16016,7 +16016,7 @@ var faqs2 = [
|
|
|
16016
16016
|
/* @__PURE__ */ jsx3(
|
|
16017
16017
|
"a",
|
|
16018
16018
|
{
|
|
16019
|
-
href: "https://docs.
|
|
16019
|
+
href: "https://docs.troves.fi/p/ekubo-cl-vaults#technical-details",
|
|
16020
16020
|
style: { textDecoration: "underline", marginLeft: "5px" },
|
|
16021
16021
|
children: "Here"
|
|
16022
16022
|
}
|
|
@@ -16140,7 +16140,7 @@ EkuboCLVaultStrategies.forEach((s) => {
|
|
|
16140
16140
|
},
|
|
16141
16141
|
...COMMON_CONTRACTS
|
|
16142
16142
|
];
|
|
16143
|
-
s.docs = "https://docs.
|
|
16143
|
+
s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults";
|
|
16144
16144
|
s.description = /* @__PURE__ */ jsxs2("div", { children: [
|
|
16145
16145
|
/* @__PURE__ */ jsx3("p", { children: highlightTextWithLinks(
|
|
16146
16146
|
_description2.replace("{{POOL_NAME}}", s.name.split(" ")[1]),
|
package/dist/index.d.ts
CHANGED
|
@@ -678,7 +678,11 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
|
|
|
678
678
|
tick: number;
|
|
679
679
|
sqrtRatio: any;
|
|
680
680
|
}>;
|
|
681
|
-
|
|
681
|
+
_getCurrentPrice(poolKey: EkuboPoolKey, blockIdentifier?: BlockIdentifier): Promise<{
|
|
682
|
+
price: number;
|
|
683
|
+
tick: number;
|
|
684
|
+
sqrtRatio: any;
|
|
685
|
+
}>;
|
|
682
686
|
getCurrentBounds(blockIdentifier?: BlockIdentifier): Promise<EkuboBounds>;
|
|
683
687
|
static div2Power128(num: BigInt): number;
|
|
684
688
|
static priceToTick(price: number, isRoundDown: boolean, tickSpacing: number): {
|
package/dist/index.js
CHANGED
|
@@ -226,7 +226,7 @@ var FatalError = class extends Error {
|
|
|
226
226
|
var defaultTokens = [{
|
|
227
227
|
name: "Starknet",
|
|
228
228
|
symbol: "STRK",
|
|
229
|
-
logo: "https://assets.
|
|
229
|
+
logo: "https://assets.troves.fi/integrations/tokens/strk.svg",
|
|
230
230
|
address: ContractAddr.from("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"),
|
|
231
231
|
decimals: 18,
|
|
232
232
|
coingeckId: "starknet",
|
|
@@ -234,7 +234,7 @@ var defaultTokens = [{
|
|
|
234
234
|
}, {
|
|
235
235
|
name: "xSTRK",
|
|
236
236
|
symbol: "xSTRK",
|
|
237
|
-
logo: "https://assets.
|
|
237
|
+
logo: "https://assets.troves.fi/integrations/tokens/xstrk.svg",
|
|
238
238
|
address: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
239
239
|
decimals: 18,
|
|
240
240
|
coingeckId: void 0,
|
|
@@ -242,7 +242,7 @@ var defaultTokens = [{
|
|
|
242
242
|
}, {
|
|
243
243
|
name: "ETH",
|
|
244
244
|
symbol: "ETH",
|
|
245
|
-
logo: "https://assets.
|
|
245
|
+
logo: "https://assets.troves.fi/integrations/tokens/eth.svg",
|
|
246
246
|
address: ContractAddr.from("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"),
|
|
247
247
|
decimals: 18,
|
|
248
248
|
coingeckId: void 0,
|
|
@@ -250,7 +250,7 @@ var defaultTokens = [{
|
|
|
250
250
|
}, {
|
|
251
251
|
name: "USDC",
|
|
252
252
|
symbol: "USDC",
|
|
253
|
-
logo: "https://assets.
|
|
253
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
254
254
|
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
255
255
|
decimals: 6,
|
|
256
256
|
coingeckId: void 0,
|
|
@@ -258,7 +258,7 @@ var defaultTokens = [{
|
|
|
258
258
|
}, {
|
|
259
259
|
name: "USDT",
|
|
260
260
|
symbol: "USDT",
|
|
261
|
-
logo: "https://assets.
|
|
261
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdt.svg",
|
|
262
262
|
address: ContractAddr.from("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"),
|
|
263
263
|
decimals: 6,
|
|
264
264
|
coingeckId: void 0,
|
|
@@ -266,7 +266,7 @@ var defaultTokens = [{
|
|
|
266
266
|
}, {
|
|
267
267
|
name: "WBTC",
|
|
268
268
|
symbol: "WBTC",
|
|
269
|
-
logo: "https://assets.
|
|
269
|
+
logo: "https://assets.troves.fi/integrations/tokens/wbtc.svg",
|
|
270
270
|
address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
|
|
271
271
|
decimals: 8,
|
|
272
272
|
coingeckId: void 0,
|
|
@@ -290,7 +290,7 @@ var Global = class _Global {
|
|
|
290
290
|
}
|
|
291
291
|
static async getTokens() {
|
|
292
292
|
if (tokens.length) return tokens;
|
|
293
|
-
const data = await import_axios.default.get("https://assets.
|
|
293
|
+
const data = await import_axios.default.get("https://assets.troves.fi/integrations/tokens.json");
|
|
294
294
|
const tokensData = data.data.content;
|
|
295
295
|
tokensData.forEach((token) => {
|
|
296
296
|
if (!token.tags.includes("AVNU") || !token.tags.includes("Verified")) {
|
|
@@ -833,7 +833,7 @@ var PricerFromApi = class extends PricerBase {
|
|
|
833
833
|
}
|
|
834
834
|
async getPriceFromMyAPI(tokenSymbol) {
|
|
835
835
|
logger.verbose(`getPrice from redis: ${tokenSymbol}`);
|
|
836
|
-
const endpoint = "https://app.
|
|
836
|
+
const endpoint = "https://app.troves.fi";
|
|
837
837
|
const url = `${endpoint}/api/price/${tokenSymbol}`;
|
|
838
838
|
const priceInfoRes = await fetch(url);
|
|
839
839
|
const priceInfo = await priceInfoRes.json();
|
|
@@ -9938,7 +9938,7 @@ var _riskFactor = [
|
|
|
9938
9938
|
{ type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50, reason: "Reasonable max LTV ratios and Curated by well-known risk managers like Re7" },
|
|
9939
9939
|
{ type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25, reason: "Uses Pragma price feeds, Most reputable price feed on Starknet" }
|
|
9940
9940
|
];
|
|
9941
|
-
var AUDIT_URL = "https://assets.
|
|
9941
|
+
var AUDIT_URL = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
9942
9942
|
var faqs = [
|
|
9943
9943
|
{
|
|
9944
9944
|
question: "What is the Vesu Rebalancing Strategy?",
|
|
@@ -9976,7 +9976,7 @@ var faqs = [
|
|
|
9976
9976
|
question: "Is the strategy audited?",
|
|
9977
9977
|
answer: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { children: [
|
|
9978
9978
|
"Yes, the strategy has been audited. You can review the audit report in our docs ",
|
|
9979
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href: "https://docs.
|
|
9979
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("a", { href: "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
|
|
9980
9980
|
"."
|
|
9981
9981
|
] })
|
|
9982
9982
|
}
|
|
@@ -10112,7 +10112,7 @@ VesuRebalanceStrategies.forEach((s) => {
|
|
|
10112
10112
|
},
|
|
10113
10113
|
...COMMON_CONTRACTS
|
|
10114
10114
|
];
|
|
10115
|
-
s.docs = "https://docs.
|
|
10115
|
+
s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
|
|
10116
10116
|
s.description = highlightTextWithLinks(
|
|
10117
10117
|
_description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
|
|
10118
10118
|
[{
|
|
@@ -16109,7 +16109,7 @@ var _riskFactor2 = [
|
|
|
16109
16109
|
var _riskFactorStable = [
|
|
16110
16110
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 }
|
|
16111
16111
|
];
|
|
16112
|
-
var AUDIT_URL2 = "https://assets.
|
|
16112
|
+
var AUDIT_URL2 = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
16113
16113
|
var faqs2 = [
|
|
16114
16114
|
{
|
|
16115
16115
|
question: "What is the Ekubo CL Vault strategy?",
|
|
@@ -16131,7 +16131,7 @@ var faqs2 = [
|
|
|
16131
16131
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
16132
16132
|
"a",
|
|
16133
16133
|
{
|
|
16134
|
-
href: "https://docs.
|
|
16134
|
+
href: "https://docs.troves.fi/p/ekubo-cl-vaults#technical-details",
|
|
16135
16135
|
style: { textDecoration: "underline", marginLeft: "5px" },
|
|
16136
16136
|
children: "Here"
|
|
16137
16137
|
}
|
|
@@ -16255,7 +16255,7 @@ EkuboCLVaultStrategies.forEach((s) => {
|
|
|
16255
16255
|
},
|
|
16256
16256
|
...COMMON_CONTRACTS
|
|
16257
16257
|
];
|
|
16258
|
-
s.docs = "https://docs.
|
|
16258
|
+
s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults";
|
|
16259
16259
|
s.description = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
|
|
16260
16260
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { children: highlightTextWithLinks(
|
|
16261
16261
|
_description2.replace("{{POOL_NAME}}", s.name.split(" ")[1]),
|
package/dist/index.mjs
CHANGED
|
@@ -156,7 +156,7 @@ var FatalError = class extends Error {
|
|
|
156
156
|
var defaultTokens = [{
|
|
157
157
|
name: "Starknet",
|
|
158
158
|
symbol: "STRK",
|
|
159
|
-
logo: "https://assets.
|
|
159
|
+
logo: "https://assets.troves.fi/integrations/tokens/strk.svg",
|
|
160
160
|
address: ContractAddr.from("0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d"),
|
|
161
161
|
decimals: 18,
|
|
162
162
|
coingeckId: "starknet",
|
|
@@ -164,7 +164,7 @@ var defaultTokens = [{
|
|
|
164
164
|
}, {
|
|
165
165
|
name: "xSTRK",
|
|
166
166
|
symbol: "xSTRK",
|
|
167
|
-
logo: "https://assets.
|
|
167
|
+
logo: "https://assets.troves.fi/integrations/tokens/xstrk.svg",
|
|
168
168
|
address: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
|
|
169
169
|
decimals: 18,
|
|
170
170
|
coingeckId: void 0,
|
|
@@ -172,7 +172,7 @@ var defaultTokens = [{
|
|
|
172
172
|
}, {
|
|
173
173
|
name: "ETH",
|
|
174
174
|
symbol: "ETH",
|
|
175
|
-
logo: "https://assets.
|
|
175
|
+
logo: "https://assets.troves.fi/integrations/tokens/eth.svg",
|
|
176
176
|
address: ContractAddr.from("0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7"),
|
|
177
177
|
decimals: 18,
|
|
178
178
|
coingeckId: void 0,
|
|
@@ -180,7 +180,7 @@ var defaultTokens = [{
|
|
|
180
180
|
}, {
|
|
181
181
|
name: "USDC",
|
|
182
182
|
symbol: "USDC",
|
|
183
|
-
logo: "https://assets.
|
|
183
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdc.svg",
|
|
184
184
|
address: ContractAddr.from("0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8"),
|
|
185
185
|
decimals: 6,
|
|
186
186
|
coingeckId: void 0,
|
|
@@ -188,7 +188,7 @@ var defaultTokens = [{
|
|
|
188
188
|
}, {
|
|
189
189
|
name: "USDT",
|
|
190
190
|
symbol: "USDT",
|
|
191
|
-
logo: "https://assets.
|
|
191
|
+
logo: "https://assets.troves.fi/integrations/tokens/usdt.svg",
|
|
192
192
|
address: ContractAddr.from("0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8"),
|
|
193
193
|
decimals: 6,
|
|
194
194
|
coingeckId: void 0,
|
|
@@ -196,7 +196,7 @@ var defaultTokens = [{
|
|
|
196
196
|
}, {
|
|
197
197
|
name: "WBTC",
|
|
198
198
|
symbol: "WBTC",
|
|
199
|
-
logo: "https://assets.
|
|
199
|
+
logo: "https://assets.troves.fi/integrations/tokens/wbtc.svg",
|
|
200
200
|
address: ContractAddr.from("0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac"),
|
|
201
201
|
decimals: 8,
|
|
202
202
|
coingeckId: void 0,
|
|
@@ -220,7 +220,7 @@ var Global = class _Global {
|
|
|
220
220
|
}
|
|
221
221
|
static async getTokens() {
|
|
222
222
|
if (tokens.length) return tokens;
|
|
223
|
-
const data = await axios.get("https://assets.
|
|
223
|
+
const data = await axios.get("https://assets.troves.fi/integrations/tokens.json");
|
|
224
224
|
const tokensData = data.data.content;
|
|
225
225
|
tokensData.forEach((token) => {
|
|
226
226
|
if (!token.tags.includes("AVNU") || !token.tags.includes("Verified")) {
|
|
@@ -763,7 +763,7 @@ var PricerFromApi = class extends PricerBase {
|
|
|
763
763
|
}
|
|
764
764
|
async getPriceFromMyAPI(tokenSymbol) {
|
|
765
765
|
logger.verbose(`getPrice from redis: ${tokenSymbol}`);
|
|
766
|
-
const endpoint = "https://app.
|
|
766
|
+
const endpoint = "https://app.troves.fi";
|
|
767
767
|
const url = `${endpoint}/api/price/${tokenSymbol}`;
|
|
768
768
|
const priceInfoRes = await fetch(url);
|
|
769
769
|
const priceInfo = await priceInfoRes.json();
|
|
@@ -9868,7 +9868,7 @@ var _riskFactor = [
|
|
|
9868
9868
|
{ type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50, reason: "Reasonable max LTV ratios and Curated by well-known risk managers like Re7" },
|
|
9869
9869
|
{ type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25, reason: "Uses Pragma price feeds, Most reputable price feed on Starknet" }
|
|
9870
9870
|
];
|
|
9871
|
-
var AUDIT_URL = "https://assets.
|
|
9871
|
+
var AUDIT_URL = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
9872
9872
|
var faqs = [
|
|
9873
9873
|
{
|
|
9874
9874
|
question: "What is the Vesu Rebalancing Strategy?",
|
|
@@ -9906,7 +9906,7 @@ var faqs = [
|
|
|
9906
9906
|
question: "Is the strategy audited?",
|
|
9907
9907
|
answer: /* @__PURE__ */ jsxs("div", { children: [
|
|
9908
9908
|
"Yes, the strategy has been audited. You can review the audit report in our docs ",
|
|
9909
|
-
/* @__PURE__ */ jsx2("a", { href: "https://docs.
|
|
9909
|
+
/* @__PURE__ */ jsx2("a", { href: "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
|
|
9910
9910
|
"."
|
|
9911
9911
|
] })
|
|
9912
9912
|
}
|
|
@@ -10042,7 +10042,7 @@ VesuRebalanceStrategies.forEach((s) => {
|
|
|
10042
10042
|
},
|
|
10043
10043
|
...COMMON_CONTRACTS
|
|
10044
10044
|
];
|
|
10045
|
-
s.docs = "https://docs.
|
|
10045
|
+
s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults";
|
|
10046
10046
|
s.description = highlightTextWithLinks(
|
|
10047
10047
|
_description.replace("{{TOKEN}}", s.depositTokens[0].symbol),
|
|
10048
10048
|
[{
|
|
@@ -16043,7 +16043,7 @@ var _riskFactor2 = [
|
|
|
16043
16043
|
var _riskFactorStable = [
|
|
16044
16044
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 }
|
|
16045
16045
|
];
|
|
16046
|
-
var AUDIT_URL2 = "https://assets.
|
|
16046
|
+
var AUDIT_URL2 = "https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
16047
16047
|
var faqs2 = [
|
|
16048
16048
|
{
|
|
16049
16049
|
question: "What is the Ekubo CL Vault strategy?",
|
|
@@ -16065,7 +16065,7 @@ var faqs2 = [
|
|
|
16065
16065
|
/* @__PURE__ */ jsx3(
|
|
16066
16066
|
"a",
|
|
16067
16067
|
{
|
|
16068
|
-
href: "https://docs.
|
|
16068
|
+
href: "https://docs.troves.fi/p/ekubo-cl-vaults#technical-details",
|
|
16069
16069
|
style: { textDecoration: "underline", marginLeft: "5px" },
|
|
16070
16070
|
children: "Here"
|
|
16071
16071
|
}
|
|
@@ -16189,7 +16189,7 @@ EkuboCLVaultStrategies.forEach((s) => {
|
|
|
16189
16189
|
},
|
|
16190
16190
|
...COMMON_CONTRACTS
|
|
16191
16191
|
];
|
|
16192
|
-
s.docs = "https://docs.
|
|
16192
|
+
s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults";
|
|
16193
16193
|
s.description = /* @__PURE__ */ jsxs2("div", { children: [
|
|
16194
16194
|
/* @__PURE__ */ jsx3("p", { children: highlightTextWithLinks(
|
|
16195
16195
|
_description2.replace("{{POOL_NAME}}", s.name.split(" ")[1]),
|
package/package.json
CHANGED
package/src/global.ts
CHANGED
|
@@ -17,7 +17,7 @@ export class FatalError extends Error {
|
|
|
17
17
|
const defaultTokens: TokenInfo[] = [{
|
|
18
18
|
name: 'Starknet',
|
|
19
19
|
symbol: 'STRK',
|
|
20
|
-
logo: 'https://assets.
|
|
20
|
+
logo: 'https://assets.troves.fi/integrations/tokens/strk.svg',
|
|
21
21
|
address: ContractAddr.from('0x4718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d'),
|
|
22
22
|
decimals: 18,
|
|
23
23
|
coingeckId: 'starknet',
|
|
@@ -25,7 +25,7 @@ const defaultTokens: TokenInfo[] = [{
|
|
|
25
25
|
}, {
|
|
26
26
|
name: 'xSTRK',
|
|
27
27
|
symbol: 'xSTRK',
|
|
28
|
-
logo: 'https://assets.
|
|
28
|
+
logo: 'https://assets.troves.fi/integrations/tokens/xstrk.svg',
|
|
29
29
|
address: ContractAddr.from('0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a'),
|
|
30
30
|
decimals: 18,
|
|
31
31
|
coingeckId: undefined,
|
|
@@ -33,7 +33,7 @@ const defaultTokens: TokenInfo[] = [{
|
|
|
33
33
|
}, {
|
|
34
34
|
name: 'ETH',
|
|
35
35
|
symbol: 'ETH',
|
|
36
|
-
logo: 'https://assets.
|
|
36
|
+
logo: 'https://assets.troves.fi/integrations/tokens/eth.svg',
|
|
37
37
|
address: ContractAddr.from('0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'),
|
|
38
38
|
decimals: 18,
|
|
39
39
|
coingeckId: undefined,
|
|
@@ -41,7 +41,7 @@ const defaultTokens: TokenInfo[] = [{
|
|
|
41
41
|
}, {
|
|
42
42
|
name: 'USDC',
|
|
43
43
|
symbol: 'USDC',
|
|
44
|
-
logo: 'https://assets.
|
|
44
|
+
logo: 'https://assets.troves.fi/integrations/tokens/usdc.svg',
|
|
45
45
|
address: ContractAddr.from('0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8'),
|
|
46
46
|
decimals: 6,
|
|
47
47
|
coingeckId: undefined,
|
|
@@ -49,7 +49,7 @@ const defaultTokens: TokenInfo[] = [{
|
|
|
49
49
|
}, {
|
|
50
50
|
name: 'USDT',
|
|
51
51
|
symbol: 'USDT',
|
|
52
|
-
logo: 'https://assets.
|
|
52
|
+
logo: 'https://assets.troves.fi/integrations/tokens/usdt.svg',
|
|
53
53
|
address: ContractAddr.from('0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8'),
|
|
54
54
|
decimals: 6,
|
|
55
55
|
coingeckId: undefined,
|
|
@@ -57,7 +57,7 @@ const defaultTokens: TokenInfo[] = [{
|
|
|
57
57
|
}, {
|
|
58
58
|
name: 'WBTC',
|
|
59
59
|
symbol: 'WBTC',
|
|
60
|
-
logo: 'https://assets.
|
|
60
|
+
logo: 'https://assets.troves.fi/integrations/tokens/wbtc.svg',
|
|
61
61
|
address: ContractAddr.from('0x3fe2b97c1fd336e750087d68b9b867997fd64a2661ff3ca5a7c771641e8e7ac'),
|
|
62
62
|
decimals: 8,
|
|
63
63
|
coingeckId: undefined,
|
|
@@ -90,7 +90,7 @@ export class Global {
|
|
|
90
90
|
if (tokens.length) return tokens;
|
|
91
91
|
|
|
92
92
|
// fetch from avnu API
|
|
93
|
-
const data = await axios.get('https://assets.
|
|
93
|
+
const data = await axios.get('https://assets.troves.fi/integrations/tokens.json');
|
|
94
94
|
const tokensData = data.data.content;
|
|
95
95
|
|
|
96
96
|
// Array of the following is returned
|
|
@@ -42,7 +42,7 @@ export class PricerFromApi extends PricerBase {
|
|
|
42
42
|
|
|
43
43
|
async getPriceFromMyAPI(tokenSymbol: string) {
|
|
44
44
|
logger.verbose(`getPrice from redis: ${tokenSymbol}`);
|
|
45
|
-
const endpoint = 'https://app.
|
|
45
|
+
const endpoint = 'https://app.troves.fi'
|
|
46
46
|
const url = `${endpoint}/api/price/${tokenSymbol}`;
|
|
47
47
|
const priceInfoRes = await fetch(url);
|
|
48
48
|
const priceInfo = await priceInfoRes.json();
|
|
@@ -566,7 +566,7 @@ export class EkuboCLVault extends BaseStrategy<
|
|
|
566
566
|
return this._getCurrentPrice(poolKey, blockIdentifier);
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
|
|
569
|
+
async _getCurrentPrice(
|
|
570
570
|
poolKey: EkuboPoolKey,
|
|
571
571
|
blockIdentifier: BlockIdentifier = "pending"
|
|
572
572
|
) {
|
|
@@ -1521,7 +1521,7 @@ const _riskFactorStable: RiskFactor[] = [
|
|
|
1521
1521
|
{ type: RiskType.SMART_CONTRACT_RISK, value: 0.5, weight: 25 },
|
|
1522
1522
|
];
|
|
1523
1523
|
const AUDIT_URL =
|
|
1524
|
-
"https://assets.
|
|
1524
|
+
"https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
1525
1525
|
|
|
1526
1526
|
const faqs: FAQ[] = [
|
|
1527
1527
|
{
|
|
@@ -1546,7 +1546,7 @@ const faqs: FAQ[] = [
|
|
|
1546
1546
|
Yes, the strategy has been audited. You can review the audit report in
|
|
1547
1547
|
our docs{" "}
|
|
1548
1548
|
<a
|
|
1549
|
-
href="https://docs.
|
|
1549
|
+
href="https://docs.troves.fi/p/ekubo-cl-vaults#technical-details"
|
|
1550
1550
|
style={{ textDecoration: "underline", marginLeft: "5px" }}
|
|
1551
1551
|
>
|
|
1552
1552
|
Here
|
|
@@ -1685,7 +1685,7 @@ EkuboCLVaultStrategies.forEach((s) => {
|
|
|
1685
1685
|
},
|
|
1686
1686
|
...COMMON_CONTRACTS];
|
|
1687
1687
|
// set docs link
|
|
1688
|
-
s.docs = "https://docs.
|
|
1688
|
+
s.docs = "https://docs.troves.fi/p/ekubo-cl-vaults"
|
|
1689
1689
|
|
|
1690
1690
|
// set description
|
|
1691
1691
|
s.description = (
|
|
@@ -897,7 +897,7 @@ const _riskFactor: RiskFactor[] = [
|
|
|
897
897
|
{ type: RiskType.ORACLE_RISK, value: 0.5, weight: 25, reason: "Uses Pragma price feeds, Most reputable price feed on Starknet" }
|
|
898
898
|
];
|
|
899
899
|
const AUDIT_URL =
|
|
900
|
-
"https://assets.
|
|
900
|
+
"https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
901
901
|
|
|
902
902
|
const faqs: FAQ[] = [
|
|
903
903
|
{
|
|
@@ -942,7 +942,7 @@ const faqs: FAQ[] = [
|
|
|
942
942
|
{
|
|
943
943
|
question: "Is the strategy audited?",
|
|
944
944
|
answer:
|
|
945
|
-
<div>Yes, the strategy has been audited. You can review the audit report in our docs <a href="https://docs.
|
|
945
|
+
<div>Yes, the strategy has been audited. You can review the audit report in our docs <a href="https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults#technical-details" style={{textDecoration: 'underline', marginLeft: '5px'}}>Here</a>.</div>
|
|
946
946
|
}
|
|
947
947
|
];
|
|
948
948
|
|
|
@@ -1092,7 +1092,7 @@ VesuRebalanceStrategies.forEach((s) => {
|
|
|
1092
1092
|
},
|
|
1093
1093
|
...COMMON_CONTRACTS];
|
|
1094
1094
|
// set docs link
|
|
1095
|
-
s.docs = "https://docs.
|
|
1095
|
+
s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults"
|
|
1096
1096
|
|
|
1097
1097
|
// set description
|
|
1098
1098
|
s.description = highlightTextWithLinks(
|