# PoolDataProvider

**🔹 Constructor**

* **constructor(address addressesProvider)** Initializes the contract with a reference to the Aave `PoolAddressesProvider`.

***

**🔹 Core getters**

* **ADDRESSES\_PROVIDER()** → `address` Returns the address of the `PoolAddressesProvider` linked to this instance.

***

**🔹 Token and reserve information**

* **getATokenTotalSupply(address asset)** → `uint256` Returns the total supply of the `aToken` for a given underlying asset.
* **getAllATokens()** → `TokenData[]` Returns a list of all `aTokens` (symbol + address) registered in the pool.
* **getAllReservesTokens()** → `TokenData[]` Returns a list of all underlying reserve tokens (symbol + address) supported in the pool.

***

**🔹 Risk management & configuration**

* **getDebtCeiling(address asset)** → `uint256` Returns the debt ceiling configured for a given asset.
* **getDebtCeilingDecimals()** → `uint256` Returns the number of decimals used for debt ceiling calculations.
* **getFlashLoanEnabled(address asset)** → `bool` Indicates whether flash loans are enabled for a given asset.
* **getInterestRateStrategyAddress(address asset)** → `address` Returns the address of the interest rate strategy contract used for a given asset.
* **getLiquidationProtocolFee(address asset)** → `uint256` Returns the protocol fee (in bps) charged during liquidation for a given asset.
* **getPaused(address asset)** → `bool` Returns whether the reserve is paused (no deposits/borrows allowed).
* **getReserveCaps(address asset)** → `(borrowCap, supplyCap)` Returns the configured borrowing and supply caps for the reserve.
* **getReserveConfigurationData(address asset)** Returns risk configuration parameters for the reserve, including:
  * decimals, LTV, liquidation threshold, liquidation bonus, reserve factor
  * flags for collateral usage, borrowing enabled, stable rate enabled, active/frozen status.
* **getReserveEModeCategory(address asset)** → `uint256` Returns the eMode (efficiency mode) category assigned to the asset.
* **getReserveTokensAddresses(address asset)** → `(aToken, stableDebtToken, variableDebtToken)` Returns the addresses of the tokens associated with a reserve.
* **getSiloedBorrowing(address asset)** → `bool` Indicates if the asset enforces siloed borrowing (only one type of asset can be borrowed when this one is used).
* **getUnbackedMintCap(address asset)** → `uint256` Returns the cap for unbacked `aToken` minting for the given reserve.

***

**🔹 Reserve state**

* **getReserveData(address asset)** Returns detailed reserve metrics:
  * unbacked liquidity, accrued treasury, total `aToken` supply
  * total stable/variable debt, liquidity & borrowing rates
  * average stable borrow rate, liquidity/variable indexes
  * last update timestamp.
* **getTotalDebt(address asset)** → `uint256` Returns the total debt (stable + variable) for a reserve.

***

**🔹 User-specific data**

* **getUserReserveData(address asset, address user)** Returns information about a user’s position in a given reserve:
  * `aToken` balance, stable and variable debts
  * principal stable debt, scaled variable debt
  * stable borrow rate, liquidity rate
  * last stable rate update, collateral usage status.

Copy

```
[
  {
    "inputs": [
      { "internalType": "contract IPoolAddressesProvider", "name": "addressesProvider", "type": "address" }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [],
    "name": "ADDRESSES_PROVIDER",
    "outputs": [
      { "internalType": "contract IPoolAddressesProvider", "name": "", "type": "address" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getATokenTotalSupply",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getAllATokens",
    "outputs": [
      {
        "components": [
          { "internalType": "string", "name": "symbol", "type": "string" },
          { "internalType": "address", "name": "tokenAddress", "type": "address" }
        ],
        "internalType": "struct IPoolDataProvider.TokenData[]",
        "name": "",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getAllReservesTokens",
    "outputs": [
      {
        "components": [
          { "internalType": "string", "name": "symbol", "type": "string" },
          { "internalType": "address", "name": "tokenAddress", "type": "address" }
        ],
        "internalType": "struct IPoolDataProvider.TokenData[]",
        "name": "",
        "type": "tuple[]"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getDebtCeiling",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "getDebtCeilingDecimals",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getFlashLoanEnabled",
    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getInterestRateStrategyAddress",
    "outputs": [{ "internalType": "address", "name": "irStrategyAddress", "type": "address" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getLiquidationProtocolFee",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getPaused",
    "outputs": [{ "internalType": "bool", "name": "isPaused", "type": "bool" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getReserveCaps",
    "outputs": [
      { "internalType": "uint256", "name": "borrowCap", "type": "uint256" },
      { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getReserveConfigurationData",
    "outputs": [
      { "internalType": "uint256", "name": "decimals", "type": "uint256" },
      { "internalType": "uint256", "name": "ltv", "type": "uint256" },
      { "internalType": "uint256", "name": "liquidationThreshold", "type": "uint256" },
      { "internalType": "uint256", "name": "liquidationBonus", "type": "uint256" },
      { "internalType": "uint256", "name": "reserveFactor", "type": "uint256" },
      { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" },
      { "internalType": "bool", "name": "borrowingEnabled", "type": "bool" },
      { "internalType": "bool", "name": "stableBorrowRateEnabled", "type": "bool" },
      { "internalType": "bool", "name": "isActive", "type": "bool" },
      { "internalType": "bool", "name": "isFrozen", "type": "bool" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getReserveData",
    "outputs": [
      { "internalType": "uint256", "name": "unbacked", "type": "uint256" },
      { "internalType": "uint256", "name": "accruedToTreasuryScaled", "type": "uint256" },
      { "internalType": "uint256", "name": "totalAToken", "type": "uint256" },
      { "internalType": "uint256", "name": "totalStableDebt", "type": "uint256" },
      { "internalType": "uint256", "name": "totalVariableDebt", "type": "uint256" },
      { "internalType": "uint256", "name": "liquidityRate", "type": "uint256" },
      { "internalType": "uint256", "name": "variableBorrowRate", "type": "uint256" },
      { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" },
      { "internalType": "uint256", "name": "averageStableBorrowRate", "type": "uint256" },
      { "internalType": "uint256", "name": "liquidityIndex", "type": "uint256" },
      { "internalType": "uint256", "name": "variableBorrowIndex", "type": "uint256" },
      { "internalType": "uint40", "name": "lastUpdateTimestamp", "type": "uint40" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getReserveEModeCategory",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getReserveTokensAddresses",
    "outputs": [
      { "internalType": "address", "name": "aTokenAddress", "type": "address" },
      { "internalType": "address", "name": "stableDebtTokenAddress", "type": "address" },
      { "internalType": "address", "name": "variableDebtTokenAddress", "type": "address" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getSiloedBorrowing",
    "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getTotalDebt",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "address", "name": "asset", "type": "address" }],
    "name": "getUnbackedMintCap",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "address", "name": "asset", "type": "address" },
      { "internalType": "address", "name": "user", "type": "address" }
    ],
    "name": "getUserReserveData",
    "outputs": [
      { "internalType": "uint256", "name": "currentATokenBalance", "type": "uint256" },
      { "internalType": "uint256", "name": "currentStableDebt", "type": "uint256" },
      { "internalType": "uint256", "name": "currentVariableDebt", "type": "uint256" },
      { "internalType": "uint256", "name": "principalStableDebt", "type": "uint256" },
      { "internalType": "uint256", "name": "scaledVariableDebt", "type": "uint256" },
      { "internalType": "uint256", "name": "stableBorrowRate", "type": "uint256" },
      { "internalType": "uint256", "name": "liquidityRate", "type": "uint256" },
      { "internalType": "uint40", "name": "stableRateLastUpdated", "type": "uint40" },
      { "internalType": "bool", "name": "usageAsCollateralEnabled", "type": "bool" }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]
```
