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

Transfer KSM from Parachain A to Statemine #744

Open
samelamin opened this issue May 20, 2022 · 6 comments
Open

Transfer KSM from Parachain A to Statemine #744

samelamin opened this issue May 20, 2022 · 6 comments

Comments

@samelamin
Copy link

I have been wondering if we can use XTokens to transfer assets to Statemine directly assuming the channel is open, this will save on transfer fees

At the moment I was able to transfer KSM to the relay chain using XTransfer to the Parent/Relay chain and then teleport the KSM to Statemine

I wonder if it's possible to simplify that by sending a message to the relay chain to teleport the asset and then burn the asset on chain?

Obviously this only works if teleport works between the chains and a level of trust is already established. But since its already there for Statemine, It should be possible right?

@zqhxuyuan
Copy link
Contributor

zqhxuyuan commented May 21, 2022

Current using XToken to transfer KSM from parachain to Statemine, is like the kind of NonReserve case, and it works already, I add a testcase in: AcalaNetwork/Acala#2097

Although the xcm send from parachain first go to relaychain, then to Statemine, but the second xcm is use reserve instead of teleport.

@samelamin
Copy link
Author

samelamin commented May 21, 2022

Thanks I'll have a look at your test

That said, using teleport is going to be far more cost effective than relay to statemine right?

Can we perhaps change the logic in Xtokens so that we

  1. Withdraw/burn asset from reserve account
  2. Notify relay to teleport assets to relay instead of reserve?

@zqhxuyuan
Copy link
Contributor

I think it'll be better to add a new dispatch call for this case which use teleport. All the XTokens currently is using reserve model.

@samelamin
Copy link
Author

No worries it sounds like you are supportive of the idea?

As soon as I have some time I'll start with a failing test so we define the interface
and then we can go from there

@ghzlatarev
Copy link
Contributor

@zqhxuyuan doesn't this PR paritytech/cumulus#1318 mean that the dispatchable with teleport is really needed now ?

@zqhxuyuan
Copy link
Contributor

@zqhxuyuan doesn't this PR paritytech/cumulus#1318 mean that the dispatchable with teleport is really needed now ?

Yes, Indeed! This PR #785 support teleport but only for NonReserve case.

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

No branches or pull requests

3 participants