@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.
- package/dist/index.browser.global.js +912 -322
- package/dist/index.browser.mjs +836 -246
- package/dist/index.d.ts +24 -4
- package/dist/index.js +837 -246
- package/dist/index.mjs +836 -246
- package/package.json +1 -1
- package/src/interfaces/common.tsx +1 -0
- package/src/strategies/ekubo-cl-vault.tsx +2 -0
- package/src/strategies/index.ts +1 -0
- package/src/strategies/types.ts +4 -0
- package/src/strategies/universal-lst-muliplier-strategy.tsx +1385 -558
- package/src/strategies/universal-strategy.tsx +7 -4
|
@@ -11,6 +11,7 @@ import { ApproveCallParams, AvnuSwapCallParams, BaseAdapter, CommonAdapter, Flas
|
|
|
11
11
|
import { Global } from "@/global";
|
|
12
12
|
import { AvnuWrapper, ERC20 } from "@/modules";
|
|
13
13
|
import { AVNU_MIDDLEWARE, VESU_SINGLETON } from "./universal-adapters/adapter-utils";
|
|
14
|
+
import { LSTPriceType } from "./types";
|
|
14
15
|
import { HarvestInfo, VesuHarvests } from "@/modules/harvests";
|
|
15
16
|
|
|
16
17
|
export interface UniversalManageCall {
|
|
@@ -435,7 +436,7 @@ export class UniversalStrategy<
|
|
|
435
436
|
};
|
|
436
437
|
}
|
|
437
438
|
|
|
438
|
-
protected async getVesuAUM(adapter: VesuAdapter) {
|
|
439
|
+
protected async getVesuAUM(adapter: VesuAdapter, _priceType?: LSTPriceType) {
|
|
439
440
|
const legAUM = await adapter.getPositions(this.config);
|
|
440
441
|
const underlying = this.asset();
|
|
441
442
|
let vesuAum = Web3Number.fromWei("0", underlying.decimals);
|
|
@@ -468,7 +469,7 @@ export class UniversalStrategy<
|
|
|
468
469
|
return prevAum;
|
|
469
470
|
}
|
|
470
471
|
|
|
471
|
-
async getAUM(): Promise<{net: SingleTokenInfo, prevAum: Web3Number, splits: {id: string, aum: Web3Number}[]}> {
|
|
472
|
+
async getAUM(unrealizedAUM?: boolean): Promise<{net: SingleTokenInfo, prevAum: Web3Number, splits: {id: string, aum: Web3Number}[]}> {
|
|
472
473
|
const prevAum = await this.getPrevAUM();
|
|
473
474
|
const token1Price = await this.pricer.getPrice(this.metadata.depositTokens[0].symbol);
|
|
474
475
|
|
|
@@ -476,7 +477,9 @@ export class UniversalStrategy<
|
|
|
476
477
|
const vesuAdapters = this.getVesuAdapters();
|
|
477
478
|
let vesuAum = Web3Number.fromWei("0", this.asset().decimals);
|
|
478
479
|
for (const adapter of vesuAdapters) {
|
|
479
|
-
|
|
480
|
+
const priceType = unrealizedAUM ? LSTPriceType.ENDUR_PRICE : LSTPriceType.AVNU_PRICE;
|
|
481
|
+
const aumValue = await this.getVesuAUM(adapter, priceType);
|
|
482
|
+
vesuAum = vesuAum.plus(aumValue);
|
|
480
483
|
}
|
|
481
484
|
|
|
482
485
|
// account unused balance as aum as well (from vault allocator)
|
|
@@ -1095,7 +1098,6 @@ export default function MetaVaultDescription(allowedSources: AllowedSources[]) {
|
|
|
1095
1098
|
const containerStyle = {
|
|
1096
1099
|
maxWidth: "800px",
|
|
1097
1100
|
margin: "0 auto",
|
|
1098
|
-
backgroundColor: "#111",
|
|
1099
1101
|
color: "#eee",
|
|
1100
1102
|
fontFamily: "Arial, sans-serif",
|
|
1101
1103
|
borderRadius: "12px",
|
|
@@ -1335,6 +1337,7 @@ const createUniversalStrategy = (params: {
|
|
|
1335
1337
|
risk: getUniversalRisk(),
|
|
1336
1338
|
auditUrl: AUDIT_URL,
|
|
1337
1339
|
protocols: [Protocols.VESU],
|
|
1340
|
+
realizedAPYMethodology: "The realizedAPY is based on past 14 days performance by the vault",
|
|
1338
1341
|
curator: {
|
|
1339
1342
|
name: "Unwrap Labs",
|
|
1340
1343
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|