AaveDataProvider
AaveProtocolDataProvider
Peripheral contract to collect and pre-process information from the Pool.
Code available on github.
Methods
getAllReservesTokens
function getAllReservesTokens() external view returns (TokenData[] memory)
Returns list of the existing reserves in the pool.
Return Value
Type | Description |
---|---|
| The symbol of the underlying reserve asset |
| The address of the underlying reserve asset |
getAllSpTokens
function getAllSpTokens() external view returns (TokenData[] memory)
Returns list of the existing SpTokens in the pool.
Return Value
Type | Description |
---|---|
| The symbol of spToken of the reserve |
| The address of spToken of the reserve |
getReserveConfigurationData
function getReserveConfigurationData(address asset) external view returns (....)
Returns the configuration data of the reserve as described below:
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The number of decimals of the reserve |
| The ltv of the reserve |
| The liquidationThreshold of the reserve |
| The liquidationBonus of the reserve |
| The reserveFactor of the reserve |
| True if the usage as collateral is enabled, false otherwise |
| True if borrowing is enabled, false otherwise |
| True if stable rate borrowing is enabled, false otherwise |
| True if reserve is active, false otherwise |
| True if reserve is frozen, false otherwise |
getReserveEModeCategory
function getReserveEModeCategory(address asset) external view returns (uint256)
Returns reserve's efficiency mode category.
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The number of decimals of the reserve |
getReserveCaps
function getReserveCaps(address asset) external view returns (uint256 borrowCap, uint256 supplyCap)
Returns the caps parameters of the reserve
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The borrow cap of the reserve |
| The supply cap of the reserve |
getPaused
function getPaused(address asset) external view returns (bool isPaused)
Returns true if the pool is paused.
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| True if the pool is paused |
getSiloedBorrowing
function getSiloedBorrowing(address asset) external view returns (bool)
Returns true if the asset is siloed for borrowing.
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| True if the pool is paused |
getLiquidationProtocolFee
function getLiquidationProtocolFee(address asset) external view returns (uint256)
Returns the protocol fee on the liquidation bonus.
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The protocol fee on liquidation |
getUnbackedMintCap
function getUnbackedMintCap(address asset) external view returns (uint256)
Returns the unbacked mint cap of the reserve
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The unbacked mint cap of the reserve |
getDebtCeiling
function getDebtCeiling(address asset) external view returns (uint256)
Returns the debt ceiling of the reserve
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The debt ceiling of the reserve |
getDebtCeilingDecimals
function getDebtCeilingDecimals() external pure returns (uint256)
Returns the debt ceiling decimals
Return Value
Type | Description |
---|---|
| The debt ceiling decimals |
getReserveData
function getReserveData(address asset) external view override returns(....)
Returns the following reserve data 👇🏻
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The amount of unbacked spTokens of the reserve |
| The scaled amount of tokens accrued to treasury that is to be minted |
| The total supply of the spToken |
| The total stable debt of the reserve |
| The total variable debt of the reserve |
| The liquidity rate of the reserve |
| The variable borrow rate of the reserve |
| The stable borrow rate of the reserve |
| The average stable borrow rate of the reserve |
| The liquidity index of the reserve |
| The variable borrow index of the reserve |
| The timestamp of the last update of the reserve |
getSpTokenTotalSupply
function getSpTokenTotalSupply(address asset) external view override returns (uint256)
Returns the total supply of spTokens for a given asset
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The total supply of the spToken |
getTotalDebt
function getTotalDebt(address asset) external view override returns (uint256)
Returns the total debt for a given asset
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The total debt (stable + variable) for an asset |
getUserReserveData
function getUserReserveData(address asset, address user) external view returns (...)
Returns the following user reserve data
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
user |
| The address of the user |
Return Value
Type | Description |
---|---|
| The current SpToken balance of the user |
| The current stable debt of the user |
| The current variable debt of the user |
| The principal stable debt of the user |
| The scaled variable debt of the user |
| The stable borrow rate of the user |
| The liquidity rate of the reserve |
| The timestamp of the last update of the user stable rate |
| True if the user is using the asset as collateral, else false |
getReserveTokensAddresses
function getReserveTokensAddresses(address asset) external view returns (address spTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress)
Returns the addresses of spToken, stableDebtToken and variableDebtToken of the reserve
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The SpToken address of the reserve |
| The StableDebtToken address of the reserve |
| The VariableDebtToken address of the reserve |
getInterestRateStrategyAddress
function getInterestRateStrategyAddress(address asset) external view returns (address irStrategyAddress)
Returns the address of the Interest Rate strategy
Call Params
Name | Type | Description |
---|---|---|
asset |
| The address of the underlying asset of the reserve |
Return Value
Type | Description |
---|---|
| The address of the Interest Rate strategy |
ABI
Last updated