Liquidity Incentive
The x/liquidityincentive
module incentivizes liquidity providers by distributing rewards based on their contributions to liquidity pools. It uses an epoch-based reward system and a gauge voting mechanism to allocate rewards dynamically. This module ensures sustainable liquidity provisioning while allowing users to participate in governance through gauge voting.
Key Features
Epoch-Based Reward Distribution:
Rewards are distributed at the end of each epoch.
Lazy accounting minimizes computational overhead by calculating rewards only when claimed.
Gauge Voting:
Users can vote on which liquidity pools should receive incentives.
Voting power is determined by
$vRISE
tokens (non-transferable staking tokens).
Lazy Accounting for Rewards:
Rewards are tracked using accumulators and distributed only when users claim them.
This reduces the computational load on the network.
Dynamic Incentive Allocation:
Incentives are allocated based on pool weights (gauges) determined through voting.
Core Concepts
Epochs
Two epochs exist concurrently:
Past Epoch: The epoch that has ended.
Current Epoch: The ongoing epoch.
Each epoch has the following parameters:
start_block
: The block where the epoch begins.end_block
: The block where the epoch ends.gauges
: A list of gauges (pool weights) for incentive distribution.
Gauge
A gauge represents a specific liquidity pool's weight in reward allocation.
Parameters:
pool_id
: The ID of the liquidity pool.ratio
: The voting power allocated to this pool.
Lazy Accounting
Rewards are not distributed immediately but are calculated when claimed.
Formula for calculating rewards:
Workflow
1. BeginBlocker
Creates a new epoch if:
The last epoch has ended.
No epochs exist (first epoch).
2. EndBlocker
Transfers a portion of inflation rewards from the**
x/distribution
**pool to thex/liquidityincentive
pool.
3. Reward Distribution
Rewards are accumulated in each pool's fee accumulator.
Users claim rewards by interacting with their positions in liquidity pools.
Sequence Diagram: Reward Distribution
Code Examples
Query Epoch Information:
Example Output:
See Github for details.
Last updated