Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to self rectify unsatisfiable unbondings #1703

Closed
joe-bowman opened this issue Aug 6, 2024 · 0 comments · Fixed by #1704
Closed

Allow users to self rectify unsatisfiable unbondings #1703

joe-bowman opened this issue Aug 6, 2024 · 0 comments · Fixed by #1704

Comments

@joe-bowman
Copy link
Contributor

joe-bowman commented Aug 6, 2024

Summary

Periodically, an unbonding may be complete and for some reason we have been able to pin down, once the unbonding is complete, we are unable to fully satisfy the users' unbonding request - when the MsgSend is executed the funds are not there having been rebonded. This is possibly down to a race condition between the DelegationFlush logic running before the MsgSend is executed.

Currently this requires developer intervention in the form of a upgrade handler to requeue the unbonding or release the escroewed qassets.

Adding a transaction type to allow users, under the right circumstances, to cancel or requeue an unbonding.

SendErrors - add a new field of type int64 to the WithdrawalRecord struct, to track the number of times the MsgSend has been attempted and failed. Default is 0.

MsgCancelUnbonding

MsgCancelQueuedUnbonding already exists (although not yet added to the front end), and we should rename and extend the capabilities of this message type to allow users to cancel an unbonding in the state QUEUED (as before) but additionally in the state UNBONDING with SendErrors > 0. This action deletes the unbonding record and returns the qassets from escrow to the user.

This message comprises the following fields, with the following validity criteria:
chainId - must be a valid chain id for a supported zone
hash - must be the hash of an existing withdrawalRecord in QUEUED or UNBONDING state. If the latter, SendErrors field must be greater than 0.
fromAddress - message signer. Must either match the withdrawalRecord.Delegator field of the withdrawalRecord matching hash, OR the governance account.

MsgRequeueUnbonding

A new message should be added to allow users to requeue their unbonding, in the event that is has state UNBONDING, and SendErrors > 0.

This message comprises the following fields, with the following validity criteria:
chainId - must be a valid chain id for a supported zone
hash - must be the hash of an existing withdrawalRecord in UNBONDING state with SendErrors field must be greater than 0.
fromAddress - message signer. Must either match the withdrawalRecord.Delegator field of the withdrawalRecord matching hash, OR the governance account.

This was referenced Aug 6, 2024
@coderabbitai coderabbitai bot mentioned this issue Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant