Skip to content

dAppStaking truly stake-and-forget via infinite Build&Earn #1589

@ipapandinas

Description

@ipapandinas

Context

After Tokenomics 3.0 removes bonus mechanics in #1586 and voting periods become ceremonial (1 era), the protocol could become fully permissionless and stake-and-forget by extending Build&Earn indefinitely.

Current Limitation

Setting eras_per_build_and_earn_subperiod = EraNumber::MAX breaks two critical maintenance mechanisms:

  • Yearly inflation recalculation (coupled to cycle boundaries via recalculation_era here)
  • Storage cleanup (coupled to Build&Earn→Voting transitions via update_cleanup_marker())

Both become inert without periodic cycle transitions.

Risk

  • Cleanup logic currently depends on PeriodEnd storage to find oldest_valid_era. Without period transitions, PeriodEnd is never written, so it needs an alternative anchor.
  • Both mechanisms are well-tested in their current form; decoupling means new invariants to validate and tests to rework.

This needs investigation to find a proper solution.

Extra Cleanup

  • Remove DynamicPercentage
  • Remove slot_number_args
  • Remove MaxNumberOfContractsLegacy and manually claim all past period rewards.
  • Prune old PeriodEnd entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dapps-stakingDapps StakingruntimeThis PR/Issue is related to the topic “runtime”.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions