# Structured Yield Vault Mechanism

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

#### 1. Vault Creation

* Anyone (vault creator) can create a vault and set their own [vault parameters](https://prodigyfi.gitbook.io/dual-investment/vault-creation/vault-parameters) permissionlessly
* The vault creator provides the necessary collateral to fund the vault.
* Once the vault is funded, it gets listed on Prodigy.Fi’s platform for discovery.

#### 2. Vault Subscription

* Users looking to earn yields can browse through active vaults on Prodigy.Fi's marketplace and select one based on the assets they want to trade, their target buy or sell price and expiry date
* To subscribe, users deposit the selected crypto asset into the vault.
* Once subscribed, users lock in the fixed yield, regardless of whether the trade executes at expiry.

#### 3. Earning Yields

* Vault subscribers earn a fixed yield that is set and paid by the vault creator.
* Yields are distributed upon expiry, regardless of the vault’s outcome.

#### 4. (Optional) Liquidity Adjustment

* The vault creator may withdraw any unused liquidity from the vault at any time. Doing so delists the vault from the Earn page and prevents new subscriptions.
* However, all existing vault subscriptions are honored and processed according to the vault's terms on the expiration date.

#### 5. Expiration And Settlement

* When the vault expires, the smart contract retrieves the final market price of the crypto asset from our pricing oracle. \
  \&#xNAN;*Note\* We currently use Pyth Network & Chainlink oracles.*
* Based on the Linked Price, the smart contract then determines whether a trade is executed or not.
* The expiry time for all vaults is fixed at 16:00 (UTC+8).

#### 6. Fund Distribution And Withdrawal

* Once the vaults have been settled, the smart contract distributes the settled funds to both the vault subscriber and the vault creator, making them available for withdrawal on the “portfolio” page.
* Vault creators and vault subscribers can then withdraw their settled funds at 18:00 (UTC+8).
* Once all funds have been withdrawn, the vault is considered "settled" for all participants.


---

# 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://prodigyfi.gitbook.io/structured-yields/getting-started/all-about-structured-yields/structured-yield-vault-mechanism.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.
