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

Feature: Possibility to send assets with different trust between chains #226

Open
IkerAlus opened this issue Jul 20, 2023 · 1 comment
Open
Labels
enhancement New feature or request P3 - Low Low Priority

Comments

@IkerAlus
Copy link
Contributor

IkerAlus commented Jul 20, 2023

Currently a user can’t send two assets with different “trust assumptions” between a system parachain (origin) and a parachain (destination). For example, if a user tries to send USDT and GLMR to Moonbeam, the API will return and error. This is because we need a teleport call to transfer GLMR while a reserve backed transfer is needed for USDT.

It would be nice to allow this functionality, so that if the user chooses a destination chain and several assets with different trust between origin and destination, the API will construct two calls with the corresponding assets in them.

Note that:

  • There should be a maximum number of assets to be chosen for transfer, this value has to be smaller than MAX_ITEMS_IN_MULTIASSETS (currently set to 20) of the XCM protocol.
  • Connected to the prev point, currently there is a MAX_ASSETS_FOR_TRANSFER limitation (currently set to 2)
  • Given the asset multilocation and the destination parachain, we can always infer the trust relationship between the system parachain and said destination chain for the given asset. Hence the API should be always able to construct the right XCM call.
  • When more than one call is returned as the API output, the user can batch them in a single extrinsic with the utility.batch(calls) call. The API could do this call batching by default too.
@IkerAlus IkerAlus added enhancement New feature or request P3 - Low Low Priority labels Jul 20, 2023
@TarikGul
Copy link
Member

Note: This would be a breaking change for the API since it would require returning back an Array for createTransferTransaction. It would also require us to rework our error validation layer.

I do think that this would be a huge enhancement though. It would definitely allow users to create all calls at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P3 - Low Low Priority
Projects
None yet
Development

No branches or pull requests

2 participants