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

[CL][Swap Router]: move poolIsActive() check from gamm to swaprouter #3798

Closed
p0mvn opened this issue Dec 19, 2022 · 3 comments · Fixed by #3920
Closed

[CL][Swap Router]: move poolIsActive() check from gamm to swaprouter #3798

p0mvn opened this issue Dec 19, 2022 · 3 comments · Fixed by #3920
Assignees
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board

Comments

@p0mvn
Copy link
Member

p0mvn commented Dec 19, 2022

    TODO: consider moving this to swaprotuer

Originally posted by @p0mvn in #3764 (comment)

@p0mvn p0mvn added the F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board label Dec 19, 2022
@osmo-bot osmo-bot moved this to Needs Review 🔍 in Osmosis Chain Development Dec 19, 2022
@p0mvn
Copy link
Member Author

p0mvn commented Dec 22, 2022

Blocked on: #3807 . We need to make sure that API is introduced to make sure that we don't miss adding this check to it.

@mattverse
Copy link
Member

@p0mvn What's the reason we want to move that check to the swaprouter? Seems that the caller function(SwapExactAmountIn) is getting called in other places as well within the gamm module, I'm concerned that if we move that check to the swap router layer, any other methods calling the SwapExactAmountIn would not have the isActive check

@p0mvn
Copy link
Member Author

p0mvn commented Jan 3, 2023

The reason is that it would be great to perform the IsActive check for CL pools as well. As a result, x/swaprouter might be a good shared location for doing so.

I think the issue you are referring to (ref: #3130) is orthogonal toIsActive`,

No client other than swaprouter should call SwapExactAmountIn in x/gamm. #3130 is to investigate how we can prevent these other clients from doing so.

The IsActive check here is to have a quick switch guard for us to turn off all pools quickly (including CL) if there is a security incident in progress, assuming that #3130 is addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants