# graduation

Graduation is the moment a token transitions from its bonding curve into a permanent, sealed AMM pool. It happens automatically — no one needs to trigger it.

## When does a token graduate?

A token graduates when **enough KUB has been raised through the bonding curve** to support a healthy initial AMM. The progress is visible on every token page as a percentage bar.

When the bar hits 100%, the very next buy triggers graduation atomically — inside the same transaction.

{% hint style="info" %}
The exact graduation threshold is a tuned parameter of the Durianfun bonding curve. You'll see "100%" on the progress bar when you're close — that's the signal to watch.
{% endhint %}

## What happens at graduation

Inside a single atomic transaction:

1. ✅ The final buy executes normally (with excess KUB refunded if overshoot)
2. ✅ Bonding curve market is flagged `graduated = true` — no more buys/sells on the curve
3. ✅ **Treasury receives a 50 KUB bonus**
4. ✅ **Creator receives a 10 KUB bonus** (with DOS-safe fallback)
5. ✅ A fresh **AMM pool contract** is deployed
6. ✅ Remaining liquidity (KUB + tokens) is transferred into the AMM
7. ✅ AMM is **initialized with price-aligned reserves** (opens at exactly the curve's last price)
8. ✅ A `Graduated` event is emitted — indexers, bots, charts update

## Why price-aligned AMM opening?

Many launchpads deploy their AMM at an arbitrary ratio, which creates a **price cliff** at graduation. The first trader on the AMM gets a massive discount vs the bonding curve's final price. Snipers bribe validators to jump the queue.

Durianfun solves this by **mathematically setting the AMM reserves** so the opening price equals the curve's closing price. No cliff. No sniper advantage.

Combined with a **10-block cooldown** where no trading is allowed on the AMM, this kills the usual graduation MEV games entirely.

## Creator bonus: what you get

When your token graduates, you automatically receive:

* **10 KUB** — direct transfer to your creator wallet
* (Plus all the 0.167% rebates you accumulated during the bonding phase)

After graduation, the 0.167% rebate stops. AMM fees flow to treasury (0.30%) and the pool itself (0.10%). Your token is now fully decentralized — yours forever in supply, but no longer yours to extract fees from.

## Stuck tokens & the rescue mechanism

Because the AMM opens price-aligned, a small percentage of the total supply can end up stuck in the bonding curve market (not transferable to the AMM because the math doesn't balance exactly). These "stuck tokens" can be rescued by the factory owner via the `rescueStuckTokens()` function.

{% hint style="info" %}
**Transparency commitment:** Durianfun will publish its rescue policy publicly once rescues are needed at scale. All rescue transactions are on-chain and visible on Kubscan.
{% endhint %}

## Irreversibility

Once graduation fires:

* ❌ Bonding curve can never be reopened
* ❌ AMM liquidity can never be removed
* ❌ Fee rates on the AMM cannot be changed (hardcoded constants)
* ❌ Nobody (not even Durianfun) can rug the pool

This is the point where your token stops being a Durianfun experiment and becomes a permanent KUB Chain asset.


---

# 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/graduation.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.
