Skip to content

feat: add grove-with-delegation strategy [grove-with-delegation]#1462

Merged
ChaituVR merged 2 commits into
masterfrom
add-grove-with-delegation-strategy
Jul 14, 2026
Merged

feat: add grove-with-delegation strategy [grove-with-delegation]#1462
ChaituVR merged 2 commits into
masterfrom
add-grove-with-delegation-strategy

Conversation

@ChaituVR

@ChaituVR ChaituVR commented Jul 14, 2026

Copy link
Copy Markdown
Member

Summary

Adds the grove-with-delegation strategy for Grove protocol governance. (From telegram group)

Voting power is the actively staked GROVE balanceactiveBalanceOf of an account in the stGROVE vault (0xF3Ddcaa3BD5D04ba08beC69cf34D9d9C9c112d14). Using activeBalanceOf (rather than slashableBalanceOf) excludes stake that has already been requested for withdrawal, so an account queued to exit cannot keep voting power.

It reuses the same delegation model as the existing spark-with-delegation strategy:

  • Non-delegators get their own actively staked balance.
  • Whitelisted delegates (whitelistedDelegates param) get their own balance plus any delegated balance.
  • Non-whitelisted delegates get only their own balance (delegations to them don't count).
  • Delegators get 0 (power transfers to their delegate).

The only structural difference from spark-with-delegation is the token config: grove reads a single contract-call (activeBalanceOf) instead of erc20-balance-of + slashableBalanceOf.

Parameters

  • whitelistedDelegates (optional): addresses that should receive delegated balance. Empty/omitted → no address receives delegated balance.
  • symbol (optional): display symbol (defaults to stGROVE).

Note on CI

The strategy test currently fails the "at least 1 address with a positive score" check. This is a data, not code, issue: at the time of writing, the stGROVE vault has zero total supply on mainnet (verified at the example block and at chain head — totalSupply() and activeBalanceOf/balanceOf for all example addresses return 0). Once stGROVE has real stakers, examples.json needs to be updated with a block + addresses that carry a positive activeBalanceOf, and the suite will pass.

🤖 Generated with Claude Code

Adds the grove-with-delegation strategy for Grove protocol governance.
Voting power is the actively staked GROVE balance (activeBalanceOf on the
stGROVE vault 0xF3Ddcaa3BD5D04ba08beC69cf34D9d9C9c112d14), with the same
whitelisted-delegate handling as spark-with-delegation. Using
activeBalanceOf (rather than slashableBalanceOf) excludes stake that is
already queued for withdrawal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@tony8713 tony8713 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. CI failure is the known no-transactions-on-new-contracts case per Chaitu: all 8 test-strategy failures are the empty/no-positive-score assertions because the stGROVE vault currently has zero total supply on mainnet (at the example block and at head). Lint and the main test suite pass. Clean, self-contained strategy add mirroring spark-with-delegation, no red flags. examples.json should be refreshed with a positive-balance block once stGROVE has stakers.

@ChaituVR
ChaituVR merged commit d814c21 into master Jul 14, 2026
3 of 4 checks passed
@ChaituVR
ChaituVR deleted the add-grove-with-delegation-strategy branch July 14, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants