You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user unbonds a number of tokens = amount, the system iterates over a set a bonds and creates an unbond for each of these bonds until we reach amount. After this process, we create a new bond with -amount. This is a problem, as if there is a second unbond, we will iterate over the same set of bonds, which are supposed to have been unbonded already. We need a solution that avoids iterating over already unbonded bonds.
We have discussed two solutions:
Simplest solution: update the amount of each bond. This means to reduce to 0 for all but the last iterated.
We are destroying info, but seems not to be a problem because we use unbonds when slashing. Only concern: discrepancy between total_deltas and bonds.
An alternative solution could be one similar to total_unbonds.
We have agreed to try the simplest solution.
The text was updated successfully, but these errors were encountered:
* alternative fix to 24
* delete commentted text and unused function
* fix typo
* change name variable
* inf -> bottom
* fix to latest issue of #25
* fix typo
When a user unbonds a number of tokens = amount, the system iterates over a set a bonds and creates an unbond for each of these bonds until we reach amount. After this process, we create a new bond with -amount. This is a problem, as if there is a second unbond, we will iterate over the same set of bonds, which are supposed to have been unbonded already. We need a solution that avoids iterating over already unbonded bonds.
We have discussed two solutions:
Simplest solution: update the amount of each bond. This means to reduce to 0 for all but the last iterated.
We are destroying info, but seems not to be a problem because we use unbonds when slashing. Only concern: discrepancy between total_deltas and bonds.
An alternative solution could be one similar to total_unbonds.
We have agreed to try the simplest solution.
The text was updated successfully, but these errors were encountered: