@strkfarm/sdk 2.0.0-staging.15 → 2.0.0-staging.18
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 +85 -59
- package/dist/index.browser.mjs +85 -59
- package/dist/index.d.ts +25 -3
- package/dist/index.js +86 -59
- package/dist/index.mjs +85 -59
- package/package.json +1 -1
- package/src/interfaces/common.tsx +2 -0
- package/src/strategies/ekubo-cl-vault.tsx +2 -0
- package/src/strategies/sensei.ts +2 -0
- package/src/strategies/universal-adapters/vesu-adapter.ts +21 -2
- package/src/strategies/universal-lst-muliplier-strategy.tsx +57 -61
- package/src/strategies/universal-strategy.tsx +4 -2
- package/src/strategies/vesu-rebalance.tsx +2 -0
package/dist/index.d.ts
CHANGED
|
@@ -259,6 +259,8 @@ interface IStrategyMetadata<T> {
|
|
|
259
259
|
tags?: StrategyTag[];
|
|
260
260
|
security: SecurityMetadata;
|
|
261
261
|
redemptionInfo: RedemptionInfo;
|
|
262
|
+
usualTimeToEarnings: null | string;
|
|
263
|
+
usualTimeToEarningsDescription: null | string;
|
|
262
264
|
settings?: StrategySettings;
|
|
263
265
|
actions?: Array<{
|
|
264
266
|
name?: string;
|
|
@@ -1366,6 +1368,24 @@ declare const VesuPools: {
|
|
|
1366
1368
|
Re7xSTRK: ContractAddr;
|
|
1367
1369
|
Re7xBTC: ContractAddr;
|
|
1368
1370
|
Prime: ContractAddr;
|
|
1371
|
+
Re7STRK: ContractAddr;
|
|
1372
|
+
};
|
|
1373
|
+
declare const VesuPoolMetadata: {
|
|
1374
|
+
[VesuPools.Genesis.address]: {
|
|
1375
|
+
name: string;
|
|
1376
|
+
};
|
|
1377
|
+
[VesuPools.Re7xSTRK.address]: {
|
|
1378
|
+
name: string;
|
|
1379
|
+
};
|
|
1380
|
+
[VesuPools.Re7xBTC.address]: {
|
|
1381
|
+
name: string;
|
|
1382
|
+
};
|
|
1383
|
+
[VesuPools.Prime.address]: {
|
|
1384
|
+
name: string;
|
|
1385
|
+
};
|
|
1386
|
+
[VesuPools.Re7STRK.address]: {
|
|
1387
|
+
name: string;
|
|
1388
|
+
};
|
|
1369
1389
|
};
|
|
1370
1390
|
declare const extensionMap: {
|
|
1371
1391
|
[key: string]: ContractAddr;
|
|
@@ -1639,10 +1659,12 @@ declare function getContractDetails(settings: UniversalStrategySettings): {
|
|
|
1639
1659
|
declare const UniversalStrategies: IStrategyMetadata<UniversalStrategySettings>[];
|
|
1640
1660
|
|
|
1641
1661
|
interface HyperLSTStrategySettings extends UniversalStrategySettings {
|
|
1642
|
-
borrowable_assets:
|
|
1662
|
+
borrowable_assets: {
|
|
1663
|
+
token: TokenInfo;
|
|
1664
|
+
poolId: ContractAddr;
|
|
1665
|
+
}[];
|
|
1643
1666
|
underlyingToken: TokenInfo;
|
|
1644
1667
|
defaultPoolId: ContractAddr;
|
|
1645
|
-
altSupportedPoolIds: ContractAddr[];
|
|
1646
1668
|
}
|
|
1647
1669
|
declare class UniversalLstMultiplierStrategy extends UniversalStrategy<HyperLSTStrategySettings> {
|
|
1648
1670
|
private quoteAmountToFetchPrice;
|
|
@@ -2111,4 +2133,4 @@ declare class PasswordJsonCryptoUtil {
|
|
|
2111
2133
|
decrypt(encryptedData: string, password: string): any;
|
|
2112
2134
|
}
|
|
2113
2135
|
|
|
2114
|
-
export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, InstantWithdrawalVault, LSTAPRService, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyCapabilities, type StrategyFilterMetadata, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VaultType, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getAllStrategyTags, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTagDesciption, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };
|
|
2136
|
+
export { APYType, AUMTypes, AVNU_EXCHANGE, AVNU_MIDDLEWARE, type AccessControlInfo, AccessControlType, type AccountInfo, type AdapterLeafType, type AllAccountsStore, type AmountInfo, type AmountsInfo, type ApproveCallParams, AuditStatus, AutoCompounderSTRK, type AvnuSwapCallParams, AvnuWrapper, BaseAdapter, type BaseAdapterConfig, BaseStrategy, type CLVaultStrategySettings, CommonAdapter, type CommonAdapterConfig, ContractAddr, type DecreaseLeverParams, Deployer, type DualActionAmount, type DualTokenInfo, ERC20, type EkuboBounds, EkuboCLVault, EkuboCLVaultStrategies, type EkuboPoolKey, type EkuboQuote, EkuboQuoter, type EkuboRouteNode, type EkuboSplit, type FAQ, FactoryStrategyType, FatalError, type FilterOption, type FlashloanCallParams, FlowChartColors, type GenerateCallFn, Global, HyperLSTStrategies, type HyperLSTStrategySettings, type IConfig, type IInvestmentFlow, ILending, type ILendingMetadata, type ILendingPosition, type IProtocol, type IStrategyMetadata, type IncreaseLeverParams, Initializable, InstantWithdrawalVault, LSTAPRService, type LSTStats, type LeafAdapterFn, type LeafData, type LendingToken, type ManageCall, MarginType, MyNumber, type NetAPYDetails, type NetAPYSplit, Network, PRICE_ROUTER, PasswordJsonCryptoUtil, type PositionAPY, type PositionInfo, Pragma, type PriceInfo, Pricer, PricerFromApi, PricerLST, PricerRedis, Protocols, type RedemptionInfo, type RequiredFields, type RequiredKeys, type RequiredStoreConfig, type RiskFactor, RiskType, type Route, type RouteNode, SIMPLE_SANITIZER, SIMPLE_SANITIZER_V2, SIMPLE_SANITIZER_VESU_V1_DELEGATIONS, type SecurityMetadata, SenseiStrategies, SenseiVault, type SenseiVaultSettings, type SingleActionAmount, type SingleTokenInfo, type SourceCodeInfo, SourceCodeType, StandardMerkleTree, type StandardMerkleTreeData, Store, type StoreConfig, type StrategyAlert, type StrategyCapabilities, type StrategyFilterMetadata, StrategyLiveStatus, type StrategyMetadata, type StrategyRegistryEntry, type StrategySettings, StrategyTag, StrategyType, type SupportedPosition, type Swap, type SwapInfo, TelegramGroupNotif, TelegramNotif, type TokenAmount, type TokenInfo, UNIVERSAL_ADAPTERS, UNIVERSAL_MANAGE_IDS, UniversalLstMultiplierStrategy, type UniversalManageCall, UniversalStrategies, UniversalStrategy, type UniversalStrategySettings, VESU_SINGLETON, VESU_V2_MODIFY_POSITION_SANITIZER, type VaultPosition, VaultType, VesuAdapter, type VesuAdapterConfig, type VesuAmount, VesuAmountDenomination, VesuAmountType, type VesuDefiSpringRewardsCallParams, type VesuModifyDelegationCallParams, type VesuModifyPositionCallParams, type VesuMultiplyCallParams, VesuPoolMetadata, VesuPools, VesuRebalance, type VesuRebalanceSettings, VesuRebalanceStrategies, Web3Number, ZkLend, assert, buildStrategyRegistry, createEkuboCLStrategy, createHyperLSTStrategy, createSenseiStrategy, createStrategy, createUniversalStrategy, createVesuRebalanceStrategy, detectCapabilities, extensionMap, getAPIUsingHeadlessBrowser, getAllStrategyMetadata, getAllStrategyTags, getContractDetails, getDefaultStoreConfig, getFilterMetadata, getLiveStrategies, getMainnetConfig, getNoRiskTags, getRiskColor, getRiskExplaination, getStrategiesByType, getStrategyTagDesciption, getStrategyTypeFromMetadata, getTrovesEndpoint, getVesuSingletonAddress, highlightTextWithLinks, type i257, isDualTokenStrategy, logger, toAmountsInfo, toBigInt };
|
package/dist/index.js
CHANGED
|
@@ -92,6 +92,7 @@ __export(index_exports, {
|
|
|
92
92
|
VesuAdapter: () => VesuAdapter,
|
|
93
93
|
VesuAmountDenomination: () => VesuAmountDenomination,
|
|
94
94
|
VesuAmountType: () => VesuAmountType,
|
|
95
|
+
VesuPoolMetadata: () => VesuPoolMetadata,
|
|
95
96
|
VesuPools: () => VesuPools,
|
|
96
97
|
VesuRebalance: () => VesuRebalance,
|
|
97
98
|
VesuRebalanceStrategies: () => VesuRebalanceStrategies,
|
|
@@ -11216,7 +11217,9 @@ var createVesuRebalanceStrategy = (idSymbol, name, tokenSymbol, address) => ({
|
|
|
11216
11217
|
investmentSteps: [],
|
|
11217
11218
|
tags: [],
|
|
11218
11219
|
security: VESU_SECURITY,
|
|
11219
|
-
redemptionInfo: VESU_REDEMPTION_INFO
|
|
11220
|
+
redemptionInfo: VESU_REDEMPTION_INFO,
|
|
11221
|
+
usualTimeToEarnings: null,
|
|
11222
|
+
usualTimeToEarningsDescription: null
|
|
11220
11223
|
});
|
|
11221
11224
|
var VESU_SECURITY = {
|
|
11222
11225
|
auditStatus: "Audited" /* AUDITED */,
|
|
@@ -17989,7 +17992,9 @@ var xSTRKSTRK = {
|
|
|
17989
17992
|
instantWithdrawalVault: "Yes" /* YES */,
|
|
17990
17993
|
redemptionsInfo: [],
|
|
17991
17994
|
alerts: []
|
|
17992
|
-
}
|
|
17995
|
+
},
|
|
17996
|
+
usualTimeToEarnings: null,
|
|
17997
|
+
usualTimeToEarningsDescription: null
|
|
17993
17998
|
};
|
|
17994
17999
|
var getLSTAlerts = () => [
|
|
17995
18000
|
{
|
|
@@ -27512,7 +27517,25 @@ var VesuPools = {
|
|
|
27512
27517
|
Genesis: ContractAddr.from("0x4dc4f0ca6ea4961e4c8373265bfd5317678f4fe374d76f3fd7135f57763bf28"),
|
|
27513
27518
|
Re7xSTRK: ContractAddr.from("0x052fb52363939c3aa848f8f4ac28f0a51379f8d1b971d8444de25fbd77d8f161"),
|
|
27514
27519
|
Re7xBTC: ContractAddr.from("0x3a8416bf20d036df5b1cf3447630a2e1cb04685f6b0c3a70ed7fb1473548ecf"),
|
|
27515
|
-
Prime: ContractAddr.from("0x451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5")
|
|
27520
|
+
Prime: ContractAddr.from("0x451fe483d5921a2919ddd81d0de6696669bccdacd859f72a4fba7656b97c3b5"),
|
|
27521
|
+
Re7STRK: ContractAddr.from("0x01fcdacc1d8184eca7b472b5acbaf1500cec9d5683ca95fede8128b46c8f9cc2")
|
|
27522
|
+
};
|
|
27523
|
+
var VesuPoolMetadata = {
|
|
27524
|
+
[VesuPools.Genesis.address]: {
|
|
27525
|
+
name: "Genesis"
|
|
27526
|
+
},
|
|
27527
|
+
[VesuPools.Re7xSTRK.address]: {
|
|
27528
|
+
name: "Re7 xSTRK"
|
|
27529
|
+
},
|
|
27530
|
+
[VesuPools.Re7xBTC.address]: {
|
|
27531
|
+
name: "Re7 xBTC"
|
|
27532
|
+
},
|
|
27533
|
+
[VesuPools.Prime.address]: {
|
|
27534
|
+
name: "Prime"
|
|
27535
|
+
},
|
|
27536
|
+
[VesuPools.Re7STRK.address]: {
|
|
27537
|
+
name: "Re7 STRK"
|
|
27538
|
+
}
|
|
27516
27539
|
};
|
|
27517
27540
|
var extensionMap = {};
|
|
27518
27541
|
extensionMap[VesuPools.Re7xSTRK.address] = ContractAddr.from("0x04e06e04b8d624d039aa1c3ca8e0aa9e21dc1ccba1d88d0d650837159e0ee054");
|
|
@@ -27897,12 +27920,12 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
27897
27920
|
amount: collateralAmount,
|
|
27898
27921
|
token: this.config.collateral,
|
|
27899
27922
|
usdValue: collateralAmount.multipliedBy(token1Price.price).toNumber(),
|
|
27900
|
-
remarks:
|
|
27923
|
+
remarks: `Collateral - ${VesuPoolMetadata[this.config.poolId.address].name} pool`
|
|
27901
27924
|
}, {
|
|
27902
27925
|
amount: debtAmount,
|
|
27903
27926
|
token: this.config.debt,
|
|
27904
27927
|
usdValue: debtAmount.multipliedBy(token2Price.price).toNumber(),
|
|
27905
|
-
remarks:
|
|
27928
|
+
remarks: `Debt - ${VesuPoolMetadata[this.config.poolId.address].name} pool`
|
|
27906
27929
|
}];
|
|
27907
27930
|
this.setCache(CACHE_KEY, value, 6e4);
|
|
27908
27931
|
return value;
|
|
@@ -28573,6 +28596,8 @@ var SenseiStrategies = [
|
|
|
28573
28596
|
redemptionsInfo: [],
|
|
28574
28597
|
alerts: []
|
|
28575
28598
|
},
|
|
28599
|
+
usualTimeToEarnings: "2 weeks",
|
|
28600
|
+
usualTimeToEarningsDescription: "Strategy returns depend on LST price on DEXes. Even though the true price of LST on Endur increases continuously, the DEX price may lag sometimes, and historically is seen to rebase at least once every 2 hours. This is when you realise your earnings.",
|
|
28576
28601
|
points: [{
|
|
28577
28602
|
multiplier: 4,
|
|
28578
28603
|
logo: "https://endur.fi/favicon.ico",
|
|
@@ -31969,7 +31994,7 @@ var EVERGREEN_SECURITY = {
|
|
|
31969
31994
|
var EVERGREEN_REDEMPTION_INFO = {
|
|
31970
31995
|
instantWithdrawalVault: "No" /* NO */,
|
|
31971
31996
|
redemptionsInfo: [{
|
|
31972
|
-
title: "
|
|
31997
|
+
title: "Typical Duration",
|
|
31973
31998
|
description: "1-2 hours"
|
|
31974
31999
|
}],
|
|
31975
32000
|
alerts: [{
|
|
@@ -32012,7 +32037,9 @@ var createUniversalStrategy = (params) => ({
|
|
|
32012
32037
|
investmentSteps,
|
|
32013
32038
|
tags: params.tags,
|
|
32014
32039
|
security: EVERGREEN_SECURITY,
|
|
32015
|
-
redemptionInfo: EVERGREEN_REDEMPTION_INFO
|
|
32040
|
+
redemptionInfo: EVERGREEN_REDEMPTION_INFO,
|
|
32041
|
+
usualTimeToEarnings: null,
|
|
32042
|
+
usualTimeToEarningsDescription: null
|
|
32016
32043
|
});
|
|
32017
32044
|
var UniversalStrategies = [
|
|
32018
32045
|
createUniversalStrategy({
|
|
@@ -32135,20 +32162,19 @@ var UniversalLstMultiplierStrategy = class _UniversalLstMultiplierStrategy exten
|
|
|
32135
32162
|
// todo support lending assets of underlying as well (like if xSTRK looping is not viable, simply supply STRK)
|
|
32136
32163
|
getVesuAdapters() {
|
|
32137
32164
|
const adapters = [];
|
|
32138
|
-
for (const
|
|
32139
|
-
const
|
|
32140
|
-
|
|
32141
|
-
|
|
32142
|
-
|
|
32143
|
-
|
|
32144
|
-
|
|
32145
|
-
|
|
32146
|
-
|
|
32147
|
-
|
|
32148
|
-
|
|
32149
|
-
|
|
32150
|
-
|
|
32151
|
-
}
|
|
32165
|
+
for (const borrowableInfo of this.metadata.additionalInfo.borrowable_assets) {
|
|
32166
|
+
const asset = borrowableInfo.token;
|
|
32167
|
+
const poolId = borrowableInfo.poolId;
|
|
32168
|
+
const vesuAdapter1 = new VesuAdapter({
|
|
32169
|
+
poolId,
|
|
32170
|
+
collateral: this.asset(),
|
|
32171
|
+
debt: asset,
|
|
32172
|
+
vaultAllocator: this.metadata.additionalInfo.vaultAllocator,
|
|
32173
|
+
id: ""
|
|
32174
|
+
});
|
|
32175
|
+
vesuAdapter1.pricer = this.pricer;
|
|
32176
|
+
vesuAdapter1.networkConfig = this.config;
|
|
32177
|
+
adapters.push(vesuAdapter1);
|
|
32152
32178
|
}
|
|
32153
32179
|
return adapters;
|
|
32154
32180
|
}
|
|
@@ -32774,7 +32800,7 @@ function addVesuLeaves(poolId, lstSymbol, underlyingSymbol, vaultSettings, commo
|
|
|
32774
32800
|
id: getVesuLegId("vesu_leg1" /* VESU_LEG1 */, underlyingToken.symbol, poolId.toString()),
|
|
32775
32801
|
adapter: vesuAdapterLST
|
|
32776
32802
|
}]);
|
|
32777
|
-
const { isV2, addr:
|
|
32803
|
+
const { isV2, addr: poolAddr } = getVesuSingletonAddress(poolId);
|
|
32778
32804
|
const VESU_MULTIPLY = isV2 ? vesuAdapterLST.VESU_MULTIPLY : vesuAdapterLST.VESU_MULTIPLY_V1;
|
|
32779
32805
|
const leafIdApprove = getVesuGenericLegId(poolId.toString(), "multiple_approve" /* MULTIPLE_APPROVE */);
|
|
32780
32806
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, VESU_MULTIPLY, leafIdApprove).bind(commonAdapter));
|
|
@@ -32784,9 +32810,11 @@ function addVesuLeaves(poolId, lstSymbol, underlyingSymbol, vaultSettings, commo
|
|
|
32784
32810
|
vaultSettings.leafAdapters.push(vesuAdapterLST.getVesuModifyDelegationAdapter(leafIdDelegationOff).bind(vesuAdapterLST));
|
|
32785
32811
|
const multiplID = getVesuLegId("multiply_vesu" /* MULTIPLY_VESU */, underlyingToken.symbol, poolId.toString());
|
|
32786
32812
|
vaultSettings.leafAdapters.push(vesuAdapterLST.getMultiplyAdapter(multiplID).bind(vesuAdapterLST));
|
|
32813
|
+
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, poolAddr, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
|
|
32814
|
+
vaultSettings.leafAdapters.push(vesuAdapterLST.getModifyPosition.bind(vesuAdapterLST));
|
|
32787
32815
|
return vesuAdapterLST;
|
|
32788
32816
|
}
|
|
32789
|
-
function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, defaultPoolId
|
|
32817
|
+
function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, defaultPoolId) {
|
|
32790
32818
|
vaultSettings.leafAdapters = [];
|
|
32791
32819
|
const pool1 = vaultSettings.defaultPoolId;
|
|
32792
32820
|
if (!pool1.eq(defaultPoolId)) {
|
|
@@ -32805,10 +32833,11 @@ function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, defaultP
|
|
|
32805
32833
|
id: "common_adapter" /* COMMON */,
|
|
32806
32834
|
adapter: commonAdapter
|
|
32807
32835
|
}]);
|
|
32808
|
-
|
|
32809
|
-
altSupportedPoolIds.map((poolId) => addVesuLeaves(poolId, lstSymbol, underlyingSymbol, vaultSettings, commonAdapter));
|
|
32836
|
+
vaultSettings.borrowable_assets.map((borrowableAsset) => addVesuLeaves(borrowableAsset.poolId, lstSymbol, underlyingSymbol, vaultSettings, commonAdapter));
|
|
32810
32837
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, AVNU_EXCHANGE, "avnu_mul_approve_withdr" /* AVNU_MULTIPLY_APPROVE_WITHDRAW */).bind(commonAdapter));
|
|
32811
|
-
|
|
32838
|
+
const uniqueBorrowableAssets = [...new Set(vaultSettings.borrowable_assets.map((borrowableAsset) => borrowableAsset.token.symbol))];
|
|
32839
|
+
for (let borrowableAssetSymbol of uniqueBorrowableAssets) {
|
|
32840
|
+
const borrowableAsset = Global.getDefaultTokens().find((token) => token.symbol === borrowableAssetSymbol);
|
|
32812
32841
|
const debtAsset = borrowableAsset;
|
|
32813
32842
|
const approve_debt_token_id = getAvnuManageIDs("avnu_mul_approve_dep" /* AVNU_MULTIPLY_APPROVE_DEPOSIT */, debtAsset.symbol);
|
|
32814
32843
|
const swap_debt_token_id = getAvnuManageIDs("avnu_mul_swap_dep" /* AVNU_MULTIPLY_SWAP_DEPOSIT */, debtAsset.symbol);
|
|
@@ -32816,23 +32845,9 @@ function getLooperSettings2(lstSymbol, underlyingSymbol, vaultSettings, defaultP
|
|
|
32816
32845
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(debtAsset.address, AVNU_EXCHANGE, approve_debt_token_id).bind(commonAdapter));
|
|
32817
32846
|
vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(debtAsset.address, lstToken.address, swap_debt_token_id, false).bind(commonAdapter));
|
|
32818
32847
|
vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(lstToken.address, debtAsset.address, swap_lst_token_id, false).bind(commonAdapter));
|
|
32819
|
-
const vesuAdapter = new VesuAdapter({
|
|
32820
|
-
poolId: pool1,
|
|
32821
|
-
collateral: lstToken,
|
|
32822
|
-
debt: debtAsset,
|
|
32823
|
-
vaultAllocator: vaultSettings.vaultAllocator,
|
|
32824
|
-
id: getVesuLegId("vesu_leg1" /* VESU_LEG1 */, debtAsset.symbol, pool1.toString())
|
|
32825
|
-
});
|
|
32826
|
-
const { isV2, addr: poolAddr } = getVesuSingletonAddress(pool1);
|
|
32827
|
-
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, poolAddr, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
|
|
32828
|
-
vaultSettings.leafAdapters.push(vesuAdapter.getModifyPosition.bind(vesuAdapter));
|
|
32829
|
-
if (borrowableAsset.address.eq(underlyingToken.address)) {
|
|
32830
|
-
continue;
|
|
32831
|
-
}
|
|
32832
32848
|
}
|
|
32833
32849
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(lstToken.address, vaultSettings.vaultAddress, "approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */).bind(commonAdapter));
|
|
32834
32850
|
vaultSettings.leafAdapters.push(commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter));
|
|
32835
|
-
vaultSettings.leafAdapters.push(vesuAdapterLST.getDefispringRewardsAdapter("defispring_rewards" /* DEFISPRING_REWARDS */).bind(vesuAdapterLST));
|
|
32836
32851
|
const STRKToken = Global.getDefaultTokens().find((token) => token.symbol === "STRK");
|
|
32837
32852
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(STRKToken.address, AVNU_EXCHANGE, "approve_swap_token1" /* APPROVE_SWAP_TOKEN1 */).bind(commonAdapter));
|
|
32838
32853
|
vaultSettings.leafAdapters.push(commonAdapter.getAvnuAdapter(STRKToken.address, lstToken.address, "avnu_swap_rewards" /* AVNU_SWAP_REWARDS */, false).bind(commonAdapter));
|
|
@@ -32891,7 +32906,7 @@ var _riskFactor4 = [
|
|
|
32891
32906
|
{ type: "Technical Risk" /* TECHNICAL_RISK */, value: 1 /* STABLE_INFRASTRUCTURE */, weight: 25, reason: "Liquidation can only happen if vault is left un-monitored for weeks, which is highly unlikely. We actively monitor all services on a daily basis." },
|
|
32892
32907
|
{ type: "Depeg Risk" /* DEPEG_RISK */, value: 2 /* GENERALLY_STABLE */, weight: 25, reason: "Generally stable pegged assets" }
|
|
32893
32908
|
];
|
|
32894
|
-
var
|
|
32909
|
+
var btcBorrowableAssets = [
|
|
32895
32910
|
"WBTC",
|
|
32896
32911
|
"tBTC",
|
|
32897
32912
|
"LBTC",
|
|
@@ -32907,10 +32922,12 @@ var hyperxSTRK = {
|
|
|
32907
32922
|
adapters: [],
|
|
32908
32923
|
targetHealthFactor: 1.1,
|
|
32909
32924
|
minHealthFactor: 1.05,
|
|
32910
|
-
borrowable_assets:
|
|
32925
|
+
borrowable_assets: [
|
|
32926
|
+
...Global.getDefaultTokens().filter((token) => token.symbol === "STRK").map((token) => ({ token, poolId: VesuPools.Re7xSTRK })),
|
|
32927
|
+
...Global.getDefaultTokens().filter((token) => token.symbol === "STRK").map((token) => ({ token, poolId: VesuPools.Prime }))
|
|
32928
|
+
],
|
|
32911
32929
|
underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "STRK"),
|
|
32912
|
-
defaultPoolId: VesuPools.Re7xSTRK
|
|
32913
|
-
altSupportedPoolIds: [VesuPools.Prime]
|
|
32930
|
+
defaultPoolId: VesuPools.Re7xSTRK
|
|
32914
32931
|
};
|
|
32915
32932
|
var hyperxWBTC = {
|
|
32916
32933
|
vaultAddress: ContractAddr.from("0x2da9d0f96a46b453f55604313785dc866424240b1c6811d13bef594343db818"),
|
|
@@ -32922,10 +32939,14 @@ var hyperxWBTC = {
|
|
|
32922
32939
|
adapters: [],
|
|
32923
32940
|
targetHealthFactor: 1.1,
|
|
32924
32941
|
minHealthFactor: 1.05,
|
|
32925
|
-
borrowable_assets:
|
|
32942
|
+
borrowable_assets: [
|
|
32943
|
+
// allow all BTC flavours borrowing on Re7xBTC pool
|
|
32944
|
+
...btcBorrowableAssets.map((asset) => Global.getDefaultTokens().find((token) => token.symbol === asset)).map((token) => ({ token, poolId: VesuPools.Re7xBTC })),
|
|
32945
|
+
// allow only WBTC borrowing on Prime pool
|
|
32946
|
+
...Global.getDefaultTokens().filter((token) => token.symbol === "WBTC").map((token) => ({ token, poolId: VesuPools.Prime }))
|
|
32947
|
+
],
|
|
32926
32948
|
underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "WBTC"),
|
|
32927
32949
|
defaultPoolId: VesuPools.Re7xBTC,
|
|
32928
|
-
altSupportedPoolIds: [VesuPools.Prime],
|
|
32929
32950
|
redemptionRouter: ContractAddr.from("0x6ea649f402898f69baf775c1afdd08522c071c640b9c4460192070ec2b96417")
|
|
32930
32951
|
};
|
|
32931
32952
|
var hyperxtBTC = {
|
|
@@ -32938,10 +32959,11 @@ var hyperxtBTC = {
|
|
|
32938
32959
|
adapters: [],
|
|
32939
32960
|
targetHealthFactor: 1.1,
|
|
32940
32961
|
minHealthFactor: 1.05,
|
|
32941
|
-
borrowable_assets:
|
|
32962
|
+
borrowable_assets: [
|
|
32963
|
+
...Global.getDefaultTokens().filter((token) => token.symbol === "tBTC" || token.symbol === "WBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
|
|
32964
|
+
],
|
|
32942
32965
|
underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "tBTC"),
|
|
32943
32966
|
defaultPoolId: VesuPools.Re7xBTC,
|
|
32944
|
-
altSupportedPoolIds: [],
|
|
32945
32967
|
redemptionRouter: ContractAddr.from("0x3de9c409d1e357e25778fb7a3e2e2393666956846a5c2caa607296fa8e76b5d")
|
|
32946
32968
|
};
|
|
32947
32969
|
var hyperxsBTC = {
|
|
@@ -32954,10 +32976,11 @@ var hyperxsBTC = {
|
|
|
32954
32976
|
adapters: [],
|
|
32955
32977
|
targetHealthFactor: 1.1,
|
|
32956
32978
|
minHealthFactor: 1.05,
|
|
32957
|
-
borrowable_assets:
|
|
32979
|
+
borrowable_assets: [
|
|
32980
|
+
...Global.getDefaultTokens().filter((token) => token.symbol === "solvBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
|
|
32981
|
+
],
|
|
32958
32982
|
underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "solvBTC"),
|
|
32959
|
-
defaultPoolId: VesuPools.Re7xBTC
|
|
32960
|
-
altSupportedPoolIds: []
|
|
32983
|
+
defaultPoolId: VesuPools.Re7xBTC
|
|
32961
32984
|
};
|
|
32962
32985
|
var hyperxLBTC = {
|
|
32963
32986
|
vaultAddress: ContractAddr.from("0x64cf24d4883fe569926419a0569ab34497c6956a1a308fa883257f7486d7030"),
|
|
@@ -32969,10 +32992,11 @@ var hyperxLBTC = {
|
|
|
32969
32992
|
adapters: [],
|
|
32970
32993
|
targetHealthFactor: 1.1,
|
|
32971
32994
|
minHealthFactor: 1.05,
|
|
32972
|
-
borrowable_assets:
|
|
32995
|
+
borrowable_assets: [
|
|
32996
|
+
...Global.getDefaultTokens().filter((token) => token.symbol === "LBTC").map((token) => ({ token, poolId: VesuPools.Re7xBTC }))
|
|
32997
|
+
],
|
|
32973
32998
|
underlyingToken: Global.getDefaultTokens().find((token) => token.symbol === "LBTC"),
|
|
32974
|
-
defaultPoolId: VesuPools.Re7xBTC
|
|
32975
|
-
altSupportedPoolIds: []
|
|
32999
|
+
defaultPoolId: VesuPools.Re7xBTC
|
|
32976
33000
|
};
|
|
32977
33001
|
function getInvestmentSteps(lstSymbol, underlyingSymbol) {
|
|
32978
33002
|
return [
|
|
@@ -33059,7 +33083,7 @@ var HYPER_LST_SECURITY = {
|
|
|
33059
33083
|
var HYPER_LST_REDEMPTION_INFO = {
|
|
33060
33084
|
instantWithdrawalVault: "No" /* NO */,
|
|
33061
33085
|
redemptionsInfo: [{
|
|
33062
|
-
title: "
|
|
33086
|
+
title: "Typical Duration",
|
|
33063
33087
|
description: "1-2 hours"
|
|
33064
33088
|
}],
|
|
33065
33089
|
alerts: [{
|
|
@@ -33068,12 +33092,12 @@ var HYPER_LST_REDEMPTION_INFO = {
|
|
|
33068
33092
|
tab: "withdraw"
|
|
33069
33093
|
}]
|
|
33070
33094
|
};
|
|
33071
|
-
function getStrategySettings(lstSymbol, underlyingSymbol,
|
|
33095
|
+
function getStrategySettings(lstSymbol, underlyingSymbol, settings, isPreview = false) {
|
|
33072
33096
|
return {
|
|
33073
33097
|
id: `hyper_${lstSymbol.toLowerCase()}`,
|
|
33074
33098
|
name: `Hyper ${lstSymbol}`,
|
|
33075
33099
|
description: getDescription2(lstSymbol, underlyingSymbol),
|
|
33076
|
-
address:
|
|
33100
|
+
address: settings.vaultAddress,
|
|
33077
33101
|
launchBlock: 0,
|
|
33078
33102
|
type: "Other",
|
|
33079
33103
|
vaultType: {
|
|
@@ -33088,7 +33112,7 @@ function getStrategySettings(lstSymbol, underlyingSymbol, addresses, isPreview =
|
|
|
33088
33112
|
additionalInfo: getLooperSettings2(
|
|
33089
33113
|
lstSymbol,
|
|
33090
33114
|
underlyingSymbol,
|
|
33091
|
-
|
|
33115
|
+
settings,
|
|
33092
33116
|
lstSymbol === "xSTRK" ? VesuPools.Re7xSTRK : VesuPools.Re7xBTC
|
|
33093
33117
|
),
|
|
33094
33118
|
risk: {
|
|
@@ -33106,7 +33130,7 @@ function getStrategySettings(lstSymbol, underlyingSymbol, addresses, isPreview =
|
|
|
33106
33130
|
logo: "https://assets.troves.fi/integrations/unwraplabs/white.png"
|
|
33107
33131
|
},
|
|
33108
33132
|
settings: createHyperLSTSettings(lstSymbol, underlyingSymbol),
|
|
33109
|
-
contractDetails: getContractDetails(
|
|
33133
|
+
contractDetails: getContractDetails(settings),
|
|
33110
33134
|
faqs: getFAQs2(lstSymbol, underlyingSymbol),
|
|
33111
33135
|
investmentSteps: getInvestmentSteps(lstSymbol, underlyingSymbol),
|
|
33112
33136
|
isPreview,
|
|
@@ -33114,6 +33138,8 @@ function getStrategySettings(lstSymbol, underlyingSymbol, addresses, isPreview =
|
|
|
33114
33138
|
tags: lstSymbol.includes("BTC") ? ["BTC" /* BTC */, "Maxx" /* LEVERED */] : ["Maxx" /* LEVERED */],
|
|
33115
33139
|
security: HYPER_LST_SECURITY,
|
|
33116
33140
|
redemptionInfo: HYPER_LST_REDEMPTION_INFO,
|
|
33141
|
+
usualTimeToEarnings: "2 weeks",
|
|
33142
|
+
usualTimeToEarningsDescription: "Strategy returns depend on LST price on DEXes. Even though the true price of LST on Endur increases continuously, the DEX price may lag sometimes, and historically is seen to rebase at least once every 2 hours. This is when you realise your earnings.",
|
|
33117
33143
|
points: [{
|
|
33118
33144
|
multiplier: 4,
|
|
33119
33145
|
logo: "https://endur.fi/favicon.ico",
|
|
@@ -33993,6 +34019,7 @@ var deployer_default = Deployer;
|
|
|
33993
34019
|
VesuAdapter,
|
|
33994
34020
|
VesuAmountDenomination,
|
|
33995
34021
|
VesuAmountType,
|
|
34022
|
+
VesuPoolMetadata,
|
|
33996
34023
|
VesuPools,
|
|
33997
34024
|
VesuRebalance,
|
|
33998
34025
|
VesuRebalanceStrategies,
|