> For the complete documentation index, see [llms.txt](https://auxo-1.gitbook.io/on-chain-funding-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://auxo-1.gitbook.io/on-chain-funding-platform/platform/flexible-vesting.md).

# Flexible Vesting

## Vesting zkApp

This contract allows investors to use a vesting function. Each project will have its own vesting contract, which is created when using Create Project with Vesting at Project contract. This contract does not allow the private key holder to change the logic or the state of the contract, ensuring the safety of the contract.

The vesting mechanism works in 2 ways:

* Flexible vesting: Allows the builder to create a vesting request at any time and can be claimed as long as the agreement of the investor is greater than a threshold.
* Milestone-based vesting: The Builder can only have a specific milestone created when participating in the campaign (times of vesting, amount each time, timeline to receive the vesting). This way is more strict, forcing the builder to work as planned.&#x20;

It stores information about:&#x20;

* Information of vesting request
* The public key that is used for receiving the fund.
* Amounts of funds that the project has vested success in each campaign.

This contract will have a helper contract which is a requester, that stores the following information.

* The voting commitment, to prevent investors to voting 2 times for a vesting request.
* Encrypted data about the voting, is used to calculate the total voted amount without revealing the information about the voter(investor)

<figure><img src="/files/AH3D8s5ZQkSRHRvBXuk8" alt=""><figcaption><p>Vesting zkApp</p></figcaption></figure>

The contract's primary functionalities include:

* Vote: Investor using this function to vote yes/no on the request vesting.
* Claim Milestone Fund: Builder using this function to claim the vesting amount if the request is a success
* Refund: Investor using this function to claim back their investment if the project not meeting the requirement.

## Commitment zkApp

This contract is only used to store the commitment for vesting. It stores information about the nullifier of users' commitment to avoid double-spending.

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

The contract's primary functionalities include:

* Commit: Mark the commitment is used


---

# 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://auxo-1.gitbook.io/on-chain-funding-platform/platform/flexible-vesting.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.
