osmosis icon indicating copy to clipboard operation
osmosis copied to clipboard

CrossChainSwaps: Add a middleware to handle IBC metadata for the swap

Open nicolaslara opened this issue 2 years ago • 2 comments

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 avatar Sep 08 '22 15:09 nicolaslara

@nicolaslara when you get the time, do you mind linking all relevant PRs one could follow about this feature?

p0mvn avatar Sep 22 '22 19:09 p0mvn

@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

nicolaslara avatar Sep 22 '22 22:09 nicolaslara

Done!

ValarDragon avatar Dec 08 '22 03:12 ValarDragon