DeFi Concepts
Gauge System
The gauge system is a core component of our ve3,3 tokenomics model. It’s responsible for distributing rewards to different liquidity pools based on community voting. This document explains how gauges work in our platform and how to interact with them.
Key Components
- GaugeFactoryV2: The main contract for creating and managing gauges.
- GaugeV2: Individual gauge contracts created by the factory.
- Voting Mechanism: Allows ve3,3 token holders to allocate votes to gauges.
- Reward Distribution: Handles the emission of rewards based on gauge weights.
GaugeFactoryV2 Contract
The GaugeFactoryV2
contract is responsible for creating and managing gauges. It includes functions for:
- Creating new gauges
- Managing emergency modes
- Setting reward parameters
- Updating gauge configurations
Key Functions
Creates a new gauge and returns its address.
Activates or deactivates emergency mode for specified gauges.
Configure reward-related parameters for gauges.
Using Gauges
Creating a New Gauge
To create a new gauge for a liquidity pool:
- Call
createGaugeV2
on the GaugeFactoryV2 contract. - Store the returned gauge address for future reference.
Voting on Gauges
Users with locked ve3,3 tokens can vote on gauges:
- Implement a voting interface in the frontend.
- Call the voting function on the gauge controller contract.
Distributing Rewards
Rewards are distributed based on gauge weights:
- The system calculates gauge weights periodically.
- Rewards are emitted to gauges based on their relative weights.
- Users can claim rewards from gauges they’ve provided liquidity to.
Maintenance and Upgrades
Emergency Mode
In case of critical issues:
- Call
activateEmergencyMode
on GaugeFactoryV2. - This will pause reward emissions and certain gauge functions.
- Use
stopEmergencyMode
to resume normal operations.
Updating Gauge Parameters
To modify gauge settings:
- Use the appropriate setter function in GaugeFactoryV2.
- Ensure you have the necessary permissions (GAUGE_ADMIN role).
Example:
Integration with Other Components
- ve3,3 Token: Provides voting power for gauge voting.
- Liquidity Pools: Gauges are associated with specific liquidity pools.
- Merkl: Handles efficient reward distribution from gauges to users.