-
Notifications
You must be signed in to change notification settings - Fork 45
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
Token buying error #6415
Comments
I took a look at runtime code and it looks like runtime only allows to start trading after the revenue share is finalized. Which I'd say is a bug, since after the revenue share ends changing the supply doesn't matter, at least to my knowledge. Atlas was checking the ending block and comparing it to the current block, so the creator doesn't have to finalize the revenue share with a transaction for holders to start trading. |
Can you link to the explicit line you have in mind which has the check you are referring to, also remind me, what do you mean when you say a revenue share is "finalized", do you mean that its over? Because I thought we had alread looked at this before and determined that this was indeed not required, as the runtime is easil able to determine this itself. |
Validation fn: https://github.com/Joystream/joystream/blob/dabaa45c97409874ebe862f4e0198fb85faefa2d/runtime-modules/project-token/src/types.rs#L1352 |
@ignazio-bovo can you weigh in here? I don't see why the creator would have to do anything to finalize the revenue split, because the revenue split finishes at a known time, so runtime should just be able to compare current block to sum of block height when split started and block duration of split. At the same time, it does look the implementation requires the creator to deactivate. If this is indeed the case, then we should send an email, and send it recurringly as long as an expired split has not been finalized. |
It seems this issue also is in effect when you try to sell or buy from portfolio page, you are allowed to try buying/selling despite it not being possible, so it should be fixed there as well some how, not sure how to handle it UI wise, but def. we cant allow people to try to execute trades that just cause failed tx. |
Check out this token: https://gleev.xyz/channel/25941?tab=Token
Currently, it is possible to buy from the AMM, as no revenue split is claimed to be occuring in the UI
None the less, a user (memberId: "8") tried to buy the token just now, and failed, and got the error in the UI that it was not possible to do it due ot token suppl changing or something, basically the user could execute the trade on the UI, but the result was rejected by the runtime - at least as indicated by the UI. This error mode should really only happen when te state of the runtime changes after the user has loaded the token page. HEre is the console error:
It seems the issue here is that either the application mistakenly believes the transaction was rejected, or it incorrectly allowed the user to start the trade to begin with.
The text was updated successfully, but these errors were encountered: