Difference between revisions of "Trustless multi-chain web3 using the IC"

From Internet Computer Wiki
Jump to: navigation, search
Line 1: Line 1:
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 chain 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.
+
'''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]].'''
  
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 on 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 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.
  
The Internet Computer is powered by a unique [[chain key cryptography]] framework. This provides each transparent [[subnet blockchain]] inside its network with its own public [[chain key]], against which they can create cryptographic signatures that prove results have not been tampered with and the chain is operating correctly (this functionality builds on [[threshold cryptography]] and other techniques, including [[non-interactive distributed key generation]] (NIDKG) and [[key resharing]] techniques that provide for chain keys to be maintained indefinitely, even as network nodes come and go - signing is scaled using [[Merkle trees]]).
+
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 on 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).
  
Originally, chain key cryptography was only involved in the engine that powered the Internet Computer, but now its protocols have been extended so that hosted smart contracts can maintain [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm ECDSA] public keys, and make corresponding signatures, without need to store an insecure [[private key]]. ECDSA is the signature scheme used to sign TX on ''other'' blockchains, and allows smart contracts on the Internet Computer to create web3 orchestration frameworks that control multiple blockchains.
+
The functionality is an extension of the unique [[chain key cryptography]] framework that powers the Internet Computer. This provides each transparent [[subnet blockchain]] inside its network with its own public [[chain key]], against which they can create cryptographic signatures that prove results have not been tampered with and the chain is operating correctly (for the technically minded: this functionality builds 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]]).
  
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, these smart contracts can process bitcoin almost as though they were 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".
+
The chain key cryptography protocol engine was extended so that hosted smart contracts can maintain [https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm ECDSA] public keys, and make corresponding signatures, without need to store an insecure [[private key]]. Crucially, ECDSA is the signature scheme used to sign TX on ''other blockchains'', and allows smart contracts on the Internet Computer to directly interact with them, almost as though they were hosted by them.
  
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 [https://ethereum.org/en/developers/docs/accounts/ Ethereum Account], which should then need to 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.
+
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".
  
Using the power of chain key cryptography, the Internet Computer can thus be used as an orchestration blockchain, upon which services 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.
+
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 [https://ethereum.org/en/developers/docs/accounts/ 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.'''

Revision as of 17:15, 25 July 2022

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.

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 on 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 is an extension of the unique chain key cryptography framework that powers the Internet Computer. This provides each transparent subnet blockchain inside its network with its own public chain key, against which they can create cryptographic signatures that prove results have not been tampered with and the chain is operating correctly (for the technically minded: this functionality builds 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 an insecure private key. Crucially, ECDSA is the signature scheme used to sign TX on other blockchains, and allows smart contracts on the Internet Computer to directly interact with them, almost as though they were hosted by them.

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.