> For the complete documentation index, see [llms.txt](https://docs.peach.ag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/bonding-curve-trading.md).

# Bonding Curve Trading

While its Curve is open, a Pro token trades against its own BondingCurveV2. **Quote** is the launch's ERC20 payment asset. Buyers pay Quote and receive launch tokens; sellers do the reverse. Read `Factory.getLaunchedToken(token)` for the correct Curve and Quote addresses.

Amounts use raw integer units. Launch tokens have 18 decimals; read the Quote's decimals separately.

### Buy and sell

<table><thead><tr><th width="87.16796875">Action</th><th width="240.27734375">Curve call</th><th>Approve first</th><th>Result</th></tr></thead><tbody><tr><td>Buy</td><td><code>buyExactIn(quoteInRaw, tokenRecipient, minTokenOut, deadline)</code></td><td>Quote allowance to Curve</td><td><code>tokenOut</code>, actual <code>quoteSpentRaw</code></td></tr><tr><td>Sell</td><td><code>sellExactIn(tokenIn, quoteRecipient, minQuoteOutRaw, deadline)</code></td><td>Launch-token allowance to Curve</td><td>Net <code>quoteOutRaw</code></td></tr></tbody></table>

The caller supplies the input; the recipient receives the output and may be another address. Deadlines use Unix seconds. Each method also accepts an optional final `bytes32 partnerId`; zero means no Partner. Calls use `value=0`. See [Approvals](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/approvals).

### Quotes and actual spending

`quoteBuyNet` expects Quote **after fees**. `quoteSellGross` returns Quote **before fees**. Include the active fees when quoting, then simulate the final call with minimum output and deadline. `quoteNetRequiredToBuy` is a pricing calculation; Curve execution supports Exact Input only.

A closing buy can exhaust the remaining sellable tokens. The Curve caps token output, refunds unused Quote to its caller and enforces a proportional minimum:

`ceil(minTokenOut × quoteSpentRaw / quoteInRaw)`

For example, if a request for 200 raw Quote actually spends 115 and its original minimum is 170 raw tokens, the enforced minimum is 98. An output of 100 satisfies that limit, and 85 raw Quote is refunded. Display the actual receipt amounts. Large excess input weakens this minimum; quote the remaining fill and keep the submitted input close to it.

### Fees and opening-tax exemptions

Buys charge the base fee, Creator Tax and any active Snipe Tax. Sells charge the base fee and Creator Tax. Each fee is rounded down separately in raw units. A buy is rejected if its combined fees reach 100%; refresh the recipient’s current rate or wait for the opening tax to decrease.

At creation, the original Creator, initial Creator Fee Recipient and recipient of a nonzero initial buy are automatically exempt from **Snipe Tax**. They still pay the base fee and Creator Tax. This exemption list is fixed at creation; later Controller or Recipient changes do not update it. Read `currentSnipeTaxBps(tokenRecipient)` for an ordinary buy. [Token Creation](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/token-creation) explains extra exemptions and the initial-buy limit.

See [Fees and Claims](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/fees-and-claims) for the complete cost table and allocation example. When sellable tokens reach zero, Curve trading closes and the buy attempts the sweep stage of [Graduation](https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/graduation). Pool creation remains a later operation.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.peach.ag/documentation/arc/launchpad/launchpad-pro/core-features/bonding-curve-trading.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
