Inter-chain Assets in ChainX Smart Contracts

ChainX
2 min readApr 7, 2020

Currently, only Bitcoin is supported in the ChainX smart contract.

Since the Substrate smart contract platform model is similar to that of the Ethereum, the processing of multiple currencies is a “local currency + token” model.

For this model, the inter-chain assets on ChainX smart contracts adapt the contract token model, so PCX on ChainX will provide the value of gas and local currency circulation for smart contracts like Ethereum. For inter-chain assets on ChainX Introduced in the form of contract tokens.

Why we adapt the token model instead of introducing multiple currencies directly into the contract is based on the following considerations:

1) The Ethereum token contract is relatively mature, so it is relatively easy for contract developers to migrate the Ethereum contract to the ChainX smart contract platform under the token model.

2)If the concept of multi-currency is introduced in the contract, the Substrate Contracts model will be greatly modified, and it is easy for unexpected problems.

3)Currently, ChainX implements the XRC20 model for bitcoin in smart contracts. Based on feedback from contract developers, other standards may be adopted in the future. The token models that have been considered are:

XRC20 (formerly Ethereum ERC20)

XRC721 (formerly Ethereum ERC721)

XRC777 (formerly Ethereum ERC777)

The current X-BTC corresponds to the XRC20 token model used in the smart contract platform. Users can freely initiate transactions to convert X-BTC from ChainX to XRC20 in the contract platform

About ChainX

--

--

ChainX

ChainX is a BTC Layer 2 solution compatible with EVM that utilizes Bitcoin as a gas fee, serving as the predecessor network of BEVM.