overview
moire produces a seal for a deployed smart contract without publishing its source. A seal is a small onchain record that binds two kinds of evidence to the contract's runtime bytecode hash:
- proof layer — eight deterministic checks with yes/no answers that anyone can re-derive from the bytecode;
- agent layer — one written review by an AI auditor agent that reads the source in isolation and signs its output as an opinion.
The two layers are kept separate on purpose. A reader always knows which part is proof and which part is judgement, and the seal never collapses them into a single green tick.
pipeline
Every review runs the same six stages. Each stage writes a log entry; only the last one touches the chain.
- intake — a read-only grant on one repository at one commit hash, plus the deployed contract address.
- build — the repo is compiled in a sealed container with the exact compiler version and settings from its config.
- match — the compiled runtime bytecode is compared to the bytecode at the deployed address (see bytecode matching).
- checks — the eight fixed checks run against the matched bytecode and a forked chain state.
- review — the source tree is sent once to the auditor agent over a zero-retention route; the agent returns a structured review.
- seal — the working copy is destroyed, the results are signed and the seal is written to the registry on Robinhood Chain.
repo@commit ─▶ build ─▶ match ─▶ 8 checks ─┐
├─▶ sign ─▶ registry (Robinhood Chain)
source ─▶ agent (ZDR) ─▶ review┘
source ─▶ deleted
bytecode matching
A review is only meaningful if it describes the code that is actually deployed. moire compiles the submitted commit and compares the result to the onchain runtime bytecode byte for byte, after stripping the metadata hash that compilers append.
- exact match — review continues.
- immutable values differ — allowed; positions of
immutablevariables are masked before comparison. - any other difference — the review stops and no seal is written.
The seal records keccak256(runtime bytecode). Because it binds to the code hash and not the address, the same seal applies to every deployment of identical bytecode.
the eight checks
Each check is a fixed rule evaluated on bytecode plus a forked simulation. The rules are public and identical for every contract.
| id | check | passes when | method |
|---|---|---|---|
| mint | no hidden mint | total supply can only increase through functions declared in the token interface | static path analysis on SSTORE to supply slot |
| drain | no owner drain | no function moves balances of an address other than msg.sender or an approved spender | static + fork call with privileged keys |
| tax | tax under the cap | any transfer fee is fixed or has a hard upper bound of 10% | bound search on fee variables |
| list | no blacklist | no function can make transfers from a specific address revert | static analysis of revert conditions keyed on addresses |
| pause | no transfer pause | transfers cannot be disabled globally after trading opens | static + fork toggle test |
| proxy | not upgradeable | no DELEGATECALL to an address that can change after deploy | opcode scan + storage slot analysis (EIP-1967 and custom) |
| sell | sell path clears | a buy followed by a sell from a fresh address succeeds on a fork of current state | fork simulation against the main pool |
| kill | no self-destruct | the code cannot be removed or replaced | opcode scan for SELFDESTRUCT and reachable CREATE2 redeploy |
Checks are answered pass, fail or n/a (for example, tax on a contract with no fee logic). At launch the answers are signed by the reviewer key; proving them inside a zkVM is on the roadmap, and the seal states which method produced them.
agent layer
The agent layer answers questions the fixed checks cannot: what the contract is for, who holds which powers, and whether anything looks deliberately misleading — a helper named like routine upkeep that mints, a fee recipient that can be swapped, an owner function with an unusual side effect.
what the agent returns
- a plain-language summary of what the contract does;
- a list of privileged roles and what each can change;
- flagged patterns with a short reason, written without quoting code;
- a risk score from 0 to 100 (see risk score).
rules the agent works under
- It never quotes a line of source. Output is filtered for code fragments before signing.
- It sees one repository at one commit and nothing else.
- Its output is labelled
opinionin the seal and is never merged into the eight answers. - The model identifier is recorded in the seal so readers know what wrote the review.
privacy model
The point of moire is that a contract can be checked without its source becoming public. The design limits who touches the source and for how long.
| data | who sees it | how long |
|---|---|---|
| source tree | the build container and the auditor agent | one review; deleted before the seal is signed |
| agent prompt | the model, over a zero data retention route | not stored by the route |
| repo name, history | nobody outside the build container | never recorded |
| commit hash | public, in the seal | permanent |
| check answers, review | public, in the seal | permanent |
No account is required to read seals. Requesting a review needs contact details for the access queue; those are used only to contact you about your request.
seal format
A seal is one record in the registry contract, keyed by code hash.
struct Seal {
bytes32 codehash; // keccak256 of runtime bytecode
bytes20 commit; // git commit the review compiled
uint8 checks; // bitmask: 8 checks ran
uint8 passed; // bitmask: which passed
uint8 score; // agent risk score 0–100
bytes32 reviewHash; // hash of the signed review text
address reviewer; // signing key
uint64 sealedAt; // block timestamp
uint8 method; // 0 = signed, 1 = zk-proven
}
The full review text is stored off-chain at a content address matching reviewHash, so anyone can verify it was not edited after sealing.
reading seals
Wallets, launchpads and trading agents read seals with one call. No source, no report parsing.
// onchain
registry.sealOf(codehash) → Seal
// http (planned)
GET /v1/seal/{codehash}
{
"passed": ["mint","drain","list","pause","proxy","kill"],
"failed": ["tax","sell"],
"score": 46,
"reviewer": "0x…",
"method": "signed"
}
An integrator should show the failed checks first and the score second. A high score with no failed checks means the agent found something the fixed checks do not cover; read the review.
risk score
The agent's score is an opinion on a 0–100 scale. It is calibrated against a labelled set of known-good and known-malicious contracts and reported in bands:
| band | score | typical meaning |
|---|---|---|
| low | 0–30 | standard patterns, few or no privileged powers |
| medium | 31–60 | owner powers that can change economics, such as an unbounded fee |
| high | 61–100 | powers that can block selling, mint supply or move user funds |
limits
- The checks cover eight specific failure modes. Economic attacks, oracle manipulation and off-chain admin keys are out of scope.
- A seal describes code at one moment. It says nothing about who controls privileged keys later.
- The agent can be wrong. That is why its output is labelled as opinion and kept apart from the proof layer.
- Contracts whose source cannot be compiled to match the deployed bytecode cannot be sealed.
token & access
Reviews cost real compute: a build, a fork simulation and an agent pass each. Access is queued, and $MOIRE sets the order.
- open queue — anyone can request access with the form.
- holder priority — requests linked to a wallet holding the token are reviewed ahead of the open queue.
- builder tier — larger holders get the front of the queue, more reviews per month and early access to new checks.
Link a wallet when you request access. Priority is read from the wallet's balance at review time, once the token is live. Thresholds for each tier are published here before launch.
glossary
| codehash | keccak256 of a contract's runtime bytecode; the key a seal is stored under |
| ZDR | zero data retention; a model route that does not store prompts or outputs |
| fork | a local copy of chain state used to simulate transactions without sending them |
| proof layer | the eight deterministic checks |
| agent layer | the AI auditor's signed written review |
| registry | the contract on Robinhood Chain that stores seals |