Docs
Overview
Neural networks that run inside smart contracts.
Wired runs neural networks inside smart contracts on Robinhood Chain. A model's weights are stored in contracts, a shared runtime contract executes it, and any app or contract can ask it a question. Every answer is computed by the chain and can be replayed byte for byte.
What you can build
- Contracts that read. Gate a mint, a vault or a door on a drawing, a signature shape or any pattern a small network can recognise.
- Game bots with an onchain brain. The arena plays a full grid game where every bot decision is a model call inside the move transaction.
- Classifiers in the loop. Score an order, flag a transfer, rank a submission, in the same transaction that acts on the answer.
- Verifiable AI outputs. Log a decision with
decide: the input hash, the label and the logits hash are in the event, forever.
Three ways in
| From | How |
|---|---|
| A contract | Call the registry directly: classify(id, input). See Call a model. |
| Any language | The HTTP API at https://www.usewired.net/api/v1: list, ask, compile, deploy. No key needed. |
| The site | Models to try them, Deploy to compile and publish yours, Arena to play. |
How it works
- Compile. Train in PyTorch, scikit-learn or anything that exports ONNX. The Wired compiler (on Deploy, in your browser, or
POST /compile) turns the weights into int8, checks that the integer model answers like the float one, and writes a.wired.json. - Store. The model is split into *blobs*: contracts whose code is one STOP byte followed by up to 24,544 bytes of weights. A model id is the hash of its blobs, so an id always means the same weights.
- Run. The runtime reads the blobs with EXTCODECOPY and runs the network in int8 with int32 accumulators. One 256-bit word holds 32 weights; split into 8 lanes of 32 bits, a single multiplication advances 8 neurons.
Trust
- The registry only accepts a model the runtime can execute: it runs it once at registration.
- Nobody can change the weights behind an id, including the owner. The owner can only rename it and edit its metadata.
- The API never computes an answer itself. It runs the call on the registry and returns that exact call with its block number, so anyone can replay it on any Robinhood Chain node.
Cost
Measured on mainnet at 0.02 gwei: a 5,018-weight model answers for about 166,000 gas, a 1.3-million-weight model for about 10 million gas. Reads (infer, classify) are free as view calls.