@defisaver/positions-sdk 0.0.24 → 0.0.25

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.
Files changed (56) hide show
  1. package/README.md +63 -63
  2. package/cjs/spark/index.js +1 -0
  3. package/esm/spark/index.js +1 -0
  4. package/package.json +40 -40
  5. package/src/aaveV2/index.ts +226 -226
  6. package/src/aaveV3/index.ts +561 -561
  7. package/src/assets/index.ts +60 -60
  8. package/src/chickenBonds/index.ts +123 -123
  9. package/src/compoundV2/index.ts +219 -219
  10. package/src/compoundV3/index.ts +275 -275
  11. package/src/config/contracts.js +673 -673
  12. package/src/constants/index.ts +3 -3
  13. package/src/contracts.ts +100 -100
  14. package/src/curveUsd/index.ts +228 -228
  15. package/src/exchange/index.ts +17 -17
  16. package/src/helpers/aaveHelpers/index.ts +134 -134
  17. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  18. package/src/helpers/compoundHelpers/index.ts +181 -181
  19. package/src/helpers/curveUsdHelpers/index.ts +32 -32
  20. package/src/helpers/index.ts +5 -5
  21. package/src/helpers/makerHelpers/index.ts +94 -94
  22. package/src/helpers/sparkHelpers/index.ts +106 -106
  23. package/src/index.ts +40 -40
  24. package/src/liquity/index.ts +116 -116
  25. package/src/maker/index.ts +101 -101
  26. package/src/markets/aave/index.ts +80 -80
  27. package/src/markets/aave/marketAssets.ts +32 -32
  28. package/src/markets/compound/index.ts +141 -141
  29. package/src/markets/compound/marketsAssets.ts +46 -46
  30. package/src/markets/curveUsd/index.ts +69 -69
  31. package/src/markets/index.ts +3 -3
  32. package/src/markets/spark/index.ts +29 -29
  33. package/src/markets/spark/marketAssets.ts +9 -9
  34. package/src/moneymarket/moneymarketCommonService.ts +75 -75
  35. package/src/morpho/markets.ts +39 -39
  36. package/src/morphoAaveV2/index.ts +255 -255
  37. package/src/morphoAaveV3/index.ts +619 -619
  38. package/src/multicall/index.ts +22 -22
  39. package/src/services/dsrService.ts +15 -15
  40. package/src/services/priceService.ts +21 -21
  41. package/src/services/utils.ts +34 -34
  42. package/src/spark/index.ts +422 -421
  43. package/src/staking/staking.ts +167 -167
  44. package/src/types/aave.ts +256 -256
  45. package/src/types/chickenBonds.ts +45 -45
  46. package/src/types/common.ts +83 -83
  47. package/src/types/compound.ts +128 -128
  48. package/src/types/curveUsd.ts +112 -112
  49. package/src/types/index.ts +6 -6
  50. package/src/types/liquity.ts +30 -30
  51. package/src/types/maker.ts +50 -50
  52. package/src/types/spark.ts +106 -106
  53. package/.yarn/releases/yarn-1.22.1.cjs +0 -147386
  54. package/.yarn/releases/yarn-1.22.1.js +0 -147386
  55. package/.yarnrc.yml +0 -1
  56. package/package-lock.json +0 -12896
@@ -1,102 +1,102 @@
1
- import Web3 from 'web3';
2
- import Dec from 'decimal.js';
3
- import { assetAmountInEth, getAssetInfo, ilkToAsset } from '@defisaver/tokens';
4
- import { Blockish, NetworkNumber, PositionBalances } from '../types/common';
5
- import { McdViewContract } from '../contracts';
6
- import { makerHelpers } from '../helpers';
7
- import { CdpData } from '../types';
8
- import { wethToEth } from '../services/utils';
9
-
10
- export const getMakerAccountBalances = async (web3: Web3, network: NetworkNumber, block: Blockish, addressMapping: boolean, cdpId: string): Promise<PositionBalances> => {
11
- let balances: PositionBalances = {
12
- collateral: {},
13
- debt: {},
14
- };
15
-
16
- if (!cdpId) {
17
- return balances;
18
- }
19
-
20
- const viewContract = McdViewContract(web3, network, block);
21
- // @ts-ignore
22
- const cdpInfo = await viewContract.methods.getCdpInfo(cdpId).call({}, block);
23
- const ilkInfo = await makerHelpers.getCollateralInfo(cdpInfo.ilk, web3, network, block);
24
-
25
- const asset = wethToEth(ilkToAsset(cdpInfo.ilk));
26
-
27
- balances = {
28
- collateral: {
29
- [addressMapping ? getAssetInfo(asset, network).address.toLowerCase() : asset]: asset === 'WBTC' ? new Dec(cdpInfo.collateral).div(1e10).floor().toString() : cdpInfo.collateral,
30
- },
31
- debt: {
32
- [addressMapping ? getAssetInfo('DAI', network).address.toLowerCase() : 'DAI']: new Dec(cdpInfo.debt).times(ilkInfo.currentRate).div(1e27).floor()
33
- .toString(),
34
- },
35
- };
36
-
37
- return balances;
38
- };
39
-
40
- export const getMakerCdpData = async (web3: Web3, network: NetworkNumber, cdpId: string): Promise<CdpData> => {
41
- const viewContract = McdViewContract(web3, network);
42
-
43
- // @ts-ignore
44
- const cdpInfo = await viewContract.methods.getCdpInfo(cdpId).call();
45
-
46
- const [ilkInfo, coll] = await Promise.all([
47
- makerHelpers.getCollateralInfo(cdpInfo.ilk, web3, network),
48
- makerHelpers.getUnclaimedCollateral(web3, network, cdpInfo.urn, cdpInfo.ilk),
49
- ]);
50
-
51
- const asset = ilkToAsset(cdpInfo.ilk);
52
-
53
- const collateralUsd = new Dec(cdpInfo.collateral).mul(ilkInfo.assetPrice).floor().toString();
54
- const debt = new Dec(cdpInfo.debt).times(ilkInfo.currentRate).div(1e27).floor()
55
- .toString();
56
- const futureDebt = new Dec(cdpInfo.debt).times(ilkInfo.futureRate).div(1e27).floor()
57
- .toString(); // after drip
58
- const debtDripDelta = assetAmountInEth(new Dec(futureDebt).sub(debt).toString(), 'DAI');
59
- const liquidationPrice = new Dec(debt).times(ilkInfo.liqRatio).div(cdpInfo.collateral).toString();
60
-
61
- let ratio = new Dec(cdpInfo.collateral).times(ilkInfo.assetPrice).div(debt).times(100)
62
- .toString();
63
- if (new Dec(debt).eq(0)) ratio = '0';
64
-
65
- const debtTooLow = new Dec(debt).gt(0) && new Dec(assetAmountInEth(debt, 'DAI')).lt(ilkInfo.minDebt);
66
-
67
- const par = '1';
68
- return {
69
- owner: cdpInfo.owner,
70
- userAddress: cdpInfo.userAddr,
71
- id: cdpId,
72
- urn: cdpInfo.urn,
73
- type: 'mcd',
74
- ilk: cdpInfo.ilk,
75
- ilkLabel: ilkInfo.ilkLabel,
76
- asset,
77
- collateral: assetAmountInEth(cdpInfo.collateral, `MCD-${asset}`),
78
- collateralUsd: assetAmountInEth(collateralUsd, `MCD-${asset}`),
79
- futureDebt: assetAmountInEth(futureDebt, 'DAI'),
80
- debtDai: assetAmountInEth(debt, 'DAI'),
81
- debtUsd: assetAmountInEth(debt, 'DAI'),
82
- debtInAsset: assetAmountInEth(debt, 'DAI'),
83
- debtAssetPrice: par,
84
- debtAssetMarketPrice: par,
85
- liquidationPrice,
86
- ratio,
87
- liqRatio: ilkInfo.liqRatio.toString(),
88
- liqPercent: parseFloat(ilkInfo.liqPercent.toString()),
89
- assetPrice: ilkInfo.assetPrice,
90
- daiLabel: 'DAI',
91
- debtAsset: 'DAI',
92
- unclaimedCollateral: assetAmountInEth(coll, asset),
93
- debtTooLow,
94
- minDebt: ilkInfo.minDebt,
95
- stabilityFee: ilkInfo.stabilityFee,
96
- creatableDebt: ilkInfo.creatableDebt,
97
- globalDebtCeiling: ilkInfo.globalDebtCeiling,
98
- globalDebtCurrent: ilkInfo.globalDebtCurrent,
99
- liquidationFee: ilkInfo.liquidationFee,
100
- lastUpdated: Date.now(),
101
- };
1
+ import Web3 from 'web3';
2
+ import Dec from 'decimal.js';
3
+ import { assetAmountInEth, getAssetInfo, ilkToAsset } from '@defisaver/tokens';
4
+ import { Blockish, NetworkNumber, PositionBalances } from '../types/common';
5
+ import { McdViewContract } from '../contracts';
6
+ import { makerHelpers } from '../helpers';
7
+ import { CdpData } from '../types';
8
+ import { wethToEth } from '../services/utils';
9
+
10
+ export const getMakerAccountBalances = async (web3: Web3, network: NetworkNumber, block: Blockish, addressMapping: boolean, cdpId: string): Promise<PositionBalances> => {
11
+ let balances: PositionBalances = {
12
+ collateral: {},
13
+ debt: {},
14
+ };
15
+
16
+ if (!cdpId) {
17
+ return balances;
18
+ }
19
+
20
+ const viewContract = McdViewContract(web3, network, block);
21
+ // @ts-ignore
22
+ const cdpInfo = await viewContract.methods.getCdpInfo(cdpId).call({}, block);
23
+ const ilkInfo = await makerHelpers.getCollateralInfo(cdpInfo.ilk, web3, network, block);
24
+
25
+ const asset = wethToEth(ilkToAsset(cdpInfo.ilk));
26
+
27
+ balances = {
28
+ collateral: {
29
+ [addressMapping ? getAssetInfo(asset, network).address.toLowerCase() : asset]: asset === 'WBTC' ? new Dec(cdpInfo.collateral).div(1e10).floor().toString() : cdpInfo.collateral,
30
+ },
31
+ debt: {
32
+ [addressMapping ? getAssetInfo('DAI', network).address.toLowerCase() : 'DAI']: new Dec(cdpInfo.debt).times(ilkInfo.currentRate).div(1e27).floor()
33
+ .toString(),
34
+ },
35
+ };
36
+
37
+ return balances;
38
+ };
39
+
40
+ export const getMakerCdpData = async (web3: Web3, network: NetworkNumber, cdpId: string): Promise<CdpData> => {
41
+ const viewContract = McdViewContract(web3, network);
42
+
43
+ // @ts-ignore
44
+ const cdpInfo = await viewContract.methods.getCdpInfo(cdpId).call();
45
+
46
+ const [ilkInfo, coll] = await Promise.all([
47
+ makerHelpers.getCollateralInfo(cdpInfo.ilk, web3, network),
48
+ makerHelpers.getUnclaimedCollateral(web3, network, cdpInfo.urn, cdpInfo.ilk),
49
+ ]);
50
+
51
+ const asset = ilkToAsset(cdpInfo.ilk);
52
+
53
+ const collateralUsd = new Dec(cdpInfo.collateral).mul(ilkInfo.assetPrice).floor().toString();
54
+ const debt = new Dec(cdpInfo.debt).times(ilkInfo.currentRate).div(1e27).floor()
55
+ .toString();
56
+ const futureDebt = new Dec(cdpInfo.debt).times(ilkInfo.futureRate).div(1e27).floor()
57
+ .toString(); // after drip
58
+ const debtDripDelta = assetAmountInEth(new Dec(futureDebt).sub(debt).toString(), 'DAI');
59
+ const liquidationPrice = new Dec(debt).times(ilkInfo.liqRatio).div(cdpInfo.collateral).toString();
60
+
61
+ let ratio = new Dec(cdpInfo.collateral).times(ilkInfo.assetPrice).div(debt).times(100)
62
+ .toString();
63
+ if (new Dec(debt).eq(0)) ratio = '0';
64
+
65
+ const debtTooLow = new Dec(debt).gt(0) && new Dec(assetAmountInEth(debt, 'DAI')).lt(ilkInfo.minDebt);
66
+
67
+ const par = '1';
68
+ return {
69
+ owner: cdpInfo.owner,
70
+ userAddress: cdpInfo.userAddr,
71
+ id: cdpId,
72
+ urn: cdpInfo.urn,
73
+ type: 'mcd',
74
+ ilk: cdpInfo.ilk,
75
+ ilkLabel: ilkInfo.ilkLabel,
76
+ asset,
77
+ collateral: assetAmountInEth(cdpInfo.collateral, `MCD-${asset}`),
78
+ collateralUsd: assetAmountInEth(collateralUsd, `MCD-${asset}`),
79
+ futureDebt: assetAmountInEth(futureDebt, 'DAI'),
80
+ debtDai: assetAmountInEth(debt, 'DAI'),
81
+ debtUsd: assetAmountInEth(debt, 'DAI'),
82
+ debtInAsset: assetAmountInEth(debt, 'DAI'),
83
+ debtAssetPrice: par,
84
+ debtAssetMarketPrice: par,
85
+ liquidationPrice,
86
+ ratio,
87
+ liqRatio: ilkInfo.liqRatio.toString(),
88
+ liqPercent: parseFloat(ilkInfo.liqPercent.toString()),
89
+ assetPrice: ilkInfo.assetPrice,
90
+ daiLabel: 'DAI',
91
+ debtAsset: 'DAI',
92
+ unclaimedCollateral: assetAmountInEth(coll, asset),
93
+ debtTooLow,
94
+ minDebt: ilkInfo.minDebt,
95
+ stabilityFee: ilkInfo.stabilityFee,
96
+ creatableDebt: ilkInfo.creatableDebt,
97
+ globalDebtCeiling: ilkInfo.globalDebtCeiling,
98
+ globalDebtCurrent: ilkInfo.globalDebtCurrent,
99
+ liquidationFee: ilkInfo.liquidationFee,
100
+ lastUpdated: Date.now(),
101
+ };
102
102
  };
@@ -1,80 +1,80 @@
1
- import { getConfigContractAddress } from '../../contracts';
2
- import {
3
- AaveMarketInfo, AaveVersions, MorphoAaveV2MarketInfo, MorphoAaveV3MarketInfo,
4
- } from '../../types';
5
- import { NetworkNumber } from '../../types/common';
6
- import {
7
- aaveV2AssetsDefaultMarket, aaveV3AssetsDefaultMarket, morphoAaveV2AssetDefaultMarket, morphoAaveV3AssetEthMarket,
8
- } from './marketAssets';
9
-
10
- export const AAVE_V2: AaveMarketInfo = {
11
- chainIds: [1],
12
- label: 'Aave v2',
13
- shortLabel: 'v2',
14
- value: AaveVersions.AaveV2,
15
- url: 'default',
16
- assets: aaveV2AssetsDefaultMarket,
17
- provider: 'LendingPoolAddressesProvider',
18
- providerAddress: getConfigContractAddress('LendingPoolAddressesProvider', 1), // rename
19
- lendingPool: 'AaveLendingPoolV2',
20
- lendingPoolAddress: getConfigContractAddress('AaveLendingPoolV2', 1),
21
- protocolData: 'AaveProtocolDataProvider',
22
- protocolDataAddress: getConfigContractAddress('AaveProtocolDataProvider', 1),
23
- // icon: SvgAdapter(protocolIcons.aave),
24
- protocolName: 'aave',
25
- };
26
-
27
- export const AAVE_V3 = (networkId: NetworkNumber): AaveMarketInfo => ({
28
- chainIds: [NetworkNumber.Eth, NetworkNumber.Opt, NetworkNumber.Arb, NetworkNumber.Base],
29
- label: 'Aave v3',
30
- shortLabel: 'v3',
31
- value: AaveVersions.AaveV3,
32
- url: 'default',
33
- assets: networkId ? aaveV3AssetsDefaultMarket[networkId] : [],
34
- provider: 'AaveV3PoolAddressesProvider',
35
- providerAddress: getConfigContractAddress('AaveV3PoolAddressesProvider', networkId),
36
- lendingPool: 'AaveV3LendingPool',
37
- lendingPoolAddress: getConfigContractAddress('AaveV3LendingPool', networkId),
38
- protocolData: 'AaveV3ProtocolDataProvider',
39
- protocolDataAddress: getConfigContractAddress('AaveV3ProtocolDataProvider', networkId),
40
- // icon: SvgAdapter(protocolIcons.aave),
41
- protocolName: 'aave',
42
- });
43
-
44
- export const MORPHO_AAVE_V2: MorphoAaveV2MarketInfo = {
45
- chainIds: [1],
46
- label: 'Morpho-Aave V2',
47
- shortLabel: 'morpho-aave-v2',
48
- value: AaveVersions.MorphoAaveV2,
49
- url: '',
50
- assets: morphoAaveV2AssetDefaultMarket,
51
- providerAddress: getConfigContractAddress('LendingPoolAddressesProvider', 1),
52
- lendingPoolAddress: getConfigContractAddress('MorphoAaveV2Proxy', 1),
53
- // icon: SvgAdapter(protocolIcons.morpho),
54
- protocolName: 'morpho',
55
- };
56
-
57
- export const MORPHO_AAVE_V3_ETH = (networkId: NetworkNumber = NetworkNumber.Eth): MorphoAaveV3MarketInfo => ({
58
- chainIds: [1],
59
- label: 'Morpho-Aave V3',
60
- shortLabel: 'morpho-aave-v3',
61
- subVersionLabel: 'ETH Optimizer',
62
- value: AaveVersions.MorphoAaveV3Eth,
63
- url: 'eth-optimizer',
64
- assets: morphoAaveV3AssetEthMarket,
65
- providerAddress: getConfigContractAddress('AaveV3PoolAddressesProvider', networkId), // TODO - check if used and if value is good?
66
- protocolData: 'AaveV3ProtocolDataProvider',
67
- protocolDataAddress: getConfigContractAddress('AaveV3ProtocolDataProvider', networkId),
68
- lendingPool: 'MorphoAaveV3ProxyEthMarket',
69
- lendingPoolAddress: getConfigContractAddress('MorphoAaveV3ProxyEthMarket', 1),
70
- // icon: SvgAdapter(protocolIcons.morpho),
71
- protocolName: 'morpho',
72
- });
73
-
74
-
75
- export const AaveMarkets = (networkId: NetworkNumber) => ({
76
- [AaveVersions.AaveV2]: AAVE_V2,
77
- [AaveVersions.AaveV3]: AAVE_V3(networkId),
78
- [AaveVersions.MorphoAaveV3Eth]: MORPHO_AAVE_V3_ETH(networkId),
79
- [AaveVersions.MorphoAaveV2]: MORPHO_AAVE_V2,
80
- }) as const;
1
+ import { getConfigContractAddress } from '../../contracts';
2
+ import {
3
+ AaveMarketInfo, AaveVersions, MorphoAaveV2MarketInfo, MorphoAaveV3MarketInfo,
4
+ } from '../../types';
5
+ import { NetworkNumber } from '../../types/common';
6
+ import {
7
+ aaveV2AssetsDefaultMarket, aaveV3AssetsDefaultMarket, morphoAaveV2AssetDefaultMarket, morphoAaveV3AssetEthMarket,
8
+ } from './marketAssets';
9
+
10
+ export const AAVE_V2: AaveMarketInfo = {
11
+ chainIds: [1],
12
+ label: 'Aave v2',
13
+ shortLabel: 'v2',
14
+ value: AaveVersions.AaveV2,
15
+ url: 'default',
16
+ assets: aaveV2AssetsDefaultMarket,
17
+ provider: 'LendingPoolAddressesProvider',
18
+ providerAddress: getConfigContractAddress('LendingPoolAddressesProvider', 1), // rename
19
+ lendingPool: 'AaveLendingPoolV2',
20
+ lendingPoolAddress: getConfigContractAddress('AaveLendingPoolV2', 1),
21
+ protocolData: 'AaveProtocolDataProvider',
22
+ protocolDataAddress: getConfigContractAddress('AaveProtocolDataProvider', 1),
23
+ // icon: SvgAdapter(protocolIcons.aave),
24
+ protocolName: 'aave',
25
+ };
26
+
27
+ export const AAVE_V3 = (networkId: NetworkNumber): AaveMarketInfo => ({
28
+ chainIds: [NetworkNumber.Eth, NetworkNumber.Opt, NetworkNumber.Arb, NetworkNumber.Base],
29
+ label: 'Aave v3',
30
+ shortLabel: 'v3',
31
+ value: AaveVersions.AaveV3,
32
+ url: 'default',
33
+ assets: networkId ? aaveV3AssetsDefaultMarket[networkId] : [],
34
+ provider: 'AaveV3PoolAddressesProvider',
35
+ providerAddress: getConfigContractAddress('AaveV3PoolAddressesProvider', networkId),
36
+ lendingPool: 'AaveV3LendingPool',
37
+ lendingPoolAddress: getConfigContractAddress('AaveV3LendingPool', networkId),
38
+ protocolData: 'AaveV3ProtocolDataProvider',
39
+ protocolDataAddress: getConfigContractAddress('AaveV3ProtocolDataProvider', networkId),
40
+ // icon: SvgAdapter(protocolIcons.aave),
41
+ protocolName: 'aave',
42
+ });
43
+
44
+ export const MORPHO_AAVE_V2: MorphoAaveV2MarketInfo = {
45
+ chainIds: [1],
46
+ label: 'Morpho-Aave V2',
47
+ shortLabel: 'morpho-aave-v2',
48
+ value: AaveVersions.MorphoAaveV2,
49
+ url: '',
50
+ assets: morphoAaveV2AssetDefaultMarket,
51
+ providerAddress: getConfigContractAddress('LendingPoolAddressesProvider', 1),
52
+ lendingPoolAddress: getConfigContractAddress('MorphoAaveV2Proxy', 1),
53
+ // icon: SvgAdapter(protocolIcons.morpho),
54
+ protocolName: 'morpho',
55
+ };
56
+
57
+ export const MORPHO_AAVE_V3_ETH = (networkId: NetworkNumber = NetworkNumber.Eth): MorphoAaveV3MarketInfo => ({
58
+ chainIds: [1],
59
+ label: 'Morpho-Aave V3',
60
+ shortLabel: 'morpho-aave-v3',
61
+ subVersionLabel: 'ETH Optimizer',
62
+ value: AaveVersions.MorphoAaveV3Eth,
63
+ url: 'eth-optimizer',
64
+ assets: morphoAaveV3AssetEthMarket,
65
+ providerAddress: getConfigContractAddress('AaveV3PoolAddressesProvider', networkId), // TODO - check if used and if value is good?
66
+ protocolData: 'AaveV3ProtocolDataProvider',
67
+ protocolDataAddress: getConfigContractAddress('AaveV3ProtocolDataProvider', networkId),
68
+ lendingPool: 'MorphoAaveV3ProxyEthMarket',
69
+ lendingPoolAddress: getConfigContractAddress('MorphoAaveV3ProxyEthMarket', 1),
70
+ // icon: SvgAdapter(protocolIcons.morpho),
71
+ protocolName: 'morpho',
72
+ });
73
+
74
+
75
+ export const AaveMarkets = (networkId: NetworkNumber) => ({
76
+ [AaveVersions.AaveV2]: AAVE_V2,
77
+ [AaveVersions.AaveV3]: AAVE_V3(networkId),
78
+ [AaveVersions.MorphoAaveV3Eth]: MORPHO_AAVE_V3_ETH(networkId),
79
+ [AaveVersions.MorphoAaveV2]: MORPHO_AAVE_V2,
80
+ }) as const;
@@ -1,33 +1,33 @@
1
- // TODO generate this file automatically
2
-
3
- import { NetworkNumber } from '../../types/common';
4
-
5
- export const aaveV2AssetsDefaultMarket = [
6
- 'AAVE', 'BAL', 'BAT', 'BUSD', 'CRV', 'DAI', 'ENJ', 'ETH', 'GUSD', 'LINK', 'MANA', 'MKR',
7
- 'REN', 'SNX', 'SUSD', 'TUSD', 'UNI', 'USDC', 'USDT', 'WBTC', 'YFI', 'xSUSHI', 'ZRX', 'RAI',
8
- 'AMPL', 'DPI', 'USDP', 'RENFIL', 'FRAX', 'FEI', 'stETH', 'ENS', 'UST', 'CVX', '1INCH', 'LUSD',
9
- ] as const;
10
-
11
- export const morphoAaveV2AssetDefaultMarket = [
12
- 'ETH', 'stETH', 'USDC', 'WBTC', 'USDT', 'DAI', 'CRV',
13
- ];
14
-
15
- export const morphoAaveV3AssetEthMarket = [
16
- 'ETH', 'wstETH', 'DAI', 'USDC', 'WBTC', 'rETH', 'cbETH',
17
- ];
18
-
19
- export const aaveV3AssetsDefaultMarket = {
20
- [NetworkNumber.Eth]: [
21
- 'WBTC', 'ETH', 'wstETH', 'USDC', 'DAI', 'LINK', 'AAVE', 'cbETH', 'USDT', 'rETH', 'LUSD', 'UNI', 'MKR', 'SNX', 'BAL',
22
- 'LDO', 'CRV', 'ENS', '1INCH', 'GHO', 'FRAX', 'RPL', 'sDAI',
23
- ],
24
- [NetworkNumber.Opt]: [
25
- 'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH',
26
- ],
27
- [NetworkNumber.Arb]: [
28
- 'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB',
29
- ],
30
- [NetworkNumber.Base]: [
31
- 'ETH', 'USDbC', 'cbETH',
32
- ],
1
+ // TODO generate this file automatically
2
+
3
+ import { NetworkNumber } from '../../types/common';
4
+
5
+ export const aaveV2AssetsDefaultMarket = [
6
+ 'AAVE', 'BAL', 'BAT', 'BUSD', 'CRV', 'DAI', 'ENJ', 'ETH', 'GUSD', 'LINK', 'MANA', 'MKR',
7
+ 'REN', 'SNX', 'SUSD', 'TUSD', 'UNI', 'USDC', 'USDT', 'WBTC', 'YFI', 'xSUSHI', 'ZRX', 'RAI',
8
+ 'AMPL', 'DPI', 'USDP', 'RENFIL', 'FRAX', 'FEI', 'stETH', 'ENS', 'UST', 'CVX', '1INCH', 'LUSD',
9
+ ] as const;
10
+
11
+ export const morphoAaveV2AssetDefaultMarket = [
12
+ 'ETH', 'stETH', 'USDC', 'WBTC', 'USDT', 'DAI', 'CRV',
13
+ ];
14
+
15
+ export const morphoAaveV3AssetEthMarket = [
16
+ 'ETH', 'wstETH', 'DAI', 'USDC', 'WBTC', 'rETH', 'cbETH',
17
+ ];
18
+
19
+ export const aaveV3AssetsDefaultMarket = {
20
+ [NetworkNumber.Eth]: [
21
+ 'WBTC', 'ETH', 'wstETH', 'USDC', 'DAI', 'LINK', 'AAVE', 'cbETH', 'USDT', 'rETH', 'LUSD', 'UNI', 'MKR', 'SNX', 'BAL',
22
+ 'LDO', 'CRV', 'ENS', '1INCH', 'GHO', 'FRAX', 'RPL', 'sDAI',
23
+ ],
24
+ [NetworkNumber.Opt]: [
25
+ 'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH',
26
+ ],
27
+ [NetworkNumber.Arb]: [
28
+ 'ETH', 'DAI', 'EURS', 'USDC', 'USDT', 'AAVE', 'LINK', 'WBTC', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC.e', 'FRAX', 'ARB',
29
+ ],
30
+ [NetworkNumber.Base]: [
31
+ 'ETH', 'USDbC', 'cbETH',
32
+ ],
33
33
  } as const;