# TotalLiquidityUpdated()

### event TotalLiquidityUpdated()

Every deposit and withdrawal on Bancor emits this event to indicate the updated pool size.&#x20;

```javascript
event TotalLiquidityUpdated(
        bytes32 indexed contextId,
        Token indexed pool,
        uint256 liquidity,
        uint256 stakedBalance,
        uint256 poolTokenSupply
);
```

| Parameter Name  | Type    | Description                                                                               |
| --------------- | ------- | ----------------------------------------------------------------------------------------- |
| contextId       | bytes32 | Unique identifier for the specific transaction (can be used for grouping multiple events) |
| pool            | Token   | The address of the token                                                                  |
| liquidity       | unit256 | The number of tokens available in the trading pool                                        |
| stakedBalance   | unit256 | The total number of tokens staked in the pool                                             |
| poolTokenSupply | unit256 | The number of Bancor outstanding pool tokens (bnTokens)                                   |

### Uses

This event can be used to:

* Monitor liquidity changes
* Track TVL
* Track total deposits vs trading liquidity

### Triggered By

This event is triggered by the following functions:

* deposit()
* depositPermitted()
* depositFor()
* depositForPermitted()
* withdraw()


---

# 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://docs.bancor.network/developer-guides/data-and-events/liquidity-data/totalliquidityupdated.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.
