> For the complete documentation index, see [llms.txt](https://maplefun.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://maplefun.gitbook.io/docs/economy/fees.md).

# Fees

## Overview

Every pool on Maple.fun has its own fee structure, configured by the pool creator at launch. Fees serve three purposes: rewarding long-term participants, compensating pool creators, and keeping the protocol running. Everything is on-chain and transparent.

Fees are measured in basis points (BPS), where 10,000 BPS equals 100%. So when you see "50 BPS," that means 0.5%.

***

## Deposit Fees

When you deposit into a pool, a small fee gets skimmed off the top. Here's the twist: that fee doesn't leave the pool. It stays inside, which means existing shareholders benefit from a slightly better asset-to-share ratio. You're essentially tipping the pool on your way in.

The base fee is set by `deposit_fee_bps`, but the actual fee you pay might be lower or higher depending on two factors:

**Early Bird Discounts**

Pool creators can set up to four discount tiers that reward early depositors. If you deposit within a certain window after the pool launches, you pay less. The clock starts at pool creation, and once a tier's duration passes, the discount shrinks or disappears.

**TVL-Based Scaling**

As a pool grows, fees can ramp up. Creators define two "elbows" (TVL thresholds) and a slope. Below the first elbow, you pay the base fee. Between the elbows, the fee gradually increases. Above the second elbow, it caps out at `max_fee_bps`. This discourages massive deposits from dominating a pool and helps manage growth.

There's also a `max_deposit_percentage_bps` setting that can limit how much of a pool's TVL you can deposit in one go—preventing any single whale from taking over.

***

## Withdrawal Fees

Pulling your tokens out involves a few deductions from your gross withdrawal amount:

**Base Withdrawal Fee**

A flat percentage (`withdrawal_fee_bps`) that stays in the pool, benefiting remaining shareholders.

**Project Fee**

A separate cut (`project_fee_bps`, minimum 0.05%) that gets split down the middle: half goes to the pool creator, half goes to the Maple treasury. This is how creators earn from their pools and how the protocol sustains itself.

***

## Early Withdrawal Penalties

Pools can punish quick exits to discourage hit-and-run behavior. Penalties are based on how long it's been since your last deposit.

**Cooldown Penalty**

If the pool has a cooldown period, you'll face a penalty that starts at `max_withdraw_penalty_bps` and decays linearly to zero over `withdraw_cooldown_secs`. Deposit today, withdraw tomorrow? Big penalty. Wait out the full cooldown? No penalty.

**Fast-Exit Floor**

Some pools set a minimum penalty (`fast_exit_floor_bps`) that applies if you withdraw within a short window (`fast_exit_window_secs`). Even if the linear cooldown penalty would be lower, you'll pay at least this floor amount.

The actual penalty you pay is whichever is higher: the cooldown penalty or the fast-exit floor. These penalties stay in the pool.

***

## Putting It Together

Say you're withdrawing from a pool and your share is worth 1,000 tokens:

| Fee Type           | BPS | Amount  | Where It Goes            |
| ------------------ | --- | ------- | ------------------------ |
| Withdrawal fee     | 30  | 3       | Stays in pool            |
| Project fee        | 60  | 6       | 3 to creator, 3 to Maple |
| Early exit penalty | 500 | 50      | Stays in pool            |
| **You receive**    |     | **941** | Your wallet              |

***

## The Fine Print

The protocol enforces a few hard limits to keep things sane:

* Total withdrawal-related fees (base + project + max penalty) can never exceed 100%
* Project fee must be at least 0.05%
* No individual fee can exceed 100%
