Channel lifecycle
| Phase | Transaction |
|---|---|
| Open | OpenCzacChannel — both parties deposit. |
| Send | SendCzacMessage — message signed by sender; recipient counter-signs. |
| Update | Messages update the running balance. |
| Close | CloseCzacChannel — settles to the final state. |
| Dispute | ChallengeCzacChannel — opens the 7-day window. |
State
Each channel record contains:| Field | Type | Description |
|---|---|---|
channel_id | [u8; 32] | BLAKE3 of (party_a, party_b, asset, nonce). |
party_a / party_b | Did | The two participants. |
asset | AssetClass | MINT, custom token, or zone-local asset. |
deposit_a / deposit_b | u128 | Initial deposit per side. |
last_seq | u64 | Highest committed sequence number. |
running_balance | (u128, u128) | Current net balance per side. |
status | enum | Open, Disputed, Closing, Closed. |
dispute_window_start_height | u64 | Height the dispute window opened, if any. |
Message format
Dispute
Either party may submit a dispute with their proposed final state. The counterparty has seven days to respond with a higher-sequence-number signed message. Whichever side has the highest validseq wins.
| Outcome | Effect |
|---|---|
| No response within window | The challenger’s state is final. |
| Counterparty submits a higher-seq state | The newer state is final. |
| Both sides submit conflicting states at the same seq | The transaction reverts; manual arbitration through governance. |
Atomicity
The “atomic” property: opening, sending, and closing all settle in a single transaction. Either both sides debit and credit, or neither does. Partial settlement is impossible.Example: payment channel
A pays B in micro-MINT increments. The channel opens with each side depositing 10 MINT. They exchange 1,000 signed messages off-chain, each shifting a small amount. After business hours, either side submitsCloseCzacChannel and the final balances settle in one transaction. The 1,000 intermediate messages never touch the chain.
See Open a payment channel for the full recipe.
Limits
| Limit | Value |
|---|---|
| Max simultaneously open channels per zone | 10,000 |
| Min deposit per side | 1,000,000 micro-MINT (1 MINT). |
| Max message payload | 64 KiB. |
| Dispute window | 7 days. |
Implementation
- CZAC types:
node/sigil-czac/src/types.rs. - CZAC executor:
node/sigil-node/src/executor_czac.rs. - CZAC durable state:
node/sigil-node/src/czac_durable.rs.
See also
- Organisation zones — what owns the channel endpoints.
- Open a payment channel — recipe.