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
Handle problems of sending coins to the reserve account #364
Comments
If we define a depleted pool as a pool with zero pool coin supply, not a pool with zero reserve, we can prevent chain to panic in the mentioned situations. I'll work on it. |
Something that can be considered is to make use of module accounts that are blacklisted (via the bank module) from receiving tokens, but this is a greater change compared to the above solution. |
@migueldingli1997 We thought about that approach at first, but since |
Yep that's correct. A workaround to that then is to use just one module account (created at genesis and with the appropriate restrictions) but then you will have to keep track of the reserve balances for each pool in the liquidity module, rather than leaving it up to the bank module. I understand that this might not be desirable however. |
also change Mul/QuoTruncate to Mul/Quo. fixes tendermint#364
Summary of Bug
When someone sends coins to the reserve account of a pool, it can cause some problems including:
Version
https://github.com/tendermint/liquidity/releases/tag/v1.2.5
Steps to Reproduce
Running this test causes a panic:
For Admin Use
The text was updated successfully, but these errors were encountered: