Vault Package

This package provides an interface to the vault manipulation. The main entry point is the AfterburnerVault structure — a vault which users can stake coins of type Coin<STAKE> into. Any number of rewards can be added to the vault and are emitted to stakers at a rate defined by a per-reward emission schedule. Users can lock their positions when entering a vault to receive bonus rewards. Rewards can then be claimed at any interval in case of the Strict implementation or after the lock period ends in case of the Relaxed implementation.

Strict vs Relaxed implementation

Afterburner vaults allow users to lock their position to leverage the multiplicator for receiving more rewards. However, the typical caveat with locks in the fast-changing DeFi environment is that another more lucrative opportunity may appear for the user’s capital which a user may miss in case of having their assets locked.

To overcome this problem we propose a Relaxed variant of the vault — an implementation where a user may unlock their position before the lock period ends. In such a case a user will receive bonus rewards only for the time the position was locked.

On the contrary, Afterburner Vault also features a Strict version — an implementation where a user is allowed to unlock, and thus withdraw, their position only after the lock period ends.


For a Strict implementation, a user can claim their rewards at any moment.

For a Relaxed implementation, a user can claim their rewards only after the position is unlocked.


Vault Creation

Method new<STAKE> is responsible for the vault creation. It creates a new vault with no emissions. One of the parameters is lock_enforcement which enables the creation of the Strict (lock_enforcement = 0) or Relaxed (lock_enforcement = 1) vaults. After the vault is created, it has to be shared by executing the share_vault<stake> function.

For a vault to be functioning, the rewards emission should be initialized by the vault owner. This could be achieved by calling the initialize_reward<STAKE, REWARD> method that allows setting the emission schedule, emission rate, and emission delay.


Emission schedule — time period in milliseconds that passes between subsequent emission events.

Emission rate — the amount of coins emitted at emission events.

Emission delay — the time period before the emission starts.


Adding and Increasing rewards

An owner may add additional rewards to the vault by using the add_reward<STAKE, REWARD> method or increase rewards emission by using the increase_emissions_for<STAKE, REWARD> function.

Last updated