Applied Zcash

Basic

Smart contracts on Zcash

Zcash has no smart contracts. An app on Zcash uses the parts of a shielded payment: notes, memos and keys. With these parts, an app can do many tasks of a smart contract.

Does Zcash have smart contracts?

No. Zcash has no virtual machine, and nodes run no app code. Nodes check one fixed set of rules for each transaction.

The values and the addresses in the shielded pools are secret. Nodes see note commitments, nullifiers, encrypted notes and proofs. With each proof, the wallet shows that the transaction obeys the rules of the circuit. Thus, nodes check only the rules of the protocol. An app must check its own rules.

The transparent pool has a small script language, as in Bitcoin. All its values and addresses are public. Use the shielded pools for new apps.

Smart contract tasks on Zcash

Each row has a task of a smart contract on Ethereum, and the Zcash pattern for the same task.

TaskOn EthereumOn Zcash
Keep a record with one historyContract storageBound notes
Receive orders from usersA call to a contract functionWallet-native orders
Share control of fundsA multisig contractThreshold keys
Log in with a walletSign-In with Ethereum (ERC-4361)Log in with Zcash
Ask for a paymentA payment URI (ERC-681)Payment links
Find the customer for a depositA new account for each userAddress per customer
See payments on a serverContract eventsWatch-only keys
Pay for the work of the networkGasA fee for each action (ZIP 317). Keep the scan work of wallets small with polite actions.

Bound notes and threshold keys also use canonical action pairing. With it, each build of the same transaction has the same note commitments.

Who checks the rules

On Ethereum, each node runs the code of a contract. Thus, nodes check all the rules of the contract. On Zcash, three parties check the rules of an app:

Nodes
Nodes accept each nullifier one time only. Nodes check the signature of each spend.
Anyone with the data
A verifier calculates the note commitment from the record, recipient address, value, plaintext lead byte and action nullifier. The verifier checks that its x-coordinate is equal to the cmx on the chain. The verifier checks that each successor is in the action in which its predecessor is spent. The verifier also checks the block order of the records. Thus, each verified record has one next record at most.
The app
The app checks all other rules, for example the price of an order. Users must trust the app for these rules.

Tasks that need new software

Some tasks of a smart contract need a ZIP and a network upgrade. Each ZIP in this table has the status Draft (November 2026).

TaskChange
Make a new tokenZcash Shielded Assets: ZIP 227 (issuance) and ZIP 226 (transfer and burn)
Swap two assetsZIP 228 (asset swaps)
Use relative lock-time for transparent inputsZIP 68 (relative lock-time)
Send a memo of more than 512 bytesZIP 231 (memo bundles)

Some designs need a new wallet function only. These designs are on the Wishlist, for example Signature login.

Where to start

Read Concepts first. It has the parts of a shielded payment in a few lines each. Then read the pattern for your task.

Change this page on GitHub