Documentation
Docs
Everything you need to read, train, spawn and build on polyps. The formulas here are the ones the contract runs.
Quick start
Reading needs nothing. Spawning needs a wallet on Robinhood Chain (chain id 4663) with a little ETH for gas and fuel.
- Connect. Press Connect and pick your wallet. The site asks it to switch to Robinhood Chain, or to add the network if it does not know it yet.
- Build a dataset. In the console's Workshop tab, pick a target market, a horizon (15, 30 or 60 minutes) and up to eight features. Pull the data, clean it, split it and note the fingerprint.
- Train. In the Train tab, train the network in your browser, then let it quantize to a genome. The Prove tab scores the genome on the held-out split against a coin flip and momentum.
- Spawn. Name the polyp (up to 32 bytes) and send
spawn(). Whatever you send above the spawn fee becomes its fuel. The polyp is minted to your wallet as an NFT. - Fuel. Keepers pulse fuelled polyps once per horizon, for a tip per pulse. Feed more fuel any time, drain what you do not need, or pulse it yourself with no tip.
Concepts
| Polyp | A tiny neural network that lives in the contract as an ERC-721 token. |
| Genome | The polyp's bytes: target market, horizon, features, int8 weights and shifts. |
| Pulse | One prediction: the contract reads the oracles, runs the network and stores the probability. |
| Settle | Scoring a pulse once its horizon has passed. Anyone can do it. |
| Void | A pulse that could not be scored because the oracle no longer reached its window. |
| Fuel and tip | ETH held by a polyp, and the part of it paid to whoever pulses the polyp. |
| Colony score | Average skill over every epoch since birth, so skipped epochs count as coin flips. |
The glossary has every term.
Genome v1
A genome is 19 to 138 bytes, big-endian. Its length is 10 + 5·nIn + nHid·nIn + 3·nHid.
| Offset | Field | Values |
|---|---|---|
| 0 | version | 1 |
| 1 | target market | market id, 0 ETH, 1 NVDA, 2 GOOGL, 3 SPCX, 4 NET, 5 AAPL, 6 QQQ, 7 TSLA |
| 2 | horizon code | 0: 15 min, 1: 30 min, 2: 60 min |
| 3 | nIn | 1 to 8 inputs |
| 4 | nHid | 1 to 8 hidden units |
| 5 | shift1 | 0 to 16, hidden layer shift |
| 6 | shift2 | 0 to 16, output shift |
| 7 | reserved | 0 |
| 8 + 5i | feature i | market u8, kind u8 (0 MOM, 1 DEV), window code u8 (0: 5 min, 1: 15, 2: 30, 3: 60), div u16 (1 to 65535) |
| then | W1 | nHid × nIn int8, row-major per hidden unit |
| then | b1 | nHid int16 |
| then | W2 | nHid int8 |
| last 2 | b2 | int16 |
The contract validates every field at spawn and exposes the same check as checkGenome(bytes). The reference implementation is js/engine.js (encodeGenome, decodeGenome, checkGenome).
Features
Features are tick differences of time-weighted averages from each market's Uniswap V3 pool against USDG. A tick is about 0.01%. Signs are oriented so that positive means the asset rose.
twap(m, a, b) = floor((tc(b) - tc(a)) / (a - b)), sign flipped after the floor for token1 assets MOM(m, w) = twap(m, w, 0) - twap(m, 2w, w) DEV(m, w) = twap(m, 60, 0) - twap(m, w, 0)
Windows are 5, 15, 30 or 60 minutes. A feature reads at most 2 hours back. The eight markets:
| Id | Market | Asset |
|---|---|---|
| 0 | ETH | Ether |
| 1 | NVDA | NVIDIA |
| 2 | GOOGL | Alphabet |
| 3 | SPCX | SpaceX |
| 4 | NET | Cloudflare |
| 5 | AAPL | Apple |
| 6 | QQQ | Invesco QQQ |
| 7 | TSLA | Tesla |
More detail, including how far back each oracle reaches: Features from Uniswap oracles.
Inference
x_i = clamp(trunc(raw_i × 127 / div_i), -127, 127) a_j = b1_j + Σ_i W1[j][i] × x_i h_j = a_j ≤ 0 ? 0 : min(a_j >> shift1, 127) o = b2 + Σ_j W2[j] × h_j z = clamp(o >> shift2, -128, 128) p = SIGMOID_BPS[z + 128] basis points, 3 to 9997
Division truncates toward zero; the shifts floor. The table is round(10000 / (1 + e^(-(k - 128) / 16))) for k from 0 to 256. The contract matches js/engine.js bit for bit. Why it is built this way: Integer inference on chain.
Scoring
ref = twap(target, 300, 0) at the pulse, time t end = twap over [t + H - 300, t + H] at settle time move = end - ref y = move > 0 ? 10000 : move < 0 ? 0 : 5000 brier = (p - y)² 25,000,000 is a coin flip skill = 1 - brier / 25,000,000 hit = (p > 5000 and move > 0) or (p < 5000 and move < 0)
A pulse is voided when the oracle cannot answer for its end window. The colony score averages skill over every epoch since birth:
epochs = max(1, floor((now - born) / horizon), pulses) score = (pulses - brierSum / 25,000,000) / epochs
Skipped and voided epochs add zero, the same as a coin flip. More: Records that cannot be cherry-picked.
Contract
One contract on Robinhood Chain: an ERC-721 named Neuropolypse Polyp (symbol POLYP) with two-step ownership. It cannot be upgraded. Polyp ids start at 1 and nothing is ever burned. This site never prints contract addresses; your wallet shows the contract you are calling before you confirm.
For everyone
spawn(bytes genome, bytes32 name, bytes32 datasetHash) payable- Validates the genome and mints a polyp to you. msg.value must cover the spawn fee; the rest becomes fuel.
feed(uint256 id) payable- Adds fuel to any polyp. Anyone can feed.
drain(uint256 id, uint256 amount, address to)- Owner or approved address withdraws fuel. Works while paused.
pulse(uint256 id)- Reads the oracles and stores a prediction. The owner or an approved address pulses for free; anyone else needs fuel ≥ tip and earns the tip from the polyp's fuel.
settle(uint256 id)- Scores the open pulse once its horizon has passed, or voids it. Anyone, no tip.
cycle(uint256[] ids)- For up to 40 ids: settle if due, then pulse if allowed. Skips ids that can do neither.
claimTips()- Pays out the tips the caller earned from pulses.
Views
predict(uint256 id) returns (uint16 p, int256[] raw)- The live prediction at the current block. Reverts
OracleUnavailablewhen an oracle cannot answer. Calling it from a contract? See the gas note below. features(uint256 id) returns (int256[] raw)- The live raw features.
polyp(uint256 id)- The record: born, horizon, market, fuel, open pulse, pulses, hits, voids, brierSum, last call, name, datasetHash.
genomeOf(uint256 id)- The genome bytes.
due(uint256 id) returns (bool settleDue, bool pulseReady)- What a keeper could do with this polyp right now.
checkGenome(bytes genome) returns (bool ok, string reason)- The spawn validation, without spending gas.
tokenURI(uint256 id)- On-chain JSON and SVG art of the weights. No external files.
marketCount(), market(uint256 id), totalSupply(), tip(), spawnFee(), paused(), tips(address), feesAccrued()- Contract-wide values.
Owner only
setTip(uint96)- Keeper tip per pulse, at most 0.001 ETH. Starts at 0.00002 ETH.
setSpawnFee(uint96)- Spawn fee, at most 0.01 ETH. Starts at 0.
setPaused(bool)- Blocks spawn and pulse only. Settle, drain, feed and claims keep working.
addMarket(...), setMarketActive(uint8, bool)- Add a market or switch one off for new pulses. Settling still works.
withdrawFees(address)- Withdraws accrued spawn fees only. Never fuel, never tips.
transferOwnership(address), acceptOwnership()- Two-step handover: the new owner has to accept.
renounceOwnership()- Gives up the owner role for good. Refused with
RenounceBlocked()while paused, while the spawn fee is not 0 or while fees wait to be withdrawn, so nothing can be frozen or stranded.
Calling predict from a contract
Each oracle read checks that it has a fixed gas budget before it runs: 40,000 gas plus 80,000 per time point, for every market the genome reads. If the caller forwards less, the call reverts OutOfGas instead of returning a made-up value. A contract that calls predict(id) or features(id) must forward that budget on top of what the reads use, so size the call with eth_estimateGas and leave headroom. The same rule protects pulse and settle: no gas limit can fake a broken oracle.
budget per market = 40,000 + 80,000 × points points = distinct seconds-ago values that market needs (at most 8)
Events and errors
Events: Spawned, Fed, Drained, Pulsed (caller, p, ref and the raw features), Settled (p, move, brier), Voided, TipsClaimed, plus an event for every owner change.
Errors you may meet: BadGenome(reason), FeeTooLow, IsPaused, PulseOpen, LowFuel, MarketInactive, OracleUnavailable, NoOpenPulse, NotDue, NotAuthorized, AmountTooHigh, NothingSent, TooMany, OutOfGas, FuelOverflow, ZeroAddress, TransferFailed and ERC721NonexistentToken(id). Owner calls can also meet CapExceeded, BadMarket and RenounceBlocked. The console turns every error a user can meet into a plain sentence.
Keeper and fuel
Nothing depends on a keeper: pulse and settle are open to anyone. Ours runs every five minutes and does two things:
- Settles every due open pulse, fuelled or not, so no pulse goes void for want of a reader.
- Calls
cyclefor fuelled polyps that are ready, in batches, paying itself the tip for each pulse it makes.
A polyp holds one open pulse at a time, so it pulses at most once per horizon. At the starting tip of 0.00002 ETH:
| Horizon | Pulses a day, at most | Tips a day | 0.01 ETH lasts |
|---|---|---|---|
| 15 min | 96 | 0.00192 ETH | about 5 days |
| 30 min | 48 | 0.00096 ETH | about 10 days |
| 60 min | 24 | 0.00048 ETH | about 21 days |
With a five minute cron the real cadence is a little slower, so fuel lasts a little longer. Run your own keeper by reading due(id) for each polyp and sending cycle(ids); tips accrue to you and claimTips() pays them out. Live numbers and a calculator: Pricing.
API
Read-only JSON over HTTPS on this domain. No key. Before the contract is deployed, the polyp routes answer { "deployed": false }.
| Route | Returns | Cache |
|---|---|---|
GET /api/colony | Every polyp with record, colony score, model shape and genome, best first, plus tip and spawn fee. | 30 s |
GET /api/polyp?id=1 | One polyp: record, decoded genome, due flags, live prediction and recent pulses (limit up to 100). | 15 s |
GET /api/series?market=0&day=2026-10-02 | Per-minute tick-second sums, last tick, activity and exact flags for one market. Or from and to in unix seconds, minute aligned, up to 7 days. For busy markets (ETH) older than their oracle ring, ask a few hours per request. | Closed days a year, today 60 s |
POST /api/rpc | A read-only JSON-RPC proxy to Robinhood Chain for browsers. Write methods are refused; batches up to 5. | None |
POST /api/mcp | The MCP server, below. | None |
curl -s https://neuropolypse.ai/api/colony
Errors come back as { "ok": false, "error": "..." } with status 400 for bad parameters, 404 for an unknown polyp, 502 when the chain did not answer and 504 when a series range needs more swap history than one request can rebuild. Errors are never cached.
MCP
A stateless MCP server at https://neuropolypse.ai/api/mcp: Streamable HTTP with JSON responses, no sessions and no key. Protocol versions 2025-06-18 and 2025-03-26.
{
"mcpServers": {
"neuropolypse": {
"type": "http",
"url": "https://neuropolypse.ai/api/mcp"
}
}
}| Tool | Arguments | Returns |
|---|---|---|
list_markets | none | Markets with orientation and oracle reach in hours. |
list_polyps | market, sort (score, pulses, newest), limit | The colony with records and colony scores. |
get_polyp | id, pulses | Record, decoded genome, live prediction, recent pulses. |
predict | id or genome (hex) | Probability in bps from the contract, or from the engine for any genome. |
market_series | market, hours or from/to or day, format | Minute TWAP ticks with exact flags, up to 7 days. |
Every tool is read only. A tool that runs but cannot answer, for example before deployment, returns a normal result with isError: true and a sentence explaining why. More on the MCP page.
FAQ
Do I need an account?
No. There are no accounts. Reading is open to everyone, and writing only needs a wallet.
Which wallets work?
Any browser wallet that announces itself (EIP-6963) and can add a custom network. The site adds Robinhood Chain for you.
Can I train on my own data?
Polyps read only the on-chain markets, so training data has to come from the same oracles. The Workshop builds it for you, and you can export the CSV.
Why did my pulse revert?
Common reasons: a pulse is already open (PulseOpen), the polyp lacks fuel for a non-owner caller (LowFuel), a market it reads is inactive or its oracle is too short right now, or the contract is paused.
Can I change a polyp's weights after spawning?
No. A genome is fixed for life, which is what makes the record mean something. Spawn a new polyp instead.
Is this financial advice?
No. Polyps are experimental models with public records. Read the terms.