Walkthrough

Eleven steps against the real gate on Whitechain Sepolia, with every decision written to a Hedera topic. Nothing here is mocked: each step is a transaction you can open.

IN THE VAULT
— USDT
RESERVED
— USDT
FREE
— USDT
WHAT IS BEING BOUGHT

Physical goods: the textbook three-way match. The contract only multiplies a quantity by a unit price, so the control is identical either way. This sets the next order raised in step 1.

THE THREE PEOPLE

Nobody has verified yet. The control separates three different humans, so the flow needs three. Verify with World ID.

Each person is a stable identifier: the World ID nullifier from one enrolment. Only verified people appear here. Verify another person to add one. Try the same person in two roles and see what the contract says.

Set up the order

01

Raise a purchase order

The creator orders 2 monitors at 1.00 USDT each with a 5% price tolerance. The contract reserves 2.10 USDT out of the vault before anything is delivered, so the vendor can see the money is set aside. The reservation covers the tolerance ceiling, not just the headline total, because an invoice at 1.05 is allowed and has to be payable.

02

Sign for the delivery

A second person confirms both monitors arrived. The contract refuses a receiver who is the person who raised the order, so a buyer cannot vouch for its own deliveries.

Needs a purchase order from step 1.

Attacks the gate refuses

03

A prompt-injected agent

A vendor email says the bank details changed and tells the agent to pay a new address. The agent is deliberately gullible, with no allowlist and no spending cap. It believes the email and asks the gate to pay. There is no purchase order behind the request, so nothing moves.

04

Real vendor, wrong destination

An invoice genuinely signed by the vendor key, but with the payee changed. The signature is good. The destination is not the one on the purchase order.

Needs a purchase order from step 1.

05

A forged invoice

Signed by someone who is not the vendor and pointed at that other address. The gate reports every rule that failed, not only the first.

Needs a purchase order from step 1.

An invoice that matches

06

Pay a matching invoice

One of the two monitors, at the agreed price, signed by the vendor key and paid to the address on the order. It settles in USDT in a single transaction.

Needs a purchase order from step 1.

07

Send it again

The identical invoice, a second time. The contract recorded its hash the first time, so a replay is refused and nothing is paid twice.

Needs a purchase order from step 1.

Exceptions need a second human

08

An invoice that is over price

The vendor bills the second monitor at 1.20 instead of 1.00, past the 5% tolerance. A soft failure parks the invoice as a hold instead of refusing it. The money stays reserved while a person decides.

Needs a purchase order from step 1.

09

The wrong people try to approve

The person who raised the order and the person who signed for the delivery each try to release the hold. The contract refuses both, and the refused transactions stay on the explorer: the protected action did not happen, and anyone can check. A third attempt comes from someone who has not verified with World ID. The attestor will not vouch for them, so no attestation exists and no transaction is sent at all.

Needs a held invoice from the over-price step.

10

A third person approves

The approver is neither of them, so the release goes through. If the invoice costs more than what is still reserved, the order is amended by the difference, drawn from unreserved balance only and recorded in the event. An override can never spend another order's money.

Needs a held invoice from the over-price step.

Check the record

11

Replay the journal

Pull every entry from the Hedera topic, recompute each decision's digest from the Whitechain logs with the same engine the contract mirrors, and compare. The same check runs from the command line with no credentials and no help from us.

Cancels open orders and has the vendor return what it was paid, so the walkthrough can run again. The contract has no withdraw function, so this is the only way funds go back.