Keep in mind that the validator's misbehavior will result in slashing or even losing a portion of the staked tokens!
This means that a part of the shares or even worse the validator could be slashed while being delegated, but even so, when undelegating it will still try to retrieve the same amount of shares that were calculated upon delegating with the previous non-slashed amount
Ultimately this will lead to issues whenever undelegating.
Recommendation
slashing/penalties should be checked upon undelegating
Github username: -- Twitter username: -- Submission hash (on-chain): 0x00a8e4663d635168be27a1c81c7b972aad7a2329d4de57c3f65056c0a6c5e358 Severity: high
Description:
Description
Whenever a delegation is made towards a validator, a receipt is created inside
delegate
function
takeReceiptDelegate
now addsshares
to the receipt according to theamount
:Now whenever undelegating the receipt is retrieved with the aforementioned added
shares
:The problem however, as per the Oasis Docs:
This means that a part of the
shares
or even worse thevalidator
could be slashed while being delegated, but even so, when undelegating it will still try to retrieve the same amount ofshares
that were calculated upon delegating with the previous non-slashed amountUltimately this will lead to issues whenever undelegating.
Recommendation
slashing/penalties should be checked upon undelegating