Skip to content
Trust and security

Audits and verification

How Nimbus's code is proved, tested and audited, from machine-checked proofs and automated security tooling to repeated AI audits and this week's external audits.

Nimbus's most critical code is proved correct by machine, tested automatically and audited repeatedly, not only reviewed by hand.

Our approach

Three kinds of assurance complement each other. Mathematical proofs establish that a property holds for every input to the system they model. Automated testing runs the real code and the real circuits against inputs no person would think to try. Audits, by AI models and by external firms, look for the problems neither of the others was set up to find.

Formal proofs

Over 1,500 machine-checked theorems in Lean 4 cover the parts of the protocol that guard value:

  • The circuits. For the transaction and escape-hatch circuits, the proofs show that no transaction can create value, withdraw more than it funds, or skip its fees, and that an escape pays out only against one real, unspent note.
  • Double-spend protection. The staging buffer and filter that keep a nullifier from being spent twice, and the note tree.
  • The batched proof check. The single pairing that checks both proofs and the attester signature of a transaction together.
  • Governance. The timelock's rules for authorities, delays, expiry and cancellation.
  • The verifiers. The on-chain checks for enclave attestations and signatures.

Formal verification explains what each proof establishes and what it assumes.

Internal AI audits

The current version of the protocol has been audited internally, repeatedly, with frontier AI models, including Codex Daybreak and Anthropic's Claude models. The audits are run back to back and across model providers, so one model's blind spots are checked by another's. Each run reviews the programs, circuits, enclave services and SDKs afresh, and the findings feed back into the code.

Automated testing

Wherever a tool applies, the code is also checked by automated security tooling. Every production circuit and the major parts of every program are covered.

Constraint checks on the circuits

Every production circuit, for Solana and for Robinhood Chain, is checked on what it actually compiles to, rather than on a model of it. They complement the Lean models by working directly on the compiled constraints.

Picus, Veridise's under-constraint checker, uses an SMT solver to test whether a circuit's outputs are fixed by its inputs. An under-constrained circuit would let a prover choose an output freely, which is the most common way a circuit becomes unsound.

The Circom inspector reports any signal that appears in no constraint, which a prover could likewise set to anything.

Mutation testing deletes or weakens one soundness-carrying constraint at a time, such as a range check, a nullifier derivation or a root binding, and confirms that the test suite then fails. A deletion no test notices would mean the suite does not cover that constraint.

Model checking

Kani, a model checker for Rust, runs the real code on every input up to a stated size and checks that its assertions hold for all of them. It covers the double-spend bookkeeping, the note tree, the pool's lamport accounting, where a payout must keep the reserve and conserve lamports, and the arithmetic of the on-chain signature verifier.

Fuzzing and property-based testing

Fuzzing feeds large volumes of generated input to the governance timelock, the guardian node registry, the enclave attestation checks, the signature verifiers, the note tree and the gateway, looking for any input that crashes them or breaks an assertion. Property-based tests state a rule, such as "a staged key is always found", and check it against generated inputs, across the programs' state, the proof and signature verifiers, the zone registry, the uUSDv wrapper, the fee enclave and the off-chain services.

Program simulation

Every Solana program is tested by running its instructions against the compiled program: in LiteSVM, a local simulation of the Solana runtime, or, for the user registry, on a local validator. Signature checks are enforced throughout, so a test that an instruction must be signed checks the signature for real.

The Robinhood Chain contracts

The Solidity contracts are tested with Foundry's fuzz and invariant testing. The invariant suites drive random sequences of calls and check, after each one, that fee limits, the guardian committee, outflow limits, deposits and user registrations stay consistent.

Dependencies

cargo-deny checks every Rust dependency against the RustSec security advisory database, an allowed list of licences, a list of banned packages and the sources packages may come from.

External audits

This week, Accretion and zkSecurity are carrying out AI-assisted audits of the protocol. Their reports will be listed here once they are delivered.

Assumptions

The circuit proofs work on Lean models of the circuits, and that each model matches its compiled circuit is assumed, supported by the compiled-circuit checks above. The off-chain services are assured by testing and audits, and the cryptographic primitives are standard assumptions. Trust assumptions sets out what the protocol relies on.

Last updated

On this page