osmosis
osmosis copied to clipboard
CrossChainSwaps: Add a middleware to handle IBC metadata for the swap
Design a middleware that allows us to extend IBC transfers with the extra metadata needed for crosschain swaps:
- Tokens to swap into
- Callback?
On receiving the metadata, the middleware would then call a function to make the swap and transfer the seapped tokens back to the caller (or alternatively another address or contract if a callback is specified)
If possible it should be designed in generic way so that it can be upstreamed to ibc-go.
@nicolaslara when you get the time, do you mind linking all relevant PRs one could follow about this feature?
@p0mvn I don't have a PR ready yet, but I'm working on nicolas/crosschain-swaps
But I've extracted a few of those changes into these IBC-go PRs:
https://github.com/cosmos/ibc-go/pull/2296 https://github.com/cosmos/ibc-go/pull/2306 https://github.com/cosmos/ibc-go/pull/2305
Depending on what changes in ibc-go we may need more or less on our end
Done!