Skip to content

PoolDataProvider Contract Interface

Peripheral contract to collect and pre-process information from the Pool.

getAllReservesTokens

Returns the list of the existing reserves in the pool.

solidity
function getAllReservesTokens() external view override returns (TokenData[] memory);

Returns

NameTypeDescription
<none>TokenData[]The list of reserves, pairs of symbols and addresses

getAllATokens

Returns the list of the existing ATokens in the pool.

solidity
function getAllATokens() external view override returns (TokenData[] memory);

Returns

NameTypeDescription
<none>TokenData[]The list of ATokens, pairs of symbols and addresses

getReserveConfigurationData

Returns the configuration data of the reserve

Not returning borrow and supply caps for compatibility, nor pause flag

solidity
function getReserveConfigurationData(address asset)
    external
    view
    override
    returns (
        uint256 decimals,
        uint256 ltv,
        uint256 liquidationThreshold,
        uint256 liquidationBonus,
        uint256 reserveFactor,
        bool usageAsCollateralEnabled,
        bool borrowingEnabled,
        bool stableBorrowRateEnabled,
        bool isActive,
        bool isFrozen
    );

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
decimalsuint256The number of decimals of the reserve
ltvuint256The ltv of the reserve
liquidationThresholduint256The liquidationThreshold of the reserve
liquidationBonusuint256The liquidationBonus of the reserve
reserveFactoruint256The reserveFactor of the reserve
usageAsCollateralEnabledboolTrue if the usage as collateral is enabled, false otherwise
borrowingEnabledboolTrue if borrowing is enabled, false otherwise
stableBorrowRateEnabledboolTrue if stable rate borrowing is enabled, false otherwise
isActiveboolTrue if it is active, false otherwise
isFrozenboolTrue if it is frozen, false otherwise

getReserveCaps

Returns the caps parameters of the reserve

solidity
function getReserveCaps(address asset) external view override returns (uint256 borrowCap, uint256 supplyCap);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
borrowCapuint256The borrow cap of the reserve
supplyCapuint256The supply cap of the reserve

getPaused

Returns if the pool is paused

solidity
function getPaused(address asset) external view override returns (bool isPaused);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
isPausedboolTrue if the pool is paused, false otherwise

getLiquidationProtocolFee

Returns the protocol fee on the liquidation bonus

solidity
function getLiquidationProtocolFee(address asset) external view override returns (uint256);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
<none>uint256The protocol fee on liquidation

getDebtCeiling

Returns the debt ceiling of the reserve

solidity
function getDebtCeiling(address asset) external view override returns (uint256);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
<none>uint256The debt ceiling of the reserve

getDebtCeilingDecimals

Returns the debt ceiling decimals

solidity
function getDebtCeilingDecimals() external pure override returns (uint256);

Returns

NameTypeDescription
<none>uint256The debt ceiling decimals

getReserveData

Returns the reserve data

solidity
function getReserveData(address asset)
    external
    view
    override
    returns (
        uint256 unbacked,
        uint256 accruedToTreasuryScaled,
        uint256 totalAToken,
        uint256 totalStableDebt,
        uint256 totalVariableDebt,
        uint256 liquidityRate,
        uint256 variableBorrowRate,
        uint256 stableBorrowRate,
        uint256 averageStableBorrowRate,
        uint256 liquidityIndex,
        uint256 variableBorrowIndex,
        uint40 lastUpdateTimestamp
    );

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
unbackeduint256The amount of unbacked tokens
accruedToTreasuryScaleduint256The scaled amount of tokens accrued to treasury that is to be minted
totalATokenuint256The total supply of the aToken
totalStableDebtuint256The total stable debt of the reserve
totalVariableDebtuint256The total variable debt of the reserve
liquidityRateuint256The liquidity rate of the reserve
variableBorrowRateuint256The variable borrow rate of the reserve
stableBorrowRateuint256The stable borrow rate of the reserve
averageStableBorrowRateuint256The average stable borrow rate of the reserve
liquidityIndexuint256The liquidity index of the reserve
variableBorrowIndexuint256The variable borrow index of the reserve
lastUpdateTimestampuint40The timestamp of the last update of the reserve

getATokenTotalSupply

Returns the total supply of aTokens for a given asset

solidity
function getATokenTotalSupply(address asset) external view override returns (uint256);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
<none>uint256The total supply of the aToken

getTotalDebt

Returns the total debt for a given asset

solidity
function getTotalDebt(address asset) external view override returns (uint256);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
<none>uint256The total debt for asset

getUserReserveData

Returns the user data in a reserve

solidity
function getUserReserveData(address asset, address user)
    external
    view
    override
    returns (
        uint256 currentATokenBalance,
        uint256 currentStableDebt,
        uint256 currentVariableDebt,
        uint256 principalStableDebt,
        uint256 scaledVariableDebt,
        uint256 stableBorrowRate,
        uint256 liquidityRate,
        uint40 stableRateLastUpdated,
        bool usageAsCollateralEnabled
    );

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve
useraddressThe address of the user

Returns

NameTypeDescription
currentATokenBalanceuint256The current AToken balance of the user
currentStableDebtuint256The current stable debt of the user
currentVariableDebtuint256The current variable debt of the user
principalStableDebtuint256The principal stable debt of the user
scaledVariableDebtuint256The scaled variable debt of the user
stableBorrowRateuint256The stable borrow rate of the user
liquidityRateuint256The liquidity rate of the reserve
stableRateLastUpdateduint40The timestamp of the last update of the user stable rate
usageAsCollateralEnabledboolTrue if the user is using the asset as collateral, false otherwise

getReserveTokensAddresses

Returns the token addresses of the reserve

solidity
function getReserveTokensAddresses(address asset)
    external
    view
    override
    returns (address aTokenAddress, address stableDebtTokenAddress, address variableDebtTokenAddress);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
aTokenAddressaddressThe AToken address of the reserve
stableDebtTokenAddressaddressThe StableDebtToken address of the reserve
variableDebtTokenAddressaddressThe VariableDebtToken address of the reserve

getInterestRateStrategyAddress

Returns the address of the Interest Rate strategy

solidity
function getInterestRateStrategyAddress(address asset) external view override returns (address irStrategyAddress);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
irStrategyAddressaddressThe address of the Interest Rate strategy

getFlashLoanEnabled

Returns whether the reserve has FlashLoans enabled or disabled

solidity
function getFlashLoanEnabled(address asset) external view override returns (bool);

Parameters

NameTypeDescription
assetaddressThe address of the underlying asset of the reserve

Returns

NameTypeDescription
<none>boolTrue if FlashLoans are enabled, false otherwise

Structs

TokenData

solidity
struct TokenData {
  string symbol;
  address tokenAddress;
}