# API Reference

Pulsar V3 utilizes Algebra's codebase and as such, the documentation is derived from Algebra.

### Main Contracts

#### AlgebraFactory.sol

Deploys pools and data storages, manages ownership and dynamic fee configuration

#### AlgebraPool.sol

Main contract of pair with concentrated liquidity and and dynamic fee. It contains the logic of swaps, liquidity providing, flash loans. Allows you to swap deflationary tokens and has protection from “Just-In-Time” liquidity providing

#### AlgebraPoolDeployer.sol

A contract that constructs a pool must implement this to pass arguments to the pool. This is used to avoid having constructor arguments in the pool contract, which results in the init code hash of the pool being constant allowing the CREATE2 address of the pool to be cheaply computed on-chain

#### DataStorageOperator.sol

This contract is used for interacting with DataStorage library

#### AdaptiveFee.sol

Calculates fee based on combination of sigmoids

#### DataStorage.sol

DataStorage provides price, liquidity, volatility data useful for a wide variety of system designs. Mainly used to calculate dynamic fee. Instances of stored dataStorage data, "timepoints", are collected in the dataStorage array Timepoints are overwritten when the full length of the dataStorage array is populated. The most recent timepoint is available by passing 0 to getSingleTimepoint()

#### PriceMovementMath.sol

Library that used for computing the result of a swap

#### TickManager.sol

Library for managing tick processes and relevant calculations

#### TickTable.sol

Packed tick initialized state library. Stores a packed mapping of tick index to its initialized state. The mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word

#### TokenDeltaMath.sol

TokenDeltaMath contains the math that uses square root of price as a Q64.96 and liquidity to compute deltas


---

# 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.stellaswap.com/dev-resource/api-reference.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.
