@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.mjs CHANGED
@@ -2181,7 +2181,7 @@ var getRiskExplaination = (riskType) => {
2181
2181
  };
2182
2182
  var getRiskColor = (risk) => {
2183
2183
  const value = risk.value;
2184
- if (value <= 1) return "light_green_2";
2184
+ if (value <= 2) return "light_green_2";
2185
2185
  if (value < 3) return "yellow";
2186
2186
  return "red";
2187
2187
  };
@@ -2209,8 +2209,18 @@ var VesuProtocol = {
2209
2209
  name: "Vesu",
2210
2210
  logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
2211
2211
  };
2212
+ var EndurProtocol = {
2213
+ name: "Endur",
2214
+ logo: "http://endur.fi/logo.png"
2215
+ };
2216
+ var ExtendedProtocol = {
2217
+ name: "Extended",
2218
+ logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
2219
+ };
2212
2220
  var Protocols = {
2213
- VESU: VesuProtocol
2221
+ VESU: VesuProtocol,
2222
+ ENDUR: EndurProtocol,
2223
+ EXTENDED: ExtendedProtocol
2214
2224
  };
2215
2225
 
2216
2226
  // src/interfaces/initializable.ts
@@ -18475,7 +18485,7 @@ var SenseiStrategies = [
18475
18485
  import { hash, num as num6, shortString } from "starknet";
18476
18486
 
18477
18487
  // src/strategies/universal-adapters/adapter-utils.ts
18478
- var SIMPLE_SANITIZER = ContractAddr.from("0x11b59e89b35dfceb3e48ec18c01f8ec569592026c275bcb58e22af9f4dedaac");
18488
+ var SIMPLE_SANITIZER = ContractAddr.from("0x3798dc4f83fdfad199e5236e3656cf2fb79bc50c00504d0dd41522e0f042072");
18479
18489
  function toBigInt(value) {
18480
18490
  if (typeof value === "string") {
18481
18491
  return BigInt(value);
@@ -18590,6 +18600,35 @@ var CommonAdapter = class extends BaseAdapter {
18590
18600
  };
18591
18601
  };
18592
18602
  }
18603
+ getBringLiquidityAdapter(id) {
18604
+ return () => ({
18605
+ leaf: this.constructSimpleLeafData({
18606
+ id,
18607
+ target: this.config.vaultAddress,
18608
+ method: "bring_liquidity",
18609
+ packedArguments: []
18610
+ }),
18611
+ callConstructor: this.getBringLiquidityCall().bind(this)
18612
+ });
18613
+ }
18614
+ getBringLiquidityCall() {
18615
+ return (params) => {
18616
+ const uint256Amount = uint2566.bnToUint256(params.amount.toWei());
18617
+ return {
18618
+ sanitizer: SIMPLE_SANITIZER,
18619
+ call: {
18620
+ contractAddress: this.config.vaultAddress,
18621
+ selector: hash2.getSelectorFromName("bring_liquidity"),
18622
+ calldata: [
18623
+ toBigInt(uint256Amount.low.toString()),
18624
+ // amount low
18625
+ toBigInt(uint256Amount.high.toString())
18626
+ // amount high
18627
+ ]
18628
+ }
18629
+ };
18630
+ };
18631
+ }
18593
18632
  };
18594
18633
 
18595
18634
  // src/strategies/universal-adapters/vesu-adapter.ts
@@ -21107,7 +21146,7 @@ var VesuAdapter = class _VesuAdapter extends BaseAdapter {
21107
21146
  }
21108
21147
  };
21109
21148
 
21110
- // src/strategies/universal-strategy.ts
21149
+ // src/strategies/universal-strategy.tsx
21111
21150
  import { CallData, Contract as Contract9, num as num9, uint256 as uint2568 } from "starknet";
21112
21151
 
21113
21152
  // src/data/universal-vault.abi.json
@@ -23313,7 +23352,8 @@ var vault_manager_abi_default = [
23313
23352
  }
23314
23353
  ];
23315
23354
 
23316
- // src/strategies/universal-strategy.ts
23355
+ // src/strategies/universal-strategy.tsx
23356
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
23317
23357
  var AUMTypes = /* @__PURE__ */ ((AUMTypes2) => {
23318
23358
  AUMTypes2["FINALISED"] = "finalised";
23319
23359
  AUMTypes2["DEFISPRING"] = "defispring";
@@ -23534,6 +23574,7 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
23534
23574
  const balance = await this.getUnusedBalance();
23535
23575
  logger.verbose(`${this.getTag()} unused balance: ${balance.amount.toNumber()}`);
23536
23576
  const vesuAum = leg1AUM[0].amount.plus(leg2AUM[0].usdValue / token1Price.price).minus(leg1AUM[1].usdValue / token1Price.price).minus(leg2AUM[1].amount);
23577
+ logger.verbose(`${this.getTag()} Vesu AUM: leg1: ${leg1AUM[0].amount.toNumber()}, ${leg1AUM[1].amount.toNumber()}, leg2: ${leg2AUM[0].amount.toNumber()}, ${leg2AUM[1].amount.toNumber()}`);
23537
23578
  const zeroAmt = Web3Number.fromWei("0", this.asset().decimals);
23538
23579
  const net = {
23539
23580
  tokenInfo: this.asset(),
@@ -23750,18 +23791,23 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
23750
23791
  logger.verbose(`${this.getTag()}:: leg1DepositAmount: ${params.leg1DepositAmount.toString()} ${vesuAdapter1.config.collateral.symbol}`);
23751
23792
  logger.verbose(`${this.getTag()}:: borrow1Amount: ${borrow1Amount.toString()} ${vesuAdapter1.config.debt.symbol}`);
23752
23793
  logger.verbose(`${this.getTag()}:: borrow2Amount: ${borrow2Amount.toString()} ${vesuAdapter2.config.debt.symbol}`);
23753
- const callSet1 = this.getVesuModifyPositionCalls({
23794
+ let callSet1 = this.getVesuModifyPositionCalls({
23754
23795
  isLeg1: true,
23755
23796
  isDeposit: params.isDeposit,
23756
23797
  depositAmount: params.leg1DepositAmount.plus(borrow2Amount),
23757
23798
  debtAmount: borrow1Amount
23758
23799
  });
23759
- const callSet2 = this.getVesuModifyPositionCalls({
23800
+ let callSet2 = this.getVesuModifyPositionCalls({
23760
23801
  isLeg1: false,
23761
23802
  isDeposit: params.isDeposit,
23762
23803
  depositAmount: borrow1Amount,
23763
23804
  debtAmount: borrow2Amount
23764
23805
  });
23806
+ if (!params.isDeposit) {
23807
+ let temp = callSet2;
23808
+ callSet2 = [...callSet1];
23809
+ callSet1 = [...temp];
23810
+ }
23765
23811
  const allActions = [...callSet1.map((i) => i.manageCall), ...callSet2.map((i) => i.manageCall)];
23766
23812
  const flashloanCalldata = CallData.compile([
23767
23813
  [...callSet1.map((i) => i.proofs), ...callSet2.map((i) => i.proofs)],
@@ -23779,6 +23825,18 @@ var UniversalStrategy = class _UniversalStrategy extends BaseStrategy {
23779
23825
  const manageCall = this.getManageCall(["flash_loan_init" /* FLASH_LOAN */], [manageCall1]);
23780
23826
  return manageCall;
23781
23827
  }
23828
+ async getBringLiquidityCall(params) {
23829
+ const manage1Info = this.getProofs("approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */);
23830
+ const manageCall1 = manage1Info.callConstructor({
23831
+ amount: params.amount
23832
+ });
23833
+ const manage2Info = this.getProofs("bring_liquidity" /* BRING_LIQUIDITY */);
23834
+ const manageCall2 = manage2Info.callConstructor({
23835
+ amount: params.amount
23836
+ });
23837
+ const manageCall = this.getManageCall(["approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */, "bring_liquidity" /* BRING_LIQUIDITY */], [manageCall1, manageCall2]);
23838
+ return manageCall;
23839
+ }
23782
23840
  async getRebalanceCall(params) {
23783
23841
  let callSet1 = this.getVesuModifyPositionCalls({
23784
23842
  isLeg1: true,
@@ -23813,6 +23871,8 @@ var UNIVERSAL_MANAGE_IDS = /* @__PURE__ */ ((UNIVERSAL_MANAGE_IDS2) => {
23813
23871
  UNIVERSAL_MANAGE_IDS2["VESU_LEG2"] = "vesu_leg2";
23814
23872
  UNIVERSAL_MANAGE_IDS2["APPROVE_TOKEN1"] = "approve_token1";
23815
23873
  UNIVERSAL_MANAGE_IDS2["APPROVE_TOKEN2"] = "approve_token2";
23874
+ UNIVERSAL_MANAGE_IDS2["APPROVE_BRING_LIQUIDITY"] = "approve_bring_liquidity";
23875
+ UNIVERSAL_MANAGE_IDS2["BRING_LIQUIDITY"] = "bring_liquidity";
23816
23876
  return UNIVERSAL_MANAGE_IDS2;
23817
23877
  })(UNIVERSAL_MANAGE_IDS || {});
23818
23878
  var UNIVERSAL_ADAPTERS = /* @__PURE__ */ ((UNIVERSAL_ADAPTERS2) => {
@@ -23827,7 +23887,9 @@ function getLooperSettings(token1Symbol, token2Symbol, vaultSettings, pool1, poo
23827
23887
  const commonAdapter = new CommonAdapter({
23828
23888
  manager: vaultSettings.manager,
23829
23889
  asset: USDCToken.address,
23830
- id: "flash_loan_init" /* FLASH_LOAN */
23890
+ id: "flash_loan_init" /* FLASH_LOAN */,
23891
+ vaultAddress: vaultSettings.vaultAddress,
23892
+ vaultAllocator: vaultSettings.vaultAllocator
23831
23893
  });
23832
23894
  const vesuAdapterUSDCETH = new VesuAdapter({
23833
23895
  poolId: pool1,
@@ -23858,13 +23920,17 @@ function getLooperSettings(token1Symbol, token2Symbol, vaultSettings, pool1, poo
23858
23920
  vaultSettings.leafAdapters.push(vesuAdapterETHUSDC.getModifyPosition.bind(vesuAdapterETHUSDC));
23859
23921
  vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vesuAdapterUSDCETH.VESU_SINGLETON, "approve_token1" /* APPROVE_TOKEN1 */).bind(commonAdapter));
23860
23922
  vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(ETHToken.address, vesuAdapterETHUSDC.VESU_SINGLETON, "approve_token2" /* APPROVE_TOKEN2 */).bind(commonAdapter));
23923
+ vaultSettings.leafAdapters.push(commonAdapter.getApproveAdapter(USDCToken.address, vaultSettings.vaultAddress, "approve_bring_liquidity" /* APPROVE_BRING_LIQUIDITY */).bind(commonAdapter));
23924
+ vaultSettings.leafAdapters.push(commonAdapter.getBringLiquidityAdapter("bring_liquidity" /* BRING_LIQUIDITY */).bind(commonAdapter));
23861
23925
  return vaultSettings;
23862
23926
  }
23863
23927
  var _riskFactor4 = [
23864
23928
  { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25, reason: "Audited by Zellic" },
23865
- { type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 1, weight: 50, reason: "Liquidation risk is mitigated btable price feed on Starknet" }
23929
+ { type: "Liquidation Risk" /* LIQUIDATION_RISK */, value: 1.5, weight: 50, reason: "Liquidation risk is mitigated by stable price feed on Starknet" },
23930
+ { type: "Technical Risk" /* TECHNICAL_RISK */, value: 1, weight: 50, reason: "Technical failures like risk monitoring failures" }
23866
23931
  ];
23867
23932
  var usdcVaultSettings = {
23933
+ vaultAddress: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
23868
23934
  manager: ContractAddr.from("0xf41a2b1f498a7f9629db0b8519259e66e964260a23d20003f3e42bb1997a07"),
23869
23935
  vaultAllocator: ContractAddr.from("0x228cca1005d3f2b55cbaba27cb291dacf1b9a92d1d6b1638195fbd3d0c1e3ba"),
23870
23936
  redeemRequestNFT: ContractAddr.from("0x906d03590010868cbf7590ad47043959d7af8e782089a605d9b22567b64fda"),
@@ -23875,6 +23941,7 @@ var usdcVaultSettings = {
23875
23941
  minHealthFactor: 1.25
23876
23942
  };
23877
23943
  var wbtcVaultSettings = {
23944
+ vaultAddress: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
23878
23945
  manager: ContractAddr.from("0xef8a664ffcfe46a6af550766d27c28937bf1b77fb4ab54d8553e92bca5ba34"),
23879
23946
  vaultAllocator: ContractAddr.from("0x1e01c25f0d9494570226ad28a7fa856c0640505e809c366a9fab4903320e735"),
23880
23947
  redeemRequestNFT: ContractAddr.from("0x4fec59a12f8424281c1e65a80b5de51b4e754625c60cddfcd00d46941ec37b2"),
@@ -23885,6 +23952,7 @@ var wbtcVaultSettings = {
23885
23952
  minHealthFactor: 1.25
23886
23953
  };
23887
23954
  var ethVaultSettings = {
23955
+ vaultAddress: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
23888
23956
  manager: ContractAddr.from("0x494888b37206616bd09d759dcda61e5118470b9aa7f58fb84f21c778a7b8f97"),
23889
23957
  vaultAllocator: ContractAddr.from("0x4acc0ad6bea58cb578d60ff7c31f06f44369a7a9a7bbfffe4701f143e427bd"),
23890
23958
  redeemRequestNFT: ContractAddr.from("0x2e6cd71e5060a254d4db00655e420db7bf89da7755bb0d5f922e2f00c76ac49"),
@@ -23895,6 +23963,7 @@ var ethVaultSettings = {
23895
23963
  minHealthFactor: 1.25
23896
23964
  };
23897
23965
  var strkVaultSettings = {
23966
+ vaultAddress: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
23898
23967
  manager: ContractAddr.from("0xcc6a5153ca56293405506eb20826a379d982cd738008ef7e808454d318fb81"),
23899
23968
  vaultAllocator: ContractAddr.from("0xf29d2f82e896c0ed74c9eff220af34ac148e8b99846d1ace9fbb02c9191d01"),
23900
23969
  redeemRequestNFT: ContractAddr.from("0x46902423bd632c428376b84fcee9cac5dbe016214e93a8103bcbde6e1de656b"),
@@ -23905,6 +23974,7 @@ var strkVaultSettings = {
23905
23974
  minHealthFactor: 1.25
23906
23975
  };
23907
23976
  var usdtVaultSettings = {
23977
+ vaultAddress: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
23908
23978
  manager: ContractAddr.from("0x39bb9843503799b552b7ed84b31c06e4ff10c0537edcddfbf01fe944b864029"),
23909
23979
  vaultAllocator: ContractAddr.from("0x56437d18c43727ac971f6c7086031cad7d9d6ccb340f4f3785a74cc791c931a"),
23910
23980
  redeemRequestNFT: ContractAddr.from("0x5af0c2a657eaa8e23ed78e855dac0c51e4f69e2cf91a18c472041a1f75bb41f"),
@@ -23914,10 +23984,143 @@ var usdtVaultSettings = {
23914
23984
  targetHealthFactor: 1.3,
23915
23985
  minHealthFactor: 1.25
23916
23986
  };
23987
+ function MetaVaultDescription() {
23988
+ const logos = {
23989
+ vesu: Protocols.VESU.logo,
23990
+ endur: Protocols.ENDUR.logo,
23991
+ extended: Protocols.EXTENDED.logo,
23992
+ ekubo: "https://dummyimage.com/64x64/ffffff/000000&text=K"
23993
+ };
23994
+ const sources = [
23995
+ { key: "vesu", name: "Vesu", status: "Live", description: "Integrated liquidity venue used for automated routing to capture the best available yield." },
23996
+ { key: "endur", name: "Endur", status: "Coming soon", description: "Planned integration to tap into STRK staking\u2013backed yields via our LST pipeline." },
23997
+ { key: "extended", name: "Extended", status: "Coming soon", description: "Expanding coverage to additional money markets and vaults across the ecosystem." }
23998
+ // { key: "ekubo", name: "Ekubo", status: "Coming soon", description: "Concentrated liquidity strategies targeted for optimized fee APR harvesting." },
23999
+ ];
24000
+ const containerStyle = {
24001
+ maxWidth: "800px",
24002
+ margin: "0 auto",
24003
+ backgroundColor: "#111",
24004
+ color: "#eee",
24005
+ fontFamily: "Arial, sans-serif",
24006
+ borderRadius: "12px"
24007
+ };
24008
+ const cardStyle = {
24009
+ border: "1px solid #333",
24010
+ borderRadius: "10px",
24011
+ padding: "12px",
24012
+ marginBottom: "12px",
24013
+ backgroundColor: "#1a1a1a"
24014
+ };
24015
+ const logoStyle = {
24016
+ width: "24px",
24017
+ height: "24px",
24018
+ borderRadius: "8px",
24019
+ border: "1px solid #444",
24020
+ backgroundColor: "#222"
24021
+ };
24022
+ return /* @__PURE__ */ jsxs3("div", { style: containerStyle, children: [
24023
+ /* @__PURE__ */ jsx4("h1", { style: { fontSize: "18px", marginBottom: "10px" }, children: "Meta Vault \u2014 Automated Yield Router" }),
24024
+ /* @__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." }),
24025
+ /* @__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: [
24026
+ /* @__PURE__ */ jsx4("strong", { children: "Withdrawals:" }),
24027
+ " Requests can take up to ",
24028
+ /* @__PURE__ */ jsx4("strong", { children: "1-2 hours" }),
24029
+ " to process as the vault unwinds and settles routing."
24030
+ ] }) }),
24031
+ /* @__PURE__ */ jsx4("h2", { style: { fontSize: "18px", marginBottom: "10px" }, children: "Supported Yield Sources" }),
24032
+ sources.map((s) => /* @__PURE__ */ jsx4("div", { style: cardStyle, children: /* @__PURE__ */ jsxs3("div", { style: { display: "flex", gap: "10px", alignItems: "flex-start" }, children: [
24033
+ /* @__PURE__ */ jsx4("img", { src: logos[s.key], alt: `${s.name} logo`, style: logoStyle }),
24034
+ /* @__PURE__ */ jsx4("div", { style: { flex: 1 }, children: /* @__PURE__ */ jsxs3("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
24035
+ /* @__PURE__ */ jsx4("h3", { style: { fontSize: "15px", margin: 0 }, children: s.name }),
24036
+ /* @__PURE__ */ jsx4(StatusBadge, { status: s.status })
24037
+ ] }) })
24038
+ ] }) }, s.key))
24039
+ ] });
24040
+ }
24041
+ function StatusBadge({ status }) {
24042
+ const isSoon = String(status).toLowerCase() !== "live";
24043
+ const badgeStyle = {
24044
+ fontSize: "12px",
24045
+ padding: "2px 6px",
24046
+ borderRadius: "12px",
24047
+ border: "1px solid",
24048
+ color: isSoon ? "rgb(196 196 195)" : "#6aff7d",
24049
+ borderColor: isSoon ? "#484848" : "#6aff7d",
24050
+ backgroundColor: isSoon ? "#424242" : "#002b1a"
24051
+ };
24052
+ return /* @__PURE__ */ jsx4("span", { style: badgeStyle, children: status });
24053
+ }
24054
+ function getDescription(tokenSymbol) {
24055
+ return MetaVaultDescription();
24056
+ }
24057
+ function getFAQs() {
24058
+ return [
24059
+ {
24060
+ question: "What is the Meta Vault?",
24061
+ 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."
24062
+ },
24063
+ {
24064
+ question: "How does yield allocation work?",
24065
+ 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."
24066
+ },
24067
+ {
24068
+ question: "Which yield sources are supported?",
24069
+ answer: /* @__PURE__ */ jsxs3("span", { children: [
24070
+ "Currently, ",
24071
+ /* @__PURE__ */ jsx4("strong", { children: "Vesu" }),
24072
+ " is live. Future integrations include",
24073
+ " ",
24074
+ /* @__PURE__ */ jsx4("strong", { children: "Endur" }),
24075
+ ", ",
24076
+ /* @__PURE__ */ jsx4("strong", { children: "Extended" }),
24077
+ ", and",
24078
+ " ",
24079
+ /* @__PURE__ */ jsx4("strong", { children: "Ekubo" }),
24080
+ " (all coming soon)."
24081
+ ] })
24082
+ },
24083
+ {
24084
+ question: "What do I receive when I deposit?",
24085
+ answer: "Depositors receive vault tokens representing their proportional share of the vault. These tokens entitle holders to both the principal and accrued yield."
24086
+ },
24087
+ {
24088
+ question: "How long do withdrawals take?",
24089
+ answer: "Withdrawals may take up to 1-2 hours to process, as the vault unwinds and settles liquidity routing across integrated protocols."
24090
+ },
24091
+ {
24092
+ question: "Is the Meta Vault non-custodial?",
24093
+ answer: "Yes. The Meta Vault operates entirely on-chain. Users always maintain control of their vault tokens, and the strategy is fully transparent."
24094
+ },
24095
+ {
24096
+ question: "How is risk managed?",
24097
+ 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."
24098
+ },
24099
+ {
24100
+ question: "Are there any fees?",
24101
+ 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."
24102
+ }
24103
+ ];
24104
+ }
24105
+ function getContractDetails(settings) {
24106
+ return [
24107
+ { address: settings.vaultAddress, name: "Vault" },
24108
+ { address: settings.manager, name: "Vault Manager" },
24109
+ { address: settings.vaultAllocator, name: "Vault Allocator" },
24110
+ { address: settings.redeemRequestNFT, name: "Redeem Request NFT" },
24111
+ { address: settings.aumOracle, name: "AUM Oracle" }
24112
+ ];
24113
+ }
24114
+ var investmentSteps = [
24115
+ "Deposit funds into the vault",
24116
+ "Vault manager allocates funds to optimal yield sources",
24117
+ "Vault manager reports asset under management (AUM) regularly to the vault",
24118
+ "Request withdrawal and vault manager processes it in 1-2 hours"
24119
+ ];
23917
24120
  var UniversalStrategies = [
23918
24121
  {
23919
24122
  name: "USDC Evergreen",
23920
- description: "A universal strategy for managing USDC assets",
24123
+ description: getDescription("USDC"),
23921
24124
  address: ContractAddr.from("0x7e6498cf6a1bfc7e6fc89f1831865e2dacb9756def4ec4b031a9138788a3b5e"),
23922
24125
  launchBlock: 0,
23923
24126
  type: "ERC4626",
@@ -23930,13 +24133,13 @@ var UniversalStrategies = [
23930
24133
  },
23931
24134
  protocols: [Protocols.VESU],
23932
24135
  maxTVL: Web3Number.fromWei(0, 6),
23933
- contractDetails: [],
23934
- faqs: [],
23935
- investmentSteps: []
24136
+ contractDetails: getContractDetails(usdcVaultSettings),
24137
+ faqs: getFAQs(),
24138
+ investmentSteps
23936
24139
  },
23937
24140
  {
23938
24141
  name: "WBTC Evergreen",
23939
- description: "A universal strategy for managing WBTC assets",
24142
+ description: getDescription("WBTC"),
23940
24143
  address: ContractAddr.from("0x5a4c1651b913aa2ea7afd9024911603152a19058624c3e425405370d62bf80c"),
23941
24144
  launchBlock: 0,
23942
24145
  type: "ERC4626",
@@ -23949,13 +24152,13 @@ var UniversalStrategies = [
23949
24152
  },
23950
24153
  protocols: [Protocols.VESU],
23951
24154
  maxTVL: Web3Number.fromWei(0, 8),
23952
- contractDetails: [],
23953
- faqs: [],
23954
- investmentSteps: []
24155
+ contractDetails: getContractDetails(wbtcVaultSettings),
24156
+ faqs: getFAQs(),
24157
+ investmentSteps
23955
24158
  },
23956
24159
  {
23957
24160
  name: "ETH Evergreen",
23958
- description: "A universal strategy for managing ETH assets",
24161
+ description: getDescription("ETH"),
23959
24162
  address: ContractAddr.from("0x446c22d4d3f5cb52b4950ba832ba1df99464c6673a37c092b1d9622650dbd8"),
23960
24163
  launchBlock: 0,
23961
24164
  type: "ERC4626",
@@ -23968,13 +24171,13 @@ var UniversalStrategies = [
23968
24171
  },
23969
24172
  protocols: [Protocols.VESU],
23970
24173
  maxTVL: Web3Number.fromWei(0, 18),
23971
- contractDetails: [],
23972
- faqs: [],
23973
- investmentSteps: []
24174
+ contractDetails: getContractDetails(ethVaultSettings),
24175
+ faqs: getFAQs(),
24176
+ investmentSteps
23974
24177
  },
23975
24178
  {
23976
24179
  name: "STRK Evergreen",
23977
- description: "A universal strategy for managing STRK assets",
24180
+ description: getDescription("STRK"),
23978
24181
  address: ContractAddr.from("0x55d012f57e58c96e0a5c7ebbe55853989d01e6538b15a95e7178aca4af05c21"),
23979
24182
  launchBlock: 0,
23980
24183
  type: "ERC4626",
@@ -23987,13 +24190,13 @@ var UniversalStrategies = [
23987
24190
  },
23988
24191
  protocols: [Protocols.VESU],
23989
24192
  maxTVL: Web3Number.fromWei(0, 18),
23990
- contractDetails: [],
23991
- faqs: [],
23992
- investmentSteps: []
24193
+ contractDetails: getContractDetails(strkVaultSettings),
24194
+ faqs: getFAQs(),
24195
+ investmentSteps
23993
24196
  },
23994
24197
  {
23995
24198
  name: "USDT Evergreen",
23996
- description: "A universal strategy for managing USDT assets",
24199
+ description: getDescription("USDT"),
23997
24200
  address: ContractAddr.from("0x1c4933d1880c6778585e597154eaca7b428579d72f3aae425ad2e4d26c6bb3"),
23998
24201
  launchBlock: 0,
23999
24202
  type: "ERC4626",
@@ -24006,9 +24209,9 @@ var UniversalStrategies = [
24006
24209
  },
24007
24210
  protocols: [Protocols.VESU],
24008
24211
  maxTVL: Web3Number.fromWei(0, 6),
24009
- contractDetails: [],
24010
- faqs: [],
24011
- investmentSteps: []
24212
+ contractDetails: getContractDetails(usdtVaultSettings),
24213
+ faqs: getFAQs(),
24214
+ investmentSteps
24012
24215
  }
24013
24216
  ];
24014
24217
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strkfarm/sdk",
3
- "version": "1.0.59",
3
+ "version": "1.0.60",
4
4
  "description": "STRKFarm TS SDK (Meant for our internal use, but feel free to use it)",
5
5
  "typings": "dist/index.d.ts",
6
6
  "types": "dist/index.d.ts",
@@ -146,7 +146,7 @@ export const getRiskExplaination = (riskType: RiskType) => {
146
146
 
147
147
  export const getRiskColor = (risk: RiskFactor) => {
148
148
  const value = risk.value;
149
- if (value <= 1) return "light_green_2";
149
+ if (value <= 2) return "light_green_2";
150
150
  if (value < 3) return "yellow";
151
151
  return "red";
152
152
  };
@@ -216,6 +216,18 @@ const VesuProtocol: IProtocol = {
216
216
  logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
217
217
  };
218
218
 
219
+ const EndurProtocol: IProtocol = {
220
+ name: "Endur",
221
+ logo: "http://endur.fi/logo.png"
222
+ }
223
+
224
+ const ExtendedProtocol: IProtocol = {
225
+ name: "Extended",
226
+ logo: "https://static-assets-8zct.onrender.com/integrations/extended/extended.svg"
227
+ };
228
+
219
229
  export const Protocols = {
220
230
  VESU: VesuProtocol,
231
+ ENDUR: EndurProtocol,
232
+ EXTENDED: ExtendedProtocol
221
233
  }
@@ -1,6 +1,6 @@
1
1
  import { ContractAddr } from "@/dataTypes";
2
2
 
3
- export const SIMPLE_SANITIZER = ContractAddr.from('0x11b59e89b35dfceb3e48ec18c01f8ec569592026c275bcb58e22af9f4dedaac');
3
+ export const SIMPLE_SANITIZER = ContractAddr.from('0x3798dc4f83fdfad199e5236e3656cf2fb79bc50c00504d0dd41522e0f042072');
4
4
 
5
5
  export function toBigInt(value: string | number): bigint {
6
6
  if (typeof value === 'string') {
@@ -14,6 +14,8 @@ export interface ApproveCallParams {
14
14
 
15
15
  export interface CommonAdapterConfig {
16
16
  id: string,
17
+ vaultAddress: ContractAddr,
18
+ vaultAllocator: ContractAddr,
17
19
  manager: ContractAddr,
18
20
  asset: ContractAddr
19
21
  }
@@ -93,4 +95,33 @@ export class CommonAdapter extends BaseAdapter {
93
95
  }
94
96
  }
95
97
  }
98
+
99
+ getBringLiquidityAdapter(id: string): () => AdapterLeafType<ApproveCallParams> {
100
+ return () => ({
101
+ leaf: this.constructSimpleLeafData({
102
+ id: id,
103
+ target: this.config.vaultAddress,
104
+ method: 'bring_liquidity',
105
+ packedArguments: []
106
+ }),
107
+ callConstructor: this.getBringLiquidityCall().bind(this)
108
+ });
109
+ }
110
+
111
+ getBringLiquidityCall() {
112
+ return (params: ApproveCallParams) => {
113
+ const uint256Amount = uint256.bnToUint256(params.amount.toWei());
114
+ return {
115
+ sanitizer: SIMPLE_SANITIZER,
116
+ call: {
117
+ contractAddress: this.config.vaultAddress,
118
+ selector: hash.getSelectorFromName('bring_liquidity'),
119
+ calldata: [
120
+ toBigInt(uint256Amount.low.toString()), // amount low
121
+ toBigInt(uint256Amount.high.toString()), // amount high
122
+ ]
123
+ }
124
+ }
125
+ }
126
+ }
96
127
  }