@strkfarm/sdk 2.0.0-dev.4 → 2.0.0-dev.40
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/cli.js +190 -36
- package/dist/cli.mjs +188 -34
- package/dist/index.browser.global.js +116018 -90768
- package/dist/index.browser.mjs +12769 -10876
- package/dist/index.d.ts +2222 -1947
- package/dist/index.js +13171 -11077
- package/dist/index.mjs +13076 -11004
- package/package.json +3 -3
- package/src/data/avnu.abi.json +840 -0
- package/src/data/ekubo-price-fethcer.abi.json +265 -0
- package/src/data/redeem-request-nft.abi.json +752 -0
- package/src/data/universal-vault.abi.json +8 -7
- package/src/dataTypes/_bignumber.ts +13 -4
- package/src/dataTypes/bignumber.browser.ts +10 -1
- package/src/dataTypes/bignumber.node.ts +10 -1
- package/src/dataTypes/index.ts +3 -2
- package/src/dataTypes/mynumber.ts +141 -0
- package/src/global.ts +96 -41
- package/src/index.browser.ts +2 -1
- package/src/interfaces/common.tsx +212 -5
- package/src/modules/apollo-client-config.ts +28 -0
- package/src/modules/avnu.ts +21 -12
- package/src/modules/ekubo-pricer.ts +79 -0
- package/src/modules/ekubo-quoter.ts +48 -30
- package/src/modules/erc20.ts +17 -0
- package/src/modules/harvests.ts +43 -29
- package/src/modules/index.ts +1 -1
- package/src/modules/pragma.ts +23 -8
- package/src/modules/pricer-from-api.ts +156 -15
- package/src/modules/pricer-lst.ts +1 -1
- package/src/modules/pricer.ts +40 -4
- package/src/modules/pricerBase.ts +2 -1
- package/src/node/deployer.ts +36 -1
- package/src/node/pricer-redis.ts +2 -1
- package/src/strategies/base-strategy.ts +168 -16
- package/src/strategies/constants.ts +8 -3
- package/src/strategies/ekubo-cl-vault.tsx +1044 -351
- package/src/strategies/factory.ts +199 -0
- package/src/strategies/index.ts +5 -3
- package/src/strategies/registry.ts +262 -0
- package/src/strategies/sensei.ts +353 -9
- package/src/strategies/svk-strategy.ts +125 -30
- package/src/strategies/token-boosted-xstrk-carry-strategy.tsx +1225 -0
- package/src/strategies/types.ts +4 -0
- package/src/strategies/universal-adapters/adapter-utils.ts +4 -1
- package/src/strategies/universal-adapters/avnu-adapter.ts +196 -272
- package/src/strategies/universal-adapters/baseAdapter.ts +263 -251
- package/src/strategies/universal-adapters/common-adapter.ts +206 -203
- package/src/strategies/universal-adapters/index.ts +10 -8
- package/src/strategies/universal-adapters/svk-troves-adapter.ts +511 -0
- package/src/strategies/universal-adapters/token-transfer-adapter.ts +200 -0
- package/src/strategies/universal-adapters/vesu-adapter.ts +120 -82
- package/src/strategies/universal-adapters/vesu-modify-position-adapter.ts +525 -0
- package/src/strategies/universal-adapters/vesu-multiply-adapter.ts +1098 -712
- package/src/strategies/universal-adapters/vesu-position-common.ts +258 -0
- package/src/strategies/universal-adapters/vesu-supply-only-adapter.ts +18 -3
- package/src/strategies/universal-lst-muliplier-strategy.tsx +551 -405
- package/src/strategies/universal-strategy.tsx +1487 -1173
- package/src/strategies/vesu-rebalance.tsx +252 -152
- package/src/strategies/yoloVault.ts +1084 -0
- package/src/utils/cacheClass.ts +11 -2
- package/src/utils/health-factor-math.ts +33 -1
- package/src/utils/index.ts +3 -1
- package/src/utils/logger.browser.ts +22 -4
- package/src/utils/logger.node.ts +259 -24
- package/src/utils/starknet-call-parser.ts +1036 -0
- package/src/utils/strategy-utils.ts +61 -0
- package/src/modules/ExtendedWrapperSDk/index.ts +0 -62
- package/src/modules/ExtendedWrapperSDk/types.ts +0 -311
- package/src/modules/ExtendedWrapperSDk/wrapper.ts +0 -395
- package/src/strategies/universal-adapters/extended-adapter.ts +0 -661
- package/src/strategies/universal-adapters/unused-balance-adapter.ts +0 -109
- package/src/strategies/vesu-extended-strategy/services/operationService.ts +0 -34
- package/src/strategies/vesu-extended-strategy/utils/config.runtime.ts +0 -77
- package/src/strategies/vesu-extended-strategy/utils/constants.ts +0 -49
- package/src/strategies/vesu-extended-strategy/utils/helper.ts +0 -372
- package/src/strategies/vesu-extended-strategy/vesu-extended-strategy.tsx +0 -1140
|
@@ -9,10 +9,19 @@ import {
|
|
|
9
9
|
IProtocol,
|
|
10
10
|
IStrategyMetadata,
|
|
11
11
|
RiskFactor,
|
|
12
|
-
RiskType
|
|
12
|
+
RiskType,
|
|
13
|
+
StrategyTag,
|
|
14
|
+
AuditStatus,
|
|
15
|
+
SourceCodeType,
|
|
16
|
+
AccessControlType,
|
|
17
|
+
InstantWithdrawalVault,
|
|
18
|
+
StrategySettings,
|
|
19
|
+
StrategyLiveStatus,
|
|
20
|
+
VaultType,
|
|
21
|
+
UnwrapLabsCurator,
|
|
13
22
|
} from "@/interfaces";
|
|
14
23
|
import { AvnuWrapper, Pricer, SwapInfo } from "@/modules";
|
|
15
|
-
import { Account, CairoCustomEnum, Contract, num, uint256 } from "starknet";
|
|
24
|
+
import { Account, CairoCustomEnum, Contract, num, uint256, BlockIdentifier } from "starknet";
|
|
16
25
|
import VesuRebalanceAbi from "@/data/vesu-rebalance.abi.json";
|
|
17
26
|
import { Global } from "@/global";
|
|
18
27
|
import { assert } from "@/utils";
|
|
@@ -26,7 +35,7 @@ import {
|
|
|
26
35
|
SingleTokenInfo
|
|
27
36
|
} from "./base-strategy";
|
|
28
37
|
import { getAPIUsingHeadlessBrowser } from "@/node/headless";
|
|
29
|
-
import { VESU_REWARDS_ENDPOINT, VesuHarvests } from "@/modules/harvests";
|
|
38
|
+
import { VESU_REWARDS_ENDPOINT, VesuHarvests, HarvestInfo } from "@/modules/harvests";
|
|
30
39
|
import VesuPoolIDs from "@/data/vesu_pools.json";
|
|
31
40
|
import { COMMON_CONTRACTS, ENDPOINTS } from "./constants";
|
|
32
41
|
|
|
@@ -177,22 +186,26 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
177
186
|
return this.metadata.depositTokens[0].decimals; // same as underlying token
|
|
178
187
|
}
|
|
179
188
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const shares = await this.contract.balance_of(user.address);
|
|
187
|
-
const assets = await this.contract.convert_to_assets(
|
|
188
|
-
uint256.bnToUint256(shares)
|
|
189
|
+
async getUserTVL(user: ContractAddr, blockIdentifier: BlockIdentifier = "latest") {
|
|
190
|
+
const shares: any = await this.contract.call("balanceOf", [user.address], { blockIdentifier });
|
|
191
|
+
const assets: any = await this.contract.call(
|
|
192
|
+
"convert_to_assets",
|
|
193
|
+
[uint256.bnToUint256(shares)],
|
|
194
|
+
{ blockIdentifier }
|
|
189
195
|
);
|
|
190
196
|
const amount = Web3Number.fromWei(
|
|
191
197
|
assets.toString(),
|
|
192
198
|
this.metadata.depositTokens[0].decimals
|
|
193
199
|
);
|
|
200
|
+
|
|
201
|
+
// Convert blockIdentifier to block number for pricer if it's a number
|
|
202
|
+
const blockNumber = typeof blockIdentifier === 'number' || typeof blockIdentifier === 'bigint'
|
|
203
|
+
? Number(blockIdentifier)
|
|
204
|
+
: undefined;
|
|
205
|
+
|
|
194
206
|
let price = await this.pricer.getPrice(
|
|
195
|
-
this.metadata.depositTokens[0].symbol
|
|
207
|
+
this.metadata.depositTokens[0].symbol,
|
|
208
|
+
blockNumber
|
|
196
209
|
);
|
|
197
210
|
const usdValue = Number(amount.toFixed(6)) * price.price;
|
|
198
211
|
return {
|
|
@@ -202,6 +215,105 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
202
215
|
};
|
|
203
216
|
}
|
|
204
217
|
|
|
218
|
+
/**
|
|
219
|
+
* Calculates user realized APY based on trueSharesBasedAPY method.
|
|
220
|
+
* Returns the APY as a number.
|
|
221
|
+
*/
|
|
222
|
+
async getUserRealizedAPY(
|
|
223
|
+
blockIdentifier: BlockIdentifier = "latest",
|
|
224
|
+
sinceBlocks = 600000
|
|
225
|
+
): Promise<number> {
|
|
226
|
+
logger.verbose(
|
|
227
|
+
`${VesuRebalance.name}: getUserRealizedAPY => starting with blockIdentifier=${blockIdentifier}, sinceBlocks=${sinceBlocks}`
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
// Determine current block number and timestamp
|
|
231
|
+
let blockNow =
|
|
232
|
+
typeof blockIdentifier === "number" || typeof blockIdentifier === "bigint"
|
|
233
|
+
? Number(blockIdentifier)
|
|
234
|
+
: (await this.config.provider.getBlockLatestAccepted()).block_number;
|
|
235
|
+
const blockNowTime =
|
|
236
|
+
typeof blockIdentifier === "number" || typeof blockIdentifier === "bigint"
|
|
237
|
+
? (await this.config.provider.getBlockWithTxs(blockIdentifier)).timestamp
|
|
238
|
+
: new Date().getTime() / 1000;
|
|
239
|
+
|
|
240
|
+
// Look back window, but never before launch block
|
|
241
|
+
const blockBefore = Math.max(
|
|
242
|
+
blockNow - sinceBlocks,
|
|
243
|
+
this.metadata.launchBlock
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
// TVL amounts (in underlying token units) and supply at current reference block
|
|
247
|
+
const assetsNowRaw: bigint = await this.contract.call("total_assets", [], {
|
|
248
|
+
blockIdentifier,
|
|
249
|
+
}) as bigint;
|
|
250
|
+
const amountNow = Web3Number.fromWei(
|
|
251
|
+
assetsNowRaw.toString(),
|
|
252
|
+
this.metadata.depositTokens[0].decimals
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
const supplyNowRaw: bigint = await this.contract.call("total_supply", [], {
|
|
256
|
+
blockIdentifier,
|
|
257
|
+
}) as bigint;
|
|
258
|
+
const supplyNow = Web3Number.fromWei(
|
|
259
|
+
supplyNowRaw.toString(),
|
|
260
|
+
this.metadata.depositTokens[0].decimals
|
|
261
|
+
);
|
|
262
|
+
|
|
263
|
+
// Historical TVL and supply
|
|
264
|
+
const assetsBeforeRaw: bigint = await this.contract.call(
|
|
265
|
+
"total_assets",
|
|
266
|
+
[],
|
|
267
|
+
{ blockIdentifier: blockBefore }
|
|
268
|
+
) as bigint;
|
|
269
|
+
const amountBefore = Web3Number.fromWei(
|
|
270
|
+
assetsBeforeRaw.toString(),
|
|
271
|
+
this.metadata.depositTokens[0].decimals
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
const supplyBeforeRaw: bigint = await this.contract.call(
|
|
275
|
+
"total_supply",
|
|
276
|
+
[],
|
|
277
|
+
{ blockIdentifier: blockBefore }
|
|
278
|
+
) as bigint;
|
|
279
|
+
const supplyBefore = Web3Number.fromWei(
|
|
280
|
+
supplyBeforeRaw.toString(),
|
|
281
|
+
this.metadata.depositTokens[0].decimals
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
const blockBeforeInfo = await this.config.provider.getBlockWithTxs(
|
|
285
|
+
blockBefore
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
const assetsPerShareNow = amountNow
|
|
289
|
+
.multipliedBy(1e18)
|
|
290
|
+
.dividedBy(supplyNow.toString());
|
|
291
|
+
|
|
292
|
+
const assetsPerShareBf = amountBefore
|
|
293
|
+
.multipliedBy(1e18)
|
|
294
|
+
.dividedBy(supplyBefore.toString());
|
|
295
|
+
|
|
296
|
+
const timeDiffSeconds = blockNowTime - blockBeforeInfo.timestamp;
|
|
297
|
+
|
|
298
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] assetsNow: ${amountNow.toString()}`);
|
|
299
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] assetsBefore: ${amountBefore.toString()}`);
|
|
300
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] assetsPerShareNow: ${assetsPerShareNow.toString()}`);
|
|
301
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] assetsPerShareBf: ${assetsPerShareBf.toString()}`);
|
|
302
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] Supply before: ${supplyBefore.toString()}`);
|
|
303
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] Supply now: ${supplyNow.toString()}`);
|
|
304
|
+
logger.verbose(`${VesuRebalance.name}:${this.metadata.name} [getUserRealizedAPY] Time diff in seconds: ${timeDiffSeconds}`);
|
|
305
|
+
|
|
306
|
+
const apyForGivenBlocks =
|
|
307
|
+
Number(
|
|
308
|
+
assetsPerShareNow
|
|
309
|
+
.minus(assetsPerShareBf)
|
|
310
|
+
.multipliedBy(10000)
|
|
311
|
+
.dividedBy(assetsPerShareBf)
|
|
312
|
+
) / 10000;
|
|
313
|
+
|
|
314
|
+
return (apyForGivenBlocks * (365 * 24 * 3600)) / timeDiffSeconds;
|
|
315
|
+
}
|
|
316
|
+
|
|
205
317
|
/**
|
|
206
318
|
* Calculates the total TVL of the strategy.
|
|
207
319
|
* @returns Object containing the total amount in token units and USD value
|
|
@@ -224,7 +336,7 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
224
336
|
}
|
|
225
337
|
|
|
226
338
|
static async getAllPossibleVerifiedPools(asset: ContractAddr) {
|
|
227
|
-
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.
|
|
339
|
+
const data = await getAPIUsingHeadlessBrowser(`${ENDPOINTS.VESU_BASE}/pools`);
|
|
228
340
|
const verifiedPools = data.data.filter((d: any) => d.isVerified);
|
|
229
341
|
const pools = verifiedPools
|
|
230
342
|
.map((p: any) => {
|
|
@@ -490,7 +602,7 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
490
602
|
let pools: any[] = [];
|
|
491
603
|
try {
|
|
492
604
|
const data = await getAPIUsingHeadlessBrowser(
|
|
493
|
-
`${ENDPOINTS.
|
|
605
|
+
`${ENDPOINTS.VESU_BASE}/pools`
|
|
494
606
|
);
|
|
495
607
|
pools = data.data;
|
|
496
608
|
|
|
@@ -767,10 +879,17 @@ export class VesuRebalance extends BaseStrategy<
|
|
|
767
879
|
return [baseFlow];
|
|
768
880
|
}
|
|
769
881
|
|
|
770
|
-
async
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
882
|
+
async getPendingRewards(): Promise<HarvestInfo[]> {
|
|
883
|
+
const vesuHarvests = new VesuHarvests(this.config);
|
|
884
|
+
return await vesuHarvests.getUnHarvestedRewards(this.address);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
async harvest(acc: Account) {
|
|
888
|
+
const pendingRewards = await this.getPendingRewards();
|
|
889
|
+
if (pendingRewards.length == 0) {
|
|
890
|
+
throw new Error(`No pending rewards found`);
|
|
891
|
+
}
|
|
892
|
+
const harvest = pendingRewards[0];
|
|
774
893
|
const avnu = new AvnuWrapper();
|
|
775
894
|
let swapInfo: SwapInfo = {
|
|
776
895
|
token_from_address: harvest.token.address,
|
|
@@ -902,6 +1021,91 @@ const _riskFactor: RiskFactor[] = [
|
|
|
902
1021
|
const AUDIT_URL =
|
|
903
1022
|
"https://assets.troves.fi/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
|
|
904
1023
|
|
|
1024
|
+
// Helper to create common risk object
|
|
1025
|
+
const getVesuRebalanceRisk = () => ({
|
|
1026
|
+
riskFactor: _riskFactor,
|
|
1027
|
+
netRisk:
|
|
1028
|
+
_riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1029
|
+
_riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1030
|
+
notARisks: getNoRiskTags(_riskFactor)
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1033
|
+
// Helper to create Vesu Rebalance strategy settings
|
|
1034
|
+
const createVesuRebalanceSettings = (tokenSymbol: string): StrategySettings => {
|
|
1035
|
+
const depositToken = Global.getDefaultTokens().find(
|
|
1036
|
+
(t) => t.symbol === tokenSymbol
|
|
1037
|
+
)!;
|
|
1038
|
+
return {
|
|
1039
|
+
isPaused: false,
|
|
1040
|
+
liveStatus: StrategyLiveStatus.DEPRECATED,
|
|
1041
|
+
isAudited: true,
|
|
1042
|
+
isInstantWithdrawal: true,
|
|
1043
|
+
quoteToken: depositToken,
|
|
1044
|
+
alerts: []
|
|
1045
|
+
};
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
// Helper to create a Vesu Rebalance strategy
|
|
1049
|
+
const createVesuRebalanceStrategy = (
|
|
1050
|
+
idSymbol: string,
|
|
1051
|
+
name: string,
|
|
1052
|
+
tokenSymbol: string,
|
|
1053
|
+
address: string
|
|
1054
|
+
): IStrategyMetadata<VesuRebalanceSettings> => ({
|
|
1055
|
+
id: `vesu_fusion_${idSymbol.toLowerCase()}`,
|
|
1056
|
+
name,
|
|
1057
|
+
description: _description.replace("{{TOKEN}}", tokenSymbol),
|
|
1058
|
+
address: ContractAddr.from(address),
|
|
1059
|
+
launchBlock: 0,
|
|
1060
|
+
type: "ERC4626" as const,
|
|
1061
|
+
vaultType: {
|
|
1062
|
+
type: VaultType.META_VAULT,
|
|
1063
|
+
description: `Automatically diversify ${tokenSymbol} holdings into different Vesu pools while reducing risk and maximizing yield. Defi spring ${tokenSymbol} Rewards are auto-compounded as well.`
|
|
1064
|
+
},
|
|
1065
|
+
depositTokens: [
|
|
1066
|
+
Global.getDefaultTokens().find((t) => t.symbol === tokenSymbol)!
|
|
1067
|
+
],
|
|
1068
|
+
protocols: [_protocol],
|
|
1069
|
+
auditUrl: AUDIT_URL,
|
|
1070
|
+
curator: UnwrapLabsCurator,
|
|
1071
|
+
settings: createVesuRebalanceSettings(tokenSymbol),
|
|
1072
|
+
risk: getVesuRebalanceRisk(),
|
|
1073
|
+
additionalInfo: {
|
|
1074
|
+
feeBps: 1000
|
|
1075
|
+
},
|
|
1076
|
+
faqs,
|
|
1077
|
+
contractDetails: [],
|
|
1078
|
+
investmentSteps: [],
|
|
1079
|
+
tags: [],
|
|
1080
|
+
security: VESU_SECURITY,
|
|
1081
|
+
redemptionInfo: VESU_REDEMPTION_INFO,
|
|
1082
|
+
discontinuationInfo: {
|
|
1083
|
+
info: "This strategy has been deprecated and is no longer accepting new deposits."
|
|
1084
|
+
},
|
|
1085
|
+
usualTimeToEarnings: null,
|
|
1086
|
+
usualTimeToEarningsDescription: null,
|
|
1087
|
+
});
|
|
1088
|
+
|
|
1089
|
+
// Shared security & redemption metadata for all Vesu strategies
|
|
1090
|
+
const VESU_SECURITY = {
|
|
1091
|
+
auditStatus: AuditStatus.AUDITED,
|
|
1092
|
+
sourceCode: {
|
|
1093
|
+
type: SourceCodeType.OPEN_SOURCE,
|
|
1094
|
+
contractLink: "https://github.com/trovesfi/troves-contracts",
|
|
1095
|
+
},
|
|
1096
|
+
accessControl: {
|
|
1097
|
+
type: AccessControlType.ROLE_BASED_ACCESS,
|
|
1098
|
+
addresses: [ContractAddr.from("0x0")],
|
|
1099
|
+
timeLock: "2 Days",
|
|
1100
|
+
},
|
|
1101
|
+
};
|
|
1102
|
+
|
|
1103
|
+
const VESU_REDEMPTION_INFO = {
|
|
1104
|
+
instantWithdrawalVault: InstantWithdrawalVault.YES,
|
|
1105
|
+
redemptionsInfo: [],
|
|
1106
|
+
alerts: [],
|
|
1107
|
+
};
|
|
1108
|
+
|
|
905
1109
|
const faqs: FAQ[] = [
|
|
906
1110
|
{
|
|
907
1111
|
question: "What is the Vesu Rebalancing Strategy?",
|
|
@@ -953,137 +1157,32 @@ const faqs: FAQ[] = [
|
|
|
953
1157
|
* Represents the Vesu Rebalance Strategies.
|
|
954
1158
|
*/
|
|
955
1159
|
export const VesuRebalanceStrategies: IStrategyMetadata<VesuRebalanceSettings>[] =
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
contractDetails: [],
|
|
983
|
-
investmentSteps: []
|
|
984
|
-
},
|
|
985
|
-
{
|
|
986
|
-
name: "Vesu Fusion ETH",
|
|
987
|
-
description: _description.replace("{{TOKEN}}", "ETH"),
|
|
988
|
-
address: ContractAddr.from(
|
|
989
|
-
"0x5eaf5ee75231cecf79921ff8ded4b5ffe96be718bcb3daf206690ad1a9ad0ca"
|
|
990
|
-
),
|
|
991
|
-
launchBlock: 0,
|
|
992
|
-
type: "ERC4626",
|
|
993
|
-
auditUrl: AUDIT_URL,
|
|
994
|
-
depositTokens: [
|
|
995
|
-
Global.getDefaultTokens().find((t) => t.symbol === "ETH")!
|
|
996
|
-
],
|
|
997
|
-
protocols: [_protocol],
|
|
998
|
-
maxTVL: Web3Number.fromWei("0", 18),
|
|
999
|
-
risk: {
|
|
1000
|
-
riskFactor: _riskFactor,
|
|
1001
|
-
netRisk:
|
|
1002
|
-
_riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1003
|
-
_riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1004
|
-
notARisks: getNoRiskTags(_riskFactor)
|
|
1005
|
-
},
|
|
1006
|
-
additionalInfo: {
|
|
1007
|
-
feeBps: 1000
|
|
1008
|
-
},
|
|
1009
|
-
faqs,
|
|
1010
|
-
contractDetails: [],
|
|
1011
|
-
investmentSteps: []
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
name: "Vesu Fusion USDC",
|
|
1015
|
-
description: _description.replace("{{TOKEN}}", "USDC"),
|
|
1016
|
-
address: ContractAddr.from(
|
|
1017
|
-
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
1018
|
-
),
|
|
1019
|
-
launchBlock: 0,
|
|
1020
|
-
type: "ERC4626",
|
|
1021
|
-
auditUrl: AUDIT_URL,
|
|
1022
|
-
depositTokens: [
|
|
1023
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDC")!
|
|
1024
|
-
],
|
|
1025
|
-
protocols: [_protocol],
|
|
1026
|
-
maxTVL: Web3Number.fromWei("0", 6),
|
|
1027
|
-
risk: {
|
|
1028
|
-
riskFactor: _riskFactor,
|
|
1029
|
-
netRisk:
|
|
1030
|
-
_riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1031
|
-
_riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1032
|
-
notARisks: getNoRiskTags(_riskFactor)
|
|
1033
|
-
},
|
|
1034
|
-
additionalInfo: {
|
|
1035
|
-
feeBps: 1000
|
|
1036
|
-
},
|
|
1037
|
-
faqs,
|
|
1038
|
-
contractDetails: [],
|
|
1039
|
-
investmentSteps: []
|
|
1040
|
-
},
|
|
1041
|
-
{
|
|
1042
|
-
name: "Vesu Fusion USDT",
|
|
1043
|
-
description: _description.replace("{{TOKEN}}", "USDT"),
|
|
1044
|
-
address: ContractAddr.from(
|
|
1045
|
-
"0x115e94e722cfc4c77a2f15c4aefb0928c1c0029e5a57570df24c650cb7cec2c"
|
|
1046
|
-
),
|
|
1047
|
-
launchBlock: 0,
|
|
1048
|
-
type: "ERC4626",
|
|
1049
|
-
depositTokens: [
|
|
1050
|
-
Global.getDefaultTokens().find((t) => t.symbol === "USDT")!
|
|
1051
|
-
],
|
|
1052
|
-
auditUrl: AUDIT_URL,
|
|
1053
|
-
protocols: [_protocol],
|
|
1054
|
-
maxTVL: Web3Number.fromWei("0", 6),
|
|
1055
|
-
risk: {
|
|
1056
|
-
riskFactor: _riskFactor,
|
|
1057
|
-
netRisk:
|
|
1058
|
-
_riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) /
|
|
1059
|
-
_riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1060
|
-
notARisks: getNoRiskTags(_riskFactor)
|
|
1061
|
-
},
|
|
1062
|
-
additionalInfo: {
|
|
1063
|
-
feeBps: 1000
|
|
1064
|
-
},
|
|
1065
|
-
faqs,
|
|
1066
|
-
contractDetails: [],
|
|
1067
|
-
investmentSteps: []
|
|
1068
|
-
// }, {
|
|
1069
|
-
// name: 'Vesu Fusion WBTC',
|
|
1070
|
-
// description: _description.replace('{{TOKEN}}', 'WBTC'),
|
|
1071
|
-
// address: ContractAddr.from('0x778007f8136a5b827325d21613803e796bda4d676fbe1e34aeab0b2a2ec027f'),
|
|
1072
|
-
// type: 'ERC4626',
|
|
1073
|
-
// depositTokens: [Global.getDefaultTokens().find(t => t.symbol === 'WBTC')!],
|
|
1074
|
-
// auditUrl: AUDIT_URL,
|
|
1075
|
-
// protocols: [_protocol],
|
|
1076
|
-
// maxTVL: Web3Number.fromWei('0', 8),
|
|
1077
|
-
// risk: {
|
|
1078
|
-
// riskFactor: _riskFactor,
|
|
1079
|
-
// netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
|
|
1080
|
-
// },
|
|
1081
|
-
// additionalInfo: {
|
|
1082
|
-
// feeBps: 1000,
|
|
1083
|
-
// },
|
|
1084
|
-
|
|
1085
|
-
}
|
|
1086
|
-
];
|
|
1160
|
+
[
|
|
1161
|
+
createVesuRebalanceStrategy(
|
|
1162
|
+
'strk',
|
|
1163
|
+
"Vesu Fusion STRK",
|
|
1164
|
+
"STRK",
|
|
1165
|
+
"0x7fb5bcb8525954a60fde4e8fb8220477696ce7117ef264775a1770e23571929"
|
|
1166
|
+
),
|
|
1167
|
+
createVesuRebalanceStrategy(
|
|
1168
|
+
'eth',
|
|
1169
|
+
"Vesu Fusion ETH",
|
|
1170
|
+
"ETH",
|
|
1171
|
+
"0x5eaf5ee75231cecf79921ff8ded4b5ffe96be718bcb3daf206690ad1a9ad0ca"
|
|
1172
|
+
),
|
|
1173
|
+
createVesuRebalanceStrategy(
|
|
1174
|
+
'usdc',
|
|
1175
|
+
"Vesu Fusion USDC.e",
|
|
1176
|
+
"USDC.e",
|
|
1177
|
+
"0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
|
|
1178
|
+
),
|
|
1179
|
+
createVesuRebalanceStrategy(
|
|
1180
|
+
'usdt',
|
|
1181
|
+
"Vesu Fusion USDT",
|
|
1182
|
+
"USDT",
|
|
1183
|
+
"0x115e94e722cfc4c77a2f15c4aefb0928c1c0029e5a57570df24c650cb7cec2c"
|
|
1184
|
+
)
|
|
1185
|
+
];
|
|
1087
1186
|
|
|
1088
1187
|
// auto assign contract details to each strategy
|
|
1089
1188
|
VesuRebalanceStrategies.forEach((s) => {
|
|
@@ -1092,7 +1191,7 @@ VesuRebalanceStrategies.forEach((s) => {
|
|
|
1092
1191
|
address: s.address,
|
|
1093
1192
|
name: "Vault",
|
|
1094
1193
|
sourceCodeUrl: "https://github.com/strkfarm/strkfarm-contracts/tree/main/src/strategies/vesu_rebalance"
|
|
1095
|
-
},
|
|
1194
|
+
},
|
|
1096
1195
|
...COMMON_CONTRACTS];
|
|
1097
1196
|
// set docs link
|
|
1098
1197
|
s.docs = "https://docs.troves.fi/p/strategies/vesu-fusion-rebalancing-vaults"
|
|
@@ -1115,4 +1214,5 @@ VesuRebalanceStrategies.forEach((s) => {
|
|
|
1115
1214
|
"Monitor and Rebalance funds across multiple Vesu pools to maximize yield",
|
|
1116
1215
|
"Harvest and supply Defi Spring STRK rewards every week (Auto-compound)",
|
|
1117
1216
|
]
|
|
1118
|
-
|
|
1217
|
+
|
|
1218
|
+
});
|