Skip to content

feat(contracts): add permissionless stale-deposit redelegation and mainnet fallback operator#4894

Open
shuhuiluo wants to merge 2 commits into
towns-protocol:mainfrom
shuhuiluo:feat/permissionless-stale-redelegate
Open

feat(contracts): add permissionless stale-deposit redelegation and mainnet fallback operator#4894
shuhuiluo wants to merge 2 commits into
towns-protocol:mainfrom
shuhuiluo:feat/permissionless-stale-redelegate

Conversation

@shuhuiluo

@shuhuiluo shuhuiluo commented Jul 7, 2026

Copy link
Copy Markdown
Contributor
  • Add redelegateStaleDeposit to move an external deposit off an invalid
      operator/space onto a caller-chosen valid one, callable by anyone
  • Refactor shared redelegate logic into RewardsDistributionBase._redelegate
  • Route mainnet relay delegations to a live fallback operator when the
      L1-chosen operator is invalid, so delegators keep earning without
      re-delegating, and self-heal once their chosen operator is valid again
  • Add tests for both changes

View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

shuhuiluo added 2 commits July 5, 2026 20:58
- stakeOnBehalf let a caller pass owner == address(this), taking the
  no-token-transfer mainnet-delegation branch in _stake while still
  minting earning power, letting an attacker farm rewards for free
- add RewardsDistribution__CannotStakeToSelf and revert on that owner
- add regression test covering the revert
…innet fallback operator

- Add redelegateStaleDeposit to move an external deposit off an invalid
  operator/space onto a caller-chosen valid one, callable by anyone
- Refactor shared redelegate logic into RewardsDistributionBase._redelegate
- Route mainnet relay delegations to a live fallback operator when the
  L1-chosen operator is invalid, so delegators keep earning without
  re-delegating, and self-heal once their chosen operator is valid again
- Add tests for both changes
@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

@shuhuiluo is attempting to deploy a commit to the River Build Team Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant