-
Notifications
You must be signed in to change notification settings - Fork 16
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
Wrong computation of shares when undelegating (all) tokens #153
Comments
Also check if insufficient balance error is reported as |
We have thought about how to fix this, which is to show the share and use the share when reclaim it. No matter if there is no conversion problem. But there is a problem with users’ understanding of share. Many users don’t seem to know much about share. |
I tried doing altering the code to let me send a higher number of shares and to log any errors, and it looks like it first gives an 'insufficient balance' error. But there's also automatic retry in the code, which when it tries to resend the same transaction, the nonce doesn't change (as expected, since the retry is meant for network problems). That leads to some 'invalid nonce' errors on the subsequent attempts. And that seems to be correct too. Some ideas:
|
if there have error , break the loop is a good idea . we should not try with add nonce ? |
i make a fix in another branch, there just fix two issue |
Sorry for the complication, but I think our side would like to discuss whether or not we change over to the proposed UI where shares become the main unit. I'll see if we can come up with a recommended algorithm for converting a token amount to shares if we want to keep the UI the way it is. |
We have considered this situation, but since the amount is always changing, each block is different, and the only constant is share, so in the algorithm, you may also need to consider the issue of the amount changing with the block. This is why I finally switched to share as the unit |
I tried to undelegate from both two validators. The transaction was cancelled with an "insufficient funds errors". I tried the work-around you mentioned of lowering the amount and now I get an "invalid nonce" error right from the oasis wallet extension. Im stucked and unable to undelegate my funds now. Any ideas how to fix that? thanks a lot. |
Is it working now? I tried it just now, undelegate is normal. |
Finally, after a few hours, the staking funds were listed under unbounded delegations. The issue is basically the time between unstaking and confirmation as unbounded delegation. Within that period, if you unstake again you get the nonce error. I think an intermediate state as "unstaking approval pending confirmation" or similar would help :-) |
Ok , thanks for your advice |
When trying to undelegate all tokens for the oasis1qpv5usaqa0w2j4442lf6kgjvmg82eeg9kqzzrrqk account,
the wallet offered the option to undelegate ALL, i.e. 20363.96 ROSE:
Internally, it converted this ROSE amount to 17162010000000 shares (NOTE: The wallet wrongly states 17162.01 shares which are in fact giga shares), however, the account only had 17162007087366 shares, so the transaction failed with the
insufficient balance
error:The work-around is to manually change the amount to something less (e.g. subtract 0.1 ROSE):
In this case, the transaction went through:
The text was updated successfully, but these errors were encountered: