Laws and zk Proofs
Overview
The delta network uses zero-knowledge proofs to decouple execution from verification. Domains run application logic off-chain in any language, then submit zk proofs verifying that balance updates are valid according to the applicable laws.
Laws on delta describe the set of rules which limit user-level transactions. These laws exist as programs that run in a zkVM, which take transaction context as input and produce a proof of validity as output.
Global Laws
delta enforces a set of minimal global laws to all user-level transactions across all domains.
Every SDL submitted to the delta base layer requires a valid proof generated with the delta global laws program in order for those state updates to finalize.
delta's global laws
- Every transaction must have a valid siganture
- a debitAllowance must be signed by the owner of the debited vault
- a mint transaction (fungible or NFT) must be signed by the owner of the mint vault
- Debit and mint transactions can only occur through the domain and shard associated with the vault
- A vault can only debit tokens that are actually contained in its token holdings
- for fungible tokens, the vault's balance must be greater than or equal to the debited amount
- for NFTs, the vault must hold the specific token IDs included in the debit allowance
- a vault's balance can never be negative
- A new token mint (fungible or NFT) cannot be created with 0 initial supply
- A new token mint (fungible or NFT) cannot be created in a vault which already contains a token holdings, and vice versa
Token Laws
In the future, token laws will be checked as part of the verification of debit and mint transactions
Token laws are optionally defined by the token issuer, and apply to every transaction involving that token on any domain. Since these laws are applied globally, they are validated as part of the global law proof program.
Token laws are planned functionality on delta. See Tokens for more detail.
Local Laws
Local laws are optionally defined by the domain, and apply to every user-level transaction occurring on that domain, including outgoing credits.
Local laws are implemented as a separate proof program from global laws. When a domain submits an SDL, the domain generates two proofs: one for local laws, then one for global laws. Domains without local laws skip this step.
Transactions that violate local laws cannot finalize on the base layer, since no valid proof can be generated for them.
To learn more about how local laws enable new use cases, read our paper on agentic commerce with guardrails. To learn how to implement local laws, see our guide.
Proof Generation and Verification
SDL proofs on delta are currently generated using the SP1 zkVM. Proof handling, including initiating the program and submitting the generated proof, is all managed by the domain client. Proofs are verified by validators before SDLs are applied to finalized state.
For more details on proof generation and validation, visit our page on the Proof Lifecycle.