Open
Description
Reproduction
- Juror is staked in court A (10K) and B (15K)
- In generating or drawing phase, juror moves his stakes from court B to court A
→ stakes in court A are increased immediately to 25K BUT stake decreased are delayed in court B (still 15K) due to the instant staking logic - Juror gets drawn several times in court A based on an INCORRECT stake of 25K + 15K = 40K, too many times!! Locked stakes in this dispute: 38K.
- Phase goes to Staking, delayed stakes are executed: - It releases 40K - 38K = 2K to court A
- It sets his stake in court B to 0
- The juror is now missing 13K !!
Root cause
Bug in #990
Solution
Revert the instant staking logic for stake increases: too many edge cases and it made the code more complex in an area where it was already too complex.