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

# Dev buy

A dev buy lets a creator buy up to **2.5% of the supply** as the pool's first trade.

![Dev buy slider on the launch page](https://2634848750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfCxPyGLkCWEEYzj4BueG%2Fuploads%2Fgit-blob-3722641b12aec5dc59009f064b677c5dc6f64010%2Flaunch-devbuy-airdrop.png?alt=media)

## Why it cannot be front-run

The buy is submitted in the same atomic bundle as the transaction that makes the pool tradeable at all. There is no block in which anyone else could trade ahead of it:

```
┌─ one atomic bundle ───────────────────────────────────┐
│  payment  →  mint  →  create pool  →  seed + DEV BUY  │
└───────────────────────────────────────────────────────┘
```

Either the pool opens with your buy already filled, or nothing happens and the launch retries. There is no window in between.

## Two ways to specify it

| Parameter       | Meaning           | Limit                                      |
| --------------- | ----------------- | ------------------------------------------ |
| `devBuyPercent` | A share of supply | Max 2.5                                    |
| `devBuySol`     | A SOL amount      | The supply share it buys is capped at 2.5% |

Send exactly one of them. The response's `devBuy` object carries the target token amount and the exact lamports before you sign anything, and the SOL cost is added to `payment.lamports` so it rides in the same payment as the launch fee.

## What it costs

Buying a fraction `f` of total supply as the first trade, with a pool fee rate `r`, a start market cap `M`, and a seeded supply share `s`:

```
costUsd = (M · f) / (1 − f/s) / (1 − r)
```

The `1/(1 − r)` term is the pool's trading fee, charged on the swap input, so a 1% pool costs 1% more exactly as it would for any other first buyer. The `s` term matters only with [Airdrop mode](/stonkfun-docs/launching/airdrop-mode.md): a carve-out makes the pool thinner, so the same buy walks further up the curve and costs more. Without one, `s` is 1 and the formula reduces to `M·f/(1−f)`.

## The fill is a target, not a guarantee

The SOL amount is fixed when you are quoted and signed into that quote. The token amount is a target, because the executed fill comes from the pool: the real start price sits on a tick grid slightly above the curve's ideal price, and the pool's fill maths is not literally the closed-form curve the quote used.

The bundle is rejected if the fill lands too far below target, and that tolerance scales with the size of the buy. A very small buy only has to absorb tick-grid rounding, while a buy large enough to move the price walks that grid and diverges further, so a flat tolerance would make large buys impossible to fill.

## On a reward launch

The pool's payout is itself reduced by the transfer tax, so what arrives is net of it. Expect `devBuy.netTokens` rather than `devBuy.tokens`.

## Delivery

The fill is transferred to the creator wallet the moment the pool is live.

## Availability

A dev buy exists only as a bundled first trade, so if atomic bundling is temporarily unavailable the option is hidden on the launch page, refused by the API with `503`, and omitted from the OpenAPI spec. A generated client is never handed a parameter the platform would refuse.


---

# 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://stonkfun.gitbook.io/stonkfun-docs/launching/dev-buy.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.
