Skip to content

Conversation

@0xClandestine
Copy link
Member

@0xClandestine 0xClandestine commented Jan 10, 2025

Operator Set Performance Rewards

Adds support for AVSs to distribute performance-based rewards to operator sets.

New Functions

  • createOperatorDirectedOperatorSetRewardsSubmission() - Allows AVSs to submit rewards for specific operator sets
  • setOperatorSetSplit() - Enables operators to set their reward split percentage for a given operator set
  • getOperatorSetSplit() - Returns the current split percentage for an operator in a specific set

New Storage

  • _operatorSetSplitBips - Maps operator addresses to their split percentages per operator set
  • isOperatorDirectedOperatorSetRewardsSubmissionHash - Tracks processed reward submission hashes

New Events

  • OperatorSetSplitBipsSet - Emitted when an operator updates their split percentage
  • OperatorDirectedOperatorSetRewardsSubmissionCreated - Emitted when an AVS submits new rewards

@ypatil12
Copy link
Collaborator

Can we add a PR description + link to previous PR?

@wadealexc wadealexc force-pushed the slashing-magnitudes-fixes branch from 1427a85 to 403e0a1 Compare January 13, 2025 19:58
@0xClandestine 0xClandestine force-pushed the feat/rewardsV2.1 branch 2 times, most recently from 6ab18c0 to ad3f18e Compare January 16, 2025 19:21
@ypatil12
Copy link
Collaborator

ypatil12 commented Jan 16, 2025

Initial IMPL LGTM. Holding off an approval till we get final scope: ad3f18e

@ypatil12
Copy link
Collaborator

Can we add a test case for UAM on Rewards V2.1?

@0xClandestine 0xClandestine changed the base branch from slashing-magnitudes-fixes to dev January 28, 2025 22:33
Copy link
Collaborator

@nadir-akhtar nadir-akhtar left a comment

Choose a reason for hiding this comment

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

Implementation looks good, and test coverage is solid. Commented on some cosmetic nice-to-haves, but not blocking

feat: operator centric rewards

feat: add new interfaces

feat(wip): implement `createOperatorSetPerformanceRewardsSubmission`

chore: forge fmt

fix: compile

feat(wip): implement `setOperatorSetOperatorSplit`

fix: review changes

fix: add missing `onlyWhenPaused` + `checkCanCall`

feat(wip): add missing `getOperatorSetPerformanceSplit` + rename internals

test(wip): `setOperatorSetPerformanceSplit`

test(wip): `createOperatorSetPerformanceRewardsSubmission`

- some failing

chore: forge fmt

refactor: renaming

chore: storage report

refactor: review changes

refactor: review changes

fix: gap

refactor: review changes
@0xrajath 0xrajath requested a review from nadir-akhtar January 29, 2025 20:54
Copy link
Collaborator

@0xrajath 0xrajath left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@nadir-akhtar nadir-akhtar left a comment

Choose a reason for hiding this comment

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

All looks good security-wise. Minimal Solidity diff that parallels our existing implementation.

The storage layout checker is failing, though this is expected. It fails because it detects a diff between the storage layout of this contract between dev and this branch -- however, we're intentionally adding in 2 new storage slot variables, so no surprise.

The Certora checks are failing here, but also failing on dev, though not sure why

Good to go cc @0xrajath @0xClandestine

@0xClandestine 0xClandestine merged commit 5341ef8 into dev Jan 29, 2025
13 of 18 checks passed
@0xClandestine 0xClandestine deleted the feat/rewardsV2.1 branch January 29, 2025 22:39
@nadir-akhtar nadir-akhtar mentioned this pull request Jan 30, 2025
ypatil12 pushed a commit that referenced this pull request Feb 19, 2025
* feat: rewards v2.1

feat: operator centric rewards

feat: add new interfaces

feat(wip): implement `createOperatorSetPerformanceRewardsSubmission`

chore: forge fmt

fix: compile

feat(wip): implement `setOperatorSetOperatorSplit`

fix: review changes

fix: add missing `onlyWhenPaused` + `checkCanCall`

feat(wip): add missing `getOperatorSetPerformanceSplit` + rename internals

test(wip): `setOperatorSetPerformanceSplit`

test(wip): `createOperatorSetPerformanceRewardsSubmission`

- some failing

chore: forge fmt

refactor: renaming

chore: storage report

refactor: review changes

refactor: review changes

fix: gap

refactor: review changes

* fix: storage layout

* chore: make storage-report

* docs: natspec

* refactor: review changes

* refactor: review changes

* refactor: review changes

* feat: rewards v2.1 bindings

* fix: not index operatorSet in events

* refactor: forge fmt

* docs: updated storage reports

* chore: updated bindings

---------

Co-authored-by: 0xrajath <[email protected]>
ypatil12 pushed a commit that referenced this pull request Feb 21, 2025
* feat: rewards v2.1

feat: operator centric rewards

feat: add new interfaces

feat(wip): implement `createOperatorSetPerformanceRewardsSubmission`

chore: forge fmt

fix: compile

feat(wip): implement `setOperatorSetOperatorSplit`

fix: review changes

fix: add missing `onlyWhenPaused` + `checkCanCall`

feat(wip): add missing `getOperatorSetPerformanceSplit` + rename internals

test(wip): `setOperatorSetPerformanceSplit`

test(wip): `createOperatorSetPerformanceRewardsSubmission`

- some failing

chore: forge fmt

refactor: renaming

chore: storage report

refactor: review changes

refactor: review changes

fix: gap

refactor: review changes

* fix: storage layout

* chore: make storage-report

* docs: natspec

* refactor: review changes

* refactor: review changes

* refactor: review changes

* feat: rewards v2.1 bindings

* fix: not index operatorSet in events

* refactor: forge fmt

* docs: updated storage reports

* chore: updated bindings

---------

Co-authored-by: 0xrajath <[email protected]>
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.

4 participants