Previously, in Native Zones Proof of Concept v0.1 (Atomic Transfer) we had implemented an atomic transfer between two account based zones. The problem with that design is that by the nature of account based ledgers, private balances are very difficult to make work.
In the second iteration, we tackled private atomic transfers (PACTs), leading to a sharded, private UTXO based ledger design.
At a high level each Zone owns two states:
Each zone update posted to bedrock transitions both the common ledger and the zone state using two proofs.
The global Ledger VK becomes the “trusted third party” that allows us to coordinate private atomic asset transfers across zones. That is, since asset transfers are governed by the Ledger VK, a zone can trust that an asset it receives will not be double spent without having to audit the sending zones code.
To ensure integrity of the Common Ledger, Zone STF’s do not have the freedom to edit the ledger directly, but they can refuse a ledger transition entirely if the transition would invalidate the STF invariants.
To test our design we implemented a PoC of a PACT scenario where we privately transfer some assets from one zone to another. The scenario is executed over a few stages:
All in all, the scenario proving stages (and their times) look like this:
