2020-11-26 09:21:18 +00:00
|
|
|
// SPDX-License-Identifier: agpl-3.0
|
|
|
|
pragma solidity 0.6.12;
|
|
|
|
|
|
|
|
import {IScaledBalanceToken} from './IScaledBalanceToken.sol';
|
2021-01-28 10:05:19 +00:00
|
|
|
import {IInitializableDebtToken} from './IInitializableDebtToken.sol';
|
|
|
|
import {IAaveIncentivesController} from './IAaveIncentivesController.sol';
|
2020-11-26 09:21:18 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @title IVariableDebtToken
|
|
|
|
* @author Aave
|
|
|
|
* @notice Defines the basic interface for a variable debt token.
|
|
|
|
**/
|
2021-01-28 10:05:19 +00:00
|
|
|
interface IVariableDebtToken is IScaledBalanceToken, IInitializableDebtToken {
|
2020-11-26 09:21:18 +00:00
|
|
|
/**
|
|
|
|
* @dev Emitted after the mint action
|
|
|
|
* @param from The address performing the mint
|
|
|
|
* @param onBehalfOf The address of the user on which behalf minting has been performed
|
|
|
|
* @param value The amount to be minted
|
|
|
|
* @param index The last index of the reserve
|
|
|
|
**/
|
|
|
|
event Mint(address indexed from, address indexed onBehalfOf, uint256 value, uint256 index);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Mints debt token to the `onBehalfOf` address
|
|
|
|
* @param user The address receiving the borrowed underlying, being the delegatee in case
|
|
|
|
* of credit delegate, or same as `onBehalfOf` otherwise
|
|
|
|
* @param onBehalfOf The address receiving the debt tokens
|
|
|
|
* @param amount The amount of debt being minted
|
|
|
|
* @param index The variable debt index of the reserve
|
|
|
|
* @return `true` if the the previous balance of the user is 0
|
|
|
|
**/
|
|
|
|
function mint(
|
|
|
|
address user,
|
|
|
|
address onBehalfOf,
|
|
|
|
uint256 amount,
|
|
|
|
uint256 index
|
|
|
|
) external returns (bool);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Emitted when variable debt is burnt
|
|
|
|
* @param user The user which debt has been burned
|
|
|
|
* @param amount The amount of debt being burned
|
|
|
|
* @param index The index of the user
|
|
|
|
**/
|
|
|
|
event Burn(address indexed user, uint256 amount, uint256 index);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Burns user variable debt
|
|
|
|
* @param user The user which debt is burnt
|
|
|
|
* @param index The variable debt index of the reserve
|
|
|
|
**/
|
|
|
|
function burn(
|
|
|
|
address user,
|
|
|
|
uint256 amount,
|
|
|
|
uint256 index
|
|
|
|
) external;
|
2021-01-28 10:05:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @dev Returns the address of the incentives controller contract
|
|
|
|
**/
|
|
|
|
function getIncentivesController() external view returns (IAaveIncentivesController);
|
2020-11-26 09:21:18 +00:00
|
|
|
}
|