BTC
ETH
HTX
SOL
BNB
View Market
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt

Darwin: Ethereum Golden Gate Bridge two-way transfer opens

PolkaWorld
特邀专栏作者
This article is about 5135 words, reading the full article takes about 8 minutes
The gradual launch of the Darwin mainnet has reached the third stage: a complete "Darwin-Ethereum cross-chain bridge".
AI Summary
Expand
The gradual launch of the Darwin mainnet has reached the third stage: a complete "Darwin-Ethereum cross-chain bridge".

The gradual launch of the Darwin mainnet has reached the third stage: a complete "Darwin-Ethereum cross-chain bridge".

Now, you can freely transfer Darwin assets between Darwin and Ethereum in a decentralized manner, of course, you need to pay some network fees (Ethereum and RING).

This article will first review some background knowledge of the Darwin-Ethereum cross-chain bridge and the one-way bridge in the previous stage, and then focus on explaining the Darwin-Ethereum bridge opened this time, taking you to understand its characteristics, important components and usage, during which It will also introduce some Darwin adopted or innovative technologies, and take you to understand the Darwin two-way bridge from the shallower to the deeper, and why it is decentralized and trustless!

background knowledge

background knowledge

Darwin Network is a decentralized bridging network developed based on Substrate. It is the Golden Gate Bridge hub of cross-chain ecology. It provides the safest general bridging solution and can realize cross-chain assets between heterogeneous chains such as Polkadot, Ethereum, and Tron. And the general remote chain call, as the bridge center connecting heterogeneous chains, any network can realize the one-time access to Darwin to open up the cross-chain bridging link to other connected networks, without repeating the construction of two-two direct connections bridge. The main application areas include Defi, cross-chain NFT trading market, games, etc.

##RING

RING is the original asset of the Darwin network, and RING can be used as a fuel fee for transactions. Gas fees include transaction fees, contract execution fees, cross-chain service fees, and more.

##KTON

first level title

Ethereum → Darwin Bridge

The Ethereum → Darwin Bridge, formerly known as the Ethereum Darwin One-way Bridge, isThe gradual launch of the Darwin mainnetThe main functions opened in the second phase.

ERC20 versions of RING and KTON, as well as RING certificates of deposit, can be transferred back to the Darwin mainnet through the Ethereum → Darwin bridge cross-chain.

The Ethereum → Darwin Bridge implements a Super Light Client (Super Light Client) on the Darwin chain to achieve cross-chain verification while reducing costs. The super-light client uses a special MMR data structure, which has been adopted by projects such as Grin and Beam. However, when the source chain block header does not support the super-light client, there are still many off-chain implementations of this protocol that have not encountered it. challenge.

Darwinia innovatively solves the challenge of realizing Super Light Cient on the chain, introduces the optimistic verification game game and integrates it into a set of economically feasible cross-chain transfer bridge solutions, providing a direction for the cross-chain of heterogeneous chains in the future.

first level title

Darwin → Ethereum Bridge (D2E Bridge)

Darwin→Ethereum bridge is a decentralized cross-chain bridge from Darwin to Ethereum, referred to as D2E bridge. The D2E bridge is a main function of the third stage of Darwin's gradual launch process, marking the two-way opening of the cross-chain bridge between Ethereum and Darwin.

The current main function of the D2E bridge is to transfer the digital assets on the Darwin mainnet to Ethereum in a decentralized manner.

Specifically, users lock the original assets on the side of the Darwin mainnet and keep them safely in the contract, and no one can take them out. The smart contract on the Ethereum side implements a super light client for observing the Darwin network, which can verify the original asset lock proof submitted by the user and generate an equivalent amount of ERC20 assets.

Thanks to the GRANDPA protocol with irreversible finality running on the Darwin network, the super light client on the Ethereum side can confirm and verify the cryptographic credentials submitted by the user in a very short time.

The above process is exactly the opposite of the function of the Ethereum → Darwin one-way bridge that was opened in the early stage. At the same time, because it transfers Darwin’s original assets from the chain to other chains, the D2E bridge is often called the Darwin-Ethereum reverse bridge. .

secondary title

1. Distrust

In the field of blockchain, trustless means that you can manage or operate your own assets without trusting any centralized system or any participant in the system, and ensure the security of your own assets.

There are many ways to achieve cross-chain assets, including centralized and decentralized. The centralized method is the simplest, such as relying on a middleman or custodian to achieve. But the biggest disadvantage of the centralized approach is the dependence on trust.

Darwin bridges, including D2E bridges, are designed to provide cross-chain capabilities in a decentralized manner. Users only need to trust this cross-chain protocol, as well as the code, cryptography, and economics that implement this protocol. All participants, including Darwin developers, are incentivized to follow the rules of the game ensured by this cross-chain protocol, otherwise they will receive financial penalties.

Substrate GRANDPA has irreversible finality and can quickly help finalize (Finalize) the blocks of the Darwinia source chain; in contrast, the workload proof (PoW) consensus system only has probability-based finality and needs to wait for more block confirmations Number to get a high probability of finality.

secondary title

2. Low fuel consumption

As we all know, the operation of the blockchain is costly, so the use of the blockchain requires fees.

Many decentralized cross-chain solutions are implemented by running light clients in the opponent's blockchain, and Darwin also belongs to this category. However, the classic light client needs to maintain all the block headers of the complete blockchain, which is not a small overhead, especially if the chain is already very long, it will occupy a huge storage space on the source chain.

However, Darwin's light client is an ultra-light client. It only needs a limited and on-demand small number of block headers to ensure the normal work of the light client, that is, it can be used to prove To verify the existence of the transaction, the specific scheme will be introduced in the following chapters.

Classical light clients are technically feasible, but economically unsustainable, and Darwin's sublinear superlight clients solve this problem.

Just because the D2E bridge implements such an ultra-light client with smart contracts in Ethereum, users can complete decentralized cross-chain operations at very low cost.

Composition of D2E Bridge

secondary title

1. Darwin ultra-light client on Ethereum

As mentioned earlier, most decentralized cross-chain solutions use light clients. The so-called light client is a data structure that only contains the blockchain block header. It does not need to store a huge and complete blockchain, so that users can access the blockchain in a safe and decentralized manner without synchronizing the complete blockchain. to interact.

But for a light client that is developed with smart contracts and saves all block headers on the source chain on the chain, it cannot be called light.

Darwin by introducingMerkle Mountain Range(MMR)Implemented a super light client (Super Light Client) that submits block headers on demand.

The ultra-light client does not need to save every block header, and only when needed, the bridge miner submits the required block header to it to meet the data verification requirements. The correctness of the block headers submitted by bridge miners is guaranteed by D2E Authorities.

Compared with the PoW protocol network, such as the Ethereum Darwin Bridge, an additional optimistic verification game needs to be introduced for confirmation, and the ultra-light client takes less time and is more efficient.

In the future, when the Ethereum precompiled contract supportsEd25519secondary title

2. Bridge Miner

Since the chains cannot directly access each other, the block data of the light client and its MMR summary submission need to be completed by a third party, and this third party is the bridge miner.

Anyone can become a bridge miner, and bridge miners earn income by completing relay tasks between bridges.

Bridge miners supervise each other and will be punished for submitting wrong data, while honest bridge miners can obtain cross-chain service fee income and possible whistleblower rewards.

secondary title

3、D2E Authorities

As mentioned above, the correctness of the current block header cannot be guaranteed by GRANDPA, because the gas fee for verifying Ed25519 Justification on Ethereum is very expensive. If GRANDPA is directly used to verify the block header, the overall cross-chain fee will become very expensive accordingly.

Therefore, Darwin used an additional set of Authorities to accomplish this. This set of Authorities is voted by the parliament, including the increase or decrease of members, which will be decided by the parliament. D2E Authorities is essentially a simulation of the GRANDPA protocol, replacing the Ed25519 to Ecdsa encryption algorithms that Ethereum does not currently support.

Anyone can apply to become an Authority, and the parliament votes to decide whether to approve its joining. Once it becomes an Authority, it must perform its duties as an Authority. Before a Darwin block is submitted to Ethereum, it must perform an Ecdsa signature on the MMR Root required to verify the block header.

In addition, in addition to the responsibility of signing the MMR Root, when the Authorities change, the original Authorities also need to sign the new round of Authorities collection, so as to complete the Authority change process.

secondary title

4. Ethereum Backing Module on Darwin

Ethereum Backing is a module that endorses the issuance of Darwin assets on Ethereum.

Simply put, all assets transferred to Ethereum need to be locked into this module for safekeeping. No one can extract assets from it, unless the user provides the asset destruction certificate on the Ethereum side, and the corresponding amount of assets can only be withdrawn after the module's super light client verification confirms that the asset destruction has indeed occurred.

This process is also the redemption agreement of the forward bridge, that is, the user transfers assets back to the Darwin network on the Ethereum side.

secondary title

5. Security mechanism

At the beginning of the opening of the Darwin → Ethereum two-way bridge, we applied several security modules:

Daily cross-chain transfer limit

protector

protector

Guardians are enabled in the forward bridge, which is a multi-signature system composed of members of the technical committee on the Darwin network. Their sole responsibility is to monitor the block data submitted by bridge miners and guard the progress of the optimistic verification game process.

In the event of an accident, such as the absence of honest miners, MMR calculation errors, etc., and the wrong block header is not successfully pointed out, the guardian can mark the block as illegal through the multi-signature operation to ensure that no wrong verification occurs.

The guardian can only mark the wrong block header, and cannot use the user assets locked in the module.

secondary title

6. D2E improvement plan

The decentralized cross-chain transfer bridge between Darwinia and Ethereum is not only difficult to design, but also has some engineering challenges.

For example, the current GRANDPA Justification Proof contains Ed25519 cryptographic signatures, but the current Ethereum smart contract does not yet support Ed25519 signature verification precompiled contracts. If the signature algorithm is directly implemented with smart contracts, it will face the problem of high gas costs .

Although there have been related improvement proposals, such asEIP665, but it is still in Draft status and has not been implemented yet.

In order to solve these realistic engineering problems, we innovatively designed a set of GRANDPA Authorities proxy mechanism. By embedding this set of proxy modules in Darwinia Runtime, we successfully implemented a set of Ethereum standard secp256k1 ECDSA encrypted signatures to proxy Ed25519 signatures.

The D2E bridge will not stop here, and a series of improvements will be made in order to reach a more complete and robust state.

1. Adopt the BEEFY protocol

Before EIP-665 was adopted by Ethereum,BEEFYwould be a more general approach.

Parity is developing a GRANDPA subsidiary protocol called BEEFY (Bridge Efficiency Enabling Finality Yielder) for Substrate. This protocol is based on GRANDPA Finality, and its purpose is to allow Substrate-based chains to access non-Substrate blockchains more efficiently. The current main access object is Ethereum.

This protocol runs another round of BFT protocol on top of GRANDPA Finality, where each Validator will vote on the same thing. That is, each Validator will vote on the MMR Root of the latest block finalized by GRANDPA. For Ethereum, the Ethereum standard secp256k1 ECDSA algorithm is used for signature.

The D2E bridge plans to use BEEFY combined with Grandpa to implement light clients after BEEFY matures in the future.

2. Directly use GRANDPA Justification in the ultra-light client on the Ethereum side for block verification

If EIP-665 is officially adopted by Ethereum, the cost of using GRANDPA Justification to verify blocks in Ethereum smart contracts will drop significantly, and then GRANDPA Authorities can be used instead of Authorities for block verification.

3. Use the Merkle tree to reduce the data volume of public keys and signatures

4. Generalization and framework

first level title

wormhole

Wormhole is a Web3 application that connects various chains and provides users with a more convenient operation interface for cross-chain operations. Wormhole gathers multiple steps that users need to operate in one place, and provides a friendly interactive guide and status display for these operations, assisting users to interact with the wallets of each chain to complete cross-chain operations.

D2E Cross-chain Tutorial

How to transfer assets across chains to Ethereum through wormholes, please refer to the official account article "How to transfer assets across chains to Ethereum through wormholes" published on the same day.

ETH
Polkadot
Welcome to Join Odaily Official Community