-
Notifications
You must be signed in to change notification settings - Fork 208
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
disable trade route ICA swap #1137
Conversation
This will indeed stop the chain from doing swaps and I do think it is all that is needed. The 3 phase design we ended on means the swaps were their own phase and their callbacks don't exist. The third phase is still the return which exists in the TransferAllRewardTokens keeper function. But you could change the swap route types and all the associated tx routes to update trade routes if we are sure we won't want to go back since now they no longer need info for how to do the swaps like which pool and slippage params etc. If we think we might want to enable them again, then you can leave them be. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Side note: because the return path does an ICQ only looking for DYDX tokens in the TradeAccount ICA it would ignore other tokens in there... so the operator could actually do multiple swaps if they thought it would give a better price. Eg. Swap USDC for OSMO then swap the OSMO for DYDX |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we remove the price query too? the authz grantee could just query the price offchain right before swapping rather than using on-chain metric that is more stale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're confident we don't make assumptions around the price being non-nil, I'm signed off
Small one here but definitely double check me that this is all we have to do to disable the swaps.