Restaking
Incentives
Vaults

What are Vaults?

Vaults are used to store and whitelist restaked tokens in the Tangle Network. They are used to distribute rewards to operators and delegators.

Whitelisting Blueprints for Rewards

The network allows developers to create blueprints for restaking services. These blueprints can be whitelisted for rewards, meaning services built using these blueprints can attract incentivized staking.

  • Function: whitelist_blueprint_for_rewards
  • Description: Whitelists a blueprint, allowing services using this blueprint to be eligible for reward distribution.

Reward Calculation

  • Total Reward Calculation: The total reward is calculated by multiplying the APY by the total staked amount, capped at the Vault's limit.
  • Individual Reward Calculation: Each delegator's reward is calculated as a percentage of the total reward based on the delegator’s stake in relation to the cap.

Example:

  • If a Vault has a cap of 1000 tokens and an APY of 10%, the total reward distributed will be 100 tokens (10% of 1000).
  • If a delegator staked 100 tokens, they will receive 10 tokens as a reward (10% of the total reward).

Managing Assets in Vaults

Assets can be added or removed from reward Vaults using the following functions:

Adding an Asset to a Vault

  • Function: add_asset_to_Vault
  • Description: Adds a new asset to an existing reward Vault.
  • Inputs:
    • Vault_id: The ID of the Vault to which the asset is being added.
    • asset_id: The ID of the asset being added to the Vault.

This function ensures that the asset is not already associated with a Vault before adding it.

Removing an Asset from a Vault

  • Function: remove_asset_from_Vault
  • Description: Removes an asset from a reward Vault.
  • Inputs:
    • Vault_id: The ID of the Vault from which the asset is being removed.
    • asset_id: The ID of the asset being removed.

This function ensures that the asset is part of the specified Vault before removing it.