Skip to main content

Vaults

The provided documentation outlines the functionalities of the Substrate-based Unit Vault Pallet. This pallet enables users to interact with vault addresses within a blockchain environment, allowing for the addition and removal of these addresses alongside unit tokens. It offers both a user-friendly interface and integration with external blockchain networks, including but not limited to Ethereum and Bitcoin, for verifying transactions.

Overview

The Unit Vault Pallet facilitates the management of vault addresses and unit tokens, offering functionalities crucial for financial operations on the blockchain, such as staking, buying, selling tokens, and managing liquidity.

Goals

This pallet aims to:

  • Enable users to add and remove vault addresses.

  • Allow the addition and removal of unit tokens.

  • Facilitate the buying and selling of tokens using USDU (a stablecoin or unit of account within the ecosystem).

  • Provide staking and unstaking functionalities for tokens with USDU.

  • Set USDU and Unit token IDs.

  • Retrieve pool liquidity's token details.

To initiate the vault creation process and associate an address with your profile:

Profile Association:

First, ensure that your profile is associated with the desired cryptocurrency address, such as a BTC address. This address will serve as the destination for deposits made to your vault.

Locking UNIT into Vault:

When you decide to lock UNIT into a vault, you'll need to perform the action within the Unit Network platform. This action will trigger the creation of your vault.

Deposit Process:

Once your vault is created, when someone makes a deposit, they will send cryptocurrency to the specified address associated with your profile. This deposit will be directed to your vault, where the locked UNIT tokens are stored securely.

By following these steps, you can set up and activate your vault within the Unit Network platform, allowing you to securely store and manage your locked UNIT tokens.

Vault Selection

In the vault selection process, the following criteria are considered to determine the appropriate vault:

Tranche Classification:

Your vault selection is initially based on the amount of UNIT tokens you have locked, which determines your tranche. Tranches are categorized based on the locked UNIT token value ranges.

Funds Allocation:

Within each tranche, users are eligible to receive funds within a certain range based on their locked UNIT token value. For example, if you fall within the $100 to $1000 tranche, you can receive funds ranging from $0 to $100.

Risk Assessment:

If multiple vaults exist within the same tranche, the vault with the least risk is selected for fund allocation. Risk is determined by evaluating the ratio of the amount of UNIT tokens locked in dollars to the total funds already received in dollars. This calculation helps identify the vault with the lowest risk profile, ensuring the security and stability of fund allocation.

Cumulative Received Funds:

Even if you have locked fewer UNIT tokens than another user within the same tranche, you may still be chosen as the least risky vault if you have received fewer funds cumulatively. This ensures fair and equitable fund allocation based on risk assessment and previous fund disbursements.

By considering these factors, the vault selection process aims to optimize fund allocation while prioritizing risk management and stability within the Unit Network ecosystem.

Vault Operations

In the vault operations process, the following actions are undertaken:

Receiving Funds:

Upon receiving funds in your vault, your underlying balance increases accordingly. This balance represents the total value of assets that have been allocated to your vault.

Unlocking UNIT Tokens:

To unlock your UNIT tokens from the vault, you must burn an equivalent amount of your underlying balance. This means that you can redeem your locked UNIT tokens by utilizing the assets allocated to your vault.

Asset Limitation:

It is important to recognize that you cannot receive more assets in dollar worth than the value of your locked UNIT tokens. This ensures that the fund allocation process remains within the constraints of the locked UNIT token value, maintaining transparency and consistency in asset management within the vault system.

By adhering to these operations, users can effectively manage their vaults, allocate funds, and unlock UNIT tokens based on their underlying asset balances, while ensuring compliance with the limitations set by the value of their locked UNIT tokens.

Breakdown of the process:

Vault Creation:

Add an address to your profile, e.g., a BTC address.

When locking UNIT into a vault, you create one. Incoming deposits will be directed to this address.

Vault Selection:

The amount of UNIT locked determines your tranche.

Based on your tranche, you can receive funds within a specified range.

If multiple vaults are in the same tranche, the least risky one is chosen based on the ratio of locked UNITs to received funds.

Vault Operations:

Upon receiving funds, your underlying balance increases.

To unlock your UNIT tokens, burn the equivalent amount of your underlying balance.

You can't receive more assets (in dollar worth) than what your locked UNIT is worth.

Example:

Suppose you have received 1 ETH. In this case, your underlying balance would be one ETHU.

If you wish to retrieve your UNIT, you must burn one ETHU.

By burning the equivalent amount of underlying assets, users can retrieve their locked UNIT tokens, similar to repaying a loan. This mechanism ensures that users can access their locked assets while maintaining the integrity of the vault system.