@defisaver/positions-sdk 2.0.15-dev → 2.0.15-dev-2
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 +64 -64
- package/cjs/aaveV2/index.js +9 -5
- package/cjs/aaveV3/index.js +50 -40
- package/cjs/aaveV3/merit.d.ts +17 -0
- package/cjs/aaveV3/merit.js +95 -0
- package/cjs/aaveV3/{rewards.d.ts → merkl.d.ts} +7 -2
- package/cjs/aaveV3/{rewards.js → merkl.js} +30 -14
- package/cjs/compoundV2/index.js +13 -7
- package/cjs/compoundV3/index.js +7 -2
- package/cjs/config/contracts.d.ts +6510 -1851
- package/cjs/config/contracts.js +33 -12
- package/cjs/contracts.d.ts +178 -0
- package/cjs/eulerV2/index.js +11 -2
- package/cjs/fluid/index.js +105 -34
- package/cjs/helpers/aaveHelpers/index.js +0 -1
- package/cjs/helpers/compoundHelpers/index.d.ts +3 -5
- package/cjs/helpers/compoundHelpers/index.js +15 -11
- package/cjs/helpers/eulerHelpers/index.d.ts +0 -5
- package/cjs/helpers/eulerHelpers/index.js +2 -31
- package/cjs/helpers/fluidHelpers/index.js +2 -0
- package/cjs/helpers/liquityV2Helpers/index.js +3 -2
- package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
- package/cjs/liquityV2/index.js +10 -2
- package/cjs/llamaLend/index.js +10 -2
- package/cjs/morphoBlue/index.js +20 -6
- package/cjs/spark/index.js +20 -30
- package/cjs/staking/eligibility.d.ts +11 -0
- package/cjs/staking/eligibility.js +43 -0
- package/cjs/staking/index.d.ts +1 -0
- package/cjs/staking/index.js +1 -0
- package/cjs/staking/staking.d.ts +1 -7
- package/cjs/staking/staking.js +29 -55
- package/cjs/types/aave.d.ts +1 -7
- package/cjs/types/common.d.ts +16 -4
- package/cjs/types/common.js +10 -1
- package/cjs/types/euler.d.ts +3 -3
- package/cjs/types/fluid.d.ts +3 -5
- package/cjs/types/liquityV2.d.ts +3 -3
- package/cjs/types/llamaLend.d.ts +3 -1
- package/cjs/types/morphoBlue.d.ts +3 -5
- package/cjs/types/spark.d.ts +0 -3
- package/esm/aaveV2/index.js +9 -5
- package/esm/aaveV3/index.js +48 -38
- package/esm/aaveV3/merit.d.ts +17 -0
- package/esm/aaveV3/merit.js +90 -0
- package/esm/aaveV3/{rewards.d.ts → merkl.d.ts} +7 -2
- package/esm/aaveV3/{rewards.js → merkl.js} +28 -13
- package/esm/compoundV2/index.js +13 -7
- package/esm/compoundV3/index.js +7 -2
- package/esm/config/contracts.d.ts +6510 -1851
- package/esm/config/contracts.js +33 -12
- package/esm/contracts.d.ts +178 -0
- package/esm/eulerV2/index.js +11 -2
- package/esm/fluid/index.js +106 -35
- package/esm/helpers/aaveHelpers/index.js +0 -1
- package/esm/helpers/compoundHelpers/index.d.ts +3 -5
- package/esm/helpers/compoundHelpers/index.js +16 -12
- package/esm/helpers/eulerHelpers/index.d.ts +0 -5
- package/esm/helpers/eulerHelpers/index.js +2 -30
- package/esm/helpers/fluidHelpers/index.js +2 -0
- package/esm/helpers/liquityV2Helpers/index.js +3 -2
- package/esm/helpers/morphoBlueHelpers/index.js +66 -66
- package/esm/liquityV2/index.js +11 -3
- package/esm/llamaLend/index.js +11 -3
- package/esm/morphoBlue/index.js +21 -7
- package/esm/spark/index.js +21 -31
- package/esm/staking/eligibility.d.ts +11 -0
- package/esm/staking/eligibility.js +36 -0
- package/esm/staking/index.d.ts +1 -0
- package/esm/staking/index.js +1 -0
- package/esm/staking/staking.d.ts +1 -7
- package/esm/staking/staking.js +28 -53
- package/esm/types/aave.d.ts +1 -7
- package/esm/types/common.d.ts +16 -4
- package/esm/types/common.js +9 -0
- package/esm/types/euler.d.ts +3 -3
- package/esm/types/fluid.d.ts +3 -5
- package/esm/types/liquityV2.d.ts +3 -3
- package/esm/types/llamaLend.d.ts +3 -1
- package/esm/types/morphoBlue.d.ts +3 -5
- package/esm/types/spark.d.ts +0 -3
- package/package.json +47 -47
- package/src/aaveV2/index.ts +239 -236
- package/src/aaveV3/index.ts +511 -493
- package/src/aaveV3/merit.ts +98 -0
- package/src/aaveV3/{rewards.ts → merkl.ts} +141 -125
- package/src/compoundV2/index.ts +244 -240
- package/src/compoundV3/index.ts +274 -270
- package/src/config/contracts.ts +1129 -1108
- package/src/constants/index.ts +6 -6
- package/src/contracts.ts +107 -107
- package/src/curveUsd/index.ts +250 -250
- package/src/eulerV2/index.ts +324 -314
- package/src/exchange/index.ts +25 -25
- package/src/fluid/index.ts +1636 -1568
- package/src/helpers/aaveHelpers/index.ts +169 -170
- package/src/helpers/compoundHelpers/index.ts +267 -261
- package/src/helpers/curveUsdHelpers/index.ts +40 -40
- package/src/helpers/eulerHelpers/index.ts +222 -259
- package/src/helpers/fluidHelpers/index.ts +326 -324
- package/src/helpers/index.ts +10 -10
- package/src/helpers/liquityV2Helpers/index.ts +82 -80
- package/src/helpers/llamaLendHelpers/index.ts +53 -53
- package/src/helpers/makerHelpers/index.ts +52 -52
- package/src/helpers/morphoBlueHelpers/index.ts +390 -390
- package/src/helpers/sparkHelpers/index.ts +155 -155
- package/src/index.ts +45 -45
- package/src/liquity/index.ts +104 -104
- package/src/liquityV2/index.ts +418 -408
- package/src/llamaLend/index.ts +305 -296
- package/src/maker/index.ts +223 -223
- package/src/markets/aave/index.ts +116 -116
- package/src/markets/aave/marketAssets.ts +49 -49
- package/src/markets/compound/index.ts +227 -227
- package/src/markets/compound/marketsAssets.ts +90 -90
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/euler/index.ts +26 -26
- package/src/markets/fluid/index.ts +2456 -2456
- package/src/markets/index.ts +25 -25
- package/src/markets/liquityV2/index.ts +102 -102
- package/src/markets/llamaLend/contractAddresses.ts +141 -141
- package/src/markets/llamaLend/index.ts +235 -235
- package/src/markets/morphoBlue/index.ts +895 -895
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +11 -11
- package/src/moneymarket/moneymarketCommonService.ts +80 -80
- package/src/morphoBlue/index.ts +236 -222
- package/src/portfolio/index.ts +285 -285
- package/src/services/priceService.ts +159 -159
- package/src/services/utils.ts +63 -63
- package/src/services/viem.ts +32 -32
- package/src/setup.ts +8 -8
- package/src/spark/index.ts +444 -456
- package/src/staking/eligibility.ts +37 -0
- package/src/staking/index.ts +2 -1
- package/src/staking/staking.ts +169 -194
- package/src/types/aave.ts +189 -195
- package/src/types/common.ts +103 -88
- package/src/types/compound.ts +136 -136
- package/src/types/curveUsd.ts +121 -121
- package/src/types/euler.ts +175 -174
- package/src/types/fluid.ts +448 -450
- package/src/types/index.ts +11 -11
- package/src/types/liquity.ts +30 -30
- package/src/types/liquityV2.ts +126 -126
- package/src/types/llamaLend.ts +159 -157
- package/src/types/maker.ts +63 -63
- package/src/types/morphoBlue.ts +194 -194
- package/src/types/portfolio.ts +60 -60
- package/src/types/spark.ts +135 -137
package/src/types/compound.ts
CHANGED
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EthAddress,
|
|
3
|
-
MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
|
|
4
|
-
} from './common';
|
|
5
|
-
|
|
6
|
-
export enum CompoundVersions {
|
|
7
|
-
'CompoundV2' = 'v2',
|
|
8
|
-
'CompoundV3USDC' = 'v3-USDC',
|
|
9
|
-
'CompoundV3USDCe' = 'v3-USDC.e',
|
|
10
|
-
'CompoundV3ETH' = 'v3-ETH',
|
|
11
|
-
'CompoundV3USDbC' = 'v3-USDbC',
|
|
12
|
-
'CompoundV3USDT' = 'v3-USDT',
|
|
13
|
-
'CompoundV3USDS' = 'v3-USDS',
|
|
14
|
-
'CompoundV3wstETH' = 'v3-wstETH',
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface CompoundBulkerOptions {
|
|
18
|
-
supply: number | string,
|
|
19
|
-
withdraw: number | string,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface CompoundMarketData {
|
|
23
|
-
chainIds: NetworkNumber[],
|
|
24
|
-
label: string,
|
|
25
|
-
shortLabel: string,
|
|
26
|
-
value: CompoundVersions,
|
|
27
|
-
baseAsset: string,
|
|
28
|
-
collAssets: readonly string[],
|
|
29
|
-
baseMarket: string,
|
|
30
|
-
baseMarketAddress: EthAddress,
|
|
31
|
-
secondLabel: string,
|
|
32
|
-
bulkerName: string,
|
|
33
|
-
bulkerAddress: EthAddress,
|
|
34
|
-
bulkerOptions: CompoundBulkerOptions,
|
|
35
|
-
// icon: Function,
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface CompoundUsedAsset extends MMUsedAsset {
|
|
39
|
-
collateral: boolean,
|
|
40
|
-
limit?: string,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface CompoundV2UsedAsset extends CompoundUsedAsset {
|
|
44
|
-
}
|
|
45
|
-
export interface CompoundV3UsedAsset extends CompoundUsedAsset {
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface CompoundUsedAssets<T> {
|
|
49
|
-
[token: string]: T,
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
|
|
53
|
-
export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
|
|
54
|
-
|
|
55
|
-
export interface CompoundAssetData extends MMAssetData {
|
|
56
|
-
supplyCapAlternative?: string,
|
|
57
|
-
totalSupplyAlternative?: string,
|
|
58
|
-
sortIndex?: number,
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface CompoundV2AssetData extends CompoundAssetData {
|
|
62
|
-
}
|
|
63
|
-
export interface CompoundV3AssetData extends CompoundAssetData {
|
|
64
|
-
borrowCollateralFactor: string,
|
|
65
|
-
liquidateCollateralFactor: string,
|
|
66
|
-
liquidationFactor: string,
|
|
67
|
-
minDebt: string,
|
|
68
|
-
supplyReserved: string,
|
|
69
|
-
liquidationRatio: string,
|
|
70
|
-
supplyCap: string,
|
|
71
|
-
priceInBaseAsset: string,
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface CompoundAssetsData<T> {
|
|
75
|
-
[token: string]: T
|
|
76
|
-
}
|
|
77
|
-
export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
|
|
78
|
-
export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
|
|
79
|
-
|
|
80
|
-
export type CompoundMarketsData<T> = { assetsData: T };
|
|
81
|
-
export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
|
|
82
|
-
export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
|
|
83
|
-
|
|
84
|
-
export interface BaseAdditionalAssetData {
|
|
85
|
-
totalBorrow: string,
|
|
86
|
-
utilization: string,
|
|
87
|
-
marketLiquidity: string,
|
|
88
|
-
rewardSupplySpeed: string,
|
|
89
|
-
rewardBorrowSpeed: string,
|
|
90
|
-
minDebt: string,
|
|
91
|
-
isBase: boolean,
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export interface CompoundAggregatedPositionData {
|
|
95
|
-
suppliedUsd: string,
|
|
96
|
-
suppliedCollateralUsd: string,
|
|
97
|
-
borrowedUsd: string,
|
|
98
|
-
borrowLimitUsd: string,
|
|
99
|
-
liquidationLimitUsd: string,
|
|
100
|
-
leftToBorrowUsd: string,
|
|
101
|
-
ratio: string,
|
|
102
|
-
collRatio: string,
|
|
103
|
-
netApy: string,
|
|
104
|
-
incentiveUsd: string,
|
|
105
|
-
totalInterestUsd: string,
|
|
106
|
-
liqRatio: string,
|
|
107
|
-
liqPercent: string,
|
|
108
|
-
leveragedType: string,
|
|
109
|
-
leveragedAsset?: string,
|
|
110
|
-
leveragedLsdAssetRatio?: string,
|
|
111
|
-
liquidationPrice?: string,
|
|
112
|
-
minRatio: string,
|
|
113
|
-
debtTooLow: boolean,
|
|
114
|
-
minDebt: string,
|
|
115
|
-
minCollRatio: string,
|
|
116
|
-
collLiquidationRatio: string,
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export interface CompoundPositionData extends MMPositionData {
|
|
120
|
-
ratio: string,
|
|
121
|
-
minRatio: string,
|
|
122
|
-
suppliedUsd: string,
|
|
123
|
-
borrowedUsd: string,
|
|
124
|
-
borrowLimitUsd: string,
|
|
125
|
-
incentiveUsd: string,
|
|
126
|
-
totalInterestUsd: string,
|
|
127
|
-
isSubscribedToAutomation?: boolean,
|
|
128
|
-
automationResubscribeRequired?: boolean,
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
export interface CompoundV2PositionData extends CompoundPositionData {
|
|
132
|
-
usedAssets: CompoundV2UsedAssets,
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export interface CompoundV3PositionData extends CompoundPositionData {
|
|
136
|
-
usedAssets: CompoundV3UsedAssets,
|
|
1
|
+
import {
|
|
2
|
+
EthAddress,
|
|
3
|
+
MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber,
|
|
4
|
+
} from './common';
|
|
5
|
+
|
|
6
|
+
export enum CompoundVersions {
|
|
7
|
+
'CompoundV2' = 'v2',
|
|
8
|
+
'CompoundV3USDC' = 'v3-USDC',
|
|
9
|
+
'CompoundV3USDCe' = 'v3-USDC.e',
|
|
10
|
+
'CompoundV3ETH' = 'v3-ETH',
|
|
11
|
+
'CompoundV3USDbC' = 'v3-USDbC',
|
|
12
|
+
'CompoundV3USDT' = 'v3-USDT',
|
|
13
|
+
'CompoundV3USDS' = 'v3-USDS',
|
|
14
|
+
'CompoundV3wstETH' = 'v3-wstETH',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CompoundBulkerOptions {
|
|
18
|
+
supply: number | string,
|
|
19
|
+
withdraw: number | string,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface CompoundMarketData {
|
|
23
|
+
chainIds: NetworkNumber[],
|
|
24
|
+
label: string,
|
|
25
|
+
shortLabel: string,
|
|
26
|
+
value: CompoundVersions,
|
|
27
|
+
baseAsset: string,
|
|
28
|
+
collAssets: readonly string[],
|
|
29
|
+
baseMarket: string,
|
|
30
|
+
baseMarketAddress: EthAddress,
|
|
31
|
+
secondLabel: string,
|
|
32
|
+
bulkerName: string,
|
|
33
|
+
bulkerAddress: EthAddress,
|
|
34
|
+
bulkerOptions: CompoundBulkerOptions,
|
|
35
|
+
// icon: Function,
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface CompoundUsedAsset extends MMUsedAsset {
|
|
39
|
+
collateral: boolean,
|
|
40
|
+
limit?: string,
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface CompoundV2UsedAsset extends CompoundUsedAsset {
|
|
44
|
+
}
|
|
45
|
+
export interface CompoundV3UsedAsset extends CompoundUsedAsset {
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CompoundUsedAssets<T> {
|
|
49
|
+
[token: string]: T,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export type CompoundV2UsedAssets = CompoundUsedAssets<CompoundV2UsedAsset>;
|
|
53
|
+
export type CompoundV3UsedAssets = CompoundUsedAssets<CompoundV3UsedAsset>;
|
|
54
|
+
|
|
55
|
+
export interface CompoundAssetData extends MMAssetData {
|
|
56
|
+
supplyCapAlternative?: string,
|
|
57
|
+
totalSupplyAlternative?: string,
|
|
58
|
+
sortIndex?: number,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface CompoundV2AssetData extends CompoundAssetData {
|
|
62
|
+
}
|
|
63
|
+
export interface CompoundV3AssetData extends CompoundAssetData {
|
|
64
|
+
borrowCollateralFactor: string,
|
|
65
|
+
liquidateCollateralFactor: string,
|
|
66
|
+
liquidationFactor: string,
|
|
67
|
+
minDebt: string,
|
|
68
|
+
supplyReserved: string,
|
|
69
|
+
liquidationRatio: string,
|
|
70
|
+
supplyCap: string,
|
|
71
|
+
priceInBaseAsset: string,
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface CompoundAssetsData<T> {
|
|
75
|
+
[token: string]: T
|
|
76
|
+
}
|
|
77
|
+
export type CompoundV2AssetsData = CompoundAssetsData<CompoundV2AssetData>;
|
|
78
|
+
export type CompoundV3AssetsData = CompoundAssetsData<CompoundV3AssetData>;
|
|
79
|
+
|
|
80
|
+
export type CompoundMarketsData<T> = { assetsData: T };
|
|
81
|
+
export type CompoundV2MarketsData = CompoundMarketsData<CompoundV2AssetsData>;
|
|
82
|
+
export type CompoundV3MarketsData = CompoundMarketsData<CompoundV3AssetsData>;
|
|
83
|
+
|
|
84
|
+
export interface BaseAdditionalAssetData {
|
|
85
|
+
totalBorrow: string,
|
|
86
|
+
utilization: string,
|
|
87
|
+
marketLiquidity: string,
|
|
88
|
+
rewardSupplySpeed: string,
|
|
89
|
+
rewardBorrowSpeed: string,
|
|
90
|
+
minDebt: string,
|
|
91
|
+
isBase: boolean,
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface CompoundAggregatedPositionData {
|
|
95
|
+
suppliedUsd: string,
|
|
96
|
+
suppliedCollateralUsd: string,
|
|
97
|
+
borrowedUsd: string,
|
|
98
|
+
borrowLimitUsd: string,
|
|
99
|
+
liquidationLimitUsd: string,
|
|
100
|
+
leftToBorrowUsd: string,
|
|
101
|
+
ratio: string,
|
|
102
|
+
collRatio: string,
|
|
103
|
+
netApy: string,
|
|
104
|
+
incentiveUsd: string,
|
|
105
|
+
totalInterestUsd: string,
|
|
106
|
+
liqRatio: string,
|
|
107
|
+
liqPercent: string,
|
|
108
|
+
leveragedType: string,
|
|
109
|
+
leveragedAsset?: string,
|
|
110
|
+
leveragedLsdAssetRatio?: string,
|
|
111
|
+
liquidationPrice?: string,
|
|
112
|
+
minRatio: string,
|
|
113
|
+
debtTooLow: boolean,
|
|
114
|
+
minDebt: string,
|
|
115
|
+
minCollRatio: string,
|
|
116
|
+
collLiquidationRatio: string,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface CompoundPositionData extends MMPositionData {
|
|
120
|
+
ratio: string,
|
|
121
|
+
minRatio: string,
|
|
122
|
+
suppliedUsd: string,
|
|
123
|
+
borrowedUsd: string,
|
|
124
|
+
borrowLimitUsd: string,
|
|
125
|
+
incentiveUsd: string,
|
|
126
|
+
totalInterestUsd: string,
|
|
127
|
+
isSubscribedToAutomation?: boolean,
|
|
128
|
+
automationResubscribeRequired?: boolean,
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface CompoundV2PositionData extends CompoundPositionData {
|
|
132
|
+
usedAssets: CompoundV2UsedAssets,
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface CompoundV3PositionData extends CompoundPositionData {
|
|
136
|
+
usedAssets: CompoundV3UsedAssets,
|
|
137
137
|
}
|
package/src/types/curveUsd.ts
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
import { EthAddress, NetworkNumber } from './common';
|
|
2
|
-
|
|
3
|
-
export enum CrvUSDVersions {
|
|
4
|
-
'crvUSDwstETH' = 'wstETH',
|
|
5
|
-
'crvUSDWBTC' = 'WBTC',
|
|
6
|
-
'crvUSDETH' = 'ETH',
|
|
7
|
-
'crvUSDtBTC' = 'tBTC',
|
|
8
|
-
'crvUSDsfrxETH' = 'sfrxETH',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export enum CrvUSDStatus {
|
|
12
|
-
Nonexistant = 'Nonexistant',
|
|
13
|
-
Safe = 'Safe',
|
|
14
|
-
Risk = 'Risk',
|
|
15
|
-
SoftLiquidating = 'SoftLiquidating',
|
|
16
|
-
SoftLiquidated = 'SoftLiquidated',
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface CrvUSDMarketData {
|
|
20
|
-
chainIds: NetworkNumber[],
|
|
21
|
-
label: string,
|
|
22
|
-
shortLabel: string,
|
|
23
|
-
value: CrvUSDVersions,
|
|
24
|
-
collAsset: string,
|
|
25
|
-
baseAsset: string,
|
|
26
|
-
controllerAddress: EthAddress,
|
|
27
|
-
ammAddress: EthAddress,
|
|
28
|
-
createCollAssets: string[],
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface BandData {
|
|
32
|
-
id: string,
|
|
33
|
-
collAmount: string,
|
|
34
|
-
debtAmount: string,
|
|
35
|
-
lowPrice: string,
|
|
36
|
-
highPrice: string,
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface UserBandData {
|
|
40
|
-
id: string,
|
|
41
|
-
collAmount: string,
|
|
42
|
-
debtAmount: string,
|
|
43
|
-
lowPrice: string,
|
|
44
|
-
highPrice: string,
|
|
45
|
-
userDebtAmount: string,
|
|
46
|
-
userCollAmount: string,
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface CrvUSDGlobalMarketData {
|
|
50
|
-
collateral: string,
|
|
51
|
-
decimals: string,
|
|
52
|
-
activeBand: string,
|
|
53
|
-
totalDebt: string,
|
|
54
|
-
ammPrice: string,
|
|
55
|
-
basePrice: string,
|
|
56
|
-
oraclePrice: string,
|
|
57
|
-
minted: string,
|
|
58
|
-
redeemed: string,
|
|
59
|
-
monetaryPolicyRate: string,
|
|
60
|
-
ammRate: string,
|
|
61
|
-
minBand: string,
|
|
62
|
-
maxBand: string,
|
|
63
|
-
debtCeiling: string,
|
|
64
|
-
borrowRate: string,
|
|
65
|
-
futureBorrowRate: string,
|
|
66
|
-
leftToBorrow: string,
|
|
67
|
-
bands: BandData[],
|
|
68
|
-
loanDiscount: string;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface CrvUSDAggregatedPositionData {
|
|
72
|
-
ratio: string,
|
|
73
|
-
supplied: string,
|
|
74
|
-
suppliedUsd: string,
|
|
75
|
-
borrowedUsd: string,
|
|
76
|
-
borrowed: string,
|
|
77
|
-
safetyRatio: string,
|
|
78
|
-
borrowLimitUsd: string,
|
|
79
|
-
minAllowedRatio: number,
|
|
80
|
-
collFactor: string,
|
|
81
|
-
leveragedType: string,
|
|
82
|
-
leveragedAsset?: string,
|
|
83
|
-
liquidationPrice?: string,
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface CrvUSDUsedAsset {
|
|
87
|
-
isSupplied: boolean,
|
|
88
|
-
supplied: string,
|
|
89
|
-
suppliedUsd: string,
|
|
90
|
-
borrowed: string,
|
|
91
|
-
borrowedUsd: string,
|
|
92
|
-
isBorrowed: boolean,
|
|
93
|
-
symbol: string,
|
|
94
|
-
collateral: boolean,
|
|
95
|
-
price: string,
|
|
96
|
-
interestRate?: string,
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export interface CrvUSDUsedAssets {
|
|
100
|
-
[key: string]: CrvUSDUsedAsset,
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export interface CrvUSDUserData {
|
|
104
|
-
debtAmount: string,
|
|
105
|
-
health: string,
|
|
106
|
-
healthPercent: string,
|
|
107
|
-
priceHigh: string,
|
|
108
|
-
priceLow: string,
|
|
109
|
-
liquidationDiscount: string,
|
|
110
|
-
numOfBands: string,
|
|
111
|
-
usedAssets: CrvUSDUsedAssets,
|
|
112
|
-
status: CrvUSDStatus,
|
|
113
|
-
ratio: string,
|
|
114
|
-
supplied: string,
|
|
115
|
-
suppliedUsd: string,
|
|
116
|
-
borrowedUsd: string,
|
|
117
|
-
borrowed: string,
|
|
118
|
-
safetyRatio: string,
|
|
119
|
-
userBands: UserBandData[],
|
|
120
|
-
loanExists: boolean,
|
|
121
|
-
borrowRate?: string,
|
|
1
|
+
import { EthAddress, NetworkNumber } from './common';
|
|
2
|
+
|
|
3
|
+
export enum CrvUSDVersions {
|
|
4
|
+
'crvUSDwstETH' = 'wstETH',
|
|
5
|
+
'crvUSDWBTC' = 'WBTC',
|
|
6
|
+
'crvUSDETH' = 'ETH',
|
|
7
|
+
'crvUSDtBTC' = 'tBTC',
|
|
8
|
+
'crvUSDsfrxETH' = 'sfrxETH',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum CrvUSDStatus {
|
|
12
|
+
Nonexistant = 'Nonexistant',
|
|
13
|
+
Safe = 'Safe',
|
|
14
|
+
Risk = 'Risk',
|
|
15
|
+
SoftLiquidating = 'SoftLiquidating',
|
|
16
|
+
SoftLiquidated = 'SoftLiquidated',
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CrvUSDMarketData {
|
|
20
|
+
chainIds: NetworkNumber[],
|
|
21
|
+
label: string,
|
|
22
|
+
shortLabel: string,
|
|
23
|
+
value: CrvUSDVersions,
|
|
24
|
+
collAsset: string,
|
|
25
|
+
baseAsset: string,
|
|
26
|
+
controllerAddress: EthAddress,
|
|
27
|
+
ammAddress: EthAddress,
|
|
28
|
+
createCollAssets: string[],
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface BandData {
|
|
32
|
+
id: string,
|
|
33
|
+
collAmount: string,
|
|
34
|
+
debtAmount: string,
|
|
35
|
+
lowPrice: string,
|
|
36
|
+
highPrice: string,
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface UserBandData {
|
|
40
|
+
id: string,
|
|
41
|
+
collAmount: string,
|
|
42
|
+
debtAmount: string,
|
|
43
|
+
lowPrice: string,
|
|
44
|
+
highPrice: string,
|
|
45
|
+
userDebtAmount: string,
|
|
46
|
+
userCollAmount: string,
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface CrvUSDGlobalMarketData {
|
|
50
|
+
collateral: string,
|
|
51
|
+
decimals: string,
|
|
52
|
+
activeBand: string,
|
|
53
|
+
totalDebt: string,
|
|
54
|
+
ammPrice: string,
|
|
55
|
+
basePrice: string,
|
|
56
|
+
oraclePrice: string,
|
|
57
|
+
minted: string,
|
|
58
|
+
redeemed: string,
|
|
59
|
+
monetaryPolicyRate: string,
|
|
60
|
+
ammRate: string,
|
|
61
|
+
minBand: string,
|
|
62
|
+
maxBand: string,
|
|
63
|
+
debtCeiling: string,
|
|
64
|
+
borrowRate: string,
|
|
65
|
+
futureBorrowRate: string,
|
|
66
|
+
leftToBorrow: string,
|
|
67
|
+
bands: BandData[],
|
|
68
|
+
loanDiscount: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface CrvUSDAggregatedPositionData {
|
|
72
|
+
ratio: string,
|
|
73
|
+
supplied: string,
|
|
74
|
+
suppliedUsd: string,
|
|
75
|
+
borrowedUsd: string,
|
|
76
|
+
borrowed: string,
|
|
77
|
+
safetyRatio: string,
|
|
78
|
+
borrowLimitUsd: string,
|
|
79
|
+
minAllowedRatio: number,
|
|
80
|
+
collFactor: string,
|
|
81
|
+
leveragedType: string,
|
|
82
|
+
leveragedAsset?: string,
|
|
83
|
+
liquidationPrice?: string,
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface CrvUSDUsedAsset {
|
|
87
|
+
isSupplied: boolean,
|
|
88
|
+
supplied: string,
|
|
89
|
+
suppliedUsd: string,
|
|
90
|
+
borrowed: string,
|
|
91
|
+
borrowedUsd: string,
|
|
92
|
+
isBorrowed: boolean,
|
|
93
|
+
symbol: string,
|
|
94
|
+
collateral: boolean,
|
|
95
|
+
price: string,
|
|
96
|
+
interestRate?: string,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface CrvUSDUsedAssets {
|
|
100
|
+
[key: string]: CrvUSDUsedAsset,
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface CrvUSDUserData {
|
|
104
|
+
debtAmount: string,
|
|
105
|
+
health: string,
|
|
106
|
+
healthPercent: string,
|
|
107
|
+
priceHigh: string,
|
|
108
|
+
priceLow: string,
|
|
109
|
+
liquidationDiscount: string,
|
|
110
|
+
numOfBands: string,
|
|
111
|
+
usedAssets: CrvUSDUsedAssets,
|
|
112
|
+
status: CrvUSDStatus,
|
|
113
|
+
ratio: string,
|
|
114
|
+
supplied: string,
|
|
115
|
+
suppliedUsd: string,
|
|
116
|
+
borrowedUsd: string,
|
|
117
|
+
borrowed: string,
|
|
118
|
+
safetyRatio: string,
|
|
119
|
+
userBands: UserBandData[],
|
|
120
|
+
loanExists: boolean,
|
|
121
|
+
borrowRate?: string,
|
|
122
122
|
}
|