> 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/trust/security-model.md).

# Security Model

Vayyl protects assets only if the circuit statement, contract implementation, wallet, and operational services agree on the same rules.

## Security invariants

* private inputs cannot be spent without their spending keys;
* a nullifier can succeed only once;
* private and public value is conserved across every action;
* asset identity and application domain cannot be substituted;
* public recipients, fees, and payouts are bound into the proof;
* malformed points, field elements, and encodings are rejected;
* a relayer or indexer cannot authorize an invalid state transition;
* upgrades and verifier-key changes require explicit governance.

## Production gates

Before a production-value release, each circuit family and adapter requires:

1. a frozen specification and public-input map;
2. reproducible circuit and contract builds;
3. trusted-setup provenance or a proof system with acceptable setup assumptions;
4. cross-language hash and serialization vectors;
5. independent circuit and Soroban contract audits;
6. fuzzing and adversarial economic tests;
7. upgrade, pause, incident-response, and monitoring procedures;
8. staged limits with an explicit rollback path.

## Operational security

Relayer keys must be isolated, enrollment authority minimized, database credentials rotated, APIs rate-limited, and contract TTL monitored. Multiple relayers and independent indexers reduce liveness dependence but do not fix an incorrect circuit.

## Current status

The available Vault demonstrates real proof verification and asset movement. It is unaudited and its fixed-note circuit is not the production private-balance circuit described in these docs.


---

# 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/trust/security-model.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.
