> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archr.win/llms.txt
> Use this file to discover all available pages before exploring further.

# Dev-buy

> The launch form's optional dev-buy. Buy a share of your coin's supply in the same transaction that deploys it; if the buy fails, the whole launch unwinds.

The site's [launch form](/getting-started/first-launch-site) lets you optionally buy a share of your own coin's supply in the same transaction that deploys the coin and creates the pool. This is the **dev-buy** option, and this page explains the on-chain invariant that keeps it safe: **the deploy and the buy succeed together, or neither happens.**

<Note>
  Dev-buy is only available on the site trigger. [Reddit](/getting-started/first-launch-reddit) and [X](/getting-started/first-launch-twitter) triggers deploy the coin without a dev-buy, so this page does not apply to them.
</Note>

## What a dev-buy does

When you click **Launch** on the site with a non-zero dev-buy amount, your wallet signs a single call to [`ArchrLaunchpad.launchWithBuy(...)`](/network/contracts#archrlaunchpad). That call, executed on-chain, does the following in one transaction:

1. Calls [`WebFactory.launch(...)`](/network/contracts#webfactory) to deploy the coin, create the V3 pool, and lock the full supply into it.
2. Wraps your `msg.value` ETH into WETH.
3. Calls `SwapRouter02.exactInputSingle(...)` on the newly-created pool to swap that WETH for the coin, with `recipient = msg.sender` (you) and `amountOutMinimum` set from your slippage tolerance.

## The unwind guarantee

If step 3 reverts for any reason, the EVM unwinds the **entire** transaction. The coin is not deployed, the pool is not created, the WETH is not wrapped, and your ETH stays in your wallet (minus the gas the reverted call spent). There is no state in which the coin exists but the swap failed; the site never produces an orphan launch.

The guarantee closes a specific frontrun: without it, a failed dev-buy would leave the coin deployed but unbought, and a sniper could take the first real buy. Binding the two together removes that surface.

## What failure looks like

If the swap step reverts, the transaction fails and:

* No `Launched` event is emitted; the coin's contract does not exist at the CREATE2 address.
* The `LaunchpadLaunch` event from [`ArchrLaunchpad`](/network/contracts#archrlaunchpad) is not emitted.
* Your ETH is refunded (the transaction reverted).
* Your wallet pays only the gas the reverted call spent.

The site's error copy is "Launch failed. Try increasing slippage." Raise slippage and retry, or reduce the dev-buy amount so it fits within your sell wall.

## What the guarantee does not protect against

The unwind guarantee is a **transactional** property, not a market-quality guarantee.

Robinhood Chain has a public transaction ordering surface, so a large enough dev-buy can still be sandwiched by other transactions in the same block as long as your `amountOutMinimum` is loose enough to let them fit. Keep slippage tight if you are worried about MEV.

If you set slippage to 100%, the dev-buy accepts any fill the pool gives you, which may be far worse than the target. The default slippage in the launch form is picked to catch most cases; raise it only when you understand why.

Anything that happens after your transaction confirms is beyond the guarantee. If a whale front-runs your next buy or dumps the wall, that is normal market activity on a permissionless AMM.

## Rejection reasons

Some launches fail before they can reach the swap step:

* **Insufficient ETH.** Your wallet does not have enough to cover both `msg.value` (the dev-buy amount) and the launch's gas. The site checks this before signing when possible; if the check fails at the wallet layer, the transaction never broadcasts.
* **`NoValue()` revert.** [`ArchrLaunchpad.launchWithBuy`](/network/contracts#archrlaunchpad) requires `msg.value > 0`. If you use the launch-with-buy path with zero ETH, the contract reverts before reaching the swap. Use `launch(...)` for zero-value launches; the site does this automatically when the dev-buy field is 0.
* **`BadTick()` revert.** The launch tick was outside the usable range or not a multiple of `tickSpacing = 200`. This should never happen from the site (the client computes the tick correctly) but is enforced on-chain for defense in depth.

For the dedupe rule (`AlreadyLaunched`) see [launch overview](/launch/overview#dedupe).
