galacticcouncil / galacticcouncil/hydration-node

feature: add XYK route support for router pallet via ExchangeAsset XCM instruction

Open
#1,073 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
208
Forks
109
Avg merge
6d 3h
Merged PRs (30d)
3

Description

Currently in ExchangeAsset XCM instruction, router pallet is called but with no pre-defined routes.
So when having external assets like WUD, DED as asset output via ExchangeAsset XCM call, the swap is not happening.

### Detailed Description

My flow is currently to send assets from Asset Hub to swap at Hydration and send back. Its working for omnipool assets like USDC/USDT but for external assets like WUD, DED where XYK route is needed to be defined for router pallet its not working.

ExchangeAsset XCM instruction https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#exchangeasset

Add support to use XYK route during ExchangeAsset XCM via router pallet.
https://github.com/galacticcouncil/hydration-node/blob/master/runtime/adapters/src/xcm_exchange.rs#L66-L89

### Context
I'm building a DEX aggregator on Polkadot Asset Hub. This is beneficial or important feature to do swap in a single sign/call, for XCM flow Asset Hub -> Hydration(swap) -> Asset Hub.
My custom XCM instruction https://gist.github.com/muddlebee/6bbf5d6b3a1f21986bf25fc6e2d3fd6b

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.