Skip to content
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

Instant rebalancing with fee asset always in WETH #1193

Conversation

yrong
Copy link
Contributor

@yrong yrong commented May 8, 2024

This is a POC for an instant rebalancing with fee asset always in WETH based upon discussion in channel.

companion change on substrate side in Snowfork/polkadot-sdk@64b1d44

Destination parachain should be configured to

  • register WETH as sufficient
  • a custom IsReserve to allow AssetHub as trusted reserve for WETH
  • a custom Trader allow to use WETH to pay fees for the xcm execution

@yrong
Copy link
Contributor Author

yrong commented May 8, 2024

As I mentioned in the discussion, on most substrate chains the xcm execution cost is so tiny (less than 0.1$) comparing with the expensive gas cost on Ethereum. So I'm a bit conservative to add any extra steps on Ethereum for estimating the cost(including things like e.g. an on chain swap, or syncing the exchange rate periodically from dex, or an extra flow for an instant rebalancing, ....).

Still prefer an on-chain fee configuration is more simple and allows parachain to:

  • use any fee asset as they want(e.g. the native token)
  • charge any extra Ether for avoid spamming. Ideally it should cover the execution cost on substrate chains but not required(e.g. parachain team may set it as zero at first stage to win the customer).
  • leave the rebalancing option also to parachain(e.g. they may choose to do it in a periodical/batch manner every 2 weeks or more).

@yrong yrong closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant