@strkfarm/sdk 1.0.59 → 1.0.60
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 +241 -38
- package/dist/index.browser.mjs +232 -29
- package/dist/index.d.ts +20 -1
- package/dist/index.js +232 -29
- package/dist/index.mjs +232 -29
- package/package.json +1 -1
- package/src/interfaces/common.tsx +13 -1
- package/src/strategies/universal-adapters/adapter-utils.ts +1 -1
- package/src/strategies/universal-adapters/common-adapter.ts +31 -0
- package/src/strategies/{universal-strategy.ts → universal-strategy.tsx} +225 -27
package/dist/index.browser.mjs
CHANGED
|
@@ -2132,7 +2132,7 @@ var getRiskExplaination = (riskType) => {
|
|
|
2132
2132
|
};
|
|
2133
2133
|
var getRiskColor = (risk) => {
|
|
2134
2134
|
const value = risk.value;
|
|
2135
|
-
if (value <=
|
|
2135
|
+
if (value <= 2) return "light_green_2";
|
|
2136
2136
|
if (value < 3) return "yellow";
|
|
2137
2137
|
return "red";
|
|
2138
2138
|
};
|
|
@@ -2160,8 +2160,18 @@ var VesuProtocol = {
|
|
|
2160
2160
|
name: "Vesu",
|
|
2161
2161
|
logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
|
|
2162
2162
|
};
|
|
2163
|
+
var EndurProtocol = {
|
|
2164
|
+
name: "Endur",
|
|
2165
|
+
logo: "http://endur.fi/logo.png"
|
|
2166
|
+
};
|
|
2167
|
+
var ExtendedProtocol = {
|
|
2168
|
+
name: "Extended",
|
|
2169
|
+
logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
|
|
2170
|
+
};
|
|
2163
2171
|
var Protocols = {
|
|
2164
|
-
VESU: VesuProtocol
|
|
2172
|
+
VESU: VesuProtocol,
|
|
2173
|
+
ENDUR: EndurProtocol,
|
|
2174
|
+
EXTENDED: ExtendedProtocol
|
|
2165
2175
|
};
|
|
2166
2176
|
|
|
2167
2177
|
// src/interfaces/initializable.ts
|
|
@@ -18426,7 +18436,7 @@ var SenseiStrategies = [
|
|
|
18426
18436
|
import { hash, num as num6, shortString } from "starknet";
|
|
18427
18437
|
|
|
18428
18438
|
// src/strategies/universal-adapters/adapter-utils.ts
|
|
18429
|
-
var SIMPLE_SANITIZER = ContractAddr.from("
|
|
18439
|
+
var SIMPLE_SANITIZER = ContractAddr.from("0x3798dc4f83fdfad199e5236e3656cf2fb79bc50c00504d0dd41522e0f042072");
|
|
18430
18440
|
function toBigInt(value) {
|
|
18431
18441
|
if (typeof value === "string") {
|
|
18432
18442
|
return BigInt(value);
|
|
@@ -18541,6 +18551,35 @@ var CommonAdapter = class extends BaseAdapter {
|
|
|
18541
18551
|
};
|
|
18542
18552
|
};
|
|
18543
18553
|
}
|
|
18554
|
+
getBringLiquidityAdapter(id) {
|
|
18555
|
+
return () => ({
|
|
18556
|
+
leaf: this.constructSimpleLeafData({
|
|
18557
|
+
id,
|
|
18558
|
+
target: this.config.vaultAddress,
|
|
18559
|
+
method: "bring_liquidity",
|
|
18560
|
+
packedArguments: []
|
|
18561
|
+
}),
|
|
18562
|
+
callConstructor: this.getBringLiquidityCall().bind(this)
|
|
18563
|
+
});
|
|
18564
|
+
}
|
|
18565
|
+
getBringLiquidityCall() {
|
|
18566
|
+
return (params) => {
|
|
18567
|
+
const uint256Amount = uint2566.bnToUint256(params.amount.toWei());
|
|
18568
|
+
return {
|
|
18569
|
+
sanitizer: SIMPLE_SANITIZER,
|
|
18570
|
+
call: {
|
|
18571
|
+
contractAddress: this.config.vaultAddress,
|
|
18572
|
+
selector: hash2.getSelectorFromName("bring_liquidity"),
|
|
18573
|
+
calldata: [
|
|
18574
|
+
toBigInt(uint256Amount.low.toString()),
|
|
18575
|
+
// amount low
|
|
18576
|
+
toBigInt(uint256Amount.high.toString())
|
|
18577
|
+
// amount high
|
|
18578
|
+
]
|
|
18579
|
+
}
|
|
18580
|
+
};
|
|
18581
|
+
};
|
|
18582
|
+
}
|
|
18544
18583
|
};
|
|
18545
18584
|
|
|
18546
18585
|
// src/strategies/universal-adapters/vesu-adapter.ts
|
|
@@ -21058,7 +21097,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
|
|
|
21058
21097
|
}
|
|
21059
21098
|
};
|
|
21060
21099
|
|
|
21061
|
-
// src/strategies/universal-strategy.
|
|
21100
|
+
// src/strategies/universal-strategy.tsx
|
|
21062
21101
|
import { CallData, Contract as Contract9, num as num9, uint256 as uint2568 } from "starknet";
|
|
21063
21102
|
|
|
21064
21103
|
// src/data/universal-vault.abi.json
|
|
@@ -23264,7 +23303,8 @@ var vault_manager_abi_default = [
|
|
|
23264
23303
|
}
|
|
23265
23304
|
];
|
|
23266
23305
|
|
|
23267
|
-
// src/strategies/universal-strategy.
|
|
23306
|
+
// src/strategies/universal-strategy.tsx
|
|
23307
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
23268
23308
|
var AUMTypes = /* @__PURE__ */ ((AUMTypes2) => {
|
|
23269
23309
|
AUMTypes2["FINALISED"] = "finalised";
|
|
23270
23310
|
AUMTypes2["DEFISPRING"] = "defispring";
|
|
@@ -23485,6 +23525,7 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
|
|
|
23485
23525
|
const balance = await this.getUnusedBalance();
|
|
23486
23526
|
logger.verbose(`${this.getTag()} unused balance: ${balance.amount.toNumber()}`);
|
|
23487
23527
|
const vesuAum = leg1AUM[0].amount.plus(leg2AUM[0].usdValue / token1Price.price).minus(leg1AUM[1].usdValue / token1Price.price).minus(leg2AUM[1].amount);
|
|
23528
|
+
logger.verbose(`${this.getTag()} Vesu AUM: leg1: ${leg1AUM[0].amount.toNumber()}, ${leg1AUM[1].amount.toNumber()}, leg2: ${leg2AUM[0].amount.toNumber()}, ${leg2AUM[1].amount.toNumber()}`);
|
|
23488
23529
|
const zeroAmt = Web3Number.fromWei("0", this.asset().decimals);
|
|
23489
23530
|
const net = {
|
|
23490
23531
|
tokenInfo: this.asset(),
|
|
@@ -23701,18 +23742,23 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
|
|
|
23701
23742
|
logger.verbose(`${this.getTag()}:: leg1DepositAmount: ${params.leg1DepositAmount.toString()} ${vesuAdapter1.config.collateral.symbol}`);
|
|
23702
23743
|
logger.verbose(`${this.getTag()}:: borrow1Amount: ${borrow1Amount.toString()} ${vesuAdapter1.config.debt.symbol}`);
|
|
23703
23744
|
logger.verbose(`${this.getTag()}:: borrow2Amount: ${borrow2Amount.toString()} ${vesuAdapter2.config.debt.symbol}`);
|
|
23704
|
-
|
|
23745
|
+
let callSet1 = this.getVesuModifyPositionCalls({
|
|
23705
23746
|
isLeg1: true,
|
|
23706
23747
|
isDeposit: params.isDeposit,
|
|
23707
23748
|
depositAmount: params.leg1DepositAmount.plus(borrow2Amount),
|
|
23708
23749
|
debtAmount: borrow1Amount
|
|
23709
23750
|
});
|
|
23710
|
-
|
|
23751
|
+
let callSet2 = this.getVesuModifyPositionCalls({
|
|
23711
23752
|
isLeg1: false,
|
|
23712
23753
|
isDeposit: params.isDeposit,
|
|
23713
23754
|
depositAmount: borrow1Amount,
|
|
23714
23755
|
debtAmount: borrow2Amount
|
|
23715
23756
|
});
|
|
23757
|
+
if (!params.isDeposit) {
|
|
23758
|
+
let temp = callSet2;
|
|
23759
|
+
callSet2 = [...callSet1];
|
|
23760
|
+
callSet1 = [...temp];
|
|
23761
|
+
}
|
|
23716
23762
|
const allActions = [...callSet1.map((i) => i.manageCall), ...callSet2.map((i) => i.manageCall)];
|
|
23717
23763
|
const flashloanCalldata = CallData.compile([
|
|
23718
23764
|
[...callSet1.map((i) => i.proofs), ...callSet2.map((i) => i.proofs)],
|
|
@@ -23730,6 +23776,18 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
|
|
|
23730
23776
|
const manageCall = this.getManageCall(["flash_loan_init" /* FLASH_LOAN */], [manageCall1]);
|
|
23731
23777
|
return manageCall;
|
|
23732
23778
|
}
|
|
23779
|
+
async getBringLiquidityCall(params) {
|
|
23780
|
+
const manage1Info = this.getProofs("approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */);
|
|
23781
|
+
const manageCall1 = manage1Info.callConstructor({
|
|
23782
|
+
amount: params.amount
|
|
23783
|
+
});
|
|
23784
|
+
const manage2Info = this.getProofs("bring_liquidity" /* BRING_LIQUIDITY */);
|
|
23785
|
+
const manageCall2 = manage2Info.callConstructor({
|
|
23786
|
+
amount: params.amount
|
|
23787
|
+
});
|
|
23788
|
+
const manageCall = this.getManageCall(["approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */, "bring_liquidity" /* BRING_LIQUIDITY */], [manageCall1, manageCall2]);
|
|
23789
|
+
return manageCall;
|
|
23790
|
+
}
|
|
23733
23791
|
async getRebalanceCall(params) {
|
|
23734
23792
|
let callSet1 = this.getVesuModifyPositionCalls({
|
|
23735
23793
|
isLeg1: true,
|
|
@@ -23764,6 +23822,8 @@ var UNIVERSAL_MANAGE_IDS = /* @__PURE__ */ ((UNIVERSAL_MANAGE_IDS2) => {
|
|
|
23764
23822
|
UNIVERSAL_MANAGE_IDS2["VESU_LEG2"] = "vesu_leg2";
|
|
23765
23823
|
UNIVERSAL_MANAGE_IDS2["APPROVE_TOKEN1"] = "approve_token1";
|
|
23766
23824
|
UNIVERSAL_MANAGE_IDS2["APPROVE_TOKEN2"] = "approve_token2";
|
|
23825
|
+
UNIVERSAL_MANAGE_IDS2["APPROVE_BRING_LIQUIDITY"] = "approve_bring_liquidity";
|
|
23826
|
+
UNIVERSAL_MANAGE_IDS2["BRING_LIQUIDITY"] = "bring_liquidity";
|
|
23767
23827
|
return UNIVERSAL_MANAGE_IDS2;
|
|
23768
23828
|
})(UNIVERSAL_MANAGE_IDS || {});
|
|
23769
23829
|
var UNIVERSAL_ADAPTERS = /* @__PURE__ */ ((UNIVERSAL_ADAPTERS2) => {
|
|
@@ -23778,7 +23838,9 @@ function getLooperSettings(token1Symbol, token2Symbol, vaultSettings, pool1, poo
|
|
|
23778
23838
|
const commonAdapter = new CommonAdapter({
|
|
23779
23839
|
manager: vaultSettings.manager,
|
|
23780
23840
|
asset: USDCToken.address,
|
|
23781
|
-
id: "flash_loan_init" /* FLASH_LOAN
|
|
23841
|
+
id: "flash_loan_init" /* FLASH_LOAN */,
|
|
23842
|
+
vaultAddress: vaultSettings.vaultAddress,
|
|
23843
|
+
vaultAllocator: vaultSettings.vaultAllocator
|
|
23782
23844
|
});
|
|
23783
23845
|
const vesuAdapterUSDCETH = new VesuAdapter({
|
|
23784
23846
|
poolId: pool1,
|
|
@@ -23809,13 +23871,17 @@ function getLooperSettings(token1Symbol, token2Symbol, vaultSettings, pool1, poo
|
|
|
23809
23871
|
vaultSettings.leafAdapters.push(vesuAdapterETHUSDC.getModifyPosition.bind(vesuAdapterETHUSDC));
|
|
23810
23872
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vesuAdapterUSDCETH.VESU_SINGLETON, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
|
|
23811
23873
|
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(ETHToken.address, vesuAdapterETHUSDC.VESU_SINGLETON, "approve_token2" /* APPROVE_TOKEN2 */).bind(commonAdapter));
|
|
23874
|
+
vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vaultSettings.vaultAddress, "approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */).bind(commonAdapter));
|
|
23875
|
+
vaultSettings.leafAdapters.push(commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter));
|
|
23812
23876
|
return vaultSettings;
|
|
23813
23877
|
}
|
|
23814
23878
|
var _riskFactor4 = [
|
|
23815
23879
|
{ type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25, reason: "Audited by Zellic" },
|
|
23816
|
-
{ type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 1, weight: 50, reason: "Liquidation risk is mitigated
|
|
23880
|
+
{ type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 1.5, weight: 50, reason: "Liquidation risk is mitigated by stable price feed on Starknet" },
|
|
23881
|
+
{ type: "Technical Risk" /* TECHNICAL_RISK */, value: 1, weight: 50, reason: "Technical failures like risk monitoring failures" }
|
|
23817
23882
|
];
|
|
23818
23883
|
var usdcVaultSettings = {
|
|
23884
|
+
vaultAddress: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
23819
23885
|
manager: ContractAddr.from("0xf41a2b1f498a7f9629db0b8519259e66e964260a23d20003f3e42bb1997a07"),
|
|
23820
23886
|
vaultAllocator: ContractAddr.from("0x228cca1005d3f2b55cbaba27cb291dacf1b9a92d1d6b1638195fbd3d0c1e3ba"),
|
|
23821
23887
|
redeemRequestNFT: ContractAddr.from("0x906d03590010868cbf7590ad47043959d7af8e782089a605d9b22567b64fda"),
|
|
@@ -23826,6 +23892,7 @@ var usdcVaultSettings = {
|
|
|
23826
23892
|
minHealthFactor: 1.25
|
|
23827
23893
|
};
|
|
23828
23894
|
var wbtcVaultSettings = {
|
|
23895
|
+
vaultAddress: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
|
|
23829
23896
|
manager: ContractAddr.from("0xef8a664ffcfe46a6af550766d27c28937bf1b77fb4ab54d8553e92bca5ba34"),
|
|
23830
23897
|
vaultAllocator: ContractAddr.from("0x1e01c25f0d9494570226ad28a7fa856c0640505e809c366a9fab4903320e735"),
|
|
23831
23898
|
redeemRequestNFT: ContractAddr.from("0x4fec59a12f8424281c1e65a80b5de51b4e754625c60cddfcd00d46941ec37b2"),
|
|
@@ -23836,6 +23903,7 @@ var wbtcVaultSettings = {
|
|
|
23836
23903
|
minHealthFactor: 1.25
|
|
23837
23904
|
};
|
|
23838
23905
|
var ethVaultSettings = {
|
|
23906
|
+
vaultAddress: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
|
|
23839
23907
|
manager: ContractAddr.from("0x494888b37206616bd09d759dcda61e5118470b9aa7f58fb84f21c778a7b8f97"),
|
|
23840
23908
|
vaultAllocator: ContractAddr.from("0x4acc0ad6bea58cb578d60ff7c31f06f44369a7a9a7bbfffe4701f143e427bd"),
|
|
23841
23909
|
redeemRequestNFT: ContractAddr.from("0x2e6cd71e5060a254d4db00655e420db7bf89da7755bb0d5f922e2f00c76ac49"),
|
|
@@ -23846,6 +23914,7 @@ var ethVaultSettings = {
|
|
|
23846
23914
|
minHealthFactor: 1.25
|
|
23847
23915
|
};
|
|
23848
23916
|
var strkVaultSettings = {
|
|
23917
|
+
vaultAddress: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
|
|
23849
23918
|
manager: ContractAddr.from("0xcc6a5153ca56293405506eb20826a379d982cd738008ef7e808454d318fb81"),
|
|
23850
23919
|
vaultAllocator: ContractAddr.from("0xf29d2f82e896c0ed74c9eff220af34ac148e8b99846d1ace9fbb02c9191d01"),
|
|
23851
23920
|
redeemRequestNFT: ContractAddr.from("0x46902423bd632c428376b84fcee9cac5dbe016214e93a8103bcbde6e1de656b"),
|
|
@@ -23856,6 +23925,7 @@ var strkVaultSettings = {
|
|
|
23856
23925
|
minHealthFactor: 1.25
|
|
23857
23926
|
};
|
|
23858
23927
|
var usdtVaultSettings = {
|
|
23928
|
+
vaultAddress: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
|
|
23859
23929
|
manager: ContractAddr.from("0x39bb9843503799b552b7ed84b31c06e4ff10c0537edcddfbf01fe944b864029"),
|
|
23860
23930
|
vaultAllocator: ContractAddr.from("0x56437d18c43727ac971f6c7086031cad7d9d6ccb340f4f3785a74cc791c931a"),
|
|
23861
23931
|
redeemRequestNFT: ContractAddr.from("0x5af0c2a657eaa8e23ed78e855dac0c51e4f69e2cf91a18c472041a1f75bb41f"),
|
|
@@ -23865,10 +23935,143 @@ var usdtVaultSettings = {
|
|
|
23865
23935
|
targetHealthFactor: 1.3,
|
|
23866
23936
|
minHealthFactor: 1.25
|
|
23867
23937
|
};
|
|
23938
|
+
function MetaVaultDescription() {
|
|
23939
|
+
const logos = {
|
|
23940
|
+
vesu: Protocols.VESU.logo,
|
|
23941
|
+
endur: Protocols.ENDUR.logo,
|
|
23942
|
+
extended: Protocols.EXTENDED.logo,
|
|
23943
|
+
ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K"
|
|
23944
|
+
};
|
|
23945
|
+
const sources = [
|
|
23946
|
+
{ key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
|
|
23947
|
+
{ key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking\u2013backed yields via our LST pipeline." },
|
|
23948
|
+
{ key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." }
|
|
23949
|
+
// { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
|
|
23950
|
+
];
|
|
23951
|
+
const containerStyle = {
|
|
23952
|
+
maxWidth: "800px",
|
|
23953
|
+
margin: "0 auto",
|
|
23954
|
+
backgroundColor: "#111",
|
|
23955
|
+
color: "#eee",
|
|
23956
|
+
fontFamily: "Arial, sans-serif",
|
|
23957
|
+
borderRadius: "12px"
|
|
23958
|
+
};
|
|
23959
|
+
const cardStyle = {
|
|
23960
|
+
border: "1px solid #333",
|
|
23961
|
+
borderRadius: "10px",
|
|
23962
|
+
padding: "12px",
|
|
23963
|
+
marginBottom: "12px",
|
|
23964
|
+
backgroundColor: "#1a1a1a"
|
|
23965
|
+
};
|
|
23966
|
+
const logoStyle = {
|
|
23967
|
+
width: "24px",
|
|
23968
|
+
height: "24px",
|
|
23969
|
+
borderRadius: "8px",
|
|
23970
|
+
border: "1px solid #444",
|
|
23971
|
+
backgroundColor: "#222"
|
|
23972
|
+
};
|
|
23973
|
+
return /* @__PURE__ */ jsxs3("div", { style: containerStyle, children: [
|
|
23974
|
+
/* @__PURE__ */ jsx4("h1", { style: { fontSize: "18px", marginBottom: "10px" }, children: "Meta Vault \u2014 Automated Yield Router" }),
|
|
23975
|
+
/* @__PURE__ */ jsx4("p", { style: { fontSize: "14px", lineHeight: "1.5", marginBottom: "16px" }, children: "This Evergreen vault is a tokenized Meta Vault, auto-compounding strategy that continuously allocates your deposited asset to the best available yield source in the ecosystem. Depositors receive vault shares that represent a proportional claim on the underlying assets and accrued yield. Allocation shifts are handled programmatically based on on-chain signals and risk filters, minimizing idle capital and maximizing net APY." }),
|
|
23976
|
+
/* @__PURE__ */ jsx4("div", { style: { backgroundColor: "#222", padding: "10px", borderRadius: "8px", marginBottom: "20px", border: "1px solid #444" }, children: /* @__PURE__ */ jsxs3("p", { style: { fontSize: "13px", color: "#ccc" }, children: [
|
|
23977
|
+
/* @__PURE__ */ jsx4("strong", { children: "Withdrawals:" }),
|
|
23978
|
+
" Requests can take up to ",
|
|
23979
|
+
/* @__PURE__ */ jsx4("strong", { children: "1-2 hours" }),
|
|
23980
|
+
" to process as the vault unwinds and settles routing."
|
|
23981
|
+
] }) }),
|
|
23982
|
+
/* @__PURE__ */ jsx4("h2", { style: { fontSize: "18px", marginBottom: "10px" }, children: "Supported Yield Sources" }),
|
|
23983
|
+
sources.map((s) => /* @__PURE__ */ jsx4("div", { style: cardStyle, children: /* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "10px", alignItems: "flex-start" }, children: [
|
|
23984
|
+
/* @__PURE__ */ jsx4("img", { src: logos[s.key], alt: `${s.name} logo`, style: logoStyle }),
|
|
23985
|
+
/* @__PURE__ */ jsx4("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxs3("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
|
|
23986
|
+
/* @__PURE__ */ jsx4("h3", { style: { fontSize: "15px", margin: 0 }, children: s.name }),
|
|
23987
|
+
/* @__PURE__ */ jsx4(StatusBadge, { status: s.status })
|
|
23988
|
+
] }) })
|
|
23989
|
+
] }) }, s.key))
|
|
23990
|
+
] });
|
|
23991
|
+
}
|
|
23992
|
+
function StatusBadge({ status }) {
|
|
23993
|
+
const isSoon = String(status).toLowerCase() !== "live";
|
|
23994
|
+
const badgeStyle = {
|
|
23995
|
+
fontSize: "12px",
|
|
23996
|
+
padding: "2px 6px",
|
|
23997
|
+
borderRadius: "12px",
|
|
23998
|
+
border: "1px solid",
|
|
23999
|
+
color: isSoon ? "rgb(196 196 195)" : "#6aff7d",
|
|
24000
|
+
borderColor: isSoon ? "#484848" : "#6aff7d",
|
|
24001
|
+
backgroundColor: isSoon ? "#424242" : "#002b1a"
|
|
24002
|
+
};
|
|
24003
|
+
return /* @__PURE__ */ jsx4("span", { style: badgeStyle, children: status });
|
|
24004
|
+
}
|
|
24005
|
+
function getDescription(tokenSymbol) {
|
|
24006
|
+
return MetaVaultDescription();
|
|
24007
|
+
}
|
|
24008
|
+
function getFAQs() {
|
|
24009
|
+
return [
|
|
24010
|
+
{
|
|
24011
|
+
question: "What is the Meta Vault?",
|
|
24012
|
+
answer: "The Meta Vault is a tokenized strategy that automatically allocates your deposited assets to the best available yield source in the ecosystem. It optimizes returns while minimizing idle capital."
|
|
24013
|
+
},
|
|
24014
|
+
{
|
|
24015
|
+
question: "How does yield allocation work?",
|
|
24016
|
+
answer: "The vault continuously monitors supported protocols and routes liquidity to the source offering the highest net yield after accounting for fees, slippage, and gas costs. Reallocations are performed automatically."
|
|
24017
|
+
},
|
|
24018
|
+
{
|
|
24019
|
+
question: "Which yield sources are supported?",
|
|
24020
|
+
answer: /* @__PURE__ */ jsxs3("span", { children: [
|
|
24021
|
+
"Currently, ",
|
|
24022
|
+
/* @__PURE__ */ jsx4("strong", { children: "Vesu" }),
|
|
24023
|
+
" is live. Future integrations include",
|
|
24024
|
+
" ",
|
|
24025
|
+
/* @__PURE__ */ jsx4("strong", { children: "Endur" }),
|
|
24026
|
+
", ",
|
|
24027
|
+
/* @__PURE__ */ jsx4("strong", { children: "Extended" }),
|
|
24028
|
+
", and",
|
|
24029
|
+
" ",
|
|
24030
|
+
/* @__PURE__ */ jsx4("strong", { children: "Ekubo" }),
|
|
24031
|
+
" (all coming soon)."
|
|
24032
|
+
] })
|
|
24033
|
+
},
|
|
24034
|
+
{
|
|
24035
|
+
question: "What do I receive when I deposit?",
|
|
24036
|
+
answer: "Depositors receive vault tokens representing their proportional share of the vault. These tokens entitle holders to both the principal and accrued yield."
|
|
24037
|
+
},
|
|
24038
|
+
{
|
|
24039
|
+
question: "How long do withdrawals take?",
|
|
24040
|
+
answer: "Withdrawals may take up to 1-2 hours to process, as the vault unwinds and settles liquidity routing across integrated protocols."
|
|
24041
|
+
},
|
|
24042
|
+
{
|
|
24043
|
+
question: "Is the Meta Vault non-custodial?",
|
|
24044
|
+
answer: "Yes. The Meta Vault operates entirely on-chain. Users always maintain control of their vault tokens, and the strategy is fully transparent."
|
|
24045
|
+
},
|
|
24046
|
+
{
|
|
24047
|
+
question: "How is risk managed?",
|
|
24048
|
+
answer: "Integrations are supported with active risk monitoring like liquidation risk. Only vetted protocols are included to balance yield with safety. However, usual Defi risks like smart contract risk, extreme volatile market risk, etc. are still present."
|
|
24049
|
+
},
|
|
24050
|
+
{
|
|
24051
|
+
question: "Are there any fees?",
|
|
24052
|
+
answer: "Troves charges a performance of 10% on the yield generated. The APY shown is net of this fee. This fee is only applied to the profits earned, ensuring that users retain their initial capital."
|
|
24053
|
+
}
|
|
24054
|
+
];
|
|
24055
|
+
}
|
|
24056
|
+
function getContractDetails(settings) {
|
|
24057
|
+
return [
|
|
24058
|
+
{ address: settings.vaultAddress, name: "Vault" },
|
|
24059
|
+
{ address: settings.manager, name: "Vault Manager" },
|
|
24060
|
+
{ address: settings.vaultAllocator, name: "Vault Allocator" },
|
|
24061
|
+
{ address: settings.redeemRequestNFT, name: "Redeem Request NFT" },
|
|
24062
|
+
{ address: settings.aumOracle, name: "AUM Oracle" }
|
|
24063
|
+
];
|
|
24064
|
+
}
|
|
24065
|
+
var investmentSteps = [
|
|
24066
|
+
"Deposit funds into the vault",
|
|
24067
|
+
"Vault manager allocates funds to optimal yield sources",
|
|
24068
|
+
"Vault manager reports asset under management (AUM) regularly to the vault",
|
|
24069
|
+
"Request withdrawal and vault manager processes it in 1-2 hours"
|
|
24070
|
+
];
|
|
23868
24071
|
var UniversalStrategies = [
|
|
23869
24072
|
{
|
|
23870
24073
|
name: "USDC Evergreen",
|
|
23871
|
-
description: "
|
|
24074
|
+
description: getDescription("USDC"),
|
|
23872
24075
|
address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
|
|
23873
24076
|
launchBlock: 0,
|
|
23874
24077
|
type: "ERC4626",
|
|
@@ -23881,13 +24084,13 @@ var UniversalStrategies = [
|
|
|
23881
24084
|
},
|
|
23882
24085
|
protocols: [Protocols.VESU],
|
|
23883
24086
|
maxTVL: Web3Number.fromWei(0, 6),
|
|
23884
|
-
contractDetails:
|
|
23885
|
-
faqs:
|
|
23886
|
-
investmentSteps
|
|
24087
|
+
contractDetails: getContractDetails(usdcVaultSettings),
|
|
24088
|
+
faqs: getFAQs(),
|
|
24089
|
+
investmentSteps
|
|
23887
24090
|
},
|
|
23888
24091
|
{
|
|
23889
24092
|
name: "WBTC Evergreen",
|
|
23890
|
-
description: "
|
|
24093
|
+
description: getDescription("WBTC"),
|
|
23891
24094
|
address: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
|
|
23892
24095
|
launchBlock: 0,
|
|
23893
24096
|
type: "ERC4626",
|
|
@@ -23900,13 +24103,13 @@ var UniversalStrategies = [
|
|
|
23900
24103
|
},
|
|
23901
24104
|
protocols: [Protocols.VESU],
|
|
23902
24105
|
maxTVL: Web3Number.fromWei(0, 8),
|
|
23903
|
-
contractDetails:
|
|
23904
|
-
faqs:
|
|
23905
|
-
investmentSteps
|
|
24106
|
+
contractDetails: getContractDetails(wbtcVaultSettings),
|
|
24107
|
+
faqs: getFAQs(),
|
|
24108
|
+
investmentSteps
|
|
23906
24109
|
},
|
|
23907
24110
|
{
|
|
23908
24111
|
name: "ETH Evergreen",
|
|
23909
|
-
description: "
|
|
24112
|
+
description: getDescription("ETH"),
|
|
23910
24113
|
address: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
|
|
23911
24114
|
launchBlock: 0,
|
|
23912
24115
|
type: "ERC4626",
|
|
@@ -23919,13 +24122,13 @@ var UniversalStrategies = [
|
|
|
23919
24122
|
},
|
|
23920
24123
|
protocols: [Protocols.VESU],
|
|
23921
24124
|
maxTVL: Web3Number.fromWei(0, 18),
|
|
23922
|
-
contractDetails:
|
|
23923
|
-
faqs:
|
|
23924
|
-
investmentSteps
|
|
24125
|
+
contractDetails: getContractDetails(ethVaultSettings),
|
|
24126
|
+
faqs: getFAQs(),
|
|
24127
|
+
investmentSteps
|
|
23925
24128
|
},
|
|
23926
24129
|
{
|
|
23927
24130
|
name: "STRK Evergreen",
|
|
23928
|
-
description: "
|
|
24131
|
+
description: getDescription("STRK"),
|
|
23929
24132
|
address: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
|
|
23930
24133
|
launchBlock: 0,
|
|
23931
24134
|
type: "ERC4626",
|
|
@@ -23938,13 +24141,13 @@ var UniversalStrategies = [
|
|
|
23938
24141
|
},
|
|
23939
24142
|
protocols: [Protocols.VESU],
|
|
23940
24143
|
maxTVL: Web3Number.fromWei(0, 18),
|
|
23941
|
-
contractDetails:
|
|
23942
|
-
faqs:
|
|
23943
|
-
investmentSteps
|
|
24144
|
+
contractDetails: getContractDetails(strkVaultSettings),
|
|
24145
|
+
faqs: getFAQs(),
|
|
24146
|
+
investmentSteps
|
|
23944
24147
|
},
|
|
23945
24148
|
{
|
|
23946
24149
|
name: "USDT Evergreen",
|
|
23947
|
-
description: "
|
|
24150
|
+
description: getDescription("USDT"),
|
|
23948
24151
|
address: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
|
|
23949
24152
|
launchBlock: 0,
|
|
23950
24153
|
type: "ERC4626",
|
|
@@ -23957,9 +24160,9 @@ var UniversalStrategies = [
|
|
|
23957
24160
|
},
|
|
23958
24161
|
protocols: [Protocols.VESU],
|
|
23959
24162
|
maxTVL: Web3Number.fromWei(0, 6),
|
|
23960
|
-
contractDetails:
|
|
23961
|
-
faqs:
|
|
23962
|
-
investmentSteps
|
|
24163
|
+
contractDetails: getContractDetails(usdtVaultSettings),
|
|
24164
|
+
faqs: getFAQs(),
|
|
24165
|
+
investmentSteps
|
|
23963
24166
|
}
|
|
23964
24167
|
];
|
|
23965
24168
|
export {
|
package/dist/index.d.ts
CHANGED
|
@@ -161,6 +161,8 @@ interface VaultPosition {
|
|
|
161
161
|
}
|
|
162
162
|
declare const Protocols: {
|
|
163
163
|
VESU: IProtocol;
|
|
164
|
+
ENDUR: IProtocol;
|
|
165
|
+
EXTENDED: IProtocol;
|
|
164
166
|
};
|
|
165
167
|
|
|
166
168
|
interface ILendingMetadata {
|
|
@@ -921,6 +923,8 @@ interface ApproveCallParams {
|
|
|
921
923
|
}
|
|
922
924
|
interface CommonAdapterConfig {
|
|
923
925
|
id: string;
|
|
926
|
+
vaultAddress: ContractAddr;
|
|
927
|
+
vaultAllocator: ContractAddr;
|
|
924
928
|
manager: ContractAddr;
|
|
925
929
|
asset: ContractAddr;
|
|
926
930
|
}
|
|
@@ -938,6 +942,15 @@ declare class CommonAdapter extends BaseAdapter {
|
|
|
938
942
|
calldata: bigint[];
|
|
939
943
|
};
|
|
940
944
|
};
|
|
945
|
+
getBringLiquidityAdapter(id: string): () => AdapterLeafType<ApproveCallParams>;
|
|
946
|
+
getBringLiquidityCall(): (params: ApproveCallParams) => {
|
|
947
|
+
sanitizer: ContractAddr;
|
|
948
|
+
call: {
|
|
949
|
+
contractAddress: ContractAddr;
|
|
950
|
+
selector: string;
|
|
951
|
+
calldata: bigint[];
|
|
952
|
+
};
|
|
953
|
+
};
|
|
941
954
|
}
|
|
942
955
|
|
|
943
956
|
interface VesuPoolsInfo {
|
|
@@ -1026,6 +1039,7 @@ declare class VesuAdapter extends BaseAdapter {
|
|
|
1026
1039
|
}
|
|
1027
1040
|
|
|
1028
1041
|
interface UniversalStrategySettings {
|
|
1042
|
+
vaultAddress: ContractAddr;
|
|
1029
1043
|
manager: ContractAddr;
|
|
1030
1044
|
vaultAllocator: ContractAddr;
|
|
1031
1045
|
redeemRequestNFT: ContractAddr;
|
|
@@ -1134,6 +1148,9 @@ declare class UniversalStrategy<S extends UniversalStrategySettings> extends Bas
|
|
|
1134
1148
|
isDeposit: boolean;
|
|
1135
1149
|
leg1DepositAmount: Web3Number;
|
|
1136
1150
|
}): Promise<Call>;
|
|
1151
|
+
getBringLiquidityCall(params: {
|
|
1152
|
+
amount: Web3Number;
|
|
1153
|
+
}): Promise<Call>;
|
|
1137
1154
|
getRebalanceCall(params: {
|
|
1138
1155
|
isLeg1toLeg2: boolean;
|
|
1139
1156
|
amount: Web3Number;
|
|
@@ -1144,7 +1161,9 @@ declare enum UNIVERSAL_MANAGE_IDS {
|
|
|
1144
1161
|
VESU_LEG1 = "vesu_leg1",
|
|
1145
1162
|
VESU_LEG2 = "vesu_leg2",
|
|
1146
1163
|
APPROVE_TOKEN1 = "approve_token1",
|
|
1147
|
-
APPROVE_TOKEN2 = "approve_token2"
|
|
1164
|
+
APPROVE_TOKEN2 = "approve_token2",
|
|
1165
|
+
APPROVE_BRING_LIQUIDITY = "approve_bring_liquidity",
|
|
1166
|
+
BRING_LIQUIDITY = "bring_liquidity"
|
|
1148
1167
|
}
|
|
1149
1168
|
declare enum UNIVERSAL_ADAPTERS {
|
|
1150
1169
|
COMMON = "common_adapter",
|