# Fees & Analytics

Track performance and maximize returns from your DLMM positions. This section covers fee structures, calculating accumulated rewards, collecting earnings, and comprehensive analytics including APR calculations and profit/loss tracking.

### Prerequisites

Before analyzing fees and performance, ensure you have:

* Active positions with liquidity in DLMM pools
* Understanding of protocol fee tiers and structures
* Basic knowledge of impermanent loss concepts
* Historical position data for P\&L calculations
* Familiarity with APR/APY calculations

### What You'll Learn

This section covers comprehensive fee management and position analytics:

#### [Fee Structure](#fee-structure)

Understand how protocol fees work in bins, including base fees, dynamic fees based on volatility, and how fees accumulate in different price ranges.

#### [Calculate Position Fees](#calculate-position-fees)

Track accumulated trading fees across all your position's bins. Monitor fee generation rates and identify most profitable price ranges.

#### [Collect Fees](/integration/dlmm/typescript-sdk/fees-and-analytics/collect-fees.md)

Claim earned fees from positions without removing liquidity. Learn optimal collection strategies and gas-efficient fee harvesting techniques.

#### [Position Value](/integration/dlmm/typescript-sdk/fees-and-analytics/position-value.md)

Calculate current total value of positions including principal liquidity and accumulated fees. Track portfolio performance in real-time.

#### [Calculate APR](/integration/dlmm/typescript-sdk/fees-and-analytics/calculate-apr.md)

Estimate annualized returns based on fee generation, price movements, and liquidity utilization. Compare strategies and optimize position placement.


---

# 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.ferra.ag/integration/dlmm/typescript-sdk/fees-and-analytics.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.
