Skip to content
For terminals, aggregators, bots & AI agents

Caffee developer docs

Everything you need to index, price, route and track Caffee coins is read-only, on-chain and permissionless — no key, no signup, nothing needed from us. Read the chain directly, or consume our hosted API; both follow the exact math this site runs on.

Overview

Caffee is a fair-launch launchpad on Robinhood Chain. A coin has two lifecycle states, and you integrate them differently.

On the curve (pre-graduation)

Trades happen on the coin's own bonding-curve contract (constant-product with virtual reserves) — not a standard pool, so it's invisible to a generic DEX indexer until you read the curve directly. These docs are that spec.

Graduated

A completed curve migrates to a canonical Uniswap-V2 pair with LP burned. Your existing DEX indexer and router pick it up automatically — zero Caffee-specific work.

Fixed supply 1,000,000,000 × 1e18 per coin · 80% sold on the curve, 20% seeds the LP. All amounts are uint256 wei — format only at display time.

Creation feenone (gas only)
Curve trading fee1% (100 bps) → protocol treasury; included in quotes
After graduationstandard Uniswap-V2 0.3% LP fee — no Caffee fee

Quickstart

Three requests and you have the whole launchpad.

# every coin, newest first (price/mcap in ETH+USD, progress, graduated, pair)
curl 'https://caffee.fun/api/tokens?sort=new&limit=50'

# one coin: full curve state
curl 'https://caffee.fun/api/token/<address>'

# real-time push: launched | trade | graduated
curl -N 'https://caffee.fun/api/stream'

No key, CORS-open, JSON. Prefer chain-direct? Everything below reads from the contracts with plain eth_call / eth_getLogs.

Chain & contracts

NetworkRobinhood Chain (EVM)
Chain ID4663 (0x1237)
Native coinETH · 18 decimals
RPChttps://rpc.mainnet.chain.robinhood.com
Explorerhttps://robinhoodchain.blockscout.com
Uniswap-V2 Factory (graduation target)0x8bcEaA40B9AcdfAedF85AdF4FF01F5Ad6517937f
WETH (all graduated pairs are WETH-quoted)0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73

All four contracts are source-verified on Blockscout (full match). The factory address can change across major versions — discover tokens from the factory or the Launched event stream, never a hardcoded list.

Discover & read coins

No indexer required — enumerate from the factory, then read live state from each curve.

Enumerate (append-only on the factory)
curvesLength() → uint256                 0xe5498a57
curves(uint256) → address curve          0x1bf7d749
token() / creator()   on the curve       0xfc0c546a / 0x02d05d3f
curveOf(address) → curve (0x0 if not ours)  0x05adc47e
Live curve state → price, mcap, progress
spotPrice()      0x398482d8   wei per token ×1e18
marketCap   = spotPrice() × 1e9              (wei)
progress %  = tokensSold() / curveSupply() × 100
graduated() 0xe7c2b772 · pair() 0xa8aa1b31

The full selector table (reserves, tokensSold, curveSupply…) and every derived-metric formula are in the raw spec, §2–3, along with field mapping to Codex/Defined, DexScreener and GeckoTerminal schemas (§7).

Quotes & trading

Pre-graduation, orders go directly to the curve — one contract, no router, no path-finding.

getBuyQuote(uint256 ethInWei) → tokensOut   0xb390452c   # view, fee included
getSellQuote(uint256 tokenIn) → ethOutWei   0x0812530e   # view, fee included

buy(uint256 minTokensOut)  payable          # msg.value = ETH in — a buy is ONE tx
buyFor(address to, uint256 minTokensOut)    # 0x06501a6a — router-friendly buy on behalf of `to`
sell(uint256 amount, uint256 minEthOut)     # needs a prior ERC-20 approve(curve, amount)

Always pass a non-zero minOut computed from the quote with your slippage tolerance (caffee.fun uses 5%). Quotes are pure view functions — deterministic constant-product math, so your quote is exact against the state you read it from.

Routing user orders through your own executor contract? buyFor(to, minOut) preserves end-user attribution on-chain (Buy.buyer = your router, Buy.to = the user). The token is a plain ERC-20 — no pre-graduation transfer restrictions, no tax, no rebasing — so custody hops and pooled execution just work. A buy that overshoots the remaining curve supply fills what's left and auto-refunds the excess ETH.

After graduation, route through the standard Uniswap-V2 Router02 like any WETH pair — Caffee coins have no transfer tax and standard ERC-20 semantics, so generic swap paths just work.

Latency — what “fast” looks like here

The parts that decide how fast trading feels on a terminal, measured on this stack.

Block time (Robinhood Chain)sub-second (~250 ms class)
Curve buy1 transaction, no router hop, no approval
Curve sellapprove + sell (EIP-5792 batching supported)
Quote1 eth_call (view) — no simulation needed
New-token signalLaunched event, same block as creation
Hosted API pushSSE, ~3 s ingest poll

A terminal or bot running its own node/indexer sees launches and fills at chain speed — the venue adds no off-chain matching, queues or gatekeeping of its own.

Events to index

Four topics cover discovery, the full trade stream and the DEX handoff.

# factory 0xdeDc13eAA14462644dD99087eB408515D7D2aD56
Launched(token, curve, creator, name, symbol)
0xc5a807b0033def274292e9d3ba676e6fcfb69d9d383ccf9b69112237bd95def9

# each curve
Buy(buyer, to, ethIn, tokensOut, refund)
0x00f93dbdb72854b6b6fb35433086556f2635fc83c37080c667496fecfa650fb4
Sell(seller, tokensIn, ethOut)
0xed7a144fad14804d5c249145e3e0e2b63a9eb455b76aee5bc92d711e9bba3e4a
Graduated(pair, ethToLp, tokensToLp)
0x1c858049e704460ab9455025be4078f9e746e3fd426a56040d06389edb8197db

Buy.ethIn is already net of fee and refund (the exact reserve delta) — don't subtract refund again. Trade price of a fill: ethIn/tokensOut (buy) or ethOut/tokensIn (sell). Candles are just this stream bucketed by time — that's exactly how the caffee.fun chart is built.

Hosted read API

Optional — we run it so you don't have to run an indexer. CORS-open, no key, mirrors the on-chain math exactly.

GET /api/tokens?sort=mcap|new&graduated=0|1&limit=
list — price/mcap in ETH+USD, progress, graduated, pair
GET /api/token/:address
one coin, full curve state
GET /api/token/:address/trades?limit=&fromTs=
Buy/Sell trade stream (incl. maker, and recipient on buys)
GET /api/token/:address/ohlcv?res=1m|5m|15m|1h|4h|1d
candles built from the trade stream
GET /api/stats
launchpad aggregate (incl. trade-origin summary)
GET /api/origins
trade attribution — direct wallets vs third-party routers/bots
GET /api/stream
Server-Sent Events: launched | trade | graduated
GET /api/cg/latest-block · /asset · /pair · /events
CoinGecko/GeckoTerminal on-chain DEX standard shape

The API is a convenience layer — the on-chain reads above remain the source of truth. Graduated coins hand off to the canonical Uniswap-V2 pool (index those with your normal DEX indexer).

Token metadata

Logo, description and socials live on-chain in the TokenMetadata registry — no IPFS, no external host.

metadata(address token)   → (image, description, …socials)
getMany(address[] tokens) → batch read
event MetadataSet(address indexed token, …)

Images are data-URIs (self-contained). Name/symbol/decimals/totalSupply come from the ERC-20 itself.

Integration tracking

Because every trade is an on-chain event, integrations are visible the moment they go live — on both sides.

A caffee.fun trade has buyer == to (the wallet receives its own coins). A trade placed through a terminal, aggregator or bot contract shows up as a contract maker and/or buyer != to. /api/origins aggregates exactly that: direct vs routed volume, plus every routing contract we've ever seen, with first/last-seen timestamps. The same breakdown is on the public stats page.

If you're an integrator and want your router labelled (instead of “unlabelled contract”), ping us with the address.

For AI agents

Everything here is machine-consumable by design.

/llms.txtindex of machine-readable resources
/integration.mdthis spec as raw markdown (selectors, topics, formulas)
/api/*key-free JSON + SSE, CORS-open

Deterministic on-chain quotes + one-transaction buys mean an agent can go from “saw the Launched event” to “filled” in two RPC calls (eth_call quote, eth_sendRawTransaction) with no venue-specific SDK.

Trust & caveats

Read before listing or routing.

  • Contracts are unaudited (internal review only) — please don't represent Caffee coins as vetted.
  • Graduation can be griefed by pre-seeding the Uniswap pair with dust (migration defers; the curve stays live and sellable). Treat graduated() / the Graduated event as the only migration source of truth.
  • Selectors/topics on this page render from the same constants the production app trades with — but re-verify against your own node before mainnet routing.
  • More: caffee.fun/trust.