# Introduction

Tokenized yield simplified with Safe and perpetual call options

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

VaultCraft is a permissionless DeFi infrastructure for deploying custom yield strategies on any EVM chain within a few clicks. VCX holders, or the VaultCraftDAO, are responsible for all of VaultCraft's software development.

## VaultCraft V2 - Tokenized yield, simplified with Safe

{% embed url="<https://www.youtube.com/watch?v=fOUKe2hyttE>" %}
[Go to V2 - Gnosis Safe for more information](/products/v2-safe-smart-vaults)
{% endembed %}

* ***Optimize*** your yield with [**Smart Vaults**](/products/smart-vaults)
* ***Integrate*** and deploy custom DeFi strategies with our [**SDK**](/products/vaultcraft-vci-and-sdk/sdk)
* ***Zap*** and deposit from any chain in [**1 click**](/products/zap-into-vaults)
* ***Earn*** call options (oVCX) with VaultCraft's flagship products
* ***Multiply*** your oVCX rewards by locking your VCX liquidity
* ***XP points*** for users interacting with VaultCraft's smart conrracts

{% hint style="success" %}
**VaultCraft makes it simple for you to:**

* Deposit your crypto
* Optimize your yield using **ANY ASSET ON ANY EVM CHAIN**
* Customize your own yield optimization strategies
  {% endhint %}

## Yield your way!

DeFi just got way easier with [VaultCraft](https://docs.vaultcraft.io/welcome-to-vaultcraft/www.vaultcraft.io), your no-code DeFi toolkit for building, deploying, and monetizing automated yield strategies in just a few clicks. Forget spending months of r\&d, capital, and human resources when you can launch your own crypto fund with VaultCraft on any evm-chain. From wallet providers to custodians to your sophisticated DeFi degen, VaultCraft supercharges your crypto assets by enabling instant, cross-chain vault strategies that you can deploy in 1 minute. Now anyone can build their own bank with VaultCraft.

> [*VaultCraft is an on-chain, permissionless protocol where anyone can spin up a vault — an automated asset strategy that optimizes returns on user-deposited funds. This is the first open infrastructure allowing for the modularization of vaults using a protocol-endorsed VaultFactory that ensures the safety of the strategy and its contracts. Vaults can interact with a variety of protocols through the ERC4626-Wrapper and are also stackable in design, meaning you can stack on top of other vaults.* ](/products/vaultcraft-vci-and-sdk)

## **VaultCraft creates economic opportunity**

VaultCraft smart contracts allow users to customize and generate yield on their crypto assets through the automation of yield-generating strategies. The automation of common yield-generating functions via **vaults** such as claiming, staking, compounding, re-supplying, leveraging, and swapping of cryptocurrencies means that users:

1. Save time
2. Pay less in transaction fees
3. Generate yield on their crypto holdings with little overhead or knowledge


# Refer your friends

Invite your friends. Earn XP points. Get future VCX airdrops.

<figure><img src="/files/5juoXq3f0T50uIVgdpP8" alt=""><figcaption><p>app.vaultcraft.io</p></figcaption></figure>

VaultCraft allows users to generate a referral link to earn XP points for future airdrops. Be sure to mint VAULTRON, the NFT reward optimizer on app.vaultcraft.io/vaultron, to be eligible for XP.&#x20;


# Book a Demo

Book a demo on how to customize your own ***Best Yield*** vault strategy!

Link to Mischa0x's calendly: [https://calendly.com/mischa0x/](https://calendly.com/mischa0x/popcorn)


# Partner with us


# VaultCraft Partner Program

Build automated DeFi strategies, earn oVCX rewards and kickbacks.

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

## Summary

We are rewarding partners with up to 300,000 oVCX tokens for developing automated DeFi strategies with VaultCraft and supporting the co-marketing of the joint products in their respective communities.

## Eligibility

VaultCraft's Partnership Program is aimed at protocols and key community members who want to build and promote their vaults while supporting VaultCraft. We work closely with our partners to integrate and form mutually beneficial relationships that add value to both parties.&#x20;

If interested in this program, please fill out the [**Form**](https://b7qv6rd6w5c.typeform.com/to/g18olMKI)**, select which program you are applying for**, and we will be in touch with you soon.

## Partner Tiers

<table data-header-hidden><thead><tr><th width="81"></th><th></th><th></th></tr></thead><tbody><tr><td>Tier</td><td><strong>TVL</strong></td><td><strong>oVCX Rewards*</strong></td></tr><tr><td>1</td><td>$20K - $100k</td><td>10,000</td></tr><tr><td>2</td><td>$101k - $500k</td><td>150,000</td></tr><tr><td>3</td><td>$501k - $750k</td><td>200,000</td></tr><tr><td>4</td><td>$751k - $1m</td><td>250,000</td></tr><tr><td>5</td><td>>$1m</td><td>300,000</td></tr></tbody></table>

*\*oVCX rewards are denominated in quantity, not correlated to any specific fiat currency.*

<details>

<summary>FAQS</summary>

* **How do I know when my vault(s) are eligible to be in a Tier?**

  * Vault(s) are considered eligible for rewards after a 30 day average TVL is calculated to be within the range of the Tiers listed above.

  &#x20;&#x20;
* **Will I receive the oVCX rewards in bulk when hitting certain tiers?**
  * No, in order to prevent nefarious activity oVCX rewards will be distributed throughout a 6 month span from the time of eligibility. If for any reason TVL drops or increases equal to a different tier we will analyze the best reward route to ensure a fair reward compensation.&#x20;
* **What if my TVL changes tier levels during the 30-day calculation?**
  * Here is a practical example:
    * For the first 30 days, the partner's TVL deposit is $90K, enabling them to receive a 10k oVCX reward. Ten days later, the TVL is worth $200K bringing them to tier 2 and stays within the same range for the next 20 days of the second month. The time-weighted TVL for this 30-day timeframe would be $130K, making them eligible for Tier 2, which is a 150k oVCX reward.  &#x20;

</details>


# Vaultcraft Referral Program

<figure><img src="/files/7JOsrs7QTMMP85cmgj21" alt=""><figcaption></figcaption></figure>

## Summary

Our Vaultcraft Referral Program is an exciting opportunity for our valued community members to not only support our platform but also be given the chance to receive fantastic rewards in return. We believe that our community is our greatest asset, and we want to show our appreciation by giving back. Any vault in our marketplace is eligible for the referral program, it can even be the one you created!

## Simple Steps:

1. **Apply:** Fill out the [**Form**](https://b7qv6rd6w5c.typeform.com/to/g18olMKI) and make sure you select the Referral program to specify which one you are applying for.  &#x20;
2. **Generate:** Once accepted, we will share with you a unique referral link that you can share with your frens.
3. **Spread the word**: Whether it be through social media, word of mouth, or you're own creative method. Get the word out about Vaultcraft and send your link out.
4. **Educate**: Remember to educate your frens on the benefits and cool things they can do with Vaultcraft's API, and unique benefits they get out of depositing to our pools.
5. **Watch:** Once certain thresholds of TVL are hit utilizing your referral link, watch your juicy rewards start to come in.

## Referral Tiers

<table data-header-hidden><thead><tr><th width="81"></th><th></th><th></th></tr></thead><tbody><tr><td>Tier</td><td><strong>TVL</strong></td><td><strong>oVCX Rewards*</strong></td></tr><tr><td>1</td><td>$1,000 - $5,000</td><td>100-500</td></tr><tr><td>2</td><td>$5,000 - $25,000</td><td>500-2500</td></tr><tr><td>3</td><td>$25,000k - $75,000k</td><td>2500-7500</td></tr><tr><td>4</td><td>$75,000 - $100,000</td><td>7,500-10,000</td></tr><tr><td>5</td><td>$100,000+</td><td>10000+</td></tr></tbody></table>

*\*oVCX rewards are denominated in quantity, not correlated to any specific fiat currency.*

Join our referral program and make DEFI easy!

<details>

<summary>FAQS</summary>

* **What requirements are needed to participate?**
  * A Wallet address, a creative and go-getter mentality.
* **Does my referral link/code need to be used every time a deposit is made?**&#x20;
  * Yes, they have to use the link/code every time, otherwise it wont be accounted for under you. If someone decides to add more to their initial deposit, they still have to use your referral link.
* **How do I know when my referral deposits are eligible to be in a Tier?**

  * Deposits are considered eligible for rewards after a 30 day average TVL is calculated to be within the range of the Tiers listed above.

  &#x20;&#x20;
* **Will I receive the oVCX rewards in bulk when hitting certain tiers?**
  * No, in order to prevent nefarious activity oVCX rewards will be distributed throughout a 3 month span from the time of eligibility. If for any reason your accounted for TVL drops or increases equal to a different tier we will analyze the best reward route to ensure a fair reward compensation.&#x20;
* **How do I track my referrals and TVL amount collected?**
  * We will have a dashboard displaying "name" and how much TVL you have allocated in our discord. This will be updated every couple of days. You can also inquire in our discord about your status, deposits, rewards etc. &#x20;
* **What if my TVL changes tier levels during the 30 day calculation?**
  * Here is a practical example:

    * For the first 30 days, a referrer's TVL deposited is $90K, bringing them to a Tier 4 level. Ten days after, the TVL is worth $200K bringing him to tier 5 and stays within the same range for the next 20 days of the second month. The time weighted TVL for this 30-day timeframe would be $130K, making them eligible for Tier 5 still.  &#x20;

</details>


# Overview

DeFi automation made simple with perpetual call options

VaultCraft's DeFi products make it simple for anyone to deploy automated yield strategies AND optimize yield on their crypto assets within a few clicks. All flagship Smart Vaults earn oVCX, perpetual call options, weekly in Smart Vault gauges. Use VaultCraft to:

* **ZAP** any asset on any chain into ***Smart Vaults***
* **EARN** risk-adjusted yield on your crypto assets
* **BOOST AND ARB** with oVCX rewards
* **CUSTOMIZE** and deploy your own vault strategy
* **INTEGRATE** the VaultCraft SDK
* **TRACK** your positions and performance

{% hint style="info" %}

### **VaultCraft vaults are**

* On-chain
* Permissionless
* Non-Custodial
* Audited by **Paladin**, **Code4rena**, **BlockSec**, **Zokyo**, and over 200 White Hats
* Bounties live with **Immunefi** for 3 years.
  {% endhint %}

## VaultCraft V1.5 - May 2024

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

VaultCraft V1.5 has made things significantly more affordable, simpler, and more capital-efficient. Here's what we've introduced:

* **XP points**
* **Multichain Gauges**
* **Leverage Farming with Money Markets**
* **Multi-strategy Smart Vaults**
* **Vaultron Optimizer**
* **Multizaps**
* **Smart Vault Pages**

You can read about the release on <https://medium.com/vaultcraft>


# V2 - Safe Smart Vaults

Institutional-Grade Yield Infrastructure Built on Web3's Most Trusted Foundation

{% embed url="<https://www.youtube.com/watch?v=fOUKe2hyttE>" %}
Demo
{% endembed %}

### Overview Tailored for VaultCraft

To address the rapidly evolving needs of DeFi, VaultCraft offers a vault system designed for adaptability and growth in any direction required. The primary objective is to create a vault that provides complete flexibility in interacting with various protocols while remaining user-friendly and reducing the need for developing new strategies for each protocol.For users, VaultCraft simplifies the complexity of engaging with multiple protocols. It allows users to deposit and withdraw through a single interface, eliminating the need to track new protocols or rebalance their portfolios, as all complexities are managed internally.

### User Benefits

* **Simplified Onboarding**: Users can instantly access leading DeFi integrations within the VaultCraft ecosystem.
* **Higher Yields**: VaultCraft provides easy access to sophisticated DeFi strategies with ongoing performance optimization.
* **Lower Gas Costs**: Transactions are efficiently batched, saving users upto 90% in gas costs for continuous rebalancing.

### Protocol Benefits

* **Simplified Ecosystem Onboarding**: VaultCraft enhances user convenience by removing the need to navigate various integrations and monitor optimal strategies continuously.
* **Higher Base Yields**: Through complex DeFi strategies and optimizations, VaultCraft can offer higher base yields, attracting more users and improving retention rates.
* **Liquidity Optimization**: By addressing inefficiencies within ecosystems, VaultCraft fosters liquidity provision and fills market gaps.
* **Capital Flexibility**: A robust capital base allows swift deployment of funds towards strategic priorities. With V2, deploy capital across protocols in minutes instead of weeks.

### Manager Benefits

* **Simplicity**: Manage VaultCraft vaults using Safe in a familiar environment with expected quality-of-life improvements, without needing to learn new tools.
* **Security**: VaultCraft vaults utilize Safe, known for their security as battle-tested smart contract wallets.
* **Flexibility**: Fully customizable vaults allow interaction with any DeFi protocol, employing any strategy and setting any parameters, akin to using an EOA (Externally Owned Account).

VaultCraft's architecture ensures seamless interaction across EVM-compatible chains from a single interface, promoting composability and integration into any DeFi protocol or application.

VaultCraft chose Safe as its foundation for its unparalleled security track record, having secured over $100B+ in digital assets. This integration brings institutional-grade infra to DeFi yield optimization


# Manager Docs

Manage VaultCraft's Smart Vaults with Safe

With our new Safe Vaults its easier than ever to run a vault/fund/index in DeFi. We simply configure you a vault and set up Safe for you and from there on you can manage everything in the familiar interface of Safe with all the features that you come to love and expect.

### Vault Creation

1. Together we decide which asset will be the quote asset of the vault. The quote asset is the token that user deposits and withdraws. Therefore all price changes are measured in terms of this asset. Consider two examples:
   * The quote asset is USDC but the vault is now only holding BTC. With the price of BTC increasing the value of the vault in terms of USDC increases dramatically. Vice versa if the price of BTC decreases the value of the vault in terms of USDC decreases.
   * If the quote asset is BTC on the other hand the value of the vault wouldn't increase at all even if the price of BTC increases. Since the amount of BTC in the vault stays the same.
2. We decide together which protocols and assets can be used by the vault. This has a huge impact on the risk and return profile of the vault and how we can sell the vault to our users. A vault that only deals with established stablecoins and lending protocols will bring less returns but will be marketable to huge treasuries and other risk averse investors. While a vault that invests into memecoins and various DeFi protocols will have a higher return potential but also higher risk. Its also important to note that we are able to later adjust the rules further in case VaultCraft or you as the manager feel like its necessary.
3. Now we deploy the vault with its oracle, safe and all necessary permissions.
4. You will be given access to a  Safe with a previously agreed EOA as the owner and ready to manage the vault.

### Vault Management

User funds are automatically sent on deposit to your  Safe. The only thing you need to worry about is managing those assets and fulfilling withdrawal requests.

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

You can access any DeFi protocol either in the Safe app directly or by connecting to an app via WalletConnect. Any protocol or asset interaction that wasn't allowed on vault creation will simply fail or not be signed.

Its also possible to use the Safe API or Safe SDK to interact with the Safe in a programmatic way. (<https://docs.safe.global/sdk/overview>)

To fulfill user withdrawals follow the following steps:

1. Navigate to the `Apps`-page in the Safe and there click on "My custom apps". If you see VaultCraft in that list already you can skip step 2 and go straight to step 3<br>

   <figure><img src="/files/TJtZresPaVXf7b2J1Tfg" alt=""><figcaption></figcaption></figure>
2. Click on `Add custom Safe App` and add the following URL: [https://app.vaultcraft.io](https://app.vaultcraft.io/) and click `Add`. This will add the VaultCraft to your list of Safe Apps.

<figure><img src="https://github.com/Popcorn-Limited/contracts/raw/feat/GnosisVault/docs/images/manager/manager2.png" alt=""><figcaption></figcaption></figure>

3. Now click on the VaultCraft app and scroll to the bottom of the page. Click on `Manage`

   <figure><img src="/files/XsjZwCqDUUOGNTXnW5q1" alt=""><figcaption></figcaption></figure>
4. This sends you to this page where you click on `Safe Vaults`<br>

   <figure><img src="/files/nDaKZHvdWnWQWmpoKp76" alt=""><figcaption></figcaption></figure>
5. Here you can see all withdrawal requests from all users of any VaultCraft vault. You can use the search functionality or narrow vaults down by selecting specific networks to only see your vaults<br>

   <figure><img src="/files/maW0qp5brqtmb2G8vLkc" alt=""><figcaption></figcaption></figure>
6. Here you can see a user which address ends with `...Bdb` has requested the withdrawal of 1 vault share which is currently valued at 3.51983 USDC. You also see this in the gray bar at the top. This shows you how many idle USDC are in the Safe and how many you would need to fulfill all withdrawal requests. In this case we have 1.82 USDC available but need 3.519 USDC. In this example you would need to withdraw from some protocols or sell other tokens in the Safe to get the needed USDC<br>

   <figure><img src="/files/920kE9EgmoxU2pPupNQ0" alt=""><figcaption></figcaption></figure>
7. Withdrawals can be fulfilled in multiple ways. By clicking on the `Withdraw` button next to individual requests you fulfill that specific request only. You can also click on `Withdraw all` to fulfill all requests at the same time for a single vault if the Safe has enough idle assets. Lastly you can bundle multiple requests of the same vault by clicking on `Add to Queue` and then `Fulfill Queue`. When adding a request to the queue you will see that the amount of Queued Assets in the Gray bar at the top increases. And thats all there is to manage a vault.<br>

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


# User Docs

Deposit & Withdraw with Gnosis Safe Smart Vaults

1. Select a vault that supports tokens you want to deposit and click on it. You can also use the search bar to find a specific vault by asset, address or name. If you want to see vaults only on specific chains, use the 'All Networks'-dropdown. If you need more informations about specific data points simply hover over them<br>

   <figure><img src="/files/9HNup97asJh384533SJC" alt=""><figcaption></figcaption></figure>
2. Once you clicked on a vault you will see more details about it\
   \
   2.1. On top you see the asset icon used by the vault and the network on which it is deployed. Next to it you see the vaults name, the strategies it uses and additional tags. (This vault for example uses USDC on Arbitrum and uses the `Safe`-strategy)\
   \
   2.2. Below the vaults name you see the how many tokens you can deposit and the current value of your vault deposit. Next to it you find the TVL (Total Value Locked) of the vault and its variable APY. As usual if you need more informations about specific data points simply hover over them<br>

   <figure><img src="/files/kyha6Iq8uMSgZ8Niadn9" alt=""><figcaption></figcaption></figure>
3. You can inspect the historical performance of the vault by inspecting the `Vault APY`-chart. Below that you find various informations from a description to all the necessary addresses of the vault if you want to dig into it further. Lastly in the `Strategies`-section you can see which strategies are used and how much they contribute to the vaults performance<br>

   <figure><img src="/files/DT6KsDGVi4qQcEUGke5f" alt=""><figcaption></figcaption></figure>
4. Next to all these informations you find the `Deposit/Withdraw`-section. In here you can deposit and withdraw tokens to and from the vault<br>

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

4.1. Type in the amount of tokens you want to deposit. Below it you see the value of your pending deposit in USD. The number next to the wallet icons shows you how much of the selected token you have in your wallet. Click on the wallet icon to to use your whole balance\ <br>

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

4.2. If you click on the arrow next to the asset name you can select a different token to use for your deposit. We will automatically convert the token on deposit into the vaults underlying token.\ <br>

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

4.3. Below that you find the estimated amount of vault shares you will receive for your deposit. There you can also see the value of those shares in USD and how many vault shares you already own. Over time these vault shares will grow in value depending on the vaults performance. You can later withdraw your vault shares to get back the underlying tokens plus interest.\ <br>

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

4.4. Lastly you find the fee breakdown of the vault. Once you are ready go ahead and click on the `Preview`-button to start your deposit.\ <br>

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

4.5. Follow the steps shown to finish up your deposit<br>

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

### Withdraw

1. In the same way as for deposits you select a vault from the overview which you want to withdraw from. That directs you to the vault details page. Here we now switch the tab from "Deposit" to "Withdraw" by clicking on `Request Withdraw`<br>

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

1.1 Here you type in amount of vault shares to withdraw. Below it you see the value of your withdrawal in USD. Next to it we can see how many shares you have in your wallet. Click on the wallet icon to use your whole balance<br>

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

1.2. Below at `Output Amount` you can see the estimated amount of tokens you will receive for your withdrawal, their value in USD and how many tokens you already have in your wallet<br>

<figure><img src="/files/56FaW8cYnkb0ubfyLAud" alt=""><figcaption></figcaption></figure>

1.3. Lastly you find the fee breakdown of the vault. Once you are ready go ahead and click on the `Preview`-button to start your withdrawal\ <br>

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

1.4. Follow the steps shown to finish up your withdrawal. Its important to note that depending on the vaults strategy some withdrawals might take a while to complete. This will be shown clearly in the withdrawals steps. If there is enough liquidity for a full withdrawal you can stop reading here<br>

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

2. Your withdrawal is now in process. You can see your requested withdrawal below the Deposit/Withdraw-section. It shows you the amount of vault shares you are withdrawing and the estimated amount of tokens you will receive. If you want to cancel your withdrawal you can click on the `Cancel`-button<br>

   <figure><img src="/files/8KwEcItZYEDuBwKzJvq5" alt=""><figcaption></figcaption></figure>
3. Once the withdrawal from the vault is completed you can claim your tokens by clicking on the `Preview`-button and follow the steps shown<br>

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


# Developer Docs

Tokenized yield with absolute flexibility

To faciliate the fast changing needs of DeFi we create a vault that can grow with us into any direction we require. The goal is to create a vault that has absolute flexibility of what protocols to interact with and how but still remains easy to manage and save us on developing new strategies for each protocol out there.

For users the vault abstracts away the complexity of interacting with multiple protocols and allows them to deposit and withdraw with a single interface. They wont need to chase new protocols or rebalance as all this complexity is abstracted away.<br>

## Architecture

The main contract is the `OracleVault` which uses a `Safe` to hold and manage assets. We use a `PushOracle` to keep track of the value of the assets held in the `Safe` and set the price of the vault shares.

The `OracleVault` follows the [ERC7540](https://eips.ethereum.org/EIPS/eip-7540) standard. Deposits are instantaneous but withdrawals are processed asynchronously.

The `PushOracle` is controlled by the `OracleVaultController` which has permissioned `keepers` to update the price of the `PushOracle`. Price updates are expected to happen in regular intervals. If a price update is significantly larger/smaller than the previous price we will update the price but pause the vault immediately to prevent any losses. The same goes for a drawdown from the latest high water mark. This ensures that price manipulations or temporary issues wont lead to a loss of funds for the vault or user.

The `Safe` is controlled by `managers` which can either be bots, ai agents or humans. All transactions are verified by a `TransactionGuard`-module and we have a seprate `SafeController`-module to remove malicious or inactive managers and even liquidate the `Safe` if needed. The `TransactionGuard` allows us to allow which contracts and functions `managers` can call. Later we will also add limits and decode and sanitize calls to increase security further.

`TransactionGuard` and `SafeController` both use a hook pattern to allow us to update and add additional functionality later<br>

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

## Sequence Diagrams

### Deposit

Deposits only have one state. On deposit the user sends funds to the `Vault` which in turn sends it to the `Safe`. The `Vault` than mints shares to the user.

<figure><img src="/files/5UySzE9GJQKIQ1pPCQXH" alt=""><figcaption></figcaption></figure>

## Withdraw

\
Withdrawals are processed asynchronously. Thefore we have multiple states of a withdrawal.

First a user requests a withdrawal by sending shares to the `Vault`. This is the `pending`-state. In which a withdrawal was started but not yet completed.

In the second step that request has to get fulfilled. By sending assets to the `Vault` and burning the users shares. Now the user has `claimable assets`. This is the `fulfilled`-state. The user has their shares burned but their assets reserved though these still need to be claimed.

Lastly the user can call `withdraw()` on the `Vault` to get their funds. This is the `completed`-state. Here the user simply claims and receives their assets.

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

## Scope

```
├── src
│   ├── vaults
│   │   └── multisig
│   │       └── phase1
│   │            ├── AsyncVault.sol
│   │            ├── BaseControlledAsyncRedeem.sol
│   │            ├── BaseERC7540.sol
│   │            └── OracleVault.sol
│   └── peripheral
|        └── oracles
|             ├── adapter
│             │   └── pushOracle
│             │       └── PushOracle.sol
│             └── OracleVaultController.sol
```

At this point we expect the manager to be a trusted permissioned actor which is why we wont include any contracts of the `SafeController`-module just yet.

For `TransactionGuard` we use the `ScopeGuard`-module by zodiac which has been extensively tested and is battle tested. <https://github.com/gnosisguild/zodiac-guard-scope/tree/main>

## Known Issues / Securuty Considerations

A lot of the security assumptions come down to proper configuration and key management / operational security.

A malicious owner of the `OracleVaultController` or `TransactionGuard` can rug the vault and the users funds. So we need to ensure the highest level of security to keep access to the keys as limited and safe as possible.

Additionally a poorly set up `TransactionGuard` can lead to a rug pull of the vault. Verifiying and maybe even auditing the deployment is crucial here.

Idle `managers` can also stale the withdrawal process since they will need to process and fulfill withdrawals. To incentivise fulfilling we can configure a `withdrawalIncentive` which will be paid out to the manager that fulfills the withdrawal.

Lastly `setLimits` on the `AsyncVault` can lock user deposits if set too high. This can lead to a situation where a user cannot withdraw their funds even though they deposited successfully. E.g. If there wasnt a `minAmount` initially and we set the `minAmount` to a value lower than the deposit amount of certain users they wont be able to withdraw without adding more funds to the vault which might not be possible.

## Deployment

To deploy a new OracleVault we need to set up an `PushOracle` and an `OracleVaultController`. The `PushOracle` needs to be nominated and the owner accepted by the `OracleVaultController`. This can be done using `VaultOracle.s.sol`.

Set up a Safe via its app and add the agreed manager as a signer.

Now its time to deploy the `OracleVault`. The `OracleVault` needs to be added to the `OracleVaultController` and we should probably add a `keeper` on it aswell to update the price of the vault regularly. This can be done using `OracleVault.s.sol`.

To ensure the `VaultRouter` can pull funds from the Safe max-approve the `asset` to the `OracleVault`.

Lastly its recommended to set limits on the `OracleVaultController` after the vault gets deployed. To ensure that the vault wont get paused with every little price fluctuation. Simply use the script `SetVaultOracleLimits.s.sol` for it.

### Frontend Integration

To add the vault to the frontend add a new entry in `vaults/[chainId].json`. Make sure it has the the type `safe-vault-v1` and the `safe` address is correct. Than add it aswell to `vaults/tokens/[chainId].json`.

For the oracle to work you need to configure `vaults/safe/[chainId].json` and add all the assets we want to track with their price spreading. (Look at `vaults/safe/42161.json` for an example)

In `strategies/safe/[chainId].json` add the vault with all the strategies its allowed to use and their agreed allocations. (Look at `strategies/safe/42161.json` for an example)

## Further Improvement

* Add transaction verification and sanitization for all messages and transactions of the `Safe`. Managers should only be able to call previously whitelisted functions with appropriate parameters. This safeguards against rug pulls and allocations into assets that users didnt agree to.
* Futher improve and decentralie the Oracle. This could be done via zkTLS and the DeBank API to allow anyone to post the price of the vault via zkProofs.
* Add a liquidation mechanism for the `Safe` in case of drawdowns or problematic managers.
* Allow anyone to become a manager permissionlessly by simply providing a higher rate to the users and posting a certain security bond.


# Smart Vaults

Turbocharged, automated DeFi yield products that additionally earn oVCX, or rights to exercise for a 25% discount on VCX

## First, what is a *Vault*?

A vault is a smart contract that pools and routes user funds via preprogrammed strategies designed to maximize returns on deposited assets. Vaults are automated and save on gas fees, making them particularly useful for the smaller liquidity provider.\
\
Vaults were created as a  response to yield farming and liquidity mining that made searching for the highest yield much more complex than just switching between different lending protocols. DeFi vaults are not necessarily yield farming strategies. The underlying strategy may vary, but the principle remains the same.&#x20;

## What is a *Smart Vault?*

Smart Vaults (formerly Sweet Vaults) are self-custodial, permissionless, and automated asset strategies that generate yield on single-asset crypto deposits.&#x20;

{% hint style="info" %}
**Smart Vault Fees**&#x20;

* Deposit: 0%
* Withdrawal: 0%
* Performance: Dynamic
* Management: Dynamic
  {% endhint %}

## Arbitrage your rewards

veVCX holders can boost the amount of oVCX rewards they receive from Smart Vault gauges. Read [Boosting](/tokenomics/vcx/boost) under Tokenomics to learn how to boost.


# Strategies

Descriptions for available VaultCraft strategies. Note, not all strategies are available for each asset / protocol

**LP Compounding**

* The vault stakes the user's LP Token in a gauge, earning the platform's governance token. Earned token is swapped for more LP Token. To complete the compounding cycle, the new LP Token is added to the farm, ready to go for the next earning event. The transaction cost required to do all this is socialized among the vault's users.

**Folding**

* Supplies and borrows asset in money markets simultaneously to earn protocol governance token. Flashmints are then used to mint DAI from MakerDAO to flashlend and fold the position to boost APY. Earned tokens are then harvested, sold for more asset, and then deposited back into the strategy.

**Leverage**

* Deposits assets as collateral in a money market, then borrows against it (often in stablecoins like USDC). The borrowed stablecoins can be reinvested by converting them back into the original asset and redepositing it as additional collateral, allowing further borrowing in a recursive loop. This amplifies exposure to the original asset and increases potential returns if its value rises, while also earning yield from both the deposited collateral and the borrowed assets. However, this strategy comes with the risk of liquidation if the collateral value drops or if the debt becomes too high, requiring careful management to maintain sufficient collateral ratios and avoid automatic liquidation.

**Idle Finance Reinvest**

* Supplies USDC to Idle Finance to earn IDLE and COMP. Earned tokens are harvested, sold for more USDC, and then deposited back into the strategy.

**Angle Reinvest**

* Provides USDC liquidity to Angle Protocol for sanTokens that are staked to earn ANGLE. Earned tokens are harvested, sold for more USDC, and deposited back into the strategy.

**Maker Folding**

* Supplies USDC to MakerDAO Peg Stability Module for a USDC-DAI ratio that is then deposited into the Uniswap v2 DAI-USDC liquidity pool. Flashmints are used to mint DAI from MakerDAO to flashlend and fold the position, boosting the APY. Earned tokens are harvested, sold for more USDC, and then deposited back into the strategy.

**Flux Lending**

* Supplies assets into Flux Finance to earn lending interest. These assets get borrowed by accredited investors which supply on-chain US Treasuries as collateral.

**OUSD**

* OUSD integrates with Aave and Compound to automate yield on over-collateralized loans. The OUSD protocol also routes USDT, USDC, and DAI to highly-performing liquidity pools as determined by trading volume and rewards tokens (e.g. Curve rewards CRV tokens to liquidity providers). Yields are then passed on to OUSD holders. In addition to collecting interest from lending and fees from market making, the protocol automatically claims and converts bonus incentives that are being distributed by DeFi protocols.

**OETH**

* OETH integrates with various Liquid Staking Providers to optimize interest earned by staking Ether. The OETH protocol also utilizes Curve and Convex Finance to earn trading fees and additional rewards on ETH / OETH. It automatically claims and converts bonus incentives that are being distributed by these protocols.

**Staked yCRV**

* Accepts yCRV to earn a continuous share of Curve Finance fees and Curve DAO voting bribes. Earned 3Crv (Curve's 3pool LP token) fees and rewards are harvested, swapped for more yCRV which is deposited back into the strategy. Swap happens either via market-buy or mint, depending which is more capital efficient.

**Lending**

* The vault supplies assets into a given protocol to earn lending interest.

**Automated Asset Strategy**

* The vault supplies assets into a given protocol to earn yield on their automated asset strategies.

**Senior Tranche**

* The vault supplies assets into a senior tranche of a given protocol. Senior tranches offer stable returns with built-in coverage but reduced upside.

**Junior Tranche**

* The vault supplies assets into a junior tranche of a given protocol. Junior tranches offer higher returns but with higher risk since they minimize the risk of the corresponding senior Tranche.


# Integrated Protocols

All protocols that VaultCraft has done due-diligence on and wrapped to be used in an underlying yield source

{% embed url="<https://github.com/Popcorn-Limited/contracts/tree/main/src/strategies>" %}

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


# Multi-strategy Smart Vaults

The highest, safest yield in DeFi

Multi-strategy Smart Vaults are designed to track and gain exposure to some of the highest yields available within the DeFi ecosystem. Strategies can be proposed, included, or removed at any time by the assigned vault manager. Tokenization of these strategies abstracts away the complexity, management, and need for continual monitoring and trading for users.Here we will break down the following aspects of holding the **vcSmartVault** token:

* **Benefits**
* **Yield Sources**
* **Methodology**
* **Risks**
* **Fees**
* **How to get vcSmartVault**

## What are the benefits of Multi-strategy Smart Vaults?

The primary advantage of holding vcSmartVault is its ability to outperforming the market. Additionally, vcSmartVault abstracts the complexity of DeFi by offering an objective methodology that filters out noise and focuses on sustainable opportunities. Monthly (or more frequent when necessary) rebalancing ensures users access the latest high-yield opportunities without having to research every new protocol and asset to analyze the risks and rewards.

## How are components and strategies selected? (Methodology)

To be included, strategies must have the following attributes:

1. Be listed on DeFi Llama Yield Rankings and have the attribute of "no IL."
2. Have at least $1M in TVL.
3. Have a 30-day APY at least 400 basis points higher than the backward-looking APR of sUSDe.
4. Not have locking mechanisms or caps.
5. For fixed-term strategies, mature at least three months from the rebalance date; the initial composition may have a shorter duration due to the timing of the formal product launch.
6. Be compatible with VaultCraft and not require additional engineering work to make it compatible. VaultCraft may take on additional engineering work to make a strategy compatible but is not obligated to do so.
7. Be separate from aggregators or actively managed strategies.
8. No protocol can account for more than three strategies or 60% of the composition.
9. Protocols underpinning these strategies must be open-source and have published audits.

Additional considerations:

* All airdrops and rewards will be absorbed into the token and realized as yield by token holders.
* All fixed yield positions will be held to maturity, and yield will be based on the current APY, not the 30-day average APY.
* The composition will consist of at least 2 strategies at all times that meet these criteria.
* The included strategies will be weighted equally.
* A maximum of five strategies will be included at any given time.
* The product will be rebalanced monthly.
* The product will not be rebalanced if there is no necessary recomposition (i.e., added or removed component).
* If a component remains in the composition and its weight is between 17.5% and 22.5% of the index, it will not be reweighted.

## Risks

As with any product offering higher yields, the associated risk is increased as well. vcSmartVault's smart contract risk increases with the more strategies that are included in the Smart Vault.

## Risk Management

* **Daily Monitoring**: Our team conducts daily monitoring, ready to pivot strategies at a moment’s notice to safeguard your assets against market volatility.
* **Advanced Bots**: We’ve deployed advanced bots that tirelessly watch over our yield sources. At the slightest hint of abnormal activity, these digital guardians spring into action, pausing contracts to prevent potential exploits.
* **Guardrail.xyz Integration**: We’ve partnered with guardrail.xyz, implementing cutting-edge technology to create an additional fortress wall against protocol exploits.

For more information on VaultCraf'ts risk management, please read [VaultCraft: The Gold Standard in DeFi Security](https://medium.com/vaultcraft/vaultcraft-the-gold-standard-in-defi-security-ad9a7ac57338)

<figure><img src="/files/9Rlvn3O2vzKd2pLGcpCR" alt=""><figcaption></figcaption></figure>

## Fees

A 1% management fee is administered for vault management.

## How to get vcSmartVault

vcSmartVault is available (to non-restricted persons) via VaultCraft by depositing into the Smart Vault. The vcSmartVault token is the vault share, or representation of capital you own in the Smart Vault.


# Rebalancing Methodology

VaultCraft employs a sophisticated methodology for rebalancing vaults, focusing on risk management and yield optimization.

<figure><img src="/files/XzWlSgCYUq8kjt7yjtFS" alt=""><figcaption><p><a href="https://app.vaultcraft.io/manage/dashboard">https://app.vaultcraft.io/manage/dashboard</a></p></figcaption></figure>

## Market Allocation Strategy

VaultCraft's models continuously review market allocations and make necessary adjustments to ensure vaults remain risk- and yield-optimized. The key aspects of their market allocation strategy include:

* **Adding new markets:** When a new market is added, the vault APY changes based on the allocation percentage and supply APY rate.
* **Adjusting market allocations:** VaultCraft's models constantly review and adjust market allocations to optimize risk and yield.
* **Adjusting market caps:** Caps are set to limit vault exposure to any single market, representing the total amount of supply that can be allocated.

## Strategic Adjustments

VaultCraft continuously assesses and implements adjustments and reallocations once a market is allocated to a vault. These adjustments fall into two main categories:

### Risk-off Adjustments

* Continuous data checks ensure sufficient liquidity in decentralized exchanges (DEXs) to support potential liquidations without causing significant market disruptions.
* This process is crucial for maintaining vault stability and security.

### Yield Optimization

* Maximizing risk-adjusted yield by analyzing and reallocating assets among different markets.
* Yield analysis: Assessing yield in different markets, considering current rates and the shape of the yield curve.
* Utilization management: Monitoring utilization rates to avoid over-leverage and ensure optimal risk-adjusted yield.
* Adaptive strategy: Understanding time and utilization patterns to make informed decisions on asset reallocation and vault APY management.

## Risk-First Approach

VaultCraft employs a risk-first approach in their rebalancing methodology. This involves:

1. Using [Guardrail](https://www.getguardrail.xyz/) simulation models tuned to actual market data to predict the impact of alternative parameterizations1.
2. Optimizing an objective function that balances risk and capital efficiency, considering factors such as insolvencies, liquidations, and borrow usage1.

### Agent-Based Security

VaultCraft utilizes [Guardrail](https://www.getguardrail.xyz/) agents for real-time security audits and monitoring of smart contracts. These agents provide continuous protection beyond traditional one-time security audits.&#x20;

Key features include:

* **Customizable Guards:** Configurable policies tailored to verify contract behavior, protect against vulnerabilities, and detect anomalies1.
* **Simulation and Testing:** Agents can run in simulation mode to proactively identify and mitigate risks before mainnet deployment1.
* **Cross-Chain Compatibility:** Designed to work across various blockchain environments, including mainnets, rollups, and cross-chain scenarios1.
* **Modular Approach:** VaultCraft's risk assessment strategy is scalable, starting with monitoring guards and simulations, with potential for growth into prevention and on-chain verification1.
* **Prevention Mechanism:** VaultCraft is developing a proactive security policy enforcement system with Guardrail to defend against risky transactions before they occur

By employing this comprehensive methodology, VaultCraft aims to maintain optimal risk-adjusted yields for the vaults they manage while ensuring stability and security in varying market conditions.


# VaultCraft VCI & SDK

Build custom, automated DeFi strategies and deploy them in minutes

<figure><img src="/files/RIzAadKsrvg45mkU5xQf" alt=""><figcaption><p><a href="www.vaultcraft.io">www.vaultcraft.io</a></p></figcaption></figure>

## What is *VaultCraft*?

🗞️  [**White Paper**](https://github.com/code-423n4/2023-01-popcorn//blob/main/WhitePaper.pdf) 🗞️

VaultCraft is an on-chain, permissionless protocol where anyone can spin up a vault — an automated asset strategy that optimizes returns on user-deposited funds. This is the first open infrastructure allowing for the modularization of vaults using a protocol-endorsed VaultFactory that ensures the safety of the strategy and its contracts. Vaults can interact with a variety of protocols through the ERC4626-Wrapper and are also stackable in design, meaning you can stack on top of other vaults.&#x20;

{% hint style="success" %}

### **Features**

* On-chain
* Decentralized
* Permissionless
* Non-Custodial
* Audited by **Code4rena**, **BlockSec**, and **0xRuhum**
* Bounties **on Immunefi**
* Medium Announcement: [Article](https://medium.com/popcorndao/vaultcraft-by-popcorn-7490d2b1e419)
  {% endhint %}

VaultCraft provides specialized module functionality for trading, leveraging, staking, and more. The protocol dramatically reduces the required capital and time to market for any B2B enterprise looking to quickly expand its DeFi offering and allows anyone with little coding knowledge to mix and match both protocols and strategies to create sophisticated DeFi products within just a few clicks.

## Why did we build VaultCraft?

The protocol will serve as the on-chain infrastructure providing modular tooling for both B2B enterprises and retail to easily create automated yield-generating asset strategies. Not only will the protocol allow VaultCraft to dramatically scale up its product offering and create more revenue streams for both VaultCraftDAO and funding public goods, but it will also serve as DeFi’s AWS equivalent offering scalable solutions for new protocols. VaultCraft will do for the yield space what Uniswap did for AMMs.

{% hint style="info" %}
The VaultCraft SDK is used to create all of VaultCraft's vault strategies
{% endhint %}

<figure><img src="/files/NjiU4TpftYskaCDLrgup" alt=""><figcaption><p>Customize your own vault</p></figcaption></figure>


# VaultCraft Interface (VCI)

Use the VaultCraft Interface (VCI) to customize your own vault

## How do I create a Vault?

Below are the steps for creating a non-custodial, permissionless vault strategy on-chain using [app.vaultcraft.io](https://docs.vaultcraft.io/products/vaultcraft-vci-and-sdk/www.app.vaultcraft.io)**.**

1. Select an asset ETH, USDT, DAI, etc.
2. Select a VaultCraftDAO-endorsed DeFi protocol
3. Select a strategy (compounding, leveraging, trading)
4. Configure your fees (performance, management, deposit, withdrawal)
5. Configure deposit limits (min, max)

{% hint style="success" %}

#### &#x20;Step 1 - Select an Asset

{% endhint %}

<img src="/files/GGmjqVedNLD5NzkRSAjj" alt="" data-size="original">

{% hint style="success" %}
**Step 2 - Select a VaultCraft-endorsed protocol**
{% endhint %}

![](/files/RjndBdTjeGfdcT2rZVBm)

{% hint style="success" %}
**Step 3 - Select a strategy**
{% endhint %}

![](/files/ghfCSDXK6hxUSLrqlSUY)

{% hint style="success" %}
**Step 4 - Configure your fees**
{% endhint %}

![](/files/v5cIv95wGZgQT3HaNvbD)![](/files/adbcmIyE8yi0Y39EIbtw)

{% hint style="success" %}
**Step 5 - Configure deposit limits fees**
{% endhint %}

![](/files/2LVjO3vivfyzZbqUAtUY)

{% hint style="success" %}
**Step 6 - Review**
{% endhint %}

![](/files/pBqYLKrJpNyB694c4psO)

{% hint style="success" %}
**Step 7 - Launch vault on-chain**
{% endhint %}


# SDK

VaultCraft SDK enables instant yield optimization on any asset

<figure><img src="/files/GeQWL24YgiK30e5E4Sdl" alt=""><figcaption><p>dApp: app.vaultcraft.io</p></figcaption></figure>

## About

Our SDK provides everything an integration partner would need to display, interact and manage vaults. The SDK is split into three parts:

### 1. Vault

Provides all necessary functions to view and interact with any vault in our system in a seamless fashion.&#x20;

* Deposit/Withdraw
* Zap from any chain (coming soon)
* view APY and deposits&#x20;
* Manage your fees&#x20;

### 2. YieldOptions

This can be used to display supported assets, protocols,and corresponding APY’s. This data can be used to compare potential yield sources or recommend the best farms for each asset of a user's portfolio.

### 3. Factory

Our last class makes it super easy to create any kind of vault. Experienced users can simply see configuration options and receive recommended values while beginners can get a whole vault constructed with merely a click.

At this moment VaultCraft fully supports over 1,000 assets across 30 protocols and we continuously add new assets, protocols and networks.

## Coming Soon

***Rebalancing Vaults***&#x20;

Vaults that support a multitude of strategies and protocols that can automatically rebalance funds to adapt to rate changes on the underlying strategies. Once created a user can decide which strategies and assets can be used. The vault then rebalances funds and strategies for the highest current yield. For example, rebalancing can be set up conservatively to profit on rate differences between Compound, Aave and Morpho OR include a massive amount of different protocols depending on the users risk appetite.

***Tranches***&#x20;

Allow anyone to deploy tranches for our vaults. With tranches, users can choose to limit their upside for each vault but protect their principle and get a fixed yield rate (senior tranche). Alternatively a user can choose the junior tranche to earn more yield but also take on more risk.

***Risk Score, Monitoring and Insurance***&#x20;

To make vaults even safer we plan to develop a risk score for assets, protocols and strategies to accurately describe risk for depositors. Additionally we are working on an automated system to detect hacks and unusual behavior which can be used to automatically pause vaults that might be affected. Lastly we are reviewing multiple insurance protocols to provide our users with additional safety and peace of mind.

## Smart Contracts

Each asset strategy contains two types of contracts:

### Vault

A simple ERC-4626 implementation that allows the creator to add various types of fees and interact with other protocols via any ERC-4626 compliant Adapter. Fees and Adapter can be changed by the creator after a ragequit period.

### Strategy

An immutable contract that wraps existing yield opportunities and can be enhanced with arbitrary modules to perform various tasks from compounding, leveraging, or simply forwarding rewards.


# Developer Docs

The VaultCraft SDK is written in TypeScript and utilizes Viem for all contract interactions. The SDK is divided into multiple classes, each of which can be integrated individually based on its specific use case.


# YieldOptions

The YieldOptions class lets you access yield data for various protocols on multiple chains. Use it to compare farm yields for your assets or discover new opportunities. It covers supported protocols, assets, and expected yields across different networks.

We currently support the following networks and protocols, with more being added soon:

```tsx
Ethereum
├── Aave V2
├── Aave V3
├── Aura
├── Balancer
├── Beefy
├── Compound V2
├── Compound V3
├── Convex
├── Curve
├── Flux
├── Idle
├── Origin
├── Yearn
```

### Initialization

To set it up, provide a yield data source and specify the cache duration (in seconds).

```tsx
const ttl = 3600; // cache for 1 hour
const yieldOptions = new YieldOptions(provider, ttl);
```

### Choose Provider

#### Cached Provider

The CachedProvider is the most efficient solution. It is a simple wrapper class for static yield data. You pass it a URL pointing to a JSON file on initialization and it stores the data in memory.

```tsx
const provider = new CachedProvider();
await provider.initialize("<https://raw.githubusercontent.com/Popcorn-Limited/apy-data/main/apy-data.json>");

const ttl = 3600;
const yieldOptions = new YieldOptions(provider, 3600);
```

#### Protocol Provider

The LiveProvider utilizes real-time yield data obtained from on-chain contracts or the protocol's API. To access on-chain data, it requires a connection to a viem public client.

```tsx
const ttl = 3600;
const clients = {
    1: createPublicClient({
        chain: mainnet,
        transport: http()
    }),
};
const provider = new LiveProvider(clients, ttl);
const yieldOptions = new YieldOptions(provider, ttl);
```

> Check our [GitHub](https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/vault.md) for available methods.


# Vault

The Vault class wraps a given vault contract and provides all necessary view and write functions to interact with any given vault.

> Currently we are using the word **`Adapter`** and **`Strategy`** interchangeably. In V2 we will simplify this wording to name every yield-earning contract a **`Strategy`**.

### Initialization

The Vault class must be created for each vault contract you wish to interact with. To initialize it, you'll need the vault's address, a public client for reading, and a wallet client for making changes. We use viem's public and wallet clients.

* The public client fetches data from the chain using a JSON-RPC API
* The wallet client connects with an Externally Owned Account (EOA) to enable user transaction signing.

To find the addresses of all existing vaults on a chain, you can use the "allVaults" function of the VaultRegistry contract, such as through etherscan.

Find current VaultRegistry addresses here:

```tsx
mainnet: "0x007318Dc89B314b47609C684260CfbfbcD412864"
optimism: "0xdD0d135b5b52B7EDd90a83d4A4112C55a1A6D23A"
arbitrum: "0xB205e94D402742B919E851892f7d515592a7A6cC"
polygon: "0x2246c4c469735bCE95C120939b0C078EC37A08D0"
bsc: "0x25172C73958064f9ABc757ffc63EB859D7dc2219"
```

We are developing a VaultRegistry class for our SDK to simplify this process. Additionally, our app will soon include a dedicated page for you to conveniently view and manage all your vaults.

To initialize the Vault class simply follow this example:

```tsx
const vaultAddress = "0x5d344226578DC100b2001DA251A4b154df58194f",
const publicClient = createPublicClient({
  chain: mainnet,
  transport: http()
})
const walletClient = createWalletClient({
  chain: mainnet,
  transport: custom(window.ethereum)
})

const vault = new Vault(vaultAddress, publicClient, walletClient);
```

> Check our [GitHub](https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/vault.md) for available methods.


# VaultController

The VaultController class wraps a given vaultController contract per chain and provides all necessary write functions to manage your vaults. Any kind of vault management functions from changing **`Strategies`**, **`Fees`** or similar are done through this class.

Most changes to vaults have to go trough a two-step process. The vault creator (owner) must propose changes and than wait till a **`quitPeriod`** of 1-7 days has passed before anyone can enact the proposed changes. This gives vault users time to withdraw their funds from the vault should they not accept the proposed changes.

> Currently we are using the word **`Adapter`** and **`Strategy`** interchangeably. In V2 we will simplify this wording to name every yield-earning contract a **`Strategy`**.

### Initialization

VaultController needs to be instantiated once per chain. To initialize a VaultController class you need the vaultController address of that chain, a public client to read view functions and a walletClient to send write calls. We simply use [viems](https://viem.sh/) [public-](https://viem.sh/docs/clients/public.html) and [wallet client](https://viem.sh/docs/clients/wallet.html).

* The public client fetches data from the chain using a JSON-RPC API
* The wallet client connects with an Externally Owned Account (EOA) to enable user transaction signing.

We currently support the following networks, with more being added soon. Find all current VaultController addresses right here:

```tsx
mainnet: "0x7D51BABA56C2CA79e15eEc9ECc4E92d9c0a7dbeb"
optimism: "0x757D953c53aD28748aCf94AD2d59C13955E09c08"
arbitrum: "0xF40749d72Ab5422CC5d735A373E66d67f7cA9393"
polygon: "0xCe22Ff6d00c5414E64b9253Dd49a35e0B9Ea8b60"
bsc: "0x815B4A955169Ba1D66944A4d8F18B69bc9553a62"
```

To initalize the VaultController class simply follow this example:

```tsx
const vaultControllerAddress = "0x7D51BABA56C2CA79e15eEc9ECc4E92d9c0a7dbeb",
const publicClient = createPublicClient({
  chain: mainnet,
  transport: http()
})
const walletClient = createWalletClient({
  chain: mainnet,
  transport: custom(window.ethereum)
})

const vaultController = new VaultController(vaultControllerAddress, publicClient, walletClient);
```

### Methods

#### Change Adapter

**`[**proposeVaultAdapters(vaults: Address[], adapters: Address[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#proposevaultadaptersvaults-address-adapters-address-options-writeoptions-promisehash>)`**

Proposes a new adapter for the selected vaults. The adapters must have been previously deployed through VaultCrafts protocol. ERC-4626 compliant contracts from other protocols can not be used. Adapters can be used for multiple vaults though.

The account calling this function must be the **`creator`** (owner) of all selected vaults.

```tsx
const txHash = vaultController.proposeVaultAdapters(["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"],["0x612465C8d6F1B2Bc85DF43224a8A3b5e04F634fc", "0xE48d33e869f874D6BEe3701beF22ae72c60A3b3c"]);
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

`[**changeVaultAdapters(vaults: Address[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#changevaultadaptersvaults-address-options-writeoptions-promisehash>)`

Sets the previously proposed adapters as the new active adapters for selected vaults. This will move all funds from the old adapter into the new one. Anyone can call this function once new adapters were proposed and the `vault.quitPeriod()` has passed (`now() > vault.proposedAdapterTime() + vault.quitPeriod()`). This function takes fees before setting the new fee structure. The function will also reset `vault.proposedAdapter()` and `vault.proposedAdapterTime()`.

```tsx
const txHash = vaultController.changeVaultAdapters(["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"]);
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

#### Change Fees

`[**proposeVaultFees(vaults: Address[], fees: VaultFees[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#proposevaultfeesvaults-address-fees-vaultfees-options-writeoptions-promisehash>)`

Proposes a new fee structure for the selected vaults. Fees can range from 0 - 1e18 whereby 1e18 equals 100% (1e12 = 1 Basis Point). Fees are calculated in assets. When taking fees these will be minted as vault shares to the `vault.feeRecipient()` and therefore continue to earn yield.

The account calling this function must be the `creator` (owner) of all selected vaults.

The four fee types are:

* **Deposit Fee:** Deposit fees take a percentage of deposited assets on each `vault.deposit()` or `vault.mint()` call.
* **Withdrawal Fee:** Withdrawal fees take a percentage of withdrawn assets on each `vault.withdraw()` or `vault.redeem()` call.
* **Management Fee:** Management fees are continuously applied on the total value of deposits. A fee of 5% for example should take 5% of `vault.totalAssets()` over the span of a year. Note that the vault doesnt necessarily need to accrue any yield in order for this fee to apply. A user could theoratically therefore end up with less assets than before.
* **Performance Fee:** Charge a fee whenever the share value reaches a new all time high in terms of assets per share. The fee will only be applied to gains realized by the vault, never the principal. Lets assume we have a performance fee of 20% and our vault realizes gains of 10% in assets. Our vault would now take 20% of these 10% or simply 2% of the vault value. If the vault doesnt earn any yield this fee will never be applied.

```tsx
const txHash = vaultController.proposeVaultFees(
  ["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"],
  [{ deposit: 0, withdrawal: 0, management: BigInt("1e16"), performance: BigInt("1e17") },
  { deposit: 0, withdrawal: 0, management: 0, performance: BigInt("1e17") }]
  );
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

VaultFees are defined as:

```tsx
type VaultFees = {
    deposit: bigint;
    withdrawal: bigint;
    management: bigint;
    performance: bigint;
};
```

`[**changeVaultFees(vaults: Address[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#changevaultfeesvaults-address-options-writeoptions-promisehash>)`

Sets the previously proposed fees as the new active fees for selected vaults. Anyone can call this function once fees were proposed and the `vault.quitPeriod()` has passed (`now() > vault.proposedFeeTime() + vault.quitPeriod()`). This function takes fees before setting the new fee structure. The function will also reset `vault.proposedFees()` and `vault.proposedFeeTime()`.

```tsx
const txHash = vaultController.changeVaultFees(["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"]);
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

`[**setVaultFeeRecipients(vaults: Address[], recipients: Address[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#setvaultfeerecipientsvaults-address-recipients-address-options-writeoptions-promisehash>)`

Sets new fee recipients for selected vaults. The new fee recipients must be valid addresses and cant be the zero address. Its important to not that already minted fee shares wont be transfered to the new fee recipient.

The account calling this function must be the `creator` (owner) of all selected vaults.

```tsx
const txHash = vaultController.setVaultFeeRecipients(
  ["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"],
  ["0xd8da6bf26964af9d7eed9e03e53415d37aa96045","0xd8da6bf26964af9d7eed9e03e53415d37aa96045"]);
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

#### Pausing

`[**pauseVaults(vaults: Address[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#pausevaultsvaults-address-options-writeoptions-promisehash>)`

Pause the selected vaults to prevent users to deposit. Assets will remain in the strategies of each vault and can still be withdrawn by vault users.

The account calling this function must be the `creator` (owner) of all selected vaults.

```tsx
const txHash = vaultController.pauseVaults(["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"]);
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

`[**unpauseVaults(vaults: Address[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#unpausevaultsvaults-address-options-writeoptions-promisehash>)`

Unpause the selected vaults to allow users to deposit again.

The account calling this function must be the `creator` (owner) of all selected vaults.

```tsx
const txHash = vaultController.unpauseVaults(["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"]);
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

#### Other

`[**setVaultDepositLimits(vaults: Address[], limits: bigint[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#setvaultdepositlimitsvaults-address-limits-bigint-options-writeoptions-promisehash>)`

Sets a new deposit limit in assets for selected vaults. Use this function if you want to slowly scale TVL in your vaults.

The account calling this function must be the `creator` (owner) of all selected vaults.

```tsx
const txHash = vaultController.setVaultDepositLimits(
  ["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"],
  [BigInt("1e27", "1e27")]
  );
// txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"
```

`[**setVaultQuitPeriods(vaults: Address[], quitPeriods: bigint[], options: WriteOptions): Promise<Hash>**](<https://github.com/Popcorn-Limited/vaultcraft-sdk/blob/main/docs/overview.md#setvaultquitperiodsvaults-address-quitperiods-bigint-options-writeoptions-promisehash>)`

Sets new quit periods in seconds for selected vaults. New quit periods must be within 1 day and 7 days. Cant be called if a new fee or adapter has been recently proposed. (You have to wait atleast after the `proposalTime + quitPeriod` is passed)

The account calling this function must be the `creator` (owner) of all selected vaults.

`const txHash = vaultController.setVaultQuitPeriods( ["0x5d344226578DC100b2001DA251A4b154df58194f", "0x3D04Aade5388962C9A4f83B636a3a8ED63ea5b4D"], [BigInt("86400"),BigInt("86400")] ); // txHash = "0xb315ebed9539d8f46c1b3f95a538ff38db9716f83fd37789d2458f2b6c812bb6"`


# Zap into Vaults

Deposit with any asset from any chain

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

## Effortless Yield Optimization

VaultCraft's goal is to make depositing into vault strategies as frictionless as possible. That's why VaultCraft's vaults accept direct deposits in any token from any chain, reducing the steps required to deposit.

Typically a user needs to obtain the required deposit token for a DeFi product from another protocol, a DEX, or a CEX. If this an on-chain transaction, gas required for the tx. For example, Alice has DAI but wants to deposit into a USDC vault. She would need to swap on a DEX for USDC, spend gas, and THEN deposit. Perhaps she's more of a CEX user and wants to place a market order on X Exchange.

None of this is necessary with VaultCraft's vaults. All you have to do is:

1. Connect your wallet to the Dapp
2. Deposit **ANY ASSET FROM ANY CHAIN**
3. Chill while you 📈

This would not be possible without Enso, OpenOcean, and 1inch 🫡


# VAULTRON

Vaultraft's NFT reward optimizer

Introducing **VAULTRON**, VaultCraft’s new NFT reward optimizer, a collaboration with 0xmercle.

**Features:**

* 🤖 Mint **VAULTRON** for free on Polygon
* 🎮 Engage with VaultCraft & earn XP points
* 🎚️ Level up from **Bronze** to **Silver** to **Gold**
* 🪂 Get **VCX airdrops**&#x20;


# VCX

Supercharge VaultCraft with VCX, the protocol governance token

<figure><img src="/files/0vmPYC3kjuXut9SuJ8Ul" alt=""><figcaption><p>oVCX Flowchart</p></figcaption></figure>

## What is VCX?

VCX is a governance  token that aligns incentives across all VaultCraft stakeholders and is designed to further optimize the following:

{% hint style="success" %}

* **Protocol revenue**
* **Smart Vault yield**
* **VaultCraft utilization**
* **Token liquidity**
* **Token velocity**
  {% endhint %}

## **New Features**

VCX is required to participate in protocol governance and is used for liquidity provisioning specifically to be able to vote on how rewards are distributed to Smart Vault gauges. This disincentivizes farming-and-dumping and encourages long-term liquidity provisioning by aligning the interests between LPs and VCX holders.

* **Vote-locked VCX is now a Balancer LP token** - VaultCraft uses the Balancer 80VCX-20WETH LP token as the lock token, meaning you need to lock the 80VCX-20WETH LP token to vote on where rewards are distributed
* **Gauges** - Staking contract on Smart Vaults that are distributed oVCX according to your vote-escrowed VCX LP position
* **Reward token is now a call-option for VCX** - Reward tokens are now call options on VCX (**oVCX**), enabling the protocol to accumulate much more in cash reserves regardless of market conditions, as well as letting loyal VCX holders buy VCX at a discounted price.
* **Max boost enabled for Smart Vaults** - VaultCraft gives a 5X max boost to LPs who have vote-escrowed VCX LP

#### VCX

* A governance token for incentivizing liquidity

#### veVXC (vote-escrowed VCX LP)

* veVCX is based on Curve’s [veCRV 1](https://curve.readthedocs.io/dao-vecrv.html)
* Used for voting for governance proposals
* Used for voting on gauge weights

#### oVCX

* oVCX is a call option token for VCX that lets its holder purchase VCX at a discount to the market price. oVCX does not expire.


# VCX

A liquidity incentive token

## VCX Distribution

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

<table data-full-width="false"><thead><tr><th>Category</th><th>Amount</th><th>%</th></tr></thead><tbody><tr><td>Liquidity</td><td>75,000,000.00</td><td>7.50%</td></tr><tr><td>Partner incentives</td><td>100,000,000.00</td><td>10.00%</td></tr><tr><td>Fundraising</td><td>125,000,000.00</td><td>12.50%</td></tr><tr><td>Burn matching</td><td>100,000,000.00</td><td>10.00%</td></tr><tr><td>oVCX emissions</td><td>100,000,000.00</td><td>10.00%</td></tr><tr><td>Team</td><td>120,000,000.00</td><td>12.00%</td></tr><tr><td>General Public</td><td>379,996,998.20</td><td>38.00%</td></tr></tbody></table>

### **VaultCraft multisigs**

VaultCraftDAO has retained and repurchased approximately 40% of the POP supply and will convert this into VCX. This treasury will be managed via a multi-sig and allocated across the following 4 subcategories:

**Liquidity**

Treasury funds allocated to providing liquidity directly (from the treasury) and indirectly (through market makers) on Balancer and CEXs.&#x20;

**Partner Incentives**&#x20;

Treasury funds reserved for oVCX redemptions for assets issued through the [VaultCraft Partner Progam](/welcome-to-vaultcraft/partner-with-us/vaultcraft-partner-program) or other similar programs.

**Fundraising**

Treasury funds reserved for future fundraising in the form of private or public sales.

**Burn Matching**

Treasury funds reserved to be burned as oVCX issued through gauges in redeemed, as outlined by the [Treasury Burn Program](/tokenomics/vcx/treasury-burn).

### **oVCX emissions**

VCX loaded into the oVCX redemption smart contract to fulfill redemptions from gauge emissions.&#x20;

### **Team**

Legacy category grandfathered from previous tokenomics. Portions of this allocation are still vesting.

### **General Public**

Publicly-owned, fully-vested VCX. Note that the value of this category will not be definitively known until POP-VCX conversion window has closed.

***See below for POP token allocation***

{% content-ref url="/pages/Xgv7MktwC96lS0q8j66D" %}
[Old POP Tokenomics](/tokenomics/vcx/vcx/old-pop-tokenomics)
{% endcontent-ref %}


# Old POP Tokenomics

Token distribution for POP, see VCX for updated distribution

## POP Distribution

![](/files/pAW4MkFJRiMHt2A3OrwN)

### **POP Ecosystem**&#x20;

The total amount of tokens reserved for liquidity mining, incentives, and grants. These incentives and grants are specifically for users of Popcorn’s DeFi products, and those who make valuable contributions to the protocol.

### **Early Contributors**&#x20;

Supporters who funded development and operations to build out Popcorn.

### **Team**&#x20;

Core contributors.

### **Partners**/**Advisors**

Organizations and individuals who help Popcorn develop and evangelize the product and vision.

### **Foundation**&#x20;

The organization committed to bootstrapping the development of the Popcorn smart contracts, driving decentralization, onboarding non-profit beneficiaries, and ensuring the values of the Popcorn Foundation charter are upheld by all beneficiaries.

### **Liquidity Bootstrapping Pools**&#x20;

Liquidity bootstrapping pools were used to bootstrap liquidity on decentralized exchanges through a fair launch auction mechanism. These pools were launched simultaneously on Ethereum and Polygon and were the first opportunity for the general public to acquire **POP** to participate in the governance of the network. Proceeds were split between  Popcorn Treasury, a smart contract entirely POP token holders, and the liquidity pools on decentralized exchanges like Uniswap and Sushiswap.

#### **Airdrop**&#x20;

This refers to POP token transfers for further decentralizing and rewarding the Popcorn community.

## POP Release Schedule

<figure><img src="/files/7URbhrq5FT86oVrEqaHy" alt=""><figcaption><p>Note: Only 0.5% of total supply has been distributed via AirDrops. A further 1.5% has been designated for future distribution</p></figcaption></figure>


# Voting Power

A governance token

Participating in VaultCraftDAO governance on snapshot requires that an account have a balance of VCX.&#x20;

## **VCX Utility**

* **Governance voting**: Vote on governance proposals such as listing new gauges, changing protocol parameters, and approving budgets.
* **Gauge weights voting**: Vote on how gauge rewards are distributed across different gauges.
* **Boost gauge rewards**: Hold veVCX to boost your Sweet Vault yield earned from gauges.
* **Receive bribes for voting**: Get rewarded for voting on certain gauges.
* **Receive protocol revenue**: Earn a share of the protocol’s revenue (TBD)

## **Provide liquidity for veVCX**

Users must provide liquidity in the Balancer 80VCX-20WETH pool for veVCX. This is a non-standard ERC20 implementation of each account’s voting power. One 80VCX-20WETH LP locked for 4 years provides an initial balance of one veVCX.

$$
veVCX = bpt amount \* daysLocked / 1460
$$

For example

* 1 LP with 1-year lock = 0.25 veVCX
* 1 LP with 2-year lock = 0.5 veVCX
* 2 LP with 1 year lock = 0.5 veVCX

Lock duration veVCX exchange value is subject to change.

## **Boost your oVCX rewards by holding veVCX:**

Farmers who provide liquidity to Smart Vaults will boost their oVCX rewards depending on their veVCX balance. This encourages farmers to also be token holders and provide liquidity for the token, which further disincentivizes farming-and-dumping.

Please check our [Boosting](/tokenomics/vcx/boost) docs for more details.

## **Unlock**

There are two options for unlocking locked veVCX:

1. waiting until your vote lock expires and unlocking penalty-free
2. unlock veVCX with a 25% penalty. Penalties are redistributed back to the protocol admin in the form of 80VCX-20WETH LP tokens. VaultCraftDAO can vote on whether the LP tokens are burned or redistributed back to veVCX holders.


# oVCX

A call option on VCX | A reward token

oVCX is a call option token for VCX that lets its holder purchase VCX at a discount to the market price. Unlike regular options, oVCX does not expire. The discount price is set by VaultCraftDAO governance.

## **oVCX rewards**

oVCX is given to VaultCraft liquidity providers as an incentive. You will need to provide liquidity on VaultCraft Smart Vaults and stake in gauges to receive oVCX incentives.

## **Why oVCX?**

Replacing VCX rewards with oVCX rewards is a strategic move to accumulate more in protocol revenue that can be used for buyback and hiring additional resources, for example, and lets loyal VCX holders buy VCX at a discounted price.

#### **oVCX example:**

Let’s say VCX is $100 and a call option gives user oVCX the perpetual right to buy VCX at 90% of market price. VaultCraft issues 1 oVCX to farmer Bob who immediately exercises the option to buy 1 VCX for $90 and sell it on a DEX for $100.

Total gains & losses:

* VaultCraft protocol: -1 VCX, +$90
* farmer Bob: +$10
* DEX LPs: +1 VCX, -$100

VS. total gains/losses for straight VCX farming:

* VaultCraft Protocol: -1 VCX
* Farmer Bob: +$100
* The DEX LPs: +1 VCX, -$100

We have the following observations, where oVCX achieves:

* **Incentivization efficiency for protocol cash flow** - The higher the discount, the more efficient incentivization, at the expense of protocol revenue.
* **Revenue reallocation** - Revenue generated by farmers is not transferred to the Popcorn protocol, without affecting the LP.
* **Continuous token sale** - Users are incentivized to LP the Balancer 80VCX-20WETH pools to acquire VCX at a discounted price and then sell on the market.
* Much higher protocol revenue - Users are incentivized to LP the Balancer 80VCX-20WETH pools to acquire VCX at a discounted price and then sell on the market.

Over time, protocol ownership will be transferred to LP’s and then to the farmers who are providing liquidity. Given VCX can now be acquired at a discount only if a user provides liquidity, we can assume there to be less sell pressure as users would want to increase their veVCX to improve their yield on Smart Vaults via gauge as well as earn protocol revenue.

#### Gauges <a href="#gauges-6" id="gauges-6"></a>

oVCX incentives are distributed among different gauges based on how veVCX gauge distribution. Smart Vault LPs stake their LP tokens in gauges to receive oVCX incentives that are distributed to the Smart Vault gauges.

VaultCraft gauges are based on Curve gauges. Read the Curve [docs](https://curve.readthedocs.io/dao-gauges.html) to learn more.

**oVCX example:**

1. Provide liquidity to a Smart Vault that has a gauge
2. Stake your LP tokens into the gauge
3. oVCX rewards are distributed over time, which need to be claimed from the gauge contract


# Boost

Increase veVCX to boost arbitrage with oVCX

VCX LP holders that lock their LP tokens on app.vaultcraft.io/boost can boost the amount of oVCX rewards they receive from gauges by increasing the size of their LP positions. This means liquidity providers would need to increase the size of their position in the Balancer pool. The weight of a liquidity a provider is determined using the following formula:

$$
w = min(l, 0.2 \* l + 0.8 \* L \* v / V)
$$

Max boost is 5X with this formula, which makes holding veVCX much more attractive and should theoretically increase the LP holder rate.

*w* is the weight,

*l* is the liquidity provided by LP\
*L* is the total liquidity of the pool,\
*v* is the amount of vetokens the LP has,\
*V* is the total vetoken supply.

Staking weight is relative as other stakers can also stake in the same gauge, meaning the amount of boost you receive depends not only on your veVCX balance but on the balance of others as well.


# Bribing

<figure><img src="/files/0vmPYC3kjuXut9SuJ8Ul" alt=""><figcaption></figcaption></figure>


# Protocol Revenue

Currently, VaultCraft charges the following fees on Smart Vaults

* Deposit Fee: 0%
* Withdrawal Fee: 0%
* Performance Fee: 10%
* Management Fee: 0%

This is subject to change depending on governance.

## **Revenue to Treasury**

The VaultCraftDAO treasury collects protocol revenue. Governance can pass proposals on how to distribute the revenue, such as to veVCX holders.


# Treasury Burn

Treasury VCX burn to match oVCX redemptions

&#x20;**VaultCraftDAO will burn treasury VCX 1:1 each time oVCX is redeemed for VCX**

* Approximately 100M oVCX will be distributed through gauge rewards
* Emissions of 2M oVCX per epoch for 13 epochs, followed by a decay rate of \~2.71%
* \~10%+ deflationary effect over the first 4 years assuming 100% oVCX redemption

**oVCX emissions**

For the first 13 epochs, 2,000,000 oVCX will be emitted through gauges. After this period, the amount of oVCX emitted per epoch will decrease by \~2.71% relative to the previous period.

$$
lastRate \* 1.0271e18 / 1e18
$$

E.g., 2M… 2.M, 1.947M, 1.895M, 1.845M…

oVCX emissions will continue into perpetuity, depleting nearly the entire 100M budget within the first 10 years. VaultCraftDAO governance can vote to modify this system in the future.

<figure><img src="/files/TJPyNK7ozv6BhfaHLhgj" alt=""><figcaption><p>Illustrative</p></figcaption></figure>

<figure><img src="/files/SF5YEiNEDgPQqGBmeBhZ" alt=""><figcaption><p>Illustrative, actual figures depend on oVCX redemptions and VCX market price</p></figcaption></figure>


# VCX Markets

Buy VCX

## [20WETH/80VCX Balancer Pool](https://app.balancer.fi/#/ethereum/swap/0xce246eea10988c495b4a90a905ee9237a0f91543/buy)

[Coming soon...](https://medium.com/popcorndao/pop-2-0-liquidity-on-balancer-9a33c5738e23)


# Smart Contracts

**Mainnet**

* Vault Router = 0x4995f3bb85e1381d02699e2164bc1c6c6fa243cd
* Vault Registry = 0x007318Dc89B314b47609C684260CfbfbcD412864
* Voting escrow (veVCX) = 0x0aB4bC35Ef33089B9082Ca7BB8657D7c4E819a1A
* Balancer VCX-WETH pool = 0x577A7f7EE659Aa14Dc16FD384B3F8078E23F1920
* Gauge Controller = 0xD57d8EEC36F0Ba7D8Fd693B9D97e02D8353EB1F4
* Root Liquidity Gauge Factory = 0x6aa03ebab1e9cb8d44fd79153d3a258ffd48169a
* oVCX = 0xaFa52E3860b4371ab9d8F08E801E9EA1027C0CA2
* Fee Recipients = 0x47fd36ABcEeb9954ae9eA1581295Ce9A8308655E - 0x74bb390786072ea1329f270CA6C0058b2D1Afe3f
* VCX owner = 0xB85e0d4ad9078676Ca86C6bAa51228aB3E21F5da

**Arbitrum**&#x20;

* Vault Router = 0x48943f145686bf5c4580d545cda405844d1f777b
* Vault Registry = 0xB205e94D402742B919E851892f7d515592a7A6cC
* Child Liquidity Gauge Factory = 0x6aa03ebab1e9cb8d44fd79153d3a258ffd48169a
* oVCX = 0x59a696bF34Eae5AD8Fd472020e3Bed410694a230
* Fee Recipient = 0x47fd36ABcEeb9954ae9eA1581295Ce9A8308655E

**Optimism**&#x20;

* Vault Router = 0x3828845f4d7212b6a0dc3d67482aff4544002919
* Vault Registry = 0xdD0d135b5b52B7EDd90a83d4A4112C55a1A6D23A
* Child Liquidity Gauge Factory = 0x6aa03ebab1e9cb8d44fd79153d3a258ffd48169a
* oVCX = 0xD41d34d6b50785fDC025caD971fE940B8AA1bE45
* Fee Recipient = 0x47fd36ABcEeb9954ae9eA1581295Ce9A8308655E

#### **ARCHIVE**

#### **POP smart contracts**

* **Ethereum**: [0xD0Cd466b34A24fcB2f87676278AF2005Ca8A78c4](https://etherscan.io/token/0xD0Cd466b34A24fcB2f87676278AF2005Ca8A78c4)
* **Polygon**: [0xC5B57e9a1E7914FDA753A88f24E5703e617Ee50c](https://polygonscan.com/address/0xC5B57e9a1E7914FDA753A88f24E5703e617Ee50c)
* **Arbitrum**: [0x68ead55c258d6fa5e46d67fc90f53211eab885be](https://arbiscan.io/address/0x68ead55c258d6fa5e46d67fc90f53211eab885be)
* **BNB Chain**: [`0xE8647Ea19496E87c061bBAD79f457928b2F52b5a`](https://www.bscscan.com/address/0xE8647Ea19496E87c061bBAD79f457928b2F52b5a)
* **Optimism:** [0x6F0fecBC276de8fC69257065fE47C5a03d986394](https://optimistic.etherscan.io/address/0x6f0fecbc276de8fc69257065fe47c5a03d986394)


# VaultCraftDAO

A decentralized autonomous organization

VaultCraftDAO is a decentralized autonomous organization of members holding the VaultCraft token (VCX). Participating in VaultCraftDAO governance requires that an account have a balance of vote-escrowed VCX (veVCX).\ <br>


# Guards

Smart Contract Guards using Hypernative.xyz

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

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

VaultCraft has proactive threat detection and risk management, aiming to prevent attacks before they can cause damage. Here’s how it functions and its benefits in setting up guards and monitoring smart contracts:

### Key Functions

1. **Proactive Threat Detection**: Continuous monitors for security threats, including zero-day vulnerabilities, hacks, and anomalies across various blockchain environments. This real-time detection allows projects to respond to potential exploits before they can affect users or assets.
2. **Risk Monitoring**: The platform assesses economic and governance risks related to specific projects or positions. This includes tracking on-chain and off-chain data to identify potential vulnerabilities that could be exploited by malicious actors.
3. **Automated Response Mechanisms**: VaultCraft employs automated actions and alerts that enable immediate responses to identified threats, minimizing the impact of any potential exploit. This capability is particularly vital for DeFi protocols, where swift action can prevent significant financial losses.
4. **Comprehensive Coverage**: We can identify over 200 different types of risks, including smart contract hacks, bridge security incidents, and frontend compromises. Its machine learning models enhance the accuracy of threat detection, achieving a high success rate in identifying attacks with minimal false positives.

### Benefits for Smart Contract Security

* **Real-Time Monitoring**: We have ongoing surveillance of smart contracts, ensuring that any suspicious activity is detected immediately. This continuous oversight is crucial as many vulnerabilities can arise post-deployment when contracts are live.
* **Enhanced Security Posture**: VaultCraft significantly bolster our security measures beyond initial code audits. VaultCraft emphasizes that traditional audits alone are insufficient for ongoing protection in the dynamic Web3 environment.
* **User Experience Preservation**: VaultCraft allows for targeted prevention of malicious interactions without disrupting legitimate user activities. This means that while harmful transactions are intercepted, genuine user transactions can proceed smoothly.


# Multi-sig contract Management

5/8 Signers with delay modifier

### Treasury management - 5/8 threshold <a href="#b9f5" id="b9f5"></a>

0x770F4e38615e24E9E438b30CFaBf411ec499f9B6

Signers:

* 0x28DABB7213A5338d99ab4A052a9c704a259f49A6
* 0x68075427AaBAadf3cEf1B4919b6eAC5C81509375
* 0xE9a17C00cC84fBF243B723d49A2Fd986AA598A51
* 0xD560005C85221ddd8446807CcBda4a44493a59e6
* 0xA5aEf04E03789AD15405D153a82D0b128c36988b
* 0x08A18882c04c2383043eC9C7007FbFDFBd0E5b28
* 0x7b6f5707BAE87d80c45d71C9128A3F63aa0f134a
* 0x49872B809d27baf36ad3c86720f3d40d45C7F859

### Contract management - 5/8 threshold <a href="#id-778e" id="id-778e"></a>

0xB85e0d4ad9078676Ca86C6bAa51228aB3E21F5da

Signers:

* 0x28DABB7213A5338d99ab4A052a9c704a259f49A6
* 0x68075427AaBAadf3cEf1B4919b6eAC5C81509375
* 0xE9a17C00cC84fBF243B723d49A2Fd986AA598A51
* 0xD560005C85221ddd8446807CcBda4a44493a59e6
* 0xA5aEf04E03789AD15405D153a82D0b128c36988b
* 0x08A18882c04c2383043eC9C7007FbFDFBd0E5b28
* 0x7b6f5707BAE87d80c45d71C9128A3F63aa0f134a
* 0x49872B809d27baf36ad3c86720f3d40d45C7F859

## Delay modifier set to 12 hours

<figure><img src="/files/64D2aKfiI7XXuwx5WJw6" alt=""><figcaption></figcaption></figure>


# 🛡️   Audits

VaultCraft's core smart contracts are:

* Audited
* Non-custodial
* Decentralized
* Censorship-resistant

## Audits 2024

### <mark style="background-color:orange;">Paladin</mark>

{% file src="/files/VWOoSjnCbRe8Ulgw0KMS" %}

### gjaldon

Multi-strategy audit: <https://gist.github.com/gjaldon/f3d1e2410f6e52370c8f19e72b98ea5c>\
Peapod audit: <https://gist.github.com/gjaldon/8d2067cd7b382a347c5ca4a5d01aa7c2>

## Audits 2023

#### <mark style="background-color:purple;">Code4rena</mark>

* [Contest details & results](https://code4rena.com/contests/2023-01-popcorn-contest)
* [The Ones in the Arena: PopcornDAO](https://medium.com/code4rena/the-ones-in-the-arena-popcorn-dao-af45db3793b8) (blog post byC4)
* [Github repo](https://github.com/code-423n4/2023-01-popcorn)

#### <mark style="background-color:blue;">**BlockSec**</mark>

{% file src="/files/p6ifgzpov4EGaH3IOC5k" %}

#### <mark style="background-color:orange;">Salus Security</mark>

* [ML rapid detection smart contract coverage](https://docs.google.com/spreadsheets/d/199NqAJW0HqGwGO_l11GWZqYGRlfsCmbRW6mJr3lq36M/edit?usp=sharing)

#### <mark style="background-color:red;">0xRuhum  - C4 white hat audit</mark>

* [Popcorn Audit](https://gist.github.com/0xruhum/4252cee7e84da6bb5b0a19ed00b5e34e)

## Audits 2022

#### Zokyo

* [Smart Contract Audit](https://938792658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDCUWGERi18R9emmxWwO2%2Fuploads%2FmBWIydyZzVeNBuK3u5an%2FZokyo%20Audit.pdf?alt=media\&token=2b1014dc-cf57-4130-a0ad-1b3721419ebe)

#### G0 Group

* [Security Review](https://938792658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDCUWGERi18R9emmxWwO2%2Fuploads%2F0NB6k44GVu1IW2B2mOcG%2FPopcornMay2022.pdf?alt=media\&token=4e851e48-0df7-4e3c-b165-8217838ca043)


# 🐛   Bug Bounty

## Immunefi Bug Bounty

We have an ongoing [**bug bounty on ImmuneFi**](https://immunefi.com/bounty/ribbon/), with up to $150,000 in bounties.<br>

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

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


# Non-technical QA

Learn to earn while helping improve the VaultCraft dapp

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

### Introduction:

Welcome to our UI/UX QA Bug Bounty Program! We believe in the power of community-driven development and are excited to invite skilled individuals to help us enhance the user experience and ensure the security of our decentralized application (dApp). This program encourages participants to explore the application thoroughly, identifying and reporting any UI/UX issues that may affect the overall usability and functionality.

### Scope: <a href="#scope-7" id="scope-7"></a>

The bug bounty program covers the entire functionality of the dApp. Participants are encouraged to scrutinize every aspect of the user interface (UI) and user experience (UX) without executing any transactions to avoid incurring gas fees. The focus is on identifying issues that impact the core functionality of the dApp, including but not limited to depositing or withdrawing from Smart Vaults, locking Balancer LP tokens for veVCX, voting with veVCX, claiming and executing oVCX, incorrect or missing data values, connecting a wallet, page navigation, responsiveness, visual design, branding consistency, grammar and text copy, hyperlink accuracy, and overall user satisfaction.

Note that scope of this program is focused on UI/UX of the dApp. For our smart contract testing, please visit our [Immunefi Bug Bounty](https://immunefi.com/bounty/vaultcraft/).

### Levels of Severity: <a href="#levels-of-severity-8" id="levels-of-severity-8"></a>

We have categorized the severity of identified issues into three levels to determine the reward payouts. Each level corresponds to the impact on the core functionality and the potential risk associated with the identified bug.

* Critical (High Severity):
  * Description: Issues that significantly impair the core functionality of the dApp, leading to a severe degradation of the user experience.
  * Examples:
    * Non-responsive UI failing to prompt a transaction signature
    * Critical components not loading
    * Severe visual glitches affecting important elements.
    * Any bugs hindering the completion of essential tasks.
  * Reward: 10000 oVCX
* Major (Medium Severity):
  * Description: Issues that have a noticeable impact on the user experience and may hinder the completion of specific tasks.
  * Examples:
    * Inconsistencies in UI design or branding.
    * Navigation issues affecting user flow.
    * Data, values, or charts failing to load in a reasonable amount of time.
    * Non-critical functional bugs affecting specific features.
  * Reward: 5000 oVCX
* Minor (Low Severity):
  * Description: Minor issues that do not significantly impact core functionality but may affect the overall polish and professionalism of the dApp.
  * Examples:
    * Spelling or grammatical errors.
    * Incorrect logos or naming of third-parties.
    * Cosmetic UI issues with non-essential elements.
    * Suggestions for usability improvements.
  * Reward: 1000 oVCX

### How to Participate: <a href="#how-to-participate-9" id="how-to-participate-9"></a>

1. Join the #non-technical-qa channel in [Discord](https://discord.gg/9VTn4RP4yK) to be awarded the role of “Vaultcraft Community Q\&A team” along with a different colored name tag.
2. Explore [app.vaultcraft.io](http://app.vaultcraft.io/) and thoroughly test its UI/UX.
3. Identify, document, and submit any issues, including a clear description and steps to reproduce through [Issues · Popcorn-Limited/vaultcraft · GitHub](https://github.com/Popcorn-Limited/vaultcraft/issues). Also include your Discord username to associate your submission with your contact information.&#x20;

   <figure><img src="/files/5I21phligDr0knhmCkwG" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/m7eIX7b4L0cQXcEODYHM" alt=""><figcaption></figcaption></figure>
4. The team will follow up with you directly with any questions and to confirm the validity of your submission. oVCX rewards will be distributed within 30 days of the closure of your bug submission ticket.
5. Repeat! You are encouraged to submit as many valid bugs as you can find. Remember to try different devices, browsers, input values (decimals, commas, etc), keyboard combos, and configurations.

### Rules and Guidelines: <a href="#rules-and-guidelines-10" id="rules-and-guidelines-10"></a>

* Participants must refrain from executing transactions to avoid gas fees.
* Participants are eligible for rewards for each unique, valid submission.
* Submissions must include clear and concise documentation of the identified issues.
* Duplicate submissions will not be eligible for rewards.
* Only submissions that have not been previously reported will be considered for rewards.
* Participants are expected to adhere to ethical guidelines and avoid exploiting any vulnerabilities.
* Reviewers reserve the right to define the validity of bug submissions.

### Reward Payouts: <a href="#reward-payouts-11" id="reward-payouts-11"></a>

Rewards will be paid out in oVCX, with the amount determined by the severity level of the identified issues. Payouts will be made within 30 days of the closing of a valid bug submission.


# Tutorials

Coming soon

Our tutorials will teach you everything you need to know about the following:

* **Smart Vaults**
* **Provide liquidity into the 80/20 Balancer pool for trading feels and call option rewards**
* **veVCX to earn oVCX**
* **Boost  yield with call options (oVCX)**
* **Convert oVCX to VCX**
* [**Build custom vaults**](https://youtu.be/H4iDCa37LfQ)

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

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

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

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

<figure><img src="/files/mSZuZNlPC5jJkxyRWTWf" alt=""><figcaption><p><a href="https://youtu.be/H4iDCa37LfQ">https://youtu.be/H4iDCa37LfQ</a></p></figcaption></figure>


# Websites

[**VaultCraft Website (www.vaultcraft.io)**](https://docs.vaultcraft.io/tools-and-resources/www.vaultcraft.io)

#### [VaultCraft dApp - Beta (app.vaultcraft.io)](#vaultcraft-dapp-beta-app.vaultcraft.io)


# Dashboards

dApp and token analytics

{% embed url="<https://app.vaultcraft.io/stats>" %}
Stats Dashboard
{% endembed %}

{% embed url="<https://defillama.com/protocol/vaultcraft>" %}
VaultCraft DefiLlama
{% endembed %}

{% embed url="<https://www.coingecko.com/en/coins/vaultcraft>" %}
VaultCraft CoinGecko
{% endembed %}


# Communities

#### [Twitter](https://twitter.com/VaultCraft_io)

#### [Discord](https://discord.gg/x9vpPmDa4h)

#### [Telegram](https://t.me/vaultcraft)

#### [Github](https://github.com/popcorndao)

#### [Medium](https://medium.com/vaultcraft)

#### [Forum](https://forum.vaultcraft.io/)

#### [Snapshot](https://snapshot.org/#/vaultcraft-snapshot.eth)


# Brand Assets

[**VaultCraft Brand Assets**](https://drive.google.com/drive/u/2/folders/105CL_WqYl9fEUNZaGoOJBg97iI2_7DDD)


