Skip to content

Commit e823ecb

Browse files
committed
docs: AVS rewards
1 parent dda944a commit e823ecb

File tree

6 files changed

+127
-2
lines changed

6 files changed

+127
-2
lines changed

docs/avs/rewards.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
sidebar_position: 4
3+
sidebar_label: "Rewards"
4+
---
5+
6+
# Rewards
7+
8+
RedStone AVS rewards operators and stakers for participating in the decentralized validation of data.
9+
This page explains the mechanisms behind voting power, reward calculation and distribution, as well as the current status of slashing in the system.
10+
11+
## Voting Power
12+
13+
Voting power is a crucial concept within RedStone AVS, representing an operator's influence on the task validation process.
14+
Every time a task containing the price of a given asset is submitted, multiple operators independently validate it.
15+
To proceed and be committed to the smart contract, a task must receive positive validations from operators whose combined voting power exceeds **2/3 of the total voting power**.
16+
17+
An operator's voting power is calculated based on their shares in the staking contracts (also referred to as strategies) supported by the AVS. RedStone AVS currently supports the following staking strategies:
18+
19+
1. **RED Strategy**
20+
(staking contract: [0x903a1FF023a35EfeD333ee9D6bF30629A098B9ed](https://etherscan.io/address/0x903a1FF023a35EFeD333ee9D6bF30629A098B9ed))
21+
22+
2. **EIGEN Strategy**
23+
(staking contract: [0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7](https://etherscan.io/address/0xaCB55C530Acdb2849e6d4f36992Cd8c9D50ED8F7))
24+
25+
3. **ether.fi Strategy**
26+
(staking contract: [0x7079A4277eAF578cbe9682ac7BC3EfFF8635ebBf](https://etherscan.io/address/0x7079A4277eAF578cbe9682ac7BC3EfFF8635ebBf))
27+
28+
Each strategy is assigned a specific weight.
29+
An operator's total voting power is the sum of the products of these weights and their staked amount in each respective staking contract.
30+
This can be expressed by the following formula:
31+
32+
<div style={{"text-align": "center"}}>
33+
<img src="/img/avs-voting-power.svg" alt="Voting power formula"></img>
34+
</div>
35+
36+
The weights are adjusted to favor RED stakers, ensuring they have the majority of the voting power and, consequently, the majority of the rewards.
37+
38+
To maintain a balanced network and prevent centralization, RedStone AVS enforces a **voting power cap** per operator. This means that an operator’s actual voting power is the minimum of:
39+
40+
- The value computed by the weighted staking formula above, and
41+
- The predefined maximum voting power limit
42+
43+
This mechanism ensures that no single operator can dominate validation outcomes, even if they stake disproportionately large amounts.
44+
45+
:::tip
46+
The voting power of a given operator can be found out using the function in the [`AttestationCenter`](/docs/avs/service-components#smart-contracts) contract:
47+
48+
```solidity
49+
function votingPower(address _operator)
50+
```
51+
52+
:::
53+
54+
## Reward calculation
55+
56+
In RedStone AVS, operators are rewarded for each validation they perform and each vote they cast on a task.
57+
Once a task is finalized, the [Aggregator](/docs/avs/service-components#aggregator) sends the task result along with all operator votes to the smart contract called `AttestationCenter`.
58+
At this point, each operator who participated in the validation by submitting a vote receives a reward.
59+
60+
:::important
61+
Rewards for contributing to RedStone AVS are paid out in [RED](https://etherscan.io/address/0xc43c6bfeda065fe2c4c11765bf838789bd0bb5de) tokens.
62+
:::
63+
64+
The actual reward amount for each operator is calculated by a separate smart contract called `FeeCalculator`.
65+
This contract holds the reward value allocated for each task and distributes it among eligible operators based on their voting power at the time of voting.
66+
67+
The reward for each operator is calculated **proportionally to their voting power**, according to the formula:
68+
69+
<div style={{"text-align": "center"}}>
70+
<img src="/img/avs-reward-calculation.svg" alt="Reward calculation formula"></img>
71+
</div>
72+
73+
Operators run by RedStone are excluded from this reward calculation.
74+
75+
:::tip
76+
Accumulated rewards for each operator are stored in the [`AttestationCenter`](/docs/avs/service-components#smart-contracts) contract. Operators can query their pending rewards using the following function:
77+
78+
```solidity
79+
function getOperatorPaymentDetail(uint256 _operatorId)
80+
```
81+
82+
The address of the current `FeeCalculator` can be found by searching for the `SetFeeCalculator` event (topic0: 0x83b9ee7f260088fdd4ee12aa07fa7daebc115d796b6bfb55bfb0fc839bccff2d).
83+
:::
84+
85+
## Rewards distribution
86+
87+
Rewards accumulated in the AVS contracts are distributed **weekly** to both operators and their stakers.
88+
This distribution is handled through the [EigenLayer Rewards v2](https://docs.eigenlayer.xyz/eigenlayer/concepts/rewards/rewards-concept) mechanism, as specified in [ELIP-001](https://github.com/eigenfoundation/ELIPs/blob/main/ELIPs/ELIP-001.md).
89+
90+
This process involves integrating with EigenLayer's [Rewards Coordinator](https://github.com/Layr-Labs/eigenlayer-contracts/blob/main/docs/core/RewardsCoordinator.md) contract, to which the following data is submitted:
91+
92+
- The rewards collected by individual operators.
93+
- A list of supported strategies with their associated weights.
94+
- The time period over which the rewards were earned.
95+
96+
Based on this data, the following steps are performed:
97+
98+
1. **Operator fee deduction**:
99+
Each operator can define a margin percentage (from 0% to 100%) that determines how much of their total reward they retain. By default, this margin is 10%. The deducted portion goes directly to the operator as their service fee.
100+
101+
2. **Staker reward distribution**:
102+
The remaining reward amount is distributed among the stakers of that operator. This includes the operator themselves, if they have their own stake. The distribution is proportional to each staker’s stake amount and the weight of the strategy they staked through.
103+
104+
The actual reward computations are performed off-chain, then submitted on-chain where they can be verified before becoming claimable. For a detailed breakdown of this process, refer to the EigenLayer [guide](https://docs.eigenlayer.xyz/developers/HowTo/build/submit-rewards-submissions).
105+
106+
After distribution, operators and stakers can [claim their rewards](https://docs.eigenlayer.xyz/restakers/restaking-guides/claim-rewards-app) using the EigenLayer UI.
107+
108+
## Slashing
109+
110+
Currently, **RedStone AVS does not implement any slashing mechanism**.
111+
112+
If slashing is introduced in the future, it will initially be limited to the correctness of data validation performed by operators, rather than their availability or uptime.
113+
114+
Any changes related to slashing policies or enforcement will be **announced well in advance** to ensure transparency and allow all participants to prepare accordingly.

docs/avs/running-avs-operator-mainnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 6
33
sidebar_label: "Running AVS Operator (Mainnet)"
44
---
55

docs/avs/running-avs-operator-testnet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 4
2+
sidebar_position: 5
33
sidebar_label: "Running AVS Operator (Testnet)"
44
---
55

docs/avs/service-components.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ This approach significantly saves on gas fees.
4848
If the new price receives enough votes, it is saved in the contract along with a new timestamp.
4949
Additionally, the Attesters are credited with an appropriate reward in the contract for their work, which can be claimed later.
5050

51+
:::info
52+
The address of the `AttestationCenter` contract, where the calculation result is sent:
53+
- Testnet: [0x6af9B9272fc72CaC55ccDF6c2BC2c5703a65a187](https://sepolia.basescan.org/address/0x6af9B9272fc72CaC55ccDF6c2BC2c5703a65a187)
54+
- Mainnet: [0x2B766957ce3dbab9eC4b227f5086855CeE7a1ad6](https://basescan.org/address/0x2B766957ce3dbab9eC4b227f5086855CeE7a1ad6)
55+
56+
:::
57+
5158
## Network Participation and Roles
5259

5360
RedStone will kickstart the network by managing the Task Performer and Aggregator.

0 commit comments

Comments
 (0)