-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
As referenced here: Deprecate Currency; introduce holds and freezing into fungible traits
and implemented in the following PRs: #1779 #1818
The following comment indicates that we need to investigate some test cases where Holds are slashed and ensure that the affected pallets handle their bookkeeping for Freezes correctly:
Freezes are essentially the same as locks, except that they overlap with Holds. Since Holds are designed to be infallibly slashed, this means that any logic using a Freeze must handle the possibility of the frozen amount being reduced, potentially to zero. A permissionless function should be provided in order to allow bookkeeping to be updated in this instance.
Discussion
- Implement e2e tests that exercise the overlap between
HoldsandFreezes- Build a test where an account with a
Freezeand aHoldand theHoldis slashed - Ensure the capacity pallet handles the logic correctly without any exploits
- Check if amount staked is reduced to correlate with the amount slashed. Users should not be able to continue receiving the same capacity when tokens are slashed.
- Ensure that a user can stake token to network and participate in governance with the same token amount (frozen amount).
- Ensure the time-release pallet handles the logic correctly without any exploits
- Build a test where an account with a
Changes
- Add e2e test with simultaneous
HoldandFreeze.
How to Test
- Confirm that the new e2e tests pass.
Reactions are currently unavailable