# Verifier contracts

The verifier contracts are used to validate zkSNARK proofs. There are two verifiers in the zkBob solution:

* **Transfer verifier** is used to check transaction correctness. The associated proofs are generated by the user on transaction creation and calculated with the [transaction circuit](/implementation/zksnarks-and-circuits/transaction-verifier-circuit.md). The main question the verifier answers is whether the user is able to make the corresponding deposit\transfer\withdrawal.
* **Tree verifier** is used to check the Merkle tree updating sequence. The transaction subtree (which should be added to the general tree) should be placed on the correct offset and update the Merkle tree root properly. The associated proofs are usually generated by the relayer (but the user should calculate the proof himself when he wants to interact with the Pool contract directly). The main question the verifier answers is whether the Merkle tree has been updated correctly.

Verifier contracts are built within the [Groth16](http://www.zeroknowledgeblog.com/index.php/groth16) proving system. The Solidity source code is generated by a [fixed template](https://github.com/zeropoolnetwork/libzeropool/blob/master/res/verifier_groth16.sol.tpl). Building the verifier contracts require verification keys generated during the [Ceremony](/deployment/trusted-setup-ceremony.md) process.

### Source and Deployment data

* Contracts source code: generated during the [Trusted Ceremony.](/deployment/trusted-setup-ceremony.md#phase-2-create-circuit-parameters-and-mvp-launch)
* [Contract Addresses](/implementation/deployed-contracts.md)

{% hint style="info" %}
A new verifier contract will be generated following the Community participation phase of the Trusted Ceremony.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zkbob.com/implementation/contracts-and-circuits/verifier-contracts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
