Acala Wiki
LearnBuildMaintain
  • Acala & Karura Wiki
  • Acala 2.0
    • Overview
    • Execution Roadmap
    • aUSD SEED (aSEED)
      • aSEED Integration Guide
    • ACA
      • ACA/KAR Staking
    • Universal Asset Hub (UAH)
    • Euphrates DApp
  • Learn
    • Acala Introduction
      • Acala Dollar
      • AcalaSwap
      • Homa Liquid Staking
      • Redenomination of ACA
    • Trilogy Networks
    • Flexible Fees
      • How to change default fee token
    • Governance Overivew
      • Participate in Democracy
      • How to Verify a Runtime Upgrade
      • How to Verify Referendum Proposal
    • Treasury
    • Acala EVM+
      • Why Acala EVM+
      • Existing Solutions
      • Acala EVM+
        • Composable DeFi Stack
        • Flexible Fees
        • EVM Account
        • On-chain Scheduler
        • Queryable & Lightweight
        • Upgradable Contracts
        • Compatible Toolings
        • No Dust Account
      • How does it work?
  • Get started
    • Acala Network
      • Acala Launch Phases
      • Wallet & Account
        • Account Generation
          • Polkadot{.js} Browser Extension
          • Polkawallet Mobile App
          • Ledger Hardware Wallet
        • Exchange Withdraw/Deposit
        • Balance Type and Vesting
        • Check Address for Different Chains
      • Acala's DOT Bridge
      • Acala Assets
      • Governance
      • Acala Web Apps
      • Acala Mobile
    • Karura Network
      • Karura Launch Phases
      • Check Distribution
      • Wallets & Account
        • Account Generation
          • Polkadot{.js} Browser Extension
          • Polkawallet Mobile App
          • Ledger Hardware Wallet
        • Exchange Withdraw/Deposit
        • Balance Type & Vesting
        • Check Address for Different Chains
      • Inter Kusama Transfer
      • Karura Assets
      • Karura Web Apps
      • Governance
      • Transaction Fees
    • Mandala Testnet
  • Integrate
    • Acala Network
      • Protocol Info
      • Token Transfer
      • Node Interaction
      • Full Node
      • Collator
    • Karura Network
      • Protocol Info
      • Token Transfer
      • Node Interaction
      • Full Node
      • Collator
  • Build
    • EVM+ documentation
    • SDKs
      • Acala Stablecoin
      • Homa Liquid Staking
      • AcalaSwap
      • Homa Staking
    • Guides
      • Node Interaction
      • Transaction Construction
    • Build DApps
      • Deploy Ecosystem Modules
      • Composable Chains
        • Open HRMP Channel
        • Bridge Tokens
        • Cross-chain Listing
      • Open-Web3-Stack & ORML
      • Smart Contracts
        • Acala EVM Overview
        • Get Started
          • Connect to a Node
            • Use MetaMask with EVM+
          • Setup EVM Account
          • Polkadot Explorer
          • EVM Playground
          • Use Remix
          • Use Waffle
          • Use Hardhat
          • Deploy Contracts
        • Advanced
          • Use Native & Cross-chain Tokens
          • Use On-chain Scheduler
            • Tutorial
          • Use Oracle Feeds
          • Upcoming Features
        • Acala EVM Hacker Guide
          • Try Acala DApp
    • Tools
    • Indexers
      • SubQuery
    • Miscellaneous
      • Runtime Events
      • Modules
    • Cross Chain DeFi
  • Ecosystem
    • General Info
    • Alliance
    • Community
    • Contribution & Rewards
      • Acala Old Friend NFT
    • Ecosystem
    • Media Kits
    • Ledger Generic App Migration
  • Crowdloans
    • What are crowdloans
    • Acala Crowdloan
      • Crowdloan Event
      • Crowdloan Rewards
      • Claim ACA
      • How to Crowdloan
      • FAQ
      • Acala Quests
        • Attaching Polkawallet to Polkadot.js Extension
      • DOT Address
        • Creating a New DOT Account
        • Becoming a DOT Holder
        • Unstaking Your DOT
          • Unstaking Your DOT Tokens on Polkadot.{js} Extension
          • Unstaking Your DOT Tokens on Polkawallet
    • Karura Crowdloan
      • Crowdloan Event
      • Crowdloan Rewards
      • Claim KAR
      • How to Crowdloan
      • FAQ
      • KSM Address
        • Creating a New KSM Account
        • Check KSM Address
        • Unstaking Your KSM
          • Unstaking Your KSM Tokens on Polkawallet
          • Unstaking Your KSM Tokens on Polkadot.{js} Extension
      • Finding Tokens and NFTs
  • Misc
    • aUSD Incident
    • Contributing
    • Glossary
Powered by GitBook
On this page
  • Composable With Acala
  • Background
  • Integration Guide
  • Step 0 Local Parachain Testnet
  • Step 1 Integrate xtokens module to Support Acala/Karura Tokens
  • Step 2 Make your token available in Acala/Karura
  • Step 3 Open HRMP Channel
  • #ComposableWith

Was this helpful?

Edit on GitHub
  1. Build
  2. Build DApps

Composable Chains

PreviousDeploy Ecosystem ModulesNextOpen HRMP Channel

Last updated 6 months ago

Was this helpful?

Currently, cross-chain message passing and parachains are available on Polkadot/Kusama. Acala/Karura is now launched on Polkadot/Kusama, and is testing cross-chain fungible token transfers, and other functionalities.

Composable With Acala

  • Karura is live on Kusama

  • Acala is live on Polkadot

Background

is a generic message format that doesn't specify use cases like fungible tokens. Therefore, we need to provide an implementation of the required use case e.g. cross-chain transfer, for parachains to be interoperable with the same context, namely, send/receive fungible assets between parachains, and between relay chain and parachains. We want to keep the same interface for Relay Chain assets (like DOT or KSM), and for native parachains assets (like ACA for Acala or KAR for Karura), and abstract from implementation details making it easy to integrate.

The has laid out cross-chain fungible asset design considerations and discussions, as well as a reference implementation orml-xtokens that Acala and many others are currently adopted and testing.

Each parachain has its own fungible token, for parachains who want to do cross chain transfer of its asset and sibling parachain's token, is a reference implementation of XCM for fungible tokens that can help easily doing cross-chain token transfer job.

Note: the reference implementation is by no means definitive, rather it is the starting point for the parachain community to experiment and iterate. Please provide feedback to or the .

Parachains have it's own implementation to manage not only local asset, but also foreign asset. Currently, Acala use . Thus, for parachains want to be added to Acala or Karura, please refer to the user guide . Other parachain may have different asset management(i.e. use from substrate) or just manual maintain the assets, but they all use orml-xtokens doing cross-chain token transfer.

Integration Guide

Step 0 Local Parachain Testnet

Checkout README in , there're two tools to setup a local parachain testnet environment now:

  • use parachain-launch which run with docker. Follow by @bertstachios.

  • use polkadot-launch which run with binary build release file.

Step 1 Integrate xtokens module to Support Acala/Karura Tokens

CurrencyIdConvert can convert CurrencyId to MultiLocation and also convert MultiLocation to CurrencyId. The former convert is used by orml-xtokens to send xcm to recipient chain, while the later one is used when you received xcm instruction that need to transfer to correct token.

Step 2 Make your token available in Acala/Karura

Step 3 Open HRMP Channel

If you use parachain-launch or polkdot-launch, both tools support initiate hrmp channes when startup local testnet, so the cross-chain token transfer is ready to go. Of course you can manual init hrmp channels by the instructions below.

Your chain shall already be connected to Polkadot/Kusama as a parachain. While XCMP (Cross-chain Message Passing) is still being implemented - that is sending cross-chain messages directly to each other without passing through the Relay chain, a stop-gap protocol HRMP (Horizontal Relay-routed Message Passing) is in place.

HRMP has the same interface and functionality as XCMP but is much more demanding on resources since it stores all messages in the Relay Chain storage. When XCMP has been implemented, HRMP is planned to be deprecated and phased out in favor of it.

#ComposableWith

All chains on Polkadot/Kusama shall be composable with each other, from exchanging value to exchanging and altering states. For example, chains can not only transfer values trustlessly, they can also call pallet/smart contract functions of each other e.g. minting PolkaBTC on Interlay chain, transferring PolkaBTC to Acala, and collateralizing it for aUSD all in one transaction.

Acala will be composable with the following (potential) parachains. If you have or are implementing xtokens, please PR to this Repo to add yourself:

  • Bifrost

  • Astar

  • Interlay

  • Phala

  • Moonbeam

  • Centrifuge

  • HydraDX

  • Darwinia

  • Kilt

  • Crust

  • Snowfork

  • Bit.Country

  • ...

Don't hesitate to contact us if you'd like to try it out, need support, and/or want to run some cross-chain testing together with us!

To receive tokens issued on Acala's chain(aUSD, ACA, renBTC, LDOT etc) or Karura's chain(kUSD, KAR, LKSM etc), you need to include them in your currency type; and also, to implement currency id conversion. Check for currency id conversion in Acala runtime.

There is an onboarding procedure to introduce new tokens on Acala/Karura to avoid spam tokens. Acala use to manage assets, please refer to the user guide to add new tokens on Acala/Karura.

The two parachains will need to open HRMP channel on either side to send and receive cross-chain messages. .

here
here
Polkadot Cross-Consensus Message Format (XCM)
XCM Fungible Asset Implementation Guide
orml-xtokens
xtokens
implementation guide
asset-registry
here
pallet-assets
Acala main repo
this guide
example here
asset-registry
here
Instructions here to open HRMP Channel