EVM
The ZeroPool solution is based on several interrelated smart contracts. The main purpose of the contract subsystem is to store the current Merkle tree state inside the base blockchain. Each ZeroPool transaction changes the Merkle tree, so it should be processed by a smart contract. See the subsystem below, where the Pool contract is the primary contract for processing transactions.
tip
Contracts Github repo. Contract code is also linked in the contract pages referenced below.
- Pool contract is the main contract which holds the current Merkle tree state. It process all transactions and holds a current Merkle tree root.
- Verifier contracts are used by the Pool contract to check transaction correctness / validate zkSNARK proofs.
- Operator contract helps the Pool contract to determine whether transactions can be accepted from a sender. It is used in the multi-relayer configuration to serialize the transaction sequence from the different nodes and minimize transaction collisions.
- Voucher token contract mints a token (XP) to reward users for their contribution in the anonymity set.