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

support transfering multiple assets(now only one) in orml-xtokens #663

Closed
yrong opened this issue Dec 6, 2021 · 5 comments
Closed

support transfering multiple assets(now only one) in orml-xtokens #663

yrong opened this issue Dec 6, 2021 · 5 comments

Comments

@yrong
Copy link

yrong commented Dec 6, 2021

related issues and prs:

paritytech/cumulus#827
paritytech/cumulus#806
paritytech/polkadot#4470

wrap xcm as following when send statemine asset back:
https://github.com/bifrost-finance/bifrost/blob/c7eb1bef7abfdeb6562aeda29ab76805308b77f5/pallets/salp/src/lib.rs?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L1012-L1031

@girazoki
Copy link
Contributor

girazoki commented Dec 28, 2021

Just wanted to cross-post some a thought I had in bifrost-finance/bifrost#420 here too

HI! Just curious about the same problem (sending statemine assets back to statemine) and I am wondering a few things about this implementation:

  • In transfer_statemine_assets, this PR is doing initateReserveWithdraw of both the statemine asset and the relay token (to be able to pay in for fees in statemine). This therefore implies that the sovereign account in Statemine holds both tokens (to be able to withdraw them?).

  • If the above is true, wouldnt we have two sovereign accounts (the one in statemint, and the one in the relay) holding the relay token? And since both match to the same token in the bifrost parachain, wouldnt this imply that we could face the situation where a user transfers to the relay chain more tokens than what the sovereign account in the relay holds?

@xlc
Copy link
Member

xlc commented Dec 30, 2021

The reserve chain of KSM is Kusama, not Statemine, so we will simply reject direct KSM transfer from Statemine.

@girazoki
Copy link
Contributor

girazoki commented Dec 31, 2021

How are you going to handle sending statrmine assets back to statemine then? given that statemine fees can only be paid in KSM, I am guessing the sovereign account in statemine will need to have KSM and the transferred asset somehow.

@xlc
Copy link
Member

xlc commented Jan 3, 2022

Yeah XCM basically doesn't offer much ways to manage fees on sovereign account (e.g. you can't really track how much fee is charged). So the simple solution is just topup the sovereign account on Statemine somehow. It can be done manually, or should be possible to do a reserve transfer of KSM to Kusama and teleport it to Statemine parachain sovereign account.

@yrong
Copy link
Author

yrong commented Jan 14, 2022

resolved in #658

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