Trustless multi-chain web3 using the IC

From Internet Computer Wiki
Jump to: navigation, search

On the Internet Computer, you can create smart contracts that directly interact with other blockchains, without trusted centralized bridges that can get hacked and do rug pulls. This has been made possible using chain key cryptography.

The web3 environment contains multiple blockchains that have different characteristics and excel in different roles. A key web3 philosophy is service composability, in which different blockchain services are composed to create new services and functionality. Tokenized assets and liquidity must also be able to move between services, whichever blockchain they are on. The Internet Computer provides a means to fully support this paradigm in a multi-chain environment without need for trusted bridges run by central controllers such as companies.

For example, when building a DeFi framework on the Ethereum blockchain today, a means must be found to create the user experience. Typically, this is built on centralized servers or cloud services today, creating a serious security vulnerability, and exposing the developers who pay for the servers or cloud services to legal liabilities (since regulators can argue that the service built using Ethereum is not running in the mode of a decentralized protocol). Therefore, it would be better if the user experience could be created on the Internet Computer using canister smart contracts, which are controlled by a DAO. A means has been provided to do this (please check developers docs to see what is in production at any one time).

The functionality has been provided by extending the novel chain key cryptography protocols that power the Internet Computer. These protocols provide each subnet blockchain within the overall Internet Computer network with their own public chain key, for which they can create cryptographic signatures on messages that prove returned results have not been tampered with, and that they are operating correctly (for the technically minded: this functionality involves consensus that depends on threshold cryptography and other cryptography schemes, including non-interactive distributed key generation (NIDKG) and key resharing techniques, which provide for chain keys to be maintained indefinitely, even as network nodes come and go, with signing scaled using Merkle trees).

The chain key cryptography protocol engine was extended so that hosted smart contracts can maintain ECDSA public keys, and make corresponding signatures, without need to store a private key on the blockchain in a way that would allow it to be stolen. Crucially, ECDSA is the signature scheme used to sign TX on other blockchains, and allows smart contracts on the Internet Computer to create TX that other blockchains directly execute.

One application has been the provision of special Bitcoin capabilities to canister smart contracts. This allows them to create bitcoin addresses, and send and receive bitcoin directly on the Bitcoin ledger, without any need for insecure trusted intermediaries such as bridges. Essentially, smart contracts on the Internet Computer can process bitcoin almost as though they are hosted by the Bitcoin network themselves. This provides a way to use bitcoin within web3 services built on the Internet Computer, without asking users to wrap their bitcoin using a trusted bridge run by central controller, which might get hacked, or do a "rug pull".

Another application is the signing of TX designed to invoke smart contracts on other blockchains, such as Ethereum. For example, to interact with Ethereum, an Internet Computer canister smart contract would first create an ECDSA public key that functions as an Ethereum Account (before use this should be charged with some ETH to pay for gas). Thereafter, the smart contract can invoke smart contract calls on the Ethereum blockchain, by creating and signing appropriate Ethereum TX that will be executed by Ethereum network. The smart contract can then determine the results of the TX by using the HTTPS outcalls feature to interact with Ethereum local nodes.

Using the power of chain key cryptography, the Internet Computer can thus be used as an orchestration blockchain, or meta blockchain, upon which new services can be built that combine functionality and assets provided by other blockchains in the web3 universe - all without the need to trust a central party, and without the inconvenience and risk of using wrapping and bridges.

Pro tip: At the time of writing, there are no other blockchains in existence that can create TX on other blockchains for their smart contracts. Blockchains that talk about "native integrations" are usually talking about a bridge run by the company that backs them.