@gearbox-protocol/sdk 0.0.51 → 0.0.54
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/lib/core/contracts.d.ts +2 -1
- package/lib/core/contracts.js +5 -4
- package/lib/core/token.js +350 -34
- package/lib/core/tradeTypes.d.ts +21 -6
- package/lib/core/tradeTypes.js +5 -2
- package/package.json +1 -1
- package/src/core/contracts.ts +8 -10
- package/src/core/token.ts +383 -67
- package/src/core/tradeTypes.ts +24 -6
package/src/core/token.ts
CHANGED
|
@@ -251,7 +251,12 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
251
251
|
type: TradeType.CurveExchange,
|
|
252
252
|
contract: "CURVE_3CRV_POOL",
|
|
253
253
|
tokenOut: ["USDC", "USDT"]
|
|
254
|
-
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: TradeType.CurveExchange,
|
|
257
|
+
contract: "CURVE_SUSD_POOL",
|
|
258
|
+
tokenOut: ["USDC", "USDT", "sUSD"]
|
|
259
|
+
},
|
|
255
260
|
],
|
|
256
261
|
lpActions: [
|
|
257
262
|
{
|
|
@@ -259,6 +264,11 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
259
264
|
contract: "CURVE_3CRV_POOL",
|
|
260
265
|
tokenOut: "3Crv"
|
|
261
266
|
},
|
|
267
|
+
{
|
|
268
|
+
type: TradeType.CurveDepositLP,
|
|
269
|
+
contract: "CURVE_SUSD_POOL",
|
|
270
|
+
tokenOut: "crvPlain3andSUSD"
|
|
271
|
+
},
|
|
262
272
|
{
|
|
263
273
|
type: TradeType.YearnDeposit,
|
|
264
274
|
contract: "YEARN_DAI_VAULT",
|
|
@@ -389,7 +399,29 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
389
399
|
type: TradeType.CurveExchange,
|
|
390
400
|
contract: "CURVE_3CRV_POOL",
|
|
391
401
|
tokenOut: ["DAI", "USDT"]
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
type: TradeType.CurveExchange,
|
|
405
|
+
contract: "CURVE_SUSD_POOL",
|
|
406
|
+
tokenOut: ["DAI", "USDT", "sUSD"]
|
|
392
407
|
}
|
|
408
|
+
],
|
|
409
|
+
lpActions: [
|
|
410
|
+
{
|
|
411
|
+
type: TradeType.CurveDepositLP,
|
|
412
|
+
contract: "CURVE_3CRV_POOL",
|
|
413
|
+
tokenOut: "3Crv"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
type: TradeType.CurveDepositLP,
|
|
417
|
+
contract: "CURVE_SUSD_POOL",
|
|
418
|
+
tokenOut: "crvPlain3andSUSD"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
type: TradeType.YearnDeposit,
|
|
422
|
+
contract: "YEARN_USDC_VAULT",
|
|
423
|
+
tokenOut: "yvUSDC"
|
|
424
|
+
}
|
|
393
425
|
]
|
|
394
426
|
},
|
|
395
427
|
|
|
@@ -413,7 +445,24 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
413
445
|
type: TradeType.CurveExchange,
|
|
414
446
|
contract: "CURVE_3CRV_POOL",
|
|
415
447
|
tokenOut: ["USDC", "DAI"]
|
|
416
|
-
}
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
type: TradeType.CurveExchange,
|
|
451
|
+
contract: "CURVE_SUSD_POOL",
|
|
452
|
+
tokenOut: ["DAI", "USDC", "sUSD"]
|
|
453
|
+
},
|
|
454
|
+
],
|
|
455
|
+
lpActions: [
|
|
456
|
+
{
|
|
457
|
+
type: TradeType.CurveDepositLP,
|
|
458
|
+
contract: "CURVE_3CRV_POOL",
|
|
459
|
+
tokenOut: "3Crv"
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
type: TradeType.CurveDepositLP,
|
|
463
|
+
contract: "CURVE_SUSD_POOL",
|
|
464
|
+
tokenOut: "crvPlain3andSUSD"
|
|
465
|
+
}
|
|
417
466
|
]
|
|
418
467
|
},
|
|
419
468
|
|
|
@@ -433,6 +482,13 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
433
482
|
type: TradeType.UniswapV2Swap,
|
|
434
483
|
contract: "SUSHISWAP_ROUTER"
|
|
435
484
|
}
|
|
485
|
+
],
|
|
486
|
+
lpActions: [
|
|
487
|
+
{
|
|
488
|
+
type: TradeType.YearnDeposit,
|
|
489
|
+
contract: "YEARN_WBTC_VAULT",
|
|
490
|
+
tokenOut: "yvWBTC"
|
|
491
|
+
}
|
|
436
492
|
]
|
|
437
493
|
},
|
|
438
494
|
|
|
@@ -457,7 +513,19 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
457
513
|
contract: "CURVE_STETH_GATEWAY",
|
|
458
514
|
tokenOut: ["STETH"]
|
|
459
515
|
}
|
|
460
|
-
|
|
516
|
+
],
|
|
517
|
+
lpActions: [
|
|
518
|
+
{
|
|
519
|
+
type: TradeType.YearnDeposit,
|
|
520
|
+
contract: "YEARN_WETH_VAULT",
|
|
521
|
+
tokenOut: "yvWETH"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
type: TradeType.CurveDepositLP,
|
|
525
|
+
contract: "CURVE_STETH_GATEWAY",
|
|
526
|
+
tokenOut: "steCRV"
|
|
527
|
+
},
|
|
528
|
+
]
|
|
461
529
|
},
|
|
462
530
|
|
|
463
531
|
YFI: {
|
|
@@ -484,11 +552,30 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
484
552
|
symbol: "STETH",
|
|
485
553
|
type: TokenType.NORMAL_TOKEN,
|
|
486
554
|
swapActions: [
|
|
487
|
-
|
|
555
|
+
{
|
|
556
|
+
type: TradeType.UniswapV3Swap,
|
|
557
|
+
contract: "UNISWAP_V3_ROUTER"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
type: TradeType.UniswapV2Swap,
|
|
561
|
+
contract: "UNISWAP_V2_ROUTER"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
type: TradeType.UniswapV2Swap,
|
|
565
|
+
contract: "SUSHISWAP_ROUTER"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
488
568
|
type: TradeType.CurveExchange,
|
|
489
569
|
contract: "CURVE_STETH_GATEWAY",
|
|
490
|
-
tokenOut: ["
|
|
491
|
-
|
|
570
|
+
tokenOut: ["WETH"]
|
|
571
|
+
}
|
|
572
|
+
],
|
|
573
|
+
lpActions: [
|
|
574
|
+
{
|
|
575
|
+
type: TradeType.CurveDepositLP,
|
|
576
|
+
contract: "CURVE_STETH_GATEWAY",
|
|
577
|
+
tokenOut: "steCRV"
|
|
578
|
+
},
|
|
492
579
|
]
|
|
493
580
|
},
|
|
494
581
|
|
|
@@ -507,11 +594,6 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
507
594
|
{
|
|
508
595
|
type: TradeType.UniswapV2Swap,
|
|
509
596
|
contract: "SUSHISWAP_ROUTER"
|
|
510
|
-
},
|
|
511
|
-
{
|
|
512
|
-
type: TradeType.CurveExchange,
|
|
513
|
-
contract: "CURVE_STETH_GATEWAY",
|
|
514
|
-
tokenOut: ["STETH"]
|
|
515
597
|
}
|
|
516
598
|
]
|
|
517
599
|
},
|
|
@@ -531,11 +613,6 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
531
613
|
{
|
|
532
614
|
type: TradeType.UniswapV2Swap,
|
|
533
615
|
contract: "SUSHISWAP_ROUTER"
|
|
534
|
-
},
|
|
535
|
-
{
|
|
536
|
-
type: TradeType.CurveExchange,
|
|
537
|
-
contract: "CURVE_STETH_GATEWAY",
|
|
538
|
-
tokenOut: ["STETH"]
|
|
539
616
|
}
|
|
540
617
|
]
|
|
541
618
|
},
|
|
@@ -561,6 +638,13 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
561
638
|
contract: "CURVE_FRAX_POOL",
|
|
562
639
|
tokenOut: ["3Crv"]
|
|
563
640
|
}
|
|
641
|
+
],
|
|
642
|
+
lpActions: [
|
|
643
|
+
{
|
|
644
|
+
type: TradeType.CurveDepositLP,
|
|
645
|
+
contract: "CURVE_FRAX_POOL",
|
|
646
|
+
tokenOut: "FRAX3CRV"
|
|
647
|
+
}
|
|
564
648
|
]
|
|
565
649
|
},
|
|
566
650
|
|
|
@@ -625,18 +709,30 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
625
709
|
symbol: "LUSD",
|
|
626
710
|
type: TokenType.NORMAL_TOKEN,
|
|
627
711
|
swapActions: [
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
712
|
+
{
|
|
713
|
+
type: TradeType.UniswapV3Swap,
|
|
714
|
+
contract: "UNISWAP_V3_ROUTER"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
type: TradeType.UniswapV2Swap,
|
|
718
|
+
contract: "UNISWAP_V2_ROUTER"
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
type: TradeType.UniswapV2Swap,
|
|
722
|
+
contract: "SUSHISWAP_ROUTER"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
type: TradeType.CurveExchange,
|
|
726
|
+
contract: "CURVE_LUSD_POOL",
|
|
727
|
+
tokenOut: ["3Crv"]
|
|
728
|
+
}
|
|
729
|
+
],
|
|
730
|
+
lpActions: [
|
|
731
|
+
{
|
|
732
|
+
type: TradeType.CurveDepositLP,
|
|
733
|
+
contract: "CURVE_LUSD_POOL",
|
|
734
|
+
tokenOut: "LUSD3CRV"
|
|
735
|
+
}
|
|
640
736
|
]
|
|
641
737
|
},
|
|
642
738
|
|
|
@@ -647,15 +743,27 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
647
743
|
{
|
|
648
744
|
type: TradeType.UniswapV3Swap,
|
|
649
745
|
contract: "UNISWAP_V3_ROUTER"
|
|
650
|
-
|
|
651
|
-
|
|
746
|
+
},
|
|
747
|
+
{
|
|
652
748
|
type: TradeType.UniswapV2Swap,
|
|
653
749
|
contract: "UNISWAP_V2_ROUTER"
|
|
654
|
-
|
|
655
|
-
|
|
750
|
+
},
|
|
751
|
+
{
|
|
656
752
|
type: TradeType.UniswapV2Swap,
|
|
657
753
|
contract: "SUSHISWAP_ROUTER"
|
|
658
|
-
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
type: TradeType.CurveExchange,
|
|
757
|
+
contract: "CURVE_SUSD_POOL",
|
|
758
|
+
tokenOut: ["DAI", "USDT", "USDC"]
|
|
759
|
+
}
|
|
760
|
+
],
|
|
761
|
+
lpActions: [
|
|
762
|
+
{
|
|
763
|
+
type: TradeType.CurveDepositLP,
|
|
764
|
+
contract: "CURVE_SUSD_POOL",
|
|
765
|
+
tokenOut: "crvPlain3andSUSD"
|
|
766
|
+
}
|
|
659
767
|
]
|
|
660
768
|
},
|
|
661
769
|
|
|
@@ -663,18 +771,30 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
663
771
|
symbol: "GUSD",
|
|
664
772
|
type: TokenType.NORMAL_TOKEN,
|
|
665
773
|
swapActions: [
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
774
|
+
{
|
|
775
|
+
type: TradeType.UniswapV3Swap,
|
|
776
|
+
contract: "UNISWAP_V3_ROUTER"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
type: TradeType.UniswapV2Swap,
|
|
780
|
+
contract: "UNISWAP_V2_ROUTER"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
type: TradeType.UniswapV2Swap,
|
|
784
|
+
contract: "SUSHISWAP_ROUTER"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
type: TradeType.CurveExchange,
|
|
788
|
+
contract: "CURVE_GUSD_POOL",
|
|
789
|
+
tokenOut: ["3Crv"]
|
|
790
|
+
}
|
|
791
|
+
],
|
|
792
|
+
lpActions: [
|
|
793
|
+
{
|
|
794
|
+
type: TradeType.CurveDepositLP,
|
|
795
|
+
contract: "CURVE_GUSD_POOL",
|
|
796
|
+
tokenOut: "gusd3CRV"
|
|
797
|
+
}
|
|
678
798
|
]
|
|
679
799
|
},
|
|
680
800
|
|
|
@@ -777,6 +897,16 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
777
897
|
type: TradeType.CurveWithdrawLP,
|
|
778
898
|
contract: "CURVE_3CRV_POOL",
|
|
779
899
|
tokenOut: ["DAI", "USDC", "USDT"]
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
type: TradeType.ConvexDepositLP,
|
|
903
|
+
contract: "CONVEX_BOOSTER",
|
|
904
|
+
tokenOut: "cvx3Crv"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
type: TradeType.ConvexDepositLPAndStake,
|
|
908
|
+
contract: "CONVEX_BOOSTER",
|
|
909
|
+
tokenOut: "stkcvx3Crv"
|
|
780
910
|
}
|
|
781
911
|
]
|
|
782
912
|
},
|
|
@@ -788,7 +918,17 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
788
918
|
{
|
|
789
919
|
type: TradeType.CurveWithdrawLP,
|
|
790
920
|
contract: "CURVE_STETH_GATEWAY",
|
|
791
|
-
tokenOut: ["STETH"]
|
|
921
|
+
tokenOut: ["STETH", "WETH"]
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
type: TradeType.ConvexDepositLP,
|
|
925
|
+
contract: "CONVEX_BOOSTER",
|
|
926
|
+
tokenOut: "cvxsteCRV"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
type: TradeType.ConvexDepositLPAndStake,
|
|
930
|
+
contract: "CONVEX_BOOSTER",
|
|
931
|
+
tokenOut: "stkcvxsteCRV"
|
|
792
932
|
}
|
|
793
933
|
]
|
|
794
934
|
},
|
|
@@ -796,26 +936,80 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
796
936
|
crvPlain3andSUSD: {
|
|
797
937
|
symbol: "crvPlain3andSUSD",
|
|
798
938
|
type: TokenType.CURVE_LP,
|
|
799
|
-
lpActions: [
|
|
939
|
+
lpActions: [
|
|
940
|
+
{
|
|
941
|
+
type: TradeType.CurveWithdrawLP,
|
|
942
|
+
contract: "CURVE_SUSD_POOL",
|
|
943
|
+
tokenOut: ["DAI", "USDC", "USDT", "sUSD"]
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
type: TradeType.ConvexDepositLP,
|
|
947
|
+
contract: "CONVEX_BOOSTER",
|
|
948
|
+
tokenOut: "cvxcrvPlain3andSUSD"
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
type: TradeType.ConvexDepositLPAndStake,
|
|
952
|
+
contract: "CONVEX_BOOSTER",
|
|
953
|
+
tokenOut: "stkcvxcrvPlain3andSUSD"
|
|
954
|
+
}
|
|
955
|
+
]
|
|
800
956
|
},
|
|
801
957
|
|
|
802
958
|
// META CURVE LP TOKENS
|
|
803
959
|
FRAX3CRV: {
|
|
804
960
|
symbol: "FRAX3CRV",
|
|
805
961
|
type: TokenType.META_CURVE_LP,
|
|
806
|
-
lpActions: [
|
|
962
|
+
lpActions: [
|
|
963
|
+
{
|
|
964
|
+
type: TradeType.CurveWithdrawLP,
|
|
965
|
+
contract: "CURVE_FRAX_POOL",
|
|
966
|
+
tokenOut: ["FRAX", "3Crv"]
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
type: TradeType.ConvexDepositLP,
|
|
970
|
+
contract: "CONVEX_BOOSTER",
|
|
971
|
+
tokenOut: "cvxFRAX3CRV"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
type: TradeType.ConvexDepositLPAndStake,
|
|
975
|
+
contract: "CONVEX_BOOSTER",
|
|
976
|
+
tokenOut: "stkcvxFRAX3CRV"
|
|
977
|
+
}
|
|
978
|
+
]
|
|
807
979
|
},
|
|
808
980
|
|
|
809
981
|
LUSD3CRV: {
|
|
810
982
|
symbol: "LUSD3CRV",
|
|
811
983
|
type: TokenType.META_CURVE_LP,
|
|
812
|
-
lpActions: [
|
|
984
|
+
lpActions: [
|
|
985
|
+
{
|
|
986
|
+
type: TradeType.CurveWithdrawLP,
|
|
987
|
+
contract: "CURVE_LUSD_POOL",
|
|
988
|
+
tokenOut: ["LUSD", "3Crv"]
|
|
989
|
+
}
|
|
990
|
+
]
|
|
813
991
|
},
|
|
814
992
|
|
|
815
993
|
gusd3CRV: {
|
|
816
994
|
symbol: "gusd3CRV",
|
|
817
995
|
type: TokenType.META_CURVE_LP,
|
|
818
|
-
lpActions: [
|
|
996
|
+
lpActions: [
|
|
997
|
+
{
|
|
998
|
+
type: TradeType.CurveWithdrawLP,
|
|
999
|
+
contract: "CURVE_GUSD_POOL",
|
|
1000
|
+
tokenOut: ["GUSD", "3Crv"]
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
type: TradeType.ConvexDepositLP,
|
|
1004
|
+
contract: "CONVEX_BOOSTER",
|
|
1005
|
+
tokenOut: "cvxgusd3CRV"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
type: TradeType.ConvexDepositLPAndStake,
|
|
1009
|
+
contract: "CONVEX_BOOSTER",
|
|
1010
|
+
tokenOut: "stkcvxgusd3CRV"
|
|
1011
|
+
}
|
|
1012
|
+
]
|
|
819
1013
|
},
|
|
820
1014
|
|
|
821
1015
|
// CONVEX LP TOKENS
|
|
@@ -825,7 +1019,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
825
1019
|
pool: "CONVEX_3CRV_POOL",
|
|
826
1020
|
underlying: "3Crv",
|
|
827
1021
|
stakedToken: "stkcvx3Crv",
|
|
828
|
-
lpActions: [
|
|
1022
|
+
lpActions: [
|
|
1023
|
+
{
|
|
1024
|
+
type: TradeType.ConvexWithdrawLP,
|
|
1025
|
+
contract: "CONVEX_BOOSTER",
|
|
1026
|
+
tokenOut: "3Crv"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
type: TradeType.ConvexStake,
|
|
1030
|
+
contract: "CONVEX_3CRV_POOL",
|
|
1031
|
+
tokenOut: "stkcvx3Crv"
|
|
1032
|
+
}
|
|
1033
|
+
]
|
|
829
1034
|
},
|
|
830
1035
|
|
|
831
1036
|
cvxsteCRV: {
|
|
@@ -834,7 +1039,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
834
1039
|
pool: "CONVEX_STECRV_POOL",
|
|
835
1040
|
underlying: "steCRV",
|
|
836
1041
|
stakedToken: "stkcvxsteCRV",
|
|
837
|
-
lpActions: [
|
|
1042
|
+
lpActions: [
|
|
1043
|
+
{
|
|
1044
|
+
type: TradeType.ConvexWithdrawLP,
|
|
1045
|
+
contract: "CONVEX_BOOSTER",
|
|
1046
|
+
tokenOut: "steCRV"
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
type: TradeType.ConvexStake,
|
|
1050
|
+
contract: "CONVEX_STECRV_POOL",
|
|
1051
|
+
tokenOut: "stkcvxsteCRV"
|
|
1052
|
+
}
|
|
1053
|
+
]
|
|
838
1054
|
},
|
|
839
1055
|
|
|
840
1056
|
cvxFRAX3CRV: {
|
|
@@ -843,7 +1059,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
843
1059
|
pool: "CONVEX_FRAX3CRV_POOL",
|
|
844
1060
|
underlying: "FRAX3CRV",
|
|
845
1061
|
stakedToken: "stkcvxFRAX3CRV",
|
|
846
|
-
lpActions: [
|
|
1062
|
+
lpActions: [
|
|
1063
|
+
{
|
|
1064
|
+
type: TradeType.ConvexWithdrawLP,
|
|
1065
|
+
contract: "CONVEX_BOOSTER",
|
|
1066
|
+
tokenOut: "FRAX3CRV"
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
type: TradeType.ConvexStake,
|
|
1070
|
+
contract: "CONVEX_FRAX3CRV_POOL",
|
|
1071
|
+
tokenOut: "stkcvxFRAX3CRV"
|
|
1072
|
+
}
|
|
1073
|
+
]
|
|
847
1074
|
},
|
|
848
1075
|
|
|
849
1076
|
cvxcrvPlain3andSUSD: {
|
|
@@ -852,7 +1079,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
852
1079
|
pool: "CONVEX_SUSD_POOL",
|
|
853
1080
|
underlying: "crvPlain3andSUSD",
|
|
854
1081
|
stakedToken: "stkcvxcrvPlain3andSUSD",
|
|
855
|
-
lpActions: [
|
|
1082
|
+
lpActions: [
|
|
1083
|
+
{
|
|
1084
|
+
type: TradeType.ConvexWithdrawLP,
|
|
1085
|
+
contract: "CONVEX_BOOSTER",
|
|
1086
|
+
tokenOut: "crvPlain3andSUSD"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
type: TradeType.ConvexStake,
|
|
1090
|
+
contract: "CONVEX_SUSD_POOL",
|
|
1091
|
+
tokenOut: "stkcvxcrvPlain3andSUSD"
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
856
1094
|
},
|
|
857
1095
|
|
|
858
1096
|
cvxgusd3CRV: {
|
|
@@ -861,7 +1099,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
861
1099
|
pool: "CONVEX_GUSD_POOL",
|
|
862
1100
|
underlying: "gusd3CRV",
|
|
863
1101
|
stakedToken: "stkcvxgusd3CRV",
|
|
864
|
-
lpActions: [
|
|
1102
|
+
lpActions: [
|
|
1103
|
+
{
|
|
1104
|
+
type: TradeType.ConvexWithdrawLP,
|
|
1105
|
+
contract: "CONVEX_BOOSTER",
|
|
1106
|
+
tokenOut: "gusd3CRV"
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
type: TradeType.ConvexStake,
|
|
1110
|
+
contract: "CONVEX_GUSD_POOL",
|
|
1111
|
+
tokenOut: "stkcvxgusd3CRV"
|
|
1112
|
+
}
|
|
1113
|
+
]
|
|
865
1114
|
},
|
|
866
1115
|
|
|
867
1116
|
// YEARN- CURVE TOKENS
|
|
@@ -869,13 +1118,25 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
869
1118
|
symbol: "yvCurve_stETH",
|
|
870
1119
|
type: TokenType.YEARN_VAULT_OF_CURVE_LP,
|
|
871
1120
|
underlying: "steCRV",
|
|
872
|
-
lpActions: [
|
|
1121
|
+
lpActions: [
|
|
1122
|
+
{
|
|
1123
|
+
type: TradeType.YearnWithdraw,
|
|
1124
|
+
contract: "YEARN_CURVE_STETH_VAULT",
|
|
1125
|
+
tokenOut: "steCRV"
|
|
1126
|
+
}
|
|
1127
|
+
]
|
|
873
1128
|
},
|
|
874
1129
|
yvCURVE_FRAX_POOL: {
|
|
875
1130
|
symbol: "yvCURVE_FRAX_POOL",
|
|
876
1131
|
type: TokenType.YEARN_VAULT_OF_META_CURVE_LP,
|
|
877
1132
|
underlying: "FRAX3CRV",
|
|
878
|
-
lpActions: [
|
|
1133
|
+
lpActions: [
|
|
1134
|
+
{
|
|
1135
|
+
type: TradeType.YearnWithdraw,
|
|
1136
|
+
contract: "YEARN_CURVE_FRAX_VAULT",
|
|
1137
|
+
tokenOut: "FRAX3CRV"
|
|
1138
|
+
}
|
|
1139
|
+
]
|
|
879
1140
|
},
|
|
880
1141
|
|
|
881
1142
|
// STAKED CONVEX
|
|
@@ -885,7 +1146,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
885
1146
|
pool: "CONVEX_3CRV_POOL",
|
|
886
1147
|
underlying: "3Crv",
|
|
887
1148
|
lpToken: "cvx3Crv",
|
|
888
|
-
lpActions: [
|
|
1149
|
+
lpActions: [
|
|
1150
|
+
{
|
|
1151
|
+
type: TradeType.ConvexWithdraw,
|
|
1152
|
+
contract: "CONVEX_3CRV_POOL",
|
|
1153
|
+
tokenOut: "cvx3Crv"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
type: TradeType.ConvexWithdrawAndUnwrap,
|
|
1157
|
+
contract: "CONVEX_3CRV_POOL",
|
|
1158
|
+
tokenOut: "3Crv"
|
|
1159
|
+
}
|
|
1160
|
+
]
|
|
889
1161
|
},
|
|
890
1162
|
stkcvxsteCRV: {
|
|
891
1163
|
symbol: "stkcvxsteCRV",
|
|
@@ -893,7 +1165,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
893
1165
|
pool: "CONVEX_STECRV_POOL",
|
|
894
1166
|
underlying: "steCRV",
|
|
895
1167
|
lpToken: "cvxsteCRV",
|
|
896
|
-
lpActions: [
|
|
1168
|
+
lpActions: [
|
|
1169
|
+
{
|
|
1170
|
+
type: TradeType.ConvexWithdraw,
|
|
1171
|
+
contract: "CONVEX_STECRV_POOL",
|
|
1172
|
+
tokenOut: "cvxsteCRV"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
type: TradeType.ConvexWithdrawAndUnwrap,
|
|
1176
|
+
contract: "CONVEX_STECRV_POOL",
|
|
1177
|
+
tokenOut: "steCRV"
|
|
1178
|
+
}
|
|
1179
|
+
]
|
|
897
1180
|
},
|
|
898
1181
|
stkcvxFRAX3CRV: {
|
|
899
1182
|
symbol: "stkcvxFRAX3CRV",
|
|
@@ -901,7 +1184,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
901
1184
|
pool: "CONVEX_FRAX3CRV_POOL",
|
|
902
1185
|
underlying: "FRAX3CRV",
|
|
903
1186
|
lpToken: "cvxFRAX3CRV",
|
|
904
|
-
lpActions: [
|
|
1187
|
+
lpActions: [
|
|
1188
|
+
{
|
|
1189
|
+
type: TradeType.ConvexWithdraw,
|
|
1190
|
+
contract: "CONVEX_FRAX3CRV_POOL",
|
|
1191
|
+
tokenOut: "cvxFRAX3CRV"
|
|
1192
|
+
},
|
|
1193
|
+
{
|
|
1194
|
+
type: TradeType.ConvexWithdrawAndUnwrap,
|
|
1195
|
+
contract: "CONVEX_FRAX3CRV_POOL",
|
|
1196
|
+
tokenOut: "FRAX3CRV"
|
|
1197
|
+
}
|
|
1198
|
+
]
|
|
905
1199
|
},
|
|
906
1200
|
stkcvxcrvPlain3andSUSD: {
|
|
907
1201
|
symbol: "stkcvxcrvPlain3andSUSD",
|
|
@@ -909,7 +1203,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
909
1203
|
pool: "CONVEX_SUSD_POOL",
|
|
910
1204
|
underlying: "crvPlain3andSUSD",
|
|
911
1205
|
lpToken: "cvxcrvPlain3andSUSD",
|
|
912
|
-
lpActions: [
|
|
1206
|
+
lpActions: [
|
|
1207
|
+
{
|
|
1208
|
+
type: TradeType.ConvexWithdraw,
|
|
1209
|
+
contract: "CONVEX_SUSD_POOL",
|
|
1210
|
+
tokenOut: "cvxcrvPlain3andSUSD"
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
type: TradeType.ConvexWithdrawAndUnwrap,
|
|
1214
|
+
contract: "CONVEX_SUSD_POOL",
|
|
1215
|
+
tokenOut: "crvPlain3andSUSD"
|
|
1216
|
+
}
|
|
1217
|
+
]
|
|
913
1218
|
},
|
|
914
1219
|
stkcvxgusd3CRV: {
|
|
915
1220
|
symbol: "stkcvxgusd3CRV",
|
|
@@ -917,7 +1222,18 @@ export const supportedTokens: Record<SupportedToken, TokenDataI> = {
|
|
|
917
1222
|
pool: "CONVEX_GUSD_POOL",
|
|
918
1223
|
underlying: "gusd3CRV",
|
|
919
1224
|
lpToken: "cvxgusd3CRV",
|
|
920
|
-
lpActions: [
|
|
1225
|
+
lpActions: [
|
|
1226
|
+
{
|
|
1227
|
+
type: TradeType.ConvexWithdraw,
|
|
1228
|
+
contract: "CONVEX_GUSD_POOL",
|
|
1229
|
+
tokenOut: "cvxgusd3CRV"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
type: TradeType.ConvexWithdrawAndUnwrap,
|
|
1233
|
+
contract: "CONVEX_GUSD_POOL",
|
|
1234
|
+
tokenOut: "gusd3CRV"
|
|
1235
|
+
}
|
|
1236
|
+
]
|
|
921
1237
|
}
|
|
922
1238
|
};
|
|
923
1239
|
|
|
@@ -981,11 +1297,11 @@ export const tokenDataByNetwork: Record<
|
|
|
981
1297
|
cvxgusd3CRV: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
|
|
982
1298
|
|
|
983
1299
|
// CONVEX PHANTOM TOKEN ADDRESSES
|
|
984
|
-
stkcvx3Crv: "",
|
|
985
|
-
stkcvxsteCRV: "",
|
|
986
|
-
stkcvxFRAX3CRV: "",
|
|
987
|
-
stkcvxcrvPlain3andSUSD: "",
|
|
988
|
-
stkcvxgusd3CRV: "",
|
|
1300
|
+
stkcvx3Crv: "0xDbA28Ee5b201AaE8E0BfE889E95cC8DC4559e02B",
|
|
1301
|
+
stkcvxsteCRV: "0xC0e0492f1157B051fEca7e34c089c6E45a1D6480",
|
|
1302
|
+
stkcvxFRAX3CRV: "0x6738e27899ffCF76aeadA4B4612CC4a07BD6562A",
|
|
1303
|
+
stkcvxcrvPlain3andSUSD: "0xdb2Bc1Fd98721bF4AD1bACE1Cab1cF5B4cf61d4c",
|
|
1304
|
+
stkcvxgusd3CRV: "0xc8124E539fD1F9E5E2F561f14aAAc5899681E274",
|
|
989
1305
|
|
|
990
1306
|
// YEARN- CURVE TOKENS
|
|
991
1307
|
yvCurve_stETH: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
|
package/src/core/tradeTypes.ts
CHANGED
|
@@ -22,9 +22,12 @@ export enum TradeType {
|
|
|
22
22
|
YearnDeposit,
|
|
23
23
|
YearnWithdraw,
|
|
24
24
|
LidoStake,
|
|
25
|
-
|
|
25
|
+
ConvexDepositLP,
|
|
26
26
|
ConvexStake,
|
|
27
|
-
|
|
27
|
+
ConvexDepositLPAndStake,
|
|
28
|
+
ConvexWithdrawLP,
|
|
29
|
+
ConvexWithdraw,
|
|
30
|
+
ConvexWithdrawAndUnwrap
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
export type TradeAction =
|
|
@@ -67,8 +70,8 @@ export type TradeAction =
|
|
|
67
70
|
tokenOut: NormalToken;
|
|
68
71
|
}
|
|
69
72
|
| {
|
|
70
|
-
type: TradeType.
|
|
71
|
-
contract:
|
|
73
|
+
type: TradeType.ConvexDepositLP;
|
|
74
|
+
contract: "CONVEX_BOOSTER";
|
|
72
75
|
tokenOut: ConvexLPToken;
|
|
73
76
|
}
|
|
74
77
|
| {
|
|
@@ -77,7 +80,22 @@ export type TradeAction =
|
|
|
77
80
|
tokenOut: ConvexStakedPhantomToken;
|
|
78
81
|
}
|
|
79
82
|
| {
|
|
80
|
-
type: TradeType.
|
|
81
|
-
contract:
|
|
83
|
+
type: TradeType.ConvexDepositLPAndStake;
|
|
84
|
+
contract: "CONVEX_BOOSTER";
|
|
82
85
|
tokenOut: ConvexStakedPhantomToken;
|
|
86
|
+
}
|
|
87
|
+
| {
|
|
88
|
+
type: TradeType.ConvexWithdrawLP;
|
|
89
|
+
contract: "CONVEX_BOOSTER";
|
|
90
|
+
tokenOut: CurveLPToken;
|
|
91
|
+
}
|
|
92
|
+
| {
|
|
93
|
+
type: TradeType.ConvexWithdraw;
|
|
94
|
+
contract: ConvexPoolContract;
|
|
95
|
+
tokenOut: ConvexLPToken;
|
|
96
|
+
}
|
|
97
|
+
| {
|
|
98
|
+
type: TradeType.ConvexWithdrawAndUnwrap;
|
|
99
|
+
contract: ConvexPoolContract;
|
|
100
|
+
tokenOut: CurveLPToken;
|
|
83
101
|
};
|