ChainX is developing a Filecoin bridge. How does this can help Polkadot ecosystem?

9 min readMar 30, 2020

The Polkadot ecology project ChainX is developing and bridging FIL, and will open source when Polkadot live. We interviewed with Qinghuan, the core developer of ChainX, to learn more.

PW: Why does ChainX network want to bridge FIL ? What will be the help to Polkadot ecosystem after bridging to FIL?

Qing Huan: ChainX is an inter-chain asset gateway with an aim to attract more inter-chain assets, we want to build a Web3.0 ecosystem where all the blockchains are interconnected,and values are freely transmitted. Filecoin may become the infrastructure of all blockchain projects. Storage problems can be solved by IPFS technology and the Filecoin network,. This is why ChainX is connecting to FIL.

The IPFS technology used by Filecoin uses sharding to divide the user’s files into N shares, which are encrypted and stored in some nodes on the network. We know that the smaller the file, the faster the download. Therefore, using IPFS for cloud storage means that these nodes can store different pieces of file fragments at the same time. It only takes 1 / n time to complete the storage.

It’s well known that BTC and ETH have small block capacity and small on-chain data, due to the huge transaction volume, the size of the “ledger” is several Terabytes currently, and the amount of data for individual nodes is also huge. To solve this problem, IPFS storage is supposed to store all blockchain data and be accessed at any time needed.

For the Polkadot ecosystem, IPFS has a very large group of miners, users, and communities as a blockchain infrastructure. On the one hand, connecting to FIL can attract the user of the FileCoin community to Polkadot, and the combination of two strong projects brings a huge network effect, which will expand the user group of the Polkadot community. On the other hand, future parachains and Dapps can store data on the FileCoin network through the FileCoin transfer bridge.

PW: After the open source of ChainX, what can developers or Polkadot eco teams do based on ChainX?

Qing Huan: Open source code is a standard feature of cryptocurrencies. It allows everyone to see how these systems work at the code level, which makes the system more credible. Open source also shortens the cycle of innovation. Developers do not need to reinvent the wheel. They can continue the development on their previous work.

As promised by the development team, ChainX will open source after Polkadot launching. The ChainX open source code includes: the underlying chain, web wallet, BTC transfer bridge, front-end interface library, etc.

ChainX is at the forefront of the market in the field of inter-chain decentralized assets. Technically, XBTC uses a combination of a highly decentralized light-node sidechain relay and a notary schemes. ChainX uses Wasm technology to implement Bitcoin light nodes for the first time. It supports PoW verification and complete transaction proof verification of the Bitcoin block header, making the inter-chain in the direction of Bitcoin to ChainX completely decentralized and Bitcoin-style security. Users’ XBTC assets are completely hosted and verified by Bitcoin light nodes. The lock-release process is automated and secure.

ChainX’s Bitcoin smart platform has many advantages, including high-latitude decentralization, low-cost use, and the use of a more secure contract language, so it has advantages that other similar types of the Bitcoin auxiliary projects has never had. As an ecological gateway for Bitcoin, ChainX will bring smart contract to Bitcoin. Bitcoin with smart contract functions will bring new value pegging and further expand Bitcoin’s asset attributes as the world’s largest Bitcoin Layer 2 Network.

A series of ChainX technologies are at the forefront of the crypto market. With the open source of ChainX, we will bring a series of technological breakthroughs and solutions for the crypto community in the inter-chain assets, light node transfer bridge, and fields of smart contract. Users can refer to ChainX’s open source solutions to achieve more exciting applications and technological innovations, thereby promoting the development of blockchain technology. ChainX, as the first chain of Polkadot ecology in China, has taken the lead in supporting smart contracts, which will bring reference to other chains of Polkadot ecology.

Open source also means decentralization and handing over to the community. ChainX will undergo community code review and development progress review. Open source means a decentralized and more open governance system. ChainX will belong to the entire crypto community and build a larger developer community. Any developer can participate in the ChainX ecological construction and jointly build a broader blockchain inter-chain ecosystem, making continuous efforts to move towards Web 3.0.

PW: Why do you choose to open source ChainX at this time when Polkadot live?

Qing Huan: The launch of Polkadot is not only an important milestone of Polkadot’s ecology, but also has great significance for the entire crypto community, marking the arrival of the new ecosystem of Web 3.0, including chains interconnection, inter-chain assets, and free transfer of value. For ChainX, we will connect to Polkadot network as the inter-chain asset hub that bringing BTC, FIL and other inter-chain assets to the entire ecosystem. ChainX is the world ’s largest Bitcoin layer 2 network and Bitcoin smart contracts. The portal will connect the BTC community and the Polkadot community, and promote the complete implementation of BTC smart contracts.

Choosing this point in time is also an important milestone for ChainX since it’s launching. ChainX will work with global developers, the Polkadot Ecological Community, the Bitcoin Community, and the Filecoin Community to prosper.

Secondly, from a technical point of view, since ChainX was launched one year earlier than Polkadot, since the early development of Polkadot was accompanied by bug fixes, new function implementations, and version iterations. The current underlying version of ChainX is the old version of substrate. After Polkadot launching, we will upgrade to the latest version and open source for community audit.

PW: What is the specific way to bridging to Filecoin? What are the main steps?

Qinghuan: connecting to Filecoin will be divided into four steps:

Implementing the IPFS rust library

Implementing filecoin’s Rust client

Filecoin storage pool

Integrate the implementations of the three modules above into the substrate as a parachain.

PW: What milestones have been completed so far in bridging to FIL?

Qing Huan: At present, the team is developing a Rust version of the client and Filecoin’s storage mining pool. At present, the overall framework has been built. After the two steps, it will be integrated into Substrate as a parachain.

PW: What is the difference between ChainX Bridge and Polkadot Bridge?

Qinghuan: The ChainX Bitcoin transfer bridge uses a one-way light node relay mode. Users’ tokens are jointly hosted by multiple trust nodes. There are two hot and cold multi-signature addresses, both of which are public addresses. All transactions are transparent.

What Polkadot provides is the communication capability between parachains, but if the chains of Polkadot ecosystem want to communicate with the chains outside Polkadot ecosystem, it is necessary to use a transfer bridge. One or more transitions can be realized on the parachain bridges that use different technologies. But since Polkadot provides communication between parachains, a bridge implemented on a parachain can not only serve itself but also other parachains. This creates a network effect.

The parachain of Polkadot has a complete main net. The main net can provide a secondary slot like Polkadot, so that the parachain on the parachain is realized, that’s called the secondary relay. Since Polkadot has limited slots, parachains can be expensive, and secondary parachains can solve this problem. It is foreseeable that with the increase in the number of bridges connected to the Polkadot ecosystem, there will be a situation where the first-level parachain is not enough. At this time, someone will choose to develop the bridge on the second-level relay chain.

After Polkadot launching, ChainX will add a new bridge to Polkadot to provide transaction services for Polkadot coins and other parachain assets on the relay chain. So the advantage of ChainX is that it has the entire network of assets and can take advantage of all currencies. For example, after submitting the block header hash of BTC, we have the most secure nonce on the whole network, which can be developed through our smart contracts. All kinds of asset mini-games and bets using BTC. We will also make stable currency contracts collateralized by BTC, and a private trading system based on ZEC. The community can also provide users with more anti-risk tools, including futures, options, indices, funds, loans, insurance and other high-level Financial Services. ChainX v3 will be launched after Polkadot releases v2 in the following year. ChainX will also be divided into multi-chain frameworks to improve throughput, and will serve as Polkadot’s second-level relay network as a whole.

PW: Can I lock or collateralize FIL to mine PCX after bridging to FIL,?

Qing Huan: Yes, we will develop a FIL transfer bridge. FileCoin community users can mine PCX by collateralizing FIL and participate in the construction and governance of the ChainX ecosystem.

PW: ChainX is the first project to distribute tokens through lock-up airdrops. What’s the pros and cons at present?

Qinghuan: ChainX distributes tokens through lock-up airdrop for security and community governance. Satoshi Nakamoto designed BTC, 21 million by a long-term distribution, so that people at every time point can come in to get BTC, so that the holders are sufficiently dispersed. PoS now has a shortcoming for the concentration of currency holders, because early coins are concentrated in the hands of early investors. It makes the PoS chain be only participated by early investors, and it will be difficult for later people to participate.

At the same time, BTC coming across the chain is of great use, because the BTC’s 10min 1 block has been changed to 2s 1 block, the TPS has increased from 7 to thousands, and the handling fee has been reduced from ten to a few cents. It makes BTC truly have scalability, which can be circulated to any Polkadot parachain for Dapp incentives, such as ETH, and the decentralized exchange on ChainX will be the first BTC Dapp.

To sum up, on the one hand, the issuance of tokens in the lock-up airdrop model has realized fairness and decentralization of token distribution, so that anyone can participate in ecological construction, and the holders of tokens are sufficiently dispersed.

On the other hand, the lock-up airdrop method allows users of other ecology such as BTC and FIL to participate in the ChainX ecology, bringing a larger community and user group to the ChainX ecology. With the further construction of the ChainX ecological network, more valuable assets will be introduced, so as to build an asset hub with interoperability of assets, free circulation of value and a new ecosystem of Web 3.0.

At present, there isn’t any better token distribution model, we are looking forward to good suggestions and plans from the community.

PW: BTC mining PCX by BTC bridge , and FIL mining PCX by Filecoin bridge. Will this mode of token mining continue in the future? As more chains are connected, what will happen to the difficulty and profitability of PCX mining?

Qing Huan: After Filecoin can be transferred by bridge , it will also participate in PCX mining. In the near future, ChainX will adjust its computing power. All the assets on the chain have the same computing power as PCX. Others are airdrop benefits, and this proportion has been greatly reduced.

This is first to ensure the basic interests of PCX users, and second to encourage inter-chain assets to be transferred to ChainX, while controlling the proportion of airdrops to control no-cost selling. When Fil is connected, it will be able to trade freely on ChainX like X-BTC, and there will be corresponding applications. Therefore, FIL and X-BTC participate in the mining of PCX.

How much computing power FIL can occupy requires specific calculation. The computing power of all inter-chain assets(X-token) is converted to peer PCX computing power through a function. Now the computing power ratio of X-BTC to PCX is 400: 1. Such function design is mainly to ensure that once the inter-chain assets are lost, there can be enough PCX to hedge the risk. Therefore, after FIL can be transferred by bridge, the council have to adjust the algorithm according to factors such as the specific PCX price and risk tolerance. As more inter-chain asset accesses occur, the ratio function between X-Token and PCX will dynamically adjust basing on the currency price and security factors on the exact day. This does not have much impact on the difficulty of PCX mining, and the rate of return will change, but the council will also take the benefits of users as an important reference when adjusting the function.

Follow us on Twitter:@polkaworld_org