@strkfarm/sdk 1.0.37 → 1.0.38

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.mjs CHANGED
@@ -485,7 +485,9 @@ var RiskType = /* @__PURE__ */ ((RiskType2) => {
485
485
  })(RiskType || {});
486
486
  var getNoRiskTags = (risks) => {
487
487
  const noRisks1 = risks.filter((risk) => risk.value === 0).map((risk) => risk.type);
488
- const noRisks2 = Object.values(RiskType).filter((risk) => !risks.map((risk2) => risk2.type).includes(risk));
488
+ const noRisks2 = Object.values(RiskType).filter(
489
+ (risk) => !risks.map((risk2) => risk2.type).includes(risk)
490
+ );
489
491
  const mergedUnique = [.../* @__PURE__ */ new Set([...noRisks1, ...noRisks2])];
490
492
  return mergedUnique.map((risk) => `No ${risk}`);
491
493
  };
@@ -503,141 +505,267 @@ import axios5 from "axios";
503
505
  import { Contract as Contract4, num as num2 } from "starknet";
504
506
 
505
507
  // src/strategies/vesu-rebalance.tsx
508
+ import { jsx, jsxs } from "react/jsx-runtime";
506
509
  var _description = "Automatically diversify {{TOKEN}} holdings into different Vesu pools while reducing risk and maximizing yield. Defi spring STRK Rewards are auto-compounded as well.";
507
- var _protocol = { name: "Vesu", logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png" };
510
+ var _protocol = {
511
+ name: "Vesu",
512
+ logo: "https://static-assets-8zct.onrender.com/integrations/vesu/logo.png"
513
+ };
508
514
  var _riskFactor = [
509
515
  { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
510
516
  { type: "Counterparty Risk" /* COUNTERPARTY_RISK */, value: 1, weight: 50 },
511
517
  { type: "Oracle Risk" /* ORACLE_RISK */, value: 0.5, weight: 25 }
512
518
  ];
513
519
  var AUDIT_URL = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
514
- var VesuRebalanceStrategies = [{
515
- name: "Vesu Fusion STRK",
516
- description: _description.replace("{{TOKEN}}", "STRK"),
517
- address: ContractAddr.from("0x7fb5bcb8525954a60fde4e8fb8220477696ce7117ef264775a1770e23571929"),
518
- type: "ERC4626",
519
- depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "STRK")],
520
- protocols: [_protocol],
521
- auditUrl: AUDIT_URL,
522
- maxTVL: Web3Number.fromWei("0", 18),
523
- risk: {
524
- riskFactor: _riskFactor,
525
- netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
526
- notARisks: getNoRiskTags(_riskFactor)
520
+ var faqs = [
521
+ {
522
+ question: "What is the Vesu Rebalancing Strategy?",
523
+ answer: "The Vesu Rebalancing Strategy is an automated investment strategy that diversifies your holdings across multiple Vesu pools. It optimizes yield by rebalancing assets based on pool performance while adhering to risk constraints."
527
524
  },
528
- additionalInfo: {
529
- feeBps: 1e3
530
- }
531
- }, {
532
- name: "Vesu Fusion ETH",
533
- description: _description.replace("{{TOKEN}}", "ETH"),
534
- address: ContractAddr.from("0x5eaf5ee75231cecf79921ff8ded4b5ffe96be718bcb3daf206690ad1a9ad0ca"),
535
- type: "ERC4626",
536
- auditUrl: AUDIT_URL,
537
- depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "ETH")],
538
- protocols: [_protocol],
539
- maxTVL: Web3Number.fromWei("0", 18),
540
- risk: {
541
- riskFactor: _riskFactor,
542
- netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
543
- notARisks: getNoRiskTags(_riskFactor)
525
+ {
526
+ question: "Will I earn Vesu points?",
527
+ answer: "Yes, of course! You will earn Vesu points for your deposits."
544
528
  },
545
- additionalInfo: {
546
- feeBps: 1e3
547
- }
548
- }, {
549
- name: "Vesu Fusion USDC",
550
- description: _description.replace("{{TOKEN}}", "USDC"),
551
- address: ContractAddr.from("0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"),
552
- type: "ERC4626",
553
- auditUrl: AUDIT_URL,
554
- depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "USDC")],
555
- protocols: [_protocol],
556
- maxTVL: Web3Number.fromWei("0", 6),
557
- risk: {
558
- riskFactor: _riskFactor,
559
- netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
560
- notARisks: getNoRiskTags(_riskFactor)
529
+ {
530
+ question: "How does the strategy optimize yield?",
531
+ answer: "The strategy calculates the weighted average APY across all pools and reallocates assets to maximize returns. It prioritizes high-performing pools while ensuring compliance with maximum weight constraints."
532
+ },
533
+ {
534
+ question: "What are the risks associated with this strategy?",
535
+ answer: "The strategy involves usual DeFi risks such as smart contract vulnerabilities, counterparty risks, and oracle inaccuracies. However, we try our best to reduce these risks through audits and careful pool selection."
536
+ },
537
+ {
538
+ question: "How are fees calculated and deducted?",
539
+ answer: "Fees are calculated based on the performance of the strategy and deducted proportionally from the total assets. We charge a 10% performance fee and is already accounted in the APY shown."
540
+ },
541
+ {
542
+ question: "What happens if a pool exceeds its maximum weight?",
543
+ answer: "If a pool exceeds its maximum weight, the strategy rebalances by withdrawing excess funds and reallocating them to other pools with available capacity."
544
+ },
545
+ {
546
+ question: "Can I withdraw my assets at any time?",
547
+ answer: "Yes, you can withdraw your assets at any time. In rare circumstances, if debt utilisation is high for certain pools on Vesu, it may not be possible to withdraw until markets restore balance."
561
548
  },
562
- additionalInfo: {
563
- feeBps: 1e3
549
+ {
550
+ question: "What happens to my Defi Spring STRK rewards?",
551
+ answer: "STRK rewards are automatically harvested and reinvested into the strategy every week to maximize compounding returns."
552
+ },
553
+ {
554
+ question: "Is the strategy audited?",
555
+ answer: /* @__PURE__ */ jsxs("div", { children: [
556
+ "Yes, the strategy has been audited. You can review the audit report in our docs ",
557
+ /* @__PURE__ */ jsx("a", { href: "https://docs.strkfarm.com/p/strategies/vesu-fusion-rebalancing-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
558
+ "."
559
+ ] })
564
560
  }
565
- }, {
566
- name: "Vesu Fusion USDT",
567
- description: _description.replace("{{TOKEN}}", "USDT"),
568
- address: ContractAddr.from("0x115e94e722cfc4c77a2f15c4aefb0928c1c0029e5a57570df24c650cb7cec2c"),
569
- type: "ERC4626",
570
- depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "USDT")],
571
- auditUrl: AUDIT_URL,
572
- protocols: [_protocol],
573
- maxTVL: Web3Number.fromWei("0", 6),
574
- risk: {
575
- riskFactor: _riskFactor,
576
- netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
577
- notARisks: getNoRiskTags(_riskFactor)
561
+ ];
562
+ var VesuRebalanceStrategies = [
563
+ {
564
+ name: "Vesu Fusion STRK",
565
+ description: _description.replace("{{TOKEN}}", "STRK"),
566
+ address: ContractAddr.from(
567
+ "0x7fb5bcb8525954a60fde4e8fb8220477696ce7117ef264775a1770e23571929"
568
+ ),
569
+ type: "ERC4626",
570
+ depositTokens: [
571
+ Global.getDefaultTokens().find((t) => t.symbol === "STRK")
572
+ ],
573
+ protocols: [_protocol],
574
+ auditUrl: AUDIT_URL,
575
+ maxTVL: Web3Number.fromWei("0", 18),
576
+ risk: {
577
+ riskFactor: _riskFactor,
578
+ netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
579
+ notARisks: getNoRiskTags(_riskFactor)
580
+ },
581
+ additionalInfo: {
582
+ feeBps: 1e3
583
+ },
584
+ faqs
578
585
  },
579
- additionalInfo: {
580
- feeBps: 1e3
581
- }
582
- // }, {
583
- // name: 'Vesu Fusion WBTC',
584
- // description: _description.replace('{{TOKEN}}', 'WBTC'),
585
- // address: ContractAddr.from('0x778007f8136a5b827325d21613803e796bda4d676fbe1e34aeab0b2a2ec027f'),
586
- // type: 'ERC4626',
587
- // depositTokens: [Global.getDefaultTokens().find(t => t.symbol === 'WBTC')!],
588
- // auditUrl: AUDIT_URL,
589
- // protocols: [_protocol],
590
- // maxTVL: Web3Number.fromWei('0', 8),
591
- // risk: {
592
- // riskFactor: _riskFactor,
593
- // netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
594
- // },
595
- // additionalInfo: {
596
- // feeBps: 1000,
597
- // },
598
- }];
586
+ {
587
+ name: "Vesu Fusion ETH",
588
+ description: _description.replace("{{TOKEN}}", "ETH"),
589
+ address: ContractAddr.from(
590
+ "0x5eaf5ee75231cecf79921ff8ded4b5ffe96be718bcb3daf206690ad1a9ad0ca"
591
+ ),
592
+ type: "ERC4626",
593
+ auditUrl: AUDIT_URL,
594
+ depositTokens: [
595
+ Global.getDefaultTokens().find((t) => t.symbol === "ETH")
596
+ ],
597
+ protocols: [_protocol],
598
+ maxTVL: Web3Number.fromWei("0", 18),
599
+ risk: {
600
+ riskFactor: _riskFactor,
601
+ netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
602
+ notARisks: getNoRiskTags(_riskFactor)
603
+ },
604
+ additionalInfo: {
605
+ feeBps: 1e3
606
+ },
607
+ faqs
608
+ },
609
+ {
610
+ name: "Vesu Fusion USDC",
611
+ description: _description.replace("{{TOKEN}}", "USDC"),
612
+ address: ContractAddr.from(
613
+ "0xa858c97e9454f407d1bd7c57472fc8d8d8449a777c822b41d18e387816f29c"
614
+ ),
615
+ type: "ERC4626",
616
+ auditUrl: AUDIT_URL,
617
+ depositTokens: [
618
+ Global.getDefaultTokens().find((t) => t.symbol === "USDC")
619
+ ],
620
+ protocols: [_protocol],
621
+ maxTVL: Web3Number.fromWei("0", 6),
622
+ risk: {
623
+ riskFactor: _riskFactor,
624
+ netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
625
+ notARisks: getNoRiskTags(_riskFactor)
626
+ },
627
+ additionalInfo: {
628
+ feeBps: 1e3
629
+ },
630
+ faqs
631
+ },
632
+ {
633
+ name: "Vesu Fusion USDT",
634
+ description: _description.replace("{{TOKEN}}", "USDT"),
635
+ address: ContractAddr.from(
636
+ "0x115e94e722cfc4c77a2f15c4aefb0928c1c0029e5a57570df24c650cb7cec2c"
637
+ ),
638
+ type: "ERC4626",
639
+ depositTokens: [
640
+ Global.getDefaultTokens().find((t) => t.symbol === "USDT")
641
+ ],
642
+ auditUrl: AUDIT_URL,
643
+ protocols: [_protocol],
644
+ maxTVL: Web3Number.fromWei("0", 6),
645
+ risk: {
646
+ riskFactor: _riskFactor,
647
+ netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
648
+ notARisks: getNoRiskTags(_riskFactor)
649
+ },
650
+ additionalInfo: {
651
+ feeBps: 1e3
652
+ },
653
+ faqs
654
+ // }, {
655
+ // name: 'Vesu Fusion WBTC',
656
+ // description: _description.replace('{{TOKEN}}', 'WBTC'),
657
+ // address: ContractAddr.from('0x778007f8136a5b827325d21613803e796bda4d676fbe1e34aeab0b2a2ec027f'),
658
+ // type: 'ERC4626',
659
+ // depositTokens: [Global.getDefaultTokens().find(t => t.symbol === 'WBTC')!],
660
+ // auditUrl: AUDIT_URL,
661
+ // protocols: [_protocol],
662
+ // maxTVL: Web3Number.fromWei('0', 8),
663
+ // risk: {
664
+ // riskFactor: _riskFactor,
665
+ // netRisk: _riskFactor.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor.reduce((acc, curr) => acc + curr.weight, 0),
666
+ // },
667
+ // additionalInfo: {
668
+ // feeBps: 1000,
669
+ // },
670
+ }
671
+ ];
599
672
 
600
673
  // src/strategies/ekubo-cl-vault.tsx
601
- import { Contract as Contract6, num as num4, uint256 as uint2564 } from "starknet";
602
- import { jsx, jsxs } from "react/jsx-runtime";
674
+ import {
675
+ Contract as Contract6,
676
+ num as num4,
677
+ uint256 as uint2564
678
+ } from "starknet";
679
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
603
680
  var _description2 = "Deploys your {{POOL_NAME}} into an Ekubo liquidity pool, automatically rebalancing positions around the current price to optimize yield and reduce the need for manual adjustments. Trading fees and DeFi Spring rewards are automatically compounded back into the strategy. In return, you receive an ERC-20 token representing your share of the strategy. The APY is calculated based on 7-day historical performance.";
604
- var _protocol2 = { name: "Ekubo", logo: "https://app.ekubo.org/favicon.ico" };
681
+ var _protocol2 = {
682
+ name: "Ekubo",
683
+ logo: "https://app.ekubo.org/favicon.ico"
684
+ };
605
685
  var _riskFactor2 = [
606
686
  { type: "Smart Contract Risk" /* SMART_CONTRACT_RISK */, value: 0.5, weight: 25 },
607
687
  { type: "Impermanent Loss Risk" /* IMPERMANENT_LOSS */, value: 1, weight: 75 }
608
688
  ];
609
689
  var AUDIT_URL2 = "https://assets.strkfarm.com/strkfarm/audit_report_vesu_and_ekubo_strats.pdf";
610
- var EkuboCLVaultStrategies = [{
611
- name: "Ekubo xSTRK/STRK",
612
- description: /* @__PURE__ */ jsxs("div", { children: [
613
- /* @__PURE__ */ jsx("p", { children: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK") }),
614
- /* @__PURE__ */ jsxs("ul", { style: { marginLeft: "20px", listStyle: "circle", fontSize: "12px" }, children: [
615
- /* @__PURE__ */ jsx("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
616
- /* @__PURE__ */ jsx("li", { style: { marginTop: "10px" }, children: "Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
617
- ] })
618
- ] }),
619
- address: ContractAddr.from("0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"),
620
- type: "Other",
621
- // must be same order as poolKey token0 and token1
622
- depositTokens: [Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"), Global.getDefaultTokens().find((t) => t.symbol === "STRK")],
623
- protocols: [_protocol2],
624
- auditUrl: AUDIT_URL2,
625
- maxTVL: Web3Number.fromWei("0", 18),
626
- risk: {
627
- riskFactor: _riskFactor2,
628
- netRisk: _riskFactor2.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor2.reduce((acc, curr) => acc + curr.weight, 0),
629
- notARisks: getNoRiskTags(_riskFactor2)
690
+ var faqs2 = [
691
+ {
692
+ question: "What is the Ekubo CL Vault strategy?",
693
+ answer: "The Ekubo CL Vault strategy deploys your assets into an Ekubo liquidity pool, automatically rebalancing positions around the current price to optimize yield and reduce manual adjustments."
630
694
  },
631
- apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
632
- additionalInfo: {
633
- newBounds: {
634
- lower: -1,
635
- upper: 1
695
+ {
696
+ question: "How are trading fees and rewards handled?",
697
+ answer: "Trading fees and DeFi Spring rewards are automatically compounded back into the strategy, increasing your overall returns."
698
+ },
699
+ {
700
+ question: "What happens during withdrawal?",
701
+ answer: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices."
702
+ },
703
+ {
704
+ question: "Is the strategy audited?",
705
+ answer: /* @__PURE__ */ jsxs2("div", { children: [
706
+ "Yes, the strategy has been audited. You can review the audit report in our docs ",
707
+ /* @__PURE__ */ jsx2("a", { href: "https://docs.strkfarm.com/p/ekubo-cl-vaults#technical-details", style: { textDecoration: "underline", marginLeft: "5px" }, children: "Here" }),
708
+ "."
709
+ ] })
710
+ }
711
+ ];
712
+ var EkuboCLVaultStrategies = [
713
+ {
714
+ name: "Ekubo xSTRK/STRK",
715
+ description: /* @__PURE__ */ jsxs2("div", { children: [
716
+ /* @__PURE__ */ jsx2("p", { children: _description2.replace("{{POOL_NAME}}", "xSTRK/STRK") }),
717
+ /* @__PURE__ */ jsxs2(
718
+ "ul",
719
+ {
720
+ style: {
721
+ marginLeft: "20px",
722
+ listStyle: "circle",
723
+ fontSize: "12px"
724
+ },
725
+ children: [
726
+ /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "During withdrawal, you may receive either or both tokens depending on market conditions and prevailing prices." }),
727
+ /* @__PURE__ */ jsx2("li", { style: { marginTop: "10px" }, children: "Sometimes you might see a negative APY \u2014 this is usually not a big deal. It happens when xSTRK's price drops on DEXes, but things typically bounce back within a few days or a week." })
728
+ ]
729
+ }
730
+ )
731
+ ] }),
732
+ address: ContractAddr.from(
733
+ "0x01f083b98674bc21effee29ef443a00c7b9a500fd92cf30341a3da12c73f2324"
734
+ ),
735
+ type: "Other",
736
+ // must be same order as poolKey token0 and token1
737
+ depositTokens: [
738
+ Global.getDefaultTokens().find((t) => t.symbol === "xSTRK"),
739
+ Global.getDefaultTokens().find((t) => t.symbol === "STRK")
740
+ ],
741
+ protocols: [_protocol2],
742
+ auditUrl: AUDIT_URL2,
743
+ maxTVL: Web3Number.fromWei("0", 18),
744
+ risk: {
745
+ riskFactor: _riskFactor2,
746
+ netRisk: _riskFactor2.reduce((acc, curr) => acc + curr.value * curr.weight, 0) / _riskFactor2.reduce((acc, curr) => acc + curr.weight, 0),
747
+ notARisks: getNoRiskTags(_riskFactor2)
748
+ },
749
+ apyMethodology: "APY based on 7-day historical performance, including fees and rewards.",
750
+ additionalInfo: {
751
+ newBounds: {
752
+ lower: -1,
753
+ upper: 1
754
+ },
755
+ lstContract: ContractAddr.from(
756
+ "0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"
757
+ ),
758
+ feeBps: 1e3
636
759
  },
637
- lstContract: ContractAddr.from("0x028d709c875c0ceac3dce7065bec5328186dc89fe254527084d1689910954b0a"),
638
- feeBps: 1e3
760
+ faqs: [
761
+ ...faqs2,
762
+ {
763
+ question: "Why might I see a negative APY?",
764
+ answer: "A negative APY can occur when xSTRK's price drops on DEXes. This is usually temporary and tends to recover within a few days or a week."
765
+ }
766
+ ]
639
767
  }
640
- }];
768
+ ];
641
769
 
642
770
  // src/notifs/telegram.ts
643
771
  import TelegramBot from "node-telegram-bot-api";