@defisaver/positions-sdk 0.0.182 → 0.0.183-dev-allocator
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/.mocharc.json +4 -4
- package/.nvmrc +1 -1
- package/README.md +69 -69
- package/cjs/aaveV3/index.js +3 -3
- package/cjs/config/contracts.d.ts +3 -0
- package/cjs/config/contracts.js +3 -0
- package/cjs/helpers/aaveHelpers/index.js +0 -1
- package/cjs/helpers/morphoBlueHelpers/index.d.ts +5 -0
- package/cjs/helpers/morphoBlueHelpers/index.js +127 -1
- package/cjs/staking/staking.d.ts +2 -3
- package/cjs/staking/staking.js +2 -2
- package/cjs/types/morphoBlue.d.ts +25 -0
- package/esm/aaveV3/index.js +4 -4
- package/esm/config/contracts.d.ts +3 -0
- package/esm/config/contracts.js +3 -0
- package/esm/helpers/aaveHelpers/index.js +0 -1
- package/esm/helpers/morphoBlueHelpers/index.d.ts +5 -0
- package/esm/helpers/morphoBlueHelpers/index.js +124 -0
- package/esm/staking/staking.d.ts +2 -3
- package/esm/staking/staking.js +2 -2
- package/esm/types/morphoBlue.d.ts +25 -0
- package/package.json +49 -49
- package/src/aaveV2/index.ts +227 -227
- package/src/aaveV3/index.ts +624 -628
- package/src/assets/index.ts +60 -60
- package/src/chickenBonds/index.ts +123 -123
- package/src/compoundV2/index.ts +220 -220
- package/src/compoundV3/index.ts +282 -282
- package/src/config/contracts.js +1043 -1040
- package/src/constants/index.ts +6 -6
- package/src/contracts.ts +130 -130
- package/src/curveUsd/index.ts +229 -229
- package/src/eulerV2/index.ts +303 -303
- package/src/exchange/index.ts +17 -17
- package/src/helpers/aaveHelpers/index.ts +198 -199
- package/src/helpers/chickenBondsHelpers/index.ts +23 -23
- package/src/helpers/compoundHelpers/index.ts +246 -246
- package/src/helpers/curveUsdHelpers/index.ts +40 -40
- package/src/helpers/eulerHelpers/index.ts +232 -232
- package/src/helpers/index.ts +8 -8
- package/src/helpers/llamaLendHelpers/index.ts +53 -53
- package/src/helpers/makerHelpers/index.ts +94 -94
- package/src/helpers/morphoBlueHelpers/index.ts +256 -115
- package/src/helpers/sparkHelpers/index.ts +150 -150
- package/src/index.ts +48 -48
- package/src/liquity/index.ts +116 -116
- package/src/llamaLend/index.ts +275 -275
- package/src/maker/index.ts +117 -117
- package/src/markets/aave/index.ts +152 -152
- package/src/markets/aave/marketAssets.ts +46 -46
- package/src/markets/compound/index.ts +173 -173
- package/src/markets/compound/marketsAssets.ts +64 -64
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/euler/index.ts +26 -26
- package/src/markets/index.ts +23 -23
- package/src/markets/llamaLend/contractAddresses.ts +141 -141
- package/src/markets/llamaLend/index.ts +235 -235
- package/src/markets/morphoBlue/index.ts +809 -809
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +10 -10
- package/src/moneymarket/moneymarketCommonService.ts +80 -80
- package/src/morphoAaveV2/index.ts +256 -256
- package/src/morphoAaveV3/index.ts +630 -630
- package/src/morphoBlue/index.ts +171 -171
- package/src/multicall/index.ts +22 -22
- package/src/services/dsrService.ts +15 -15
- package/src/services/priceService.ts +21 -21
- package/src/services/utils.ts +56 -56
- package/src/setup.ts +8 -8
- package/src/spark/index.ts +461 -461
- package/src/staking/staking.ts +220 -222
- package/src/types/aave.ts +270 -270
- package/src/types/chickenBonds.ts +45 -45
- package/src/types/common.ts +84 -84
- package/src/types/compound.ts +129 -129
- package/src/types/curveUsd.ts +118 -118
- package/src/types/euler.ts +171 -171
- package/src/types/index.ts +9 -9
- package/src/types/liquity.ts +30 -30
- package/src/types/llamaLend.ts +155 -155
- package/src/types/maker.ts +50 -50
- package/src/types/morphoBlue.ts +177 -154
- package/src/types/spark.ts +131 -131
- package/.vscode/launch.json +0 -17
- package/.vscode/settings.json +0 -37
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
-
import { CompoundBulkerOptions, CompoundMarketData, CompoundVersions } from '../../types';
|
|
3
|
-
import { NetworkNumber } from '../../types/common';
|
|
4
|
-
import {
|
|
5
|
-
compoundV2CollateralAssets,
|
|
6
|
-
v3ETHCollAssets,
|
|
7
|
-
v3USDbCCollAssets,
|
|
8
|
-
v3USDCCollAssets,
|
|
9
|
-
v3USDCeCollAssets,
|
|
10
|
-
v3USDTCollAssets,
|
|
11
|
-
} from './marketsAssets';
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
compoundV2CollateralAssets,
|
|
15
|
-
v3ETHCollAssets,
|
|
16
|
-
v3USDbCCollAssets,
|
|
17
|
-
v3USDCCollAssets,
|
|
18
|
-
v3USDCeCollAssets,
|
|
19
|
-
v3USDTCollAssets,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const EMPTY_BULKER_OPTIONS: CompoundBulkerOptions = { supply: '', withdraw: '' };
|
|
23
|
-
|
|
24
|
-
const STANDARD_BULKER_OPTIONS: CompoundBulkerOptions = {
|
|
25
|
-
supply: '0x414354494f4e5f535550504c595f4e41544956455f544f4b454e000000000000',
|
|
26
|
-
withdraw: '0x414354494f4e5f57495448445241575f4e41544956455f544f4b454e00000000',
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBulkerOptions>> = {
|
|
30
|
-
[NetworkNumber.Eth]: {
|
|
31
|
-
[CompoundVersions.CompoundV3USDC]: { supply: 2, withdraw: 5 },
|
|
32
|
-
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
33
|
-
[CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
|
|
34
|
-
|
|
35
|
-
// Non-existing markets, keeping it because of typescript
|
|
36
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
37
|
-
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
38
|
-
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
39
|
-
},
|
|
40
|
-
[NetworkNumber.Arb]: {
|
|
41
|
-
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
42
|
-
[CompoundVersions.CompoundV3USDCe]: STANDARD_BULKER_OPTIONS,
|
|
43
|
-
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
44
|
-
[CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
|
|
45
|
-
|
|
46
|
-
// Non-existing markets, keeping it because of typescript
|
|
47
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
48
|
-
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
49
|
-
},
|
|
50
|
-
[NetworkNumber.Base]: {
|
|
51
|
-
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
52
|
-
[CompoundVersions.CompoundV3USDbC]: STANDARD_BULKER_OPTIONS,
|
|
53
|
-
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
54
|
-
|
|
55
|
-
// Non-existing markets, keeping it because of typescript
|
|
56
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
57
|
-
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
58
|
-
[CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
|
|
59
|
-
},
|
|
60
|
-
[NetworkNumber.Opt]: {
|
|
61
|
-
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
62
|
-
[CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
|
|
63
|
-
// Non-existing markets, keeping it because of typescript
|
|
64
|
-
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
65
|
-
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
66
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
67
|
-
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const COMPOUND_V2: CompoundMarketData = {
|
|
72
|
-
chainIds: [NetworkNumber.Eth],
|
|
73
|
-
label: 'Compound V2',
|
|
74
|
-
shortLabel: 'v2',
|
|
75
|
-
value: CompoundVersions.CompoundV2,
|
|
76
|
-
baseAsset: '',
|
|
77
|
-
collAssets: compoundV2CollateralAssets.map(a => a.underlyingAsset),
|
|
78
|
-
baseMarket: '',
|
|
79
|
-
baseMarketAddress: '',
|
|
80
|
-
secondLabel: '',
|
|
81
|
-
bulkerName: '',
|
|
82
|
-
bulkerAddress: '',
|
|
83
|
-
bulkerOptions: BULKER_OPTIONS[NetworkNumber.Eth][CompoundVersions.CompoundV2],
|
|
84
|
-
// icon: SvgAdapter(protocolIcons.compound),
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
88
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Opt],
|
|
89
|
-
label: 'Compound V3 - USDC',
|
|
90
|
-
shortLabel: 'v3',
|
|
91
|
-
value: CompoundVersions.CompoundV3USDC,
|
|
92
|
-
baseAsset: 'USDC',
|
|
93
|
-
collAssets: networkId ? v3USDCCollAssets[networkId] : [],
|
|
94
|
-
baseMarket: 'cUSDCv3',
|
|
95
|
-
baseMarketAddress: getConfigContractAddress('cUSDCv3', networkId),
|
|
96
|
-
secondLabel: 'Market',
|
|
97
|
-
bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2',
|
|
98
|
-
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2', networkId),
|
|
99
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDC],
|
|
100
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
export const COMPOUND_V3_USDCe = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
104
|
-
chainIds: [NetworkNumber.Arb],
|
|
105
|
-
label: 'Compound V3 - USDC.e',
|
|
106
|
-
shortLabel: 'v3',
|
|
107
|
-
value: CompoundVersions.CompoundV3USDCe,
|
|
108
|
-
baseAsset: 'USDC.e',
|
|
109
|
-
collAssets: networkId ? v3USDCeCollAssets[networkId] : [],
|
|
110
|
-
baseMarket: 'cUSDCev3',
|
|
111
|
-
baseMarketAddress: getConfigContractAddress('cUSDCev3', networkId),
|
|
112
|
-
secondLabel: 'Market',
|
|
113
|
-
bulkerName: 'CompV3BulkerL2',
|
|
114
|
-
bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
|
|
115
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDCe],
|
|
116
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
export const COMPOUND_V3_ETH = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
120
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Base, NetworkNumber.Arb, NetworkNumber.Opt],
|
|
121
|
-
label: 'Compound V3 - ETH',
|
|
122
|
-
shortLabel: 'v3',
|
|
123
|
-
value: CompoundVersions.CompoundV3ETH,
|
|
124
|
-
baseAsset: 'ETH',
|
|
125
|
-
collAssets: networkId ? v3ETHCollAssets[networkId] : [],
|
|
126
|
-
baseMarket: 'cETHv3',
|
|
127
|
-
baseMarketAddress: getConfigContractAddress('cETHv3', networkId),
|
|
128
|
-
secondLabel: 'Market',
|
|
129
|
-
bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
|
|
130
|
-
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
|
|
131
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3ETH],
|
|
132
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
133
|
-
});
|
|
134
|
-
|
|
135
|
-
export const COMPOUND_V3_USDBC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
136
|
-
chainIds: [NetworkNumber.Base],
|
|
137
|
-
label: 'Compound V3 - USDbC',
|
|
138
|
-
shortLabel: 'v3',
|
|
139
|
-
value: CompoundVersions.CompoundV3USDbC,
|
|
140
|
-
baseAsset: 'USDbC',
|
|
141
|
-
collAssets: networkId ? v3USDbCCollAssets[networkId] : [],
|
|
142
|
-
baseMarket: 'cUSDbCv3',
|
|
143
|
-
baseMarketAddress: getConfigContractAddress('cUSDbCv3', networkId),
|
|
144
|
-
secondLabel: 'Market',
|
|
145
|
-
bulkerName: 'CompV3BulkerL2',
|
|
146
|
-
bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
|
|
147
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDbC],
|
|
148
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
export const COMPOUND_V3_USDT = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
152
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Opt],
|
|
153
|
-
label: 'Compound V3 - USDT',
|
|
154
|
-
shortLabel: 'v3',
|
|
155
|
-
value: CompoundVersions.CompoundV3USDT,
|
|
156
|
-
baseAsset: 'USDT',
|
|
157
|
-
collAssets: networkId ? v3USDTCollAssets[networkId] : [],
|
|
158
|
-
baseMarket: 'cUSDTv3',
|
|
159
|
-
baseMarketAddress: getConfigContractAddress('cUSDTv3', networkId),
|
|
160
|
-
secondLabel: 'Market',
|
|
161
|
-
bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
|
|
162
|
-
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
|
|
163
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDT],
|
|
164
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
export const CompoundMarkets = (networkId: NetworkNumber) => ({
|
|
168
|
-
[CompoundVersions.CompoundV2]: COMPOUND_V2,
|
|
169
|
-
[CompoundVersions.CompoundV3ETH]: COMPOUND_V3_ETH(networkId),
|
|
170
|
-
[CompoundVersions.CompoundV3USDC]: COMPOUND_V3_USDC(networkId),
|
|
171
|
-
[CompoundVersions.CompoundV3USDbC]: COMPOUND_V3_USDBC(networkId),
|
|
172
|
-
[CompoundVersions.CompoundV3USDCe]: COMPOUND_V3_USDCe(networkId),
|
|
173
|
-
[CompoundVersions.CompoundV3USDT]: COMPOUND_V3_USDT(networkId),
|
|
1
|
+
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
+
import { CompoundBulkerOptions, CompoundMarketData, CompoundVersions } from '../../types';
|
|
3
|
+
import { NetworkNumber } from '../../types/common';
|
|
4
|
+
import {
|
|
5
|
+
compoundV2CollateralAssets,
|
|
6
|
+
v3ETHCollAssets,
|
|
7
|
+
v3USDbCCollAssets,
|
|
8
|
+
v3USDCCollAssets,
|
|
9
|
+
v3USDCeCollAssets,
|
|
10
|
+
v3USDTCollAssets,
|
|
11
|
+
} from './marketsAssets';
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
compoundV2CollateralAssets,
|
|
15
|
+
v3ETHCollAssets,
|
|
16
|
+
v3USDbCCollAssets,
|
|
17
|
+
v3USDCCollAssets,
|
|
18
|
+
v3USDCeCollAssets,
|
|
19
|
+
v3USDTCollAssets,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const EMPTY_BULKER_OPTIONS: CompoundBulkerOptions = { supply: '', withdraw: '' };
|
|
23
|
+
|
|
24
|
+
const STANDARD_BULKER_OPTIONS: CompoundBulkerOptions = {
|
|
25
|
+
supply: '0x414354494f4e5f535550504c595f4e41544956455f544f4b454e000000000000',
|
|
26
|
+
withdraw: '0x414354494f4e5f57495448445241575f4e41544956455f544f4b454e00000000',
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBulkerOptions>> = {
|
|
30
|
+
[NetworkNumber.Eth]: {
|
|
31
|
+
[CompoundVersions.CompoundV3USDC]: { supply: 2, withdraw: 5 },
|
|
32
|
+
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
33
|
+
[CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
|
|
34
|
+
|
|
35
|
+
// Non-existing markets, keeping it because of typescript
|
|
36
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
37
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
38
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
39
|
+
},
|
|
40
|
+
[NetworkNumber.Arb]: {
|
|
41
|
+
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
42
|
+
[CompoundVersions.CompoundV3USDCe]: STANDARD_BULKER_OPTIONS,
|
|
43
|
+
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
44
|
+
[CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
|
|
45
|
+
|
|
46
|
+
// Non-existing markets, keeping it because of typescript
|
|
47
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
48
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
49
|
+
},
|
|
50
|
+
[NetworkNumber.Base]: {
|
|
51
|
+
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
52
|
+
[CompoundVersions.CompoundV3USDbC]: STANDARD_BULKER_OPTIONS,
|
|
53
|
+
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
54
|
+
|
|
55
|
+
// Non-existing markets, keeping it because of typescript
|
|
56
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
57
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
58
|
+
[CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
|
|
59
|
+
},
|
|
60
|
+
[NetworkNumber.Opt]: {
|
|
61
|
+
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
62
|
+
[CompoundVersions.CompoundV3USDT]: STANDARD_BULKER_OPTIONS,
|
|
63
|
+
// Non-existing markets, keeping it because of typescript
|
|
64
|
+
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
65
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
66
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
67
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const COMPOUND_V2: CompoundMarketData = {
|
|
72
|
+
chainIds: [NetworkNumber.Eth],
|
|
73
|
+
label: 'Compound V2',
|
|
74
|
+
shortLabel: 'v2',
|
|
75
|
+
value: CompoundVersions.CompoundV2,
|
|
76
|
+
baseAsset: '',
|
|
77
|
+
collAssets: compoundV2CollateralAssets.map(a => a.underlyingAsset),
|
|
78
|
+
baseMarket: '',
|
|
79
|
+
baseMarketAddress: '',
|
|
80
|
+
secondLabel: '',
|
|
81
|
+
bulkerName: '',
|
|
82
|
+
bulkerAddress: '',
|
|
83
|
+
bulkerOptions: BULKER_OPTIONS[NetworkNumber.Eth][CompoundVersions.CompoundV2],
|
|
84
|
+
// icon: SvgAdapter(protocolIcons.compound),
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
88
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Opt],
|
|
89
|
+
label: 'Compound V3 - USDC',
|
|
90
|
+
shortLabel: 'v3',
|
|
91
|
+
value: CompoundVersions.CompoundV3USDC,
|
|
92
|
+
baseAsset: 'USDC',
|
|
93
|
+
collAssets: networkId ? v3USDCCollAssets[networkId] : [],
|
|
94
|
+
baseMarket: 'cUSDCv3',
|
|
95
|
+
baseMarketAddress: getConfigContractAddress('cUSDCv3', networkId),
|
|
96
|
+
secondLabel: 'Market',
|
|
97
|
+
bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2',
|
|
98
|
+
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetUSDC' : 'CompV3BulkerL2', networkId),
|
|
99
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDC],
|
|
100
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
export const COMPOUND_V3_USDCe = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
104
|
+
chainIds: [NetworkNumber.Arb],
|
|
105
|
+
label: 'Compound V3 - USDC.e',
|
|
106
|
+
shortLabel: 'v3',
|
|
107
|
+
value: CompoundVersions.CompoundV3USDCe,
|
|
108
|
+
baseAsset: 'USDC.e',
|
|
109
|
+
collAssets: networkId ? v3USDCeCollAssets[networkId] : [],
|
|
110
|
+
baseMarket: 'cUSDCev3',
|
|
111
|
+
baseMarketAddress: getConfigContractAddress('cUSDCev3', networkId),
|
|
112
|
+
secondLabel: 'Market',
|
|
113
|
+
bulkerName: 'CompV3BulkerL2',
|
|
114
|
+
bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
|
|
115
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDCe],
|
|
116
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
export const COMPOUND_V3_ETH = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
120
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Base, NetworkNumber.Arb, NetworkNumber.Opt],
|
|
121
|
+
label: 'Compound V3 - ETH',
|
|
122
|
+
shortLabel: 'v3',
|
|
123
|
+
value: CompoundVersions.CompoundV3ETH,
|
|
124
|
+
baseAsset: 'ETH',
|
|
125
|
+
collAssets: networkId ? v3ETHCollAssets[networkId] : [],
|
|
126
|
+
baseMarket: 'cETHv3',
|
|
127
|
+
baseMarketAddress: getConfigContractAddress('cETHv3', networkId),
|
|
128
|
+
secondLabel: 'Market',
|
|
129
|
+
bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
|
|
130
|
+
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
|
|
131
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3ETH],
|
|
132
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
export const COMPOUND_V3_USDBC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
136
|
+
chainIds: [NetworkNumber.Base],
|
|
137
|
+
label: 'Compound V3 - USDbC',
|
|
138
|
+
shortLabel: 'v3',
|
|
139
|
+
value: CompoundVersions.CompoundV3USDbC,
|
|
140
|
+
baseAsset: 'USDbC',
|
|
141
|
+
collAssets: networkId ? v3USDbCCollAssets[networkId] : [],
|
|
142
|
+
baseMarket: 'cUSDbCv3',
|
|
143
|
+
baseMarketAddress: getConfigContractAddress('cUSDbCv3', networkId),
|
|
144
|
+
secondLabel: 'Market',
|
|
145
|
+
bulkerName: 'CompV3BulkerL2',
|
|
146
|
+
bulkerAddress: getConfigContractAddress('CompV3BulkerL2', networkId),
|
|
147
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDbC],
|
|
148
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export const COMPOUND_V3_USDT = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
152
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Opt],
|
|
153
|
+
label: 'Compound V3 - USDT',
|
|
154
|
+
shortLabel: 'v3',
|
|
155
|
+
value: CompoundVersions.CompoundV3USDT,
|
|
156
|
+
baseAsset: 'USDT',
|
|
157
|
+
collAssets: networkId ? v3USDTCollAssets[networkId] : [],
|
|
158
|
+
baseMarket: 'cUSDTv3',
|
|
159
|
+
baseMarketAddress: getConfigContractAddress('cUSDTv3', networkId),
|
|
160
|
+
secondLabel: 'Market',
|
|
161
|
+
bulkerName: networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2',
|
|
162
|
+
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Eth ? 'CompV3BulkerMainnetETH' : 'CompV3BulkerL2', networkId),
|
|
163
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDT],
|
|
164
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
export const CompoundMarkets = (networkId: NetworkNumber) => ({
|
|
168
|
+
[CompoundVersions.CompoundV2]: COMPOUND_V2,
|
|
169
|
+
[CompoundVersions.CompoundV3ETH]: COMPOUND_V3_ETH(networkId),
|
|
170
|
+
[CompoundVersions.CompoundV3USDC]: COMPOUND_V3_USDC(networkId),
|
|
171
|
+
[CompoundVersions.CompoundV3USDbC]: COMPOUND_V3_USDBC(networkId),
|
|
172
|
+
[CompoundVersions.CompoundV3USDCe]: COMPOUND_V3_USDCe(networkId),
|
|
173
|
+
[CompoundVersions.CompoundV3USDT]: COMPOUND_V3_USDT(networkId),
|
|
174
174
|
}) as const;
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
import { getAssetInfo } from '@defisaver/tokens';
|
|
2
|
-
import { NetworkNumber } from '../../types/common';
|
|
3
|
-
|
|
4
|
-
export const compoundV2CollateralAssets = [
|
|
5
|
-
'cETH', 'cDAI', 'cBAT', 'cZRX', 'cUSDC', 'cWBTC Legacy', 'cWBTC', 'cUSDT',
|
|
6
|
-
'cTUSD', 'cLINK', 'cUSDP', 'cUNI', 'cCOMP', 'cMKR', 'cSUSHI', 'cAAVE', 'cYFI',
|
|
7
|
-
].map((symbol) => getAssetInfo(symbol));
|
|
8
|
-
|
|
9
|
-
export const v3USDCCollAssetsEth = ['COMP', 'WBTC', 'ETH', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC'];
|
|
10
|
-
export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC', 'wstETH', 'ezETH'];
|
|
11
|
-
export const v3USDCCollAssetsBase = ['ETH', 'cbETH', 'wstETH', 'cbBTC'];
|
|
12
|
-
export const v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC', 'wstETH'];
|
|
13
|
-
|
|
14
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
15
|
-
export const v3USDCCollAssets = {
|
|
16
|
-
[NetworkNumber.Eth]: v3USDCCollAssetsEth,
|
|
17
|
-
[NetworkNumber.Opt]: v3USDCCollAssetsOpt,
|
|
18
|
-
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
19
|
-
[NetworkNumber.Base]: v3USDCCollAssetsBase,
|
|
20
|
-
} as const;
|
|
21
|
-
|
|
22
|
-
export const v3USDCeCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
23
|
-
|
|
24
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
25
|
-
export const v3USDCeCollAssets = {
|
|
26
|
-
[NetworkNumber.Eth]: [],
|
|
27
|
-
[NetworkNumber.Opt]: [],
|
|
28
|
-
[NetworkNumber.Arb]: v3USDCeCollAssetsArb,
|
|
29
|
-
[NetworkNumber.Base]: [],
|
|
30
|
-
} as const;
|
|
31
|
-
|
|
32
|
-
export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH', 'tBTC', 'ETHx'];
|
|
33
|
-
export const v3ETHCollAssetsBase = ['cbETH', 'ezETH', 'wstETH', 'USDC', 'weETH', 'wrsETH', 'cbBTC'];
|
|
34
|
-
export const v3ETHCollAssetsArb = ['weETH', 'rETH', 'wstETH', 'WBTC', 'rsETH', 'ezETH', 'USDC', 'USDT'];
|
|
35
|
-
export const v3ETHCollAssetsOpt = ['rETH', 'wstETH', 'WBTC', 'ezETH', 'USDC', 'USDT', 'weETH', 'wrsETH'];
|
|
36
|
-
|
|
37
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
38
|
-
export const v3ETHCollAssets = {
|
|
39
|
-
[NetworkNumber.Eth]: v3ETHCollAssetsEth,
|
|
40
|
-
[NetworkNumber.Opt]: v3ETHCollAssetsOpt,
|
|
41
|
-
[NetworkNumber.Arb]: v3ETHCollAssetsArb,
|
|
42
|
-
[NetworkNumber.Base]: v3ETHCollAssetsBase,
|
|
43
|
-
} as const;
|
|
44
|
-
|
|
45
|
-
export const v3USDbCCollAssetsBase = ['ETH', 'cbETH'];
|
|
46
|
-
|
|
47
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
48
|
-
export const v3USDbCCollAssets = {
|
|
49
|
-
[NetworkNumber.Eth]: [],
|
|
50
|
-
[NetworkNumber.Opt]: [],
|
|
51
|
-
[NetworkNumber.Arb]: [],
|
|
52
|
-
[NetworkNumber.Base]: v3USDbCCollAssetsBase,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
export const v3USDTCollAssetsEth = ['COMP', 'ETH', 'WBTC', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC', 'wUSDM', 'sFRAX'];
|
|
56
|
-
export const v3USDTCollAssetsArb = ['ETH', 'WBTC', 'wstETH', 'ARB', 'GMX'];
|
|
57
|
-
export const v3USDTCollAssetsOpt = ['ETH', 'WBTC', 'OP', 'wstETH'];
|
|
58
|
-
|
|
59
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
60
|
-
export const v3USDTCollAssets = {
|
|
61
|
-
[NetworkNumber.Eth]: v3USDTCollAssetsEth,
|
|
62
|
-
[NetworkNumber.Opt]: v3USDTCollAssetsOpt,
|
|
63
|
-
[NetworkNumber.Arb]: v3USDTCollAssetsArb,
|
|
64
|
-
[NetworkNumber.Base]: [],
|
|
1
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
2
|
+
import { NetworkNumber } from '../../types/common';
|
|
3
|
+
|
|
4
|
+
export const compoundV2CollateralAssets = [
|
|
5
|
+
'cETH', 'cDAI', 'cBAT', 'cZRX', 'cUSDC', 'cWBTC Legacy', 'cWBTC', 'cUSDT',
|
|
6
|
+
'cTUSD', 'cLINK', 'cUSDP', 'cUNI', 'cCOMP', 'cMKR', 'cSUSHI', 'cAAVE', 'cYFI',
|
|
7
|
+
].map((symbol) => getAssetInfo(symbol));
|
|
8
|
+
|
|
9
|
+
export const v3USDCCollAssetsEth = ['COMP', 'WBTC', 'ETH', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC'];
|
|
10
|
+
export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC', 'wstETH', 'ezETH'];
|
|
11
|
+
export const v3USDCCollAssetsBase = ['ETH', 'cbETH', 'wstETH', 'cbBTC'];
|
|
12
|
+
export const v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC', 'wstETH'];
|
|
13
|
+
|
|
14
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
15
|
+
export const v3USDCCollAssets = {
|
|
16
|
+
[NetworkNumber.Eth]: v3USDCCollAssetsEth,
|
|
17
|
+
[NetworkNumber.Opt]: v3USDCCollAssetsOpt,
|
|
18
|
+
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
19
|
+
[NetworkNumber.Base]: v3USDCCollAssetsBase,
|
|
20
|
+
} as const;
|
|
21
|
+
|
|
22
|
+
export const v3USDCeCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
23
|
+
|
|
24
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
25
|
+
export const v3USDCeCollAssets = {
|
|
26
|
+
[NetworkNumber.Eth]: [],
|
|
27
|
+
[NetworkNumber.Opt]: [],
|
|
28
|
+
[NetworkNumber.Arb]: v3USDCeCollAssetsArb,
|
|
29
|
+
[NetworkNumber.Base]: [],
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH', 'tBTC', 'ETHx'];
|
|
33
|
+
export const v3ETHCollAssetsBase = ['cbETH', 'ezETH', 'wstETH', 'USDC', 'weETH', 'wrsETH', 'cbBTC'];
|
|
34
|
+
export const v3ETHCollAssetsArb = ['weETH', 'rETH', 'wstETH', 'WBTC', 'rsETH', 'ezETH', 'USDC', 'USDT'];
|
|
35
|
+
export const v3ETHCollAssetsOpt = ['rETH', 'wstETH', 'WBTC', 'ezETH', 'USDC', 'USDT', 'weETH', 'wrsETH'];
|
|
36
|
+
|
|
37
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
38
|
+
export const v3ETHCollAssets = {
|
|
39
|
+
[NetworkNumber.Eth]: v3ETHCollAssetsEth,
|
|
40
|
+
[NetworkNumber.Opt]: v3ETHCollAssetsOpt,
|
|
41
|
+
[NetworkNumber.Arb]: v3ETHCollAssetsArb,
|
|
42
|
+
[NetworkNumber.Base]: v3ETHCollAssetsBase,
|
|
43
|
+
} as const;
|
|
44
|
+
|
|
45
|
+
export const v3USDbCCollAssetsBase = ['ETH', 'cbETH'];
|
|
46
|
+
|
|
47
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
48
|
+
export const v3USDbCCollAssets = {
|
|
49
|
+
[NetworkNumber.Eth]: [],
|
|
50
|
+
[NetworkNumber.Opt]: [],
|
|
51
|
+
[NetworkNumber.Arb]: [],
|
|
52
|
+
[NetworkNumber.Base]: v3USDbCCollAssetsBase,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export const v3USDTCollAssetsEth = ['COMP', 'ETH', 'WBTC', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC', 'wUSDM', 'sFRAX'];
|
|
56
|
+
export const v3USDTCollAssetsArb = ['ETH', 'WBTC', 'wstETH', 'ARB', 'GMX'];
|
|
57
|
+
export const v3USDTCollAssetsOpt = ['ETH', 'WBTC', 'OP', 'wstETH'];
|
|
58
|
+
|
|
59
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
60
|
+
export const v3USDTCollAssets = {
|
|
61
|
+
[NetworkNumber.Eth]: v3USDTCollAssetsEth,
|
|
62
|
+
[NetworkNumber.Opt]: v3USDTCollAssetsOpt,
|
|
63
|
+
[NetworkNumber.Arb]: v3USDTCollAssetsArb,
|
|
64
|
+
[NetworkNumber.Base]: [],
|
|
65
65
|
};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
-
import { CrvUSDMarketData, CrvUSDVersions } from '../../types';
|
|
3
|
-
import { NetworkNumber } from '../../types/common';
|
|
4
|
-
|
|
5
|
-
export const CRVUSD_WSTETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
6
|
-
chainIds: [1],
|
|
7
|
-
label: 'CurveUSD - wstETH',
|
|
8
|
-
shortLabel: 'wstETH',
|
|
9
|
-
value: CrvUSDVersions.crvUSDwstETH,
|
|
10
|
-
collAsset: 'wstETH',
|
|
11
|
-
baseAsset: 'crvUSD',
|
|
12
|
-
controllerAddress: getConfigContractAddress('crvUSDwstETHController', networkId),
|
|
13
|
-
ammAddress: getConfigContractAddress('crvUSDwstETHAmm', networkId),
|
|
14
|
-
createCollAssets: ['wstETH', 'ETH'],
|
|
15
|
-
});
|
|
16
|
-
export const CRVUSD_ETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
17
|
-
chainIds: [1],
|
|
18
|
-
label: 'CurveUSD - ETH',
|
|
19
|
-
shortLabel: 'ETH',
|
|
20
|
-
value: CrvUSDVersions.crvUSDETH,
|
|
21
|
-
collAsset: 'ETH',
|
|
22
|
-
baseAsset: 'crvUSD',
|
|
23
|
-
controllerAddress: getConfigContractAddress('crvUSDETHController', networkId),
|
|
24
|
-
ammAddress: getConfigContractAddress('crvUSDETHAmm', networkId),
|
|
25
|
-
createCollAssets: ['ETH'],
|
|
26
|
-
});
|
|
27
|
-
export const CRVUSD_WBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
28
|
-
chainIds: [1],
|
|
29
|
-
label: 'CurveUSD - WBTC',
|
|
30
|
-
shortLabel: 'WBTC',
|
|
31
|
-
value: CrvUSDVersions.crvUSDWBTC,
|
|
32
|
-
collAsset: 'WBTC',
|
|
33
|
-
baseAsset: 'crvUSD',
|
|
34
|
-
controllerAddress: getConfigContractAddress('crvUSDWBTCController', networkId),
|
|
35
|
-
ammAddress: getConfigContractAddress('crvUSDWBTCAmm', networkId),
|
|
36
|
-
createCollAssets: ['WBTC'],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export const CRVUSD_TBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
40
|
-
chainIds: [1],
|
|
41
|
-
label: 'CurveUSD - tBTC',
|
|
42
|
-
shortLabel: 'tBTC',
|
|
43
|
-
value: CrvUSDVersions.crvUSDtBTC,
|
|
44
|
-
collAsset: 'tBTC',
|
|
45
|
-
baseAsset: 'crvUSD',
|
|
46
|
-
controllerAddress: getConfigContractAddress('crvUSDtBTCController', networkId),
|
|
47
|
-
ammAddress: getConfigContractAddress('crvUSDtBTCAmm', networkId),
|
|
48
|
-
createCollAssets: ['tBTC'],
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const CRVUSD_SFRXETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
52
|
-
chainIds: [1],
|
|
53
|
-
label: 'CurveUSD - sfrxETH',
|
|
54
|
-
shortLabel: 'sfrxETH',
|
|
55
|
-
value: CrvUSDVersions.crvUSDsfrxETH,
|
|
56
|
-
collAsset: 'sfrxETH',
|
|
57
|
-
baseAsset: 'crvUSD',
|
|
58
|
-
controllerAddress: getConfigContractAddress('crvUSDsfrxETHController', networkId),
|
|
59
|
-
ammAddress: getConfigContractAddress('crvUSDsfrxETHAmm', networkId),
|
|
60
|
-
createCollAssets: ['sfrxETH'],
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export const CrvUsdMarkets = (networkId: NetworkNumber) => ({
|
|
65
|
-
[CrvUSDVersions.crvUSDwstETH]: CRVUSD_WSTETH_MARKET(networkId),
|
|
66
|
-
[CrvUSDVersions.crvUSDETH]: CRVUSD_ETH_MARKET(networkId),
|
|
67
|
-
[CrvUSDVersions.crvUSDWBTC]: CRVUSD_WBTC_MARKET(networkId),
|
|
68
|
-
[CrvUSDVersions.crvUSDtBTC]: CRVUSD_TBTC_MARKET(networkId),
|
|
69
|
-
[CrvUSDVersions.crvUSDsfrxETH]: CRVUSD_SFRXETH_MARKET(networkId),
|
|
1
|
+
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
+
import { CrvUSDMarketData, CrvUSDVersions } from '../../types';
|
|
3
|
+
import { NetworkNumber } from '../../types/common';
|
|
4
|
+
|
|
5
|
+
export const CRVUSD_WSTETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
6
|
+
chainIds: [1],
|
|
7
|
+
label: 'CurveUSD - wstETH',
|
|
8
|
+
shortLabel: 'wstETH',
|
|
9
|
+
value: CrvUSDVersions.crvUSDwstETH,
|
|
10
|
+
collAsset: 'wstETH',
|
|
11
|
+
baseAsset: 'crvUSD',
|
|
12
|
+
controllerAddress: getConfigContractAddress('crvUSDwstETHController', networkId),
|
|
13
|
+
ammAddress: getConfigContractAddress('crvUSDwstETHAmm', networkId),
|
|
14
|
+
createCollAssets: ['wstETH', 'ETH'],
|
|
15
|
+
});
|
|
16
|
+
export const CRVUSD_ETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
17
|
+
chainIds: [1],
|
|
18
|
+
label: 'CurveUSD - ETH',
|
|
19
|
+
shortLabel: 'ETH',
|
|
20
|
+
value: CrvUSDVersions.crvUSDETH,
|
|
21
|
+
collAsset: 'ETH',
|
|
22
|
+
baseAsset: 'crvUSD',
|
|
23
|
+
controllerAddress: getConfigContractAddress('crvUSDETHController', networkId),
|
|
24
|
+
ammAddress: getConfigContractAddress('crvUSDETHAmm', networkId),
|
|
25
|
+
createCollAssets: ['ETH'],
|
|
26
|
+
});
|
|
27
|
+
export const CRVUSD_WBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
28
|
+
chainIds: [1],
|
|
29
|
+
label: 'CurveUSD - WBTC',
|
|
30
|
+
shortLabel: 'WBTC',
|
|
31
|
+
value: CrvUSDVersions.crvUSDWBTC,
|
|
32
|
+
collAsset: 'WBTC',
|
|
33
|
+
baseAsset: 'crvUSD',
|
|
34
|
+
controllerAddress: getConfigContractAddress('crvUSDWBTCController', networkId),
|
|
35
|
+
ammAddress: getConfigContractAddress('crvUSDWBTCAmm', networkId),
|
|
36
|
+
createCollAssets: ['WBTC'],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const CRVUSD_TBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
40
|
+
chainIds: [1],
|
|
41
|
+
label: 'CurveUSD - tBTC',
|
|
42
|
+
shortLabel: 'tBTC',
|
|
43
|
+
value: CrvUSDVersions.crvUSDtBTC,
|
|
44
|
+
collAsset: 'tBTC',
|
|
45
|
+
baseAsset: 'crvUSD',
|
|
46
|
+
controllerAddress: getConfigContractAddress('crvUSDtBTCController', networkId),
|
|
47
|
+
ammAddress: getConfigContractAddress('crvUSDtBTCAmm', networkId),
|
|
48
|
+
createCollAssets: ['tBTC'],
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const CRVUSD_SFRXETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
52
|
+
chainIds: [1],
|
|
53
|
+
label: 'CurveUSD - sfrxETH',
|
|
54
|
+
shortLabel: 'sfrxETH',
|
|
55
|
+
value: CrvUSDVersions.crvUSDsfrxETH,
|
|
56
|
+
collAsset: 'sfrxETH',
|
|
57
|
+
baseAsset: 'crvUSD',
|
|
58
|
+
controllerAddress: getConfigContractAddress('crvUSDsfrxETHController', networkId),
|
|
59
|
+
ammAddress: getConfigContractAddress('crvUSDsfrxETHAmm', networkId),
|
|
60
|
+
createCollAssets: ['sfrxETH'],
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
export const CrvUsdMarkets = (networkId: NetworkNumber) => ({
|
|
65
|
+
[CrvUSDVersions.crvUSDwstETH]: CRVUSD_WSTETH_MARKET(networkId),
|
|
66
|
+
[CrvUSDVersions.crvUSDETH]: CRVUSD_ETH_MARKET(networkId),
|
|
67
|
+
[CrvUSDVersions.crvUSDWBTC]: CRVUSD_WBTC_MARKET(networkId),
|
|
68
|
+
[CrvUSDVersions.crvUSDtBTC]: CRVUSD_TBTC_MARKET(networkId),
|
|
69
|
+
[CrvUSDVersions.crvUSDsfrxETH]: CRVUSD_SFRXETH_MARKET(networkId),
|
|
70
70
|
}) as const;
|