§ 01 / Architecture
Verify. Execute. Record.
The decision comes in. The hook verifies. Your signer executes through the entry point. The evidence hook records.
fig.02 / the client's accountverify-only hook · entry point · evidence
Swipe to pan the figure →
§ 02 / Modules
Three modules. Your keys.
MODULE · 01
Validator
The verify-only hook: an ERC-7579 validator. Registered key, pinned policyCommit, planHash, validity, single use. It verifies. It never decides.
MODULE · 02
Executor
Runs the signed plan unchanged, as one batch, through your ERC-4337 entry point, under your signer. OnTrade never holds a key.
MODULE · 03
Evidence hook
One EvidenceEmitted event per leg, binding the policy, the plan and the decision to the transaction. Evidence, never a check.
§ 03 / Refused by the Gate
Every way around it, refused.
A decision is not a permission slip. It cannot be copied, kept or edited.
A reused decisionREFUSED
A decision can be used once.
A decision past its timeREFUSED
A decision is valid for a limited time.
An altered planREFUSED
The decision is signed over one planHash: exactly these legs and amounts.
An unregistered keyREFUSED
Only a key in the policyCommit registry is accepted.
A missing co-signatureREFUSED
Without the second signature your mandate names, the decision is incomplete.
verification · pseudocodehook.verify
01// verify-only hook · the client's account · before the entry point02require( decider.key ∈ registry[policyCommit] )03require( decision.policyCommit == account.pinned )04require( decision.planHash == batch.planHash )05require( decision.callsRoot == merkleRoot( calls ) )06require( now ≤ decision.validUntil )07require( !used[decision.id] ) ; used[decision.id] = true08require( quorum.satisfied( decision.receipt ) )09// then, and only then: the client's signer executes the calls10// after execution · the evidence hook records, it never checks · one event per leg11emit EvidenceEmitted( planHash, decisionId, callsRoot, policyCommit, txHash, ts )
KEY PROPERTY
OnTrade never holds the key and never sends the transaction.
§ / The Pilot
Compile three mandates. Prove every decision. Sixteen weeks.
Your mandates compiled and signed. Every decision proven on a mirrored book. A record your depositary can rely on. Then a licence on assets under policy.