-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
While slashed deposits are automatically reflected in the LST price of liquid delegated staking, the non-liquid variant needs to implement slashing explicitly. It requires the following changes:
- Store the slashing events consisting of the
indexof the staking event after which they happened and the slashedfraction. - Adjust the staked
amountwhen a user stakes or unstakes avaluefrom the currentamount + valuetoamount * product_of_slashed_fractions + valuewhereproduct_of_slashed_fractions = (1 - slashings[i].fraction) * (1 - slashings[i+1].fraction) * ... * (1 - slashings[slashings.length - 1].fraction)for the smallestisuch thatslashings[i].index >= stakingIndices[user][stakingIndices[user].length - 1].
Note that the rewards are not directly impacted by slashing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels