Introduction
Staking Invariant provides with passive income generated by staked tokens, which are held in liquidity pools managed by Invariant. Users are free to stake as much as they desire. In the lack of a ticks range and concentrated liquidity, the total amount of staked liquidity is straightforward to compute in the traditional model. The liquidity mining rewards may be distributed without any technical difficulty. However, the ticks range is indeterminant in a concentrated liquidity model, determining active staked liquidity is technically difficult.
A user can stake their position to get a reward after the beginning of the incentive. Each position is simply a price range, , with specific liquidity. This characteristic range is divided into tick ranges. If, and only if, the current price is at the user's active tick, a portion of the prize is charged. The number of seconds the current price was in the user's position and the amount of liquidity given by the user on a single tick are used to determine the user's share of the award program.
Users retain ownership of the position, and have the ability to collect the earned fee from trades. There may be many incentives for a particular pool, and the user may stake simultaneously their positions in any number of them to maximize their profit.
Invariant stores the seconds_per_liquidity
parameter globally for each tick, allowing us to determine the proportions of shares of a single person to all participants in the Staker incentive.
To make it easier to understand, here is a simplified mathematical formulas for determining the proportion of shares.
- the sum of all liquidity mining rewards,
- the duration of the reward distribution,
- the speed, at which reward distribution takes place.
- the sum of all liquidity mining rewards,
- the duration of the reward distribution.
- the liquidity mining reward for a position.