# UiPoolDataProviderV3

{% hint style="info" %}
This contract is a **data provider** (read-only). It aggregates:

* Global **reserve configuration & market data** (`getReservesData`, `getReservesList`)
* **User-specific positions** (`getUserReservesData`)
* References to **price feeds** used in the system (`marketReferenceCurrencyPriceInUsdPriceId`, `networkBaseTokenPriceInUsdPriceId`).

It’s designed for **frontends and integrations** to fetch complete protocol and user data in a single call.
{% endhint %}

#### Constructor

* **constructor(\_networkBaseTokenPriceInUsdPriceId, \_marketReferenceCurrencyPriceInUsdPriceId)**\
  Initializes the contract with the **price feed identifiers** for the network’s base token (e.g., ETH, BNB) and the market reference currency (usually USD).

***

#### Functions

* **ETH\_CURRENCY\_UNIT() → uint256**\
  Returns the unit used for ETH-based calculations (usually `1e18`).
* **MKR\_ADDRESS() → address**\
  Returns the address of the MKR token in this deployment.
* **bytes32ToString(\_bytes32) → string**\
  Utility function to convert a `bytes32` value into a readable string.
* **getReservesData(provider) → (AggregatedReserveData\[], BaseCurrencyInfo)**\
  Returns **detailed information about all reserves** in the pool.
  * Inputs:
    * `provider`: Address of the PoolAddressesProvider.
  * Outputs:
    * `AggregatedReserveData[]`: For each reserve, includes metadata (symbol, decimals), risk parameters (LTV, liquidation thresholds), interest rate data, token addresses (aToken, debt tokens), liquidity info, caps, isolation mode, eMode category data, and pricing data.
    * `BaseCurrencyInfo`: Market reference currency unit and USD pricing information.
* **getReservesList(provider) → address\[]**\
  Returns the list of all reserve asset addresses in the pool.
* **getUserReservesData(provider, user) → (UserReserveData\[], uint8)**\
  Returns **all reserve-level data for a specific user**.
  * Inputs:
    * `provider`: Address of the PoolAddressesProvider.
    * `user`: The wallet address to query.
  * Outputs:
    * `UserReserveData[]`: For each reserve, includes the user’s balances, collateral usage, borrowing data (stable and variable debt), and rates.
    * `uint8`: The eMode category the user has selected (if any).
* **marketReferenceCurrencyPriceInUsdPriceId() → bytes32**\
  Returns the price feed identifier for the **market reference currency (e.g., USD)**.
* **networkBaseTokenPriceInUsdPriceId() → bytes32**\
  Returns the price feed identifier for the **network’s base token (e.g., ETH or BNB) in USD**.

```
[
  {
    "inputs": [
      { "internalType": "bytes32", "name": "_networkBaseTokenPriceInUsdPriceId", "type": "bytes32" },
      { "internalType": "bytes32", "name": "_marketReferenceCurrencyPriceInUsdPriceId", "type": "bytes32" }
    ],
    "stateMutability": "nonpayable",
    "type": "constructor"
  },
  {
    "inputs": [],
    "name": "ETH_CURRENCY_UNIT",
    "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "MKR_ADDRESS",
    "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "bytes32", "name": "_bytes32", "type": "bytes32" }],
    "name": "bytes32ToString",
    "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
    "stateMutability": "pure",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "contract IPoolAddressesProvider", "name": "provider", "type": "address" }],
    "name": "getReservesData",
    "outputs": [
      {
        "internalType": "struct IUiPoolDataProviderV3.AggregatedReserveData[]",
        "name": "",
        "type": "tuple[]"
      },
      {
        "internalType": "struct IUiPoolDataProviderV3.BaseCurrencyInfo",
        "name": "",
        "type": "tuple"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [{ "internalType": "contract IPoolAddressesProvider", "name": "provider", "type": "address" }],
    "name": "getReservesList",
    "outputs": [{ "internalType": "address[]", "name": "", "type": "address[]" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      { "internalType": "contract IPoolAddressesProvider", "name": "provider", "type": "address" },
      { "internalType": "address", "name": "user", "type": "address" }
    ],
    "name": "getUserReservesData",
    "outputs": [
      { "internalType": "struct IUiPoolDataProviderV3.UserReserveData[]", "name": "", "type": "tuple[]" },
      { "internalType": "uint8", "name": "", "type": "uint8" }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "marketReferenceCurrencyPriceInUsdPriceId",
    "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [],
    "name": "networkBaseTokenPriceInUsdPriceId",
    "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
    "stateMutability": "view",
    "type": "function"
  }
]

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://colend.gitbook.io/home/abi/uipooldataproviderv3.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
