@strkfarm/sdk 1.1.41 → 1.1.43
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 +26 -8
- package/dist/index.browser.mjs +26 -8
- package/dist/index.d.ts +3 -3
- package/dist/index.js +26 -8
- package/dist/index.mjs +26 -8
- package/package.json +1 -1
- package/src/strategies/constants.ts +2 -1
- package/src/strategies/ekubo-cl-vault.tsx +23 -5
- package/src/strategies/universal-adapters/vesu-adapter.ts +1 -1
- package/src/strategies/universal-strategy.tsx +1 -1
- package/src/strategies/vesu-rebalance.tsx +2 -2
|
@@ -55722,7 +55722,8 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
55722
55722
|
sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
|
|
55723
55723
|
}];
|
|
55724
55724
|
var ENDPOINTS = {
|
|
55725
|
-
VESU_BASE: "https://proxy.api.troves.fi/vesu
|
|
55725
|
+
VESU_BASE: "https://proxy.api.troves.fi/vesu",
|
|
55726
|
+
VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
|
|
55726
55727
|
};
|
|
55727
55728
|
|
|
55728
55729
|
// src/modules/harvests.ts
|
|
@@ -61390,7 +61391,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
61390
61391
|
};
|
|
61391
61392
|
}
|
|
61392
61393
|
static async getAllPossibleVerifiedPools(asset) {
|
|
61393
|
-
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.
|
|
61394
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE_STAGING}/pools`);
|
|
61394
61395
|
const verifiedPools = data.data.filter((d) => d.isVerified);
|
|
61395
61396
|
const pools = verifiedPools.map((p) => {
|
|
61396
61397
|
const hasMyAsset = p.assets.find((a) => asset.eqString(a.address));
|
|
@@ -61567,7 +61568,7 @@ ${JSON.stringify(data, null, 2)}`;
|
|
|
61567
61568
|
let pools = [];
|
|
61568
61569
|
try {
|
|
61569
61570
|
const data = await getAPIUsingHeadlessBrowser(
|
|
61570
|
-
`${ENDPOINTS.
|
|
61571
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
61571
61572
|
);
|
|
61572
61573
|
pools = data.data;
|
|
61573
61574
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -79691,7 +79692,24 @@ spurious results.`);
|
|
|
79691
79692
|
async feeBasedAPY(timeperiod = "24h") {
|
|
79692
79693
|
const feeInfo = await this.getFeeHistory(timeperiod);
|
|
79693
79694
|
const tvlNow = await this.getTVL("latest");
|
|
79694
|
-
|
|
79695
|
+
let days = 356;
|
|
79696
|
+
switch (timeperiod) {
|
|
79697
|
+
case "24h":
|
|
79698
|
+
days = 365;
|
|
79699
|
+
break;
|
|
79700
|
+
case "7d":
|
|
79701
|
+
days = 365 / 7;
|
|
79702
|
+
break;
|
|
79703
|
+
case "30d":
|
|
79704
|
+
days = 365 / 30;
|
|
79705
|
+
break;
|
|
79706
|
+
case "3m":
|
|
79707
|
+
days = 365 / (3 * 30);
|
|
79708
|
+
break;
|
|
79709
|
+
default:
|
|
79710
|
+
throw new Error(`Invalid timeperiod: ${timeperiod}`);
|
|
79711
|
+
}
|
|
79712
|
+
return feeInfo.summary.usdValue * days / tvlNow.usdValue;
|
|
79695
79713
|
}
|
|
79696
79714
|
/**
|
|
79697
79715
|
* Calculates assets before and now in a given token of TVL per share to observe growth
|
|
@@ -81031,7 +81049,7 @@ spurious results.`);
|
|
|
81031
81049
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
81032
81050
|
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
81033
81051
|
],
|
|
81034
|
-
apyMethodology: "Annualized fee APY, calculated as fees earned in the last
|
|
81052
|
+
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
81035
81053
|
additionalInfo: {
|
|
81036
81054
|
newBounds: "Managed by Re7",
|
|
81037
81055
|
truePrice: 1,
|
|
@@ -91213,7 +91231,7 @@ spurious results.`);
|
|
|
91213
91231
|
let pools = [];
|
|
91214
91232
|
try {
|
|
91215
91233
|
const data = await getAPIUsingHeadlessBrowser(
|
|
91216
|
-
`${ENDPOINTS.
|
|
91234
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
91217
91235
|
);
|
|
91218
91236
|
pools = data.data;
|
|
91219
91237
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -94413,8 +94431,8 @@ spurious results.`);
|
|
|
94413
94431
|
{ address: settings2.vaultAddress, name: "Vault" },
|
|
94414
94432
|
{ address: settings2.manager, name: "Vault Manager" },
|
|
94415
94433
|
{ address: settings2.vaultAllocator, name: "Vault Allocator" },
|
|
94416
|
-
{ address: settings2.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
94417
|
-
{ address:
|
|
94434
|
+
{ address: settings2.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
94435
|
+
// { address: settings.aumOracle, name: "AUM Oracle" },
|
|
94418
94436
|
];
|
|
94419
94437
|
}
|
|
94420
94438
|
var investmentSteps = [
|
package/dist/index.browser.mjs
CHANGED
|
@@ -4124,7 +4124,8 @@ var COMMON_CONTRACTS = [{
|
|
|
4124
4124
|
sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
|
|
4125
4125
|
}];
|
|
4126
4126
|
var ENDPOINTS = {
|
|
4127
|
-
VESU_BASE: "https://proxy.api.troves.fi/vesu
|
|
4127
|
+
VESU_BASE: "https://proxy.api.troves.fi/vesu",
|
|
4128
|
+
VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
|
|
4128
4129
|
};
|
|
4129
4130
|
|
|
4130
4131
|
// src/modules/harvests.ts
|
|
@@ -9792,7 +9793,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
|
9792
9793
|
};
|
|
9793
9794
|
}
|
|
9794
9795
|
static async getAllPossibleVerifiedPools(asset) {
|
|
9795
|
-
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.
|
|
9796
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE_STAGING}/pools`);
|
|
9796
9797
|
const verifiedPools = data.data.filter((d) => d.isVerified);
|
|
9797
9798
|
const pools = verifiedPools.map((p) => {
|
|
9798
9799
|
const hasMyAsset = p.assets.find((a) => asset.eqString(a.address));
|
|
@@ -9969,7 +9970,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
|
9969
9970
|
let pools = [];
|
|
9970
9971
|
try {
|
|
9971
9972
|
const data = await getAPIUsingHeadlessBrowser(
|
|
9972
|
-
`${ENDPOINTS.
|
|
9973
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
9973
9974
|
);
|
|
9974
9975
|
pools = data.data;
|
|
9975
9976
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -15770,7 +15771,24 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
15770
15771
|
async feeBasedAPY(timeperiod = "24h") {
|
|
15771
15772
|
const feeInfo = await this.getFeeHistory(timeperiod);
|
|
15772
15773
|
const tvlNow = await this.getTVL("latest");
|
|
15773
|
-
|
|
15774
|
+
let days = 356;
|
|
15775
|
+
switch (timeperiod) {
|
|
15776
|
+
case "24h":
|
|
15777
|
+
days = 365;
|
|
15778
|
+
break;
|
|
15779
|
+
case "7d":
|
|
15780
|
+
days = 365 / 7;
|
|
15781
|
+
break;
|
|
15782
|
+
case "30d":
|
|
15783
|
+
days = 365 / 30;
|
|
15784
|
+
break;
|
|
15785
|
+
case "3m":
|
|
15786
|
+
days = 365 / (3 * 30);
|
|
15787
|
+
break;
|
|
15788
|
+
default:
|
|
15789
|
+
throw new Error(`Invalid timeperiod: ${timeperiod}`);
|
|
15790
|
+
}
|
|
15791
|
+
return feeInfo.summary.usdValue * days / tvlNow.usdValue;
|
|
15774
15792
|
}
|
|
15775
15793
|
/**
|
|
15776
15794
|
* Calculates assets before and now in a given token of TVL per share to observe growth
|
|
@@ -17110,7 +17128,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17110
17128
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17111
17129
|
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17112
17130
|
],
|
|
17113
|
-
apyMethodology: "Annualized fee APY, calculated as fees earned in the last
|
|
17131
|
+
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17114
17132
|
additionalInfo: {
|
|
17115
17133
|
newBounds: "Managed by Re7",
|
|
17116
17134
|
truePrice: 1,
|
|
@@ -27302,7 +27320,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
27302
27320
|
let pools = [];
|
|
27303
27321
|
try {
|
|
27304
27322
|
const data = await getAPIUsingHeadlessBrowser(
|
|
27305
|
-
`${ENDPOINTS.
|
|
27323
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
27306
27324
|
);
|
|
27307
27325
|
pools = data.data;
|
|
27308
27326
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -30505,8 +30523,8 @@ function getContractDetails(settings) {
|
|
|
30505
30523
|
{ address: settings.vaultAddress, name: "Vault" },
|
|
30506
30524
|
{ address: settings.manager, name: "Vault Manager" },
|
|
30507
30525
|
{ address: settings.vaultAllocator, name: "Vault Allocator" },
|
|
30508
|
-
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
30509
|
-
{ address: settings.aumOracle, name: "AUM Oracle" }
|
|
30526
|
+
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
30527
|
+
// { address: settings.aumOracle, name: "AUM Oracle" },
|
|
30510
30528
|
];
|
|
30511
30529
|
}
|
|
30512
30530
|
var investmentSteps = [
|
package/dist/index.d.ts
CHANGED
|
@@ -715,17 +715,17 @@ declare class EkuboCLVault extends BaseStrategy<DualTokenInfo, DualActionAmount>
|
|
|
715
715
|
rebalanceCall(newBounds: EkuboBounds, swapParams: SwapInfo): Call[];
|
|
716
716
|
handleUnusedCall(swapParams: SwapInfo): Call[];
|
|
717
717
|
handleFeesCall(): Call[];
|
|
718
|
-
getFeeHistory(timePeriod?: '24h' | '30d' | '3m'): Promise<{
|
|
718
|
+
getFeeHistory(timePeriod?: '24h' | '7d' | '30d' | '3m'): Promise<{
|
|
719
719
|
summary: DualTokenInfo;
|
|
720
720
|
history: FeeHistory[];
|
|
721
721
|
}>;
|
|
722
722
|
netSharesBasedTrueAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number): Promise<number>;
|
|
723
|
-
feeBasedAPY(timeperiod?: '24h' | '30d' | '3m'): Promise<number>;
|
|
723
|
+
feeBasedAPY(timeperiod?: '24h' | '7d' | '30d' | '3m'): Promise<number>;
|
|
724
724
|
/**
|
|
725
725
|
* Calculates assets before and now in a given token of TVL per share to observe growth
|
|
726
726
|
* @returns {Promise<number>} The weighted average APY across all pools
|
|
727
727
|
*/
|
|
728
|
-
netAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number, timeperiod?: '24h' | '30d' | '3m'): Promise<number>;
|
|
728
|
+
netAPY(blockIdentifier?: BlockIdentifier, sinceBlocks?: number, timeperiod?: '24h' | '7d' | '30d' | '3m'): Promise<number>;
|
|
729
729
|
getHarvestRewardShares(fromBlock: number, toBlock: number): Promise<Web3Number>;
|
|
730
730
|
balanceOf(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<Web3Number>;
|
|
731
731
|
getUserTVL(user: ContractAddr, blockIdentifier?: BlockIdentifier): Promise<DualTokenInfo>;
|
package/dist/index.js
CHANGED
|
@@ -4128,7 +4128,8 @@ var COMMON_CONTRACTS = [{
|
|
|
4128
4128
|
sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
|
|
4129
4129
|
}];
|
|
4130
4130
|
var ENDPOINTS = {
|
|
4131
|
-
VESU_BASE: "https://proxy.api.troves.fi/vesu
|
|
4131
|
+
VESU_BASE: "https://proxy.api.troves.fi/vesu",
|
|
4132
|
+
VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
|
|
4132
4133
|
};
|
|
4133
4134
|
|
|
4134
4135
|
// src/modules/harvests.ts
|
|
@@ -9796,7 +9797,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
|
9796
9797
|
};
|
|
9797
9798
|
}
|
|
9798
9799
|
static async getAllPossibleVerifiedPools(asset) {
|
|
9799
|
-
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.
|
|
9800
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE_STAGING}/pools`);
|
|
9800
9801
|
const verifiedPools = data.data.filter((d) => d.isVerified);
|
|
9801
9802
|
const pools = verifiedPools.map((p) => {
|
|
9802
9803
|
const hasMyAsset = p.assets.find((a) => asset.eqString(a.address));
|
|
@@ -9973,7 +9974,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
|
9973
9974
|
let pools = [];
|
|
9974
9975
|
try {
|
|
9975
9976
|
const data = await getAPIUsingHeadlessBrowser(
|
|
9976
|
-
`${ENDPOINTS.
|
|
9977
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
9977
9978
|
);
|
|
9978
9979
|
pools = data.data;
|
|
9979
9980
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -15770,7 +15771,24 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
15770
15771
|
async feeBasedAPY(timeperiod = "24h") {
|
|
15771
15772
|
const feeInfo = await this.getFeeHistory(timeperiod);
|
|
15772
15773
|
const tvlNow = await this.getTVL("latest");
|
|
15773
|
-
|
|
15774
|
+
let days = 356;
|
|
15775
|
+
switch (timeperiod) {
|
|
15776
|
+
case "24h":
|
|
15777
|
+
days = 365;
|
|
15778
|
+
break;
|
|
15779
|
+
case "7d":
|
|
15780
|
+
days = 365 / 7;
|
|
15781
|
+
break;
|
|
15782
|
+
case "30d":
|
|
15783
|
+
days = 365 / 30;
|
|
15784
|
+
break;
|
|
15785
|
+
case "3m":
|
|
15786
|
+
days = 365 / (3 * 30);
|
|
15787
|
+
break;
|
|
15788
|
+
default:
|
|
15789
|
+
throw new Error(`Invalid timeperiod: ${timeperiod}`);
|
|
15790
|
+
}
|
|
15791
|
+
return feeInfo.summary.usdValue * days / tvlNow.usdValue;
|
|
15774
15792
|
}
|
|
15775
15793
|
/**
|
|
15776
15794
|
* Calculates assets before and now in a given token of TVL per share to observe growth
|
|
@@ -17110,7 +17128,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17110
17128
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17111
17129
|
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17112
17130
|
],
|
|
17113
|
-
apyMethodology: "Annualized fee APY, calculated as fees earned in the last
|
|
17131
|
+
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17114
17132
|
additionalInfo: {
|
|
17115
17133
|
newBounds: "Managed by Re7",
|
|
17116
17134
|
truePrice: 1,
|
|
@@ -27302,7 +27320,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
27302
27320
|
let pools = [];
|
|
27303
27321
|
try {
|
|
27304
27322
|
const data = await getAPIUsingHeadlessBrowser(
|
|
27305
|
-
`${ENDPOINTS.
|
|
27323
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
27306
27324
|
);
|
|
27307
27325
|
pools = data.data;
|
|
27308
27326
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -30505,8 +30523,8 @@ function getContractDetails(settings) {
|
|
|
30505
30523
|
{ address: settings.vaultAddress, name: "Vault" },
|
|
30506
30524
|
{ address: settings.manager, name: "Vault Manager" },
|
|
30507
30525
|
{ address: settings.vaultAllocator, name: "Vault Allocator" },
|
|
30508
|
-
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
30509
|
-
{ address: settings.aumOracle, name: "AUM Oracle" }
|
|
30526
|
+
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
30527
|
+
// { address: settings.aumOracle, name: "AUM Oracle" },
|
|
30510
30528
|
];
|
|
30511
30529
|
}
|
|
30512
30530
|
var investmentSteps = [
|
package/dist/index.mjs
CHANGED
|
@@ -4022,7 +4022,8 @@ var COMMON_CONTRACTS = [{
|
|
|
4022
4022
|
sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/blob/main/src/components/accessControl.cairo"
|
|
4023
4023
|
}];
|
|
4024
4024
|
var ENDPOINTS = {
|
|
4025
|
-
VESU_BASE: "https://proxy.api.troves.fi/vesu
|
|
4025
|
+
VESU_BASE: "https://proxy.api.troves.fi/vesu",
|
|
4026
|
+
VESU_BASE_STAGING: "https://proxy.api.troves.fi/vesu-staging"
|
|
4026
4027
|
};
|
|
4027
4028
|
|
|
4028
4029
|
// src/modules/harvests.ts
|
|
@@ -9690,7 +9691,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
|
9690
9691
|
};
|
|
9691
9692
|
}
|
|
9692
9693
|
static async getAllPossibleVerifiedPools(asset) {
|
|
9693
|
-
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.
|
|
9694
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE_STAGING}/pools`);
|
|
9694
9695
|
const verifiedPools = data.data.filter((d) => d.isVerified);
|
|
9695
9696
|
const pools = verifiedPools.map((p) => {
|
|
9696
9697
|
const hasMyAsset = p.assets.find((a) => asset.eqString(a.address));
|
|
@@ -9867,7 +9868,7 @@ var VesuRebalance = class _VesuRebalance extends BaseStrategy {
|
|
|
9867
9868
|
let pools = [];
|
|
9868
9869
|
try {
|
|
9869
9870
|
const data = await getAPIUsingHeadlessBrowser(
|
|
9870
|
-
`${ENDPOINTS.
|
|
9871
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
9871
9872
|
);
|
|
9872
9873
|
pools = data.data;
|
|
9873
9874
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -15668,7 +15669,24 @@ var EkuboCLVault = class _EkuboCLVault extends BaseStrategy {
|
|
|
15668
15669
|
async feeBasedAPY(timeperiod = "24h") {
|
|
15669
15670
|
const feeInfo = await this.getFeeHistory(timeperiod);
|
|
15670
15671
|
const tvlNow = await this.getTVL("latest");
|
|
15671
|
-
|
|
15672
|
+
let days = 356;
|
|
15673
|
+
switch (timeperiod) {
|
|
15674
|
+
case "24h":
|
|
15675
|
+
days = 365;
|
|
15676
|
+
break;
|
|
15677
|
+
case "7d":
|
|
15678
|
+
days = 365 / 7;
|
|
15679
|
+
break;
|
|
15680
|
+
case "30d":
|
|
15681
|
+
days = 365 / 30;
|
|
15682
|
+
break;
|
|
15683
|
+
case "3m":
|
|
15684
|
+
days = 365 / (3 * 30);
|
|
15685
|
+
break;
|
|
15686
|
+
default:
|
|
15687
|
+
throw new Error(`Invalid timeperiod: ${timeperiod}`);
|
|
15688
|
+
}
|
|
15689
|
+
return feeInfo.summary.usdValue * days / tvlNow.usdValue;
|
|
15672
15690
|
}
|
|
15673
15691
|
/**
|
|
15674
15692
|
* Calculates assets before and now in a given token of TVL per share to observe growth
|
|
@@ -17008,7 +17026,7 @@ var ETHUSDCRe7Strategy = {
|
|
|
17008
17026
|
Global.getDefaultTokens().find((t) => t.symbol === "ETH"),
|
|
17009
17027
|
Global.getDefaultTokens().find((t) => t.symbol === "USDC")
|
|
17010
17028
|
],
|
|
17011
|
-
apyMethodology: "Annualized fee APY, calculated as fees earned in the last
|
|
17029
|
+
apyMethodology: "Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
17012
17030
|
additionalInfo: {
|
|
17013
17031
|
newBounds: "Managed by Re7",
|
|
17014
17032
|
truePrice: 1,
|
|
@@ -27200,7 +27218,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
27200
27218
|
let pools = [];
|
|
27201
27219
|
try {
|
|
27202
27220
|
const data = await getAPIUsingHeadlessBrowser(
|
|
27203
|
-
`${ENDPOINTS.
|
|
27221
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
27204
27222
|
);
|
|
27205
27223
|
pools = data.data;
|
|
27206
27224
|
for (const pool of vesu_pools_default.data) {
|
|
@@ -30403,8 +30421,8 @@ function getContractDetails(settings) {
|
|
|
30403
30421
|
{ address: settings.vaultAddress, name: "Vault" },
|
|
30404
30422
|
{ address: settings.manager, name: "Vault Manager" },
|
|
30405
30423
|
{ address: settings.vaultAllocator, name: "Vault Allocator" },
|
|
30406
|
-
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
30407
|
-
{ address: settings.aumOracle, name: "AUM Oracle" }
|
|
30424
|
+
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" }
|
|
30425
|
+
// { address: settings.aumOracle, name: "AUM Oracle" },
|
|
30408
30426
|
];
|
|
30409
30427
|
}
|
|
30410
30428
|
var investmentSteps = [
|
package/package.json
CHANGED
|
@@ -294,7 +294,7 @@ export class EkuboCLVault extends BaseStrategy<
|
|
|
294
294
|
return [this.contract.populate("handle_fees", [])];
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
async getFeeHistory(timePeriod: '24h' | '30d' | '3m' = '24h'): Promise<{
|
|
297
|
+
async getFeeHistory(timePeriod: '24h' | '7d' | '30d' | '3m' = '24h'): Promise<{
|
|
298
298
|
summary: DualTokenInfo,
|
|
299
299
|
history: FeeHistory[]
|
|
300
300
|
}> {
|
|
@@ -450,11 +450,29 @@ export class EkuboCLVault extends BaseStrategy<
|
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
async feeBasedAPY(
|
|
453
|
-
timeperiod: '24h' | '30d' | '3m' = '24h'
|
|
453
|
+
timeperiod: '24h' | '7d' | '30d' | '3m' = '24h'
|
|
454
454
|
): Promise<number> {
|
|
455
455
|
const feeInfo = await this.getFeeHistory(timeperiod);
|
|
456
456
|
const tvlNow = await this.getTVL('latest');
|
|
457
|
-
|
|
457
|
+
|
|
458
|
+
let days = 356;
|
|
459
|
+
switch (timeperiod) {
|
|
460
|
+
case '24h':
|
|
461
|
+
days = 365;
|
|
462
|
+
break;
|
|
463
|
+
case '7d':
|
|
464
|
+
days = 365 / 7;
|
|
465
|
+
break;
|
|
466
|
+
case '30d':
|
|
467
|
+
days = 365 / 30;
|
|
468
|
+
break;
|
|
469
|
+
case '3m':
|
|
470
|
+
days = 365 / (3 * 30);
|
|
471
|
+
break;
|
|
472
|
+
default:
|
|
473
|
+
throw new Error(`Invalid timeperiod: ${timeperiod}`);
|
|
474
|
+
}
|
|
475
|
+
return feeInfo.summary.usdValue * days / tvlNow.usdValue;
|
|
458
476
|
}
|
|
459
477
|
|
|
460
478
|
/**
|
|
@@ -464,7 +482,7 @@ export class EkuboCLVault extends BaseStrategy<
|
|
|
464
482
|
async netAPY(
|
|
465
483
|
blockIdentifier: BlockIdentifier = "latest",
|
|
466
484
|
sinceBlocks = 600000,
|
|
467
|
-
timeperiod: '24h' | '30d' | '3m' = '24h' // temp thing for fee based APY
|
|
485
|
+
timeperiod: '24h' | '7d' | '30d' | '3m' = '24h' // temp thing for fee based APY
|
|
468
486
|
): Promise<number> {
|
|
469
487
|
const isUSDCQouteToken = this.metadata.additionalInfo.quoteAsset.symbol === "USDC";
|
|
470
488
|
if (!isUSDCQouteToken) {
|
|
@@ -2182,7 +2200,7 @@ const ETHUSDCRe7Strategy: IStrategyMetadata<CLVaultStrategySettings> = {
|
|
|
2182
2200
|
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
2183
2201
|
],
|
|
2184
2202
|
apyMethodology:
|
|
2185
|
-
"Annualized fee APY, calculated as fees earned in the last
|
|
2203
|
+
"Annualized fee APY, calculated as fees earned in the last 7d divided by TVL",
|
|
2186
2204
|
additionalInfo: {
|
|
2187
2205
|
newBounds: "Managed by Re7",
|
|
2188
2206
|
truePrice: 1,
|
|
@@ -1121,7 +1121,7 @@ export function getContractDetails(settings: UniversalStrategySettings): {addres
|
|
|
1121
1121
|
{ address: settings.manager, name: "Vault Manager" },
|
|
1122
1122
|
{ address: settings.vaultAllocator, name: "Vault Allocator" },
|
|
1123
1123
|
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" },
|
|
1124
|
-
{ address: settings.aumOracle, name: "AUM Oracle" },
|
|
1124
|
+
// { address: settings.aumOracle, name: "AUM Oracle" },
|
|
1125
1125
|
];
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
@@ -223,7 +223,7 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
static async getAllPossibleVerifiedPools(asset: ContractAddr) {
|
|
226
|
-
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.
|
|
226
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE_STAGING}/pools`);
|
|
227
227
|
const verifiedPools = data.data.filter((d: any) => d.isVerified);
|
|
228
228
|
const pools = verifiedPools
|
|
229
229
|
.map((p: any) => {
|
|
@@ -489,7 +489,7 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
489
489
|
let pools: any[] = [];
|
|
490
490
|
try {
|
|
491
491
|
const data = await getAPIUsingHeadlessBrowser(
|
|
492
|
-
`${ENDPOINTS.
|
|
492
|
+
`${ENDPOINTS.VESU_BASE_STAGING}/pools`
|
|
493
493
|
);
|
|
494
494
|
pools = data.data;
|
|
495
495
|
|