Skip to content

Inflated staking limit remains frozen when recovery is zero #1822

Description

@mkurayan

Note. Reported by Statemind
https://customer.statemind.io/lido-staking-router-v3/8f61317d-5350-4b45-b1c9-1b56c28f534c

Line: Lido.sol#L948

The staking-limit accounting may retain an inflated value above the configured ceiling when recovery is disabled. In Lido.burnExternalShares(), the contract restores staking capacity through Lido._increaseStakingLimit(), which adds the burned amount to the current limit and stores the result as prevStakeLimit without constraining it to maxStakeLimit.

When Lido.setStakingLimit() is configured with _stakeLimitIncreasePerBlock = 0, StakeLimitUtils.calculateCurrentStakeLimit() derives a zero recovery rate. If prevStakeLimit has already been increased above maxStakeLimit, the function continues returning that inflated value because the decay branch subtracts zero and then takes max(prevStakeLimit, maxStakeLimit). Under this configuration, the current staking limit may therefore remain frozen above the configured maximum instead of returning to the intended cap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions