@strkfarm/sdk 2.0.0-staging.22 → 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.
@@ -27931,6 +27931,7 @@ ${JSON.stringify(data, null, 2)}`;
27931
27931
  Initializable: () => Initializable,
27932
27932
  InstantWithdrawalVault: () => InstantWithdrawalVault,
27933
27933
  LSTAPRService: () => LSTAPRService,
27934
+ LSTPriceType: () => LSTPriceType,
27934
27935
  MarginType: () => MarginType,
27935
27936
  MyNumber: () => MyNumber,
27936
27937
  Network: () => Network2,
@@ -39340,7 +39341,7 @@ ${indent2}}` : "}";
39340
39341
  var _0n6 = BigInt(0);
39341
39342
  var Point = secp256k1.ProjectivePoint;
39342
39343
 
39343
- // 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
39344
39345
  init_esm();
39345
39346
  var __defProp2 = Object.defineProperty;
39346
39347
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -73199,7 +73200,7 @@ ${JSON.stringify(data, null, 2)}`;
73199
73200
  }
73200
73201
  };
73201
73202
 
73202
- // 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_/node_modules/@avnu/avnu-sdk/dist/index.mjs
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
73203
73204
  var import_qs = __toESM(require_lib(), 1);
73204
73205
  var BASE_URL = "https://starknet.api.avnu.fi";
73205
73206
  var ContractError = class {
@@ -76537,10 +76538,10 @@ ${JSON.stringify(data, null, 2)}`;
76537
76538
  return old;
76538
76539
  }
76539
76540
 
76540
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/version.js
76541
+ // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0/node_modules/@apollo/client/version.js
76541
76542
  var version4 = "3.11.8";
76542
76543
 
76543
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/globals/maybe.js
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
76544
76545
  function maybe(thunk) {
76545
76546
  try {
76546
76547
  return thunk();
@@ -76548,7 +76549,7 @@ ${JSON.stringify(data, null, 2)}`;
76548
76549
  }
76549
76550
  }
76550
76551
 
76551
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/globals/global.js
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
76552
76553
  var global_default = maybe(function() {
76553
76554
  return globalThis;
76554
76555
  }) || maybe(function() {
@@ -76567,7 +76568,7 @@ ${JSON.stringify(data, null, 2)}`;
76567
76568
  return maybe.constructor("return this")();
76568
76569
  });
76569
76570
 
76570
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/makeUniqueId.js
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
76571
76572
  var prefixCounts = /* @__PURE__ */ new Map();
76572
76573
  function makeUniqueId(prefix) {
76573
76574
  var count = prefixCounts.get(prefix) || 1;
@@ -76575,7 +76576,7 @@ ${JSON.stringify(data, null, 2)}`;
76575
76576
  return "".concat(prefix, ":").concat(count, ":").concat(Math.random().toString(36).slice(2));
76576
76577
  }
76577
76578
 
76578
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/stringifyForDisplay.js
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
76579
76580
  function stringifyForDisplay(value, space) {
76580
76581
  if (space === void 0) {
76581
76582
  space = 0;
@@ -76586,7 +76587,7 @@ ${JSON.stringify(data, null, 2)}`;
76586
76587
  }, space).split(JSON.stringify(undefId)).join("<undefined>");
76587
76588
  }
76588
76589
 
76589
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/globals/invariantWrappers.js
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
76590
76591
  function wrap(fn) {
76591
76592
  return function(message) {
76592
76593
  var args = [];
@@ -76657,7 +76658,7 @@ ${JSON.stringify(data, null, 2)}`;
76657
76658
  })));
76658
76659
  }
76659
76660
 
76660
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/globals/index.js
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
76661
76662
  var DEV = globalThis.__DEV__ !== false;
76662
76663
 
76663
76664
  // node_modules/.pnpm/graphql@16.9.0/node_modules/graphql/jsutils/devAssert.mjs
@@ -79732,7 +79733,7 @@ spurious results.`);
79732
79733
  return node.kind === Kind.FIELD || node.kind === Kind.FRAGMENT_SPREAD || node.kind === Kind.INLINE_FRAGMENT;
79733
79734
  }
79734
79735
 
79735
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/directives.js
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
79736
79737
  function shouldInclude(_a22, variables) {
79737
79738
  var directives = _a22.directives;
79738
79739
  if (!directives || !directives.length) {
@@ -79860,7 +79861,7 @@ spurious results.`);
79860
79861
  return false;
79861
79862
  }
79862
79863
 
79863
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/canUse.js
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
79864
79865
  var isReactNative = maybe(function() {
79865
79866
  return navigator.product;
79866
79867
  }) == "ReactNative";
@@ -79885,12 +79886,12 @@ spurious results.`);
79885
79886
  }) || false
79886
79887
  );
79887
79888
 
79888
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/objects.js
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
79889
79890
  function isNonNullObject(obj) {
79890
79891
  return obj !== null && typeof obj === "object";
79891
79892
  }
79892
79893
 
79893
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/fragments.js
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
79894
79895
  function getFragmentQueryDocument(document2, fragmentName) {
79895
79896
  var actualFragmentName = fragmentName;
79896
79897
  var fragments = [];
@@ -80186,7 +80187,7 @@ spurious results.`);
80186
80187
  }
80187
80188
  };
80188
80189
 
80189
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/caching/caches.js
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
80190
80191
  var scheduledCleanup = /* @__PURE__ */ new WeakSet();
80191
80192
  function schedule(cache) {
80192
80193
  if (cache.size <= (cache.max || -1)) {
@@ -80219,11 +80220,11 @@ spurious results.`);
80219
80220
  return cache;
80220
80221
  };
80221
80222
 
80222
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/caching/sizes.js
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
80223
80224
  var cacheSizeSymbol = /* @__PURE__ */ Symbol.for("apollo.cacheSize");
80224
80225
  var cacheSizes = __assign({}, global_default[cacheSizeSymbol]);
80225
80226
 
80226
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/caching/getMemoryInternals.js
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
80227
80228
  var globalCaches = {};
80228
80229
  function registerGlobalCache(name, getSize) {
80229
80230
  globalCaches[name] = getSize;
@@ -80313,7 +80314,7 @@ spurious results.`);
80313
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) : [];
80314
80315
  }
80315
80316
 
80316
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/canonicalStringify.js
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
80317
80318
  var canonicalStringify = Object.assign(function canonicalStringify2(value) {
80318
80319
  return JSON.stringify(value, stableObjectReplacer);
80319
80320
  }, {
@@ -80360,7 +80361,7 @@ spurious results.`);
80360
80361
  return i === 0 || keys[i - 1] <= key;
80361
80362
  }
80362
80363
 
80363
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/storeUtils.js
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
80364
80365
  function makeReference(id2) {
80365
80366
  return { __ref: String(id2) };
80366
80367
  }
@@ -80545,7 +80546,7 @@ spurious results.`);
80545
80546
  return selection.kind === "InlineFragment";
80546
80547
  }
80547
80548
 
80548
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/getFromAST.js
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
80549
80550
  function checkDocument(doc) {
80550
80551
  invariant2(doc && doc.kind === "Document", 77);
80551
80552
  var operations = doc.definitions.filter(function(d) {
@@ -81104,7 +81105,7 @@ spurious results.`);
81104
81105
  return Object.freeze(optimistic);
81105
81106
  }
81106
81107
 
81107
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/DocumentTransform.js
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
81108
81109
  function identity(document2) {
81109
81110
  return document2;
81110
81111
  }
@@ -81188,7 +81189,7 @@ spurious results.`);
81188
81189
  })()
81189
81190
  );
81190
81191
 
81191
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/print.js
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
81192
81193
  var printCache;
81193
81194
  var print2 = Object.assign(function(ast) {
81194
81195
  var result2 = printCache.get(ast);
@@ -81212,13 +81213,13 @@ spurious results.`);
81212
81213
  });
81213
81214
  }
81214
81215
 
81215
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/arrays.js
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
81216
81217
  var isArray2 = Array.isArray;
81217
81218
  function isNonEmptyArray(value) {
81218
81219
  return Array.isArray(value) && value.length > 0;
81219
81220
  }
81220
81221
 
81221
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/graphql/transform.js
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
81222
81223
  var TYPENAME_FIELD = {
81223
81224
  kind: Kind.FIELD,
81224
81225
  name: {
@@ -81510,7 +81511,7 @@ spurious results.`);
81510
81511
  return modifiedDoc;
81511
81512
  }
81512
81513
 
81513
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/mergeDeep.js
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
81514
81515
  var hasOwnProperty4 = Object.prototype.hasOwnProperty;
81515
81516
  function mergeDeep() {
81516
81517
  var sources = [];
@@ -82146,7 +82147,7 @@ spurious results.`);
82146
82147
  }
82147
82148
  var result = symbolObservablePonyfill(root);
82148
82149
 
82149
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/observables/Observable.js
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
82150
82151
  var prototype3 = Observable.prototype;
82151
82152
  var fakeObsSymbol = "@@observable";
82152
82153
  if (!prototype3[fakeObsSymbol]) {
@@ -82155,7 +82156,7 @@ spurious results.`);
82155
82156
  };
82156
82157
  }
82157
82158
 
82158
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/cloneDeep.js
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
82159
82160
  var toString5 = Object.prototype.toString;
82160
82161
  function cloneDeep(value) {
82161
82162
  return cloneDeepHelper(value);
@@ -82189,7 +82190,7 @@ spurious results.`);
82189
82190
  }
82190
82191
  }
82191
82192
 
82192
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/maybeDeepFreeze.js
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
82193
82194
  function deepFreeze(value) {
82194
82195
  var workSet = /* @__PURE__ */ new Set([value]);
82195
82196
  workSet.forEach(function(obj) {
@@ -82221,7 +82222,7 @@ spurious results.`);
82221
82222
  return obj;
82222
82223
  }
82223
82224
 
82224
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/observables/iteration.js
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
82225
82226
  function iterateObserversSafely(observers, method, argument) {
82226
82227
  var observersWithMethod = [];
82227
82228
  observers.forEach(function(obs) {
@@ -82232,7 +82233,7 @@ spurious results.`);
82232
82233
  });
82233
82234
  }
82234
82235
 
82235
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/observables/asyncMap.js
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
82236
82237
  function asyncMap(observable, mapFn, catchFn) {
82237
82238
  return new Observable(function(observer) {
82238
82239
  var promiseQueue = {
@@ -82280,7 +82281,7 @@ spurious results.`);
82280
82281
  });
82281
82282
  }
82282
82283
 
82283
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/observables/subclassing.js
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
82284
82285
  function fixObservableSubclass(subclass) {
82285
82286
  function set(key) {
82286
82287
  Object.defineProperty(subclass, key, { value: Observable });
@@ -82292,7 +82293,7 @@ spurious results.`);
82292
82293
  return subclass;
82293
82294
  }
82294
82295
 
82295
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/observables/Concast.js
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
82296
82297
  function isPromiseLike(value) {
82297
82298
  return value && typeof value.then === "function";
82298
82299
  }
@@ -82433,7 +82434,7 @@ spurious results.`);
82433
82434
  );
82434
82435
  fixObservableSubclass(Concast);
82435
82436
 
82436
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/incrementalResult.js
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
82437
82438
  function isExecutionPatchIncrementalResult(value) {
82438
82439
  return "incremental" in value;
82439
82440
  }
@@ -82465,7 +82466,7 @@ spurious results.`);
82465
82466
  return mergedData;
82466
82467
  }
82467
82468
 
82468
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/errorHandling.js
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
82469
82470
  function graphQLResultHasError(result2) {
82470
82471
  var errors2 = getGraphQLErrorsFromResult(result2);
82471
82472
  return isNonEmptyArray(errors2);
@@ -82482,7 +82483,7 @@ spurious results.`);
82482
82483
  return graphQLErrors;
82483
82484
  }
82484
82485
 
82485
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/compact.js
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
82486
82487
  function compact() {
82487
82488
  var objects = [];
82488
82489
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -82502,21 +82503,21 @@ spurious results.`);
82502
82503
  return result2;
82503
82504
  }
82504
82505
 
82505
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/utilities/common/mergeOptions.js
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
82506
82507
  function mergeOptions(defaults2, options) {
82507
82508
  return compact(defaults2, options, options.variables && {
82508
82509
  variables: compact(__assign(__assign({}, defaults2 && defaults2.variables), options.variables))
82509
82510
  });
82510
82511
  }
82511
82512
 
82512
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/utils/fromError.js
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
82513
82514
  function fromError(errorValue) {
82514
82515
  return new Observable(function(observer) {
82515
82516
  observer.error(errorValue);
82516
82517
  });
82517
82518
  }
82518
82519
 
82519
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/utils/throwServerError.js
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
82520
82521
  var throwServerError = function(response, result2, message) {
82521
82522
  var error2 = new Error(message);
82522
82523
  error2.name = "ServerError";
@@ -82526,7 +82527,7 @@ spurious results.`);
82526
82527
  throw error2;
82527
82528
  };
82528
82529
 
82529
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/utils/validateOperation.js
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
82530
82531
  function validateOperation(operation) {
82531
82532
  var OPERATION_FIELDS = [
82532
82533
  "query",
@@ -82544,7 +82545,7 @@ spurious results.`);
82544
82545
  return operation;
82545
82546
  }
82546
82547
 
82547
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/utils/createOperation.js
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
82548
82549
  function createOperation(starting, operation) {
82549
82550
  var context = __assign({}, starting);
82550
82551
  var setContext = function(next) {
@@ -82568,7 +82569,7 @@ spurious results.`);
82568
82569
  return operation;
82569
82570
  }
82570
82571
 
82571
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/utils/transformOperation.js
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
82572
82573
  function transformOperation(operation) {
82573
82574
  var transformedOperation = {
82574
82575
  variables: operation.variables || {},
@@ -82582,7 +82583,7 @@ spurious results.`);
82582
82583
  return transformedOperation;
82583
82584
  }
82584
82585
 
82585
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/utils/filterOperationVariables.js
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
82586
82587
  function filterOperationVariables(variables, query) {
82587
82588
  var result2 = __assign({}, variables);
82588
82589
  var unusedNames = new Set(Object.keys(variables));
@@ -82599,7 +82600,7 @@ spurious results.`);
82599
82600
  return result2;
82600
82601
  }
82601
82602
 
82602
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/core/ApolloLink.js
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
82603
82604
  function passthrough(op, forward) {
82604
82605
  return forward ? forward(op) : Observable.of();
82605
82606
  }
@@ -82693,10 +82694,10 @@ spurious results.`);
82693
82694
  })()
82694
82695
  );
82695
82696
 
82696
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/core/execute.js
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
82697
82698
  var execute = ApolloLink.execute;
82698
82699
 
82699
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/iterators/async.js
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
82700
82701
  function asyncIterator(source) {
82701
82702
  var _a22;
82702
82703
  var iterator2 = source[Symbol.asyncIterator]();
@@ -82709,7 +82710,7 @@ spurious results.`);
82709
82710
  }, _a22;
82710
82711
  }
82711
82712
 
82712
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/iterators/nodeStream.js
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
82713
82714
  function nodeStreamIterator(stream) {
82714
82715
  var cleanup = null;
82715
82716
  var error2 = null;
@@ -82780,7 +82781,7 @@ spurious results.`);
82780
82781
  return iterator2;
82781
82782
  }
82782
82783
 
82783
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/iterators/promise.js
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
82784
82785
  function promiseIterator(promise) {
82785
82786
  var resolved = false;
82786
82787
  var iterator2 = {
@@ -82806,7 +82807,7 @@ spurious results.`);
82806
82807
  return iterator2;
82807
82808
  }
82808
82809
 
82809
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/iterators/reader.js
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
82810
82811
  function readerIterator(reader) {
82811
82812
  var iterator2 = {
82812
82813
  next: function() {
@@ -82821,7 +82822,7 @@ spurious results.`);
82821
82822
  return iterator2;
82822
82823
  }
82823
82824
 
82824
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/responseIterator.js
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
82825
82826
  function isNodeResponse(value) {
82826
82827
  return !!value.body;
82827
82828
  }
@@ -82858,7 +82859,7 @@ spurious results.`);
82858
82859
  throw new Error("Unknown body type for responseIterator. Please pass a streamable response.");
82859
82860
  }
82860
82861
 
82861
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/errors/index.js
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
82862
82863
  var PROTOCOL_ERRORS_SYMBOL = /* @__PURE__ */ Symbol();
82863
82864
  function graphQLResultHasProtocolErrors(result2) {
82864
82865
  if (result2.extensions) {
@@ -82903,7 +82904,7 @@ spurious results.`);
82903
82904
  })(Error)
82904
82905
  );
82905
82906
 
82906
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
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
82907
82908
  var hasOwnProperty5 = Object.prototype.hasOwnProperty;
82908
82909
  function readMultipartBody(response, nextValue) {
82909
82910
  return __awaiter(this, void 0, void 0, function() {
@@ -83047,7 +83048,7 @@ spurious results.`);
83047
83048
  };
83048
83049
  }
83049
83050
 
83050
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/serializeFetchParameter.js
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
83051
83052
  var serializeFetchParameter = function(p, label) {
83052
83053
  var serialized;
83053
83054
  try {
@@ -83060,7 +83061,7 @@ spurious results.`);
83060
83061
  return serialized;
83061
83062
  };
83062
83063
 
83063
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js
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
83064
83065
  var defaultHttpOptions = {
83065
83066
  includeQuery: true,
83066
83067
  includeExtensions: false,
@@ -83144,14 +83145,14 @@ spurious results.`);
83144
83145
  return normalizedHeaders;
83145
83146
  }
83146
83147
 
83147
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/checkFetcher.js
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
83148
83149
  var checkFetcher = function(fetcher) {
83149
83150
  if (!fetcher && typeof fetch === "undefined") {
83150
83151
  throw newInvariantError(38);
83151
83152
  }
83152
83153
  };
83153
83154
 
83154
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/selectURI.js
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
83155
83156
  var selectURI = function(operation, fallbackURI) {
83156
83157
  var context = operation.getContext();
83157
83158
  var contextURI = context.uri;
@@ -83164,7 +83165,7 @@ spurious results.`);
83164
83165
  }
83165
83166
  };
83166
83167
 
83167
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/rewriteURIForGET.js
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
83168
83169
  function rewriteURIForGET(chosenURI, body) {
83169
83170
  var queryParams = [];
83170
83171
  var addQueryParam = function(key, value) {
@@ -83205,7 +83206,7 @@ spurious results.`);
83205
83206
  return { newURI };
83206
83207
  }
83207
83208
 
83208
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/createHttpLink.js
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
83209
83210
  var backupFetch = maybe(function() {
83210
83211
  return fetch;
83211
83212
  });
@@ -83325,7 +83326,7 @@ spurious results.`);
83325
83326
  });
83326
83327
  };
83327
83328
 
83328
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/link/http/HttpLink.js
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
83329
83330
  var HttpLink = (
83330
83331
  /** @class */
83331
83332
  (function(_super) {
@@ -83478,7 +83479,7 @@ spurious results.`);
83478
83479
  return false;
83479
83480
  }
83480
83481
 
83481
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/equalByQuery.js
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
83482
83483
  function equalByQuery(query, _a22, _b, variables) {
83483
83484
  var aData = _a22.data, aRest = __rest(_a22, ["data"]);
83484
83485
  var bData = _b.data, bRest = __rest(_b, ["data"]);
@@ -83551,7 +83552,7 @@ spurious results.`);
83551
83552
  return dir.name.value === "nonreactive";
83552
83553
  }
83553
83554
 
83554
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/core/cache.js
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
83555
83556
  var ApolloCache = (
83556
83557
  /** @class */
83557
83558
  (function() {
@@ -83683,7 +83684,7 @@ spurious results.`);
83683
83684
  ApolloCache.prototype.getMemoryInternals = getApolloCacheMemoryInternals;
83684
83685
  }
83685
83686
 
83686
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/core/types/common.js
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
83687
83688
  var MissingFieldError = (
83688
83689
  /** @class */
83689
83690
  (function(_super) {
@@ -83710,7 +83711,7 @@ spurious results.`);
83710
83711
  })(Error)
83711
83712
  );
83712
83713
 
83713
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/helpers.js
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
83714
83715
  var hasOwn = Object.prototype.hasOwnProperty;
83715
83716
  function isNullish(value) {
83716
83717
  return value === null || value === void 0;
@@ -83786,7 +83787,7 @@ spurious results.`);
83786
83787
  };
83787
83788
  }
83788
83789
 
83789
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/entityStore.js
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
83790
83791
  var DELETE = /* @__PURE__ */ Object.create(null);
83791
83792
  var delModifier = function() {
83792
83793
  return DELETE;
@@ -84303,7 +84304,7 @@ spurious results.`);
84303
84304
  return !!(store instanceof EntityStore && store.group.caching);
84304
84305
  }
84305
84306
 
84306
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/object-canon.js
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
84307
84308
  function shallowCopy(value) {
84308
84309
  if (isNonNullObject(value)) {
84309
84310
  return isArray2(value) ? value.slice(0) : __assign({ __proto__: Object.getPrototypeOf(value) }, value);
@@ -84397,7 +84398,7 @@ spurious results.`);
84397
84398
  })()
84398
84399
  );
84399
84400
 
84400
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/readFromStore.js
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
84401
84402
  function execSelectionSetKeyArgs(options) {
84402
84403
  return [
84403
84404
  options.selectionSet,
@@ -84666,7 +84667,7 @@ spurious results.`);
84666
84667
  }
84667
84668
  }
84668
84669
 
84669
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/reactiveVars.js
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
84670
84671
  var cacheSlot = new Slot();
84671
84672
  var cacheInfoMap = /* @__PURE__ */ new WeakMap();
84672
84673
  function getCacheInfo(cache) {
@@ -84737,7 +84738,7 @@ spurious results.`);
84737
84738
  }
84738
84739
  }
84739
84740
 
84740
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/key-extractor.js
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
84741
84742
  var specifierInfoCache = /* @__PURE__ */ Object.create(null);
84742
84743
  function lookupSpecifierInfo(spec) {
84743
84744
  var cacheKey = JSON.stringify(spec);
@@ -84870,7 +84871,7 @@ spurious results.`);
84870
84871
  return value;
84871
84872
  }
84872
84873
 
84873
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/policies.js
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
84874
84875
  function argsFromFieldSpecifier(spec) {
84875
84876
  return spec.args !== void 0 ? spec.args : spec.field ? argumentsObjectFromField(spec.field, spec.variables) : null;
84876
84877
  }
@@ -85305,7 +85306,7 @@ spurious results.`);
85305
85306
  };
85306
85307
  }
85307
85308
 
85308
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/writeToStore.js
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
85309
85310
  function getContextFlavor(context, clientOnly, deferred) {
85310
85311
  var key = "".concat(clientOnly).concat(deferred);
85311
85312
  var flavored = context.flavors.get(key);
@@ -85710,7 +85711,7 @@ spurious results.`);
85710
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));
85711
85712
  }
85712
85713
 
85713
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js
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
85714
85715
  var InMemoryCache = (
85715
85716
  /** @class */
85716
85717
  (function(_super) {
@@ -86019,7 +86020,7 @@ spurious results.`);
86019
86020
  InMemoryCache.prototype.getMemoryInternals = getInMemoryCacheMemoryInternals;
86020
86021
  }
86021
86022
 
86022
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/networkStatus.js
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
86023
86024
  var NetworkStatus;
86024
86025
  (function(NetworkStatus2) {
86025
86026
  NetworkStatus2[NetworkStatus2["loading"] = 1] = "loading";
@@ -86034,7 +86035,7 @@ spurious results.`);
86034
86035
  return networkStatus ? networkStatus < 7 : false;
86035
86036
  }
86036
86037
 
86037
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/ObservableQuery.js
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
86038
86039
  var assign2 = Object.assign;
86039
86040
  var hasOwnProperty7 = Object.hasOwnProperty;
86040
86041
  var ObservableQuery = (
@@ -86642,7 +86643,7 @@ spurious results.`);
86642
86643
  return fetchPolicy === "network-only" || fetchPolicy === "no-cache" || fetchPolicy === "standby";
86643
86644
  }
86644
86645
 
86645
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/QueryInfo.js
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
86646
86647
  var destructiveMethodCounts = new (canUseWeakMap ? WeakMap : Map)();
86647
86648
  function wrapDestructiveCacheMethod(cache, methodName) {
86648
86649
  var original = cache[methodName];
@@ -86934,7 +86935,7 @@ spurious results.`);
86934
86935
  return writeWithErrors;
86935
86936
  }
86936
86937
 
86937
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/QueryManager.js
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
86938
86939
  var hasOwnProperty8 = Object.prototype.hasOwnProperty;
86939
86940
  var IGNORE = /* @__PURE__ */ Object.create(null);
86940
86941
  var QueryManager = (
@@ -87920,7 +87921,7 @@ spurious results.`);
87920
87921
  })()
87921
87922
  );
87922
87923
 
87923
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/LocalState.js
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
87924
87925
  var LocalState = (
87925
87926
  /** @class */
87926
87927
  (function() {
@@ -88270,7 +88271,7 @@ spurious results.`);
88270
88271
  })()
88271
88272
  );
88272
88273
 
88273
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/ApolloClient.js
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
88274
88275
  var hasSuggestedDevtools = false;
88275
88276
  var ApolloClient = (
88276
88277
  /** @class */
@@ -88672,7 +88673,7 @@ spurious results.`);
88672
88673
  })(gql || (gql = {}));
88673
88674
  gql["default"] = gql;
88674
88675
 
88675
- // node_modules/.pnpm/@apollo+client@3.11.8_@types+react@19.2.7_graphql@16.9.0_react@19.1.2/node_modules/@apollo/client/core/index.js
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
88676
88677
  setVerbosity(globalThis.__DEV__ !== false ? "log" : "silent");
88677
88678
 
88678
88679
  // src/modules/apollo-client-config.ts
@@ -105377,6 +105378,7 @@ spurious results.`);
105377
105378
  notARisks: getNoRiskTags(_lstPoolRiskFactors)
105378
105379
  },
105379
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",
105380
105382
  additionalInfo: {
105381
105383
  newBounds: {
105382
105384
  lower: -1,
@@ -105529,6 +105531,7 @@ spurious results.`);
105529
105531
  ),
105530
105532
  Global.getDefaultTokens().find((t) => t.symbol === params.depositToken1Symbol)
105531
105533
  ],
105534
+ realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
105532
105535
  additionalInfo: {
105533
105536
  ...xSTRKSTRK.additionalInfo,
105534
105537
  quoteAsset: Global.getDefaultTokens().find(
@@ -118344,6 +118347,13 @@ spurious results.`);
118344
118347
  }
118345
118348
  ];
118346
118349
 
118350
+ // src/strategies/types.ts
118351
+ var LSTPriceType = /* @__PURE__ */ ((LSTPriceType2) => {
118352
+ LSTPriceType2["ENDUR_PRICE"] = "ENDUR_PRICE";
118353
+ LSTPriceType2["AVNU_PRICE"] = "AVNU_PRICE";
118354
+ return LSTPriceType2;
118355
+ })(LSTPriceType || {});
118356
+
118347
118357
  // src/strategies/universal-strategy.tsx
118348
118358
  var import_jsx_runtime4 = __toESM(require_jsx_runtime());
118349
118359
  var AUMTypes = /* @__PURE__ */ ((AUMTypes3) => {
@@ -118652,7 +118662,7 @@ spurious results.`);
118652
118662
  usdValue
118653
118663
  };
118654
118664
  }
118655
- async getVesuAUM(adapter2) {
118665
+ async getVesuAUM(adapter2, _priceType) {
118656
118666
  const legAUM = await adapter2.getPositions(this.config);
118657
118667
  const underlying = this.asset();
118658
118668
  let vesuAum = Web3Number.fromWei("0", underlying.decimals);
@@ -118678,13 +118688,15 @@ spurious results.`);
118678
118688
  logger2.verbose(`${this.getTag()} Prev AUM: ${prevAum}`);
118679
118689
  return prevAum;
118680
118690
  }
118681
- async getAUM() {
118691
+ async getAUM(unrealizedAUM) {
118682
118692
  const prevAum = await this.getPrevAUM();
118683
118693
  const token1Price = await this.pricer.getPrice(this.metadata.depositTokens[0].symbol);
118684
118694
  const vesuAdapters = this.getVesuAdapters();
118685
118695
  let vesuAum = Web3Number.fromWei("0", this.asset().decimals);
118686
118696
  for (const adapter2 of vesuAdapters) {
118687
- vesuAum = vesuAum.plus(await this.getVesuAUM(adapter2));
118697
+ const priceType = unrealizedAUM ? "ENDUR_PRICE" /* ENDUR_PRICE */ : "AVNU_PRICE" /* AVNU_PRICE */;
118698
+ const aumValue = await this.getVesuAUM(adapter2, priceType);
118699
+ vesuAum = vesuAum.plus(aumValue);
118688
118700
  }
118689
118701
  const balance = await this.getUnusedBalance();
118690
118702
  logger2.verbose(`${this.getTag()} unused balance: ${balance.amount.toNumber()}`);
@@ -119195,7 +119207,6 @@ spurious results.`);
119195
119207
  const containerStyle = {
119196
119208
  maxWidth: "800px",
119197
119209
  margin: "0 auto",
119198
- backgroundColor: "#111",
119199
119210
  color: "#eee",
119200
119211
  fontFamily: "Arial, sans-serif",
119201
119212
  borderRadius: "12px"
@@ -119388,6 +119399,7 @@ spurious results.`);
119388
119399
  risk: getUniversalRisk(),
119389
119400
  auditUrl: AUDIT_URL3,
119390
119401
  protocols: [Protocols.VESU],
119402
+ realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
119391
119403
  curator: {
119392
119404
  name: "Unwrap Labs",
119393
119405
  logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
@@ -119495,23 +119507,36 @@ spurious results.`);
119495
119507
  constructor(config3, pricer, metadata) {
119496
119508
  super(config3, pricer, metadata);
119497
119509
  this.quoteAmountToFetchPrice = new Web3Number(1, 18);
119498
- const STRKToken = Global.getDefaultTokens().find((token) => token.symbol === "STRK");
119510
+ const STRKToken = Global.getDefaultTokens().find(
119511
+ (token) => token.symbol === "STRK"
119512
+ );
119499
119513
  const underlyingToken = this.getLSTUnderlyingTokenInfo();
119500
119514
  if (underlyingToken.address.eq(STRKToken.address)) {
119501
119515
  this.quoteAmountToFetchPrice = new Web3Number(100, 18);
119502
119516
  } else {
119503
- this.quoteAmountToFetchPrice = new Web3Number(0.01, this.asset().decimals);
119517
+ this.quoteAmountToFetchPrice = new Web3Number(
119518
+ 0.01,
119519
+ this.asset().decimals
119520
+ );
119504
119521
  }
119505
119522
  }
119506
119523
  asset() {
119507
- return this.getVesuSameTokenAdapter(this.metadata.additionalInfo.defaultPoolId).config.collateral;
119524
+ return this.getVesuSameTokenAdapter(
119525
+ this.metadata.additionalInfo.defaultPoolId
119526
+ ).config.collateral;
119508
119527
  }
119509
119528
  getTag() {
119510
119529
  return `${_UniversalLstMultiplierStrategy.name}:${this.metadata.name}`;
119511
119530
  }
119512
119531
  // Vesu adapter with LST and base token match
119513
119532
  getVesuSameTokenAdapter(poolId) {
119514
- const baseAdapter = this.getAdapter(getVesuLegId("vesu_leg1" /* VESU_LEG1 */, this.metadata.additionalInfo.underlyingToken.symbol, poolId.toString()));
119533
+ const baseAdapter = this.getAdapter(
119534
+ getVesuLegId(
119535
+ "vesu_leg1" /* VESU_LEG1 */,
119536
+ this.metadata.additionalInfo.underlyingToken.symbol,
119537
+ poolId.toString()
119538
+ )
119539
+ );
119515
119540
  baseAdapter.networkConfig = this.config;
119516
119541
  baseAdapter.pricer = this.pricer;
119517
119542
  return baseAdapter;
@@ -119554,27 +119579,43 @@ spurious results.`);
119554
119579
  lstUnderlyingTokenInfo.address.address,
119555
119580
  this.quoteAmountToFetchPrice
119556
119581
  );
119557
- const outputAmount = Web3Number.fromWei(quote.total_calculated, lstUnderlyingTokenInfo.decimals);
119582
+ const outputAmount = Web3Number.fromWei(
119583
+ quote.total_calculated,
119584
+ lstUnderlyingTokenInfo.decimals
119585
+ );
119558
119586
  const price = outputAmount.toNumber() / this.quoteAmountToFetchPrice.toNumber();
119559
119587
  logger2.verbose(`${this.getTag()}:: LST Dex Price: ${price}`);
119560
119588
  return price;
119561
119589
  }
119562
119590
  async getAvnuSwapMultiplyCall(params) {
119563
- assert3(params.isDeposit, "Only deposit is supported in getAvnuSwapMultiplyCall");
119564
- const maxBorrowableAmounts = await this.getMaxBorrowableAmount({ isAPYComputation: false });
119591
+ assert3(
119592
+ params.isDeposit,
119593
+ "Only deposit is supported in getAvnuSwapMultiplyCall"
119594
+ );
119595
+ const maxBorrowableAmounts = await this.getMaxBorrowableAmount({
119596
+ isAPYComputation: false
119597
+ });
119565
119598
  const allVesuAdapters = this.getVesuAdapters();
119566
119599
  let remainingAmount = params.leg1DepositAmount;
119567
119600
  const lstExRate = await this.getLSTExchangeRate();
119568
- const baseAssetPrice = await this.pricer.getPrice(this.getLSTUnderlyingTokenInfo().symbol);
119601
+ const baseAssetPrice = await this.pricer.getPrice(
119602
+ this.getLSTUnderlyingTokenInfo().symbol
119603
+ );
119569
119604
  const lstPrice = baseAssetPrice.price * lstExRate;
119570
119605
  for (let i = 0; i < maxBorrowableAmounts.maxBorrowables.length; i++) {
119571
119606
  const maxBorrowable = maxBorrowableAmounts.maxBorrowables[i];
119572
- const vesuAdapter = allVesuAdapters.find((adapter2) => adapter2.config.debt.address.eq(maxBorrowable.borrowableAsset.address));
119607
+ const vesuAdapter = allVesuAdapters.find(
119608
+ (adapter2) => adapter2.config.debt.address.eq(maxBorrowable.borrowableAsset.address)
119609
+ );
119573
119610
  if (!vesuAdapter) {
119574
- throw new Error(`${this.getTag()}::getAvnuSwapMultiplyCall: vesuAdapter not found for borrowable asset: ${maxBorrowable.borrowableAsset.symbol}`);
119611
+ throw new Error(
119612
+ `${this.getTag()}::getAvnuSwapMultiplyCall: vesuAdapter not found for borrowable asset: ${maxBorrowable.borrowableAsset.symbol}`
119613
+ );
119575
119614
  }
119576
119615
  const maxLTV = await vesuAdapter.getLTVConfig(this.config);
119577
- const debtPrice = await this.pricer.getPrice(maxBorrowable.borrowableAsset.symbol);
119616
+ const debtPrice = await this.pricer.getPrice(
119617
+ maxBorrowable.borrowableAsset.symbol
119618
+ );
119578
119619
  const maxAmountToDeposit = HealthFactorMath.getMinCollateralRequiredOnLooping(
119579
119620
  maxBorrowable.amount,
119580
119621
  debtPrice.price,
@@ -119584,7 +119625,9 @@ spurious results.`);
119584
119625
  this.asset()
119585
119626
  );
119586
119627
  const amountToDeposit = remainingAmount.minimum(maxAmountToDeposit);
119587
- logger2.verbose(`${this.getTag()}::getAvnuSwapMultiplyCall::${vesuAdapter.config.debt.symbol}:: remainingAmount: ${remainingAmount}, amountToDeposit: ${amountToDeposit}, depositAmount: ${amountToDeposit}, maxBorrowable: ${maxBorrowable.amount}`);
119628
+ logger2.verbose(
119629
+ `${this.getTag()}::getAvnuSwapMultiplyCall::${vesuAdapter.config.debt.symbol}:: remainingAmount: ${remainingAmount}, amountToDeposit: ${amountToDeposit}, depositAmount: ${amountToDeposit}, maxBorrowable: ${maxBorrowable.amount}`
119630
+ );
119588
119631
  const call = await this._getAvnuDepositSwapLegCall({
119589
119632
  isDeposit: params.isDeposit,
119590
119633
  // adjust decimals of debt asset
@@ -119596,36 +119639,60 @@ spurious results.`);
119596
119639
  remainingAmount = remainingAmount.minus(amountToDeposit);
119597
119640
  return { call, vesuAdapter };
119598
119641
  }
119599
- throw new Error(`${this.getTag()}::getAvnuSwapMultiplyCall: no calls found`);
119642
+ throw new Error(
119643
+ `${this.getTag()}::getAvnuSwapMultiplyCall: no calls found`
119644
+ );
119600
119645
  }
119601
119646
  async _getAvnuDepositSwapLegCall(params) {
119602
119647
  const { vesuAdapter } = params;
119603
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall params: ${JSON.stringify(params)}`);
119604
- assert3(params.isDeposit, "Only deposit is supported in _getAvnuDepositSwapLegCall");
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
+ );
119605
119655
  const legLTV = await vesuAdapter.getLTVConfig(this.config);
119606
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall legLTV: ${legLTV}`);
119656
+ logger2.verbose(
119657
+ `${this.getTag()}::_getAvnuDepositSwapLegCall legLTV: ${legLTV}`
119658
+ );
119607
119659
  const existingPositions = await vesuAdapter.getPositions(this.config);
119608
- const collateralisation = await vesuAdapter.getCollateralization(this.config);
119660
+ const collateralisation = await vesuAdapter.getCollateralization(
119661
+ this.config
119662
+ );
119609
119663
  const existingCollateralInfo = existingPositions[0];
119610
119664
  const existingDebtInfo = existingPositions[1];
119611
119665
  logger2.debug(`${this.getTag()}::_getAvnuDepositSwapLegCall existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
119612
119666
  existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
119613
119667
  const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
119614
119668
  const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
119615
- logger2.debug(`${this.getTag()}::_getAvnuDepositSwapLegCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`);
119669
+ logger2.debug(
119670
+ `${this.getTag()}::_getAvnuDepositSwapLegCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`
119671
+ );
119616
119672
  const debtTokenInfo = vesuAdapter.config.debt;
119617
119673
  let newDepositAmount = params.leg1DepositAmount;
119618
- const totalCollateral = existingCollateralInfo.amount.plus(params.leg1DepositAmount);
119619
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall totalCollateral: ${totalCollateral}`);
119674
+ const totalCollateral = existingCollateralInfo.amount.plus(
119675
+ params.leg1DepositAmount
119676
+ );
119677
+ logger2.verbose(
119678
+ `${this.getTag()}::_getAvnuDepositSwapLegCall totalCollateral: ${totalCollateral}`
119679
+ );
119620
119680
  const totalDebtAmount = new Web3Number(
119621
119681
  totalCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(debtPrice).dividedBy(params.minHF).toString(),
119622
119682
  debtTokenInfo.decimals
119623
119683
  );
119624
119684
  let debtAmount = totalDebtAmount.minus(existingDebtInfo.amount);
119625
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall totalDebtAmount: ${totalDebtAmount}, initial computed debt: ${debtAmount}`);
119626
- const maxBorrowable = await this.getMaxBorrowableAmountByVesuAdapter(vesuAdapter, false);
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
+ );
119627
119692
  if (debtAmount.gt(0) && maxBorrowable.amount.eq(0)) {
119628
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall maxBorrowable is 0, skipping`);
119693
+ logger2.verbose(
119694
+ `${this.getTag()}::_getAvnuDepositSwapLegCall maxBorrowable is 0, skipping`
119695
+ );
119629
119696
  return void 0;
119630
119697
  } else if (debtAmount.gt(0) && maxBorrowable.amount.gt(0)) {
119631
119698
  debtAmount = maxBorrowable.amount.minimum(debtAmount);
@@ -119638,16 +119705,24 @@ spurious results.`);
119638
119705
  collateralPrice,
119639
119706
  this.asset()
119640
119707
  );
119641
- newDepositAmount = totalCollateralRequired.minus(existingCollateralInfo.amount);
119708
+ newDepositAmount = totalCollateralRequired.minus(
119709
+ existingCollateralInfo.amount
119710
+ );
119642
119711
  if (newDepositAmount.lt(0)) {
119643
- throw new Error(`${this.getTag()}::_getAvnuDepositSwapLegCall newDepositAmount is less than 0, newDepositAmount: ${newDepositAmount}, totalCollateralRequired: ${totalCollateralRequired}, existingCollateralInfo.amount: ${existingCollateralInfo.amount}`);
119712
+ throw new Error(
119713
+ `${this.getTag()}::_getAvnuDepositSwapLegCall newDepositAmount is less than 0, newDepositAmount: ${newDepositAmount}, totalCollateralRequired: ${totalCollateralRequired}, existingCollateralInfo.amount: ${existingCollateralInfo.amount}`
119714
+ );
119644
119715
  }
119645
119716
  if (newDebtUSDValue.toNumber() < 100) {
119646
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall newDebtUSDValue is less than 100, skipping`);
119717
+ logger2.verbose(
119718
+ `${this.getTag()}::_getAvnuDepositSwapLegCall newDebtUSDValue is less than 100, skipping`
119719
+ );
119647
119720
  return void 0;
119648
119721
  }
119649
119722
  }
119650
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall debtAmount: ${debtAmount}`);
119723
+ logger2.verbose(
119724
+ `${this.getTag()}::_getAvnuDepositSwapLegCall debtAmount: ${debtAmount}`
119725
+ );
119651
119726
  if (debtAmount.lt(0)) {
119652
119727
  const lstDEXPrice = await this.getLSTDexPrice();
119653
119728
  const debtAmountInLST = debtAmount.abs().dividedBy(lstDEXPrice);
@@ -119656,28 +119731,38 @@ spurious results.`);
119656
119731
  leg1DepositAmount: debtAmountInLST,
119657
119732
  poolId: vesuAdapter.config.poolId
119658
119733
  });
119659
- assert3(calls.length == 1, `Expected 1 call for unwind, got ${calls.length}`);
119734
+ assert3(
119735
+ calls.length == 1,
119736
+ `Expected 1 call for unwind, got ${calls.length}`
119737
+ );
119660
119738
  return calls[0];
119661
119739
  }
119662
- console.log(`debtAmount`, debtAmount.toWei(), params.leg1DepositAmount.toWei());
119663
119740
  const STEP0 = "approve_token1" /* APPROVE_TOKEN1 */;
119664
119741
  const manage0Info = this.getProofs(STEP0);
119665
119742
  const manageCall0 = manage0Info.callConstructor({
119666
119743
  amount: newDepositAmount
119667
119744
  });
119668
- const STEP1 = getVesuLegId("vesu_leg1" /* VESU_LEG1 */, vesuAdapter.config.debt.symbol, vesuAdapter.config.poolId.toString());
119745
+ const STEP1 = getVesuLegId(
119746
+ "vesu_leg1" /* VESU_LEG1 */,
119747
+ vesuAdapter.config.debt.symbol,
119748
+ vesuAdapter.config.poolId.toString()
119749
+ );
119669
119750
  const manage1Info = this.getProofs(STEP1);
119670
- const manageCall1 = manage1Info.callConstructor(VesuAdapter.getDefaultModifyPositionCallParams({
119671
- collateralAmount: newDepositAmount,
119672
- isAddCollateral: params.isDeposit,
119673
- debtAmount,
119674
- isBorrow: params.isDeposit
119675
- }));
119676
- console.log(`manageCall1`, manageCall1.call, debtAmount.toWei(), newDepositAmount.toWei());
119751
+ const manageCall1 = manage1Info.callConstructor(
119752
+ VesuAdapter.getDefaultModifyPositionCallParams({
119753
+ collateralAmount: newDepositAmount,
119754
+ isAddCollateral: params.isDeposit,
119755
+ debtAmount,
119756
+ isBorrow: params.isDeposit
119757
+ })
119758
+ );
119677
119759
  const proofIds = [STEP0, STEP1];
119678
119760
  const manageCalls = [manageCall0, manageCall1];
119679
119761
  if (debtAmount.gt(0)) {
119680
- const STEP2 = getAvnuManageIDs("avnu_mul_approve_dep" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */, vesuAdapter.config.debt.symbol);
119762
+ const STEP2 = getAvnuManageIDs(
119763
+ "avnu_mul_approve_dep" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */,
119764
+ vesuAdapter.config.debt.symbol
119765
+ );
119681
119766
  const manage2Info = this.getProofs(STEP2);
119682
119767
  const manageCall2 = manage2Info.callConstructor({
119683
119768
  amount: debtAmount
@@ -119693,7 +119778,9 @@ spurious results.`);
119693
119778
  );
119694
119779
  const minAmount = await this._getMinOutputAmountLSTBuy(debtAmount);
119695
119780
  const minAmountWei = minAmount.toWei();
119696
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall minAmount: ${minAmount}`);
119781
+ logger2.verbose(
119782
+ `${this.getTag()}::_getAvnuDepositSwapLegCall minAmount: ${minAmount}`
119783
+ );
119697
119784
  const swapInfo = await avnuModule.getSwapInfo(
119698
119785
  quote,
119699
119786
  this.metadata.additionalInfo.vaultAllocator.address,
@@ -119701,8 +119788,13 @@ spurious results.`);
119701
119788
  this.address.address,
119702
119789
  minAmountWei
119703
119790
  );
119704
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall swapInfo: ${JSON.stringify(swapInfo)}`);
119705
- const STEP3 = getAvnuManageIDs("avnu_mul_swap_dep" /* AVNU_MULTIPLY_SWAP_DEPOSIT */, vesuAdapter.config.debt.symbol);
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
+ );
119706
119798
  const manage3Info = this.getProofs(STEP3);
119707
119799
  const manageCall3 = manage3Info.callConstructor({
119708
119800
  props: swapInfo
@@ -119712,22 +119804,32 @@ spurious results.`);
119712
119804
  manageCalls.push(manageCall2, manageCall3);
119713
119805
  const newCollateral = minAmount.plus(totalCollateral);
119714
119806
  const newHF = newCollateral.multipliedBy(collateralPrice).multipliedBy(legLTV).dividedBy(totalDebtAmount).dividedBy(debtPrice).toNumber();
119715
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall newHF: ${newHF}`);
119807
+ logger2.verbose(
119808
+ `${this.getTag()}::_getAvnuDepositSwapLegCall newHF: ${newHF}`
119809
+ );
119716
119810
  if (newHF > this.metadata.additionalInfo.minHealthFactor && newHF < this.metadata.additionalInfo.targetHealthFactor + 0.05) {
119717
- logger2.verbose(`${this.getTag()}::_getAvnuDepositSwapLegCall newHF is above min and below target + 0.05, adding collateral on vesu`);
119811
+ logger2.verbose(
119812
+ `${this.getTag()}::_getAvnuDepositSwapLegCall newHF is above min and below target + 0.05, adding collateral on vesu`
119813
+ );
119718
119814
  const STEP4 = "approve_token1" /* APPROVE_TOKEN1 */;
119719
119815
  const manage4Info = this.getProofs(STEP4);
119720
119816
  const manageCall4 = manage4Info.callConstructor({
119721
119817
  amount: minAmount
119722
119818
  });
119723
- const STEP5 = getVesuLegId("vesu_leg1" /* VESU_LEG1 */, vesuAdapter.config.debt.symbol, vesuAdapter.config.poolId.toString());
119819
+ const STEP5 = getVesuLegId(
119820
+ "vesu_leg1" /* VESU_LEG1 */,
119821
+ vesuAdapter.config.debt.symbol,
119822
+ vesuAdapter.config.poolId.toString()
119823
+ );
119724
119824
  const manage5Info = this.getProofs(STEP5);
119725
- const manageCall5 = manage5Info.callConstructor(VesuAdapter.getDefaultModifyPositionCallParams({
119726
- collateralAmount: minAmount,
119727
- isAddCollateral: true,
119728
- debtAmount: Web3Number.fromWei("0", this.asset().decimals),
119729
- isBorrow: params.isDeposit
119730
- }));
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
+ );
119731
119833
  proofIds.push(STEP4, STEP5);
119732
119834
  manageCalls.push(manageCall4, manageCall5);
119733
119835
  }
@@ -119735,11 +119837,13 @@ spurious results.`);
119735
119837
  const manageCall = this.getManageCall(proofIds, manageCalls);
119736
119838
  return manageCall;
119737
119839
  }
119738
- // todo unwind or not deposit when the yield is bad.
119840
+ // todo unwind or not deposit when the yield is bad.
119739
119841
  async getLSTMultiplierRebalanceCall() {
119740
119842
  let shouldRebalance = false;
119741
119843
  const calls = [];
119742
- const allVesuAdapters = this.getVesuAdapters().filter((vesuAdapter) => vesuAdapter.config.debt.symbol === "LBTC");
119844
+ const allVesuAdapters = this.getVesuAdapters().filter(
119845
+ (vesuAdapter) => vesuAdapter.config.debt.symbol === "LBTC"
119846
+ );
119743
119847
  for (const vesuAdapter of allVesuAdapters) {
119744
119848
  const call = await this._getLSTMultiplierRebalanceCall(vesuAdapter);
119745
119849
  if (call.shouldRebalance && call.manageCall) {
@@ -119751,18 +119855,27 @@ spurious results.`);
119751
119855
  }
119752
119856
  async _getLSTMultiplierRebalanceCall(vesuAdapter) {
119753
119857
  const positions = await vesuAdapter.getPositions(this.config);
119754
- assert3(positions.length == 2, "Rebalance call is only supported for 2 positions");
119858
+ assert3(
119859
+ positions.length == 2,
119860
+ "Rebalance call is only supported for 2 positions"
119861
+ );
119755
119862
  const existingCollateralInfo = positions[0];
119756
119863
  const existingDebtInfo = positions[1];
119757
119864
  const unusedBalance = await this.getUnusedBalance();
119758
119865
  const healthFactor = await vesuAdapter.getHealthFactor();
119759
- const collateralisation = await vesuAdapter.getCollateralization(this.config);
119866
+ const collateralisation = await vesuAdapter.getCollateralization(
119867
+ this.config
119868
+ );
119760
119869
  logger2.debug(`${this.getTag()}::getVesuMultiplyCall::${vesuAdapter.config.debt.symbol} existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
119761
119870
  existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
119762
119871
  const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
119763
119872
  const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
119764
- logger2.debug(`${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`);
119765
- logger2.debug(`${this.getTag()}::getVesuMultiplyCall healthFactor: ${healthFactor}`);
119873
+ logger2.debug(
119874
+ `${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`
119875
+ );
119876
+ logger2.debug(
119877
+ `${this.getTag()}::getVesuMultiplyCall healthFactor: ${healthFactor}`
119878
+ );
119766
119879
  const isHFTooLow = healthFactor < this.metadata.additionalInfo.minHealthFactor;
119767
119880
  const isHFTooHigh = healthFactor > this.metadata.additionalInfo.targetHealthFactor + 0.05;
119768
119881
  if (isHFTooLow || isHFTooHigh || 1) {
@@ -119770,7 +119883,7 @@ spurious results.`);
119770
119883
  isDeposit: true,
119771
119884
  leg1DepositAmount: unusedBalance.amount,
119772
119885
  minHF: 1.02,
119773
- // 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.
119774
119887
  vesuAdapter
119775
119888
  });
119776
119889
  return { shouldRebalance: true, manageCall };
@@ -119778,14 +119891,48 @@ spurious results.`);
119778
119891
  return { shouldRebalance: false, manageCall: void 0 };
119779
119892
  }
119780
119893
  }
119781
- async getVesuAUM(adapter2) {
119894
+ async getVesuAUM(adapter2, priceType = "AVNU_PRICE" /* AVNU_PRICE */) {
119782
119895
  const legAUM = await adapter2.getPositions(this.config);
119783
119896
  const underlying = this.asset();
119784
- assert3(underlying.symbol.startsWith("x"), "Underlying is not an LST of Endur");
119897
+ assert3(
119898
+ underlying.symbol.startsWith("x"),
119899
+ "Underlying is not an LST of Endur"
119900
+ );
119785
119901
  let vesuAum = Web3Number.fromWei("0", underlying.decimals);
119786
- let tokenUnderlyingPrice = await this.getLSTExchangeRate();
119787
- tokenUnderlyingPrice = tokenUnderlyingPrice * 0.998;
119788
- logger2.verbose(`${this.getTag()} tokenUnderlyingPrice: ${tokenUnderlyingPrice}`);
119902
+ let tokenUnderlyingPrice;
119903
+ if (priceType === "ENDUR_PRICE" /* ENDUR_PRICE */) {
119904
+ tokenUnderlyingPrice = await this.getLSTExchangeRate();
119905
+ if (tokenUnderlyingPrice === 0) {
119906
+ throw new Error(
119907
+ `${this.getTag()}::getVesuAUM: tokenUnderlyingPrice (Endur) is 0`
119908
+ );
119909
+ }
119910
+ const avnuRate = await this.getLSTAvnuRate();
119911
+ if (avnuRate === 0) {
119912
+ throw new Error(
119913
+ `${this.getTag()}::getVesuAUM: tokenUnderlyingPrice (Avnu) is 0`
119914
+ );
119915
+ }
119916
+ const diff = Math.abs(tokenUnderlyingPrice - avnuRate) / tokenUnderlyingPrice;
119917
+ if (diff > 0.02) {
119918
+ throw new Error(
119919
+ `${this.getTag()}::getVesuAUM: Endur and Avnu prices differ by more than 2% (Endur: ${tokenUnderlyingPrice}, Avnu: ${avnuRate})`
119920
+ );
119921
+ }
119922
+ logger2.verbose(
119923
+ `${this.getTag()} tokenUnderlyingPrice (Endur): ${tokenUnderlyingPrice}, avnuRate: ${avnuRate}, diff: ${diff}`
119924
+ );
119925
+ } else {
119926
+ tokenUnderlyingPrice = await this.getLSTAvnuRate();
119927
+ if (tokenUnderlyingPrice === 0) {
119928
+ throw new Error(
119929
+ `${this.getTag()}::getVesuAUM: tokenUnderlyingPrice (Avnu) is 0`
119930
+ );
119931
+ }
119932
+ logger2.verbose(
119933
+ `${this.getTag()} tokenUnderlyingPrice (Avnu): ${tokenUnderlyingPrice}`
119934
+ );
119935
+ }
119789
119936
  if (legAUM[0].token.address.eq(underlying.address)) {
119790
119937
  vesuAum = vesuAum.plus(legAUM[0].amount);
119791
119938
  } else {
@@ -119796,10 +119943,28 @@ spurious results.`);
119796
119943
  } else {
119797
119944
  vesuAum = vesuAum.minus(legAUM[1].amount.dividedBy(tokenUnderlyingPrice));
119798
119945
  }
119799
- ;
119800
- logger2.verbose(`${this.getTag()} Vesu AUM: ${vesuAum}, legCollateral: ${legAUM[0].amount.toNumber()}, legDebt: ${legAUM[1].amount.toNumber()}`);
119946
+ const priceTypeLabel = priceType === "ENDUR_PRICE" /* ENDUR_PRICE */ ? "Endur Price" : "Avnu Price";
119947
+ logger2.verbose(
119948
+ `${this.getTag()} Vesu AUM (${priceTypeLabel}): ${vesuAum}, legCollateral: ${legAUM[0].amount.toNumber()}, legDebt: ${legAUM[1].amount.toNumber()}`
119949
+ );
119801
119950
  return vesuAum;
119802
119951
  }
119952
+ async getTVLUnrealized() {
119953
+ return await this.getAUM(true);
119954
+ }
119955
+ async getUserUnrealizedGains(user) {
119956
+ const tvl = await this.getTVL();
119957
+ const unrealizedTVL = await this.getTVLUnrealized();
119958
+ const unrealizedDiff = unrealizedTVL.net.amount.minus(tvl.amount);
119959
+ const userTVL = await this.getUserTVL(user);
119960
+ const userShare = userTVL.amount.dividedBy(tvl.amount);
119961
+ const unrealizedGains = unrealizedDiff.multipliedBy(userShare);
119962
+ return {
119963
+ unrealizedGains,
119964
+ userShare: userShare.toNumber(),
119965
+ tokenInfo: this.asset()
119966
+ };
119967
+ }
119803
119968
  //
119804
119969
  async _getMinOutputAmountLSTBuy(amountInUnderlying) {
119805
119970
  const lstTruePrice = await this.getLSTExchangeRate();
@@ -119812,11 +119977,11 @@ spurious results.`);
119812
119977
  return minOutputAmount;
119813
119978
  }
119814
119979
  // todo add a function to findout max borrowable amount without fucking yield
119815
- // 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.
119816
119981
  /**
119817
119982
  * Uses vesu's multiple call to create leverage on LST
119818
119983
  * Deposit amount is in LST
119819
- * @param params
119984
+ * @param params
119820
119985
  */
119821
119986
  async getVesuMultiplyCall(params) {
119822
119987
  const maxEkuboPriceImpact = params.maxEkuboPriceImpact || 0.01;
@@ -119825,32 +119990,54 @@ spurious results.`);
119825
119990
  logger2.verbose(`${this.getTag()}::getVesuMultiplyCall legLTV: ${legLTV}`);
119826
119991
  if (!params.isDeposit) {
119827
119992
  const unusedBalance = await this.getUnusedBalance();
119828
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall unusedBalance: ${unusedBalance.amount.toString()}, required: ${params.leg1DepositAmount.toString()}`);
119993
+ logger2.verbose(
119994
+ `${this.getTag()}::getVesuMultiplyCall unusedBalance: ${unusedBalance.amount.toString()}, required: ${params.leg1DepositAmount.toString()}`
119995
+ );
119829
119996
  }
119830
119997
  const existingPositions = await vesuAdapter1.getPositions(this.config);
119831
- const collateralisation = await vesuAdapter1.getCollateralization(this.config);
119998
+ const collateralisation = await vesuAdapter1.getCollateralization(
119999
+ this.config
120000
+ );
119832
120001
  const existingCollateralInfo = existingPositions[0];
119833
120002
  const existingDebtInfo = existingPositions[1];
119834
120003
  logger2.debug(`${this.getTag()}::getVesuMultiplyCall existingCollateralInfo: ${JSON.stringify(existingCollateralInfo)},
119835
120004
  existingDebtInfo: ${JSON.stringify(existingDebtInfo)}, collateralisation: ${JSON.stringify(collateralisation)}`);
119836
120005
  const collateralPrice = collateralisation[0].usdValue > 0 ? collateralisation[0].usdValue / existingCollateralInfo.amount.toNumber() : 1;
119837
120006
  const debtPrice = collateralisation[1].usdValue > 0 ? collateralisation[1].usdValue / existingDebtInfo.amount.toNumber() : 1;
119838
- logger2.debug(`${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`);
120007
+ logger2.debug(
120008
+ `${this.getTag()}::getVesuMultiplyCall collateralPrice: ${collateralPrice}, debtPrice: ${debtPrice}`
120009
+ );
119839
120010
  const dexPrice = await this.getLSTDexPrice();
119840
- const addedCollateral = params.leg1DepositAmount.multipliedBy(params.isDeposit ? 1 : -1);
119841
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall addedCollateral: ${addedCollateral}`);
120011
+ const addedCollateral = params.leg1DepositAmount.multipliedBy(
120012
+ params.isDeposit ? 1 : -1
120013
+ );
120014
+ logger2.verbose(
120015
+ `${this.getTag()}::getVesuMultiplyCall addedCollateral: ${addedCollateral}`
120016
+ );
119842
120017
  const numeratorPart1 = existingCollateralInfo.amount.plus(addedCollateral).multipliedBy(collateralPrice).multipliedBy(legLTV);
119843
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}`);
120018
+ logger2.verbose(
120019
+ `${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}`
120020
+ );
119844
120021
  const numeratorPart2 = existingDebtInfo.amount.multipliedBy(debtPrice).multipliedBy(this.metadata.additionalInfo.targetHealthFactor);
119845
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall numeratorPart2: ${numeratorPart2}`);
120022
+ logger2.verbose(
120023
+ `${this.getTag()}::getVesuMultiplyCall numeratorPart2: ${numeratorPart2}`
120024
+ );
119846
120025
  const denominatorPart = this.metadata.additionalInfo.targetHealthFactor - legLTV / dexPrice;
119847
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall denominatorPart: ${denominatorPart}`);
120026
+ logger2.verbose(
120027
+ `${this.getTag()}::getVesuMultiplyCall denominatorPart: ${denominatorPart}`
120028
+ );
119848
120029
  const x_debt_usd = numeratorPart1.minus(numeratorPart2).dividedBy(denominatorPart);
119849
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall x_debt_usd: ${x_debt_usd}`);
119850
- logger2.debug(`${this.getTag()}::getVesuMultiplyCall numeratorPart1: ${numeratorPart1}, numeratorPart2: ${numeratorPart2}, denominatorPart: ${denominatorPart}`);
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
+ );
119851
120036
  let debtAmount = x_debt_usd.dividedBy(debtPrice);
119852
120037
  const marginAmount = addedCollateral;
119853
- logger2.verbose(`${this.getTag()}::getVesuMultiplyCall debtAmount: ${debtAmount}, marginAmount: ${marginAmount}`);
120038
+ logger2.verbose(
120039
+ `${this.getTag()}::getVesuMultiplyCall debtAmount: ${debtAmount}, marginAmount: ${marginAmount}`
120040
+ );
119854
120041
  if (marginAmount.lt(0) && debtAmount.gt(0)) {
119855
120042
  debtAmount = Web3Number.fromWei(0, this.asset().decimals);
119856
120043
  }
@@ -119864,31 +120051,49 @@ spurious results.`);
119864
120051
  });
119865
120052
  }
119866
120053
  getLSTUnderlyingTokenInfo() {
119867
- const vesuAdapter1 = this.getVesuSameTokenAdapter(this.metadata.additionalInfo.defaultPoolId);
120054
+ const vesuAdapter1 = this.getVesuSameTokenAdapter(
120055
+ this.metadata.additionalInfo.defaultPoolId
120056
+ );
119868
120057
  return vesuAdapter1.config.debt;
119869
120058
  }
119870
120059
  async getMaxBorrowableAmount(params = { isAPYComputation: false }) {
119871
120060
  const vesuAdapters = this.getVesuAdapters();
119872
- let netMaxBorrowableAmount = Web3Number.fromWei("0", this.getLSTUnderlyingTokenInfo().decimals);
120061
+ let netMaxBorrowableAmount = Web3Number.fromWei(
120062
+ "0",
120063
+ this.getLSTUnderlyingTokenInfo().decimals
120064
+ );
119873
120065
  const maxBorrowables = [];
119874
120066
  for (const vesuAdapter of vesuAdapters) {
119875
- const output2 = await this.getMaxBorrowableAmountByVesuAdapter(vesuAdapter, params.isAPYComputation);
120067
+ const output2 = await this.getMaxBorrowableAmountByVesuAdapter(
120068
+ vesuAdapter,
120069
+ params.isAPYComputation
120070
+ );
119876
120071
  const ltv = await vesuAdapter.getLTVConfig(this.config);
119877
120072
  maxBorrowables.push({ ...output2, ltv });
119878
120073
  }
119879
120074
  maxBorrowables.sort((a, b2) => b2.amount.toNumber() - a.amount.toNumber());
119880
- netMaxBorrowableAmount = maxBorrowables.reduce((acc, curr) => acc.plus(curr.amount), Web3Number.fromWei("0", this.getLSTUnderlyingTokenInfo().decimals));
120075
+ netMaxBorrowableAmount = maxBorrowables.reduce(
120076
+ (acc, curr) => acc.plus(curr.amount),
120077
+ Web3Number.fromWei("0", this.getLSTUnderlyingTokenInfo().decimals)
120078
+ );
119881
120079
  return { netMaxBorrowableAmount, maxBorrowables };
119882
120080
  }
119883
- // recursively, using binary search computes max swappable.
120081
+ // recursively, using binary search computes max swappable.
119884
120082
  // @dev assumes 1 token of from == 1 token of to
119885
120083
  async getMaxSwappableWithMaxSlippage(fromToken, toToken, maxSlippage, maxAmount) {
119886
120084
  const output2 = await findMaxInputWithSlippage({
119887
120085
  apiGetOutput: async (inputAmount) => {
119888
120086
  const ekuboQuoter = new EkuboQuoter(this.config);
119889
120087
  await new Promise((resolve) => setTimeout(resolve, 1e3));
119890
- const quote = await ekuboQuoter.getQuote(fromToken.address.address, toToken.address.address, new Web3Number(inputAmount.toFixed(9), fromToken.decimals));
119891
- return Web3Number.fromWei(quote.total_calculated.toString(), toToken.decimals).toNumber();
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();
119892
120097
  },
119893
120098
  maxInput: maxAmount.toNumber(),
119894
120099
  maxSlippagePercent: maxSlippage,
@@ -119898,38 +120103,84 @@ spurious results.`);
119898
120103
  return new Web3Number(output2.optimalInput, fromToken.decimals);
119899
120104
  }
119900
120105
  async getMaxBorrowableAmountByVesuAdapter(vesuAdapter, isAPYComputation) {
119901
- const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
120106
+ const lstAPY = await this.getLSTAPR(
120107
+ this.getLSTUnderlyingTokenInfo().address
120108
+ );
119902
120109
  const maxInterestRate = lstAPY * 0.8;
119903
- const { maxDebtToHave: maxBorrowableAmount, currentDebt } = await vesuAdapter.getMaxBorrowableByInterestRate(this.config, vesuAdapter.config.debt, maxInterestRate);
120110
+ const { maxDebtToHave: maxBorrowableAmount, currentDebt } = await vesuAdapter.getMaxBorrowableByInterestRate(
120111
+ this.config,
120112
+ vesuAdapter.config.debt,
120113
+ maxInterestRate
120114
+ );
119904
120115
  const debtCap = await vesuAdapter.getDebtCap(this.config);
119905
120116
  if (currentDebt.gte(debtCap)) {
119906
- return { amount: Web3Number.fromWei("0", vesuAdapter.config.debt.decimals), dexSwappableAmount: Web3Number.fromWei("0", vesuAdapter.config.debt.decimals), maxBorrowableAmount: Web3Number.fromWei("0", vesuAdapter.config.debt.decimals), borrowableAsset: vesuAdapter.config.debt };
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
+ };
119907
120129
  }
119908
120130
  const availableToBorrow = debtCap.minus(currentDebt);
119909
120131
  const maxBorrowable = maxBorrowableAmount.minimum(availableToBorrow).multipliedBy(0.999);
119910
- if (vesuAdapter.config.debt.address.eq(this.getLSTUnderlyingTokenInfo().address) || isAPYComputation) {
119911
- return { amount: maxBorrowable, dexSwappableAmount: maxBorrowable, maxBorrowableAmount: maxBorrowable, borrowableAsset: vesuAdapter.config.debt };
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
+ };
119912
120141
  }
119913
120142
  try {
119914
- const maxSwappable = await this.getMaxSwappableWithMaxSlippage(vesuAdapter.config.debt, this.getLSTUnderlyingTokenInfo(), 2e-4, maxBorrowable);
119915
- return { amount: maxBorrowable.minimum(maxSwappable), dexSwappableAmount: maxSwappable, maxBorrowableAmount: maxBorrowable, borrowableAsset: vesuAdapter.config.debt };
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
+ };
119916
120155
  } catch (error2) {
119917
120156
  logger2.warn(`${this.getTag()}: Failed to get max swappable: ${error2}`);
119918
- const maxSwappable = Web3Number.fromWei("0", vesuAdapter.config.debt.decimals);
119919
- return { amount: maxBorrowable.minimum(maxSwappable), dexSwappableAmount: maxSwappable, maxBorrowableAmount: maxBorrowable, borrowableAsset: vesuAdapter.config.debt };
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
+ };
119920
120167
  }
119921
120168
  }
119922
120169
  // todo how much to unwind to get back healthy APY zone again
119923
120170
  // if net APY < LST APR + 0.5%, we need to unwind to get back to LST APR + 1% atleast or 0 vesu position
119924
- // For xSTRK, simply deposit in Vesu if looping is not viable
120171
+ // For xSTRK, simply deposit in Vesu if looping is not viable
119925
120172
  /**
119926
120173
  * Gets LST APR for the strategy's underlying asset from Endur API
119927
120174
  * @returns Promise<number> The LST APR (not divided by 1e18)
119928
120175
  */
119929
120176
  async getLSTAPR(_address) {
119930
120177
  try {
119931
- const vesuAdapter1 = this.getVesuSameTokenAdapter(this.metadata.additionalInfo.defaultPoolId);
119932
- const apr = await LSTAPRService.getLSTAPR(vesuAdapter1.config.debt.address);
120178
+ const vesuAdapter1 = this.getVesuSameTokenAdapter(
120179
+ this.metadata.additionalInfo.defaultPoolId
120180
+ );
120181
+ const apr = await LSTAPRService.getLSTAPR(
120182
+ vesuAdapter1.config.debt.address
120183
+ );
119933
120184
  if (!apr) {
119934
120185
  throw new Error("Failed to get LST APR");
119935
120186
  }
@@ -119942,19 +120193,37 @@ spurious results.`);
119942
120193
  // todo undo this
119943
120194
  async netAPY() {
119944
120195
  const unusedBalance = await this.getUnusedBalance();
119945
- const maxNewDeposits = await this.maxNewDeposits({ isAPYComputation: true });
119946
- const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
120196
+ const maxNewDeposits = await this.maxNewDeposits({
120197
+ isAPYComputation: true
120198
+ });
120199
+ const lstAPY = await this.getLSTAPR(
120200
+ this.getLSTUnderlyingTokenInfo().address
120201
+ );
119947
120202
  if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
119948
- logger2.verbose(`${this.getTag()}::netAPY: unused balance is > max servicable from loan, lstAPY: ${lstAPY}`);
120203
+ logger2.verbose(
120204
+ `${this.getTag()}::netAPY: unused balance is > max servicable from loan, lstAPY: ${lstAPY}`
120205
+ );
119949
120206
  const output2 = await super.netAPY();
119950
120207
  output2.splits.push({ apy: lstAPY, id: "lst_apy" });
119951
120208
  return output2;
119952
120209
  } else {
119953
- logger2.verbose(`${this.getTag()}::netAPY: we can take more deposits, use theoretical max APY`);
120210
+ logger2.verbose(
120211
+ `${this.getTag()}::netAPY: we can take more deposits, use theoretical max APY`
120212
+ );
119954
120213
  const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
119955
- const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
120214
+ const weights = positions.map(
120215
+ (p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1)
120216
+ );
119956
120217
  const aum = weights.reduce((acc, curr) => acc + curr, 0);
119957
- const output2 = await this.returnNetAPY(baseAPYs, rewardAPYs, weights, new Web3Number(aum.toFixed(9), this.getLSTUnderlyingTokenInfo().decimals));
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
+ );
119958
120227
  output2.splits.push({ apy: lstAPY, id: "lst_apy" });
119959
120228
  return output2;
119960
120229
  }
@@ -119964,9 +120233,13 @@ spurious results.`);
119964
120233
  let numerator = 0;
119965
120234
  let ltv = void 0;
119966
120235
  for (let adapter2 of this.getVesuAdapters()) {
119967
- const maxBorrowableAmountInfo = maxBorrowableAmounts.maxBorrowables.find((b2) => b2.borrowableAsset.address.eq(adapter2.config.debt.address));
120236
+ const maxBorrowableAmountInfo = maxBorrowableAmounts.maxBorrowables.find(
120237
+ (b2) => b2.borrowableAsset.address.eq(adapter2.config.debt.address)
120238
+ );
119968
120239
  if (!maxBorrowableAmountInfo || !maxBorrowableAmountInfo?.amount) {
119969
- throw new Error(`Max borrowable amount not found for adapter: ${adapter2.config.debt.symbol}`);
120240
+ throw new Error(
120241
+ `Max borrowable amount not found for adapter: ${adapter2.config.debt.symbol}`
120242
+ );
119970
120243
  }
119971
120244
  numerator += this.metadata.additionalInfo.targetHealthFactor * maxBorrowableAmountInfo.amount.toNumber() / maxBorrowableAmountInfo.ltv;
119972
120245
  }
@@ -119975,7 +120248,9 @@ spurious results.`);
119975
120248
  // todo revisit cases where 0th adapters is used
119976
120249
  async getUnusedBalanceAPY() {
119977
120250
  const unusedBalance = await this.getUnusedBalance();
119978
- const vesuAdapter = this.getVesuSameTokenAdapter(this.metadata.additionalInfo.defaultPoolId);
120251
+ const vesuAdapter = this.getVesuSameTokenAdapter(
120252
+ this.metadata.additionalInfo.defaultPoolId
120253
+ );
119979
120254
  const underlying = vesuAdapter.config.debt;
119980
120255
  const lstAPY = await this.getLSTAPR(underlying.address);
119981
120256
  return {
@@ -119983,37 +120258,80 @@ spurious results.`);
119983
120258
  weight: unusedBalance.usdValue
119984
120259
  };
119985
120260
  }
120261
+ async getLSTAvnuRate() {
120262
+ const vesuAdapter1 = this.getVesuSameTokenAdapter(
120263
+ this.metadata.additionalInfo.defaultPoolId
120264
+ );
120265
+ const lstTokenInfo = vesuAdapter1.config.collateral;
120266
+ const underlyingTokenInfo = vesuAdapter1.config.debt;
120267
+ const avnuModule = new AvnuWrapper();
120268
+ const sellAmount = lstTokenInfo.priceCheckAmount ? new Web3Number(
120269
+ lstTokenInfo.priceCheckAmount,
120270
+ underlyingTokenInfo.decimals
120271
+ ) : new Web3Number(1, underlyingTokenInfo.decimals);
120272
+ const quote = await avnuModule.getQuotes(
120273
+ underlyingTokenInfo.address.address,
120274
+ lstTokenInfo.address.address,
120275
+ sellAmount.toWei(),
120276
+ this.metadata.additionalInfo.vaultAllocator.address
120277
+ );
120278
+ const underlyingAmountNumber = sellAmount.toNumber();
120279
+ const lstAmountNumber = Web3Number.fromWei(
120280
+ quote.buyAmount.toString(),
120281
+ lstTokenInfo.decimals
120282
+ ).toNumber();
120283
+ assert3(lstAmountNumber > 0, "Avnu LST amount is zero");
120284
+ const exchangeRate = underlyingAmountNumber / lstAmountNumber;
120285
+ logger2.verbose(
120286
+ `${this.getTag()}:: LST Avnu Exchange Rate: ${exchangeRate}`
120287
+ );
120288
+ return exchangeRate;
120289
+ }
119986
120290
  async getLSTExchangeRate() {
119987
- const vesuAdapter1 = this.getVesuSameTokenAdapter(this.metadata.additionalInfo.defaultPoolId);
120291
+ const vesuAdapter1 = this.getVesuSameTokenAdapter(
120292
+ this.metadata.additionalInfo.defaultPoolId
120293
+ );
119988
120294
  const lstTokenInfo = vesuAdapter1.config.collateral;
119989
120295
  const lstABI = new Contract({
119990
120296
  abi: erc4626_abi_default,
119991
120297
  address: lstTokenInfo.address.address,
119992
120298
  providerOrAccount: this.config.provider
119993
120299
  });
119994
- const price = await lstABI.call("convert_to_assets", [uint256_exports.bnToUint256(new Web3Number(1, lstTokenInfo.decimals).toWei())]);
120300
+ const price = await lstABI.call("convert_to_assets", [
120301
+ uint256_exports.bnToUint256(new Web3Number(1, lstTokenInfo.decimals).toWei())
120302
+ ]);
119995
120303
  const exchangeRate = Number(uint256_exports.uint256ToBN(price).toString()) / Math.pow(10, lstTokenInfo.decimals);
119996
120304
  logger2.verbose(`${this.getTag()}:: LST Exchange Rate: ${exchangeRate}`);
119997
120305
  return exchangeRate;
119998
120306
  }
119999
120307
  /**
120000
- *
120308
+ *
120001
120309
  * @param params marginAmount is in LST, debtAmount is in underlying
120002
120310
  */
120003
120311
  async getModifyLeverCall(params) {
120004
- logger2.verbose(`${this.getTag()}::getModifyLeverCall marginAmount: ${params.marginAmount}, debtAmount: ${params.debtAmount}, lstDexPriceInUnderlying: ${params.lstDexPriceInUnderlying}, isIncrease: ${params.isIncrease}`);
120005
- assert3(!params.marginAmount.isZero() || !params.debtAmount.isZero(), "Deposit/debt must be non-0");
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
+ );
120006
120319
  const vesuAdapter1 = this.getVesuSameTokenAdapter(params.poolId);
120007
120320
  const lstTokenInfo = this.asset();
120008
120321
  const lstUnderlyingTokenInfo = vesuAdapter1.config.debt;
120009
120322
  const maxAmounts = lstTokenInfo.symbol == "xSTRK" ? 5e5 : 0.5;
120010
120323
  if (params.marginAmount.greaterThan(maxAmounts)) {
120011
- throw new Error(`Margin amount is greater than max amount: ${params.marginAmount.toNumber()} > ${maxAmounts}`);
120324
+ throw new Error(
120325
+ `Margin amount is greater than max amount: ${params.marginAmount.toNumber()} > ${maxAmounts}`
120326
+ );
120012
120327
  }
120013
120328
  const proofsIDs = [];
120014
120329
  const manageCalls = [];
120015
120330
  if (params.marginAmount.greaterThan(0)) {
120016
- const STEP1_ID = getVesuGenericLegId(params.poolId.toString(), "multiple_approve" /* MULTIPLE_APPROVE */);
120331
+ const STEP1_ID = getVesuGenericLegId(
120332
+ params.poolId.toString(),
120333
+ "multiple_approve" /* MULTIPLE_APPROVE */
120334
+ );
120017
120335
  const manage1Info = this.getProofs(STEP1_ID);
120018
120336
  const depositAmount = params.marginAmount;
120019
120337
  const manageCall1 = manage1Info.callConstructor({
@@ -120034,31 +120352,56 @@ spurious results.`);
120034
120352
  params.debtAmount
120035
120353
  // negative for exact amount out
120036
120354
  );
120037
- logger2.verbose(`${this.getTag()}::getModifyLeverCall leverSwapQuote: ${JSON.stringify(leverSwapQuote)}`);
120038
- assert3(leverSwapQuote.price_impact <= params.maxEkuboPriceImpact, "getIncreaseLeverCall: Price impact is too high [Debt swap]");
120039
- const leverSwap = ekuboQuoter.getVesuMultiplyQuote(leverSwapQuote, fromToken, toToken);
120040
- logger2.verbose(`${this.getTag()}::getModifyLeverCall leverSwap: ${JSON.stringify(leverSwap)}`);
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
+ );
120041
120370
  let minLSTReceived = params.debtAmount.dividedBy(lstDexPriceInUnderlying).multipliedBy(1 - MAX_SLIPPAGE);
120042
120371
  const minLSTReceivedAsPerTruePrice = params.debtAmount.dividedBy(lstTrueExchangeRate);
120043
120372
  minLSTReceived = minLSTReceivedAsPerTruePrice;
120044
- logger2.verbose(`${this.getTag()}::getModifyLeverCall minLSTReceivedAsPerTruePrice: ${minLSTReceivedAsPerTruePrice}, minLSTReceived: ${minLSTReceived}`);
120373
+ logger2.verbose(
120374
+ `${this.getTag()}::getModifyLeverCall minLSTReceivedAsPerTruePrice: ${minLSTReceivedAsPerTruePrice}, minLSTReceived: ${minLSTReceived}`
120375
+ );
120045
120376
  let maxUsedCollateral = params.debtAmount.abs().dividedBy(lstDexPriceInUnderlying).multipliedBy(1 + MAX_SLIPPAGE);
120046
120377
  const maxUsedCollateralInLST = params.debtAmount.abs().dividedBy(lstTrueExchangeRate).multipliedBy(1.005);
120047
- logger2.verbose(`${this.getTag()}::getModifyLeverCall maxUsedCollateralInLST: ${maxUsedCollateralInLST}, maxUsedCollateral: ${maxUsedCollateral}`);
120378
+ logger2.verbose(
120379
+ `${this.getTag()}::getModifyLeverCall maxUsedCollateralInLST: ${maxUsedCollateralInLST}, maxUsedCollateral: ${maxUsedCollateral}`
120380
+ );
120048
120381
  maxUsedCollateral = maxUsedCollateralInLST;
120049
- const STEP2_ID = getVesuGenericLegId(params.poolId.toString(), "switch_delegation_on" /* SWITCH_DELEGATION_ON */);
120382
+ const STEP2_ID = getVesuGenericLegId(
120383
+ params.poolId.toString(),
120384
+ "switch_delegation_on" /* SWITCH_DELEGATION_ON */
120385
+ );
120050
120386
  const manage2Info = this.getProofs(STEP2_ID);
120051
120387
  const manageCall2 = manage2Info.callConstructor({
120052
120388
  delegation: true
120053
120389
  });
120054
- const STEP3_ID = getVesuLegId("multiply_vesu" /* MULTIPLY_VESU */, vesuAdapter1.config.debt.symbol, vesuAdapter1.config.poolId.toString());
120390
+ const STEP3_ID = getVesuLegId(
120391
+ "multiply_vesu" /* MULTIPLY_VESU */,
120392
+ vesuAdapter1.config.debt.symbol,
120393
+ vesuAdapter1.config.poolId.toString()
120394
+ );
120055
120395
  const manage3Info = this.getProofs(STEP3_ID);
120056
120396
  const multiplyParams = params.isIncrease ? {
120057
120397
  isIncrease: true,
120058
120398
  increaseParams: {
120059
120399
  add_margin: params.marginAmount,
120060
120400
  margin_swap: [],
120061
- margin_swap_limit_amount: Web3Number.fromWei(0, this.asset().decimals),
120401
+ margin_swap_limit_amount: Web3Number.fromWei(
120402
+ 0,
120403
+ this.asset().decimals
120404
+ ),
120062
120405
  lever_swap: leverSwap,
120063
120406
  lever_swap_limit_amount: minLSTReceived
120064
120407
  }
@@ -120070,15 +120413,21 @@ spurious results.`);
120070
120413
  lever_swap_limit_amount: maxUsedCollateral,
120071
120414
  // only required for close position
120072
120415
  lever_swap_weights: [],
120073
- // 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.
120074
120417
  withdraw_swap: [],
120075
- withdraw_swap_limit_amount: Web3Number.fromWei(0, this.asset().decimals),
120418
+ withdraw_swap_limit_amount: Web3Number.fromWei(
120419
+ 0,
120420
+ this.asset().decimals
120421
+ ),
120076
120422
  withdraw_swap_weights: [],
120077
120423
  close_position: false
120078
120424
  }
120079
120425
  };
120080
120426
  const manageCall3 = manage3Info.callConstructor(multiplyParams);
120081
- const STEP4_ID = getVesuGenericLegId(params.poolId.toString(), "switch_delegation_off" /* SWITCH_DELEGATION_OFF */);
120427
+ const STEP4_ID = getVesuGenericLegId(
120428
+ params.poolId.toString(),
120429
+ "switch_delegation_off" /* SWITCH_DELEGATION_OFF */
120430
+ );
120082
120431
  const manage4Info = this.getProofs(STEP4_ID);
120083
120432
  const manageCall4 = manage4Info.callConstructor({
120084
120433
  delegation: false
@@ -120092,7 +120441,6 @@ spurious results.`);
120092
120441
  const containerStyle = {
120093
120442
  maxWidth: "800px",
120094
120443
  margin: "0 auto",
120095
- backgroundColor: "#111",
120096
120444
  color: "#eee",
120097
120445
  fontFamily: "Arial, sans-serif",
120098
120446
  borderRadius: "12px"
@@ -120115,21 +120463,52 @@ spurious results.`);
120115
120463
  " to create leverage. Depositors receive vault shares that represent a proportional claim on the underlying assets and accrued yield."
120116
120464
  ] }),
120117
120465
  /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "14px", lineHeight: "1.5", marginBottom: "16px" }, children: [
120118
- "This vault uses Vesu for lending and borrowing. The oracle used by this pool is a ",
120119
- highlightTextWithLinks("conversion rate oracle", [{ highlight: "conversion rate oracle", link: "https://docs.pragma.build/starknet/development#conversion-rate" }]),
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
+ ]),
120120
120474
  " ",
120121
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."
120122
120476
  ] }),
120123
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { backgroundColor: "#222", padding: "10px", borderRadius: "8px", marginBottom: "20px", border: "1px solid #444" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
120124
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Withdrawals:" }),
120125
- " Requests can take up to ",
120126
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "1-2 hours" }),
120127
- " to process as the vault unwinds and settles routing."
120128
- ] }) }),
120129
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: { backgroundColor: "#222", padding: "10px", borderRadius: "8px", marginBottom: "20px", border: "1px solid #444" }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
120130
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Debt limits:" }),
120131
- " 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."
120132
- ] }) })
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
+ )
120133
120512
  ] });
120134
120513
  }
120135
120514
  function getDescription2(tokenSymbol, underlyingSymbol) {
@@ -120145,31 +120524,76 @@ spurious results.`);
120145
120524
  return `${baseID}_${debtTokenSymbol.toLowerCase()}_${poolId.slice(-4).toLowerCase()}`;
120146
120525
  }
120147
120526
  function addVesuLeaves(poolId, lstSymbol, underlyingSymbol, vaultSettings, commonAdapter) {
120148
- const lstToken = Global.getDefaultTokens().find((token) => token.symbol === lstSymbol);
120149
- const underlyingToken = Global.getDefaultTokens().find((token) => token.symbol === underlyingSymbol);
120527
+ const lstToken = Global.getDefaultTokens().find(
120528
+ (token) => token.symbol === lstSymbol
120529
+ );
120530
+ const underlyingToken = Global.getDefaultTokens().find(
120531
+ (token) => token.symbol === underlyingSymbol
120532
+ );
120150
120533
  const vesuAdapterLST = new VesuAdapter({
120151
120534
  poolId,
120152
120535
  collateral: lstToken,
120153
120536
  debt: underlyingToken,
120154
120537
  vaultAllocator: vaultSettings.vaultAllocator,
120155
- id: getVesuLegId("vesu_leg1" /* VESU_LEG1 */, underlyingToken.symbol, poolId.toString())
120538
+ id: getVesuLegId(
120539
+ "vesu_leg1" /* VESU_LEG1 */,
120540
+ underlyingToken.symbol,
120541
+ poolId.toString()
120542
+ )
120156
120543
  });
120157
- vaultSettings.adapters.push(...[{
120158
- id: getVesuLegId("vesu_leg1" /* VESU_LEG1 */, underlyingToken.symbol, poolId.toString()),
120159
- adapter: vesuAdapterLST
120160
- }]);
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
+ );
120161
120556
  const { isV2, addr: poolAddr } = getVesuSingletonAddress(poolId);
120162
120557
  const VESU_MULTIPLY = isV2 ? vesuAdapterLST.VESU_MULTIPLY : vesuAdapterLST.VESU_MULTIPLY_V1;
120163
- const leafIdApprove = getVesuGenericLegId(poolId.toString(), "multiple_approve" /* MULTIPLE_APPROVE */);
120164
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, VESU_MULTIPLY, leafIdApprove).bind(commonAdapter));
120165
- const leafIdDelegationOn = getVesuGenericLegId(poolId.toString(), "switch_delegation_on" /* SWITCH_DELEGATION_ON */);
120166
- vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter(leafIdDelegationOn, VESU_MULTIPLY).bind(vesuAdapterLST));
120167
- const leafIdDelegationOff = getVesuGenericLegId(poolId.toString(), "switch_delegation_off" /* SWITCH_DELEGATION_OFF */);
120168
- vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter(leafIdDelegationOff, VESU_MULTIPLY).bind(vesuAdapterLST));
120169
- const multiplID = getVesuLegId("multiply_vesu" /* MULTIPLY_VESU */, underlyingToken.symbol, poolId.toString());
120170
- vaultSettings.leafAdapters.push(vesuAdapterLST.getMultiplyAdapter(multiplID).bind(vesuAdapterLST));
120171
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, poolAddr, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
120172
- vaultSettings.leafAdapters.push(vesuAdapterLST.getModifyPosition.bind(vesuAdapterLST));
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
+ );
120173
120597
  return vesuAdapterLST;
120174
120598
  }
120175
120599
  function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, defaultPoolId) {
@@ -120178,8 +120602,12 @@ spurious results.`);
120178
120602
  if (!pool1.eq(defaultPoolId)) {
120179
120603
  throw new Error(`Dont include default pool id in supported pool ids`);
120180
120604
  }
120181
- const lstToken = Global.getDefaultTokens().find((token) => token.symbol === lstSymbol);
120182
- const underlyingToken = Global.getDefaultTokens().find((token) => token.symbol === underlyingSymbol);
120605
+ const lstToken = Global.getDefaultTokens().find(
120606
+ (token) => token.symbol === lstSymbol
120607
+ );
120608
+ const underlyingToken = Global.getDefaultTokens().find(
120609
+ (token) => token.symbol === underlyingSymbol
120610
+ );
120183
120611
  const commonAdapter = new CommonAdapter({
120184
120612
  manager: vaultSettings.manager,
120185
120613
  asset: lstToken.address,
@@ -120187,28 +120615,106 @@ spurious results.`);
120187
120615
  vaultAddress: vaultSettings.vaultAddress,
120188
120616
  vaultAllocator: vaultSettings.vaultAllocator
120189
120617
  });
120190
- vaultSettings.adapters.push(...[{
120191
- id: "common_adapter" /* COMMON */,
120192
- adapter: commonAdapter
120193
- }]);
120194
- vaultSettings.borrowable_assets.map((borrowableAsset) => addVesuLeaves(borrowableAsset.poolId, lstSymbol, underlyingSymbol, vaultSettings, commonAdapter));
120195
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, AVNU_EXCHANGE, "avnu_mul_approve_withdr" /* AVNU_MULTIPLY_APPROVE_WITHDRAW */).bind(commonAdapter));
120196
- const uniqueBorrowableAssets = [...new Set(vaultSettings.borrowable_assets.map((borrowableAsset) => borrowableAsset.token.symbol))];
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
+ ];
120197
120649
  for (let borrowableAssetSymbol of uniqueBorrowableAssets) {
120198
- const borrowableAsset = Global.getDefaultTokens().find((token) => token.symbol === borrowableAssetSymbol);
120650
+ const borrowableAsset = Global.getDefaultTokens().find(
120651
+ (token) => token.symbol === borrowableAssetSymbol
120652
+ );
120199
120653
  const debtAsset = borrowableAsset;
120200
- const approve_debt_token_id = getAvnuManageIDs("avnu_mul_approve_dep" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */, debtAsset.symbol);
120201
- const swap_debt_token_id = getAvnuManageIDs("avnu_mul_swap_dep" /* AVNU_MULTIPLY_SWAP_DEPOSIT */, debtAsset.symbol);
120202
- const swap_lst_token_id = getAvnuManageIDs("avnu_mul_swap_withdr" /* AVNU_MULTIPLY_SWAP_WITHDRAW */, debtAsset.symbol);
120203
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(debtAsset.address, AVNU_EXCHANGE, approve_debt_token_id).bind(commonAdapter));
120204
- vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(debtAsset.address, lstToken.address, swap_debt_token_id, false).bind(commonAdapter));
120205
- vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(lstToken.address, debtAsset.address, swap_lst_token_id, false).bind(commonAdapter));
120206
- }
120207
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, vaultSettings.vaultAddress, "approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */).bind(commonAdapter));
120208
- vaultSettings.leafAdapters.push(commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter));
120209
- const STRKToken = Global.getDefaultTokens().find((token) => token.symbol === "STRK");
120210
- vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_EXCHANGE, "approve_swap_token1" /* APPROVE_SWAP_TOKEN1 */).bind(commonAdapter));
120211
- vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, lstToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */, false).bind(commonAdapter));
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
+ );
120212
120718
  return vaultSettings;
120213
120719
  }
120214
120720
  var AUDIT_URL4 = "https://docs.troves.fi/p/security#starknet-vault-kit";
@@ -120227,7 +120733,8 @@ spurious results.`);
120227
120733
  answer: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { children: [
120228
120734
  "Currently, the LST is from ",
120229
120735
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Endur" }),
120230
- " while ",
120736
+ " while",
120737
+ " ",
120231
120738
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("strong", { children: "Vesu" }),
120232
120739
  " is used to collateralize the looped position."
120233
120740
  ] })
@@ -120259,23 +120766,48 @@ spurious results.`);
120259
120766
  ];
120260
120767
  }
120261
120768
  var _riskFactor4 = [
120262
- { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 2 /* WELL_AUDITED */, weight: 25, reason: "Audited by Zellic" },
120263
- { type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 1 /* VERY_LOW_PROBABILITY */, weight: 25, reason: "The collateral and debt are highly correlated" },
120264
- { type: "Technical Risk" /* TECHNICAL_RISK */, value: 1 /* STABLE_INFRASTRUCTURE */, weight: 25, 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." },
120265
- { type: "Depeg Risk" /* DEPEG_RISK */, value: 2 /* GENERALLY_STABLE */, weight: 25, reason: "Generally stable pegged assets" }
120266
- ];
120267
- var btcBorrowableAssets = [
120268
- "WBTC",
120269
- "tBTC",
120270
- "LBTC",
120271
- "solvBTC"
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
+ }
120272
120793
  ];
120794
+ var btcBorrowableAssets = ["WBTC", "tBTC", "LBTC", "solvBTC"];
120273
120795
  var hyperxSTRK = {
120274
- vaultAddress: ContractAddr.from("0x46c7a54c82b1fe374353859f554a40b8bd31d3e30f742901579e7b57b1b5960"),
120275
- manager: ContractAddr.from("0x5d499cd333757f461a0bedaca3dfc4d77320c773037e0aa299f22a6dbfdc03a"),
120276
- vaultAllocator: ContractAddr.from("0x511d07953a09bc7c505970891507c5a2486d2ea22752601a14db092186d7caa"),
120277
- redeemRequestNFT: ContractAddr.from("0x51e40b839dc0c2feca923f863072673b94abfa2483345be3b30b457a90d095"),
120278
- aumOracle: ContractAddr.from("0x48cf709870a1a0d453d37de108e0c41b8b89819ef54f95abc0e2e1f98bbe937"),
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
+ ),
120279
120811
  leafAdapters: [],
120280
120812
  adapters: [],
120281
120813
  targetHealthFactor: 1.1,
@@ -120286,35 +120818,63 @@ spurious results.`);
120286
120818
  ...Global.getDefaultTokens().filter((token) => token.symbol === "STRK").map((token) => ({ token, poolId: VesuPools.Re7STRK }))
120287
120819
  // v2, new alt for Re7xSTRK
120288
120820
  ],
120289
- underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "STRK"),
120821
+ underlyingToken: Global.getDefaultTokens().find(
120822
+ (token) => token.symbol === "STRK"
120823
+ ),
120290
120824
  defaultPoolId: VesuPools.Re7xSTRK
120291
120825
  };
120292
120826
  var hyperxWBTC = {
120293
- vaultAddress: ContractAddr.from("0x2da9d0f96a46b453f55604313785dc866424240b1c6811d13bef594343db818"),
120294
- manager: ContractAddr.from("0x75866db44c81e6986f06035206ee9c7d15833ddb22d6a22c016cfb5c866a491"),
120295
- vaultAllocator: ContractAddr.from("0x57b5c1bb457b5e840a2714ae53ada87d77be2f3fd33a59b4fe709ef20c020c1"),
120296
- redeemRequestNFT: ContractAddr.from("0x7a5dc288325456f05e70e9616e16bc02ffbe448f4b89f80b47c0970b989c7c"),
120297
- aumOracle: ContractAddr.from("0x258f8a0ca0d21f542e48ad89d00e92dc4d9db4999084f50ef9c22dfb1e83023"),
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
+ ),
120298
120842
  leafAdapters: [],
120299
120843
  adapters: [],
120300
120844
  targetHealthFactor: 1.1,
120301
120845
  minHealthFactor: 1.05,
120302
120846
  borrowable_assets: [
120303
120847
  // allow all BTC flavours borrowing on Re7xBTC pool
120304
- ...btcBorrowableAssets.map((asset) => Global.getDefaultTokens().find((token) => token.symbol === asset)).map((token) => ({ token, poolId: VesuPools.Re7xBTC })),
120848
+ ...btcBorrowableAssets.map(
120849
+ (asset) => Global.getDefaultTokens().find((token) => token.symbol === asset)
120850
+ ).map((token) => ({ token, poolId: VesuPools.Re7xBTC })),
120305
120851
  // allow only WBTC borrowing on Prime pool
120306
120852
  ...Global.getDefaultTokens().filter((token) => token.symbol === "WBTC").map((token) => ({ token, poolId: VesuPools.Prime }))
120307
120853
  ],
120308
- underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "WBTC"),
120854
+ underlyingToken: Global.getDefaultTokens().find(
120855
+ (token) => token.symbol === "WBTC"
120856
+ ),
120309
120857
  defaultPoolId: VesuPools.Re7xBTC,
120310
- redemptionRouter: ContractAddr.from("0x6ea649f402898f69baf775c1afdd08522c071c640b9c4460192070ec2b96417")
120858
+ redemptionRouter: ContractAddr.from(
120859
+ "0x6ea649f402898f69baf775c1afdd08522c071c640b9c4460192070ec2b96417"
120860
+ )
120311
120861
  };
120312
120862
  var hyperxtBTC = {
120313
- vaultAddress: ContractAddr.from("0x47d5f68477e5637ce0e56436c6b5eee5a354e6828995dae106b11a48679328"),
120314
- manager: ContractAddr.from("0xc4cc3e08029a0ae076f5fdfca70575abb78d23c5cd1c49a957f7e697885401"),
120315
- vaultAllocator: ContractAddr.from("0x50bbd4fe69f841ecb13b2619fe50ebfa4e8944671b5d0ebf7868fd80c61b31e"),
120316
- redeemRequestNFT: ContractAddr.from("0xeac9032f02057779816e38a6cb9185d12d86b3aacc9949b96b36de359c1e3"),
120317
- aumOracle: ContractAddr.from("0x7e0d05cb7ba3f7db77a36c21c21583b5a524c2e685c08c24b3554911fb4a039"),
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
+ ),
120318
120878
  leafAdapters: [],
120319
120879
  adapters: [],
120320
120880
  targetHealthFactor: 1.1,
@@ -120322,16 +120882,30 @@ spurious results.`);
120322
120882
  borrowable_assets: [
120323
120883
  ...Global.getDefaultTokens().filter((token) => token.symbol === "tBTC" || token.symbol === "WBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
120324
120884
  ],
120325
- underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "tBTC"),
120885
+ underlyingToken: Global.getDefaultTokens().find(
120886
+ (token) => token.symbol === "tBTC"
120887
+ ),
120326
120888
  defaultPoolId: VesuPools.Re7xBTC,
120327
- redemptionRouter: ContractAddr.from("0x3de9c409d1e357e25778fb7a3e2e2393666956846a5c2caa607296fa8e76b5d")
120889
+ redemptionRouter: ContractAddr.from(
120890
+ "0x3de9c409d1e357e25778fb7a3e2e2393666956846a5c2caa607296fa8e76b5d"
120891
+ )
120328
120892
  };
120329
120893
  var hyperxsBTC = {
120330
- vaultAddress: ContractAddr.from("0x437ef1e7d0f100b2e070b7a65cafec0b2be31b0290776da8b4112f5473d8d9"),
120331
- manager: ContractAddr.from("0xc9ac023090625b0be3f6532ca353f086746f9c09f939dbc1b2613f09e5f821"),
120332
- vaultAllocator: ContractAddr.from("0x60c2d856936b975459a5b4eb28b8672d91f757bd76cebb6241f8d670185dc01"),
120333
- redeemRequestNFT: ContractAddr.from("0x429e8ee8bc7ecd1ade72630d350a2e0f10f9a2507c45f188ba17fe8f2ab4cf3"),
120334
- aumOracle: ContractAddr.from("0x149298ade3e79ec6cbdac6cfad289c57504eaf54e590939136ed1ceca60c345"),
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
+ ),
120335
120909
  leafAdapters: [],
120336
120910
  adapters: [],
120337
120911
  targetHealthFactor: 1.1,
@@ -120339,15 +120913,27 @@ spurious results.`);
120339
120913
  borrowable_assets: [
120340
120914
  ...Global.getDefaultTokens().filter((token) => token.symbol === "solvBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
120341
120915
  ],
120342
- underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "solvBTC"),
120916
+ underlyingToken: Global.getDefaultTokens().find(
120917
+ (token) => token.symbol === "solvBTC"
120918
+ ),
120343
120919
  defaultPoolId: VesuPools.Re7xBTC
120344
120920
  };
120345
120921
  var hyperxLBTC = {
120346
- vaultAddress: ContractAddr.from("0x64cf24d4883fe569926419a0569ab34497c6956a1a308fa883257f7486d7030"),
120347
- manager: ContractAddr.from("0x203530a4022a99b8f4b406aaf33b0849d43ad7422c1d5cc14ff8c667abec6c0"),
120348
- vaultAllocator: ContractAddr.from("0x7dbc8ccd4eabce6ea6c19e0e5c9ccca3a93bd510303b9e071cbe25fc508546e"),
120349
- redeemRequestNFT: ContractAddr.from("0x5ee66a39af9aef3d0d48982b4a63e8bd2a5bad021916bd87fb0eae3a26800b8"),
120350
- aumOracle: ContractAddr.from("0x23d69e4391fa72d10e625e7575d8bddbb4aff96f04503f83fdde23123bf41d0"),
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
+ ),
120351
120937
  leafAdapters: [],
120352
120938
  adapters: [],
120353
120939
  targetHealthFactor: 1.1,
@@ -120355,7 +120941,9 @@ spurious results.`);
120355
120941
  borrowable_assets: [
120356
120942
  ...Global.getDefaultTokens().filter((token) => token.symbol === "LBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
120357
120943
  ],
120358
- underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "LBTC"),
120944
+ underlyingToken: Global.getDefaultTokens().find(
120945
+ (token) => token.symbol === "LBTC"
120946
+ ),
120359
120947
  defaultPoolId: VesuPools.Re7xBTC
120360
120948
  };
120361
120949
  function getInvestmentSteps(lstSymbol, underlyingSymbol) {
@@ -120373,7 +120961,7 @@ spurious results.`);
120373
120961
  xLBTC: 5,
120374
120962
  xtBTC: 5,
120375
120963
  xsBTC: 5,
120376
- xSTRK: 55e4
120964
+ xSTRK: 7e6
120377
120965
  };
120378
120966
  const maxTVLValue = lstMaxTVLs[lstSymbol] || 0;
120379
120967
  const token = Global.getDefaultTokens().find(
@@ -120442,15 +121030,19 @@ spurious results.`);
120442
121030
  };
120443
121031
  var HYPER_LST_REDEMPTION_INFO = {
120444
121032
  instantWithdrawalVault: "No" /* NO */,
120445
- redemptionsInfo: [{
120446
- title: "Typical Duration",
120447
- description: "1-2 hours"
120448
- }],
120449
- alerts: [{
120450
- type: "info",
120451
- 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.",
120452
- tab: "withdraw"
120453
- }]
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
+ ]
120454
121046
  };
120455
121047
  function getStrategySettings(lstSymbol, underlyingSymbol, settings2, isPreview = false) {
120456
121048
  return {
@@ -120465,9 +121057,7 @@ spurious results.`);
120465
121057
  description: `Creates leveraged looping position on ${lstSymbol} by borrowing ${underlyingSymbol} to increase yield`
120466
121058
  },
120467
121059
  depositTokens: [
120468
- Global.getDefaultTokens().find(
120469
- (token) => token.symbol === lstSymbol
120470
- )
121060
+ Global.getDefaultTokens().find((token) => token.symbol === lstSymbol)
120471
121061
  ],
120472
121062
  additionalInfo: getLooperSettings2(
120473
121063
  lstSymbol,
@@ -120477,10 +121067,7 @@ spurious results.`);
120477
121067
  ),
120478
121068
  risk: {
120479
121069
  riskFactor: _riskFactor4,
120480
- netRisk: _riskFactor4.reduce(
120481
- (acc, curr) => acc + curr.value * curr.weight,
120482
- 0
120483
- ) / _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),
120484
121071
  notARisks: getNoRiskTags(_riskFactor4)
120485
121072
  },
120486
121073
  auditUrl: AUDIT_URL4,
@@ -120495,16 +121082,19 @@ spurious results.`);
120495
121082
  investmentSteps: getInvestmentSteps(lstSymbol, underlyingSymbol),
120496
121083
  isPreview,
120497
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",
120498
121086
  tags: lstSymbol.includes("BTC") ? ["BTC" /* BTC */, "Maxx" /* LEVERED */] : ["Maxx" /* LEVERED */],
120499
121087
  security: HYPER_LST_SECURITY,
120500
121088
  redemptionInfo: HYPER_LST_REDEMPTION_INFO,
120501
121089
  usualTimeToEarnings: "2 weeks",
120502
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.",
120503
- points: [{
120504
- multiplier: 4,
120505
- logo: "https://endur.fi/favicon.ico",
120506
- toolTip: "This strategy holds xSTRK. Earn 3-4x Endur points on your xSTRK due to the leverage. Points can be found on endur.fi."
120507
- }]
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
+ ]
120508
121098
  };
120509
121099
  }
120510
121100
  var HyperLSTStrategies = [