---
name: flash
description: Use Flash on Base with an AI agent. Start here for any Flash task: launch a coin on the bonding curve, enter or play a Token War (boost, cash out, jump, claim), buy or sell FLASH and launched tokens, or trade leveraged perps such as ETH2xL. Explains which sub-skill or MCP tool to use, the global rules (Uniswap v4 only, unsigned transactions, moderation first, chain id 8453, never Aerodrome, Permit2 approvals), and the vocabulary. Read-only: it never signs or holds keys.
---

# Flash: agent integration (start here)

Flash is a Base (chain id 8453) protocol for launching tokens on a bonding curve, competing in Token Wars, trading FLASH and launched tokens, and trading leveraged perps. This kit lets an agent do every one of those things on its own. It only reads data and builds UNSIGNED transactions; the user's wallet signs them.

## The trading rule (read this first)

- **The best way to quote prices and to swap Flash assets is Uniswap**: Uniswap v4 via the Universal Router on the Flash hook pools, with prices quoted through the Uniswap v4 Quoter / StateView or the tools here that wrap them. Every swap in this kit is built that way, on the correct Flash hook pool key.
- **Support for Aerodrome is planned as a future expansion but is NOT live yet.** Do not quote or route Flash trades through Aerodrome or Slipstream today. The tools refuse any other venue, and they will not fall back to one. If a pool cannot be reached on Uniswap v4 the tool says so plainly.

## Pick the right skill

| You want to | Skill | MCP tools |
| --- | --- | --- |
| Launch a coin on the bonding curve (choose a pair, moderation, create, first buy, curve trading, refunds) | [flash-launch](https://tryflash.app/agents/flash-launch/SKILL.md) | `list_pairing_options`, `check_pair_depth`, `prepare_launch`, `build_launch`, `list_prelaunches`, `quote_curve`, `build_curve_trade` |
| Enter a ticker in the Token War, Boost, Cash out, Jump, claim | [flash-token-wars](https://tryflash.app/agents/flash-token-wars/SKILL.md) | `get_token_war`, `prepare_war_entry`, `build_war_action` |
| Buy or sell FLASH, ETH, USDC or a graduated launched token | [flash-trade](https://tryflash.app/agents/flash-trade/SKILL.md) | `list_launches`, `get_token`, `quote_trade`, `build_trade` |
| Trade leveraged perps (ETH2xL, BTC2xL, ...) | [flash-perps](https://tryflash.app/agents/flash-perps/SKILL.md) | `list_perps`, `get_perp`, `quote_perp`, `build_perp_swap`, `perp_pairing_info` |
| Get oriented, live addresses, current war, tool map | this page | `flash_overview` |

## Interfaces

| Interface | URL | Use it when |
| --- | --- | --- |
| MCP server (Streamable HTTP, no auth) | `https://api.tryflash.app/mcp` | Your client speaks MCP. 20 tools cover everything. |
| CLI (single file, Node 18+, no deps, JSON out) | `https://tryflash.app/agents/flash/flash.mjs` | You can run shell commands. `node flash.mjs overview` |
| REST (read routes) | `https://api.tryflash.app/v1/...`, spec `https://tryflash.app/agents/flash/openapi.json` | You only need data. |

Do not send an `Origin` header to the REST API unless it is `https://tryflash.app` (other origins get 403). The MCP endpoint accepts any origin. Rate limit: 60 requests a minute per client; a tool call counts as 3. On HTTP 429 wait for `Retry-After`.

## Global rules

1. **Chain id 8453 (Base) only.** Every returned transaction already has the right chain.
2. **Uniswap v4 only for swaps.** Universal Router `0x6fF5693b99212Da76ad316178A184AB56D299b43`, pools on the Uniswap v4 PoolManager `0x498581fF718922c3f8e6A244956aF099B2652b2b`. Never Aerodrome today. Never invent a router or pool key; take them from the tools.
3. **Unsigned transactions.** Tools return `{to, data, value}` (plus `approvals` or `steps`). The caller's wallet signs and sends them in the order of `executeInOrder`. This server holds no keys and sends nothing.
4. **Approvals.** ERC-20 swaps through the Universal Router need two approvals: `token.approve(Permit2, max)` and `Permit2.approve(token, UniversalRouter, max160, max48)`. `build_trade` returns only the ones still missing when you pass `from`. Curve and Token War actions approve FLASH straight to the curve or war contract (the tool adds the approval step).
5. **FLASH funds launches, curves and wars.** Curve buys, war entries and boosts are paid in FLASH. Get FLASH with `build_trade` (ETH or USDC to FLASH on Uniswap v4) first. The app's other input routes (ETH, USDC, stocks, perps) use adapters with non-Uniswap legs and are not offered here.
6. **Moderation first.** A launch or war entry needs an uploaded image and `prepare_launch` / `prepare_war_entry` (name, ticker, description and image are moderated) before the create transaction can be built. The tools enforce this with a `preparedDigest`.
7. **Only approved pairs.** A new token can only be paired with an asset that is approved on-chain today. `list_pairing_options` reads this live every call; `build_launch` and the war entry refuse anything else. Never hard-code the list.
8. **Read the liquidity warning.** `check_pair_depth` and the prepare/build tools report `ok`, `thin` or `very_thin` for the pair asset. Thin pairs make every buyer of the new token pay slippage.
9. **Re-quote.** Quotes are for the current block. Calldata embeds a 20-minute deadline. Keep `minimumOut`.
10. **Gas.** Swaps through the Flash hooks are heavy (about 2 to 6 million gas; a launch create about 11 million). Let the wallet estimate gas; never hard-code a low limit.

## Glossary

- **Bonding curve**: the pre-launch market of a new token. Buyers pay FLASH along a rising price curve (fees ~1% to 5% rising, sells a bit higher) until the graduation goal is met. You can sell back to the curve any time while it is trading.
- **Graduation**: when the goal is met the curve closes, the token gets real liquidity (Uniswap v4 on the Flash hook, plus other venues), and curve buyers claim their tokens. After this the token trades with `quote_trade` / `build_trade`.
- **Aborted launch**: if a launch is aborted, trading stops and every buyer refunds their FLASH (`build_curve_trade` action `refund`).
- **Pair asset (quote asset)**: what the new token is paired with. FLASH (class SUB), an approved stock (STOCK) or an approved perp (PERP). Stocks and perps are also the **reward token**: the asset whose value funds holder rewards. A FLASH-paired token picks an approved stock as its reward asset.
- **Token War**: a shared contest. New tickers (contenders) enter for a FLASH entry fee (one per wallet) and everyone backs them with FLASH. When the goal is reached the leader locks, graduates and launches; backers claim.
- **Boost**: back a contender with FLASH (a buy). **Cash out**: sell a position back to FLASH. **Jump**: move a position from one contender to another in one transaction. **Claim**: after the war graduates, collect tokens.
- **Perps**: leveraged long or short ERC-20 tokens (ETH2xL, BTC2xL, ETH2xS, ...) priced at NAV, traded on Uniswap v4 with the Flash JIT hook.

## Five-minute tour

```bash
curl -s https://api.tryflash.app/mcp -H 'content-type: application/json' -H 'accept: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"flash_overview","arguments":{}}}'

node flash.mjs overview                         # same through the CLI
node flash.mjs quote ETH FLASH 0.05             # Uniswap v4 quote
node flash.mjs pairs --approved-only            # what a new coin may be paired with, live
node flash.mjs war                              # the current Token War
```

`flash_overview` returns the launchpad, Token War and hook addresses, the FLASH price, how many curves are live, the current war, and this tool map. Everything below the overview is in the sub-skills.

## Errors

Tool failures come back as `isError: true` with a plain sentence (unknown token, unapproved pair, war closed, pair would revert). Protocol errors use standard JSON-RPC codes. Report problems at https://tryflash.app.
