Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: operator set centric rewards #998

Closed

Conversation

0xClandestine
Copy link
Contributor

@0xClandestine 0xClandestine commented Jan 6, 2025

@0xClandestine 0xClandestine changed the title feat: operator centric rewards feat: operator set centric rewards Jan 6, 2025
@0xClandestine 0xClandestine self-assigned this Jan 6, 2025
OperatorSet calldata operatorSet,
uint16 split
) external onlyWhenNotPaused(PAUSED_OPERATOR_SET_OPERATOR_SPLIT) checkCanCall(operator) {
require(allocationManager.isOperatorSet(operatorSet), InvalidOperatorSet());
Copy link
Contributor

Choose a reason for hiding this comment

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

So something to think about here. Does it make sense to check if an operatorSet is valid here. Can it change for future durations or even retroactive durations? What if an operator wants to change their split for some existing reward that has a future payment but the operator set is not longer valid.

cc: @ypatil12

Copy link
Collaborator

Choose a reason for hiding this comment

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

There isn't a way to delete operatorSets & the opSet reward is (currently) retroactive, so this would come down to setting a split before the opSet exists. If we were to add the prospective opSet rewards then I think this would make sense to revisit


emit OperatorPISplitBipsSet(msg.sender, operator, activatedAt, oldSplit, split);
}

/// @inheritdoc IRewardsCoordinator
function setOperatorDirectedOperatorSetSplit(
Copy link
Contributor

Choose a reason for hiding this comment

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

to clarify, in the sidecar is the level of prescedence:

  1. operatorSet split
    if not set, then
  2. avs split
    if not set, then
  3. default

Copy link
Contributor

Choose a reason for hiding this comment

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

^ this is the case of calculating the split for an operator receiving a directed submission

@0xClandestine 0xClandestine force-pushed the feat/operator-centric-rewards branch 2 times, most recently from 7cfa2d2 to c24ffde Compare January 6, 2025 18:55
@0xClandestine
Copy link
Contributor Author

need to update gap

Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

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

Minor comments

src/contracts/core/RewardsCoordinator.sol Outdated Show resolved Hide resolved
src/contracts/core/RewardsCoordinator.sol Outdated Show resolved Hide resolved
OperatorSet calldata operatorSet,
uint16 split
) external onlyWhenNotPaused(PAUSED_OPERATOR_SET_OPERATOR_SPLIT) checkCanCall(operator) {
require(allocationManager.isOperatorSet(operatorSet), InvalidOperatorSet());
Copy link
Collaborator

Choose a reason for hiding this comment

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

There isn't a way to delete operatorSets & the opSet reward is (currently) retroactive, so this would come down to setting a split before the opSet exists. If we were to add the prospective opSet rewards then I think this would make sense to revisit

@0xClandestine 0xClandestine force-pushed the feat/operator-centric-rewards branch from d7be43c to 951d422 Compare January 7, 2025 18:35
@0xClandestine 0xClandestine force-pushed the feat/operator-centric-rewards branch 3 times, most recently from 722b3d8 to 97ff835 Compare January 10, 2025 17:46
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
@0xClandestine 0xClandestine force-pushed the feat/operator-centric-rewards branch from 97ff835 to 4d83695 Compare January 10, 2025 18:50
@0xClandestine
Copy link
Contributor Author

#1011

@0xClandestine 0xClandestine deleted the feat/operator-centric-rewards branch January 15, 2025 17:10
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.

4 participants