aave-protocol-v2/contracts/interfaces/IScaledBalanceToken.sol

27 lines
1015 B
Solidity
Raw Normal View History

2020-09-21 15:41:38 +00:00
// SPDX-License-Identifier: agpl-3.0
2020-11-20 10:45:20 +00:00
pragma solidity 0.6.12;
2020-09-21 15:41:38 +00:00
interface IScaledBalanceToken {
/**
2020-11-26 09:37:04 +00:00
* @dev Returns the scaled balance of the user. The scaled balance is the sum of all the
* updated stored balance divided by the reserve's liquidity index at the moment of the update
* @param user The user whose balance is calculated
* @return The scaled balance of the user
2020-09-21 15:41:38 +00:00
**/
function scaledBalanceOf(address user) external view returns (uint256);
/**
2020-11-26 09:37:04 +00:00
* @dev Returns the scaled balance of the user and the scaled total supply.
* @param user The address of the user
2020-11-26 09:37:04 +00:00
* @return The scaled balance of the user
* @return The scaled balance and the scaled total supply
2020-09-21 15:41:38 +00:00
**/
function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256);
/**
* @dev Returns the scaled total supply of the variable debt token. Represents sum(debt/index)
* @return The scaled total supply
2020-09-21 15:41:38 +00:00
**/
function scaledTotalSupply() external view returns (uint256);
}