zerokn0wledge

ZK-verifiable matching for private CLOBs, with Hibachi as example

Post318 words

ZK proofs let an operator match orders off-chain at low latency while proving rule-following. Hibachi posts encrypted state to Celestia and proves its CLOB with SP1, keeping positions private yet verifiable.

Key claims
Proof can enforce price-crossing, priority rules and correct balance updates
Hibachi uses SP1 and Celestia DA
ZK-verifiable matching is a way to run a fast, private orderbook while still giving users a cryptographic guarantee that the matching engine followed the rules. The problem it solves is simple: a CLOB needs an operator (or a small set of operators) to match orders quickly, but that operator can also cheat (reorder, skip, or selectively fill). ZK changes the trust model: the operator can stay fast, but canโ€™t finalize an update unless they prove it was computed correctly. ๐—›๐—ผ๐˜„ ๐—ถ๐˜ ๐˜„๐—ผ๐—ฟ๐—ธ๐˜€ (๐—ฐ๐—ผ๐—ป๐—ฐ๐—ฒ๐—ฝ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜†) โžค Orders are collected and matched off-chain (so you can get low-latency execution). โžค Instead of publishing the full order flow, the system publishes: - ๐˜ข ๐˜ค๐˜ฐ๐˜ฎ๐˜ฎ๐˜ช๐˜ต๐˜ฎ๐˜ฆ๐˜ฏ๐˜ต ๐˜ต๐˜ฐ ๐˜ต๐˜ฉ๐˜ฆ ๐˜ฃ๐˜ข๐˜ต๐˜ค๐˜ฉ / ๐˜ด๐˜ต๐˜ข๐˜ต๐˜ฆ ๐˜ต๐˜ณ๐˜ข๐˜ฏ๐˜ด๐˜ช๐˜ต๐˜ช๐˜ฐ๐˜ฏ (๐˜ฐ๐˜ง๐˜ต๐˜ฆ๐˜ฏ ๐˜ข ๐˜ด๐˜ต๐˜ข๐˜ต๐˜ฆ ๐˜ณ๐˜ฐ๐˜ฐ๐˜ต) - ๐˜ข ๐˜ป๐˜ฌ-๐˜ฑ๐˜ณ๐˜ฐ๐˜ฐ๐˜ง ๐˜ต๐˜ฉ๐˜ข๐˜ต ๐˜ต๐˜ฉ๐˜ฆ ๐˜ฎ๐˜ข๐˜ต๐˜ค๐˜ฉ๐˜ช๐˜ฏ๐˜จ + ๐˜ณ๐˜ช๐˜ด๐˜ฌ ๐˜ค๐˜ฉ๐˜ฆ๐˜ค๐˜ฌ๐˜ด + ๐˜ฃ๐˜ข๐˜ญ๐˜ข๐˜ฏ๐˜ค๐˜ฆ ๐˜ถ๐˜ฑ๐˜ฅ๐˜ข๐˜ต๐˜ฆ๐˜ด ๐˜ธ๐˜ฆ๐˜ณ๐˜ฆ ๐˜ฅ๐˜ฐ๐˜ฏ๐˜ฆ ๐˜ข๐˜ค๐˜ค๐˜ฐ๐˜ณ๐˜ฅ๐˜ช๐˜ฏ๐˜จ ๐˜ต๐˜ฐ ๐˜ต๐˜ฉ๐˜ฆ ๐˜ฑ๐˜ณ๐˜ฐ๐˜ต๐˜ฐ๐˜ค๐˜ฐ๐˜ญ ๐˜ณ๐˜ถ๐˜ญ๐˜ฆ๐˜ด, - ๐˜ฆ๐˜ฏ๐˜ฐ๐˜ถ๐˜จ๐˜ฉ ๐˜ฅ๐˜ข๐˜ต๐˜ข ๐˜ข๐˜ท๐˜ข๐˜ช๐˜ญ๐˜ข๐˜ฃ๐˜ช๐˜ญ๐˜ช๐˜ต๐˜บ ๐˜ด๐˜ฐ ๐˜ถ๐˜ด๐˜ฆ๐˜ณ๐˜ด ๐˜ค๐˜ข๐˜ฏ ๐˜ด๐˜ต๐˜ช๐˜ญ๐˜ญ ๐˜ฆ๐˜น๐˜ช๐˜ต ๐˜ฆ๐˜ท๐˜ฆ๐˜ฏ ๐˜ช๐˜ง ๐˜ต๐˜ฉ๐˜ฆ ๐˜ฐ๐˜ฑ๐˜ฆ๐˜ณ๐˜ข๐˜ต๐˜ฐ๐˜ณ ๐˜ฅ๐˜ช๐˜ด๐˜ข๐˜ฑ๐˜ฑ๐˜ฆ๐˜ข๐˜ณ๐˜ด. That โ€œenough data availabilityโ€ is where @hibachi_xyzโ€™s design choice is interesting: Hibachi is running a high-performance CLOB and posting encrypted state / trade data to @Celestia (so strategies and positions arenโ€™t public), while still publishing proofs so updates remain verifiable, using SP1 (Succinctโ€™s zkVM) to prove the CLOB. ๐—•๐˜‚๐˜ ๐˜„๐—ต๐—ฎ๐˜ โ€œ๐—บ๐—ฎ๐˜๐—ฐ๐—ต๐—ถ๐—ป๐—ด ๐˜„๐—ฎ๐˜€ ๐—ฐ๐—ผ๐—ฟ๐—ฟ๐—ฒ๐—ฐ๐˜โ€ ๐—บ๐—ฒ๐—ฎ๐—ป๐˜€ ๐—ถ๐—ป ๐—ฝ๐—ฟ๐—ผ๐—ผ๐—ณ ๐˜๐—ฒ๐—ฟ๐—บ๐˜€? A zk-proof can enforce the same invariants youโ€™d normally rely on an exchange operator to follow, for example: โžค Orders were matched only when prices cross (no impossible fills). โžค The fill sequence respected the venueโ€™s priority rule (e.g., price-time priority, or whatever the venue specifies). โžค Balances/margins were updated correctly (no hidden balance edits). โžค Resulting state root is exactly what you get by applying the rules to the previous state root + the batch. You can keep the contents private (orders, sizes, positions) by encrypting whatโ€™s published to the DA layer, while the proof convinces everyone that the encrypted update is still a valid state transition.

1 image on X

Open on X
zerokn0wledge avatar
Working together

Research, advisory and builds for deep-tech teams.