2020-11-23 18:17:19 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
|
|
|
pragma solidity 0.6.12;
|
|
|
|
|
|
|
|
/**
|
2020-11-26 15:44:32 +00:00
|
|
|
* @title ILendingPoolCollateralManager
|
2020-11-23 18:17:19 +00:00
|
|
|
* @author Aave
|
|
|
|
* @notice Defines the actions involving management of collateral in the protocol.
|
|
|
|
**/
|
|
|
|
interface ILendingPoolCollateralManager {
|
|
|
|
/**
|
2020-11-26 15:44:32 +00:00
|
|
|
* @dev Emitted when a borrower is liquidated
|
|
|
|
* @param collateral The address of the collateral being liquidated
|
|
|
|
* @param principal The address of the reserve
|
|
|
|
* @param user The address of the user being liquidated
|
|
|
|
* @param debtToCover The total amount liquidated
|
|
|
|
* @param liquidatedCollateralAmount The amount of collateral being liquidated
|
|
|
|
* @param liquidator The address of the liquidator
|
2020-11-23 18:17:19 +00:00
|
|
|
* @param receiveAToken true if the liquidator wants to receive aTokens, false otherwise
|
|
|
|
**/
|
|
|
|
event LiquidationCall(
|
|
|
|
address indexed collateral,
|
|
|
|
address indexed principal,
|
|
|
|
address indexed user,
|
|
|
|
uint256 debtToCover,
|
|
|
|
uint256 liquidatedCollateralAmount,
|
|
|
|
address liquidator,
|
|
|
|
bool receiveAToken
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2020-11-26 15:44:32 +00:00
|
|
|
* @dev Emitted when a reserve is disabled as collateral for an user
|
|
|
|
* @param reserve The address of the reserve
|
|
|
|
* @param user The address of the user
|
2020-11-23 18:17:19 +00:00
|
|
|
**/
|
|
|
|
event ReserveUsedAsCollateralDisabled(address indexed reserve, address indexed user);
|
|
|
|
|
|
|
|
/**
|
2020-11-26 15:44:32 +00:00
|
|
|
* @dev Emitted when a reserve is enabled as collateral for an user
|
|
|
|
* @param reserve The address of the reserve
|
|
|
|
* @param user The address of the user
|
|
|
|
**/
|
|
|
|
event ReserveUsedAsCollateralEnabled(address indexed reserve, address indexed user);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Users can invoke this function to liquidate an undercollateralized position.
|
|
|
|
* @param collateral The address of the collateral to liquidated
|
|
|
|
* @param principal The address of the principal reserve
|
|
|
|
* @param user The address of the borrower
|
|
|
|
* @param debtToCover The amount of principal that the liquidator wants to repay
|
2020-11-23 18:17:19 +00:00
|
|
|
* @param receiveAToken true if the liquidators wants to receive the aTokens, false if
|
|
|
|
* he wants to receive the underlying asset directly
|
|
|
|
**/
|
|
|
|
function liquidationCall(
|
|
|
|
address collateral,
|
|
|
|
address principal,
|
|
|
|
address user,
|
|
|
|
uint256 debtToCover,
|
|
|
|
bool receiveAToken
|
2020-11-24 13:53:34 +00:00
|
|
|
) external returns (uint256, string memory);
|
2020-11-23 18:17:19 +00:00
|
|
|
}
|