// 03Docs · version 1
How Clause
works.
Everything a bot owner, a copier or a holder needs: how a rule runs, the full rule language, what it costs, the contracts behind live bots, the API, and what can go wrong.
01How a bot runs
A bot is one rule with four parts. WHEN says when to look: on a clock, at the open, or on a chain event like a Pons launch. IF lists what must be true, all of it (or any of a list). THEN says what to buy and how much. EXIT lines say when to sell; they are checked on every tick and the first one that matches wins.
The same decision code runs the backtest, the paper bot and the live bot. A backtest replays 1 to 30 days of indexed Robinhood Chain data: Pons curve trades with the curve’s exact integer math (1% curve fee, creator tax, the snipe tax of the first seconds), stock token pools with their real depth and LP fee, our 0.5% fee each way, and gas. It returns every trade with its reason, the equity curve, the win rate, the worst drop, and the top reasons it did not buy.
Every bot starts on paper: it trades at live quotes, in public, with no funds. Every buy and sell records the time, the token, the amount, the price and the rule that matched with its values, like IF NVDA −3.2% today (≤ −3%).
Stock token trades are checked against Chainlink: a buy or sell is refused if the pool is more than 1.5% worse than the reference, or if the reference is stale during market hours. Rules on stocks know the US session (pre-market, regular, after hours) and its holidays.
02Rule language
Rules are JSON (v: 1). You rarely write it: the sentence you type is turned into it, and the builder shows it line by line. Here is the example on the home page:
{
"v": 1,
"name": "Red Day Buyer",
"when": {
"on": "timer",
"every_s": 60
},
"target": {
"kind": "stock",
"symbol": "NVDA"
},
"if": [
{
"v": "stock.change_today_pct",
"op": "<=",
"x": -3
},
{
"v": "market.session",
"op": "==",
"x": "regular"
}
],
"buy": {
"usd": 50
},
"exits": [
{
"if": [
{
"v": "position.pnl_pct",
"op": ">=",
"x": 2
}
],
"sell_pct": 100,
"reason": "take_profit"
},
{
"if": [
{
"v": "position.pnl_pct",
"op": "<=",
"x": -3
}
],
"sell_pct": 100,
"reason": "stop_loss",
"added": true
}
],
"limits": {
"max_open": 1,
"once_per_day": true
}
}WHEN: triggers
| when.on | Options | Fires |
|---|---|---|
| timer | every_s 60 to 86,400 | Checks the rule on a clock: every minute, hour, day… |
| market_open | Once when the US regular session opens. | |
| market_close | Once shortly before the regular session closes. | |
| pons_launch | wait_s 0 to 3,600 | When a Pons coin launches, optionally checked some seconds later. |
| pons_graduation | When a Pons coin graduates from its curve to its own pool. | |
| pons_trade | side, wallets[] | When anyone, or one of the listed wallets, buys or sells a Pons coin. This is copy-wallet. |
Targets
event_token trades the coin of the event (the launch, the graduation, the copied trade). stock takes a symbol, like NVDA or SPY. token takes any token address with a supported route.
IF and EXIT: values
| Value | Meaning |
|---|---|
| stock.price_usd | Pool price of the stock token, in USD |
| stock.change_today_pct | Change since the previous close, % |
| stock.change_since_open_pct | Change since today’s open, % |
| stock.vs_ref_pct | Pool price against the Chainlink reference, % |
| stock.trend_5d_pct | Change over five trading days, % |
| market.session | pre, regular, after or closed |
| token.age_s | Seconds since the coin launched |
| token.buyers_60s | Distinct buyers in the last 60 seconds |
| token.buys_60s · token.sells_60s | Buys and sells in the last 60 seconds |
| token.net_eth_60s | ETH in minus ETH out, last 60 seconds |
| token.creator_sold | Has the creator sold any? true / false |
| token.curve_pct | How full the bonding curve is, % |
| token.mc_usd | Market cap, USD |
| token.graduated | Trading on its own pool? true / false |
| token.creator_tax_pct · token.snipe_tax_pct | Taxes on the coin right now, % |
| event.eth · event.first_buy | Size of the triggering trade, and whether it is that wallet’s first buy |
| position.pnl_pct | Open position’s gain or loss, % |
| position.multiple · position.peak_multiple | Value now and at its best, as a multiple of cost |
| position.drawdown_pct | Drop from the position’s best value, % |
| position.age_min | Minutes since the buy |
Operators: >= <= > < == !=. Every condition in if must hold; put alternatives in any.
THEN, EXIT and limits
| Field | Shape |
|---|---|
| buy | { usd } or { eth } or { pct_cash } |
| exits[] | { if: [...], sell_pct: 1 to 100, reason }. First match wins, checked every tick. |
| limits.max_open | 1 to 50 positions open at once |
| limits.once_per_token · once_per_day | Buy a coin only once; buy at most once a day |
| limits.max_buys_per_hour | A ceiling on buys per hour |
| limits.hours | regular, extended or any (stocks) |
03Added by us
The parser reads your sentence with a grammar first (instant), and only for unusual sentences with an AI model, whose output is checked against the schema. A number that is not in your sentence is refused, unless it is one of these labelled defaults, shown as added by us:
- A stop at −3% for stock tokens
- A stop at −50% for Pons coins
- A time exit after 60 minutes for launch rules
- At most 3 positions open at once
Keep them, change them, or remove them in the builder. Once you edit one, it is yours and the label goes away.
04Going live
A live bot gets its own vault: a small contract deployed by the BotFactory and owned by your wallet. The factory registers it as an ERC-8004 agent, so its identity and record are public. You fund it with ETH or USDG and set its caps: per trade, per day, and an expiry date.
Our operator key can only ask ClauseGuard to make the vault trade through a listed adapter. The guard checks that the vault comes from our factory, is not paused, revoked or expired, that the trade fits the caps, that the output lands in the vault, that a token is sold only through the route it was bought on, and resets every approval to zero. Withdrawing is owner-only. The Universal Router is never callable. New adapters wait 48 hours in a public queue; removals are instant.
Live caps at launch: 0.02 ETH or $50 per trade, 0.1 ETH or $250 per day, per bot. Live trading switches on at launch.
05Fees and token
Backtests and paper bots are free. A live trade pays a fee each way, taken in ETH or USDG by the guard and sent to the FeeSplitter. The rate depends on the CLAUSE in the bot owner’s wallet (no lock):
| Tier | Fee a trade | Limits |
|---|---|---|
| Free | 0.5% | 1 live and 3 paper bots, 7-day backtests, 10 AI reads a day |
| 1M CLAUSE | 0.35% | 5 live and 20 paper bots, 30-day backtests |
| 5M CLAUSE | 0.25% | 25 live bots, unlimited paper, API and MCP, featured on the board |
| Bot | Buyback-burn | Original creator | Treasury |
|---|---|---|---|
| Original bot | 70% | — | 30% |
| Copied bot | 50% | 30% | 20% |
The burn bucket buys CLAUSE on its curve or pool, in small slices with a minimum out, and sends it to 0x…dEaD. Anyone can trigger it. The fee can never exceed 1%: the cap is fixed in the guard contract.
06Contracts
Clause contracts on Robinhood Chain (chain id 4663). Each address appears here once deployed and verified.
Creates each bot’s vault, owned by your wallet, and registers it as an ERC-8004 agent.
Published at launch
The only door the bot key has: checks the vault, the limits, the adapter and the route on every trade.
Published at launch
Splits each fee between buyback-burn, the original creator and the treasury.
Published at launch
Buys and sells on a Pons coin’s bonding curve. Recipient is always the vault.
Published at launch
Single-pool swaps on Uniswap v4, including graduated Pons pools.
Published at launch
Stock token swaps on Uniswap v3, two hops at most.
Published at launch
What bots trade through
| Contract | Address |
|---|---|
| Pons v2 factory | 0x7eD598BcEf8bd9Edd8C97A195C6d13f40801EC7e |
| Uniswap v4 PoolManager | 0x8366a39cc670b4001a1121b8f6a443a643e40951 |
| Uniswap v3 SwapRouter02 | 0xcaf681a66d020601342297493863e78c959e5cb2 |
| ERC-8004 identity registry | 0x8004A169FB4a3325136EB29fA0ceB6D2e539a432 |
| USDG | 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 |
| WETH | 0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73 |
07API
JSON over HTTPS at tradeclause.live/api, open to read. Writing needs a wallet sign-in. Bots and their trades are public by design.
/v1/healthIs the engine up./v1/statsLaunches read in 24 h, stock tokens covered, days of history, bots, backtests run./v1/parse{ sentence } → { rules, readable, notes, source }, or { error, preset }./v1/backtest{ rules, days: 1 | 7 | 30 } → { summary, trades, equity, skipped }./v1/bots?sort=&mode=Public bots. sort: return_7d, copies, new. mode: live, paper./v1/bots/:idOne bot: rules, readable lines, trades with reasons, equity, creator, copies, vault, agent id./v1/trades?limit=Latest trades of public bots, newest first./v1/leaderboard?window=Live bots with at least 5 trades, by return over 1d, 7d or 30d./v1/market/stocksEvery stock token with its pool price, reference and session./v1/market/pons/recentLatest Pons launches with their first-minute numbers./v1/market/series?kind=&symbol=&token=&days=Price series of a stock token or a Pons coin, 1 to 30 days./v1/tokenCLAUSE contract address and market cap once launched./v1/auth/nonce?address=A sign-in nonce for the wallet./v1/auth{ address, message, signature } → { token }. A short session, free, moves no funds./v1/botsSigned in. { rules, sentence, name } → a new paper bot./v1/bots/:id/copySigned in. Copies a public bot into your account, on paper./v1/bots/:id/pauseSigned in, owner only. Pauses the bot.08Risks
- Bots lose money.
A rule does exactly what it says, including in markets it was not written for. Backtests and paper results promise nothing about live results.
- Pons coins can go to zero.
Most launches do. Creators can sell, curves can stall, pools can be thin. Keep sizes small.
- Stock tokens have an issuer.
They can be paused or blocklisted by their issuer; a paused token cannot be bought or sold until it is unpaused.
- Prices move between check and fill.
Fills use live quotes with a minimum out; a trade that would fill too far from its quote, or from Chainlink for stocks, is refused.
- Contracts can have bugs.
The vault, guard and adapters are small and tested against forks of the chain, but no code is risk-free. Only fund a vault with what you can lose.
- Our key can be down.
If the operator is offline, live bots stop trading. Your funds stay in your vault and you can withdraw at any time.
Information only, not financial advice. Questions: the FAQ.