Extending ETH with Chain Fusion - Dominic Worner (DFINITY Foundation)

ETHMilan 2024 · 23 Oct 2024 · 18:45

Dominic Worner, a solutions architect at the DFINITY Foundation, explains how Ethereum developers can extend their applications with Chain Fusion. After a mental model of the Internet Computer and its canister smart contracts, the talk covers threshold ECDSA, Schnorr and EdDSA signatures that let canisters sign transactions for other chains, plus direct Bitcoin integration and the EVM RPC canister. Examples include chain-key tokens, non-custodial web wallets, a zero-knowledge verification demo and composite attestations.

Speakers

Topics

From ETHMilan 2024, hosted by ETH Milan.

Transcript

so thanks for taking some time of your lunch break um for me so I'm Dominic um I part of the growth team at definity I'm a Solutions architect hello um mainly helping ecosystem teams to build on the internet computer and today um I want to tell you a bit about or give you a mental model about the internet computer but more importantly about this um chain Fusion technology um that we have and how you can leverage it as an ethereum developer or actually as a developer on every chain so and to start to give you a bit on a mental model about the internet

computer so um as usual with a with a layer one blockchain it all starts with the network and already there the internet computer is quite different um than the usual layer one so instead of having um people running their noes on at their home or mostly actually um on cloud infrastructure owned by uh big Tech um the internet computer is built up of a sovereign network of standardized Hardware run by independent node providers in independent data centers um all around the world and the internet computer protocol which also involves an

onchain Dow um basically um builds up of those individual nodes builds them into um subnets and these subnets run canister smart contracts and you see these multiple different networks that can be different in their topology so different numbers of nodes to give uh different latency but also different security still um the internet computer protocol weaves it all together that for an application or for you as a developer it's completely transparent so it doesn't really matter if your smart contract um calls another smart contract on the same

subnet or on a different subnet and it all feels like a a big um Computing environment and it's much better to think of canister smart contracts as Cloud functions or even virtual machines instead of thinking them what you can typically do with smart contracts and the real difference to um the the normal Cloud functions running on gcp AWS and so on is now that you can have really autonomous functions um they can be Dow controlled or they can be even user controlled and here you can see um a couple of features of these canister smart contracts um to um yeah to single

out a few um so it runs web assembly which means you can use all kinds of programming languages you are already used to so many people use rust um also typescript um is used and we also have Moto a programming language purposely built for the internet computer um you can host your websites um inside canisters and you can um run long running processes even AI inference um on chain and um um You can call out into um the internet so you have a connection to the inter internet directly built in I want to give a very very brief um

comparison with with ethereum it doesn't matter too much but um one difference is so most blockchains are synchronous um which means you lock State the the whole um computer basically for every transaction the internet computer is designed from the beginning to be scalable like a cloud horizontally scalable so it's as synchronous by nature and this is sometimes to build defi a bit of a headache and but if you think of the internet computer as this platform that interconnects all the chains then you have to be asynchronous um because those Communications with the other chains not only the internal subnets of the internet computer this

will be definitely um asynchronous and the other big uh difference is so um ethereum is highly replicated right and on the internet computer we have these yeah Noe providers um that go also through some kind of a kyc like process so they are known entities um and they can be uh by the da if they don't behave can be um extinguished from the protocol um so we can have what we call deterministic decentralization so um we know um that each subnet you don't have to replicate it thousands of times it's enough to replicate it maybe 50 times and you have those note providers um

independent in in in not a single jurisdication jurisdiction so and now I want to go a bit on how the crypto behind that enables the seamless communication so um every subnet on the internet computer has what we call um a chain key so this is a BLS threshold key and all state and all messages are assigned with these threshold keys and the internet computer originated from a a single subnet the network nervous system root subnet and all additional subnets got also a delegation um from this root subnet so what this means is

subnets can easily talk to each other because they sign all the messages between the subnets with this threshold key and the other subnet only needs to verify um this signature plus the delegation from the root subnet and this also um enables super um efficient light clients um so because a a light client just needs to know this one public key of the internet computer to verify everything so you can have like um a client easily in your web browser in your smartphone in your iot device and so on and so forth so okay we have this cool chain key Tech but it turns out BLS signatures

are a bit um expensive to verify and most of the other chains don't have pre-compiled for these BLS signatures so um we can't when we think about how do we weave the rest of the web 3 ecosystem into this fabric of the internet computer um BLS is at the moment not the right choice um but um let me now go a bit more into this chain fusion um text deck which comprises chain key signatures which we will talk about and network Integrations so um the the internet computer doesn't only support BLS threshold signatures it also supports um

ecdsa and since recently schnore and eddsa threshold signatures this allow ows smart contracts canisters on ICP to natively sign transactions for most of the blockchains out there so you can um control Smart contracts on ethereum you can um hold Bitcoin um you can hold Solana you can interact with the Solana Network and so on and so forth and what's nice about threshold um signing is the the signature that is generated really looks like a regular signature created by normal eua um so it's very easy for another party to verify those transactions in

signatures it also allows the the internet computer to have this um Dynamic node set so um um every couple of hours basically those key shares that are used to generate these threshold signatures are re-shared um within the network and so you can have new notes joining um notes leaving the network work but the key still um stays the same um and this also adds security because if an attacker um attacks a certain number of nodes to to extract those key shares they have to do it in this small window of a couple of hours so yeah I mentioned so ecdsa has

been around on the internet computer for a long time we built um like this Bitcoin integration on top of it and since recently we also have um snore signatures which allows you to for example mint ordinals on bitcoin and many more and EDSA which allows integration with um Solana and if anyone cares also cardano um and so now we have seen how we write to those other chains like the communication between the internet computer um outgoing um but we also need to like really talk to those other nodes and also get State um from the other chains to to have bir directional

communication and that's why we have these Network Integrations and we have two ways at the moment so the coolest one is definitely the direct Network level integration and we've built that for Bitcoin so some of the nodes on the internet computer also Run part of a Bitcoin node as a site so to connect really to the Bitcoin on on network on a peer-to-peer layer and then you have essentially a light client running as a Minister on ICP which makes at the moment for example the whole utxo set of Bitcoin available to all smart contracts um on ICP and we are currently working on to also have all the raw blocks um available so you can build like a

decentralized um U block Explorer and later on also decentralized indexer of Bitcoin meta protocols like ordinals and runes and so on and so forth for um for all the other chains um we we go a bit of a different way so I mentioned that canisters can do these HTTP out calls um which means they can call web apis and it turns out you can use this also to integrate with other chains um by just um calling a couple of like um institutional um RPC end points um out there so you call anchor and infura and whatever and only if like a quorum of

them gives you the same result you trust it um um in your canister and we've built quite a bit of tooling around that so an evm RPC canister to make it really easy um from canister smart contracts to to talk to evm chains there's also in a work in progress on an salana RPC canister and people have built um like an integration with Cosmos and so on and so forth yep I've already uh said that and because we use wasum um as an environment it and you can use rust or typescript you can also in most cases um just use the libraries you're already used to so for example ethers RS or

alloy or rust Bitcoin um uh directly on the internet computer and currently um one of our Engineers is like looking into making it even easier so integrating like a an ICP signer and um ICP provider in into um this very popular alloy Library so that you really have um a very smooth flow here to sign a transaction on the internet computer with this threshold signing from a canister and the same could be used to sign transactions and this is an example um from this exploration to get um yeah a balance um of an ethereum address um

from the internet computer it's also just a couple of lines of code and very similar to what you're already used to so let's get a bit into what can be built on top of that and I don't want to talk too much about chain key tokens this is um the these are projects that currently the definity foundation has built the these are those non-custodial wrapped assets so you have a version of Bitcoin on the internet computer and you have a version of um ethereum and a lot of ec20 tokens and you can make a proposal to add um um ec20 tokens and then you have this non-custodial representation on on ICP which is can

then plug into the whole internet computer ecosystem is very fast very cheap and so on and so forth and there are already projects who are now exporting those um tokens to other chains again so a lot of um um Bitcoin layer 2os are served by the internet computer with Bitcoin with CK BTC um and there was also recently this announcement that um omn Team brought um um BTC to osmosis also via the CK BTC route um um on the internet computer and there is a lot of stuff that is being built so people build like lending protocols on bitcoin using ICP um they buil

non-custodial web wallets because you can do you can use this threshold signing obviously also to to serve end user accounts um people are building co-processors for ethereum smart contracts and oracles and so on and so forth I want to go into a couple of in a bit more detail I do have a bit of time so um one thing together with the CK tokens you can experience at our booth outside is this oy wallet it's one of these um non- custodian web wallets um so you can log in from multiple devices using pass Keys um essentially um and it's a wallet that works for the

internet computer it works for um the ethereum ecosystem and we will soon also support Bitcoin and I I assume also um Solana um and yeah you don't need to download anything it's um from that perspective also you have plausible deniability if you ever get into to security controls or um um I don't know attacked by by someone because it's really just a website then another fun example is um cclo Network they use the internet computer as a verification layer for all kinds of Zer knowledge proofs and then um teleport um the the verification

results um to all kinds of evm and non M compatible chains and what I want to um show here is they have this little example which shows you that you can build um experience for all kinds of chains on the internet computer and users don't even notice that there's the internet computer involved so this website is hosted on the internet computer um you log into um with an evm wallet or with a Solana wallet so the internet computer has this native account abstraction um at its core since 3 years already um and then you can um U move this character through that Maze

and then you generate client side a proof of how many turns you took so how many steps you needed um to um to fulfill that Ma so you prove that you did it in a certain number of counts but you don't show the way and then this proof is submitted to the internet computer um verified um on the internet computer and then teleported to the to the destination chain using threshold signing um another one that I like quite a lot which is also an example of this people don't even know that that they are running um this on the internet computer you probably know about the um ethereum attestation service it's like an a service and a

protocol to have onchain and offchain credentials so kind of verify data about certain things and this cats project composite attestation service um allows to create um rules on like fetching different kinds of um attestations from different chains from offchain sources and then um comput on that composite attestation like computes on the set of attestations and create a new attestation out of that and makes it available um for evm chains again and to make this easy and simple the

developer even like ported uh a JavaScript um interpreter um um on the internet computer so he can have these rules on how to um mingle these essations and how to combine them together um on on the internet computer and then uses again threshold signing to Port um this composite attestation um to the end chain and also here you just connect with your ethereum or evm wallet and you don't notice as a user that um the internet computer is involved so and I think we've only really scratched the surface here on what's really possible um so I invite

everyone to check it out um some of the things at at our booth um but also get in get in touch with me to discuss about use cases and get involved um in in the community and build start building on the internet computer so with that thanks a lot and [Applause]

Related talks