> For the complete documentation index, see [llms.txt](https://docs.revolt.cool/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.revolt.cool/for-developers/integration-guide.md).

# Integration Guide

Patterns for indexers, aggregators, trading bots, and wallets integrating Revolt tokens.

## Core concept

A Revolt token is **not** a launchpad-internal asset waiting to graduate. It is a plain ERC-20 with a plain Uniswap v3 pool. If your product already supports Uniswap v3 on Robinhood Chain, Revolt tokens work out of the box. The only Revolt-specific pieces are **discovery** (which pools are Revolt launches) and **metadata** (logo, socials).

## Pattern 1 — Indexer / aggregator

1. **Backfill:** query `TokenCreated` logs on the launcher from deploy block `9954191`, or page through `getTokens(offset, limit)` (newest first).
2. **Live:** subscribe to `TokenCreated` — the event carries `token`, `creator`, `name`, `symbol`, the metadata JSON, and the `pool` address, so a single log gives you everything needed to list the token with its logo.
3. **Charts & trades:** index the pool's `Swap` events like any Uniswap v3 pair. There is no phase change and no liquidity migration to handle — the pool address never changes.
4. **Market cap:** `totalSupply()` (constant 1e27) × pool spot price. `priceOf(token)` on the launcher returns the spot price in wei per whole token if you prefer one call.

## Pattern 2 — Trading bot / terminal

* **Quotes:** Uniswap `QuoterV2.quoteExactInputSingle` with fee `10000`.
* **Swaps:** `SwapRouter02.exactInputSingle` (ETH → token with `msg.value`; token → ETH via `exactInputSingle` + `unwrapWETH9` multicall).
* **Sniping launches:** watch pending/new `TokenCreated` events; the pool is initialized and funded in the same transaction, so a buy in the next block is the earliest possible external fill (the creator's optional dev buy happens inside the creation transaction itself).

## Pattern 3 — Wallet

* Token lists: pull name/symbol from the ERC-20, logo from the on-chain metadata JSON (`metadataOf(token)`, field `image` — a data URI).
* Balances and transfers: standard ERC-20, no transfer hooks, no taxes, no blacklist.

## Security considerations

* **Immutability:** tokens have no owner and no mint; the launcher's LP position cannot be withdrawn. There is no admin path that can rug a pool's liquidity.
* **Metadata is user-supplied.** `metadata` is an arbitrary JSON string provided by the creator. Sanitize before rendering (especially the `image` data URI and link fields) — treat it like any untrusted input.
* **Name/symbol collisions are allowed.** Uniqueness is not enforced on-chain. Identify tokens by **address**, never by ticker.
* **Fee split maths:** `collectFees` pays 30% of collected amounts to the creator and 70% to the treasury, in both pool assets. Calling it costs only gas; it never reverts on zero fees.
* **Rounding:** all views return integer wei values; UI rounding is the integrator's responsibility.

## Support

Integrating and stuck? Reach out — see [Links](/resources/links.md).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.revolt.cool/for-developers/integration-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
