How it works

Write the rule. Prove the transition.

A transaction proposes a change to state, names the predicates that govern it, and carries a proof that they hold over that change. The validator checks the proof, and admits the change only if it holds. Your contract itself never executes anywhere on the chain.

The predicate

A statement in logic about a proposed change to state.

Written with the ordinary connectives and quantifiers, with equality and arithmetic comparison over the values involved. It evaluates to true or false over a transition, and that is the whole of it. No method table, no storage layout, no entry point, no execution order.

  • A payment predicate

    Says value is conserved.

  • An escrow predicate

    Says when funds may move, and to whom.

  • A compliance predicate

    Says what a transfer of the asset must satisfy.

What you do not write

Circuit performance, without authoring circuits.

Circuit languages get the same natural fit, because they have no machine in the middle either. The cost is where they put the author: you express the rule as a constraint system yourself, by hand, once per application. That is expert work, and a mistake in it is close to invisible, because an under-constrained circuit accepts what it should refuse and produces no behavior to observe.

zkFOL keeps the fit and moves the authoring up. You write the rule; the compiler produces the constraints. The trust moves off every application's hand-built circuit and onto one compiler with published semantics, reviewed once for all of them.

Every transaction

Three things travel together.

  • The statement

    Which state is consumed, which state is produced, and under which predicates.

  • The witness

    The inputs that make those predicates true. Signatures, amounts, the contents of a position.

  • The proof

    Evidence that such a witness exists and satisfies every governing predicate over exactly this transition.

Whoever proposes a transition produces its proof, on their own machine, before anything is submitted. Verification is the network's side of the bargain and it is the cheapest thing here: milliseconds, identical for everyone, light enough to run in a wallet or a light client.

Failure

A flawed transaction fails on your machine, not on the chain.

Elsewhere it runs anyway. It executes, burns the fee, and leaves whatever state its flaw produced for somebody else to unwind. Here the proof does not complete, on the author's own hardware, before the network has seen anything.

  • Reentrancy

    Nothing executes, so nothing can call out mid-execution and re-enter against a half-updated balance.

  • Compiler and opcode mismatches

    There is no bytecode. Compilation is a translation into constraints with published semantics, not a reinterpretation into instructions for a machine.

  • Proxy upgrades

    State is governed by the predicate attached to it. Moving to different rules is explicit and visible, never swapped in behind a constant address.

  • Out-of-gas half-states

    Nothing meters execution, so nothing stops partway and leaves the books in an intermediate state.

Spam inverts as well. Whoever writes an expensive rule pays to prove it themselves, so flooding the network mostly costs the flooder.

One relation, both directions

The rule that checks an answer can also find one.

A predicate is a relation rather than a procedure, so it runs either way round. The predicate that validates a finished sudoku grid also finds one: from seventeen clues, in roughly 160 milliseconds. Proving that a solution exists takes 16.

On an exchange that makes the quote a query. The sentence that validates a trade also answers what the trade returns, and there is only ever one sentence to maintain.

Research

What the claims rest on.

The translation from first-order logic into polynomials is published, reviewed work. It is also the reason zkFOL has a different cost structure from a zkVM rather than a better version of the same one.

eprint.iacr.org/2024/954

Arithmetisation of computation via polynomial semantics for first-order logic

A compositional translation from first-order logic into polynomials, connective by connective, with soundness and completeness treated directly. The validity of a formula becomes a checkable property of the polynomial it produces. There is still a compiler, and it does real work. It does not force the computation into a shape chosen for something else. Each connective has a polynomial form it maps onto, so the constraints land where the logic already sits. A zkVM instead arithmetizes the machine that runs your program, and every step of that interpreter enters the witness alongside your actual claim. zkFOL has no machine to arithmetize. That is the measured gap.

In the logicIn the polynomial
Truthzero
Falsitya strictly positive value
Conjunction, universal quantificationaddition
Disjunction, existential quantificationmultiplication

The soundness argument, the proving backend zkFOL emits to, and the complete reference list are in the documentation.