@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/lib/core/contracts.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AdapterInterface } from "./adapters";
|
|
2
2
|
import { NetworkType } from "./constants";
|
|
3
3
|
import { Protocols } from "./protocols";
|
|
4
|
-
import {
|
|
4
|
+
import { CurveLPToken, NormalToken, ConvexStakedPhantomToken } from "./token";
|
|
5
5
|
export declare type UniswapV2Contract = "UNISWAP_V2_ROUTER" | "SUSHISWAP_ROUTER";
|
|
6
6
|
export declare type CurvePoolContract = "CURVE_3CRV_POOL" | "CURVE_STETH_GATEWAY" | "CURVE_FRAX_POOL" | "CURVE_LUSD_POOL" | "CURVE_GUSD_POOL" | "CURVE_SUSD_POOL";
|
|
7
7
|
export declare type YearnVaultContract = "YEARN_DAI_VAULT" | "YEARN_USDC_VAULT" | "YEARN_WETH_VAULT" | "YEARN_WBTC_VAULT" | "YEARN_CURVE_FRAX_VAULT" | "YEARN_CURVE_STETH_VAULT";
|
|
@@ -13,6 +13,7 @@ export interface CurveSteCRVPoolParams {
|
|
|
13
13
|
protocol: Protocols.Curve;
|
|
14
14
|
type: AdapterInterface.CURVE_V1_STECRV_POOL;
|
|
15
15
|
pool: Record<NetworkType, string>;
|
|
16
|
+
lpToken: "steCRV";
|
|
16
17
|
}
|
|
17
18
|
export interface LidoParams {
|
|
18
19
|
protocol: Protocols.Lido;
|
package/lib/core/contracts.js
CHANGED
|
@@ -96,7 +96,8 @@ exports.contractParams = {
|
|
|
96
96
|
pool: {
|
|
97
97
|
Mainnet: "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022",
|
|
98
98
|
Kovan: "0xF695d3aa358D5087A0C157DBb9449d4f0d8E534a"
|
|
99
|
-
}
|
|
99
|
+
},
|
|
100
|
+
lpToken: "steCRV"
|
|
100
101
|
},
|
|
101
102
|
CURVE_FRAX_POOL: {
|
|
102
103
|
protocol: protocols_1.Protocols.Curve,
|
|
@@ -108,13 +109,13 @@ exports.contractParams = {
|
|
|
108
109
|
protocol: protocols_1.Protocols.Curve,
|
|
109
110
|
type: adapters_1.AdapterInterface.CURVE_V1_2ASSETS,
|
|
110
111
|
lpToken: "LUSD3CRV",
|
|
111
|
-
tokens: ["3Crv", "
|
|
112
|
+
tokens: ["3Crv", "LUSD"]
|
|
112
113
|
},
|
|
113
114
|
CURVE_SUSD_POOL: {
|
|
114
115
|
protocol: protocols_1.Protocols.Curve,
|
|
115
|
-
type: adapters_1.AdapterInterface.
|
|
116
|
+
type: adapters_1.AdapterInterface.CURVE_V1_4ASSETS,
|
|
116
117
|
lpToken: "crvPlain3andSUSD",
|
|
117
|
-
tokens: ["
|
|
118
|
+
tokens: ["DAI", "USDC", "USDT", "sUSD"]
|
|
118
119
|
},
|
|
119
120
|
CURVE_GUSD_POOL: {
|
|
120
121
|
protocol: protocols_1.Protocols.Curve,
|
package/lib/core/token.js
CHANGED
|
@@ -119,7 +119,12 @@ exports.supportedTokens = {
|
|
|
119
119
|
type: tradeTypes_1.TradeType.CurveExchange,
|
|
120
120
|
contract: "CURVE_3CRV_POOL",
|
|
121
121
|
tokenOut: ["USDC", "USDT"]
|
|
122
|
-
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: tradeTypes_1.TradeType.CurveExchange,
|
|
125
|
+
contract: "CURVE_SUSD_POOL",
|
|
126
|
+
tokenOut: ["USDC", "USDT", "sUSD"]
|
|
127
|
+
},
|
|
123
128
|
],
|
|
124
129
|
lpActions: [
|
|
125
130
|
{
|
|
@@ -127,6 +132,11 @@ exports.supportedTokens = {
|
|
|
127
132
|
contract: "CURVE_3CRV_POOL",
|
|
128
133
|
tokenOut: "3Crv"
|
|
129
134
|
},
|
|
135
|
+
{
|
|
136
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
137
|
+
contract: "CURVE_SUSD_POOL",
|
|
138
|
+
tokenOut: "crvPlain3andSUSD"
|
|
139
|
+
},
|
|
130
140
|
{
|
|
131
141
|
type: tradeTypes_1.TradeType.YearnDeposit,
|
|
132
142
|
contract: "YEARN_DAI_VAULT",
|
|
@@ -250,6 +260,28 @@ exports.supportedTokens = {
|
|
|
250
260
|
type: tradeTypes_1.TradeType.CurveExchange,
|
|
251
261
|
contract: "CURVE_3CRV_POOL",
|
|
252
262
|
tokenOut: ["DAI", "USDT"]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
type: tradeTypes_1.TradeType.CurveExchange,
|
|
266
|
+
contract: "CURVE_SUSD_POOL",
|
|
267
|
+
tokenOut: ["DAI", "USDT", "sUSD"]
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
lpActions: [
|
|
271
|
+
{
|
|
272
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
273
|
+
contract: "CURVE_3CRV_POOL",
|
|
274
|
+
tokenOut: "3Crv"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
278
|
+
contract: "CURVE_SUSD_POOL",
|
|
279
|
+
tokenOut: "crvPlain3andSUSD"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
type: tradeTypes_1.TradeType.YearnDeposit,
|
|
283
|
+
contract: "YEARN_USDC_VAULT",
|
|
284
|
+
tokenOut: "yvUSDC"
|
|
253
285
|
}
|
|
254
286
|
]
|
|
255
287
|
},
|
|
@@ -273,6 +305,23 @@ exports.supportedTokens = {
|
|
|
273
305
|
type: tradeTypes_1.TradeType.CurveExchange,
|
|
274
306
|
contract: "CURVE_3CRV_POOL",
|
|
275
307
|
tokenOut: ["USDC", "DAI"]
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
type: tradeTypes_1.TradeType.CurveExchange,
|
|
311
|
+
contract: "CURVE_SUSD_POOL",
|
|
312
|
+
tokenOut: ["DAI", "USDC", "sUSD"]
|
|
313
|
+
},
|
|
314
|
+
],
|
|
315
|
+
lpActions: [
|
|
316
|
+
{
|
|
317
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
318
|
+
contract: "CURVE_3CRV_POOL",
|
|
319
|
+
tokenOut: "3Crv"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
323
|
+
contract: "CURVE_SUSD_POOL",
|
|
324
|
+
tokenOut: "crvPlain3andSUSD"
|
|
276
325
|
}
|
|
277
326
|
]
|
|
278
327
|
},
|
|
@@ -292,6 +341,13 @@ exports.supportedTokens = {
|
|
|
292
341
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
293
342
|
contract: "SUSHISWAP_ROUTER"
|
|
294
343
|
}
|
|
344
|
+
],
|
|
345
|
+
lpActions: [
|
|
346
|
+
{
|
|
347
|
+
type: tradeTypes_1.TradeType.YearnDeposit,
|
|
348
|
+
contract: "YEARN_WBTC_VAULT",
|
|
349
|
+
tokenOut: "yvWBTC"
|
|
350
|
+
}
|
|
295
351
|
]
|
|
296
352
|
},
|
|
297
353
|
WETH: {
|
|
@@ -315,6 +371,18 @@ exports.supportedTokens = {
|
|
|
315
371
|
contract: "CURVE_STETH_GATEWAY",
|
|
316
372
|
tokenOut: ["STETH"]
|
|
317
373
|
}
|
|
374
|
+
],
|
|
375
|
+
lpActions: [
|
|
376
|
+
{
|
|
377
|
+
type: tradeTypes_1.TradeType.YearnDeposit,
|
|
378
|
+
contract: "YEARN_WETH_VAULT",
|
|
379
|
+
tokenOut: "yvWETH"
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
383
|
+
contract: "CURVE_STETH_GATEWAY",
|
|
384
|
+
tokenOut: "steCRV"
|
|
385
|
+
},
|
|
318
386
|
]
|
|
319
387
|
},
|
|
320
388
|
YFI: {
|
|
@@ -340,11 +408,30 @@ exports.supportedTokens = {
|
|
|
340
408
|
symbol: "STETH",
|
|
341
409
|
type: TokenType.NORMAL_TOKEN,
|
|
342
410
|
swapActions: [
|
|
411
|
+
{
|
|
412
|
+
type: tradeTypes_1.TradeType.UniswapV3Swap,
|
|
413
|
+
contract: "UNISWAP_V3_ROUTER"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
417
|
+
contract: "UNISWAP_V2_ROUTER"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
421
|
+
contract: "SUSHISWAP_ROUTER"
|
|
422
|
+
},
|
|
343
423
|
{
|
|
344
424
|
type: tradeTypes_1.TradeType.CurveExchange,
|
|
345
425
|
contract: "CURVE_STETH_GATEWAY",
|
|
346
|
-
tokenOut: ["
|
|
426
|
+
tokenOut: ["WETH"]
|
|
347
427
|
}
|
|
428
|
+
],
|
|
429
|
+
lpActions: [
|
|
430
|
+
{
|
|
431
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
432
|
+
contract: "CURVE_STETH_GATEWAY",
|
|
433
|
+
tokenOut: "steCRV"
|
|
434
|
+
},
|
|
348
435
|
]
|
|
349
436
|
},
|
|
350
437
|
FTM: {
|
|
@@ -362,11 +449,6 @@ exports.supportedTokens = {
|
|
|
362
449
|
{
|
|
363
450
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
364
451
|
contract: "SUSHISWAP_ROUTER"
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
type: tradeTypes_1.TradeType.CurveExchange,
|
|
368
|
-
contract: "CURVE_STETH_GATEWAY",
|
|
369
|
-
tokenOut: ["STETH"]
|
|
370
452
|
}
|
|
371
453
|
]
|
|
372
454
|
},
|
|
@@ -385,11 +467,6 @@ exports.supportedTokens = {
|
|
|
385
467
|
{
|
|
386
468
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
387
469
|
contract: "SUSHISWAP_ROUTER"
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
type: tradeTypes_1.TradeType.CurveExchange,
|
|
391
|
-
contract: "CURVE_STETH_GATEWAY",
|
|
392
|
-
tokenOut: ["STETH"]
|
|
393
470
|
}
|
|
394
471
|
]
|
|
395
472
|
},
|
|
@@ -414,6 +491,13 @@ exports.supportedTokens = {
|
|
|
414
491
|
contract: "CURVE_FRAX_POOL",
|
|
415
492
|
tokenOut: ["3Crv"]
|
|
416
493
|
}
|
|
494
|
+
],
|
|
495
|
+
lpActions: [
|
|
496
|
+
{
|
|
497
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
498
|
+
contract: "CURVE_FRAX_POOL",
|
|
499
|
+
tokenOut: "FRAX3CRV"
|
|
500
|
+
}
|
|
417
501
|
]
|
|
418
502
|
},
|
|
419
503
|
FXS: {
|
|
@@ -485,6 +569,18 @@ exports.supportedTokens = {
|
|
|
485
569
|
{
|
|
486
570
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
487
571
|
contract: "SUSHISWAP_ROUTER"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
type: tradeTypes_1.TradeType.CurveExchange,
|
|
575
|
+
contract: "CURVE_LUSD_POOL",
|
|
576
|
+
tokenOut: ["3Crv"]
|
|
577
|
+
}
|
|
578
|
+
],
|
|
579
|
+
lpActions: [
|
|
580
|
+
{
|
|
581
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
582
|
+
contract: "CURVE_LUSD_POOL",
|
|
583
|
+
tokenOut: "LUSD3CRV"
|
|
488
584
|
}
|
|
489
585
|
]
|
|
490
586
|
},
|
|
@@ -503,6 +599,18 @@ exports.supportedTokens = {
|
|
|
503
599
|
{
|
|
504
600
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
505
601
|
contract: "SUSHISWAP_ROUTER"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
type: tradeTypes_1.TradeType.CurveExchange,
|
|
605
|
+
contract: "CURVE_SUSD_POOL",
|
|
606
|
+
tokenOut: ["DAI", "USDT", "USDC"]
|
|
607
|
+
}
|
|
608
|
+
],
|
|
609
|
+
lpActions: [
|
|
610
|
+
{
|
|
611
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
612
|
+
contract: "CURVE_SUSD_POOL",
|
|
613
|
+
tokenOut: "crvPlain3andSUSD"
|
|
506
614
|
}
|
|
507
615
|
]
|
|
508
616
|
},
|
|
@@ -521,6 +629,18 @@ exports.supportedTokens = {
|
|
|
521
629
|
{
|
|
522
630
|
type: tradeTypes_1.TradeType.UniswapV2Swap,
|
|
523
631
|
contract: "SUSHISWAP_ROUTER"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
type: tradeTypes_1.TradeType.CurveExchange,
|
|
635
|
+
contract: "CURVE_GUSD_POOL",
|
|
636
|
+
tokenOut: ["3Crv"]
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
lpActions: [
|
|
640
|
+
{
|
|
641
|
+
type: tradeTypes_1.TradeType.CurveDepositLP,
|
|
642
|
+
contract: "CURVE_GUSD_POOL",
|
|
643
|
+
tokenOut: "gusd3CRV"
|
|
524
644
|
}
|
|
525
645
|
]
|
|
526
646
|
},
|
|
@@ -618,6 +738,16 @@ exports.supportedTokens = {
|
|
|
618
738
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
619
739
|
contract: "CURVE_3CRV_POOL",
|
|
620
740
|
tokenOut: ["DAI", "USDC", "USDT"]
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
type: tradeTypes_1.TradeType.ConvexDepositLP,
|
|
744
|
+
contract: "CONVEX_BOOSTER",
|
|
745
|
+
tokenOut: "cvx3Crv"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
type: tradeTypes_1.TradeType.ConvexDepositLPAndStake,
|
|
749
|
+
contract: "CONVEX_BOOSTER",
|
|
750
|
+
tokenOut: "stkcvx3Crv"
|
|
621
751
|
}
|
|
622
752
|
]
|
|
623
753
|
},
|
|
@@ -628,30 +758,94 @@ exports.supportedTokens = {
|
|
|
628
758
|
{
|
|
629
759
|
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
630
760
|
contract: "CURVE_STETH_GATEWAY",
|
|
631
|
-
tokenOut: ["STETH"]
|
|
761
|
+
tokenOut: ["STETH", "WETH"]
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
type: tradeTypes_1.TradeType.ConvexDepositLP,
|
|
765
|
+
contract: "CONVEX_BOOSTER",
|
|
766
|
+
tokenOut: "cvxsteCRV"
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
type: tradeTypes_1.TradeType.ConvexDepositLPAndStake,
|
|
770
|
+
contract: "CONVEX_BOOSTER",
|
|
771
|
+
tokenOut: "stkcvxsteCRV"
|
|
632
772
|
}
|
|
633
773
|
]
|
|
634
774
|
},
|
|
635
775
|
crvPlain3andSUSD: {
|
|
636
776
|
symbol: "crvPlain3andSUSD",
|
|
637
777
|
type: TokenType.CURVE_LP,
|
|
638
|
-
lpActions: [
|
|
778
|
+
lpActions: [
|
|
779
|
+
{
|
|
780
|
+
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
781
|
+
contract: "CURVE_SUSD_POOL",
|
|
782
|
+
tokenOut: ["DAI", "USDC", "USDT", "sUSD"]
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
type: tradeTypes_1.TradeType.ConvexDepositLP,
|
|
786
|
+
contract: "CONVEX_BOOSTER",
|
|
787
|
+
tokenOut: "cvxcrvPlain3andSUSD"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
type: tradeTypes_1.TradeType.ConvexDepositLPAndStake,
|
|
791
|
+
contract: "CONVEX_BOOSTER",
|
|
792
|
+
tokenOut: "stkcvxcrvPlain3andSUSD"
|
|
793
|
+
}
|
|
794
|
+
]
|
|
639
795
|
},
|
|
640
796
|
// META CURVE LP TOKENS
|
|
641
797
|
FRAX3CRV: {
|
|
642
798
|
symbol: "FRAX3CRV",
|
|
643
799
|
type: TokenType.META_CURVE_LP,
|
|
644
|
-
lpActions: [
|
|
800
|
+
lpActions: [
|
|
801
|
+
{
|
|
802
|
+
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
803
|
+
contract: "CURVE_FRAX_POOL",
|
|
804
|
+
tokenOut: ["FRAX", "3Crv"]
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
type: tradeTypes_1.TradeType.ConvexDepositLP,
|
|
808
|
+
contract: "CONVEX_BOOSTER",
|
|
809
|
+
tokenOut: "cvxFRAX3CRV"
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
type: tradeTypes_1.TradeType.ConvexDepositLPAndStake,
|
|
813
|
+
contract: "CONVEX_BOOSTER",
|
|
814
|
+
tokenOut: "stkcvxFRAX3CRV"
|
|
815
|
+
}
|
|
816
|
+
]
|
|
645
817
|
},
|
|
646
818
|
LUSD3CRV: {
|
|
647
819
|
symbol: "LUSD3CRV",
|
|
648
820
|
type: TokenType.META_CURVE_LP,
|
|
649
|
-
lpActions: [
|
|
821
|
+
lpActions: [
|
|
822
|
+
{
|
|
823
|
+
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
824
|
+
contract: "CURVE_LUSD_POOL",
|
|
825
|
+
tokenOut: ["LUSD", "3Crv"]
|
|
826
|
+
}
|
|
827
|
+
]
|
|
650
828
|
},
|
|
651
829
|
gusd3CRV: {
|
|
652
830
|
symbol: "gusd3CRV",
|
|
653
831
|
type: TokenType.META_CURVE_LP,
|
|
654
|
-
lpActions: [
|
|
832
|
+
lpActions: [
|
|
833
|
+
{
|
|
834
|
+
type: tradeTypes_1.TradeType.CurveWithdrawLP,
|
|
835
|
+
contract: "CURVE_GUSD_POOL",
|
|
836
|
+
tokenOut: ["GUSD", "3Crv"]
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
type: tradeTypes_1.TradeType.ConvexDepositLP,
|
|
840
|
+
contract: "CONVEX_BOOSTER",
|
|
841
|
+
tokenOut: "cvxgusd3CRV"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
type: tradeTypes_1.TradeType.ConvexDepositLPAndStake,
|
|
845
|
+
contract: "CONVEX_BOOSTER",
|
|
846
|
+
tokenOut: "stkcvxgusd3CRV"
|
|
847
|
+
}
|
|
848
|
+
]
|
|
655
849
|
},
|
|
656
850
|
// CONVEX LP TOKENS
|
|
657
851
|
cvx3Crv: {
|
|
@@ -660,7 +854,18 @@ exports.supportedTokens = {
|
|
|
660
854
|
pool: "CONVEX_3CRV_POOL",
|
|
661
855
|
underlying: "3Crv",
|
|
662
856
|
stakedToken: "stkcvx3Crv",
|
|
663
|
-
lpActions: [
|
|
857
|
+
lpActions: [
|
|
858
|
+
{
|
|
859
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawLP,
|
|
860
|
+
contract: "CONVEX_BOOSTER",
|
|
861
|
+
tokenOut: "3Crv"
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
type: tradeTypes_1.TradeType.ConvexStake,
|
|
865
|
+
contract: "CONVEX_3CRV_POOL",
|
|
866
|
+
tokenOut: "stkcvx3Crv"
|
|
867
|
+
}
|
|
868
|
+
]
|
|
664
869
|
},
|
|
665
870
|
cvxsteCRV: {
|
|
666
871
|
symbol: "cvxsteCRV",
|
|
@@ -668,7 +873,18 @@ exports.supportedTokens = {
|
|
|
668
873
|
pool: "CONVEX_STECRV_POOL",
|
|
669
874
|
underlying: "steCRV",
|
|
670
875
|
stakedToken: "stkcvxsteCRV",
|
|
671
|
-
lpActions: [
|
|
876
|
+
lpActions: [
|
|
877
|
+
{
|
|
878
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawLP,
|
|
879
|
+
contract: "CONVEX_BOOSTER",
|
|
880
|
+
tokenOut: "steCRV"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
type: tradeTypes_1.TradeType.ConvexStake,
|
|
884
|
+
contract: "CONVEX_STECRV_POOL",
|
|
885
|
+
tokenOut: "stkcvxsteCRV"
|
|
886
|
+
}
|
|
887
|
+
]
|
|
672
888
|
},
|
|
673
889
|
cvxFRAX3CRV: {
|
|
674
890
|
symbol: "cvxFRAX3CRV",
|
|
@@ -676,7 +892,18 @@ exports.supportedTokens = {
|
|
|
676
892
|
pool: "CONVEX_FRAX3CRV_POOL",
|
|
677
893
|
underlying: "FRAX3CRV",
|
|
678
894
|
stakedToken: "stkcvxFRAX3CRV",
|
|
679
|
-
lpActions: [
|
|
895
|
+
lpActions: [
|
|
896
|
+
{
|
|
897
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawLP,
|
|
898
|
+
contract: "CONVEX_BOOSTER",
|
|
899
|
+
tokenOut: "FRAX3CRV"
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
type: tradeTypes_1.TradeType.ConvexStake,
|
|
903
|
+
contract: "CONVEX_FRAX3CRV_POOL",
|
|
904
|
+
tokenOut: "stkcvxFRAX3CRV"
|
|
905
|
+
}
|
|
906
|
+
]
|
|
680
907
|
},
|
|
681
908
|
cvxcrvPlain3andSUSD: {
|
|
682
909
|
symbol: "cvxcrvPlain3andSUSD",
|
|
@@ -684,7 +911,18 @@ exports.supportedTokens = {
|
|
|
684
911
|
pool: "CONVEX_SUSD_POOL",
|
|
685
912
|
underlying: "crvPlain3andSUSD",
|
|
686
913
|
stakedToken: "stkcvxcrvPlain3andSUSD",
|
|
687
|
-
lpActions: [
|
|
914
|
+
lpActions: [
|
|
915
|
+
{
|
|
916
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawLP,
|
|
917
|
+
contract: "CONVEX_BOOSTER",
|
|
918
|
+
tokenOut: "crvPlain3andSUSD"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
type: tradeTypes_1.TradeType.ConvexStake,
|
|
922
|
+
contract: "CONVEX_SUSD_POOL",
|
|
923
|
+
tokenOut: "stkcvxcrvPlain3andSUSD"
|
|
924
|
+
}
|
|
925
|
+
]
|
|
688
926
|
},
|
|
689
927
|
cvxgusd3CRV: {
|
|
690
928
|
symbol: "cvxgusd3CRV",
|
|
@@ -692,20 +930,43 @@ exports.supportedTokens = {
|
|
|
692
930
|
pool: "CONVEX_GUSD_POOL",
|
|
693
931
|
underlying: "gusd3CRV",
|
|
694
932
|
stakedToken: "stkcvxgusd3CRV",
|
|
695
|
-
lpActions: [
|
|
933
|
+
lpActions: [
|
|
934
|
+
{
|
|
935
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawLP,
|
|
936
|
+
contract: "CONVEX_BOOSTER",
|
|
937
|
+
tokenOut: "gusd3CRV"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
type: tradeTypes_1.TradeType.ConvexStake,
|
|
941
|
+
contract: "CONVEX_GUSD_POOL",
|
|
942
|
+
tokenOut: "stkcvxgusd3CRV"
|
|
943
|
+
}
|
|
944
|
+
]
|
|
696
945
|
},
|
|
697
946
|
// YEARN- CURVE TOKENS
|
|
698
947
|
yvCurve_stETH: {
|
|
699
948
|
symbol: "yvCurve_stETH",
|
|
700
949
|
type: TokenType.YEARN_VAULT_OF_CURVE_LP,
|
|
701
950
|
underlying: "steCRV",
|
|
702
|
-
lpActions: [
|
|
951
|
+
lpActions: [
|
|
952
|
+
{
|
|
953
|
+
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
954
|
+
contract: "YEARN_CURVE_STETH_VAULT",
|
|
955
|
+
tokenOut: "steCRV"
|
|
956
|
+
}
|
|
957
|
+
]
|
|
703
958
|
},
|
|
704
959
|
yvCURVE_FRAX_POOL: {
|
|
705
960
|
symbol: "yvCURVE_FRAX_POOL",
|
|
706
961
|
type: TokenType.YEARN_VAULT_OF_META_CURVE_LP,
|
|
707
962
|
underlying: "FRAX3CRV",
|
|
708
|
-
lpActions: [
|
|
963
|
+
lpActions: [
|
|
964
|
+
{
|
|
965
|
+
type: tradeTypes_1.TradeType.YearnWithdraw,
|
|
966
|
+
contract: "YEARN_CURVE_FRAX_VAULT",
|
|
967
|
+
tokenOut: "FRAX3CRV"
|
|
968
|
+
}
|
|
969
|
+
]
|
|
709
970
|
},
|
|
710
971
|
// STAKED CONVEX
|
|
711
972
|
stkcvx3Crv: {
|
|
@@ -714,7 +975,18 @@ exports.supportedTokens = {
|
|
|
714
975
|
pool: "CONVEX_3CRV_POOL",
|
|
715
976
|
underlying: "3Crv",
|
|
716
977
|
lpToken: "cvx3Crv",
|
|
717
|
-
lpActions: [
|
|
978
|
+
lpActions: [
|
|
979
|
+
{
|
|
980
|
+
type: tradeTypes_1.TradeType.ConvexWithdraw,
|
|
981
|
+
contract: "CONVEX_3CRV_POOL",
|
|
982
|
+
tokenOut: "cvx3Crv"
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
|
|
986
|
+
contract: "CONVEX_3CRV_POOL",
|
|
987
|
+
tokenOut: "3Crv"
|
|
988
|
+
}
|
|
989
|
+
]
|
|
718
990
|
},
|
|
719
991
|
stkcvxsteCRV: {
|
|
720
992
|
symbol: "stkcvxsteCRV",
|
|
@@ -722,7 +994,18 @@ exports.supportedTokens = {
|
|
|
722
994
|
pool: "CONVEX_STECRV_POOL",
|
|
723
995
|
underlying: "steCRV",
|
|
724
996
|
lpToken: "cvxsteCRV",
|
|
725
|
-
lpActions: [
|
|
997
|
+
lpActions: [
|
|
998
|
+
{
|
|
999
|
+
type: tradeTypes_1.TradeType.ConvexWithdraw,
|
|
1000
|
+
contract: "CONVEX_STECRV_POOL",
|
|
1001
|
+
tokenOut: "cvxsteCRV"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
|
|
1005
|
+
contract: "CONVEX_STECRV_POOL",
|
|
1006
|
+
tokenOut: "steCRV"
|
|
1007
|
+
}
|
|
1008
|
+
]
|
|
726
1009
|
},
|
|
727
1010
|
stkcvxFRAX3CRV: {
|
|
728
1011
|
symbol: "stkcvxFRAX3CRV",
|
|
@@ -730,7 +1013,18 @@ exports.supportedTokens = {
|
|
|
730
1013
|
pool: "CONVEX_FRAX3CRV_POOL",
|
|
731
1014
|
underlying: "FRAX3CRV",
|
|
732
1015
|
lpToken: "cvxFRAX3CRV",
|
|
733
|
-
lpActions: [
|
|
1016
|
+
lpActions: [
|
|
1017
|
+
{
|
|
1018
|
+
type: tradeTypes_1.TradeType.ConvexWithdraw,
|
|
1019
|
+
contract: "CONVEX_FRAX3CRV_POOL",
|
|
1020
|
+
tokenOut: "cvxFRAX3CRV"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
|
|
1024
|
+
contract: "CONVEX_FRAX3CRV_POOL",
|
|
1025
|
+
tokenOut: "FRAX3CRV"
|
|
1026
|
+
}
|
|
1027
|
+
]
|
|
734
1028
|
},
|
|
735
1029
|
stkcvxcrvPlain3andSUSD: {
|
|
736
1030
|
symbol: "stkcvxcrvPlain3andSUSD",
|
|
@@ -738,7 +1032,18 @@ exports.supportedTokens = {
|
|
|
738
1032
|
pool: "CONVEX_SUSD_POOL",
|
|
739
1033
|
underlying: "crvPlain3andSUSD",
|
|
740
1034
|
lpToken: "cvxcrvPlain3andSUSD",
|
|
741
|
-
lpActions: [
|
|
1035
|
+
lpActions: [
|
|
1036
|
+
{
|
|
1037
|
+
type: tradeTypes_1.TradeType.ConvexWithdraw,
|
|
1038
|
+
contract: "CONVEX_SUSD_POOL",
|
|
1039
|
+
tokenOut: "cvxcrvPlain3andSUSD"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
|
|
1043
|
+
contract: "CONVEX_SUSD_POOL",
|
|
1044
|
+
tokenOut: "crvPlain3andSUSD"
|
|
1045
|
+
}
|
|
1046
|
+
]
|
|
742
1047
|
},
|
|
743
1048
|
stkcvxgusd3CRV: {
|
|
744
1049
|
symbol: "stkcvxgusd3CRV",
|
|
@@ -746,7 +1051,18 @@ exports.supportedTokens = {
|
|
|
746
1051
|
pool: "CONVEX_GUSD_POOL",
|
|
747
1052
|
underlying: "gusd3CRV",
|
|
748
1053
|
lpToken: "cvxgusd3CRV",
|
|
749
|
-
lpActions: [
|
|
1054
|
+
lpActions: [
|
|
1055
|
+
{
|
|
1056
|
+
type: tradeTypes_1.TradeType.ConvexWithdraw,
|
|
1057
|
+
contract: "CONVEX_GUSD_POOL",
|
|
1058
|
+
tokenOut: "cvxgusd3CRV"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
type: tradeTypes_1.TradeType.ConvexWithdrawAndUnwrap,
|
|
1062
|
+
contract: "CONVEX_GUSD_POOL",
|
|
1063
|
+
tokenOut: "gusd3CRV"
|
|
1064
|
+
}
|
|
1065
|
+
]
|
|
750
1066
|
}
|
|
751
1067
|
};
|
|
752
1068
|
exports.tokenDataByNetwork = {
|
|
@@ -801,11 +1117,11 @@ exports.tokenDataByNetwork = {
|
|
|
801
1117
|
cvxcrvPlain3andSUSD: "0x11D200ef1409cecA8D6d23e6496550f707772F11",
|
|
802
1118
|
cvxgusd3CRV: "0x15c2471ef46Fa721990730cfa526BcFb45574576",
|
|
803
1119
|
// CONVEX PHANTOM TOKEN ADDRESSES
|
|
804
|
-
stkcvx3Crv: "",
|
|
805
|
-
stkcvxsteCRV: "",
|
|
806
|
-
stkcvxFRAX3CRV: "",
|
|
807
|
-
stkcvxcrvPlain3andSUSD: "",
|
|
808
|
-
stkcvxgusd3CRV: "",
|
|
1120
|
+
stkcvx3Crv: "0xDbA28Ee5b201AaE8E0BfE889E95cC8DC4559e02B",
|
|
1121
|
+
stkcvxsteCRV: "0xC0e0492f1157B051fEca7e34c089c6E45a1D6480",
|
|
1122
|
+
stkcvxFRAX3CRV: "0x6738e27899ffCF76aeadA4B4612CC4a07BD6562A",
|
|
1123
|
+
stkcvxcrvPlain3andSUSD: "0xdb2Bc1Fd98721bF4AD1bACE1Cab1cF5B4cf61d4c",
|
|
1124
|
+
stkcvxgusd3CRV: "0xc8124E539fD1F9E5E2F561f14aAAc5899681E274",
|
|
809
1125
|
// YEARN- CURVE TOKENS
|
|
810
1126
|
yvCurve_stETH: "0xdCD90C7f6324cfa40d7169ef80b12031770B4325",
|
|
811
1127
|
yvCURVE_FRAX_POOL: "0xB4AdA607B9d6b2c9Ee07A275e9616B84AC560139"
|
package/lib/core/tradeTypes.d.ts
CHANGED
|
@@ -10,9 +10,12 @@ export declare enum TradeType {
|
|
|
10
10
|
YearnDeposit = 6,
|
|
11
11
|
YearnWithdraw = 7,
|
|
12
12
|
LidoStake = 8,
|
|
13
|
-
|
|
13
|
+
ConvexDepositLP = 9,
|
|
14
14
|
ConvexStake = 10,
|
|
15
|
-
|
|
15
|
+
ConvexDepositLPAndStake = 11,
|
|
16
|
+
ConvexWithdrawLP = 12,
|
|
17
|
+
ConvexWithdraw = 13,
|
|
18
|
+
ConvexWithdrawAndUnwrap = 14
|
|
16
19
|
}
|
|
17
20
|
export declare type TradeAction = {
|
|
18
21
|
type: TradeType.UniswapV2Swap;
|
|
@@ -45,15 +48,27 @@ export declare type TradeAction = {
|
|
|
45
48
|
contract: "LIDO_STETH_GATEWAY";
|
|
46
49
|
tokenOut: NormalToken;
|
|
47
50
|
} | {
|
|
48
|
-
type: TradeType.
|
|
49
|
-
contract:
|
|
51
|
+
type: TradeType.ConvexDepositLP;
|
|
52
|
+
contract: "CONVEX_BOOSTER";
|
|
50
53
|
tokenOut: ConvexLPToken;
|
|
51
54
|
} | {
|
|
52
55
|
type: TradeType.ConvexStake;
|
|
53
56
|
contract: ConvexPoolContract;
|
|
54
57
|
tokenOut: ConvexStakedPhantomToken;
|
|
55
58
|
} | {
|
|
56
|
-
type: TradeType.
|
|
57
|
-
contract:
|
|
59
|
+
type: TradeType.ConvexDepositLPAndStake;
|
|
60
|
+
contract: "CONVEX_BOOSTER";
|
|
58
61
|
tokenOut: ConvexStakedPhantomToken;
|
|
62
|
+
} | {
|
|
63
|
+
type: TradeType.ConvexWithdrawLP;
|
|
64
|
+
contract: "CONVEX_BOOSTER";
|
|
65
|
+
tokenOut: CurveLPToken;
|
|
66
|
+
} | {
|
|
67
|
+
type: TradeType.ConvexWithdraw;
|
|
68
|
+
contract: ConvexPoolContract;
|
|
69
|
+
tokenOut: ConvexLPToken;
|
|
70
|
+
} | {
|
|
71
|
+
type: TradeType.ConvexWithdrawAndUnwrap;
|
|
72
|
+
contract: ConvexPoolContract;
|
|
73
|
+
tokenOut: CurveLPToken;
|
|
59
74
|
};
|
package/lib/core/tradeTypes.js
CHANGED
|
@@ -12,7 +12,10 @@ var TradeType;
|
|
|
12
12
|
TradeType[TradeType["YearnDeposit"] = 6] = "YearnDeposit";
|
|
13
13
|
TradeType[TradeType["YearnWithdraw"] = 7] = "YearnWithdraw";
|
|
14
14
|
TradeType[TradeType["LidoStake"] = 8] = "LidoStake";
|
|
15
|
-
TradeType[TradeType["
|
|
15
|
+
TradeType[TradeType["ConvexDepositLP"] = 9] = "ConvexDepositLP";
|
|
16
16
|
TradeType[TradeType["ConvexStake"] = 10] = "ConvexStake";
|
|
17
|
-
TradeType[TradeType["
|
|
17
|
+
TradeType[TradeType["ConvexDepositLPAndStake"] = 11] = "ConvexDepositLPAndStake";
|
|
18
|
+
TradeType[TradeType["ConvexWithdrawLP"] = 12] = "ConvexWithdrawLP";
|
|
19
|
+
TradeType[TradeType["ConvexWithdraw"] = 13] = "ConvexWithdraw";
|
|
20
|
+
TradeType[TradeType["ConvexWithdrawAndUnwrap"] = 14] = "ConvexWithdrawAndUnwrap";
|
|
18
21
|
})(TradeType = exports.TradeType || (exports.TradeType = {}));
|