Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
sontrinh16 committed Dec 6, 2024
1 parent 3661a5c commit cdbc212
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/accounts/defaults/lockup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,13 @@ type PermanentLockingAccount struct {
## In An Event Of Slashing

As defined, base lockup store `DelegatedLocking` by amount. In an event of a validator that the lockup account delegate to is slash which affect the actual delegation amount, this will leave the `DelegatedLocking` have an excess amount even if user undelegate all of the
account delegated amount. This excess amount would make the spendable amount lesser, further details are as below:
account delegated amount. This excess amount would affect the spendable amount, further details are as below:

Spendable amount are calculated as
`spendableAmount` = `balance` - `notBondedLockedAmout`
Whereas `notBondedLockedAmout` = `lockedAmount` - `Min(LockedAmount, DelegatedLockedAmount)`

As seen in the formula above, `notBondedLockedAmout` can only be 0 or a positive value when `DelegatedLockedAmount` < `LockedAmount`
As seen in the formula `notBondedLockedAmout` can only be 0 or a positive value when `DelegatedLockedAmount` < `LockedAmount`
if the `notBondedLockedAmout` is positive then `spendableAmount` is less than the actual balance. Let call `NewDelegatedLockedAmount` is the `delegatedLockedAmount` when applying N slash

1. Case 1: where originally `DelegatedLockedAmount` > `lockedAmount` but when applying the slash amount the `NewDelegatedLockedAmount` < `lockedAmount` then
Expand Down

0 comments on commit cdbc212

Please sign in to comment.