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

# Contracts and Circuits

## Protocol core

| Component            | Responsibility                                                      | State                                                      |
| -------------------- | ------------------------------------------------------------------- | ---------------------------------------------------------- |
| `vayyl-pool`         | Commitments, roots, nullifiers and asset settlement                 | Vault deployments available; variable-note upgrade planned |
| Groth16 verifier     | Verify circuit-specific proofs through Soroban BN254 host functions | Deployed for Vault circuits                                |
| ASP membership       | Maintain accepted association-set roots                             | Integrated with Vault                                      |
| ASP non-membership   | Maintain exclusion-set roots                                        | Deployed foundation; broader policy flow planned           |
| `vayyl-pool-factory` | Create consistently configured asset pools                          | Repository implementation; not deployed                    |

## Application layer

| Component                 | Planned integration                                                                    |
| ------------------------- | -------------------------------------------------------------------------------------- |
| `position-manager`        | Consume private collateral proofs, store position commitments, return settlement notes |
| `liquidation-engine`      | Verify proof-bound liquidation conditions and atomic payouts                           |
| `hidden-order-registry`   | Store order commitments and consume execution nullifiers                               |
| `agentic-settlement-hub`  | Authorize application or agent payouts into Vayyl commitments                          |
| keeper and oracle adapter | Supply liveness and authenticated public inputs without custody                        |

## Circuit families

| Circuit                    | Statement                                                                  |
| -------------------------- | -------------------------------------------------------------------------- |
| Deposit                    | Public asset movement creates a correctly formed private commitment        |
| Transaction                | Owned inputs exist and balance against private outputs, withdrawal and fee |
| Position open/health/close | A committed position follows application constraints                       |
| Hidden-order trigger       | A committed condition is satisfied by an accepted public input             |
| Settlement claim           | An authorized application obligation creates the specified outputs         |

Repository presence is not deployment evidence. See [Network and Deployments](/vayyl-docs/build-with-vayyl/deployments.md) for the components currently deployed and the security status of each environment.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://vayyl.gitbook.io/vayyl-docs/architecture/contracts-and-circuits.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
