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

x/GAMM: Create a function to refund all LP shares for a pool #502

Closed
ValarDragon opened this issue Oct 5, 2021 · 2 comments · Fixed by #652
Closed

x/GAMM: Create a function to refund all LP shares for a pool #502

ValarDragon opened this issue Oct 5, 2021 · 2 comments · Fixed by #652
Assignees
Labels
C:x/gamm Changes, features and bugs related to the gamm module.

Comments

@ValarDragon
Copy link
Member

ValarDragon commented Oct 5, 2021

We should create a function in x/gamm that takes in a pool ID, and then dissolves that pool, and refunds the LP shares back into the constituent assets, and distributes to all holders. This would eventually become something callable in upgrades or governance, to dissolve pools with less than $X liquidity. (See https://gov.osmosis.zone/proposal/discussion/2047-proposal-raise-the-pool-creation-fee-and-refund-pools-with-less-than-1000-tvl/ for discussion from Osmosis community on why this is quite desirable!)

This would be done by iterating over all accounts looking for folks who hold that pools LP shares. If you hold that pools shares, then it burns those shares, and then gives you the constituent tokens back.

It then destroys the pool.

If there are any LP shares IBC'd out of Osmosis, I think those should for now just be 'stuck', as a v1 of this feature. We can make a way to redeem them back subsequently.

@ValarDragon ValarDragon added the C:x/gamm Changes, features and bugs related to the gamm module. label Oct 5, 2021
@ValarDragon
Copy link
Member Author

We need to check that if a pool is deleted, there are no panics when trying to "get that pool". (E.g. if someone did a swap to a deleted pool ID)

@daniel-farina daniel-farina added this to the 2021 - November Milestone milestone Nov 18, 2021
@daniel-farina daniel-farina added V6 and removed V5 labels Nov 18, 2021
@ValarDragon ValarDragon modified the milestones: 2021 - November Milestone, 2021 - December Milestone Nov 21, 2021
@ValarDragon ValarDragon modified the milestones: 2021 - December Milestone, 2022 - January Milestone Dec 6, 2021
@mconcat mconcat mentioned this issue Dec 10, 2021
4 tasks
@daniel-farina daniel-farina removed this from the 2022-01 Milestone milestone Dec 24, 2021
@daniel-farina
Copy link
Contributor

Will be closed by #652

@ValarDragon ValarDragon removed the V6 label Jan 6, 2022
Repository owner moved this from 🕒 Todo to ✅ Done in Osmosis Chain Development Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/gamm Changes, features and bugs related to the gamm module.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants