galacticcouncil / galacticcouncil/hydration-node
Fix minimal pool liquidity
- Dominant language
- Rust
- Stars
- 208
- Forks
- 109
- Avg merge
- 6d 3h
- Merged PRs (30d)
- 3
Description
I think this check was supposed to check the shares left after withdrawal to stop you from being locked out as there is similar check in XYK if I remember correctly.
However, this won't prevent it as you can just send shares away. This means we can end up in a state where there is enough shares in a pool but there is not enough shares in anybody's account to actually withdraw anything. I think the solution to this is to tie the minimal pool balances/shares to existential deposit.
This should be viable thing after we implement #1007
However this number probably shouldn't change. I would consider setting it to the fallback values so we don't end up in the same situation.
_Originally posted by @jak-pan in https://github.com/galacticcouncil/hydration-node/issues/1003#issuecomment-2623669767_
Contributor guide
Research direction
Start by reviewing issue #1007 and the analogous XYK check mentioned in the report, then trace how minimal pool balances and shares interact with existential deposits. Done means the pool cannot reach a state where shares remain in the pool but no account can withdraw, including after shares are transferred away.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100