Component: gauge.move
Description
This component is responsible for
Managing gauges, which distribute rewards over time to liquidity positions
Allowing users to stake and unstake their positions in an associated CLMM pool
Tracking each staked position’s accrued rewards to claim those rewards
Managing the gauge’s overall reward rate, period finish, and distribution to staked positions
Handling fees associated with the gauge in the form of
fee_a
andfee_b
Invariants
A gauge must only work with the pool it was created for.
A position can only be staked in one gauge at a time; it cannot be restaked if it is already flagged as staked.
The gauge must be marked as alive in the global config to accept new staked positions.
Only the holder of a valid VoterCap for this gauge can perform admin actions.
Test coverage
Cases covered
Create a gauge
Create a pool and verify the gauge's
pool_id
matches the newly created poolCheck that the position is marked as staked in the pool
Attempt to deposit a position into a gauge before it is marked alive in config and verify failure occurs
Cases not covered
Restaking the same position
Edge cases around timestamps like epoch boundaries