@strkfarm/sdk 2.0.0-dev.51 → 2.0.0-dev.52
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.
|
@@ -126888,14 +126888,14 @@ spurious results.`);
|
|
|
126888
126888
|
underlyingTokenInfo.decimals
|
|
126889
126889
|
) : new Web3Number(1, underlyingTokenInfo.decimals);
|
|
126890
126890
|
const quote = await avnuModule.getQuotes(
|
|
126891
|
-
underlyingTokenInfo.address.address,
|
|
126892
126891
|
lstTokenInfo.address.address,
|
|
126892
|
+
underlyingTokenInfo.address.address,
|
|
126893
126893
|
sellAmount.toWei(),
|
|
126894
126894
|
this.metadata.additionalInfo.vaultAllocator.address
|
|
126895
126895
|
);
|
|
126896
|
-
const underlyingAmountNumber =
|
|
126896
|
+
const underlyingAmountNumber = Web3Number.fromWei(quote.buyAmount.toString(), underlyingTokenInfo.decimals).toNumber();
|
|
126897
126897
|
const lstAmountNumber = Web3Number.fromWei(
|
|
126898
|
-
quote.
|
|
126898
|
+
quote.sellAmount.toString(),
|
|
126899
126899
|
lstTokenInfo.decimals
|
|
126900
126900
|
).toNumber();
|
|
126901
126901
|
assert3(lstAmountNumber > 0, "Avnu LST amount is zero");
|
package/dist/index.browser.mjs
CHANGED
|
@@ -38408,14 +38408,14 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
38408
38408
|
underlyingTokenInfo.decimals
|
|
38409
38409
|
) : new Web3Number(1, underlyingTokenInfo.decimals);
|
|
38410
38410
|
const quote = await avnuModule.getQuotes(
|
|
38411
|
-
underlyingTokenInfo.address.address,
|
|
38412
38411
|
lstTokenInfo.address.address,
|
|
38412
|
+
underlyingTokenInfo.address.address,
|
|
38413
38413
|
sellAmount.toWei(),
|
|
38414
38414
|
this.metadata.additionalInfo.vaultAllocator.address
|
|
38415
38415
|
);
|
|
38416
|
-
const underlyingAmountNumber =
|
|
38416
|
+
const underlyingAmountNumber = Web3Number.fromWei(quote.buyAmount.toString(), underlyingTokenInfo.decimals).toNumber();
|
|
38417
38417
|
const lstAmountNumber = Web3Number.fromWei(
|
|
38418
|
-
quote.
|
|
38418
|
+
quote.sellAmount.toString(),
|
|
38419
38419
|
lstTokenInfo.decimals
|
|
38420
38420
|
).toNumber();
|
|
38421
38421
|
assert(lstAmountNumber > 0, "Avnu LST amount is zero");
|
package/dist/index.js
CHANGED
|
@@ -38741,14 +38741,14 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
38741
38741
|
underlyingTokenInfo.decimals
|
|
38742
38742
|
) : new Web3Number(1, underlyingTokenInfo.decimals);
|
|
38743
38743
|
const quote = await avnuModule.getQuotes(
|
|
38744
|
-
underlyingTokenInfo.address.address,
|
|
38745
38744
|
lstTokenInfo.address.address,
|
|
38745
|
+
underlyingTokenInfo.address.address,
|
|
38746
38746
|
sellAmount.toWei(),
|
|
38747
38747
|
this.metadata.additionalInfo.vaultAllocator.address
|
|
38748
38748
|
);
|
|
38749
|
-
const underlyingAmountNumber =
|
|
38749
|
+
const underlyingAmountNumber = Web3Number.fromWei(quote.buyAmount.toString(), underlyingTokenInfo.decimals).toNumber();
|
|
38750
38750
|
const lstAmountNumber = Web3Number.fromWei(
|
|
38751
|
-
quote.
|
|
38751
|
+
quote.sellAmount.toString(),
|
|
38752
38752
|
lstTokenInfo.decimals
|
|
38753
38753
|
).toNumber();
|
|
38754
38754
|
assert(lstAmountNumber > 0, "Avnu LST amount is zero");
|
package/dist/index.mjs
CHANGED
|
@@ -38575,14 +38575,14 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
38575
38575
|
underlyingTokenInfo.decimals
|
|
38576
38576
|
) : new Web3Number(1, underlyingTokenInfo.decimals);
|
|
38577
38577
|
const quote = await avnuModule.getQuotes(
|
|
38578
|
-
underlyingTokenInfo.address.address,
|
|
38579
38578
|
lstTokenInfo.address.address,
|
|
38579
|
+
underlyingTokenInfo.address.address,
|
|
38580
38580
|
sellAmount.toWei(),
|
|
38581
38581
|
this.metadata.additionalInfo.vaultAllocator.address
|
|
38582
38582
|
);
|
|
38583
|
-
const underlyingAmountNumber =
|
|
38583
|
+
const underlyingAmountNumber = Web3Number.fromWei(quote.buyAmount.toString(), underlyingTokenInfo.decimals).toNumber();
|
|
38584
38584
|
const lstAmountNumber = Web3Number.fromWei(
|
|
38585
|
-
quote.
|
|
38585
|
+
quote.sellAmount.toString(),
|
|
38586
38586
|
lstTokenInfo.decimals
|
|
38587
38587
|
).toNumber();
|
|
38588
38588
|
assert(lstAmountNumber > 0, "Avnu LST amount is zero");
|
package/package.json
CHANGED
|
@@ -158,16 +158,18 @@ export class UniversalLstMultiplierStrategy<S extends HyperLSTStrategySettings>
|
|
|
158
158
|
)
|
|
159
159
|
: new Web3Number(1, underlyingTokenInfo.decimals);
|
|
160
160
|
|
|
161
|
+
// we consider LST as sell token bcz, generally, our risk is during LST less.
|
|
162
|
+
// hence, we price based on the sell price rather than buy price (which is generally higher)
|
|
161
163
|
const quote = await avnuModule.getQuotes(
|
|
162
|
-
underlyingTokenInfo.address.address,
|
|
163
164
|
lstTokenInfo.address.address,
|
|
165
|
+
underlyingTokenInfo.address.address,
|
|
164
166
|
sellAmount.toWei(),
|
|
165
167
|
this.metadata.additionalInfo.vaultAllocator.address,
|
|
166
168
|
);
|
|
167
169
|
|
|
168
|
-
const underlyingAmountNumber =
|
|
170
|
+
const underlyingAmountNumber = Web3Number.fromWei(quote.buyAmount.toString(), underlyingTokenInfo.decimals).toNumber();
|
|
169
171
|
const lstAmountNumber = Web3Number.fromWei(
|
|
170
|
-
quote.
|
|
172
|
+
quote.sellAmount.toString(),
|
|
171
173
|
lstTokenInfo.decimals,
|
|
172
174
|
).toNumber();
|
|
173
175
|
|