@strkfarm/sdk 2.0.0-staging.23 → 2.0.0-staging.25
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 +846 -322
- package/dist/index.browser.mjs +770 -246
- package/dist/index.d.ts +1 -0
- package/dist/index.js +770 -246
- package/dist/index.mjs +770 -246
- package/package.json +1 -1
- package/src/interfaces/common.tsx +1 -0
- package/src/strategies/ekubo-cl-vault.tsx +2 -0
- package/src/strategies/universal-lst-muliplier-strategy.tsx +1317 -576
- package/src/strategies/universal-strategy.tsx +1 -1
|
@@ -39341,7 +39341,7 @@ ${indent2}}` : "}";
|
|
|
39341
39341
|
var _0n6 = BigInt(0);
|
|
39342
39342
|
var Point = secp256k1.ProjectivePoint;
|
|
39343
39343
|
|
|
39344
|
-
// node_modules/.pnpm/starknet@9.2.1_typescript@5.9.3/node_modules/starknet/dist/index.mjs
|
|
39344
|
+
// node_modules/.pnpm/starknet@9.2.1_typescript@5.9.3_zod@4.3.6/node_modules/starknet/dist/index.mjs
|
|
39345
39345
|
init_esm();
|
|
39346
39346
|
var __defProp2 = Object.defineProperty;
|
|
39347
39347
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
@@ -73200,7 +73200,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
73200
73200
|
}
|
|
73201
73201
|
};
|
|
73202
73202
|
|
|
73203
|
-
// node_modules/.pnpm/@avnu+avnu-sdk@3.0.2_ethers@6.16.0_moment@2.30.1_qs@6.14.0_starknet@9.2.1_typescript@5.9.
|
|
73203
|
+
// node_modules/.pnpm/@avnu+avnu-sdk@3.0.2_ethers@6.16.0_moment@2.30.1_qs@6.14.0_starknet@9.2.1_typescript@5.9.3_zod@4.3.6_/node_modules/@avnu/avnu-sdk/dist/index.mjs
|
|
73204
73204
|
var import_qs = __toESM(require_lib(), 1);
|
|
73205
73205
|
var BASE_URL = "https://starknet.api.avnu.fi";
|
|
73206
73206
|
var ContractError = class {
|
|
@@ -76538,10 +76538,10 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
76538
76538
|
return old;
|
|
76539
76539
|
}
|
|
76540
76540
|
|
|
76541
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76541
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/version.js
|
|
76542
76542
|
var version4 = "3.11.8";
|
|
76543
76543
|
|
|
76544
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76544
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/globals/maybe.js
|
|
76545
76545
|
function maybe(thunk) {
|
|
76546
76546
|
try {
|
|
76547
76547
|
return thunk();
|
|
@@ -76549,7 +76549,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
76549
76549
|
}
|
|
76550
76550
|
}
|
|
76551
76551
|
|
|
76552
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76552
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/globals/global.js
|
|
76553
76553
|
var global_default = maybe(function() {
|
|
76554
76554
|
return globalThis;
|
|
76555
76555
|
}) || maybe(function() {
|
|
@@ -76568,7 +76568,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
76568
76568
|
return maybe.constructor("return this")();
|
|
76569
76569
|
});
|
|
76570
76570
|
|
|
76571
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76571
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/makeUniqueId.js
|
|
76572
76572
|
var prefixCounts = /* @__PURE__ */ new Map();
|
|
76573
76573
|
function makeUniqueId(prefix) {
|
|
76574
76574
|
var count = prefixCounts.get(prefix) || 1;
|
|
@@ -76576,7 +76576,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
76576
76576
|
return "".concat(prefix, ":").concat(count, ":").concat(Math.random().toString(36).slice(2));
|
|
76577
76577
|
}
|
|
76578
76578
|
|
|
76579
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76579
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/stringifyForDisplay.js
|
|
76580
76580
|
function stringifyForDisplay(value, space) {
|
|
76581
76581
|
if (space === void 0) {
|
|
76582
76582
|
space = 0;
|
|
@@ -76587,7 +76587,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
76587
76587
|
}, space).split(JSON.stringify(undefId)).join("<undefined>");
|
|
76588
76588
|
}
|
|
76589
76589
|
|
|
76590
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76590
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/globals/invariantWrappers.js
|
|
76591
76591
|
function wrap(fn) {
|
|
76592
76592
|
return function(message) {
|
|
76593
76593
|
var args = [];
|
|
@@ -76658,7 +76658,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
76658
76658
|
})));
|
|
76659
76659
|
}
|
|
76660
76660
|
|
|
76661
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
76661
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/globals/index.js
|
|
76662
76662
|
var DEV = globalThis.__DEV__ !== false;
|
|
76663
76663
|
|
|
76664
76664
|
// node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/devAssert.mjs
|
|
@@ -79733,7 +79733,7 @@ spurious results.`);
|
|
|
79733
79733
|
return node.kind === Kind.FIELD || node.kind === Kind.FRAGMENT_SPREAD || node.kind === Kind.INLINE_FRAGMENT;
|
|
79734
79734
|
}
|
|
79735
79735
|
|
|
79736
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
79736
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/directives.js
|
|
79737
79737
|
function shouldInclude(_a22, variables) {
|
|
79738
79738
|
var directives = _a22.directives;
|
|
79739
79739
|
if (!directives || !directives.length) {
|
|
@@ -79861,7 +79861,7 @@ spurious results.`);
|
|
|
79861
79861
|
return false;
|
|
79862
79862
|
}
|
|
79863
79863
|
|
|
79864
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
79864
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/canUse.js
|
|
79865
79865
|
var isReactNative = maybe(function() {
|
|
79866
79866
|
return navigator.product;
|
|
79867
79867
|
}) == "ReactNative";
|
|
@@ -79886,12 +79886,12 @@ spurious results.`);
|
|
|
79886
79886
|
}) || false
|
|
79887
79887
|
);
|
|
79888
79888
|
|
|
79889
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
79889
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/objects.js
|
|
79890
79890
|
function isNonNullObject(obj) {
|
|
79891
79891
|
return obj !== null && typeof obj === "object";
|
|
79892
79892
|
}
|
|
79893
79893
|
|
|
79894
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
79894
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/fragments.js
|
|
79895
79895
|
function getFragmentQueryDocument(document2, fragmentName) {
|
|
79896
79896
|
var actualFragmentName = fragmentName;
|
|
79897
79897
|
var fragments = [];
|
|
@@ -80187,7 +80187,7 @@ spurious results.`);
|
|
|
80187
80187
|
}
|
|
80188
80188
|
};
|
|
80189
80189
|
|
|
80190
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
80190
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/caching/caches.js
|
|
80191
80191
|
var scheduledCleanup = /* @__PURE__ */ new WeakSet();
|
|
80192
80192
|
function schedule(cache) {
|
|
80193
80193
|
if (cache.size <= (cache.max || -1)) {
|
|
@@ -80220,11 +80220,11 @@ spurious results.`);
|
|
|
80220
80220
|
return cache;
|
|
80221
80221
|
};
|
|
80222
80222
|
|
|
80223
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
80223
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/caching/sizes.js
|
|
80224
80224
|
var cacheSizeSymbol = /* @__PURE__ */ Symbol.for("apollo.cacheSize");
|
|
80225
80225
|
var cacheSizes = __assign({}, global_default[cacheSizeSymbol]);
|
|
80226
80226
|
|
|
80227
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
80227
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/caching/getMemoryInternals.js
|
|
80228
80228
|
var globalCaches = {};
|
|
80229
80229
|
function registerGlobalCache(name, getSize) {
|
|
80230
80230
|
globalCaches[name] = getSize;
|
|
@@ -80314,7 +80314,7 @@ spurious results.`);
|
|
|
80314
80314
|
], linkInfo(link === null || link === void 0 ? void 0 : link.left), true), linkInfo(link === null || link === void 0 ? void 0 : link.right), true).filter(isDefined) : [];
|
|
80315
80315
|
}
|
|
80316
80316
|
|
|
80317
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
80317
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/canonicalStringify.js
|
|
80318
80318
|
var canonicalStringify = Object.assign(function canonicalStringify2(value) {
|
|
80319
80319
|
return JSON.stringify(value, stableObjectReplacer);
|
|
80320
80320
|
}, {
|
|
@@ -80361,7 +80361,7 @@ spurious results.`);
|
|
|
80361
80361
|
return i === 0 || keys[i - 1] <= key;
|
|
80362
80362
|
}
|
|
80363
80363
|
|
|
80364
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
80364
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/storeUtils.js
|
|
80365
80365
|
function makeReference(id2) {
|
|
80366
80366
|
return { __ref: String(id2) };
|
|
80367
80367
|
}
|
|
@@ -80546,7 +80546,7 @@ spurious results.`);
|
|
|
80546
80546
|
return selection.kind === "InlineFragment";
|
|
80547
80547
|
}
|
|
80548
80548
|
|
|
80549
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
80549
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/getFromAST.js
|
|
80550
80550
|
function checkDocument(doc) {
|
|
80551
80551
|
invariant2(doc && doc.kind === "Document", 77);
|
|
80552
80552
|
var operations = doc.definitions.filter(function(d) {
|
|
@@ -81105,7 +81105,7 @@ spurious results.`);
|
|
|
81105
81105
|
return Object.freeze(optimistic);
|
|
81106
81106
|
}
|
|
81107
81107
|
|
|
81108
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
81108
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/DocumentTransform.js
|
|
81109
81109
|
function identity(document2) {
|
|
81110
81110
|
return document2;
|
|
81111
81111
|
}
|
|
@@ -81189,7 +81189,7 @@ spurious results.`);
|
|
|
81189
81189
|
})()
|
|
81190
81190
|
);
|
|
81191
81191
|
|
|
81192
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
81192
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/print.js
|
|
81193
81193
|
var printCache;
|
|
81194
81194
|
var print2 = Object.assign(function(ast) {
|
|
81195
81195
|
var result2 = printCache.get(ast);
|
|
@@ -81213,13 +81213,13 @@ spurious results.`);
|
|
|
81213
81213
|
});
|
|
81214
81214
|
}
|
|
81215
81215
|
|
|
81216
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
81216
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/arrays.js
|
|
81217
81217
|
var isArray2 = Array.isArray;
|
|
81218
81218
|
function isNonEmptyArray(value) {
|
|
81219
81219
|
return Array.isArray(value) && value.length > 0;
|
|
81220
81220
|
}
|
|
81221
81221
|
|
|
81222
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
81222
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/graphql/transform.js
|
|
81223
81223
|
var TYPENAME_FIELD = {
|
|
81224
81224
|
kind: Kind.FIELD,
|
|
81225
81225
|
name: {
|
|
@@ -81511,7 +81511,7 @@ spurious results.`);
|
|
|
81511
81511
|
return modifiedDoc;
|
|
81512
81512
|
}
|
|
81513
81513
|
|
|
81514
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
81514
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/mergeDeep.js
|
|
81515
81515
|
var hasOwnProperty4 = Object.prototype.hasOwnProperty;
|
|
81516
81516
|
function mergeDeep() {
|
|
81517
81517
|
var sources = [];
|
|
@@ -82147,7 +82147,7 @@ spurious results.`);
|
|
|
82147
82147
|
}
|
|
82148
82148
|
var result = symbolObservablePonyfill(root);
|
|
82149
82149
|
|
|
82150
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82150
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/observables/Observable.js
|
|
82151
82151
|
var prototype3 = Observable.prototype;
|
|
82152
82152
|
var fakeObsSymbol = "@@observable";
|
|
82153
82153
|
if (!prototype3[fakeObsSymbol]) {
|
|
@@ -82156,7 +82156,7 @@ spurious results.`);
|
|
|
82156
82156
|
};
|
|
82157
82157
|
}
|
|
82158
82158
|
|
|
82159
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82159
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/cloneDeep.js
|
|
82160
82160
|
var toString5 = Object.prototype.toString;
|
|
82161
82161
|
function cloneDeep(value) {
|
|
82162
82162
|
return cloneDeepHelper(value);
|
|
@@ -82190,7 +82190,7 @@ spurious results.`);
|
|
|
82190
82190
|
}
|
|
82191
82191
|
}
|
|
82192
82192
|
|
|
82193
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82193
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js
|
|
82194
82194
|
function deepFreeze(value) {
|
|
82195
82195
|
var workSet = /* @__PURE__ */ new Set([value]);
|
|
82196
82196
|
workSet.forEach(function(obj) {
|
|
@@ -82222,7 +82222,7 @@ spurious results.`);
|
|
|
82222
82222
|
return obj;
|
|
82223
82223
|
}
|
|
82224
82224
|
|
|
82225
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82225
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/observables/iteration.js
|
|
82226
82226
|
function iterateObserversSafely(observers, method, argument) {
|
|
82227
82227
|
var observersWithMethod = [];
|
|
82228
82228
|
observers.forEach(function(obs) {
|
|
@@ -82233,7 +82233,7 @@ spurious results.`);
|
|
|
82233
82233
|
});
|
|
82234
82234
|
}
|
|
82235
82235
|
|
|
82236
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82236
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/observables/asyncMap.js
|
|
82237
82237
|
function asyncMap(observable, mapFn, catchFn) {
|
|
82238
82238
|
return new Observable(function(observer) {
|
|
82239
82239
|
var promiseQueue = {
|
|
@@ -82281,7 +82281,7 @@ spurious results.`);
|
|
|
82281
82281
|
});
|
|
82282
82282
|
}
|
|
82283
82283
|
|
|
82284
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82284
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/observables/subclassing.js
|
|
82285
82285
|
function fixObservableSubclass(subclass) {
|
|
82286
82286
|
function set(key) {
|
|
82287
82287
|
Object.defineProperty(subclass, key, { value: Observable });
|
|
@@ -82293,7 +82293,7 @@ spurious results.`);
|
|
|
82293
82293
|
return subclass;
|
|
82294
82294
|
}
|
|
82295
82295
|
|
|
82296
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82296
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/observables/Concast.js
|
|
82297
82297
|
function isPromiseLike(value) {
|
|
82298
82298
|
return value && typeof value.then === "function";
|
|
82299
82299
|
}
|
|
@@ -82434,7 +82434,7 @@ spurious results.`);
|
|
|
82434
82434
|
);
|
|
82435
82435
|
fixObservableSubclass(Concast);
|
|
82436
82436
|
|
|
82437
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82437
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/incrementalResult.js
|
|
82438
82438
|
function isExecutionPatchIncrementalResult(value) {
|
|
82439
82439
|
return "incremental" in value;
|
|
82440
82440
|
}
|
|
@@ -82466,7 +82466,7 @@ spurious results.`);
|
|
|
82466
82466
|
return mergedData;
|
|
82467
82467
|
}
|
|
82468
82468
|
|
|
82469
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82469
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/errorHandling.js
|
|
82470
82470
|
function graphQLResultHasError(result2) {
|
|
82471
82471
|
var errors2 = getGraphQLErrorsFromResult(result2);
|
|
82472
82472
|
return isNonEmptyArray(errors2);
|
|
@@ -82483,7 +82483,7 @@ spurious results.`);
|
|
|
82483
82483
|
return graphQLErrors;
|
|
82484
82484
|
}
|
|
82485
82485
|
|
|
82486
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82486
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/compact.js
|
|
82487
82487
|
function compact() {
|
|
82488
82488
|
var objects = [];
|
|
82489
82489
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -82503,21 +82503,21 @@ spurious results.`);
|
|
|
82503
82503
|
return result2;
|
|
82504
82504
|
}
|
|
82505
82505
|
|
|
82506
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82506
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/utilities/common/mergeOptions.js
|
|
82507
82507
|
function mergeOptions(defaults2, options) {
|
|
82508
82508
|
return compact(defaults2, options, options.variables && {
|
|
82509
82509
|
variables: compact(__assign(__assign({}, defaults2 && defaults2.variables), options.variables))
|
|
82510
82510
|
});
|
|
82511
82511
|
}
|
|
82512
82512
|
|
|
82513
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82513
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/utils/fromError.js
|
|
82514
82514
|
function fromError(errorValue) {
|
|
82515
82515
|
return new Observable(function(observer) {
|
|
82516
82516
|
observer.error(errorValue);
|
|
82517
82517
|
});
|
|
82518
82518
|
}
|
|
82519
82519
|
|
|
82520
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82520
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/utils/throwServerError.js
|
|
82521
82521
|
var throwServerError = function(response, result2, message) {
|
|
82522
82522
|
var error2 = new Error(message);
|
|
82523
82523
|
error2.name = "ServerError";
|
|
@@ -82527,7 +82527,7 @@ spurious results.`);
|
|
|
82527
82527
|
throw error2;
|
|
82528
82528
|
};
|
|
82529
82529
|
|
|
82530
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82530
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/utils/validateOperation.js
|
|
82531
82531
|
function validateOperation(operation) {
|
|
82532
82532
|
var OPERATION_FIELDS = [
|
|
82533
82533
|
"query",
|
|
@@ -82545,7 +82545,7 @@ spurious results.`);
|
|
|
82545
82545
|
return operation;
|
|
82546
82546
|
}
|
|
82547
82547
|
|
|
82548
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82548
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/utils/createOperation.js
|
|
82549
82549
|
function createOperation(starting, operation) {
|
|
82550
82550
|
var context = __assign({}, starting);
|
|
82551
82551
|
var setContext = function(next) {
|
|
@@ -82569,7 +82569,7 @@ spurious results.`);
|
|
|
82569
82569
|
return operation;
|
|
82570
82570
|
}
|
|
82571
82571
|
|
|
82572
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82572
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/utils/transformOperation.js
|
|
82573
82573
|
function transformOperation(operation) {
|
|
82574
82574
|
var transformedOperation = {
|
|
82575
82575
|
variables: operation.variables || {},
|
|
@@ -82583,7 +82583,7 @@ spurious results.`);
|
|
|
82583
82583
|
return transformedOperation;
|
|
82584
82584
|
}
|
|
82585
82585
|
|
|
82586
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82586
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/utils/filterOperationVariables.js
|
|
82587
82587
|
function filterOperationVariables(variables, query) {
|
|
82588
82588
|
var result2 = __assign({}, variables);
|
|
82589
82589
|
var unusedNames = new Set(Object.keys(variables));
|
|
@@ -82600,7 +82600,7 @@ spurious results.`);
|
|
|
82600
82600
|
return result2;
|
|
82601
82601
|
}
|
|
82602
82602
|
|
|
82603
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82603
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/core/ApolloLink.js
|
|
82604
82604
|
function passthrough(op, forward) {
|
|
82605
82605
|
return forward ? forward(op) : Observable.of();
|
|
82606
82606
|
}
|
|
@@ -82694,10 +82694,10 @@ spurious results.`);
|
|
|
82694
82694
|
})()
|
|
82695
82695
|
);
|
|
82696
82696
|
|
|
82697
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82697
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/core/execute.js
|
|
82698
82698
|
var execute = ApolloLink.execute;
|
|
82699
82699
|
|
|
82700
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82700
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/iterators/async.js
|
|
82701
82701
|
function asyncIterator(source) {
|
|
82702
82702
|
var _a22;
|
|
82703
82703
|
var iterator2 = source[Symbol.asyncIterator]();
|
|
@@ -82710,7 +82710,7 @@ spurious results.`);
|
|
|
82710
82710
|
}, _a22;
|
|
82711
82711
|
}
|
|
82712
82712
|
|
|
82713
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82713
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/iterators/nodeStream.js
|
|
82714
82714
|
function nodeStreamIterator(stream) {
|
|
82715
82715
|
var cleanup = null;
|
|
82716
82716
|
var error2 = null;
|
|
@@ -82781,7 +82781,7 @@ spurious results.`);
|
|
|
82781
82781
|
return iterator2;
|
|
82782
82782
|
}
|
|
82783
82783
|
|
|
82784
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82784
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/iterators/promise.js
|
|
82785
82785
|
function promiseIterator(promise) {
|
|
82786
82786
|
var resolved = false;
|
|
82787
82787
|
var iterator2 = {
|
|
@@ -82807,7 +82807,7 @@ spurious results.`);
|
|
|
82807
82807
|
return iterator2;
|
|
82808
82808
|
}
|
|
82809
82809
|
|
|
82810
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82810
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/iterators/reader.js
|
|
82811
82811
|
function readerIterator(reader) {
|
|
82812
82812
|
var iterator2 = {
|
|
82813
82813
|
next: function() {
|
|
@@ -82822,7 +82822,7 @@ spurious results.`);
|
|
|
82822
82822
|
return iterator2;
|
|
82823
82823
|
}
|
|
82824
82824
|
|
|
82825
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82825
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/responseIterator.js
|
|
82826
82826
|
function isNodeResponse(value) {
|
|
82827
82827
|
return !!value.body;
|
|
82828
82828
|
}
|
|
@@ -82859,7 +82859,7 @@ spurious results.`);
|
|
|
82859
82859
|
throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");
|
|
82860
82860
|
}
|
|
82861
82861
|
|
|
82862
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82862
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/errors/index.js
|
|
82863
82863
|
var PROTOCOL_ERRORS_SYMBOL = /* @__PURE__ */ Symbol();
|
|
82864
82864
|
function graphQLResultHasProtocolErrors(result2) {
|
|
82865
82865
|
if (result2.extensions) {
|
|
@@ -82904,7 +82904,7 @@ spurious results.`);
|
|
|
82904
82904
|
})(Error)
|
|
82905
82905
|
);
|
|
82906
82906
|
|
|
82907
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
82907
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
|
|
82908
82908
|
var hasOwnProperty5 = Object.prototype.hasOwnProperty;
|
|
82909
82909
|
function readMultipartBody(response, nextValue) {
|
|
82910
82910
|
return __awaiter(this, void 0, void 0, function() {
|
|
@@ -83048,7 +83048,7 @@ spurious results.`);
|
|
|
83048
83048
|
};
|
|
83049
83049
|
}
|
|
83050
83050
|
|
|
83051
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83051
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/serializeFetchParameter.js
|
|
83052
83052
|
var serializeFetchParameter = function(p, label) {
|
|
83053
83053
|
var serialized;
|
|
83054
83054
|
try {
|
|
@@ -83061,7 +83061,7 @@ spurious results.`);
|
|
|
83061
83061
|
return serialized;
|
|
83062
83062
|
};
|
|
83063
83063
|
|
|
83064
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83064
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
|
|
83065
83065
|
var defaultHttpOptions = {
|
|
83066
83066
|
includeQuery: true,
|
|
83067
83067
|
includeExtensions: false,
|
|
@@ -83145,14 +83145,14 @@ spurious results.`);
|
|
|
83145
83145
|
return normalizedHeaders;
|
|
83146
83146
|
}
|
|
83147
83147
|
|
|
83148
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83148
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/checkFetcher.js
|
|
83149
83149
|
var checkFetcher = function(fetcher) {
|
|
83150
83150
|
if (!fetcher && typeof fetch === "undefined") {
|
|
83151
83151
|
throw newInvariantError(38);
|
|
83152
83152
|
}
|
|
83153
83153
|
};
|
|
83154
83154
|
|
|
83155
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83155
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/selectURI.js
|
|
83156
83156
|
var selectURI = function(operation, fallbackURI) {
|
|
83157
83157
|
var context = operation.getContext();
|
|
83158
83158
|
var contextURI = context.uri;
|
|
@@ -83165,7 +83165,7 @@ spurious results.`);
|
|
|
83165
83165
|
}
|
|
83166
83166
|
};
|
|
83167
83167
|
|
|
83168
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83168
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/rewriteURIForGET.js
|
|
83169
83169
|
function rewriteURIForGET(chosenURI, body) {
|
|
83170
83170
|
var queryParams = [];
|
|
83171
83171
|
var addQueryParam = function(key, value) {
|
|
@@ -83206,7 +83206,7 @@ spurious results.`);
|
|
|
83206
83206
|
return { newURI };
|
|
83207
83207
|
}
|
|
83208
83208
|
|
|
83209
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83209
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/createHttpLink.js
|
|
83210
83210
|
var backupFetch = maybe(function() {
|
|
83211
83211
|
return fetch;
|
|
83212
83212
|
});
|
|
@@ -83326,7 +83326,7 @@ spurious results.`);
|
|
|
83326
83326
|
});
|
|
83327
83327
|
};
|
|
83328
83328
|
|
|
83329
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83329
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/link/http/HttpLink.js
|
|
83330
83330
|
var HttpLink = (
|
|
83331
83331
|
/** @class */
|
|
83332
83332
|
(function(_super) {
|
|
@@ -83479,7 +83479,7 @@ spurious results.`);
|
|
|
83479
83479
|
return false;
|
|
83480
83480
|
}
|
|
83481
83481
|
|
|
83482
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83482
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/equalByQuery.js
|
|
83483
83483
|
function equalByQuery(query, _a22, _b, variables) {
|
|
83484
83484
|
var aData = _a22.data, aRest = __rest(_a22, ["data"]);
|
|
83485
83485
|
var bData = _b.data, bRest = __rest(_b, ["data"]);
|
|
@@ -83552,7 +83552,7 @@ spurious results.`);
|
|
|
83552
83552
|
return dir.name.value === "nonreactive";
|
|
83553
83553
|
}
|
|
83554
83554
|
|
|
83555
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83555
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/core/cache.js
|
|
83556
83556
|
var ApolloCache = (
|
|
83557
83557
|
/** @class */
|
|
83558
83558
|
(function() {
|
|
@@ -83684,7 +83684,7 @@ spurious results.`);
|
|
|
83684
83684
|
ApolloCache.prototype.getMemoryInternals = getApolloCacheMemoryInternals;
|
|
83685
83685
|
}
|
|
83686
83686
|
|
|
83687
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83687
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/core/types/common.js
|
|
83688
83688
|
var MissingFieldError = (
|
|
83689
83689
|
/** @class */
|
|
83690
83690
|
(function(_super) {
|
|
@@ -83711,7 +83711,7 @@ spurious results.`);
|
|
|
83711
83711
|
})(Error)
|
|
83712
83712
|
);
|
|
83713
83713
|
|
|
83714
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83714
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/helpers.js
|
|
83715
83715
|
var hasOwn = Object.prototype.hasOwnProperty;
|
|
83716
83716
|
function isNullish(value) {
|
|
83717
83717
|
return value === null || value === void 0;
|
|
@@ -83787,7 +83787,7 @@ spurious results.`);
|
|
|
83787
83787
|
};
|
|
83788
83788
|
}
|
|
83789
83789
|
|
|
83790
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
83790
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/entityStore.js
|
|
83791
83791
|
var DELETE = /* @__PURE__ */ Object.create(null);
|
|
83792
83792
|
var delModifier = function() {
|
|
83793
83793
|
return DELETE;
|
|
@@ -84304,7 +84304,7 @@ spurious results.`);
|
|
|
84304
84304
|
return !!(store instanceof EntityStore && store.group.caching);
|
|
84305
84305
|
}
|
|
84306
84306
|
|
|
84307
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
84307
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/object-canon.js
|
|
84308
84308
|
function shallowCopy(value) {
|
|
84309
84309
|
if (isNonNullObject(value)) {
|
|
84310
84310
|
return isArray2(value) ? value.slice(0) : __assign({ __proto__: Object.getPrototypeOf(value) }, value);
|
|
@@ -84398,7 +84398,7 @@ spurious results.`);
|
|
|
84398
84398
|
})()
|
|
84399
84399
|
);
|
|
84400
84400
|
|
|
84401
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
84401
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/readFromStore.js
|
|
84402
84402
|
function execSelectionSetKeyArgs(options) {
|
|
84403
84403
|
return [
|
|
84404
84404
|
options.selectionSet,
|
|
@@ -84667,7 +84667,7 @@ spurious results.`);
|
|
|
84667
84667
|
}
|
|
84668
84668
|
}
|
|
84669
84669
|
|
|
84670
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
84670
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/reactiveVars.js
|
|
84671
84671
|
var cacheSlot = new Slot();
|
|
84672
84672
|
var cacheInfoMap = /* @__PURE__ */ new WeakMap();
|
|
84673
84673
|
function getCacheInfo(cache) {
|
|
@@ -84738,7 +84738,7 @@ spurious results.`);
|
|
|
84738
84738
|
}
|
|
84739
84739
|
}
|
|
84740
84740
|
|
|
84741
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
84741
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/key-extractor.js
|
|
84742
84742
|
var specifierInfoCache = /* @__PURE__ */ Object.create(null);
|
|
84743
84743
|
function lookupSpecifierInfo(spec) {
|
|
84744
84744
|
var cacheKey = JSON.stringify(spec);
|
|
@@ -84871,7 +84871,7 @@ spurious results.`);
|
|
|
84871
84871
|
return value;
|
|
84872
84872
|
}
|
|
84873
84873
|
|
|
84874
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
84874
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/policies.js
|
|
84875
84875
|
function argsFromFieldSpecifier(spec) {
|
|
84876
84876
|
return spec.args !== void 0 ? spec.args : spec.field ? argumentsObjectFromField(spec.field, spec.variables) : null;
|
|
84877
84877
|
}
|
|
@@ -85306,7 +85306,7 @@ spurious results.`);
|
|
|
85306
85306
|
};
|
|
85307
85307
|
}
|
|
85308
85308
|
|
|
85309
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
85309
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/writeToStore.js
|
|
85310
85310
|
function getContextFlavor(context, clientOnly, deferred) {
|
|
85311
85311
|
var key = "".concat(clientOnly).concat(deferred);
|
|
85312
85312
|
var flavored = context.flavors.get(key);
|
|
@@ -85711,7 +85711,7 @@ spurious results.`);
|
|
|
85711
85711
|
globalThis.__DEV__ !== false && invariant2.warn(14, fieldName, parentType, childTypenames.length ? "either ensure all objects of type " + childTypenames.join(" and ") + " have an ID or a custom merge function, or " : "", typeDotName, __assign({}, existing), __assign({}, incoming));
|
|
85712
85712
|
}
|
|
85713
85713
|
|
|
85714
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
85714
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js
|
|
85715
85715
|
var InMemoryCache = (
|
|
85716
85716
|
/** @class */
|
|
85717
85717
|
(function(_super) {
|
|
@@ -86020,7 +86020,7 @@ spurious results.`);
|
|
|
86020
86020
|
InMemoryCache.prototype.getMemoryInternals = getInMemoryCacheMemoryInternals;
|
|
86021
86021
|
}
|
|
86022
86022
|
|
|
86023
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
86023
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/networkStatus.js
|
|
86024
86024
|
var NetworkStatus;
|
|
86025
86025
|
(function(NetworkStatus2) {
|
|
86026
86026
|
NetworkStatus2[NetworkStatus2["loading"] = 1] = "loading";
|
|
@@ -86035,7 +86035,7 @@ spurious results.`);
|
|
|
86035
86035
|
return networkStatus ? networkStatus < 7 : false;
|
|
86036
86036
|
}
|
|
86037
86037
|
|
|
86038
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
86038
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/ObservableQuery.js
|
|
86039
86039
|
var assign2 = Object.assign;
|
|
86040
86040
|
var hasOwnProperty7 = Object.hasOwnProperty;
|
|
86041
86041
|
var ObservableQuery = (
|
|
@@ -86643,7 +86643,7 @@ spurious results.`);
|
|
|
86643
86643
|
return fetchPolicy === "network-only" || fetchPolicy === "no-cache" || fetchPolicy === "standby";
|
|
86644
86644
|
}
|
|
86645
86645
|
|
|
86646
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
86646
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/QueryInfo.js
|
|
86647
86647
|
var destructiveMethodCounts = new (canUseWeakMap ? WeakMap : Map)();
|
|
86648
86648
|
function wrapDestructiveCacheMethod(cache, methodName) {
|
|
86649
86649
|
var original = cache[methodName];
|
|
@@ -86935,7 +86935,7 @@ spurious results.`);
|
|
|
86935
86935
|
return writeWithErrors;
|
|
86936
86936
|
}
|
|
86937
86937
|
|
|
86938
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
86938
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/QueryManager.js
|
|
86939
86939
|
var hasOwnProperty8 = Object.prototype.hasOwnProperty;
|
|
86940
86940
|
var IGNORE = /* @__PURE__ */ Object.create(null);
|
|
86941
86941
|
var QueryManager = (
|
|
@@ -87921,7 +87921,7 @@ spurious results.`);
|
|
|
87921
87921
|
})()
|
|
87922
87922
|
);
|
|
87923
87923
|
|
|
87924
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
87924
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/LocalState.js
|
|
87925
87925
|
var LocalState = (
|
|
87926
87926
|
/** @class */
|
|
87927
87927
|
(function() {
|
|
@@ -88271,7 +88271,7 @@ spurious results.`);
|
|
|
88271
88271
|
})()
|
|
88272
88272
|
);
|
|
88273
88273
|
|
|
88274
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
88274
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/ApolloClient.js
|
|
88275
88275
|
var hasSuggestedDevtools = false;
|
|
88276
88276
|
var ApolloClient = (
|
|
88277
88277
|
/** @class */
|
|
@@ -88673,7 +88673,7 @@ spurious results.`);
|
|
|
88673
88673
|
})(gql || (gql = {}));
|
|
88674
88674
|
gql["default"] = gql;
|
|
88675
88675
|
|
|
88676
|
-
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.
|
|
88676
|
+
// node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/core/index.js
|
|
88677
88677
|
setVerbosity(globalThis.__DEV__ !== false ? "log" : "silent");
|
|
88678
88678
|
|
|
88679
88679
|
// src/modules/apollo-client-config.ts
|
|
@@ -105378,6 +105378,7 @@ spurious results.`);
|
|
|
105378
105378
|
notARisks: getNoRiskTags(_lstPoolRiskFactors)
|
|
105379
105379
|
},
|
|
105380
105380
|
apyMethodology: "APY based on 30-day historical performance, including fees and rewards.",
|
|
105381
|
+
realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
|
|
105381
105382
|
additionalInfo: {
|
|
105382
105383
|
newBounds: {
|
|
105383
105384
|
lower: -1,
|
|
@@ -105530,6 +105531,7 @@ spurious results.`);
|
|
|
105530
105531
|
),
|
|
105531
105532
|
Global.getDefaultTokens().find((t) => t.symbol === params.depositToken1Symbol)
|
|
105532
105533
|
],
|
|
105534
|
+
realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
|
|
105533
105535
|
additionalInfo: {
|
|
105534
105536
|
...xSTRKSTRK.additionalInfo,
|
|
105535
105537
|
quoteAsset: Global.getDefaultTokens().find(
|
|
@@ -119205,7 +119207,6 @@ spurious results.`);
|
|
|
119205
119207
|
const containerStyle = {
|
|
119206
119208
|
maxWidth: "800px",
|
|
119207
119209
|
margin: "0 auto",
|
|
119208
|
-
backgroundColor: "#111",
|
|
119209
119210
|
color: "#eee",
|
|
119210
119211
|
fontFamily: "Arial, sans-serif",
|
|
119211
119212
|
borderRadius: "12px"
|
|
@@ -119398,6 +119399,7 @@ spurious results.`);
|
|
|
119398
119399
|
risk: getUniversalRisk(),
|
|
119399
119400
|
auditUrl: AUDIT_URL3,
|
|
119400
119401
|
protocols: [Protocols.VESU],
|
|
119402
|
+
realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
|
|
119401
119403
|
curator: {
|
|
119402
119404
|
name: "Unwrap Labs",
|
|
119403
119405
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
@@ -119505,23 +119507,36 @@ spurious results.`);
|
|
|
119505
119507
|
constructor(config3, pricer, metadata) {
|
|
119506
119508
|
super(config3, pricer, metadata);
|
|
119507
119509
|
this.quoteAmountToFetchPrice = new Web3Number(1, 18);
|
|
119508
|
-
const STRKToken = Global.getDefaultTokens().find(
|
|
119510
|
+
const STRKToken = Global.getDefaultTokens().find(
|
|
119511
|
+
(token) => token.symbol === "STRK"
|
|
119512
|
+
);
|
|
119509
119513
|
const underlyingToken = this.getLSTUnderlyingTokenInfo();
|
|
119510
119514
|
if (underlyingToken.address.eq(STRKToken.address)) {
|
|
119511
119515
|
this.quoteAmountToFetchPrice = new Web3Number(100, 18);
|
|
119512
119516
|
} else {
|
|
119513
|
-
this.quoteAmountToFetchPrice = new Web3Number(
|
|
119517
|
+
this.quoteAmountToFetchPrice = new Web3Number(
|
|
119518
|
+
0.01,
|
|
119519
|
+
this.asset().decimals
|
|
119520
|
+
);
|
|
119514
119521
|
}
|
|
119515
119522
|
}
|
|
119516
119523
|
asset() {
|
|
119517
|
-
return this.getVesuSameTokenAdapter(
|
|
119524
|
+
return this.getVesuSameTokenAdapter(
|
|
119525
|
+
this.metadata.additionalInfo.defaultPoolId
|
|
119526
|
+
).config.collateral;
|
|
119518
119527
|
}
|
|
119519
119528
|
getTag() {
|
|
119520
119529
|
return `${_UniversalLstMultiplierStrategy.name}:${this.metadata.name}`;
|
|
119521
119530
|
}
|
|
119522
119531
|
// Vesu adapter with LST and base token match
|
|
119523
119532
|
getVesuSameTokenAdapter(poolId) {
|
|
119524
|
-
const baseAdapter = this.getAdapter(
|
|
119533
|
+
const baseAdapter = this.getAdapter(
|
|
119534
|
+
getVesuLegId(
|
|
119535
|
+
"vesu_leg1" /* VESU_LEG1 */,
|
|
119536
|
+
this.metadata.additionalInfo.underlyingToken.symbol,
|
|
119537
|
+
poolId.toString()
|
|
119538
|
+
)
|
|
119539
|
+
);
|
|
119525
119540
|
baseAdapter.networkConfig = this.config;
|
|
119526
119541
|
baseAdapter.pricer = this.pricer;
|
|
119527
119542
|
return baseAdapter;
|
|
@@ -119564,27 +119579,43 @@ spurious results.`);
|
|
|
119564
119579
|
lstUnderlyingTokenInfo.address.address,
|
|
119565
119580
|
this.quoteAmountToFetchPrice
|
|
119566
119581
|
);
|
|
119567
|
-
const outputAmount = Web3Number.fromWei(
|
|
119582
|
+
const outputAmount = Web3Number.fromWei(
|
|
119583
|
+
quote.total_calculated,
|
|
119584
|
+
lstUnderlyingTokenInfo.decimals
|
|
119585
|
+
);
|
|
119568
119586
|
const price = outputAmount.toNumber() / this.quoteAmountToFetchPrice.toNumber();
|
|
119569
119587
|
logger2.verbose(`${this.getTag()}:: LST Dex Price: ${price}`);
|
|
119570
119588
|
return price;
|
|
119571
119589
|
}
|
|
119572
119590
|
async getAvnuSwapMultiplyCall(params) {
|
|
119573
|
-
assert3(
|
|
119574
|
-
|
|
119591
|
+
assert3(
|
|
119592
|
+
params.isDeposit,
|
|
119593
|
+
"Only deposit is supported in getAvnuSwapMultiplyCall"
|
|
119594
|
+
);
|
|
119595
|
+
const maxBorrowableAmounts = await this.getMaxBorrowableAmount({
|
|
119596
|
+
isAPYComputation: false
|
|
119597
|
+
});
|
|
119575
119598
|
const allVesuAdapters = this.getVesuAdapters();
|
|
119576
119599
|
let remainingAmount = params.leg1DepositAmount;
|
|
119577
119600
|
const lstExRate = await this.getLSTExchangeRate();
|
|
119578
|
-
const baseAssetPrice = await this.pricer.getPrice(
|
|
119601
|
+
const baseAssetPrice = await this.pricer.getPrice(
|
|
119602
|
+
this.getLSTUnderlyingTokenInfo().symbol
|
|
119603
|
+
);
|
|
119579
119604
|
const lstPrice = baseAssetPrice.price * lstExRate;
|
|
119580
119605
|
for (let i = 0; i < maxBorrowableAmounts.maxBorrowables.length; i++) {
|
|
119581
119606
|
const maxBorrowable = maxBorrowableAmounts.maxBorrowables[i];
|
|
119582
|
-
const vesuAdapter = allVesuAdapters.find(
|
|
119607
|
+
const vesuAdapter = allVesuAdapters.find(
|
|
119608
|
+
(adapter2) => adapter2.config.debt.address.eq(maxBorrowable.borrowableAsset.address)
|
|
119609
|
+
);
|
|
119583
119610
|
if (!vesuAdapter) {
|
|
119584
|
-
throw new Error(
|
|
119611
|
+
throw new Error(
|
|
119612
|
+
`${this.getTag()}::getAvnuSwapMultiplyCall: vesuAdapter not found for borrowable asset: ${maxBorrowable.borrowableAsset.symbol}`
|
|
119613
|
+
);
|
|
119585
119614
|
}
|
|
119586
119615
|
const maxLTV = await vesuAdapter.getLTVConfig(this.config);
|
|
119587
|
-
const debtPrice = await this.pricer.getPrice(
|
|
119616
|
+
const debtPrice = await this.pricer.getPrice(
|
|
119617
|
+
maxBorrowable.borrowableAsset.symbol
|
|
119618
|
+
);
|
|
119588
119619
|
const maxAmountToDeposit = HealthFactorMath.getMinCollateralRequiredOnLooping(
|
|
119589
119620
|
maxBorrowable.amount,
|
|
119590
119621
|
debtPrice.price,
|
|
@@ -119594,7 +119625,9 @@ spurious results.`);
|
|
|
119594
119625
|
this.asset()
|
|
119595
119626
|
);
|
|
119596
119627
|
const amountToDeposit = remainingAmount.minimum(maxAmountToDeposit);
|
|
119597
|
-
logger2.verbose(
|
|
119628
|
+
logger2.verbose(
|
|
119629
|
+
`${this.getTag()}::getAvnuSwapMultiplyCall::${vesuAdapter.config.debt.symbol}:: remainingAmount: ${remainingAmount}, amountToDeposit: ${amountToDeposit}, depositAmount: ${amountToDeposit}, maxBorrowable: ${maxBorrowable.amount}`
|
|
119630
|
+
);
|
|
119598
119631
|
const call = await this._getAvnuDepositSwapLegCall({
|
|
119599
119632
|
isDeposit: params.isDeposit,
|
|
119600
119633
|
// adjust decimals of debt asset
|
|
@@ -119606,36 +119639,60 @@ spurious results.`);
|
|
|
119606
119639
|
remainingAmount = remainingAmount.minus(amountToDeposit);
|
|
119607
119640
|
return { call, vesuAdapter };
|
|
119608
119641
|
}
|
|
119609
|
-
throw new Error(
|
|
119642
|
+
throw new Error(
|
|
119643
|
+
`${this.getTag()}::getAvnuSwapMultiplyCall: no calls found`
|
|
119644
|
+
);
|
|
119610
119645
|
}
|
|
119611
119646
|
async _getAvnuDepositSwapLegCall(params) {
|
|
119612
119647
|
const { vesuAdapter } = params;
|
|
119613
|
-
logger2.verbose(
|
|
119614
|
-
|
|
119648
|
+
logger2.verbose(
|
|
119649
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall params: ${JSON.stringify(params)}`
|
|
119650
|
+
);
|
|
119651
|
+
assert3(
|
|
119652
|
+
params.isDeposit,
|
|
119653
|
+
"Only deposit is supported in _getAvnuDepositSwapLegCall"
|
|
119654
|
+
);
|
|
119615
119655
|
const legLTV = await vesuAdapter.getLTVConfig(this.config);
|
|
119616
|
-
logger2.verbose(
|
|
119656
|
+
logger2.verbose(
|
|
119657
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall legLTV: ${legLTV}`
|
|
119658
|
+
);
|
|
119617
119659
|
const existingPositions = await vesuAdapter.getPositions(this.config);
|
|
119618
|
-
const collateralisation = await vesuAdapter.getCollateralization(
|
|
119660
|
+
const collateralisation = await vesuAdapter.getCollateralization(
|
|
119661
|
+
this.config
|
|
119662
|
+
);
|
|
119619
119663
|
const existingCollateralInfo = existingPositions[0];
|
|
119620
119664
|
const existingDebtInfo = existingPositions[1];
|
|
119621
119665
|
logger2.debug(`${this.getTag()}::_getAvnuDepositSwapLegCall existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
|
|
119622
119666
|
existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
|
|
119623
119667
|
const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
|
|
119624
119668
|
const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
|
|
119625
|
-
logger2.debug(
|
|
119669
|
+
logger2.debug(
|
|
119670
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`
|
|
119671
|
+
);
|
|
119626
119672
|
const debtTokenInfo = vesuAdapter.config.debt;
|
|
119627
119673
|
let newDepositAmount = params.leg1DepositAmount;
|
|
119628
|
-
const totalCollateral = existingCollateralInfo.amount.plus(
|
|
119629
|
-
|
|
119674
|
+
const totalCollateral = existingCollateralInfo.amount.plus(
|
|
119675
|
+
params.leg1DepositAmount
|
|
119676
|
+
);
|
|
119677
|
+
logger2.verbose(
|
|
119678
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall totalCollateral: ${totalCollateral}`
|
|
119679
|
+
);
|
|
119630
119680
|
const totalDebtAmount = new Web3Number(
|
|
119631
119681
|
totalCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(debtPrice).dividedBy(params.minHF).toString(),
|
|
119632
119682
|
debtTokenInfo.decimals
|
|
119633
119683
|
);
|
|
119634
119684
|
let debtAmount = totalDebtAmount.minus(existingDebtInfo.amount);
|
|
119635
|
-
logger2.verbose(
|
|
119636
|
-
|
|
119685
|
+
logger2.verbose(
|
|
119686
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall totalDebtAmount: ${totalDebtAmount}, initial computed debt: ${debtAmount}`
|
|
119687
|
+
);
|
|
119688
|
+
const maxBorrowable = await this.getMaxBorrowableAmountByVesuAdapter(
|
|
119689
|
+
vesuAdapter,
|
|
119690
|
+
false
|
|
119691
|
+
);
|
|
119637
119692
|
if (debtAmount.gt(0) && maxBorrowable.amount.eq(0)) {
|
|
119638
|
-
logger2.verbose(
|
|
119693
|
+
logger2.verbose(
|
|
119694
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall maxBorrowable is 0, skipping`
|
|
119695
|
+
);
|
|
119639
119696
|
return void 0;
|
|
119640
119697
|
} else if (debtAmount.gt(0) && maxBorrowable.amount.gt(0)) {
|
|
119641
119698
|
debtAmount = maxBorrowable.amount.minimum(debtAmount);
|
|
@@ -119648,16 +119705,24 @@ spurious results.`);
|
|
|
119648
119705
|
collateralPrice,
|
|
119649
119706
|
this.asset()
|
|
119650
119707
|
);
|
|
119651
|
-
newDepositAmount = totalCollateralRequired.minus(
|
|
119708
|
+
newDepositAmount = totalCollateralRequired.minus(
|
|
119709
|
+
existingCollateralInfo.amount
|
|
119710
|
+
);
|
|
119652
119711
|
if (newDepositAmount.lt(0)) {
|
|
119653
|
-
throw new Error(
|
|
119712
|
+
throw new Error(
|
|
119713
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall newDepositAmount is less than 0, newDepositAmount: ${newDepositAmount}, totalCollateralRequired: ${totalCollateralRequired}, existingCollateralInfo.amount: ${existingCollateralInfo.amount}`
|
|
119714
|
+
);
|
|
119654
119715
|
}
|
|
119655
119716
|
if (newDebtUSDValue.toNumber() < 100) {
|
|
119656
|
-
logger2.verbose(
|
|
119717
|
+
logger2.verbose(
|
|
119718
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall newDebtUSDValue is less than 100, skipping`
|
|
119719
|
+
);
|
|
119657
119720
|
return void 0;
|
|
119658
119721
|
}
|
|
119659
119722
|
}
|
|
119660
|
-
logger2.verbose(
|
|
119723
|
+
logger2.verbose(
|
|
119724
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall debtAmount: ${debtAmount}`
|
|
119725
|
+
);
|
|
119661
119726
|
if (debtAmount.lt(0)) {
|
|
119662
119727
|
const lstDEXPrice = await this.getLSTDexPrice();
|
|
119663
119728
|
const debtAmountInLST = debtAmount.abs().dividedBy(lstDEXPrice);
|
|
@@ -119666,7 +119731,10 @@ spurious results.`);
|
|
|
119666
119731
|
leg1DepositAmount: debtAmountInLST,
|
|
119667
119732
|
poolId: vesuAdapter.config.poolId
|
|
119668
119733
|
});
|
|
119669
|
-
assert3(
|
|
119734
|
+
assert3(
|
|
119735
|
+
calls.length == 1,
|
|
119736
|
+
`Expected 1 call for unwind, got ${calls.length}`
|
|
119737
|
+
);
|
|
119670
119738
|
return calls[0];
|
|
119671
119739
|
}
|
|
119672
119740
|
const STEP0 = "approve_token1" /* APPROVE_TOKEN1 */;
|
|
@@ -119674,18 +119742,27 @@ spurious results.`);
|
|
|
119674
119742
|
const manageCall0 = manage0Info.callConstructor({
|
|
119675
119743
|
amount: newDepositAmount
|
|
119676
119744
|
});
|
|
119677
|
-
const STEP1 = getVesuLegId(
|
|
119745
|
+
const STEP1 = getVesuLegId(
|
|
119746
|
+
"vesu_leg1" /* VESU_LEG1 */,
|
|
119747
|
+
vesuAdapter.config.debt.symbol,
|
|
119748
|
+
vesuAdapter.config.poolId.toString()
|
|
119749
|
+
);
|
|
119678
119750
|
const manage1Info = this.getProofs(STEP1);
|
|
119679
|
-
const manageCall1 = manage1Info.callConstructor(
|
|
119680
|
-
|
|
119681
|
-
|
|
119682
|
-
|
|
119683
|
-
|
|
119684
|
-
|
|
119751
|
+
const manageCall1 = manage1Info.callConstructor(
|
|
119752
|
+
VesuAdapter.getDefaultModifyPositionCallParams({
|
|
119753
|
+
collateralAmount: newDepositAmount,
|
|
119754
|
+
isAddCollateral: params.isDeposit,
|
|
119755
|
+
debtAmount,
|
|
119756
|
+
isBorrow: params.isDeposit
|
|
119757
|
+
})
|
|
119758
|
+
);
|
|
119685
119759
|
const proofIds = [STEP0, STEP1];
|
|
119686
119760
|
const manageCalls = [manageCall0, manageCall1];
|
|
119687
119761
|
if (debtAmount.gt(0)) {
|
|
119688
|
-
const STEP2 = getAvnuManageIDs(
|
|
119762
|
+
const STEP2 = getAvnuManageIDs(
|
|
119763
|
+
"avnu_mul_approve_dep" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */,
|
|
119764
|
+
vesuAdapter.config.debt.symbol
|
|
119765
|
+
);
|
|
119689
119766
|
const manage2Info = this.getProofs(STEP2);
|
|
119690
119767
|
const manageCall2 = manage2Info.callConstructor({
|
|
119691
119768
|
amount: debtAmount
|
|
@@ -119701,7 +119778,9 @@ spurious results.`);
|
|
|
119701
119778
|
);
|
|
119702
119779
|
const minAmount = await this._getMinOutputAmountLSTBuy(debtAmount);
|
|
119703
119780
|
const minAmountWei = minAmount.toWei();
|
|
119704
|
-
logger2.verbose(
|
|
119781
|
+
logger2.verbose(
|
|
119782
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall minAmount: ${minAmount}`
|
|
119783
|
+
);
|
|
119705
119784
|
const swapInfo = await avnuModule.getSwapInfo(
|
|
119706
119785
|
quote,
|
|
119707
119786
|
this.metadata.additionalInfo.vaultAllocator.address,
|
|
@@ -119709,8 +119788,13 @@ spurious results.`);
|
|
|
119709
119788
|
this.address.address,
|
|
119710
119789
|
minAmountWei
|
|
119711
119790
|
);
|
|
119712
|
-
logger2.verbose(
|
|
119713
|
-
|
|
119791
|
+
logger2.verbose(
|
|
119792
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall swapInfo: ${JSON.stringify(swapInfo)}`
|
|
119793
|
+
);
|
|
119794
|
+
const STEP3 = getAvnuManageIDs(
|
|
119795
|
+
"avnu_mul_swap_dep" /* AVNU_MULTIPLY_SWAP_DEPOSIT */,
|
|
119796
|
+
vesuAdapter.config.debt.symbol
|
|
119797
|
+
);
|
|
119714
119798
|
const manage3Info = this.getProofs(STEP3);
|
|
119715
119799
|
const manageCall3 = manage3Info.callConstructor({
|
|
119716
119800
|
props: swapInfo
|
|
@@ -119720,22 +119804,32 @@ spurious results.`);
|
|
|
119720
119804
|
manageCalls.push(manageCall2, manageCall3);
|
|
119721
119805
|
const newCollateral = minAmount.plus(totalCollateral);
|
|
119722
119806
|
const newHF = newCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(totalDebtAmount).dividedBy(debtPrice).toNumber();
|
|
119723
|
-
logger2.verbose(
|
|
119807
|
+
logger2.verbose(
|
|
119808
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall newHF: ${newHF}`
|
|
119809
|
+
);
|
|
119724
119810
|
if (newHF > this.metadata.additionalInfo.minHealthFactor && newHF < this.metadata.additionalInfo.targetHealthFactor + 0.05) {
|
|
119725
|
-
logger2.verbose(
|
|
119811
|
+
logger2.verbose(
|
|
119812
|
+
`${this.getTag()}::_getAvnuDepositSwapLegCall newHF is above min and below target + 0.05, adding collateral on vesu`
|
|
119813
|
+
);
|
|
119726
119814
|
const STEP4 = "approve_token1" /* APPROVE_TOKEN1 */;
|
|
119727
119815
|
const manage4Info = this.getProofs(STEP4);
|
|
119728
119816
|
const manageCall4 = manage4Info.callConstructor({
|
|
119729
119817
|
amount: minAmount
|
|
119730
119818
|
});
|
|
119731
|
-
const STEP5 = getVesuLegId(
|
|
119819
|
+
const STEP5 = getVesuLegId(
|
|
119820
|
+
"vesu_leg1" /* VESU_LEG1 */,
|
|
119821
|
+
vesuAdapter.config.debt.symbol,
|
|
119822
|
+
vesuAdapter.config.poolId.toString()
|
|
119823
|
+
);
|
|
119732
119824
|
const manage5Info = this.getProofs(STEP5);
|
|
119733
|
-
const manageCall5 = manage5Info.callConstructor(
|
|
119734
|
-
|
|
119735
|
-
|
|
119736
|
-
|
|
119737
|
-
|
|
119738
|
-
|
|
119825
|
+
const manageCall5 = manage5Info.callConstructor(
|
|
119826
|
+
VesuAdapter.getDefaultModifyPositionCallParams({
|
|
119827
|
+
collateralAmount: minAmount,
|
|
119828
|
+
isAddCollateral: true,
|
|
119829
|
+
debtAmount: Web3Number.fromWei("0", this.asset().decimals),
|
|
119830
|
+
isBorrow: params.isDeposit
|
|
119831
|
+
})
|
|
119832
|
+
);
|
|
119739
119833
|
proofIds.push(STEP4, STEP5);
|
|
119740
119834
|
manageCalls.push(manageCall4, manageCall5);
|
|
119741
119835
|
}
|
|
@@ -119743,11 +119837,13 @@ spurious results.`);
|
|
|
119743
119837
|
const manageCall = this.getManageCall(proofIds, manageCalls);
|
|
119744
119838
|
return manageCall;
|
|
119745
119839
|
}
|
|
119746
|
-
// todo unwind or not deposit when the yield is bad.
|
|
119840
|
+
// todo unwind or not deposit when the yield is bad.
|
|
119747
119841
|
async getLSTMultiplierRebalanceCall() {
|
|
119748
119842
|
let shouldRebalance = false;
|
|
119749
119843
|
const calls = [];
|
|
119750
|
-
const allVesuAdapters = this.getVesuAdapters().filter(
|
|
119844
|
+
const allVesuAdapters = this.getVesuAdapters().filter(
|
|
119845
|
+
(vesuAdapter) => vesuAdapter.config.debt.symbol === "LBTC"
|
|
119846
|
+
);
|
|
119751
119847
|
for (const vesuAdapter of allVesuAdapters) {
|
|
119752
119848
|
const call = await this._getLSTMultiplierRebalanceCall(vesuAdapter);
|
|
119753
119849
|
if (call.shouldRebalance && call.manageCall) {
|
|
@@ -119759,18 +119855,27 @@ spurious results.`);
|
|
|
119759
119855
|
}
|
|
119760
119856
|
async _getLSTMultiplierRebalanceCall(vesuAdapter) {
|
|
119761
119857
|
const positions = await vesuAdapter.getPositions(this.config);
|
|
119762
|
-
assert3(
|
|
119858
|
+
assert3(
|
|
119859
|
+
positions.length == 2,
|
|
119860
|
+
"Rebalance call is only supported for 2 positions"
|
|
119861
|
+
);
|
|
119763
119862
|
const existingCollateralInfo = positions[0];
|
|
119764
119863
|
const existingDebtInfo = positions[1];
|
|
119765
119864
|
const unusedBalance = await this.getUnusedBalance();
|
|
119766
119865
|
const healthFactor = await vesuAdapter.getHealthFactor();
|
|
119767
|
-
const collateralisation = await vesuAdapter.getCollateralization(
|
|
119866
|
+
const collateralisation = await vesuAdapter.getCollateralization(
|
|
119867
|
+
this.config
|
|
119868
|
+
);
|
|
119768
119869
|
logger2.debug(`${this.getTag()}::getVesuMultiplyCall::${vesuAdapter.config.debt.symbol} existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
|
|
119769
119870
|
existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
|
|
119770
119871
|
const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
|
|
119771
119872
|
const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
|
|
119772
|
-
logger2.debug(
|
|
119773
|
-
|
|
119873
|
+
logger2.debug(
|
|
119874
|
+
`${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`
|
|
119875
|
+
);
|
|
119876
|
+
logger2.debug(
|
|
119877
|
+
`${this.getTag()}::getVesuMultiplyCall healthFactor: ${healthFactor}`
|
|
119878
|
+
);
|
|
119774
119879
|
const isHFTooLow = healthFactor < this.metadata.additionalInfo.minHealthFactor;
|
|
119775
119880
|
const isHFTooHigh = healthFactor > this.metadata.additionalInfo.targetHealthFactor + 0.05;
|
|
119776
119881
|
if (isHFTooLow || isHFTooHigh || 1) {
|
|
@@ -119778,7 +119883,7 @@ spurious results.`);
|
|
|
119778
119883
|
isDeposit: true,
|
|
119779
119884
|
leg1DepositAmount: unusedBalance.amount,
|
|
119780
119885
|
minHF: 1.02,
|
|
119781
|
-
// todo, shouldnt use this 1.02 HF, if there isn;t more looping left.
|
|
119886
|
+
// todo, shouldnt use this 1.02 HF, if there isn;t more looping left.
|
|
119782
119887
|
vesuAdapter
|
|
119783
119888
|
});
|
|
119784
119889
|
return { shouldRebalance: true, manageCall };
|
|
@@ -119789,29 +119894,44 @@ spurious results.`);
|
|
|
119789
119894
|
async getVesuAUM(adapter2, priceType = "AVNU_PRICE" /* AVNU_PRICE */) {
|
|
119790
119895
|
const legAUM = await adapter2.getPositions(this.config);
|
|
119791
119896
|
const underlying = this.asset();
|
|
119792
|
-
assert3(
|
|
119897
|
+
assert3(
|
|
119898
|
+
underlying.symbol.startsWith("x"),
|
|
119899
|
+
"Underlying is not an LST of Endur"
|
|
119900
|
+
);
|
|
119793
119901
|
let vesuAum = Web3Number.fromWei("0", underlying.decimals);
|
|
119794
119902
|
let tokenUnderlyingPrice;
|
|
119795
119903
|
if (priceType === "ENDUR_PRICE" /* ENDUR_PRICE */) {
|
|
119796
119904
|
tokenUnderlyingPrice = await this.getLSTExchangeRate();
|
|
119797
119905
|
if (tokenUnderlyingPrice === 0) {
|
|
119798
|
-
throw new Error(
|
|
119906
|
+
throw new Error(
|
|
119907
|
+
`${this.getTag()}::getVesuAUM: tokenUnderlyingPrice (Endur) is 0`
|
|
119908
|
+
);
|
|
119799
119909
|
}
|
|
119800
119910
|
const avnuRate = await this.getLSTAvnuRate();
|
|
119801
119911
|
if (avnuRate === 0) {
|
|
119802
|
-
throw new Error(
|
|
119912
|
+
throw new Error(
|
|
119913
|
+
`${this.getTag()}::getVesuAUM: tokenUnderlyingPrice (Avnu) is 0`
|
|
119914
|
+
);
|
|
119803
119915
|
}
|
|
119804
119916
|
const diff = Math.abs(tokenUnderlyingPrice - avnuRate) / tokenUnderlyingPrice;
|
|
119805
119917
|
if (diff > 0.02) {
|
|
119806
|
-
throw new Error(
|
|
119918
|
+
throw new Error(
|
|
119919
|
+
`${this.getTag()}::getVesuAUM: Endur and Avnu prices differ by more than 2% (Endur: ${tokenUnderlyingPrice}, Avnu: ${avnuRate})`
|
|
119920
|
+
);
|
|
119807
119921
|
}
|
|
119808
|
-
logger2.verbose(
|
|
119922
|
+
logger2.verbose(
|
|
119923
|
+
`${this.getTag()} tokenUnderlyingPrice (Endur): ${tokenUnderlyingPrice}, avnuRate: ${avnuRate}, diff: ${diff}`
|
|
119924
|
+
);
|
|
119809
119925
|
} else {
|
|
119810
119926
|
tokenUnderlyingPrice = await this.getLSTAvnuRate();
|
|
119811
119927
|
if (tokenUnderlyingPrice === 0) {
|
|
119812
|
-
throw new Error(
|
|
119928
|
+
throw new Error(
|
|
119929
|
+
`${this.getTag()}::getVesuAUM: tokenUnderlyingPrice (Avnu) is 0`
|
|
119930
|
+
);
|
|
119813
119931
|
}
|
|
119814
|
-
logger2.verbose(
|
|
119932
|
+
logger2.verbose(
|
|
119933
|
+
`${this.getTag()} tokenUnderlyingPrice (Avnu): ${tokenUnderlyingPrice}`
|
|
119934
|
+
);
|
|
119815
119935
|
}
|
|
119816
119936
|
if (legAUM[0].token.address.eq(underlying.address)) {
|
|
119817
119937
|
vesuAum = vesuAum.plus(legAUM[0].amount);
|
|
@@ -119823,9 +119943,10 @@ spurious results.`);
|
|
|
119823
119943
|
} else {
|
|
119824
119944
|
vesuAum = vesuAum.minus(legAUM[1].amount.dividedBy(tokenUnderlyingPrice));
|
|
119825
119945
|
}
|
|
119826
|
-
;
|
|
119827
119946
|
const priceTypeLabel = priceType === "ENDUR_PRICE" /* ENDUR_PRICE */ ? "Endur Price" : "Avnu Price";
|
|
119828
|
-
logger2.verbose(
|
|
119947
|
+
logger2.verbose(
|
|
119948
|
+
`${this.getTag()} Vesu AUM (${priceTypeLabel}): ${vesuAum}, legCollateral: ${legAUM[0].amount.toNumber()}, legDebt: ${legAUM[1].amount.toNumber()}`
|
|
119949
|
+
);
|
|
119829
119950
|
return vesuAum;
|
|
119830
119951
|
}
|
|
119831
119952
|
async getTVLUnrealized() {
|
|
@@ -119856,11 +119977,11 @@ spurious results.`);
|
|
|
119856
119977
|
return minOutputAmount;
|
|
119857
119978
|
}
|
|
119858
119979
|
// todo add a function to findout max borrowable amount without fucking yield
|
|
119859
|
-
// if the current net yield < LST yield, add a function to calculate how much to unwind.
|
|
119980
|
+
// if the current net yield < LST yield, add a function to calculate how much to unwind.
|
|
119860
119981
|
/**
|
|
119861
119982
|
* Uses vesu's multiple call to create leverage on LST
|
|
119862
119983
|
* Deposit amount is in LST
|
|
119863
|
-
* @param params
|
|
119984
|
+
* @param params
|
|
119864
119985
|
*/
|
|
119865
119986
|
async getVesuMultiplyCall(params) {
|
|
119866
119987
|
const maxEkuboPriceImpact = params.maxEkuboPriceImpact || 0.01;
|
|
@@ -119869,32 +119990,54 @@ spurious results.`);
|
|
|
119869
119990
|
logger2.verbose(`${this.getTag()}::getVesuMultiplyCall legLTV: ${legLTV}`);
|
|
119870
119991
|
if (!params.isDeposit) {
|
|
119871
119992
|
const unusedBalance = await this.getUnusedBalance();
|
|
119872
|
-
logger2.verbose(
|
|
119993
|
+
logger2.verbose(
|
|
119994
|
+
`${this.getTag()}::getVesuMultiplyCall unusedBalance: ${unusedBalance.amount.toString()}, required: ${params.leg1DepositAmount.toString()}`
|
|
119995
|
+
);
|
|
119873
119996
|
}
|
|
119874
119997
|
const existingPositions = await vesuAdapter1.getPositions(this.config);
|
|
119875
|
-
const collateralisation = await vesuAdapter1.getCollateralization(
|
|
119998
|
+
const collateralisation = await vesuAdapter1.getCollateralization(
|
|
119999
|
+
this.config
|
|
120000
|
+
);
|
|
119876
120001
|
const existingCollateralInfo = existingPositions[0];
|
|
119877
120002
|
const existingDebtInfo = existingPositions[1];
|
|
119878
120003
|
logger2.debug(`${this.getTag()}::getVesuMultiplyCall existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
|
|
119879
120004
|
existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
|
|
119880
120005
|
const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
|
|
119881
120006
|
const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
|
|
119882
|
-
logger2.debug(
|
|
120007
|
+
logger2.debug(
|
|
120008
|
+
`${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`
|
|
120009
|
+
);
|
|
119883
120010
|
const dexPrice = await this.getLSTDexPrice();
|
|
119884
|
-
const addedCollateral = params.leg1DepositAmount.multipliedBy(
|
|
119885
|
-
|
|
120011
|
+
const addedCollateral = params.leg1DepositAmount.multipliedBy(
|
|
120012
|
+
params.isDeposit ? 1 : -1
|
|
120013
|
+
);
|
|
120014
|
+
logger2.verbose(
|
|
120015
|
+
`${this.getTag()}::getVesuMultiplyCall addedCollateral: ${addedCollateral}`
|
|
120016
|
+
);
|
|
119886
120017
|
const numeratorPart1 = existingCollateralInfo.amount.plus(addedCollateral).multipliedBy(collateralPrice).multipliedBy(legLTV);
|
|
119887
|
-
logger2.verbose(
|
|
120018
|
+
logger2.verbose(
|
|
120019
|
+
`${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}`
|
|
120020
|
+
);
|
|
119888
120021
|
const numeratorPart2 = existingDebtInfo.amount.multipliedBy(debtPrice).multipliedBy(this.metadata.additionalInfo.targetHealthFactor);
|
|
119889
|
-
logger2.verbose(
|
|
120022
|
+
logger2.verbose(
|
|
120023
|
+
`${this.getTag()}::getVesuMultiplyCall numeratorPart2: ${numeratorPart2}`
|
|
120024
|
+
);
|
|
119890
120025
|
const denominatorPart = this.metadata.additionalInfo.targetHealthFactor - legLTV / dexPrice;
|
|
119891
|
-
logger2.verbose(
|
|
120026
|
+
logger2.verbose(
|
|
120027
|
+
`${this.getTag()}::getVesuMultiplyCall denominatorPart: ${denominatorPart}`
|
|
120028
|
+
);
|
|
119892
120029
|
const x_debt_usd = numeratorPart1.minus(numeratorPart2).dividedBy(denominatorPart);
|
|
119893
|
-
logger2.verbose(
|
|
119894
|
-
|
|
120030
|
+
logger2.verbose(
|
|
120031
|
+
`${this.getTag()}::getVesuMultiplyCall x_debt_usd: ${x_debt_usd}`
|
|
120032
|
+
);
|
|
120033
|
+
logger2.debug(
|
|
120034
|
+
`${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}, numeratorPart2: ${numeratorPart2}, denominatorPart: ${denominatorPart}`
|
|
120035
|
+
);
|
|
119895
120036
|
let debtAmount = x_debt_usd.dividedBy(debtPrice);
|
|
119896
120037
|
const marginAmount = addedCollateral;
|
|
119897
|
-
logger2.verbose(
|
|
120038
|
+
logger2.verbose(
|
|
120039
|
+
`${this.getTag()}::getVesuMultiplyCall debtAmount: ${debtAmount}, marginAmount: ${marginAmount}`
|
|
120040
|
+
);
|
|
119898
120041
|
if (marginAmount.lt(0) && debtAmount.gt(0)) {
|
|
119899
120042
|
debtAmount = Web3Number.fromWei(0, this.asset().decimals);
|
|
119900
120043
|
}
|
|
@@ -119908,31 +120051,49 @@ spurious results.`);
|
|
|
119908
120051
|
});
|
|
119909
120052
|
}
|
|
119910
120053
|
getLSTUnderlyingTokenInfo() {
|
|
119911
|
-
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120054
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120055
|
+
this.metadata.additionalInfo.defaultPoolId
|
|
120056
|
+
);
|
|
119912
120057
|
return vesuAdapter1.config.debt;
|
|
119913
120058
|
}
|
|
119914
120059
|
async getMaxBorrowableAmount(params = { isAPYComputation: false }) {
|
|
119915
120060
|
const vesuAdapters = this.getVesuAdapters();
|
|
119916
|
-
let netMaxBorrowableAmount = Web3Number.fromWei(
|
|
120061
|
+
let netMaxBorrowableAmount = Web3Number.fromWei(
|
|
120062
|
+
"0",
|
|
120063
|
+
this.getLSTUnderlyingTokenInfo().decimals
|
|
120064
|
+
);
|
|
119917
120065
|
const maxBorrowables = [];
|
|
119918
120066
|
for (const vesuAdapter of vesuAdapters) {
|
|
119919
|
-
const output2 = await this.getMaxBorrowableAmountByVesuAdapter(
|
|
120067
|
+
const output2 = await this.getMaxBorrowableAmountByVesuAdapter(
|
|
120068
|
+
vesuAdapter,
|
|
120069
|
+
params.isAPYComputation
|
|
120070
|
+
);
|
|
119920
120071
|
const ltv = await vesuAdapter.getLTVConfig(this.config);
|
|
119921
120072
|
maxBorrowables.push({ ...output2, ltv });
|
|
119922
120073
|
}
|
|
119923
120074
|
maxBorrowables.sort((a, b2) => b2.amount.toNumber() - a.amount.toNumber());
|
|
119924
|
-
netMaxBorrowableAmount = maxBorrowables.reduce(
|
|
120075
|
+
netMaxBorrowableAmount = maxBorrowables.reduce(
|
|
120076
|
+
(acc, curr) => acc.plus(curr.amount),
|
|
120077
|
+
Web3Number.fromWei("0", this.getLSTUnderlyingTokenInfo().decimals)
|
|
120078
|
+
);
|
|
119925
120079
|
return { netMaxBorrowableAmount, maxBorrowables };
|
|
119926
120080
|
}
|
|
119927
|
-
// recursively, using binary search computes max swappable.
|
|
120081
|
+
// recursively, using binary search computes max swappable.
|
|
119928
120082
|
// @dev assumes 1 token of from == 1 token of to
|
|
119929
120083
|
async getMaxSwappableWithMaxSlippage(fromToken, toToken, maxSlippage, maxAmount) {
|
|
119930
120084
|
const output2 = await findMaxInputWithSlippage({
|
|
119931
120085
|
apiGetOutput: async (inputAmount) => {
|
|
119932
120086
|
const ekuboQuoter = new EkuboQuoter(this.config);
|
|
119933
120087
|
await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
119934
|
-
const quote = await ekuboQuoter.getQuote(
|
|
119935
|
-
|
|
120088
|
+
const quote = await ekuboQuoter.getQuote(
|
|
120089
|
+
fromToken.address.address,
|
|
120090
|
+
toToken.address.address,
|
|
120091
|
+
new Web3Number(inputAmount.toFixed(9), fromToken.decimals)
|
|
120092
|
+
);
|
|
120093
|
+
return Web3Number.fromWei(
|
|
120094
|
+
quote.total_calculated.toString(),
|
|
120095
|
+
toToken.decimals
|
|
120096
|
+
).toNumber();
|
|
119936
120097
|
},
|
|
119937
120098
|
maxInput: maxAmount.toNumber(),
|
|
119938
120099
|
maxSlippagePercent: maxSlippage,
|
|
@@ -119942,38 +120103,84 @@ spurious results.`);
|
|
|
119942
120103
|
return new Web3Number(output2.optimalInput, fromToken.decimals);
|
|
119943
120104
|
}
|
|
119944
120105
|
async getMaxBorrowableAmountByVesuAdapter(vesuAdapter, isAPYComputation) {
|
|
119945
|
-
const lstAPY = await this.getLSTAPR(
|
|
120106
|
+
const lstAPY = await this.getLSTAPR(
|
|
120107
|
+
this.getLSTUnderlyingTokenInfo().address
|
|
120108
|
+
);
|
|
119946
120109
|
const maxInterestRate = lstAPY * 0.8;
|
|
119947
|
-
const { maxDebtToHave: maxBorrowableAmount, currentDebt } = await vesuAdapter.getMaxBorrowableByInterestRate(
|
|
120110
|
+
const { maxDebtToHave: maxBorrowableAmount, currentDebt } = await vesuAdapter.getMaxBorrowableByInterestRate(
|
|
120111
|
+
this.config,
|
|
120112
|
+
vesuAdapter.config.debt,
|
|
120113
|
+
maxInterestRate
|
|
120114
|
+
);
|
|
119948
120115
|
const debtCap = await vesuAdapter.getDebtCap(this.config);
|
|
119949
120116
|
if (currentDebt.gte(debtCap)) {
|
|
119950
|
-
return {
|
|
120117
|
+
return {
|
|
120118
|
+
amount: Web3Number.fromWei("0", vesuAdapter.config.debt.decimals),
|
|
120119
|
+
dexSwappableAmount: Web3Number.fromWei(
|
|
120120
|
+
"0",
|
|
120121
|
+
vesuAdapter.config.debt.decimals
|
|
120122
|
+
),
|
|
120123
|
+
maxBorrowableAmount: Web3Number.fromWei(
|
|
120124
|
+
"0",
|
|
120125
|
+
vesuAdapter.config.debt.decimals
|
|
120126
|
+
),
|
|
120127
|
+
borrowableAsset: vesuAdapter.config.debt
|
|
120128
|
+
};
|
|
119951
120129
|
}
|
|
119952
120130
|
const availableToBorrow = debtCap.minus(currentDebt);
|
|
119953
120131
|
const maxBorrowable = maxBorrowableAmount.minimum(availableToBorrow).multipliedBy(0.999);
|
|
119954
|
-
if (vesuAdapter.config.debt.address.eq(
|
|
119955
|
-
|
|
120132
|
+
if (vesuAdapter.config.debt.address.eq(
|
|
120133
|
+
this.getLSTUnderlyingTokenInfo().address
|
|
120134
|
+
) || isAPYComputation) {
|
|
120135
|
+
return {
|
|
120136
|
+
amount: maxBorrowable,
|
|
120137
|
+
dexSwappableAmount: maxBorrowable,
|
|
120138
|
+
maxBorrowableAmount: maxBorrowable,
|
|
120139
|
+
borrowableAsset: vesuAdapter.config.debt
|
|
120140
|
+
};
|
|
119956
120141
|
}
|
|
119957
120142
|
try {
|
|
119958
|
-
const maxSwappable = await this.getMaxSwappableWithMaxSlippage(
|
|
119959
|
-
|
|
120143
|
+
const maxSwappable = await this.getMaxSwappableWithMaxSlippage(
|
|
120144
|
+
vesuAdapter.config.debt,
|
|
120145
|
+
this.getLSTUnderlyingTokenInfo(),
|
|
120146
|
+
2e-4,
|
|
120147
|
+
maxBorrowable
|
|
120148
|
+
);
|
|
120149
|
+
return {
|
|
120150
|
+
amount: maxBorrowable.minimum(maxSwappable),
|
|
120151
|
+
dexSwappableAmount: maxSwappable,
|
|
120152
|
+
maxBorrowableAmount: maxBorrowable,
|
|
120153
|
+
borrowableAsset: vesuAdapter.config.debt
|
|
120154
|
+
};
|
|
119960
120155
|
} catch (error2) {
|
|
119961
120156
|
logger2.warn(`${this.getTag()}: Failed to get max swappable: ${error2}`);
|
|
119962
|
-
const maxSwappable = Web3Number.fromWei(
|
|
119963
|
-
|
|
120157
|
+
const maxSwappable = Web3Number.fromWei(
|
|
120158
|
+
"0",
|
|
120159
|
+
vesuAdapter.config.debt.decimals
|
|
120160
|
+
);
|
|
120161
|
+
return {
|
|
120162
|
+
amount: maxBorrowable.minimum(maxSwappable),
|
|
120163
|
+
dexSwappableAmount: maxSwappable,
|
|
120164
|
+
maxBorrowableAmount: maxBorrowable,
|
|
120165
|
+
borrowableAsset: vesuAdapter.config.debt
|
|
120166
|
+
};
|
|
119964
120167
|
}
|
|
119965
120168
|
}
|
|
119966
120169
|
// todo how much to unwind to get back healthy APY zone again
|
|
119967
120170
|
// if net APY < LST APR + 0.5%, we need to unwind to get back to LST APR + 1% atleast or 0 vesu position
|
|
119968
|
-
// For xSTRK, simply deposit in Vesu if looping is not viable
|
|
120171
|
+
// For xSTRK, simply deposit in Vesu if looping is not viable
|
|
119969
120172
|
/**
|
|
119970
120173
|
* Gets LST APR for the strategy's underlying asset from Endur API
|
|
119971
120174
|
* @returns Promise<number> The LST APR (not divided by 1e18)
|
|
119972
120175
|
*/
|
|
119973
120176
|
async getLSTAPR(_address) {
|
|
119974
120177
|
try {
|
|
119975
|
-
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
119976
|
-
|
|
120178
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120179
|
+
this.metadata.additionalInfo.defaultPoolId
|
|
120180
|
+
);
|
|
120181
|
+
const apr = await LSTAPRService.getLSTAPR(
|
|
120182
|
+
vesuAdapter1.config.debt.address
|
|
120183
|
+
);
|
|
119977
120184
|
if (!apr) {
|
|
119978
120185
|
throw new Error("Failed to get LST APR");
|
|
119979
120186
|
}
|
|
@@ -119986,19 +120193,37 @@ spurious results.`);
|
|
|
119986
120193
|
// todo undo this
|
|
119987
120194
|
async netAPY() {
|
|
119988
120195
|
const unusedBalance = await this.getUnusedBalance();
|
|
119989
|
-
const maxNewDeposits = await this.maxNewDeposits({
|
|
119990
|
-
|
|
120196
|
+
const maxNewDeposits = await this.maxNewDeposits({
|
|
120197
|
+
isAPYComputation: true
|
|
120198
|
+
});
|
|
120199
|
+
const lstAPY = await this.getLSTAPR(
|
|
120200
|
+
this.getLSTUnderlyingTokenInfo().address
|
|
120201
|
+
);
|
|
119991
120202
|
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
119992
|
-
logger2.verbose(
|
|
120203
|
+
logger2.verbose(
|
|
120204
|
+
`${this.getTag()}::netAPY: unused balance is > max servicable from loan, lstAPY: ${lstAPY}`
|
|
120205
|
+
);
|
|
119993
120206
|
const output2 = await super.netAPY();
|
|
119994
120207
|
output2.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
119995
120208
|
return output2;
|
|
119996
120209
|
} else {
|
|
119997
|
-
logger2.verbose(
|
|
120210
|
+
logger2.verbose(
|
|
120211
|
+
`${this.getTag()}::netAPY: we can take more deposits, use theoretical max APY`
|
|
120212
|
+
);
|
|
119998
120213
|
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
119999
|
-
const weights = positions.map(
|
|
120214
|
+
const weights = positions.map(
|
|
120215
|
+
(p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1)
|
|
120216
|
+
);
|
|
120000
120217
|
const aum = weights.reduce((acc, curr) => acc + curr, 0);
|
|
120001
|
-
const output2 = await this.returnNetAPY(
|
|
120218
|
+
const output2 = await this.returnNetAPY(
|
|
120219
|
+
baseAPYs,
|
|
120220
|
+
rewardAPYs,
|
|
120221
|
+
weights,
|
|
120222
|
+
new Web3Number(
|
|
120223
|
+
aum.toFixed(9),
|
|
120224
|
+
this.getLSTUnderlyingTokenInfo().decimals
|
|
120225
|
+
)
|
|
120226
|
+
);
|
|
120002
120227
|
output2.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
120003
120228
|
return output2;
|
|
120004
120229
|
}
|
|
@@ -120008,9 +120233,13 @@ spurious results.`);
|
|
|
120008
120233
|
let numerator = 0;
|
|
120009
120234
|
let ltv = void 0;
|
|
120010
120235
|
for (let adapter2 of this.getVesuAdapters()) {
|
|
120011
|
-
const maxBorrowableAmountInfo = maxBorrowableAmounts.maxBorrowables.find(
|
|
120236
|
+
const maxBorrowableAmountInfo = maxBorrowableAmounts.maxBorrowables.find(
|
|
120237
|
+
(b2) => b2.borrowableAsset.address.eq(adapter2.config.debt.address)
|
|
120238
|
+
);
|
|
120012
120239
|
if (!maxBorrowableAmountInfo || !maxBorrowableAmountInfo?.amount) {
|
|
120013
|
-
throw new Error(
|
|
120240
|
+
throw new Error(
|
|
120241
|
+
`Max borrowable amount not found for adapter: ${adapter2.config.debt.symbol}`
|
|
120242
|
+
);
|
|
120014
120243
|
}
|
|
120015
120244
|
numerator += this.metadata.additionalInfo.targetHealthFactor * maxBorrowableAmountInfo.amount.toNumber() / maxBorrowableAmountInfo.ltv;
|
|
120016
120245
|
}
|
|
@@ -120019,7 +120248,9 @@ spurious results.`);
|
|
|
120019
120248
|
// todo revisit cases where 0th adapters is used
|
|
120020
120249
|
async getUnusedBalanceAPY() {
|
|
120021
120250
|
const unusedBalance = await this.getUnusedBalance();
|
|
120022
|
-
const vesuAdapter = this.getVesuSameTokenAdapter(
|
|
120251
|
+
const vesuAdapter = this.getVesuSameTokenAdapter(
|
|
120252
|
+
this.metadata.additionalInfo.defaultPoolId
|
|
120253
|
+
);
|
|
120023
120254
|
const underlying = vesuAdapter.config.debt;
|
|
120024
120255
|
const lstAPY = await this.getLSTAPR(underlying.address);
|
|
120025
120256
|
return {
|
|
@@ -120028,11 +120259,16 @@ spurious results.`);
|
|
|
120028
120259
|
};
|
|
120029
120260
|
}
|
|
120030
120261
|
async getLSTAvnuRate() {
|
|
120031
|
-
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120262
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120263
|
+
this.metadata.additionalInfo.defaultPoolId
|
|
120264
|
+
);
|
|
120032
120265
|
const lstTokenInfo = vesuAdapter1.config.collateral;
|
|
120033
120266
|
const underlyingTokenInfo = vesuAdapter1.config.debt;
|
|
120034
120267
|
const avnuModule = new AvnuWrapper();
|
|
120035
|
-
const sellAmount = lstTokenInfo.priceCheckAmount ? new Web3Number(
|
|
120268
|
+
const sellAmount = lstTokenInfo.priceCheckAmount ? new Web3Number(
|
|
120269
|
+
lstTokenInfo.priceCheckAmount,
|
|
120270
|
+
underlyingTokenInfo.decimals
|
|
120271
|
+
) : new Web3Number(1, underlyingTokenInfo.decimals);
|
|
120036
120272
|
const quote = await avnuModule.getQuotes(
|
|
120037
120273
|
underlyingTokenInfo.address.address,
|
|
120038
120274
|
lstTokenInfo.address.address,
|
|
@@ -120046,40 +120282,56 @@ spurious results.`);
|
|
|
120046
120282
|
).toNumber();
|
|
120047
120283
|
assert3(lstAmountNumber > 0, "Avnu LST amount is zero");
|
|
120048
120284
|
const exchangeRate = underlyingAmountNumber / lstAmountNumber;
|
|
120049
|
-
logger2.verbose(
|
|
120285
|
+
logger2.verbose(
|
|
120286
|
+
`${this.getTag()}:: LST Avnu Exchange Rate: ${exchangeRate}`
|
|
120287
|
+
);
|
|
120050
120288
|
return exchangeRate;
|
|
120051
120289
|
}
|
|
120052
120290
|
async getLSTExchangeRate() {
|
|
120053
|
-
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120291
|
+
const vesuAdapter1 = this.getVesuSameTokenAdapter(
|
|
120292
|
+
this.metadata.additionalInfo.defaultPoolId
|
|
120293
|
+
);
|
|
120054
120294
|
const lstTokenInfo = vesuAdapter1.config.collateral;
|
|
120055
120295
|
const lstABI = new Contract({
|
|
120056
120296
|
abi: erc4626_abi_default,
|
|
120057
120297
|
address: lstTokenInfo.address.address,
|
|
120058
120298
|
providerOrAccount: this.config.provider
|
|
120059
120299
|
});
|
|
120060
|
-
const price = await lstABI.call("convert_to_assets", [
|
|
120300
|
+
const price = await lstABI.call("convert_to_assets", [
|
|
120301
|
+
uint256_exports.bnToUint256(new Web3Number(1, lstTokenInfo.decimals).toWei())
|
|
120302
|
+
]);
|
|
120061
120303
|
const exchangeRate = Number(uint256_exports.uint256ToBN(price).toString()) / Math.pow(10, lstTokenInfo.decimals);
|
|
120062
120304
|
logger2.verbose(`${this.getTag()}:: LST Exchange Rate: ${exchangeRate}`);
|
|
120063
120305
|
return exchangeRate;
|
|
120064
120306
|
}
|
|
120065
120307
|
/**
|
|
120066
|
-
*
|
|
120308
|
+
*
|
|
120067
120309
|
* @param params marginAmount is in LST, debtAmount is in underlying
|
|
120068
120310
|
*/
|
|
120069
120311
|
async getModifyLeverCall(params) {
|
|
120070
|
-
logger2.verbose(
|
|
120071
|
-
|
|
120312
|
+
logger2.verbose(
|
|
120313
|
+
`${this.getTag()}::getModifyLeverCall marginAmount: ${params.marginAmount}, debtAmount: ${params.debtAmount}, lstDexPriceInUnderlying: ${params.lstDexPriceInUnderlying}, isIncrease: ${params.isIncrease}`
|
|
120314
|
+
);
|
|
120315
|
+
assert3(
|
|
120316
|
+
!params.marginAmount.isZero() || !params.debtAmount.isZero(),
|
|
120317
|
+
"Deposit/debt must be non-0"
|
|
120318
|
+
);
|
|
120072
120319
|
const vesuAdapter1 = this.getVesuSameTokenAdapter(params.poolId);
|
|
120073
120320
|
const lstTokenInfo = this.asset();
|
|
120074
120321
|
const lstUnderlyingTokenInfo = vesuAdapter1.config.debt;
|
|
120075
120322
|
const maxAmounts = lstTokenInfo.symbol == "xSTRK" ? 5e5 : 0.5;
|
|
120076
120323
|
if (params.marginAmount.greaterThan(maxAmounts)) {
|
|
120077
|
-
throw new Error(
|
|
120324
|
+
throw new Error(
|
|
120325
|
+
`Margin amount is greater than max amount: ${params.marginAmount.toNumber()} > ${maxAmounts}`
|
|
120326
|
+
);
|
|
120078
120327
|
}
|
|
120079
120328
|
const proofsIDs = [];
|
|
120080
120329
|
const manageCalls = [];
|
|
120081
120330
|
if (params.marginAmount.greaterThan(0)) {
|
|
120082
|
-
const STEP1_ID = getVesuGenericLegId(
|
|
120331
|
+
const STEP1_ID = getVesuGenericLegId(
|
|
120332
|
+
params.poolId.toString(),
|
|
120333
|
+
"multiple_approve" /* MULTIPLE_APPROVE */
|
|
120334
|
+
);
|
|
120083
120335
|
const manage1Info = this.getProofs(STEP1_ID);
|
|
120084
120336
|
const depositAmount = params.marginAmount;
|
|
120085
120337
|
const manageCall1 = manage1Info.callConstructor({
|
|
@@ -120100,31 +120352,56 @@ spurious results.`);
|
|
|
120100
120352
|
params.debtAmount
|
|
120101
120353
|
// negative for exact amount out
|
|
120102
120354
|
);
|
|
120103
|
-
logger2.verbose(
|
|
120104
|
-
|
|
120105
|
-
|
|
120106
|
-
|
|
120355
|
+
logger2.verbose(
|
|
120356
|
+
`${this.getTag()}::getModifyLeverCall leverSwapQuote: ${JSON.stringify(leverSwapQuote)}`
|
|
120357
|
+
);
|
|
120358
|
+
assert3(
|
|
120359
|
+
leverSwapQuote.price_impact <= params.maxEkuboPriceImpact,
|
|
120360
|
+
"getIncreaseLeverCall: Price impact is too high [Debt swap]"
|
|
120361
|
+
);
|
|
120362
|
+
const leverSwap = ekuboQuoter.getVesuMultiplyQuote(
|
|
120363
|
+
leverSwapQuote,
|
|
120364
|
+
fromToken,
|
|
120365
|
+
toToken
|
|
120366
|
+
);
|
|
120367
|
+
logger2.verbose(
|
|
120368
|
+
`${this.getTag()}::getModifyLeverCall leverSwap: ${JSON.stringify(leverSwap)}`
|
|
120369
|
+
);
|
|
120107
120370
|
let minLSTReceived = params.debtAmount.dividedBy(lstDexPriceInUnderlying).multipliedBy(1 - MAX_SLIPPAGE);
|
|
120108
120371
|
const minLSTReceivedAsPerTruePrice = params.debtAmount.dividedBy(lstTrueExchangeRate);
|
|
120109
120372
|
minLSTReceived = minLSTReceivedAsPerTruePrice;
|
|
120110
|
-
logger2.verbose(
|
|
120373
|
+
logger2.verbose(
|
|
120374
|
+
`${this.getTag()}::getModifyLeverCall minLSTReceivedAsPerTruePrice: ${minLSTReceivedAsPerTruePrice}, minLSTReceived: ${minLSTReceived}`
|
|
120375
|
+
);
|
|
120111
120376
|
let maxUsedCollateral = params.debtAmount.abs().dividedBy(lstDexPriceInUnderlying).multipliedBy(1 + MAX_SLIPPAGE);
|
|
120112
120377
|
const maxUsedCollateralInLST = params.debtAmount.abs().dividedBy(lstTrueExchangeRate).multipliedBy(1.005);
|
|
120113
|
-
logger2.verbose(
|
|
120378
|
+
logger2.verbose(
|
|
120379
|
+
`${this.getTag()}::getModifyLeverCall maxUsedCollateralInLST: ${maxUsedCollateralInLST}, maxUsedCollateral: ${maxUsedCollateral}`
|
|
120380
|
+
);
|
|
120114
120381
|
maxUsedCollateral = maxUsedCollateralInLST;
|
|
120115
|
-
const STEP2_ID = getVesuGenericLegId(
|
|
120382
|
+
const STEP2_ID = getVesuGenericLegId(
|
|
120383
|
+
params.poolId.toString(),
|
|
120384
|
+
"switch_delegation_on" /* SWITCH_DELEGATION_ON */
|
|
120385
|
+
);
|
|
120116
120386
|
const manage2Info = this.getProofs(STEP2_ID);
|
|
120117
120387
|
const manageCall2 = manage2Info.callConstructor({
|
|
120118
120388
|
delegation: true
|
|
120119
120389
|
});
|
|
120120
|
-
const STEP3_ID = getVesuLegId(
|
|
120390
|
+
const STEP3_ID = getVesuLegId(
|
|
120391
|
+
"multiply_vesu" /* MULTIPLY_VESU */,
|
|
120392
|
+
vesuAdapter1.config.debt.symbol,
|
|
120393
|
+
vesuAdapter1.config.poolId.toString()
|
|
120394
|
+
);
|
|
120121
120395
|
const manage3Info = this.getProofs(STEP3_ID);
|
|
120122
120396
|
const multiplyParams = params.isIncrease ? {
|
|
120123
120397
|
isIncrease: true,
|
|
120124
120398
|
increaseParams: {
|
|
120125
120399
|
add_margin: params.marginAmount,
|
|
120126
120400
|
margin_swap: [],
|
|
120127
|
-
margin_swap_limit_amount: Web3Number.fromWei(
|
|
120401
|
+
margin_swap_limit_amount: Web3Number.fromWei(
|
|
120402
|
+
0,
|
|
120403
|
+
this.asset().decimals
|
|
120404
|
+
),
|
|
120128
120405
|
lever_swap: leverSwap,
|
|
120129
120406
|
lever_swap_limit_amount: minLSTReceived
|
|
120130
120407
|
}
|
|
@@ -120136,15 +120413,21 @@ spurious results.`);
|
|
|
120136
120413
|
lever_swap_limit_amount: maxUsedCollateral,
|
|
120137
120414
|
// only required for close position
|
|
120138
120415
|
lever_swap_weights: [],
|
|
120139
|
-
// no need to swap collateral to anything, and any residuals return our contract anyways.
|
|
120416
|
+
// no need to swap collateral to anything, and any residuals return our contract anyways.
|
|
120140
120417
|
withdraw_swap: [],
|
|
120141
|
-
withdraw_swap_limit_amount: Web3Number.fromWei(
|
|
120418
|
+
withdraw_swap_limit_amount: Web3Number.fromWei(
|
|
120419
|
+
0,
|
|
120420
|
+
this.asset().decimals
|
|
120421
|
+
),
|
|
120142
120422
|
withdraw_swap_weights: [],
|
|
120143
120423
|
close_position: false
|
|
120144
120424
|
}
|
|
120145
120425
|
};
|
|
120146
120426
|
const manageCall3 = manage3Info.callConstructor(multiplyParams);
|
|
120147
|
-
const STEP4_ID = getVesuGenericLegId(
|
|
120427
|
+
const STEP4_ID = getVesuGenericLegId(
|
|
120428
|
+
params.poolId.toString(),
|
|
120429
|
+
"switch_delegation_off" /* SWITCH_DELEGATION_OFF */
|
|
120430
|
+
);
|
|
120148
120431
|
const manage4Info = this.getProofs(STEP4_ID);
|
|
120149
120432
|
const manageCall4 = manage4Info.callConstructor({
|
|
120150
120433
|
delegation: false
|
|
@@ -120158,7 +120441,6 @@ spurious results.`);
|
|
|
120158
120441
|
const containerStyle = {
|
|
120159
120442
|
maxWidth: "800px",
|
|
120160
120443
|
margin: "0 auto",
|
|
120161
|
-
backgroundColor: "#111",
|
|
120162
120444
|
color: "#eee",
|
|
120163
120445
|
fontFamily: "Arial, sans-serif",
|
|
120164
120446
|
borderRadius: "12px"
|
|
@@ -120181,21 +120463,52 @@ spurious results.`);
|
|
|
120181
120463
|
" to create leverage. Depositors receive vault shares that represent a proportional claim on the underlying assets and accrued yield."
|
|
120182
120464
|
] }),
|
|
120183
120465
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "14px", lineHeight: "1.5", marginBottom: "16px" }, children: [
|
|
120184
|
-
"This vault uses Vesu for lending and borrowing. The oracle used by this pool is a
|
|
120185
|
-
|
|
120466
|
+
"This vault uses Vesu for lending and borrowing. The oracle used by this pool is a",
|
|
120467
|
+
" ",
|
|
120468
|
+
highlightTextWithLinks("conversion rate oracle", [
|
|
120469
|
+
{
|
|
120470
|
+
highlight: "conversion rate oracle",
|
|
120471
|
+
link: "https://docs.pragma.build/starknet/development#conversion-rate"
|
|
120472
|
+
}
|
|
120473
|
+
]),
|
|
120186
120474
|
" ",
|
|
120187
120475
|
"which is resilient to liquidity issues and price volatility, hence reducing the risk of liquidation. However, overtime, if left un-monitored, debt can increase enough to trigger a liquidation. But no worries, our continuous monitoring systems look for situations with reduced health factor and balance collateral/debt to bring it back to safe levels. With Troves, you can have a peaceful sleep."
|
|
120188
120476
|
] }),
|
|
120189
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
120190
|
-
|
|
120191
|
-
|
|
120192
|
-
|
|
120193
|
-
|
|
120194
|
-
|
|
120195
|
-
|
|
120196
|
-
|
|
120197
|
-
|
|
120198
|
-
|
|
120477
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
120478
|
+
"div",
|
|
120479
|
+
{
|
|
120480
|
+
style: {
|
|
120481
|
+
backgroundColor: "#222",
|
|
120482
|
+
padding: "10px",
|
|
120483
|
+
borderRadius: "8px",
|
|
120484
|
+
marginBottom: "20px",
|
|
120485
|
+
border: "1px solid #444"
|
|
120486
|
+
},
|
|
120487
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
|
|
120488
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Withdrawals:" }),
|
|
120489
|
+
" Requests can take up to",
|
|
120490
|
+
" ",
|
|
120491
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "1-2 hours" }),
|
|
120492
|
+
" to process as the vault unwinds and settles routing."
|
|
120493
|
+
] })
|
|
120494
|
+
}
|
|
120495
|
+
),
|
|
120496
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
120497
|
+
"div",
|
|
120498
|
+
{
|
|
120499
|
+
style: {
|
|
120500
|
+
backgroundColor: "#222",
|
|
120501
|
+
padding: "10px",
|
|
120502
|
+
borderRadius: "8px",
|
|
120503
|
+
marginBottom: "20px",
|
|
120504
|
+
border: "1px solid #444"
|
|
120505
|
+
},
|
|
120506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
|
|
120507
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Debt limits:" }),
|
|
120508
|
+
" Pools on Vesu have debt caps that are gradually increased over time. Until caps are raised, deposited LSTs remain in the vault, generating a shared net return for all depositors. There is no additional fee taken by Troves on LST APY, its only on added gain."
|
|
120509
|
+
] })
|
|
120510
|
+
}
|
|
120511
|
+
)
|
|
120199
120512
|
] });
|
|
120200
120513
|
}
|
|
120201
120514
|
function getDescription2(tokenSymbol, underlyingSymbol) {
|
|
@@ -120211,31 +120524,76 @@ spurious results.`);
|
|
|
120211
120524
|
return `${baseID}_${debtTokenSymbol.toLowerCase()}_${poolId.slice(-4).toLowerCase()}`;
|
|
120212
120525
|
}
|
|
120213
120526
|
function addVesuLeaves(poolId, lstSymbol, underlyingSymbol, vaultSettings, commonAdapter) {
|
|
120214
|
-
const lstToken = Global.getDefaultTokens().find(
|
|
120215
|
-
|
|
120527
|
+
const lstToken = Global.getDefaultTokens().find(
|
|
120528
|
+
(token) => token.symbol === lstSymbol
|
|
120529
|
+
);
|
|
120530
|
+
const underlyingToken = Global.getDefaultTokens().find(
|
|
120531
|
+
(token) => token.symbol === underlyingSymbol
|
|
120532
|
+
);
|
|
120216
120533
|
const vesuAdapterLST = new VesuAdapter({
|
|
120217
120534
|
poolId,
|
|
120218
120535
|
collateral: lstToken,
|
|
120219
120536
|
debt: underlyingToken,
|
|
120220
120537
|
vaultAllocator: vaultSettings.vaultAllocator,
|
|
120221
|
-
id: getVesuLegId(
|
|
120538
|
+
id: getVesuLegId(
|
|
120539
|
+
"vesu_leg1" /* VESU_LEG1 */,
|
|
120540
|
+
underlyingToken.symbol,
|
|
120541
|
+
poolId.toString()
|
|
120542
|
+
)
|
|
120222
120543
|
});
|
|
120223
|
-
vaultSettings.adapters.push(
|
|
120224
|
-
|
|
120225
|
-
|
|
120226
|
-
|
|
120544
|
+
vaultSettings.adapters.push(
|
|
120545
|
+
...[
|
|
120546
|
+
{
|
|
120547
|
+
id: getVesuLegId(
|
|
120548
|
+
"vesu_leg1" /* VESU_LEG1 */,
|
|
120549
|
+
underlyingToken.symbol,
|
|
120550
|
+
poolId.toString()
|
|
120551
|
+
),
|
|
120552
|
+
adapter: vesuAdapterLST
|
|
120553
|
+
}
|
|
120554
|
+
]
|
|
120555
|
+
);
|
|
120227
120556
|
const { isV2, addr: poolAddr } = getVesuSingletonAddress(poolId);
|
|
120228
120557
|
const VESU_MULTIPLY = isV2 ? vesuAdapterLST.VESU_MULTIPLY : vesuAdapterLST.VESU_MULTIPLY_V1;
|
|
120229
|
-
const leafIdApprove = getVesuGenericLegId(
|
|
120230
|
-
|
|
120231
|
-
|
|
120232
|
-
|
|
120233
|
-
|
|
120234
|
-
|
|
120235
|
-
|
|
120236
|
-
|
|
120237
|
-
|
|
120238
|
-
|
|
120558
|
+
const leafIdApprove = getVesuGenericLegId(
|
|
120559
|
+
poolId.toString(),
|
|
120560
|
+
"multiple_approve" /* MULTIPLE_APPROVE */
|
|
120561
|
+
);
|
|
120562
|
+
vaultSettings.leafAdapters.push(
|
|
120563
|
+
commonAdapter.getApproveAdapter(lstToken.address, VESU_MULTIPLY, leafIdApprove).bind(commonAdapter)
|
|
120564
|
+
);
|
|
120565
|
+
const leafIdDelegationOn = getVesuGenericLegId(
|
|
120566
|
+
poolId.toString(),
|
|
120567
|
+
"switch_delegation_on" /* SWITCH_DELEGATION_ON */
|
|
120568
|
+
);
|
|
120569
|
+
vaultSettings.leafAdapters.push(
|
|
120570
|
+
vesuAdapterLST.getVesuModifyDelegationAdapter(leafIdDelegationOn, VESU_MULTIPLY).bind(vesuAdapterLST)
|
|
120571
|
+
);
|
|
120572
|
+
const leafIdDelegationOff = getVesuGenericLegId(
|
|
120573
|
+
poolId.toString(),
|
|
120574
|
+
"switch_delegation_off" /* SWITCH_DELEGATION_OFF */
|
|
120575
|
+
);
|
|
120576
|
+
vaultSettings.leafAdapters.push(
|
|
120577
|
+
vesuAdapterLST.getVesuModifyDelegationAdapter(leafIdDelegationOff, VESU_MULTIPLY).bind(vesuAdapterLST)
|
|
120578
|
+
);
|
|
120579
|
+
const multiplID = getVesuLegId(
|
|
120580
|
+
"multiply_vesu" /* MULTIPLY_VESU */,
|
|
120581
|
+
underlyingToken.symbol,
|
|
120582
|
+
poolId.toString()
|
|
120583
|
+
);
|
|
120584
|
+
vaultSettings.leafAdapters.push(
|
|
120585
|
+
vesuAdapterLST.getMultiplyAdapter(multiplID).bind(vesuAdapterLST)
|
|
120586
|
+
);
|
|
120587
|
+
vaultSettings.leafAdapters.push(
|
|
120588
|
+
commonAdapter.getApproveAdapter(
|
|
120589
|
+
lstToken.address,
|
|
120590
|
+
poolAddr,
|
|
120591
|
+
"approve_token1" /* APPROVE_TOKEN1 */
|
|
120592
|
+
).bind(commonAdapter)
|
|
120593
|
+
);
|
|
120594
|
+
vaultSettings.leafAdapters.push(
|
|
120595
|
+
vesuAdapterLST.getModifyPosition.bind(vesuAdapterLST)
|
|
120596
|
+
);
|
|
120239
120597
|
return vesuAdapterLST;
|
|
120240
120598
|
}
|
|
120241
120599
|
function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, defaultPoolId) {
|
|
@@ -120244,8 +120602,12 @@ spurious results.`);
|
|
|
120244
120602
|
if (!pool1.eq(defaultPoolId)) {
|
|
120245
120603
|
throw new Error(`Dont include default pool id in supported pool ids`);
|
|
120246
120604
|
}
|
|
120247
|
-
const lstToken = Global.getDefaultTokens().find(
|
|
120248
|
-
|
|
120605
|
+
const lstToken = Global.getDefaultTokens().find(
|
|
120606
|
+
(token) => token.symbol === lstSymbol
|
|
120607
|
+
);
|
|
120608
|
+
const underlyingToken = Global.getDefaultTokens().find(
|
|
120609
|
+
(token) => token.symbol === underlyingSymbol
|
|
120610
|
+
);
|
|
120249
120611
|
const commonAdapter = new CommonAdapter({
|
|
120250
120612
|
manager: vaultSettings.manager,
|
|
120251
120613
|
asset: lstToken.address,
|
|
@@ -120253,28 +120615,106 @@ spurious results.`);
|
|
|
120253
120615
|
vaultAddress: vaultSettings.vaultAddress,
|
|
120254
120616
|
vaultAllocator: vaultSettings.vaultAllocator
|
|
120255
120617
|
});
|
|
120256
|
-
vaultSettings.adapters.push(
|
|
120257
|
-
|
|
120258
|
-
|
|
120259
|
-
|
|
120260
|
-
|
|
120261
|
-
|
|
120262
|
-
|
|
120618
|
+
vaultSettings.adapters.push(
|
|
120619
|
+
...[
|
|
120620
|
+
{
|
|
120621
|
+
id: "common_adapter" /* COMMON */,
|
|
120622
|
+
adapter: commonAdapter
|
|
120623
|
+
}
|
|
120624
|
+
]
|
|
120625
|
+
);
|
|
120626
|
+
vaultSettings.borrowable_assets.map(
|
|
120627
|
+
(borrowableAsset) => addVesuLeaves(
|
|
120628
|
+
borrowableAsset.poolId,
|
|
120629
|
+
lstSymbol,
|
|
120630
|
+
underlyingSymbol,
|
|
120631
|
+
vaultSettings,
|
|
120632
|
+
commonAdapter
|
|
120633
|
+
)
|
|
120634
|
+
);
|
|
120635
|
+
vaultSettings.leafAdapters.push(
|
|
120636
|
+
commonAdapter.getApproveAdapter(
|
|
120637
|
+
lstToken.address,
|
|
120638
|
+
AVNU_EXCHANGE,
|
|
120639
|
+
"avnu_mul_approve_withdr" /* AVNU_MULTIPLY_APPROVE_WITHDRAW */
|
|
120640
|
+
).bind(commonAdapter)
|
|
120641
|
+
);
|
|
120642
|
+
const uniqueBorrowableAssets = [
|
|
120643
|
+
...new Set(
|
|
120644
|
+
vaultSettings.borrowable_assets.map(
|
|
120645
|
+
(borrowableAsset) => borrowableAsset.token.symbol
|
|
120646
|
+
)
|
|
120647
|
+
)
|
|
120648
|
+
];
|
|
120263
120649
|
for (let borrowableAssetSymbol of uniqueBorrowableAssets) {
|
|
120264
|
-
const borrowableAsset = Global.getDefaultTokens().find(
|
|
120650
|
+
const borrowableAsset = Global.getDefaultTokens().find(
|
|
120651
|
+
(token) => token.symbol === borrowableAssetSymbol
|
|
120652
|
+
);
|
|
120265
120653
|
const debtAsset = borrowableAsset;
|
|
120266
|
-
const approve_debt_token_id = getAvnuManageIDs(
|
|
120267
|
-
|
|
120268
|
-
|
|
120269
|
-
|
|
120270
|
-
|
|
120271
|
-
|
|
120272
|
-
|
|
120273
|
-
|
|
120274
|
-
|
|
120275
|
-
|
|
120276
|
-
|
|
120277
|
-
|
|
120654
|
+
const approve_debt_token_id = getAvnuManageIDs(
|
|
120655
|
+
"avnu_mul_approve_dep" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */,
|
|
120656
|
+
debtAsset.symbol
|
|
120657
|
+
);
|
|
120658
|
+
const swap_debt_token_id = getAvnuManageIDs(
|
|
120659
|
+
"avnu_mul_swap_dep" /* AVNU_MULTIPLY_SWAP_DEPOSIT */,
|
|
120660
|
+
debtAsset.symbol
|
|
120661
|
+
);
|
|
120662
|
+
const swap_lst_token_id = getAvnuManageIDs(
|
|
120663
|
+
"avnu_mul_swap_withdr" /* AVNU_MULTIPLY_SWAP_WITHDRAW */,
|
|
120664
|
+
debtAsset.symbol
|
|
120665
|
+
);
|
|
120666
|
+
vaultSettings.leafAdapters.push(
|
|
120667
|
+
commonAdapter.getApproveAdapter(
|
|
120668
|
+
debtAsset.address,
|
|
120669
|
+
AVNU_EXCHANGE,
|
|
120670
|
+
approve_debt_token_id
|
|
120671
|
+
).bind(commonAdapter)
|
|
120672
|
+
);
|
|
120673
|
+
vaultSettings.leafAdapters.push(
|
|
120674
|
+
commonAdapter.getAvnuAdapter(
|
|
120675
|
+
debtAsset.address,
|
|
120676
|
+
lstToken.address,
|
|
120677
|
+
swap_debt_token_id,
|
|
120678
|
+
false
|
|
120679
|
+
).bind(commonAdapter)
|
|
120680
|
+
);
|
|
120681
|
+
vaultSettings.leafAdapters.push(
|
|
120682
|
+
commonAdapter.getAvnuAdapter(
|
|
120683
|
+
lstToken.address,
|
|
120684
|
+
debtAsset.address,
|
|
120685
|
+
swap_lst_token_id,
|
|
120686
|
+
false
|
|
120687
|
+
).bind(commonAdapter)
|
|
120688
|
+
);
|
|
120689
|
+
}
|
|
120690
|
+
vaultSettings.leafAdapters.push(
|
|
120691
|
+
commonAdapter.getApproveAdapter(
|
|
120692
|
+
lstToken.address,
|
|
120693
|
+
vaultSettings.vaultAddress,
|
|
120694
|
+
"approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */
|
|
120695
|
+
).bind(commonAdapter)
|
|
120696
|
+
);
|
|
120697
|
+
vaultSettings.leafAdapters.push(
|
|
120698
|
+
commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter)
|
|
120699
|
+
);
|
|
120700
|
+
const STRKToken = Global.getDefaultTokens().find(
|
|
120701
|
+
(token) => token.symbol === "STRK"
|
|
120702
|
+
);
|
|
120703
|
+
vaultSettings.leafAdapters.push(
|
|
120704
|
+
commonAdapter.getApproveAdapter(
|
|
120705
|
+
STRKToken.address,
|
|
120706
|
+
AVNU_EXCHANGE,
|
|
120707
|
+
"approve_swap_token1" /* APPROVE_SWAP_TOKEN1 */
|
|
120708
|
+
).bind(commonAdapter)
|
|
120709
|
+
);
|
|
120710
|
+
vaultSettings.leafAdapters.push(
|
|
120711
|
+
commonAdapter.getAvnuAdapter(
|
|
120712
|
+
STRKToken.address,
|
|
120713
|
+
lstToken.address,
|
|
120714
|
+
"avnu_swap_rewards" /* AVNU_SWAP_REWARDS */,
|
|
120715
|
+
false
|
|
120716
|
+
).bind(commonAdapter)
|
|
120717
|
+
);
|
|
120278
120718
|
return vaultSettings;
|
|
120279
120719
|
}
|
|
120280
120720
|
var AUDIT_URL4 = "https://docs.troves.fi/p/security#starknet-vault-kit";
|
|
@@ -120293,7 +120733,8 @@ spurious results.`);
|
|
|
120293
120733
|
answer: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
|
|
120294
120734
|
"Currently, the LST is from ",
|
|
120295
120735
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Endur" }),
|
|
120296
|
-
" while
|
|
120736
|
+
" while",
|
|
120737
|
+
" ",
|
|
120297
120738
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Vesu" }),
|
|
120298
120739
|
" is used to collateralize the looped position."
|
|
120299
120740
|
] })
|
|
@@ -120325,23 +120766,48 @@ spurious results.`);
|
|
|
120325
120766
|
];
|
|
120326
120767
|
}
|
|
120327
120768
|
var _riskFactor4 = [
|
|
120328
|
-
{
|
|
120329
|
-
|
|
120330
|
-
|
|
120331
|
-
|
|
120332
|
-
|
|
120333
|
-
|
|
120334
|
-
|
|
120335
|
-
|
|
120336
|
-
|
|
120337
|
-
|
|
120769
|
+
{
|
|
120770
|
+
type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */,
|
|
120771
|
+
value: 2 /* WELL_AUDITED */,
|
|
120772
|
+
weight: 25,
|
|
120773
|
+
reason: "Audited by Zellic"
|
|
120774
|
+
},
|
|
120775
|
+
{
|
|
120776
|
+
type: "Liquidation Risk" /* LIQUIDATION_RISK */,
|
|
120777
|
+
value: 1 /* VERY_LOW_PROBABILITY */,
|
|
120778
|
+
weight: 25,
|
|
120779
|
+
reason: "The collateral and debt are highly correlated"
|
|
120780
|
+
},
|
|
120781
|
+
{
|
|
120782
|
+
type: "Technical Risk" /* TECHNICAL_RISK */,
|
|
120783
|
+
value: 1 /* STABLE_INFRASTRUCTURE */,
|
|
120784
|
+
weight: 25,
|
|
120785
|
+
reason: "Liquidation can only happen if vault is left un-monitored for weeks, which is highly unlikely. We actively monitor all services on a daily basis."
|
|
120786
|
+
},
|
|
120787
|
+
{
|
|
120788
|
+
type: "Depeg Risk" /* DEPEG_RISK */,
|
|
120789
|
+
value: 2 /* GENERALLY_STABLE */,
|
|
120790
|
+
weight: 25,
|
|
120791
|
+
reason: "Generally stable pegged assets"
|
|
120792
|
+
}
|
|
120338
120793
|
];
|
|
120794
|
+
var btcBorrowableAssets = ["WBTC", "tBTC", "LBTC", "solvBTC"];
|
|
120339
120795
|
var hyperxSTRK = {
|
|
120340
|
-
vaultAddress: ContractAddr.from(
|
|
120341
|
-
|
|
120342
|
-
|
|
120343
|
-
|
|
120344
|
-
|
|
120796
|
+
vaultAddress: ContractAddr.from(
|
|
120797
|
+
"0x46c7a54c82b1fe374353859f554a40b8bd31d3e30f742901579e7b57b1b5960"
|
|
120798
|
+
),
|
|
120799
|
+
manager: ContractAddr.from(
|
|
120800
|
+
"0x5d499cd333757f461a0bedaca3dfc4d77320c773037e0aa299f22a6dbfdc03a"
|
|
120801
|
+
),
|
|
120802
|
+
vaultAllocator: ContractAddr.from(
|
|
120803
|
+
"0x511d07953a09bc7c505970891507c5a2486d2ea22752601a14db092186d7caa"
|
|
120804
|
+
),
|
|
120805
|
+
redeemRequestNFT: ContractAddr.from(
|
|
120806
|
+
"0x51e40b839dc0c2feca923f863072673b94abfa2483345be3b30b457a90d095"
|
|
120807
|
+
),
|
|
120808
|
+
aumOracle: ContractAddr.from(
|
|
120809
|
+
"0x48cf709870a1a0d453d37de108e0c41b8b89819ef54f95abc0e2e1f98bbe937"
|
|
120810
|
+
),
|
|
120345
120811
|
leafAdapters: [],
|
|
120346
120812
|
adapters: [],
|
|
120347
120813
|
targetHealthFactor: 1.1,
|
|
@@ -120352,35 +120818,63 @@ spurious results.`);
|
|
|
120352
120818
|
...Global.getDefaultTokens().filter((token) => token.symbol === "STRK").map((token) => ({ token, poolId: VesuPools.Re7STRK }))
|
|
120353
120819
|
// v2, new alt for Re7xSTRK
|
|
120354
120820
|
],
|
|
120355
|
-
underlyingToken: Global.getDefaultTokens().find(
|
|
120821
|
+
underlyingToken: Global.getDefaultTokens().find(
|
|
120822
|
+
(token) => token.symbol === "STRK"
|
|
120823
|
+
),
|
|
120356
120824
|
defaultPoolId: VesuPools.Re7xSTRK
|
|
120357
120825
|
};
|
|
120358
120826
|
var hyperxWBTC = {
|
|
120359
|
-
vaultAddress: ContractAddr.from(
|
|
120360
|
-
|
|
120361
|
-
|
|
120362
|
-
|
|
120363
|
-
|
|
120827
|
+
vaultAddress: ContractAddr.from(
|
|
120828
|
+
"0x2da9d0f96a46b453f55604313785dc866424240b1c6811d13bef594343db818"
|
|
120829
|
+
),
|
|
120830
|
+
manager: ContractAddr.from(
|
|
120831
|
+
"0x75866db44c81e6986f06035206ee9c7d15833ddb22d6a22c016cfb5c866a491"
|
|
120832
|
+
),
|
|
120833
|
+
vaultAllocator: ContractAddr.from(
|
|
120834
|
+
"0x57b5c1bb457b5e840a2714ae53ada87d77be2f3fd33a59b4fe709ef20c020c1"
|
|
120835
|
+
),
|
|
120836
|
+
redeemRequestNFT: ContractAddr.from(
|
|
120837
|
+
"0x7a5dc288325456f05e70e9616e16bc02ffbe448f4b89f80b47c0970b989c7c"
|
|
120838
|
+
),
|
|
120839
|
+
aumOracle: ContractAddr.from(
|
|
120840
|
+
"0x258f8a0ca0d21f542e48ad89d00e92dc4d9db4999084f50ef9c22dfb1e83023"
|
|
120841
|
+
),
|
|
120364
120842
|
leafAdapters: [],
|
|
120365
120843
|
adapters: [],
|
|
120366
120844
|
targetHealthFactor: 1.1,
|
|
120367
120845
|
minHealthFactor: 1.05,
|
|
120368
120846
|
borrowable_assets: [
|
|
120369
120847
|
// allow all BTC flavours borrowing on Re7xBTC pool
|
|
120370
|
-
...btcBorrowableAssets.map(
|
|
120848
|
+
...btcBorrowableAssets.map(
|
|
120849
|
+
(asset) => Global.getDefaultTokens().find((token) => token.symbol === asset)
|
|
120850
|
+
).map((token) => ({ token, poolId: VesuPools.Re7xBTC })),
|
|
120371
120851
|
// allow only WBTC borrowing on Prime pool
|
|
120372
120852
|
...Global.getDefaultTokens().filter((token) => token.symbol === "WBTC").map((token) => ({ token, poolId: VesuPools.Prime }))
|
|
120373
120853
|
],
|
|
120374
|
-
underlyingToken: Global.getDefaultTokens().find(
|
|
120854
|
+
underlyingToken: Global.getDefaultTokens().find(
|
|
120855
|
+
(token) => token.symbol === "WBTC"
|
|
120856
|
+
),
|
|
120375
120857
|
defaultPoolId: VesuPools.Re7xBTC,
|
|
120376
|
-
redemptionRouter: ContractAddr.from(
|
|
120858
|
+
redemptionRouter: ContractAddr.from(
|
|
120859
|
+
"0x6ea649f402898f69baf775c1afdd08522c071c640b9c4460192070ec2b96417"
|
|
120860
|
+
)
|
|
120377
120861
|
};
|
|
120378
120862
|
var hyperxtBTC = {
|
|
120379
|
-
vaultAddress: ContractAddr.from(
|
|
120380
|
-
|
|
120381
|
-
|
|
120382
|
-
|
|
120383
|
-
|
|
120863
|
+
vaultAddress: ContractAddr.from(
|
|
120864
|
+
"0x47d5f68477e5637ce0e56436c6b5eee5a354e6828995dae106b11a48679328"
|
|
120865
|
+
),
|
|
120866
|
+
manager: ContractAddr.from(
|
|
120867
|
+
"0xc4cc3e08029a0ae076f5fdfca70575abb78d23c5cd1c49a957f7e697885401"
|
|
120868
|
+
),
|
|
120869
|
+
vaultAllocator: ContractAddr.from(
|
|
120870
|
+
"0x50bbd4fe69f841ecb13b2619fe50ebfa4e8944671b5d0ebf7868fd80c61b31e"
|
|
120871
|
+
),
|
|
120872
|
+
redeemRequestNFT: ContractAddr.from(
|
|
120873
|
+
"0xeac9032f02057779816e38a6cb9185d12d86b3aacc9949b96b36de359c1e3"
|
|
120874
|
+
),
|
|
120875
|
+
aumOracle: ContractAddr.from(
|
|
120876
|
+
"0x7e0d05cb7ba3f7db77a36c21c21583b5a524c2e685c08c24b3554911fb4a039"
|
|
120877
|
+
),
|
|
120384
120878
|
leafAdapters: [],
|
|
120385
120879
|
adapters: [],
|
|
120386
120880
|
targetHealthFactor: 1.1,
|
|
@@ -120388,16 +120882,30 @@ spurious results.`);
|
|
|
120388
120882
|
borrowable_assets: [
|
|
120389
120883
|
...Global.getDefaultTokens().filter((token) => token.symbol === "tBTC" || token.symbol === "WBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
|
|
120390
120884
|
],
|
|
120391
|
-
underlyingToken: Global.getDefaultTokens().find(
|
|
120885
|
+
underlyingToken: Global.getDefaultTokens().find(
|
|
120886
|
+
(token) => token.symbol === "tBTC"
|
|
120887
|
+
),
|
|
120392
120888
|
defaultPoolId: VesuPools.Re7xBTC,
|
|
120393
|
-
redemptionRouter: ContractAddr.from(
|
|
120889
|
+
redemptionRouter: ContractAddr.from(
|
|
120890
|
+
"0x3de9c409d1e357e25778fb7a3e2e2393666956846a5c2caa607296fa8e76b5d"
|
|
120891
|
+
)
|
|
120394
120892
|
};
|
|
120395
120893
|
var hyperxsBTC = {
|
|
120396
|
-
vaultAddress: ContractAddr.from(
|
|
120397
|
-
|
|
120398
|
-
|
|
120399
|
-
|
|
120400
|
-
|
|
120894
|
+
vaultAddress: ContractAddr.from(
|
|
120895
|
+
"0x437ef1e7d0f100b2e070b7a65cafec0b2be31b0290776da8b4112f5473d8d9"
|
|
120896
|
+
),
|
|
120897
|
+
manager: ContractAddr.from(
|
|
120898
|
+
"0xc9ac023090625b0be3f6532ca353f086746f9c09f939dbc1b2613f09e5f821"
|
|
120899
|
+
),
|
|
120900
|
+
vaultAllocator: ContractAddr.from(
|
|
120901
|
+
"0x60c2d856936b975459a5b4eb28b8672d91f757bd76cebb6241f8d670185dc01"
|
|
120902
|
+
),
|
|
120903
|
+
redeemRequestNFT: ContractAddr.from(
|
|
120904
|
+
"0x429e8ee8bc7ecd1ade72630d350a2e0f10f9a2507c45f188ba17fe8f2ab4cf3"
|
|
120905
|
+
),
|
|
120906
|
+
aumOracle: ContractAddr.from(
|
|
120907
|
+
"0x149298ade3e79ec6cbdac6cfad289c57504eaf54e590939136ed1ceca60c345"
|
|
120908
|
+
),
|
|
120401
120909
|
leafAdapters: [],
|
|
120402
120910
|
adapters: [],
|
|
120403
120911
|
targetHealthFactor: 1.1,
|
|
@@ -120405,15 +120913,27 @@ spurious results.`);
|
|
|
120405
120913
|
borrowable_assets: [
|
|
120406
120914
|
...Global.getDefaultTokens().filter((token) => token.symbol === "solvBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
|
|
120407
120915
|
],
|
|
120408
|
-
underlyingToken: Global.getDefaultTokens().find(
|
|
120916
|
+
underlyingToken: Global.getDefaultTokens().find(
|
|
120917
|
+
(token) => token.symbol === "solvBTC"
|
|
120918
|
+
),
|
|
120409
120919
|
defaultPoolId: VesuPools.Re7xBTC
|
|
120410
120920
|
};
|
|
120411
120921
|
var hyperxLBTC = {
|
|
120412
|
-
vaultAddress: ContractAddr.from(
|
|
120413
|
-
|
|
120414
|
-
|
|
120415
|
-
|
|
120416
|
-
|
|
120922
|
+
vaultAddress: ContractAddr.from(
|
|
120923
|
+
"0x64cf24d4883fe569926419a0569ab34497c6956a1a308fa883257f7486d7030"
|
|
120924
|
+
),
|
|
120925
|
+
manager: ContractAddr.from(
|
|
120926
|
+
"0x203530a4022a99b8f4b406aaf33b0849d43ad7422c1d5cc14ff8c667abec6c0"
|
|
120927
|
+
),
|
|
120928
|
+
vaultAllocator: ContractAddr.from(
|
|
120929
|
+
"0x7dbc8ccd4eabce6ea6c19e0e5c9ccca3a93bd510303b9e071cbe25fc508546e"
|
|
120930
|
+
),
|
|
120931
|
+
redeemRequestNFT: ContractAddr.from(
|
|
120932
|
+
"0x5ee66a39af9aef3d0d48982b4a63e8bd2a5bad021916bd87fb0eae3a26800b8"
|
|
120933
|
+
),
|
|
120934
|
+
aumOracle: ContractAddr.from(
|
|
120935
|
+
"0x23d69e4391fa72d10e625e7575d8bddbb4aff96f04503f83fdde23123bf41d0"
|
|
120936
|
+
),
|
|
120417
120937
|
leafAdapters: [],
|
|
120418
120938
|
adapters: [],
|
|
120419
120939
|
targetHealthFactor: 1.1,
|
|
@@ -120421,7 +120941,9 @@ spurious results.`);
|
|
|
120421
120941
|
borrowable_assets: [
|
|
120422
120942
|
...Global.getDefaultTokens().filter((token) => token.symbol === "LBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
|
|
120423
120943
|
],
|
|
120424
|
-
underlyingToken: Global.getDefaultTokens().find(
|
|
120944
|
+
underlyingToken: Global.getDefaultTokens().find(
|
|
120945
|
+
(token) => token.symbol === "LBTC"
|
|
120946
|
+
),
|
|
120425
120947
|
defaultPoolId: VesuPools.Re7xBTC
|
|
120426
120948
|
};
|
|
120427
120949
|
function getInvestmentSteps(lstSymbol, underlyingSymbol) {
|
|
@@ -120439,7 +120961,7 @@ spurious results.`);
|
|
|
120439
120961
|
xLBTC: 5,
|
|
120440
120962
|
xtBTC: 5,
|
|
120441
120963
|
xsBTC: 5,
|
|
120442
|
-
xSTRK:
|
|
120964
|
+
xSTRK: 7e6
|
|
120443
120965
|
};
|
|
120444
120966
|
const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
|
|
120445
120967
|
const token = Global.getDefaultTokens().find(
|
|
@@ -120508,15 +121030,19 @@ spurious results.`);
|
|
|
120508
121030
|
};
|
|
120509
121031
|
var HYPER_LST_REDEMPTION_INFO = {
|
|
120510
121032
|
instantWithdrawalVault: "No" /* NO */,
|
|
120511
|
-
redemptionsInfo: [
|
|
120512
|
-
|
|
120513
|
-
|
|
120514
|
-
|
|
120515
|
-
|
|
120516
|
-
|
|
120517
|
-
|
|
120518
|
-
|
|
120519
|
-
|
|
121033
|
+
redemptionsInfo: [
|
|
121034
|
+
{
|
|
121035
|
+
title: "Typical Duration",
|
|
121036
|
+
description: "1-2 hours"
|
|
121037
|
+
}
|
|
121038
|
+
],
|
|
121039
|
+
alerts: [
|
|
121040
|
+
{
|
|
121041
|
+
type: "info",
|
|
121042
|
+
text: "In cases of low liquidity, high slippages, the redemptions can take longer time. Redemption times are estimates and may vary based on network conditions and liquidity requirements.",
|
|
121043
|
+
tab: "withdraw"
|
|
121044
|
+
}
|
|
121045
|
+
]
|
|
120520
121046
|
};
|
|
120521
121047
|
function getStrategySettings(lstSymbol, underlyingSymbol, settings2, isPreview = false) {
|
|
120522
121048
|
return {
|
|
@@ -120531,9 +121057,7 @@ spurious results.`);
|
|
|
120531
121057
|
description: `Creates leveraged looping position on ${lstSymbol} by borrowing ${underlyingSymbol} to increase yield`
|
|
120532
121058
|
},
|
|
120533
121059
|
depositTokens: [
|
|
120534
|
-
Global.getDefaultTokens().find(
|
|
120535
|
-
(token) => token.symbol === lstSymbol
|
|
120536
|
-
)
|
|
121060
|
+
Global.getDefaultTokens().find((token) => token.symbol === lstSymbol)
|
|
120537
121061
|
],
|
|
120538
121062
|
additionalInfo: getLooperSettings2(
|
|
120539
121063
|
lstSymbol,
|
|
@@ -120543,10 +121067,7 @@ spurious results.`);
|
|
|
120543
121067
|
),
|
|
120544
121068
|
risk: {
|
|
120545
121069
|
riskFactor: _riskFactor4,
|
|
120546
|
-
netRisk: _riskFactor4.reduce(
|
|
120547
|
-
(acc, curr) => acc + curr.value * curr.weight,
|
|
120548
|
-
0
|
|
120549
|
-
) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
|
|
121070
|
+
netRisk: _riskFactor4.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor4.reduce((acc, curr) => acc + curr.weight, 0),
|
|
120550
121071
|
notARisks: getNoRiskTags(_riskFactor4)
|
|
120551
121072
|
},
|
|
120552
121073
|
auditUrl: AUDIT_URL4,
|
|
@@ -120561,16 +121082,19 @@ spurious results.`);
|
|
|
120561
121082
|
investmentSteps: getInvestmentSteps(lstSymbol, underlyingSymbol),
|
|
120562
121083
|
isPreview,
|
|
120563
121084
|
apyMethodology: "Current annualized APY in terms of base asset of the LST. There is no additional fee taken by Troves on LST APY. We charge a 10% performance fee on the additional gain which is already accounted in the APY shown.",
|
|
121085
|
+
realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
|
|
120564
121086
|
tags: lstSymbol.includes("BTC") ? ["BTC" /* BTC */, "Maxx" /* LEVERED */] : ["Maxx" /* LEVERED */],
|
|
120565
121087
|
security: HYPER_LST_SECURITY,
|
|
120566
121088
|
redemptionInfo: HYPER_LST_REDEMPTION_INFO,
|
|
120567
121089
|
usualTimeToEarnings: "2 weeks",
|
|
120568
121090
|
usualTimeToEarningsDescription: "Strategy returns depend on LST price on DEXes. Even though the true price of LST on Endur increases continuously, the DEX price may lag sometimes, and historically is seen to rebase at least once every 2 hours. This is when you realise your earnings.",
|
|
120569
|
-
points: [
|
|
120570
|
-
|
|
120571
|
-
|
|
120572
|
-
|
|
120573
|
-
|
|
121091
|
+
points: [
|
|
121092
|
+
{
|
|
121093
|
+
multiplier: 4,
|
|
121094
|
+
logo: "https://endur.fi/favicon.ico",
|
|
121095
|
+
toolTip: "This strategy holds xSTRK. Earn 3-4x Endur points on your xSTRK due to the leverage. Points can be found on endur.fi."
|
|
121096
|
+
}
|
|
121097
|
+
]
|
|
120574
121098
|
};
|
|
120575
121099
|
}
|
|
120576
121100
|
var HyperLSTStrategies = [
|