helikon-labs/subvt-backend

Self stake displayed wrongly

Closed this issue · 4 comments

From a Kusama Telegram bot user:

Bot doesn't seem to get proper self stake after unbound... Strange is that it showed properly the self stake amount after unbound request, but then after first payout it got wrong

I'm assuming the steps to reproduce are:

  1. Add validator.
  2. Make sure the self stake is displayed correctly.
  3. Unbond (partial?) funds.
  4. Wait for a payout.
  5. Self stake should be displayed wrongly after the payout.

After having a chat with sniffski, the root cause is that the unbound in progress is not taken into account by the validator list updater. Fix: take into account any unbound in progress.

Fix: use bonded amount instead of the validator's self stake in the list of its active stakes.

Fixed with 0.10.1.