subspace icon indicating copy to clipboard operation
subspace copied to clipboard

Only slash the funds that participated the misbehavior

Open NingLin-P opened this issue 3 years ago • 5 comments

In the current implementation, all the PendingDeposit and PendingNominatorUnlocks will be slashed, this seems unfair:

  • For PendingDeposit, the nominator's stake has not participated in the staking yet but got slashed due to the misbehavior that was conducted by the operator previously.
  • For PendingNominatorUnlocks, suppose the nominator issue withdraws at domain block #10 and the operator gets slashed due to submitting a fraudulent ER of domain block #100, the nominator's withdrawal may still get slashed but the misbehavior is conducted after the nominator's withdrawal is exited from staking thus this withdrawal is innocent in some sense.

So we should not slash PendingDeposit and only slash PendingNominatorUnlocks that are created after the misbehavior.

NingLin-P avatar Sep 05 '23 00:09 NingLin-P

This is "nice to have". Staking on someone is a risk, this edge case removes only a tiny bit of risk in a single edge-case. Not worth spending effort on this, I'm not even sure it should ever be fixed.

nazar-pc avatar Sep 05 '23 00:09 nazar-pc

Yeah, the risk is inevitable but it certainly brings a better UX.

NingLin-P avatar Sep 05 '23 00:09 NingLin-P

If we get back to this we should think more on security implications before implementing. For example an operator may withdraw a part of stake before committing a fraud so he loses less money by committing the fraud.

dariolina avatar Jan 08 '24 10:01 dariolina

If an operator decided to withdraw funds and then wait for funds to be unlocked and then proceed to conduct malicious behavior, then there is nothing protocol can do and technically those funds were not part of staking/ unlocking at the time fraud proof is submitted.

Currently, our implementation does not slash funds that deposited but not finalised since epoch did not finish and technically never part of staking until epoch

vedhavyas avatar Jan 08 '24 11:01 vedhavyas

For example an operator may withdraw a part of stake before committing a fraud so he loses less money by committing the fraud.

To add to @vedhavyas comment, if they withdraw stake before committing fraud then they would have less opportunity to commit fraud due to smaller stake, which seems appropriate.

0xjeremyfrank avatar Jan 08 '24 16:01 0xjeremyfrank