Voting Power Decay

Lazy Summer Protocol implements an advanced governance system where voting power dynamically adjusts based on participation. This system combines three key elements:

  1. Voting decay that reduces influence over time

  2. Delegation chains that allow power transfer

  3. Rewards that incentivize active participation

How Voting Power Works

Your voting power in Summer Protocol comes from multiple sources:

  • Direct token holdings

  • Staked tokens in governance

  • Delegated voting power from other users

This total power is then modified by your decay factor. Starting at 100%, your voting power begins decaying after an initial grace period (60 days) with an annual decay of 10%.

Linear Decay:

  • Reduces voting power at a constant rate

  • Easier to predict and understand

Delegation System

You can delegate your voting power to other addresses, creating "delegation chains":

  • Maximum chain length: 2 levels

  • Example: Alice → Bob → Carol (valid)

  • Example: Alice → Bob → Carol → Dave (invalid, Dave gets 0 power)

Your rewards and voting power inherit the decay factor of your delegate. This means:

  • If you delegate to an active participant, you maintain higher power

  • If your delegate becomes inactive, your power decays

  • You can change delegation at any time

VotingDecayLibrary

The foundation of the decay system, managing state and calculations:

struct DecayState {
    mapping(address => DecayInfo) decayInfoByAccount;  // Per-account decay data
    uint40 decayFreeWindow;                           // Grace period before decay
    uint256 decayRatePerSecond;                      // Rate of power loss
    DecayFunction decayFunction;                     // Linear or Exponential
    uint40 originTimestamp;                         // Contract deployment time
    mapping(address => Checkpoints.Trace224) decayFactorCheckpoints; // Historical data
}

struct DecayInfo {
    uint256 decayFactor;              // Current decay multiplier
    uint40 lastUpdateTimestamp;       // Last activity timestamp
}

Key Functions:

function getDecayFactor(
    DecayState storage self,
    address accountAddress,
    function(address) view returns (address) getDelegateTo
) internal view returns (uint256)
  • Calculates current decay factor considering delegation chain

  • Follows delegation up to MAX_DELEGATION_DEPTH

  • Returns 0 for invalid/excessive delegations

function updateDecayFactor(
    DecayState storage self,
    address accountAddress,
    function(address) view returns (address) getDelegateTo
) internal
  • Updates decay factor and creates checkpoint

  • Called before power-affecting operations

  • Triggers decay smoothing in rewards

VotingDecayMath

Handles precise calculations for decay:

function exponentialDecay(
    uint256 initialValue,
    uint256 decayRatePerSecond,
    uint256 decayTimeInSeconds
) internal pure returns (uint256)
  • Uses PRBMath for precise fixed-point math

  • Handles edge cases (zero values, excessive time)

  • Prevents overflow in calculations

GovernanceRewardsManager Integration

Manages reward distribution with decay:

function earned(
    address account,
    IERC20 rewardToken
) public view returns (uint256)
  • Checks delegation status

  • Applies smoothed decay factor

  • Calculates proportional rewards

function _updateSmoothedDecayFactor(address account) internal
  • Implements exponential moving average

  • Smoothing factor: 0.2 (20%)

  • Updates on stake/unstake/claim

Decay Lifecycle

Active Period

An active account starts with a complete decay factor of 1.0 (100% voting power). A “decay-free window,” set at 60 days, protects accounts from immediate power reduction after their last activity. Performing any governance action resets the decay timer. Examples of such actions include proposing or voting on governance items, delegating tokens, canceling proposals, or executing them.

Decay Period

After the decay-free window expires, voting power declines according to the selected decay function (linear or exponential). The rate of decay is configurable, but starting at 10% yearly. This reduction continues until the account reaches a minimum threshold or participates in governance to reset the decay.

Delegation Effects

Delegation inherits the lowest decay factor in a delegation chain, up to a maximum depth of two levels. For instance:

• Alice (decay: 0.8) → Bob (decay: 0.9) → Carol (decay: 1.0)

Carol’s effective decay factor becomes 0.8 due to inheritance from Alice.

Recovery Options

Accounts can restore their full voting power in several ways:

1. Governance Participation

Performing any governance activity (e.g., proposing, voting) resets decay to 1.0 instantly. This option ensures active contributors retain maximum influence.

2. New Account Creation

Moving tokens to a new wallet address resets the decay factor. However, this approach involves higher gas costs, loss of delegation history, and the need to re-establish delegation relationships.

3. Delegation Changes

Delegating tokens to a more active account can improve decay status, as the delegate’s decay factor becomes the effective value. Note that delegation remains subject to the two-level depth limit.

Last updated

Was this helpful?