-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathIPoolParameters.sol
More file actions
250 lines (221 loc) · 8.72 KB
/
Copy pathIPoolParameters.sol
File metadata and controls
250 lines (221 loc) · 8.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.10;
import {IPoolAddressesProvider} from "./IPoolAddressesProvider.sol";
import {DataTypes} from "../protocol/libraries/types/DataTypes.sol";
/**
* @title IPool
*
* @notice Defines the basic interface for an ParaSpace Pool.
**/
interface IPoolParameters {
/**
* @dev Emitted when the state of a reserve is updated.
* @param reserve The address of the underlying asset of the reserve
* @param liquidityRate The next liquidity rate
* @param variableBorrowRate The next variable borrow rate
* @param liquidityIndex The next liquidity index
* @param variableBorrowIndex The next variable borrow index
**/
event ReserveDataUpdated(
address indexed reserve,
uint256 liquidityRate,
uint256 variableBorrowRate,
uint256 liquidityIndex,
uint256 variableBorrowIndex
);
/**
* @dev Emitted when the value of claim for yield incentive rate update
**/
event ClaimApeForYieldIncentiveUpdated(uint256 oldValue, uint256 newValue);
/**
* @dev Emitted when the status of blur exchange enable status update
**/
event BlurExchangeEnableStatusUpdated(bool isEnable);
/**
* @dev Emitted when the limit amount of blur ongoing request update
**/
event BlurOngoingRequestLimitUpdated(uint256 oldValue, uint256 newValue);
/**
* @dev Emitted when the fee rate of blur exchange request update
**/
event BlurExchangeRequestFeeRateUpdated(uint256 oldValue, uint256 newValue);
/**
* @dev Emitted when the blur exchange keeper address update
**/
event BlurExchangeKeeperUpdated(address keeper);
/**
* @notice Initializes a reserve, activating it, assigning an xToken and debt tokens and an
* interest rate strategy
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param xTokenAddress The address of the xToken that will be assigned to the reserve
* @param variableDebtAddress The address of the VariableDebtToken that will be assigned to the reserve
* @param interestRateStrategyAddress The address of the interest rate strategy contract
* @param auctionStrategyAddress The address of the auction rate strategy contract
* @param timeLockStrategyAddress The address of the timeLock strategy contract
**/
function initReserve(
address asset,
address xTokenAddress,
address variableDebtAddress,
address interestRateStrategyAddress,
address auctionStrategyAddress,
address timeLockStrategyAddress
) external;
/**
* @notice Drop a reserve
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
**/
function dropReserve(address asset) external;
/**
* @notice Updates the address of the interest rate strategy contract
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param rateStrategyAddress The address of the interest rate strategy contract
**/
function setReserveInterestRateStrategyAddress(
address asset,
address rateStrategyAddress
) external;
function setReserveTimeLockStrategyAddress(
address asset,
address newStrategyAddress
) external;
/**
* @notice Updates the address of the auction strategy contract
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param auctionStrategyAddress The address of the auction strategy contract
**/
function setReserveAuctionStrategyAddress(
address asset,
address auctionStrategyAddress
) external;
/**
* @notice Sets the configuration bitmap of the reserve as a whole
* @dev Only callable by the PoolConfigurator contract
* @param asset The address of the underlying asset of the reserve
* @param configuration The new configuration bitmap
**/
function setConfiguration(
address asset,
DataTypes.ReserveConfigurationMap calldata configuration
) external;
/**
* @notice Mints the assets accrued through the reserve factor to the treasury in the form of xTokens
* @param assets The list of reserves for which the minting needs to be executed
**/
function mintToTreasury(address[] calldata assets) external;
/**
* @notice Rescue and transfer tokens locked in this contract
* @param assetType The asset type of the token
* @param token The address of the token
* @param to The address of the recipient
* @param amountOrTokenId The amount or id of token to transfer
*/
function rescueTokens(
DataTypes.AssetType assetType,
address token,
address to,
uint256 amountOrTokenId
) external;
/**
* @notice grant token's an unlimited allowance value to the 'to' address
* @param token The ERC20 token address
* @param to The address receive the grant
*/
function unlimitedApproveTo(address token, address to) external;
/**
* @notice reset token's allowance value to the 'to' address
* @param token The ERC20 token address
* @param to The address receive the grant
*/
function revokeUnlimitedApprove(address token, address to) external;
/**
* @notice undate fee percentage for claim ape for compound
* @param fee new fee percentage
*/
function setClaimApeForCompoundFee(uint256 fee) external;
/**
* @notice undate ape compound strategy
* @param strategy new compound strategy
*/
function setApeCompoundStrategy(
DataTypes.ApeCompoundStrategy calldata strategy
) external;
/**
* @notice get user ape compound strategy
* @param user The user address
*/
function getUserApeCompoundStrategy(address user)
external
view
returns (DataTypes.ApeCompoundStrategy memory);
/**
* @notice Set the auction recovery health factor
* @param value The new auction health factor
*/
function setAuctionRecoveryHealthFactor(uint64 value) external;
/**
* @notice Set auction validity time, all auctions triggered before the validity time will be considered as invalid
* @param user The user address
*/
function setAuctionValidityTime(address user) external;
/**
* @notice Returns the user account data across all the reserves
* @param user The address of the user
* @return totalCollateralBase The total collateral of the user in the base currency used by the price feed
* @return totalDebtBase The total debt of the user in the base currency used by the price feed
* @return availableBorrowsBase The borrowing power left of the user in the base currency used by the price feed
* @return currentLiquidationThreshold The liquidation threshold of the user
* @return ltv The loan to value of The user
* @return healthFactor The current health factor of the user
**/
function getUserAccountData(address user)
external
view
returns (
uint256 totalCollateralBase,
uint256 totalDebtBase,
uint256 availableBorrowsBase,
uint256 currentLiquidationThreshold,
uint256 ltv,
uint256 healthFactor,
uint256 erc721HealthFactor
);
/**
* @notice Returns Ltv and Liquidation Threshold for the asset
* @param asset The address of the asset
* @param tokenId The tokenId of the asset
* @return ltv The loan to value of the asset
* @return lt The liquidation threshold value of the asset
**/
function getAssetLtvAndLT(address asset, uint256 tokenId)
external
view
returns (uint256 ltv, uint256 lt);
/**
* @notice enable blur exchange request, only pool admin call this function
**/
function enableBlurExchange() external;
/**
* @notice disable blur exchange request, only pool admin or emergency admin call this function
**/
function disableBlurExchange() external;
/**
* @notice update blur ongoing request limit amount
* @param limit The new limit amount
**/
function setBlurOngoingRequestLimit(uint8 limit) external;
/**
* @notice update blur exchange request fee rate
* @param feeRate The new fee rate
**/
function setBlurExchangeRequestFeeRate(uint16 feeRate) external;
/**
* @notice update blur exchange enable status, only pool admin call this function
* @param keeper The new keeper address
**/
function setBlurExchangeKeeper(address keeper) external;
}