# AlgebraVirtualPoolBase

Abstract base contract for Algebra virtual pools

## Modifiers

### onlyFromPool

only pool (or FarmingCenter as "proxy") can call

### onlyFarming

## Variables

### address farmingCenterAddress immutable

### address farmingAddress immutable

### address pool immutable

### mapping(int24 => struct TickManager.Tick) ticks

### uint128 currentLiquidity

### int24 globalTick

### uint32 timeOutside

### uint160 globalSecondsPerLiquidityCumulative

### uint32 prevTimestamp

## Functions

### getInnerSecondsPerLiquidity

`getInnerSecondsPerLiquidity(int24,int24)` view external

get seconds per liquidity inside range

| Name       | Type  | Description |
| ---------- | ----- | ----------- |
| bottomTick | int24 |             |
| topTick    | int24 |             |

**Returns:**

| Name                          | Type    | Description |
| ----------------------------- | ------- | ----------- |
| innerSecondsSpentPerLiquidity | uint160 |             |

### cross

onlyFromPool

`cross(int24,bool)` external

| Name      | Type  | Description      |
| --------- | ----- | ---------------- |
| nextTick  | int24 | The crossed tick |
| zeroToOne | bool  | The direction    |

### increaseCumulative

onlyFromPool

`increaseCumulative(uint32)` external

| Name             | Type   | Description                       |
| ---------------- | ------ | --------------------------------- |
| currentTimestamp | uint32 | The timestamp of the current swap |

**Returns:**

| Name | Type                            | Description |
| ---- | ------------------------------- | ----------- |
| \[0] | enum IAlgebraVirtualPool.Status |             |

### applyLiquidityDeltaToPosition

onlyFarming

`applyLiquidityDeltaToPosition(uint32,int24,int24,int128,int24)` external

| 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: 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.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/contracts/api-reference-v1.0/v1.0-tokenomics/algebravirtualpoolbase.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.
