> For the complete documentation index, see [llms.txt](https://docs.algebra.finance/algebra-integral-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/contracts/api-reference-v1.9-directional-fees/v1.9-directional-fees-tokenomics/ialgebravirtualpoolbase.md).

# IAlgebraVirtualPoolBase

Base interface for virtual pools

## Functions

### timeOutside

`function timeOutside() external view returns (uint32)` view external

**Returns:**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| \[0] | uint32 |             |

### ticks

`function ticks(int24 tickId) external view returns (uint128 liquidityTotal, int128 liquidityDelta, uint256 outerFeeGrowth0Token, uint256 outerFeeGrowth1Token, int56 outerTickCumulative, uint160 outerSecondsPerLiquidity, uint32 outerSecondsSpent, bool initialized)` view external

| Name   | Type  | Description |
| ------ | ----- | ----------- |
| tickId | int24 |             |

**Returns:**

| Name                     | Type    | Description |
| ------------------------ | ------- | ----------- |
| liquidityTotal           | uint128 |             |
| liquidityDelta           | int128  |             |
| outerFeeGrowth0Token     | uint256 |             |
| outerFeeGrowth1Token     | uint256 |             |
| outerTickCumulative      | int56   |             |
| outerSecondsPerLiquidity | uint160 |             |
| outerSecondsSpent        | uint32  |             |
| initialized              | bool    |             |

### currentLiquidity

`function currentLiquidity() external view returns (uint128)` view external

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint128 |             |

### globalTick

`function globalTick() external view returns (int24)` view external

**Returns:**

| Name | Type  | Description |
| ---- | ----- | ----------- |
| \[0] | int24 |             |

### globalSecondsPerLiquidityCumulative

`function globalSecondsPerLiquidityCumulative() external view returns (uint160)` view external

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \[0] | uint160 |             |

### prevTimestamp

`function prevTimestamp() external view returns (uint32)` view external

**Returns:**

| Name | Type   | Description |
| ---- | ------ | ----------- |
| \[0] | uint32 |             |

### getInnerSecondsPerLiquidity

`function getInnerSecondsPerLiquidity(int24 bottomTick, int24 topTick) external view returns (uint160 innerSecondsSpentPerLiquidity)` view external

This function is used to calculate the seconds per liquidity inside a certain position

| Name       | Type  | Description                   |
| ---------- | ----- | ----------------------------- |
| bottomTick | int24 | The bottom tick of a position |
| topTick    | int24 | The top tick of a position    |

**Returns:**

| Name                          | Type    | Description                                   |
| ----------------------------- | ------- | --------------------------------------------- |
| innerSecondsSpentPerLiquidity | uint160 | The seconds per liquidity inside the position |

### applyLiquidityDeltaToPosition

`function applyLiquidityDeltaToPosition(uint32 currentTimestamp, int24 bottomTick, int24 topTick, int128 liquidityDelta, int24 currentTick) external` external

*Developer note: This function is called when anyone farms their liquidity. The position in a virtual pool should be changed accordingly*

| Name             | Type   | Description                           |
| ---------------- | ------ | ------------------------------------- |
| currentTimestamp | uint32 | The timestamp of current block        |
| bottomTick       | int24  | The bottom tick of a position         |
| topTick          | int24  | The top tick of a position            |
| liquidityDelta   | int128 | The amount of liquidity in a position |
| currentTick      | int24  | The current tick in the main pool     |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/contracts/api-reference-v1.9-directional-fees/v1.9-directional-fees-tokenomics/ialgebravirtualpoolbase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
