-
Notifications
You must be signed in to change notification settings - Fork 607
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
remove sdk.Context
param in PoolI interface function
#1533
Comments
I believe I recall @ValarDragon stating that other pool implementations might need the context for state mutations. |
I'd like to keep ctx there, it enables features like:
|
If so, should "get" functions like |
We probably need this for GetSwapFee for volatility aware AMM's / harm mitigation, I don't see a reason why GetTotalShares would need to depend on state, except if a pool decided to store it in state rather than it struct. (We could add ctx there for simplicity) |
Background
sdk.Context
param because those functions don't need to access or change the state. Accessing or changing the state is done viagamm keeper
's methods.sdk.Context
passed in.Suggested Change
We remove
sdk.Context
param from all the PoolI interface functionThe text was updated successfully, but these errors were encountered: