Skip to content

Commit

Permalink
docs: add case 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ypatil12 committed Feb 19, 2025
1 parent 967ca13 commit ecb8ec5
Showing 1 changed file with 65 additions and 2 deletions.
67 changes: 65 additions & 2 deletions docs/core/accounting/SlashingEdgeCase.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Consider a staker, Alice who is in the following state:
1. Alice has verified a validator. `withdrawble: 32 ETH`
2. Alice's operator is slashed for 75%. `withdrawable: 8 ETH`
<details>
<summary>View calculation details</summary>
<summary>Calculation</summary>

* `depositShares: 32`
* `maxMagnitude: 0.25`
Expand All @@ -32,11 +32,15 @@ We define restaking as **reusing staked ETH as security for AVSs. Thus, the same
In the above scenario, let's say the Alice now proves a checkpoint.

4. A checkpoint of BC state is proven. `withdrawable: 4 ETH`
<details>
<summary>Calculation</summary>

* `depositShares: 16`
* `maxMagnitude: 0.25`
* `BCSF: 1`
* `DSF: 1`
* `withdrawable = 16 * 0.25 * 1 * 1 = 4 ETH`
</details>

The checkpoint slash has devalued Alice's currently withdrawable assets by 50%. The AVS slashes from what's left due to the BC getting priority burning rights. Thus, AVSs must factor Native ETH (or an LST) being slashed by the beacon chain when designing their slashing conditions. The below diagram illustrates this behavior:

Expand All @@ -53,4 +57,63 @@ The behavior of BC and AVS slashings for Native ETH mimics the behavior of slash

**When an AVS slashes, its attributable slashed amount is between 0 and the originally slashed amount. The attributable slashed amount decreases in the event of BC slashes.** We see this behavior in the above example, where the 12 ETH that was attributed to the AVS is less than the original 24 ETH that was slashed.

Let's take another example, where
However, given the asynchronous nature of the EigenPod proof system, Alice may have a different number of withdrawable shares depending on the ordering of her actions. Note that even in this case, **assets are not overslashed**.

Let's start with our above scenario.

Scenario A:

4. Alice verifies another validator. `withdrawable: 40 ETH`
<details>
<summary>Calculation</summary>

* `depositShares: 64`
* `maxMagnitude: 0.25`
* `BCSF: 1`
* `DSF = 40 / (32 + 32) / 0.25 = 2.5`
* `withdrawable = 64 * 0.25 * 1 * 2.5 = 40 ETH`
</details>

5. Alice checkpoints all her pods. `withdrawable: 30 ETH`
<details>
<summary>Calculation</summary>

* `depositShares: 64`
* `maxMagnitude: 0.25`
* `BCSF = 48 / 64 = 0.75`
* `DSF: 2.5`
* `withdrawable = 64 * 0.25 * 0.75 * 2.5 = 30 ETH`
</details>

In this scenario, 25% of Alice’s currently proven assets are slashed. Similarly, the AVSs attributable slashed amount has been decreased by 25% (24 → 18 ETH).


Scenario B:

4. Alice checkpoints her pod. `withdrawable: 4 ETH`
<details>
<summary>Calculation</summary>

* `depositShares: 32`
* `maxMagnitude: 0.25`
* `BCSF = 16 / 32 = 0.5`
* `DSF: 1`
* `withdrawable = 32 * 0.25 * 0.5 * 1 = 4 ETH`
</details>

5. Alice verifies another validator. `withdrawable: 40 ETH`
<details>
<summary>Calculation</summary>

* `depositShares: 64`
* `maxMagnitude: 0.25`
* `BCSF: 0.5`
* `DSF = 36 / (32 + 32) / 0.125 = 4.5`
* `withdrawable = 64 * 0.25 * 0.5 * 4.5 = 36 ETH`
</details>

In scenario B, 50% of Alice’s currently proven assets are slashed, along with a commensurate decrease in the AVSs attributable slashed amount. In both cases Alice’s withdrawable shares and the AVSs attributable slashed amount decrease by the same percentage.

We acknowledge this edge case. A benefit of this system is that stakers are incentivized to immediatley prove BC slashed. Eigen Labs runs an off-chain process (EigenPod Health Checker) that monitors BC slashings and starts checkpoints as needed.

Conversely, when Native-ETH burning is implemented, AVSs are incentivized to immediately exit stakers from the BC to recoup the maximum possible attributable slashed amount.

0 comments on commit ecb8ec5

Please sign in to comment.