# PoolLogic

{% hint style="info" %}
This contract tracks:

* Updates to **debt levels in isolated reserves**.
* **Protocol revenue collection**, when a portion of reserve earnings is minted into the treasury.
  {% endhint %}

### Events

* **IsolationModeTotalDebtUpdated(asset, totalDebt)**\
  Emitted when the **total debt of an isolated reserve** is updated.
  * `asset`: The underlying asset of the isolated reserve.
  * `totalDebt`: The new total amount of debt in isolation mode.

{% hint style="info" %}
Isolation mode restricts borrowing to a single asset (with limited correlations), and this event helps track the aggregate debt.
{% endhint %}

***

* **MintedToTreasury(reserve, amountMinted)**\
  Emitted when **protocol revenue is minted to the treasury** (usually from reserve factor allocations).
  * `reserve`: The underlying asset generating the revenue.
  * `amountMinted`: The amount minted to the treasury in aTokens.

```
[
  {
    "anonymous": false,
    "inputs": [
      { "indexed": true, "internalType": "address", "name": "asset", "type": "address" },
      { "indexed": false, "internalType": "uint256", "name": "totalDebt", "type": "uint256" }
    ],
    "name": "IsolationModeTotalDebtUpdated",
    "type": "event"
  },
  {
    "anonymous": false,
    "inputs": [
      { "indexed": true, "internalType": "address", "name": "reserve", "type": "address" },
      { "indexed": false, "internalType": "uint256", "name": "amountMinted", "type": "uint256" }
    ],
    "name": "MintedToTreasury",
    "type": "event"
  }
]


```


---

# 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/poollogic.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.
