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

Rewards restructure #455

Merged
merged 34 commits into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0256e60
Minimal restructure to demo Concept/How To/Reference/Tutorial approach
MadelineAu Feb 5, 2025
f7c9d9a
fixed redirects and urls
wesfloyd Feb 5, 2025
bd627ef
Addressing review comments
MadelineAu Feb 6, 2025
feae197
Merge branch 'devRestruture' of github.com:MadelineAu/eigenlayer-docs…
MadelineAu Feb 6, 2025
96bbf96
Added redirects
MadelineAu Feb 6, 2025
5264329
fixed redirects
MadelineAu Feb 6, 2025
4e5b0bd
more redirect fixing
MadelineAu Feb 6, 2025
8bff2ec
Merge branch 'MadelineAu-devRestruture'
MadelineAu Feb 6, 2025
9f63380
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 9, 2025
af864c0
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 10, 2025
c49b0e8
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 10, 2025
7e430a0
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 17, 2025
0e1a6eb
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 18, 2025
3ed0774
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 19, 2025
8130497
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 21, 2025
37281a6
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 21, 2025
cf76167
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 21, 2025
6126940
Merge remote-tracking branch 'upstream/main'
MadelineAu Feb 23, 2025
34fad65
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 3, 2025
e8465ae
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 4, 2025
d5ab33c
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 5, 2025
18f4927
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 5, 2025
cbaee98
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 6, 2025
549d047
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 10, 2025
cd0e391
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 13, 2025
c8e803b
Merge remote-tracking branch 'upstream/main'
MadelineAu Mar 18, 2025
3689a9f
Restructured and updated Rewards docs
MadelineAu Mar 21, 2025
1602ce6
Merge remote-tracking branch 'upstream/main' into rewardsRestructure
MadelineAu Mar 21, 2025
d8e7872
fixing redirects
MadelineAu Mar 21, 2025
9c0bdb0
fixing links
MadelineAu Mar 21, 2025
fb6cd09
fixing links
MadelineAu Mar 21, 2025
1d40619
Added Operator Set split commands
MadelineAu Mar 23, 2025
b73109e
review rework and adding redirects
MadelineAu Mar 24, 2025
3594879
Merge branch 'main' into rewardsRestructure
MadelineAu Mar 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions docs/developers/Concepts/rewards.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/developers/HowTo/build/configure-rewards.md

This file was deleted.

42 changes: 0 additions & 42 deletions docs/developers/HowTo/build/rewards.md

This file was deleted.

65 changes: 65 additions & 0 deletions docs/developers/HowTo/build/submit-rewards-submissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
sidebar_position: 5
title: Submit Rewards Submissions
---

:::important
`RewardsCoordinator.createAVSRewardsSubmission` and `RewardsCoordinator.createOperatorDirectedAVSRewardsSubmission` use AVSDirectory.
The AVSDirectory method will be deprecated in a future upgrade. [All AVSs will need to migrate to Operator Sets before the upcoming deprecation of AVSDirectory](slashing/migrate-to-operatorsets.md).

If you are currently using AVSDirectory, `RewardsCoordinator.createAVSRewardsSubmission` and `RewardsCoordinator.createOperatorDirectedAVSRewardsSubmission` can continue to be used while AVSDirectory is being used.
:::

For information on Rewards concepts, refer to [Rewards Overview](../../../eigenlayer/concepts/rewards/rewards-concept.md).

Submitting rewards for an AVS is handled by the [RewardsCoorinator core contract](../../Concepts/eigenlayer-contracts/core-contracts.md).

To submit rewards submissions, use [`RewardsCoordinator.createOperatorDirectedOperatorSetRewardsSubmission`](https://github.com/Layr-Labs/eigenlayer-contracts/blob/dev/docs/core/RewardsCoordinator.md#createoperatordirectedoperatorsetrewardssubmission).

An AVS can use onchain or offchain data in rewards logic to determine the reward amount per Operator. The rewards can be calculated
based on the work performed by Operators during a certain period of time, can be a flat reward rate, or another structure based on
the AVS’s economic model. An AVS can distribute rewards in any ERC20 token.

For more flexibility, an AVS can submit multiple performance-based Operator rewards denominated in different tokens.

:::note
The reward rate for Stakers is based on the amount of stake delegated to an Operator and does not change based on the
rewards calculation per Operator by the AVS.
:::

## Implementation Notes

Each rewards submission specifies:

* Time range for which the rewards submission is valid. Rewards submissions can be retroactive from the [M2 upgrade](https://github.com/Layr-Labs/eigenlayer-contracts/releases/tag/v0.2.3-mainnet-m2)
and last up to 30 days in the future.
* List of strategies and multipliers that enables the AVS to weigh the relative payout to each strategy within a single rewards submission.
* ERC20 token in which rewards should be denominated.

Additional considerations:

* Reward roots are posted weekly on Mainnet and daily on Testnet.
* Reward roots are on a 7-day activation delay (that is, when it is claimable against) on Mainnet and 2-hour activation delay on Testnet.
* Reward amounts are calculated based on activity across a 24 hour window. Each window's amounts are cumulative and include day + (day - 1).
Reward roots are posted weekly on Mainnet based on that day's snapshot date which correlates to a 24 hour window. Mainnet and Testnet are
functionally equivalent in their calculations. The reward roots are only posted weekly for Mainnet.
* Once a rewards submission is made by an AVS, the AVS is unable to retract those rewards. If the AVS does not have any Operators opted
into the AVS on a day of an active reward, those tokens are not distributed pro-rata to future days, and are refunded to the AVS.
There are two cases where this occurs:
* An operator is not registered for the entire duration of the submission. The entire operator amount is refunded to the AVS.
* If an operator is only registered for m days out of n days duration. The operator is only paid amount/m on each of those m days.
* Operators are only distributed rewards on days that they have opted into the AVS for the full day.
* Due to the rounding in the off-chain process, we recommend not making range submission token amounts with more than 15 significant digits of precision.
If more than 15 significant digits are provided, the extra precision is truncated.
* Rewards can be made in multiple ERC-20 tokens by submitting rewards submissions for each ERC-20 token to reward in.

## When Rewards are Included
An AVSs reward submission is included in the calculation 2 days after it is submitted. For example, if the AVS submits a
rewards submission on August 2nd, it is included in the August 4th rewards calculation.

## When Rewards can be Claimed
At most, Restakers and Operators of an AVS will have to wait 16 days to claim a reward (2 day calculation delay + 7 day root
submission cadence + 7 day activation delay).

At minimum, Restakers and Operators have to wait 9 days to claim a reward.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ title: Prepare for and Deploy to Testnet and Mainnet

5. Follow the [Testnet Dashboard Onboarding instructions](https://docs.eigenlayer.xyz/eigenlayer/avs-guides/avs-dashboard-onboarding).

6. Implement Rewards distributions per the instructions [here](../build/rewards.md).
6. Implement Rewards distributions per the instructions [here](../build/submit-rewards-submissions.md).


## Preparing and Deploying to Mainnet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ To build an AVS, the minimum set of functionality to be defined in the [AVS cont
* [Managing registered Operators](../build/manage-registered-operators.md)
* [Responding to Operator registrations](../build/manage-registered-operators.md#respond-to-operator-registrations-to-operator-sets)
* [Deregistering Operators](../build/manage-registered-operators.md#deregister-operators-from-or-respond-to-operator-deregistrations-from-operator-sets)
* [Distributing Rewards](../build/configure-rewards.md)
* [Distributing Rewards](../build/submit-rewards-submissions)
2 changes: 1 addition & 1 deletion docs/developers/HowTo/get-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Get started
We are in the process of updating our samples to include Rewards and Slashing capabilities. The Hello World AVS example will be
updated as soon as possible. Use Hello World AVS now to get familiar with EigenLayer.
For more information on Rewards and Slashing, refer to the [Rewards](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-001.md) and [Slashing](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-002.md) ELIPs,
and [Rewards](../../Concepts/rewards.md) and [Slashing](../../Concepts/slashing/slashing-concept-developers) documentation.
and [Rewards](../../../eigenlayer/concepts/rewards/rewards-concept.md) and [Slashing](../../Concepts/slashing/slashing-concept-developers) documentation.
For questions or support, reach out to us using the Intercom button on the bottom right side of this page or <a href="javascript:void(0)" id="intercom_trigger_eldocs" >here</a>.
We will promptly follow up with support!

Expand Down
2 changes: 1 addition & 1 deletion docs/developers/Reference/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: Developer Resources
We are in the process of updating our samples, SDKs, and the EigenLayer CLI to include Rewards and Slashing capabilities. The samples, SDKs, and CLI will be
updated as soon as possible. Use the samples now to get familiar with EigenLayer.
For more information on Rewards and Slashing, refer to the [Rewards](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-001.md) and [Slashing](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-002.md) ELIPs,
and [Rewards](../Concepts/rewards.md) and [Slashing](../Concepts/slashing/slashing-concept-developers) documentation.
and [Rewards](../../eigenlayer/concepts/rewards/rewards-concept.md) and [Slashing](../Concepts/slashing/slashing-concept-developers) documentation.
For questions or support, reach out to us using the Intercom button on the bottom right side of this page or <a href="javascript:void(0)" id="intercom_trigger_eldocs" >here</a>.
We will promptly follow up with support!

Expand Down
2 changes: 1 addition & 1 deletion docs/eigenlayer/concepts/keys-and-signatures.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
title: Keys and Signatures
---

Expand Down
2 changes: 1 addition & 1 deletion docs/eigenlayer/concepts/operator-sets/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"position": 2,
"position": 3,
"label": "Operator Sets"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"position": 4,
"position": 1,
"label": "Rewards"
}
18 changes: 18 additions & 0 deletions docs/eigenlayer/concepts/rewards/earners-claimers-recipients.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 2
title: Earners, Claimers, and Reward Recipients
---

Earners are addresses that accrue Rewards within the EigenLayer ecosystem and are Stakers, Operators, or in the case of refunds,
AVS addresses. Earners accrue rewards but claiming rewards is a separate step and can be assigned to a Claimer.

Claimers are addresses that are authorized to claim rewards on behalf of Earners. By default, an Earner is their own Claimer.
Earners can assign a Claimer address to manage Rewards claims on their behalf. If an Earner sets a Claimer, the new Claimer
gains the ability to claim all unclaimed past Rewards. Claimers can set a reward recipient address to receive the rewards. If
using the EigenLayer CLI or app, the default reward recipient is the Earner.

In summary:

* Earners accrue rewards but do not necessarily claim them.
* Claimers claim rewards but do not necessarily receive them.
* Reward recipients receive the rewards (that is, the final destination for ERC20 token distributions).
17 changes: 17 additions & 0 deletions docs/eigenlayer/concepts/rewards/pi-split.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
sidebar_position: 4
title: Programmatic Incentives Split
---

[Programmatic Incentives](https://docs.eigenfoundation.org/programmatic-incentives/programmatic-incentives-faq) are EIGEN tokens minted by the EigenLayer protocol to Stakers and Operators.
Programmatic Incentives are claimed, and Operators can set a variable split of Programmatic Incentives, in the same way as Rewards.

To receive Programmatic Incentives:

* Operators must be opted into at least one Operator Set for at least one AVS.
* Stakers must be delegated to an Operator that is opted into at least one Operator Set for at least one AVS.

By default, Operators earn a 10% split on Programmatic Incentives. The rest of the Programmatic Incentives are claimable
by the Operator’s delegated Stakers. Programmatic Incentive distributions are proportional to delegated stake.

For information on how to change the default Programmatic Incentives split, refer to [Set Programmatic Incentives Split](../../../operators/howto/confirgurerewards/set-pi-split).
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 7
title: Rewards Claiming FAQ
---

Expand Down
18 changes: 18 additions & 0 deletions docs/eigenlayer/concepts/rewards/rewards-claiming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
sidebar_position: 3
title: Rewards Claiming
---

The process to claim rewards is the same for AVS Rewards and Programmatic Incentives. That is, both AVS Rewards and Programmatic
Incentives are displayed as claimable rewards in the EigenLayer app and by the EigenLayer CLI.

The posted distribution roots contain cumulative earnings. That is, Stakers and Operators do not have to claim against every
root and claiming against the most recent root will claim anything not yet claimed.

For information on configuring and claiming rewards, refer to:
* [Set Rewards Claimer](../../../operators/howto/confirgurerewards/set-rewards-claimer.md)
* [Set Rewards Split](../../../operators/howto/confirgurerewards/set-rewards-split.md)
* [Set PI Split](../../../operators/howto/confirgurerewards/set-pi-split.md)
* [Claim Rewards using the CLI](../../../operators/howto/claimrewards/claim-rewards-cli.mdx)
* [Claim Rewards using the App](../../../restakers/restaking-guides/claim-rewards-app.md)
* [Batch Claim Rewards](../../../operators/howto/claimrewards/batch-claim-rewards.md)
42 changes: 42 additions & 0 deletions docs/eigenlayer/concepts/rewards/rewards-concept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
sidebar_position: 1
title: Overview
---

Rewards are tokens distributed to Stakers and Operators by an AVS to reward Stakers and Operators for participation in securing AVSs.
Rewards implements the [EigenLayer Improvement Proposal-001: Rewards v2](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-001.md).

EigenLayer has a flexible rewards mechanism that enables:

* [Operator directed Rewards](rewards-submission.md)

AVSs can [direct performance-based rewards](../../../developers/HowTo/build/submit-rewards-submissions.md) to specific Operators using custom logic. Operator directed Rewards enable
rewards to be distributed based on work completion, quality or other parameters determined by the AVS, allowing flexible and tailored incentives.

* [Variable Operator Fee Splits for AVS Rewards](rewards-split.md)

Operators can [set their per-AVS fee rate](../../../operators/howto/confirgurerewards/set-rewards-split.md) on AVS Rewards to any amount from 0% to 100%. The default split is 10%. Setting
a variable split per-AVS enables Operators to align their fee structures with their economic needs and the complexity and diversity of AVS demands.
Operator fees can be varied by Operator Set for more granular reward fee structures.

* [Variable Operator Splits for Programmatic Incentives](rewards-split.md)

Operators can [set their split of Programmatic Incentives](../../../operators/howto/confirgurerewards/set-pi-split) to any amount from 0% to 100%. The default split is 10%. Setting
a split enables Operators to have flexibility in determining the appropriate take rate. The Programmatic Incentive splits
integrate with the Rewards distribution process which ensures that Stakers delegating to Operators benefit proportionately.

Rewards are submitted, calculated, and distributed as follows:

1. [AVSs submit rewards submissions to Operators and Stakers](../../../developers/HowTo/build/submit-rewards-submissions.md).
2. The Rewards updater calculates Rewards offchain and consolidates these into a merkle root posted onchain.
3. [Operators and Stakers claim their allocated Rewards](rewards-claiming).

## Rewards Calculation

Rewards are calculated via an offchain process. A Merkle root (known as the distribution root) is posted which represents
the cumulative rewards across all earners weekly on mainnet and daily on testnet. There is an additional 2 hour delay on
testnet and 1 week delay on mainnet after posting for the root to be claimable against with a valid Merkle proof. For more
information on the deterministic calculation of the distribution of rewards, refer to the [Rewards Calculation technical documentation](https://github.com/Layr-Labs/sidecar/blob/master/docs/docs/sidecar/rewards/calculation.md).

The posted distribution roots contain cumulative earnings. That is, Stakers and Operators do not have to claim against every
root and claiming against the most recent root claims anything not yet claimed.
13 changes: 13 additions & 0 deletions docs/eigenlayer/concepts/rewards/rewards-split.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_position: 3
title: Rewards Split
---

Operators earn rewards by opting into the Operator Sets of AVSs that implement Rewards. By default, Operators earn a 10% split
on Rewards. The rest of the reward is claimable by the Operator’s delegated Stakers. Rewards are proportional to:

* The amount of stake.
* The AVS's relative weighting of strategies in a rewards submission.
* The number of days during the eligible timeframe of the reward submission that the Staker was delegated to the Operator.

For information on how to change the default rewards split, refer to [Set Rewards Split](../../../operators/howto/confirgurerewards/set-rewards-split.md).
13 changes: 13 additions & 0 deletions docs/eigenlayer/concepts/rewards/rewards-submission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_position: 5
title: Rewards Submission
---

AVSs make rewards submissions specifying:

* Operator Set for which the rewards are being submitted.
* Time range for which the reward is distributed.
* List of weights for each Strategy for the reward.
* ERC20 token in which to make rewards.

For information on how to create a rewards submission, refer to [Submit Rewards Submission](../../../developers/HowTo/build/submit-rewards-submissions.md).
2 changes: 1 addition & 1 deletion docs/eigenlayer/concepts/slashing/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"position": 1,
"position": 2,
"label": "Slashing"
}
Loading