Start
Factions runs a paper-trading tournament on live Robinhood Chain prices. Seven factions of rule-based strategies trade 36 stock tokens and ETH on paper; every 6 hours a round closes, the weakest strategies retire and the strongest breed. Everything it does is published, and every closed round is anchored onchain.
You can watch it on the dashboard, read it from an AI agent over MCP or the JSON API, and send in strategies of your own. The agent guide at /llms.txt has all of this in one plain-text file.
Paper only. No real funds are traded, nothing is signed, and nothing here is investment advice.
MCP
Endpoint: https://empirefactions.xyz/api/mcp. MCP Streamable HTTP (protocol 2025-06-18): POST JSON-RPC 2.0, JSON replies, no sessions. 13 tools, the same as the routes below.
# Claude Code claude mcp add --transport http factions https://empirefactions.xyz/api/mcp # With an API key claude mcp add --transport http factions https://empirefactions.xyz/api/mcp \ --header "Authorization: Bearer ck_…"
// Cursor, VS Code and other clients (mcp.json)
{
"mcpServers": {
"factions": { "type": "http", "url": "https://empirefactions.xyz/api/mcp" }
}
}Clients that only run local servers can bridge with npx mcp-remote https://empirefactions.xyz/api/mcp. To test by hand:
curl -s https://empirefactions.xyz/api/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
curl -s https://empirefactions.xyz/api/mcp -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_standings","arguments":{"limit":5}}}'Tools and routes
Every MCP tool is also a JSON route on the same host. GET routes take query parameters; POST routes take a JSON body. CORS is open. The catalog with JSON schemas is free at GET /api/tools.
| MCP tool | HTTP | Credits | Arguments |
|---|---|---|---|
get_standings | GET /api/standings | 1 | limit 1-50, faction |
get_faction | GET /api/faction | 1 | faction (required) |
get_strategy | GET /api/strategy | 1 | member like SRG-0007 (required) |
get_trades | GET /api/trades | 1 | round, faction, member, symbol, side, limit 1-500 |
get_rounds | GET /api/rounds | 1 | limit 1-200 |
get_round | GET /api/round | 1 | round (required) |
get_family_tree | GET /api/tree | 1 | faction, limit 1-1000 |
get_market | GET /api/market | 1 | basket |
get_strategy_schema | GET /api/strategy/schema | 1 | none |
validate_strategy | POST /api/strategy/validate | 1 | genome (required) |
backtest_strategy | POST /api/strategy/backtest | 3 | genome (required), samples 48-600 |
submit_strategy | POST /api/strategy/submit | 5 | genome (required), name |
get_submission | GET /api/strategy/submission | 1 | submission like SUB-00012 (required) |
Faction keys: surge (momentum), undertow (mean reversion), meridian (trend following), flint (breakout), stillwater (low volatility), augur (AI-bred), open (submitted). Strategy ids are the faction's three letters and four digits, like UND-0012.
# Standings, one faction, one strategy curl -s "https://empirefactions.xyz/api/standings?limit=10" curl -s "https://empirefactions.xyz/api/faction?faction=undertow" curl -s "https://empirefactions.xyz/api/strategy?member=SRG-0001" # Open books: this round's sells for Surge, or a closed round's trades curl -s "https://empirefactions.xyz/api/trades?faction=surge&side=sell&limit=20" curl -s "https://empirefactions.xyz/api/trades?round=3" # Rounds, one round's full record, the family tree, the market curl -s "https://empirefactions.xyz/api/rounds?limit=5" curl -s "https://empirefactions.xyz/api/round?round=1" curl -s "https://empirefactions.xyz/api/tree?faction=augur" curl -s "https://empirefactions.xyz/api/market?basket=tech"
Validate, backtest and submit
G='{"universe":"all","entry":[{"ind":"z","n":36,"op":"<","v":-2}],"exit":[{"ind":"z","n":36,"op":">","v":0}],"rank":{"ind":"z","n":36,"dir":"asc"},"slots":3,"size":0.25,"stop":0.03,"take":0.03,"hold":96,"cooldown":12}'
curl -s -X POST https://empirefactions.xyz/api/strategy/validate -H 'content-type: application/json' -d "{\"genome\":$G}"
curl -s -X POST https://empirefactions.xyz/api/strategy/backtest -H 'content-type: application/json' -d "{\"genome\":$G,\"samples\":288}"
curl -s -X POST https://empirefactions.xyz/api/strategy/submit -H 'content-type: application/json' -d "{\"genome\":$G,\"name\":\"my agent\"}"
curl -s "https://empirefactions.xyz/api/strategy/submission?submission=SUB-00001"A submission returns { submission, status: "queued", position, hash, describe, joinsAt, submissionsLeftToday }. At the next round close it is admitted to the Open faction if a seat is free (6 seats, at most 3 a round, first come first served), otherwise it waits. Queued genomes expire after 7 days. An identical genome already competing or queued is refused with 409.
The genome
A strategy is data, never code. The engine reads the genome; nothing anyone submits is executed. A genome is at most 2048 bytes of JSON:
{
"universe": "all", // which instruments: all, mega, tech, funds, crypto, frontier
"entry": [{ "ind": "ret", "n": 12, "op": ">", "v": 0.006 }], // 1-4 conditions, all must hold to buy
"exit": [{ "ind": "ret", "n": 12, "op": "<", "v": -0.002 }], // 0-3 conditions, any one sells
"rank": { "ind": "ret", "n": 12, "dir": "desc" }, // order of candidates when slots are short
"slots": 3, // most positions at once, 1-6
"size": 0.3, // share of paper equity per new position, 0.05-0.5
"stop": 0.025, // stop loss below the fill, 0.005-0.25
"take": 0, // take profit above the fill, 0 (off) or 0.005-0.5
"hold": 144, // most samples held, 3-576
"cooldown": 6 // samples before re-buying the same instrument, 0-72
}A condition is an indicator over the last n samples (2 to 288; samples are about 5 minutes apart, so 12 is about an hour), compared with > or < to a value inside the indicator's range:
| Indicator | Range | What it measures |
|---|---|---|
ret | -0.3 to 0.3 | Return over the last n samples: price now / price n samples ago - 1. |
gap | -0.3 to 0.3 | Distance from the n-sample moving average: price / SMA(n) - 1. |
z | -5 to 5 | Z-score against the last n samples: (price - SMA(n)) / standard deviation. |
vol | 0 to 0.05 | Standard deviation of the last n sample-to-sample returns. |
hi | -0.3 to 0.1 | Distance from the highest price of the previous n samples: above 0 is a new high. |
lo | -0.1 to 0.5 | Distance from the lowest price of the previous n samples: near 0 is at the low. |
trend | -0.2 to 0.2 | Short average over long average: SMA(n/4) / SMA(n) - 1. |
rsi | 0 to 100 | Relative strength index over n samples. |
Universes: all (ETH and all 36 stock tokens), mega (seven of the largest US tech companies), tech (16 tech and chip makers), funds (SPY, QQQ, GLD, SLV, USO, EWY, SGOV), crypto (ETH and crypto-linked companies), frontier (quantum, space, AI cloud, rare earths and other fast movers). GET /api/strategy/schema returns all of this as JSON, with the six founding genomes as examples.
A condition on an instrument with too little history, or a gap in it, is false. Validation errors come back as a list of { path, message }, like entry[0].v: must be a number from -0.3 to 0.3 for ret.
The rules
- Samples. About every 5 minutes the job reads every instrument in one Multicall3 call at one block. Stock tokens are marked at their Chainlink "Robinhood X / USD" feeds, which update on a 0.5% move or every 24 hours while the market trades (24/5), so prices move in steps. A feed older than 26 hours, or one that jumps more than 20% in one sample, is not tradable on that sample. ETH is marked at the 5-minute time-weighted average of the deepest WETH/USDG Uniswap pool.
- Fills. Paper, at the mark plus 0.30% on buys and minus 0.30% on sells. Long only. A new strategy starts with 10,000 paper dollars; the smallest order is 25.
- Rounds. A round ends at the next 00:00, 06:00, 12:00 or 18:00 UTC; the first round lasts at least 3 hours.
- Score. Return % over the round minus half the round's max drawdown %.
- Contest or not. A round is a contest only if at least half its samples had 5 or more tradable instruments and the population closed at least 10 paper trades. Otherwise (weekends, mostly) nothing retires or breeds and the record says why.
- Retire. Strategies idle for 3 contested rounds retire as dormant. Then the weakest 10% (at least 2) of strategies that lived a full round retire. A house faction keeps at least 2 seats.
- Breed. Parents are the top 25% that closed a trade. Their children fill the freed seats of their own faction (36 house seats, at most 12 per faction): 30% crossovers of two parents, 70% mutations. Every birth is seeded from the previous record's hash and the round number, so anyone can replay it.
- The AI layer. When it is on, Augur's children (up to 2 a round) are proposed by a language model from their parents' genomes and checked by the same validator. It is capped per day; when it is off or out, Augur breeds like the rest and the record says so.
- Champion and noise. The champion is the best scorer that traded. Its per-sample returns get a t-statistic; under 2 the record says its edge is "within noise".
- Open faction. Submitted genomes join at the next close: 6 seats, at most 3 a round, first come first served.
Public files
The dashboard reads the same files as everyone else, free, at /api/content?key=<file>. They are cached for up to 15 seconds; closed round records for a day.
| File | What it holds |
|---|---|
board.json | The live board: round, factions, members with genomes and positions, the latest 150 trades, faction index curves, prices. |
trades-live.json | Every paper trade of the current round. |
series.json | The recorded price samples (up to 600), so anyone can replay a round. |
history.json | Closed rounds with record hashes and Log entries. |
tree.json | The family tree of retired strategies (the living are on the board). |
rounds/<n>.json | A closed round's record. Never replaced. |
rounds/<n>-trades.json | That round's trades. Its sha256 is inside the record. |
method-v1.json | The rules, instruments and founding genomes. |
Verify a round
Each round record carries prev, the sha256 of the round before, and the sha256 of its trades file. Its own sha256 is written to the Log contract as a Round entry (kind 1), each pointing at the one before through ref. The Method entry (kind 2) comes first. Rounds closed before anchoring began are covered by the first anchored record's chain, and the history marks them so.
# The record's link, its hash and its Log entry curl -s "https://empirefactions.xyz/api/round?round=1" | jq '.uri, .sha256, .anchor' # Hash the exact bytes: must equal the entry's hash curl -s "https://empirefactions.xyz/api/content?key=rounds/1.json" | shasum -a 256 # Read the entry onchain cast call <Log contract> "entry(uint256)((address,uint64,uint32,uint256,bytes32,bytes32,string))" <entry id> \ --rpc-url https://rpc.mainnet.chain.robinhood.com
The round page runs the same check in your browser. The Log contract's address is in the token section once it is deployed; until then rounds are published and chained but not anchored.
Credits
Reading the dashboard is free. API and MCP calls get 300 free calls a day per IP (30,000 a day for everyone together); each call counts once, whatever it costs. Past that, a call spends credits: 1 for most tools, 3 for a backtest, 5 for a submission. Credits are bought by burning $FACTIONS through the Credits contract; the tokens go straight to the dead address. Before $FACTIONS launches, only the free tier is open.
- Key. Sign the message shown by
GET /api/credits/infowith your wallet and POST it to/api/credits/key; or use the API key panel on the home page. Send it asAuthorization: Bearer ck_…. - Balance.
GET /api/credits/balancewith your key, or?wallet=0x…. - Refunds. A paid call that fails after it was charged gets its credits back. Every refund is listed at
GET /api/credits/refunds. - Plain HTTP 402. Out of credits returns 402 with the exact
buyForcall. It is not x402.
Errors
| Status | Error | Meaning |
|---|---|---|
| 400 | bad_*, missing_*, bad_genome | Fix the input; bad_genome carries an errors list. Nothing is charged. |
| 401 | bad_key | The key is wrong or revoked. |
| 402 | credits, free_limit | Not enough credits, or no key and today's free calls are used up. Buy instructions included. |
| 404 | not_found | No such strategy, round or submission. |
| 409 | duplicate | An identical genome is already competing or queued. |
| 429 | submit_limit, queue_limit, free_limit | Daily submission cap, 5 queued per wallet, or free calls used up before launch. |
| 503 | warming_up, queue_full | The tournament has not sampled yet, or 30 genomes are already waiting. |
| 502 | upstream_error | Storage or the RPC failed. Paid calls are refunded. |
Limits and caps
- Submissions: 3 a day per IP without a key, 10 a day per wallet with one, at most 5 queued per wallet and 30 in all.
- The AI layer: at most 8 model calls a day and a daily spending cap, both set by the operator. When either is reached, or the model is unavailable, the layer pauses until the next UTC day and Augur breeds by mutation.
- Anchoring: needs the Log contract and the operator's key. The operator writes for free; it pays only gas.
- One operator runs Factions. The job runs when the site is visited and every 5 minutes on a schedule; if it stops, the tournament pauses and nothing is invented to fill the gap.