substrate-parachain-template icon indicating copy to clipboard operation
substrate-parachain-template copied to clipboard

Parachain template not properly configured for XCM

Open albertov19 opened this issue 1 year ago • 4 comments

The xcm_config file of this Substrate Parachain template is not really well configured. This is a problem because multiple teams are using it as a baseline configuration but multiple changes need to be done in order for it to work kind of properly.

https://github.com/substrate-developer-hub/substrate-parachain-template/blob/main/runtime/src/xcm_config.rs

Some things for example:

  • Weight trader is using the relay chain token and not the parachain native token: maybe this is configured like that for common good parachains like AssetHub? But it creates confusion for parachain teams
  • Currency adapter matcher is set to use the relay chain token: similar to the point above, this is just a mismatch in configuration if you want to use parachain native token
  • UniversalLocation definition should be updated to XCM v3: some examples include Polkadot and Moonbeam
  • RelayNetwork is set to None: not sure how impactful this is, as I think this is only for origin conversions? But maybe provide an example against Rococo, Westend, Kusama, Polkadot, etc.
  • Add any sort of asset transfer extrinsic to the SafeCallFilters: the basic template can't perform any sort of asset transfer functionality, you could add the limitReserveTransferAsset. For example Polkadot

Some other teams have expressed similar things -> https://github.com/paritytech/cumulus/pull/1901#issuecomment-1683905403

There could be more things that need to be changed, these are just a few that came to mind. Anyways, just my two cents on how this template can be improved as it is being used as a reference for XCM baseline configuration 😃

albertov19 avatar Aug 30 '23 10:08 albertov19