# Fees

### Liquidity provider fees <a href="#liquidity-provider-fees" id="liquidity-provider-fees"></a>

There is a **0.3%** fee for swapping tokens. **This fee is split by liquidity providers proportional to their contribution to liquidity reserves.**

Swapping fees are immediately deposited into liquidity reserves. This increases the value of liquidity tokens, functioning as a payout to all liquidity providers proportional to their share of the pool. Fees are collected by burning liquidity tokens to remove a porportional share of the underlying reserves.

Since fees are added to liquidity pools, the invariant increases at the end of every trade. Within a single transaction, the invariant represents `token0_pool / token1_pool` at the end of the previous transaction.

There are many community developed tools to determine returns. You can also read more in the docs about how to think about LP returns.

### Protocol Fees <a href="#protocol-fees" id="protocol-fees"></a>

There is a 0.05% protocol fee enabled for RCPSwap. These fees are sent to the RCPSwap Treasury Wallet.

### Protocol Charge Calculation <a href="#protocol-charge-calculation" id="protocol-charge-calculation"></a>

The protocol-wide charge of 0.05% per trade is enabled. This represents ⅙th (16.6̅%) of the 0.30% fee.

This amount does not affect the fee paid by traders, but affects the amount received by liquidity providers.

Rather than calculating this charge on swaps, which would significantly increase gas costs for all users, the charge is instead calculated when liquidity is added or removed. See the [whitepaper](https://uniswap.org/whitepaper.pdf) for more details.


---

# 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://moonsdust.gitbook.io/rcpswap/advanced-topics/fees.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.
