THE LAB · NO WALLET NEEDED

Don't trust the card.
Read the gates.

Every verdict in this game is produced by NAND gates. Here you can flip the switches yourself, watch the truth table, and then check the same inputs against the live contract.

1 · A NAND gate is the whole universe

NAND outputs 0 only when both inputs are 1. Everything else — adders, comparators, the twelve rules — is built from this one gate.

Interactive gate

A
B
NAND(A,B) = 0
only 1 AND 1 gives 0
ABNAND

Why this matters

A rule written as text can be argued with. A rule written as gates can only be evaluated. The card you pull is a netlist: a list of 7-byte gates, each pointing at two earlier signals.

// one gate = 7 bytes
00 000005 000005 // NAND(sig5, sig5) = NOT
00 000003 000006 // …and so on

Signal 0 = constant 0, signal 1 = constant 1, signals 2…n+1 = inputs, then one signal per gate.

2 · Simulate the Stop-Loss Kaling

The real netlist is 36 gates. Its rule: allow = (amount ≤ left) OR human, ask = (amount > left) AND NOT human. Move the sliders.

Payment facts

$120
$80
no
DENYdaily cap exceeded

What the chain sees

// the contract packs facts into one input word
word = 2 | (within ? 2 : 1) << 3 | human << 6

// then asks the circuit, not a server
(ok, ret) = processor.staticcall(
  abi.encodeWithSelector(eval, circuitId, bytes)
)
// eval reverts → fail-closed → payment refused

No oracle. No backend. The answer is recomputable by anyone holding the circuit id.

3 · Ten payments, one night

These are the scenarios the on-chain guard is tested against. Same inputs, same verdicts — every run.

#ScenarioRule that firesVerdict
01Vendor invoice, $12daily capPASS
02Same invoice twicedaily capDENY
03Impostor, one letter offallowlistDENY
04Urgent refund, 10×high limitASK HUMAN
05Owner approves ithigh limitPASS
06Two payments, 10s apartcooldownDENY
07Fraud already detectedlockdownDENY
08$40 with one approvaldual signASK HUMAN
09$40 with two approvalsdual signPASS
10Payment outside the windowdelegationDENY

4 · Verify it yourself

You don't need to trust this page. Read the contract on BscScan, or call it from any wallet.

// 1. what rule is this agent wearing?
equippedRule(agent) → (cardId, ruleType, p1, p2)

// 2. recompute any payment
checkPayment(agent, amountCents, payee, spentToday, txCount, lastAt,
            humanApproved, approvals, tripped) → (ok, reason)

// 3. ask the circuit directly (free view)
processor.eval(circuitId, inputBytes) → verdict byte

If the processor is down, the contract returns false. Not "maybe". The gate stays shut.

Open the live app →