Vault Creation

Each vault is a smart contract. Each smart contract transparently and securely automates the actions required to operate the vault throughout its lifecycle, from managing deposits to checking the Chainlink oracle price to determining the Swapped or Unswapped scenario to sending returns, and much more.

Each vault is created by an approved Liquidity Provider (LP). The LP completes a form to create a vault, depositing the required liquidity in the process. Once a vault's smart contract has been configured, the vault is posted for discovery in the All Investments table. (For more on a vault's lifecycle, see Lifecycle of a vault.)

Smart Contract Terms: InputToken and SwapToken

In our smart contract, we use the terms InputToken and SwapToken to define the relationship between the paired tokens and the Swapped or Unswapped end scenarios (see Swapped vs Unswapped).

  • InputToken: This is the token that the Subscriber deposits for subscription. The vault's Quantity is in the InputToken. This is the token that the Subscriber will receive if the Linked Price is not reached, thus the Unswapped scenario.

  • SwapToken: This is the token that the Subscriber will receive if the Linked Price is reached, which triggers the Swapped scenario.

Swapped vs Unswapped

Swapped means that at vault expiry, the Linked Price was reached and the smart contract swapped the Subscribers' InputToken for the SwapToken. In this scenario, Subscribers also received their rewards in the SwapToken. The LP received their deposited USDC plus the USDC from Subscribers.

Unswapped means that at vault expiry, the Linked Price was not reached thus a swap of tokens does not occur. In this scenario, the smart contract sends Subscribers their principal plus rewards in the InputToken. The LP's SwapToken deposit is returned.

WBTC-USDC Buy Low - Simplified Example

Swapped

If the Linked Price of the vault is reached, Subscribers’ deposits in the InputToken (USDC) are swapped for the LP's SwapToken (WBTC), which includes the reward in WBTC.

Unswapped

If the Linked Price is not reached, Subscribers get their InputToken (USDC) returned, and the LP pays the reward in USDC.

Last updated