feat: rewardsmanagerv2 and stipenddistributor contracts#781
Conversation
There was a problem hiding this comment.
RewardsManagerV2.sol looks good at a high level 👍
w.r.t stipends distributor contract - the delineation between an "operator" and a "receiver" isn't totally clear to me. Where/how are receivers decided? Will the operator and receiver ever be the same address? Why does the off-chain service need to specify both an "address" and "recipient" in grantStipends?
A polished README.md here explaining the protocol design, high level requirements from murat etc. would be very helpful. Examples are in the validator-registry directory. This README can also prevent a lot of intention related questions coming in from auditors
|
Further we need to more explicitly define the role of the off-chain service (can call it oracle or ideally something else etc.) in the README.md, example here. I assume |
… deployment script placeholders
…mmit into rewards-manager-v2
Describe your changes
StipendDistributor:
-Operator can override their recipient address so that stipend rewards from all keys are granted to the specified address.
-Operators set a per-pubkey stipend recipient override (this takes precedence over global override).
-Oracle to track payProposer events/beacon data during the week, resolves the key’s operator in our registries, checks the operator's configured recipient for that key in the Stipend contract, and updates the pending stipend payment to that operator->recipient. At the end of the week post cumulative accruals to accrued[operator][recipient]. Cheaper to do this by recipient rather than by key since many keys will share the same recipient
-When claiming, the operator specifies the recipients they want to claim for and they are sent their accrued[operator][recipient] payment for each recipient.
-We can let an operator delegate claim rights at recipient-level: the delegate can claim only for a specific recipient of an operator.
More information:
https://www.notion.so/primev/StipendDistributor-Design-2696865efd6f80b2a4f0e6b8fc3ab0c4?showMoveTo=true&saveParent=true
BlockRewardManager:
-payProposer() allows a builder/payee send ETH to a specified feeRecipient; an optional protocol fee (rewardsPctBps) can be turned on/adjusted.
-Fee is taken from total amount when fee is turned on; recipient gets the remainder. Fee portion accrues in contract for later withdrawal.
-Owner can withdraw the accrued protocol share to treasury.
-Events to be used by Oracle to help calculate stipend payments.
Issue ticket number and link
Fixes # (issue)
Checklist before requesting a review