# trade

Durianfun tokens have two trading phases. The UI handles the routing automatically — you just click Buy/Sell.

## Phase 1 — Bonding Curve (pre-graduation)

Before a token has raised enough liquidity to graduate, trading happens on its **bonding curve market**.

* **Buy** — send KUB, receive tokens
* **Sell** — send tokens, receive KUB
* **Fee per trade** — 1.067% (0.900% to treasury, 0.167% to creator)
* **Price model** — exponential-ish curve: the more tokens minted, the higher the next one costs

### How to buy

1. On the token page, click **Buy**
2. Enter KUB amount (or pick a preset: 0.1 / 0.5 / 1 / 5 KUB)
3. Review estimated tokens out
4. (Optional) Adjust slippage tolerance — default is usually fine
5. Click **Buy** → confirm in wallet

### How to sell

1. Click **Sell**
2. Enter token amount (or % of balance: 25 / 50 / 75 / 100%)
3. Review estimated KUB out
4. Click **Sell** → confirm in wallet

{% hint style="warning" %}
**Approval first on sells.** ERC-20 requires a one-time approval before the market can pull your tokens. The UI handles this — it prompts for approval on your first sell.
{% endhint %}

## Phase 2 — AMM (post-graduation)

Once a token graduates, trading moves to its permanent AMM. The UI switches automatically — you still just click Buy/Sell.

* **Fee per trade** — 0.40% (0.30% to treasury, 0.10% stays in pool — the pool itself gets deeper every swap)
* **Price model** — standard constant-product x·y=k
* **LP is sealed** — no one can remove liquidity, ever
* **10-block cooldown** after graduation blocks MEV snipers

## Slippage protection

Every Durianfun trade enforces a `minOut` parameter. If price moves against you between when you sign and when the tx lands, the tx reverts instead of filling badly.

The UI calculates a reasonable slippage based on your trade size. For very large trades or volatile tokens, you can bump it manually.

## "Buy past graduation" protection

If you send a buy big enough to push the curve past its graduation threshold, the contract:

1. Fills **exactly enough** of your buy to hit the graduation line
2. **Refunds the excess KUB** back to you in the same tx
3. Graduates the market + deploys the AMM automatically
4. Emits a `BuyRefunded` event

You pay gas for the graduation deployment on this transaction (it's the expensive one), but you also get credit for being the one who pushed the token over the line — plus whatever tokens your allowed portion bought.

## Trade history & chart

Every token page has:

* **Price chart** (TradingView-style, real-time)
* **Trade feed** (every buy/sell with wallet + amount + price)
* **Holder list** (top wallets by balance)
* **Bonding curve progress bar** (% until graduation, pre-grad only)

## Wallets this has been tested with

✅ MetaMask (desktop + mobile) • OKX Wallet • Bitkub Next • Rabby • Trust Wallet • Rainbow • Coinbase Wallet


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://durianandfun.gitbook.io/durianfun/durian-launchpad/getting-started/trade.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.
