Offchain Voting Mechanism

Overview

Continuous locks are a feature in Curvance's voting escrow system (veCVE) that allows users to commit to a perpetual lock on their CVE tokens. This provides enhanced benefits compared to standard time-bound locks, including increased voting power and system fees.

How Continuous Locks Work

Concept and Benefits

Continuous locks eliminate the need to repeatedly renew voting escrow positions, reducing friction for users while providing additional rewards:

  • Perpetual Duration: Unlike standard locks that expire after a predefined period, continuous locks persist indefinitely until explicitly disabled.

  • Enhanced Rewards: Continuous locks receive a 2x multiplier on their point allocation, increasing voting power and potentially boosting fee allocations.

  • Flexibility: Users can switch between continuous and standard lock modes at their discretion.

State Transitions

The continuous lock system functions as a state machine with the following transitions:

  1. Initial Lock: A user creates a lock and can choose whether it's continuous or not.

  2. Standard → Continuous: A user with a standard lock can convert it to a continuous lock.

  3. Continuous → Standard: A user can disable continuous lock mode, converting to a standard lock.

  4. Consolidate Locks: Multiple locks can be combined into a single lock, either continuous or standard.

  5. Increase Lock Amount: Users can add more CVE to existing locks.

  6. Process Expired: Standard locks can be processed when expired (not applicable to continuous locks).

Key State Variables

  • userLocks[user]: Array of Lock structures for a user

  • Lock.unlockTime: Set to CONTINUOUS_LOCK_VALUE (maximum uint40 value) for continuous locks

  • userPoints[user]: Points allocated to a user, with continuous locks getting 2x points

  • chainPoints: Total points across the system

  • userUnlocksByEpoch[user][epoch]: Scheduled unlocks by epoch (only for standard locks)

Continuous Lock Impact on Rewards and Voting

Continuous locks significantly impact two key aspects of the Curvance protocol:

  • Voting Power: Continuous locks receive a voting boost, making their votes more impactful in governance decisions.

  • Reward Accrual: Users with continuous locks receive proportionally higher rewards due to their increased points in the system.

The voting power for continuous locks is calculated as:

votes = lockAmount * voteBoost / DENOMINATOR

Where voteBoost is the current voting boost multiplier configured in the Central Registry.

For standard locks, voting power decreases linearly as the lock approaches expiry:

votes = (lockAmount * (unlockTime - currentTime) / epochDuration) / LOCK_DURATION_EPOCHS

Security Considerations

  • Continuous lock mode can be enabled or disabled at any time, providing flexibility

  • When disabling continuous lock mode, the lock becomes a standard lock with a 1-year duration

  • When shutting down the system, continuous locks are automatically converted to standard locks

Last updated