@strkfarm/sdk 1.1.36 → 1.1.37
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.
|
@@ -94490,12 +94490,17 @@ spurious results.`);
|
|
|
94490
94490
|
async netAPY() {
|
|
94491
94491
|
const unusedBalance = await this.getUnusedBalance();
|
|
94492
94492
|
const maxNewDeposits = await this.maxNewDeposits();
|
|
94493
|
+
const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
|
|
94493
94494
|
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
94494
|
-
|
|
94495
|
+
const output = await super.netAPY();
|
|
94496
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
94497
|
+
return output;
|
|
94495
94498
|
} else {
|
|
94496
94499
|
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
94497
94500
|
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
94498
|
-
|
|
94501
|
+
const output = await this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
94502
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
94503
|
+
return output;
|
|
94499
94504
|
}
|
|
94500
94505
|
}
|
|
94501
94506
|
async maxNewDeposits() {
|
package/dist/index.browser.mjs
CHANGED
|
@@ -30584,12 +30584,17 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
30584
30584
|
async netAPY() {
|
|
30585
30585
|
const unusedBalance = await this.getUnusedBalance();
|
|
30586
30586
|
const maxNewDeposits = await this.maxNewDeposits();
|
|
30587
|
+
const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
|
|
30587
30588
|
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
30588
|
-
|
|
30589
|
+
const output = await super.netAPY();
|
|
30590
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
30591
|
+
return output;
|
|
30589
30592
|
} else {
|
|
30590
30593
|
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
30591
30594
|
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
30592
|
-
|
|
30595
|
+
const output = await this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
30596
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
30597
|
+
return output;
|
|
30593
30598
|
}
|
|
30594
30599
|
}
|
|
30595
30600
|
async maxNewDeposits() {
|
package/dist/index.js
CHANGED
|
@@ -30583,12 +30583,17 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
30583
30583
|
async netAPY() {
|
|
30584
30584
|
const unusedBalance = await this.getUnusedBalance();
|
|
30585
30585
|
const maxNewDeposits = await this.maxNewDeposits();
|
|
30586
|
+
const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
|
|
30586
30587
|
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
30587
|
-
|
|
30588
|
+
const output = await super.netAPY();
|
|
30589
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
30590
|
+
return output;
|
|
30588
30591
|
} else {
|
|
30589
30592
|
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
30590
30593
|
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
30591
|
-
|
|
30594
|
+
const output = await this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
30595
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
30596
|
+
return output;
|
|
30592
30597
|
}
|
|
30593
30598
|
}
|
|
30594
30599
|
async maxNewDeposits() {
|
package/dist/index.mjs
CHANGED
|
@@ -30482,12 +30482,17 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
30482
30482
|
async netAPY() {
|
|
30483
30483
|
const unusedBalance = await this.getUnusedBalance();
|
|
30484
30484
|
const maxNewDeposits = await this.maxNewDeposits();
|
|
30485
|
+
const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
|
|
30485
30486
|
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
30486
|
-
|
|
30487
|
+
const output = await super.netAPY();
|
|
30488
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
30489
|
+
return output;
|
|
30487
30490
|
} else {
|
|
30488
30491
|
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
30489
30492
|
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
30490
|
-
|
|
30493
|
+
const output = await this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
30494
|
+
output.splits.push({ apy: lstAPY, id: "lst_apy" });
|
|
30495
|
+
return output;
|
|
30491
30496
|
}
|
|
30492
30497
|
}
|
|
30493
30498
|
async maxNewDeposits() {
|
package/package.json
CHANGED
|
@@ -460,17 +460,22 @@ export class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTSt
|
|
|
460
460
|
async netAPY(): Promise<{ net: number; splits: { apy: number; id: string; }[]; }> {
|
|
461
461
|
const unusedBalance = await this.getUnusedBalance();
|
|
462
462
|
const maxNewDeposits = await this.maxNewDeposits();
|
|
463
|
+
const lstAPY = await this.getLSTAPR(this.getLSTUnderlyingTokenInfo().address);
|
|
463
464
|
|
|
464
465
|
// if unused balance is > max servicable from loan, we are limited by the max borrowing we can do
|
|
465
466
|
// we also allow accepting little higher deposits (1.5x) to have room for future looping when theres more liquidity or debt cap rises
|
|
466
467
|
if (maxNewDeposits * 1.5 < unusedBalance.amount.toNumber()) {
|
|
467
468
|
// we have excess, just use real APY
|
|
468
|
-
|
|
469
|
+
const output = await super.netAPY();
|
|
470
|
+
output.splits.push({apy: lstAPY, id: 'lst_apy'});
|
|
471
|
+
return output;
|
|
469
472
|
} else {
|
|
470
473
|
// we have little bit room to accept more deposits, we use theoretical max APY
|
|
471
474
|
const { positions, baseAPYs, rewardAPYs } = await this.getVesuAPYs();
|
|
472
475
|
const weights = positions.map((p, index) => p.usdValue * (index % 2 == 0 ? 1 : -1));
|
|
473
|
-
|
|
476
|
+
const output = await this.returnNetAPY(baseAPYs, rewardAPYs, weights);
|
|
477
|
+
output.splits.push({apy: lstAPY, id: 'lst_apy'});
|
|
478
|
+
return output;
|
|
474
479
|
}
|
|
475
480
|
}
|
|
476
481
|
|