Closed
Description
Rationale
Currently, if a juror changes his stake outside the Staking phase, this change is queued and executed at the next Staking phase. The corresponding PNK amount doesn't leave the user's account until execution of the delayed stake. This has raised a UX issue: when a users checks his account after staking outside the Staking phase, his account does not yet reflect the new PNK balance.
Previous attempt
Previously, we wanted to provide more visibility about this to the user via the court frontend: #942 but it has been abandonned to avoid exposing more complexity for the user, and instead make smart contract changes.
This solution
In case of:
- Stake increase outside the Staking phase, the sortition module must transfer the corresponding PNK amount immediately, but it must wait for the next Staking phase to update the SortitionSumTree.
- Stake decrease outside the Staking phase, same as before.