> For the complete documentation index, see [llms.txt](https://docs.zkbob.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zkbob.com/implementation/contracts-and-circuits.md).

# Smart Contracts

The zkBob solution is based on several interrelated smart contracts. The main purpose of the contract subsystem is to store the current [Merkle tree](/implementation/untitled.md) state inside the base blockchain. Each zkBob 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.

<figure><img src="/files/LielUTNDwDtKWK6Sb7tv" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
[Contracts Github repo.](https://github.com/zkBob/zkbob-contracts) Contract code is also linked in the contract pages referenced below.
{% endhint %}

* [Pool contract ](/implementation/contracts-and-circuits/the-pool-contract.md)is the main contract which holds the current Merkle tree state. It process all transactions and holds a current Merkle tree root.
* [Token contract](/implementation/contracts-and-circuits/token-contract.md) mints a shielded coin protected by the current zkBob solution. This token is deposited in the Pool contract and withdrawn from it.
* [Verifier contracts](/implementation/contracts-and-circuits/verifier-contracts.md) are used by the Pool contract to check transaction correctness / validate zkSNARK proofs.
* [Operator contract](/implementation/contracts-and-circuits/operator-manager-contract.md) 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](/implementation/contracts-and-circuits/voucher-token-contract.md) mints a token ([XP](/roadmap/exploratory-features/xp.md)) to reward users for their contribution in the anonymity set.
