> For the complete documentation index, see [llms.txt](https://docs.velio.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.velio.xyz/documentation/zh-tw/security/on-chain-contracts.md).

# 鏈上合約

驗證合約接收 ZK 證明與狀態更新資料，依據目前已確認的狀態進行驗證。

驗證合約接收 ZK 證明與狀態更新資料，依據目前已確認的狀態進行驗證。只有驗證通過，合約才接受新的帳戶狀態根。資金合約則另行處理充值與提款相關流程。

1. **提交更新**：ZK 證明與狀態資料
2. **合約驗證**：依據目前狀態核對
3. **接受新狀態**：驗證通過後更新狀態根

{% hint style="info" %}
這裡描述狀態確認流程；資金操作由資金合約處理。
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.velio.xyz/documentation/zh-tw/security/on-chain-contracts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
