Lesson 2

Merlin Chain's technical architecture

This module explores Merlin Chain's technical architecture, with a focus on how it can improve Bitcoin's scalability, efficiency, and security.

Merlin Chain is built on a variety of technologies that work together to enhance the scalability, efficiency, and security of the Bitcoin network. By integrating these technologies into Merlin Chain, the project addresses certain limitations of Bitcoin, such as slow transaction speeds and high fees, while maintaining the decentralization and security of the Bitcoin base layer.

ZK-Rollup Network

The ZK-Rollup network is a core component of the Merlin Chain architecture. This technology works by aggregating and compressing multiple transactions off-chain, generating a cryptographic proof and submitting it to the Bitcoin mainnet. By processing transactions in batches, the ZK-Rollup network reduces the amount of data that needs to be recorded on the blockchain, thereby reducing transaction costs and increasing transaction throughput.

The ZK-Rollup network on Merlin Chain adopts SNARK (Succinct Non-Interactive Argument of Knowledge) technology to generate zero-knowledge proofs, confirming the validity of all transactions within a batch without revealing specific transaction details. The network uses a series of state machines to perform necessary calculations and generate proofs. The zkProver component interacts with the database and nodes to verify the validity of transactions, ensuring the security and efficiency of the system.

Decentralized Oracle Network

The oracle brings off-chain data into the blockchain, enabling smart contracts to interact with real-world events. In Merlin Chain, the decentralized oracle network prevents any single point of failure and ensures the accuracy and reliability of the data transmitted to the blockchain.

An oracle collects data from external sources and transmits it to the blockchain for use by smart contracts. For example, a smart contract for a financial product may require the current price of Bitcoin, and the oracle will retrieve this data from a trusted source and pass it to the contract. Decentralization eliminates the risk of relying on a single data provider, avoiding problems that may arise from attacks or the provision of incorrect data. The decentralized nature of the oracle network ensures the integrity of the data even if some oracles fail or engage in malicious behavior.

In Merlin Chain, the decentralized oracle network interacts with the ZK-Rollup system to provide external data to verify the validity of transactions and execute contracts. This integration ensures the coordinated operation of all parts of the system, maintaining security and efficiency.

Data Availability

Data availability is critical in any blockchain system, especially those that use off-chain processing technologies such as ZK-Rollups. If the data is not available, network participants will not be able to verify transactions, which can lead to trust and security issues. Merlin Chain ensures data availability through a solution partnered with Celestia and Nubit, guaranteeing that all data used for transaction validation can be published and accessible to all participants in the network. When a new block is generated, the relevant data is published to the public data availability network to ensure its verifiability and accessibility.

Once the data is confirmed to be available, the responsibility for storing the historical data rests with the rollups and applications on the network. This decentralized storage reduces the burden on the main chain while ensuring that all necessary data is available for future validation.

The data availability solution also includes validation mechanisms to ensure that the published data is complete and consistent. When a node receives a new block, it verifies the availability of the data. If the data is unavailable or incomplete, the block will be rejected. This system helps maintain the reliability of the network and ensures that all transactions can be independently verified by any participant.

Bitcoin Fraud Proof Module on the Chain

The fraud proof module provides a security layer for the network, helping to maintain the integrity of the network and allowing participants to question the validity of transactions. This is especially important in decentralized systems, where the trust foundation is transparency and data verifiability. In Merlin Chain, these fraud proof modules allow users to directly submit evidence of fraudulent transactions to the Bitcoin blockchain.

When a transaction is suspected of fraud, users can submit evidence of fraud, and the network will then review it. If the transaction is determined to be fraudulent, it will be rejected to prevent it from being recorded on the blockchain.

This mechanism maintains trust in the network by ensuring that any fraud attempts can be detected and dealt with quickly. Since these proofs of fraud are performed on-chain, they are recorded on the Bitcoin blockchain, providing a permanent and immutable record of fraudulent activity.

Integration with Bitcoin

Merlin Chain's architecture is tightly integrated with Bitcoin, enhancing Bitcoin's capabilities without compromising its underlying principles. As a Layer 2 solution, Merlin Chain inherits Bitcoin's security features while addressing Bitcoin's limitations in terms of transaction speed and cost.

This integration is achieved through Taproot and other native Bitcoin technologies, enabling Merlin Chain to securely anchor its data on the Bitcoin blockchain, ensuring that all transactions processed on the Merlin Chain are as secure and immutable as those on Bitcoin itself.

EVM compatibility

The compatibility of Merlin Chain with the Ethereum Virtual Machine (EVM) extends its functionality beyond the limitations of Bitcoin. EVM compatibility allows developers to deploy and interact with Ethereum-based smart contracts on Merlin Chain, providing extensive possibilities for cross-chain applications and enabling projects to leverage the security of Bitcoin and the flexibility of Ethereum at the same time.

Developers familiar with Ethereum can easily port their dApps to Merlin Chain, enjoying lower transaction costs and higher throughput brought by the ZK-Rollup network. This compatibility also inspires innovation, enabling developers to create hybrid applications that leverage the advantages of both Bitcoin and Ethereum.

Highlights

  • ZK-Rollup technology processes transactions in batch mode, reducing costs and increasing throughput.
  • Decentralized oracle networks connect smart contracts with real-world data to ensure data accuracy and integrity.
  • Through cooperation with Celestia and Nubit, data availability is ensured, ensuring the verifiability of block data.
  • The on-chain Bitcoin fraud proof module provides an additional layer of security that allows for the detection and rejection of fraudulent transactions.
  • The architecture is compatible with Bitcoin and Ethereum, and supports a variety of application scenarios.
Disclaimer
* Crypto investment involves significant risks. Please proceed with caution. The course is not intended as investment advice.
* The course is created by the author who has joined Gate Learn. Any opinion shared by the author does not represent Gate Learn.
Catalog
Lesson 2

Merlin Chain's technical architecture

This module explores Merlin Chain's technical architecture, with a focus on how it can improve Bitcoin's scalability, efficiency, and security.

Merlin Chain is built on a variety of technologies that work together to enhance the scalability, efficiency, and security of the Bitcoin network. By integrating these technologies into Merlin Chain, the project addresses certain limitations of Bitcoin, such as slow transaction speeds and high fees, while maintaining the decentralization and security of the Bitcoin base layer.

ZK-Rollup Network

The ZK-Rollup network is a core component of the Merlin Chain architecture. This technology works by aggregating and compressing multiple transactions off-chain, generating a cryptographic proof and submitting it to the Bitcoin mainnet. By processing transactions in batches, the ZK-Rollup network reduces the amount of data that needs to be recorded on the blockchain, thereby reducing transaction costs and increasing transaction throughput.

The ZK-Rollup network on Merlin Chain adopts SNARK (Succinct Non-Interactive Argument of Knowledge) technology to generate zero-knowledge proofs, confirming the validity of all transactions within a batch without revealing specific transaction details. The network uses a series of state machines to perform necessary calculations and generate proofs. The zkProver component interacts with the database and nodes to verify the validity of transactions, ensuring the security and efficiency of the system.

Decentralized Oracle Network

The oracle brings off-chain data into the blockchain, enabling smart contracts to interact with real-world events. In Merlin Chain, the decentralized oracle network prevents any single point of failure and ensures the accuracy and reliability of the data transmitted to the blockchain.

An oracle collects data from external sources and transmits it to the blockchain for use by smart contracts. For example, a smart contract for a financial product may require the current price of Bitcoin, and the oracle will retrieve this data from a trusted source and pass it to the contract. Decentralization eliminates the risk of relying on a single data provider, avoiding problems that may arise from attacks or the provision of incorrect data. The decentralized nature of the oracle network ensures the integrity of the data even if some oracles fail or engage in malicious behavior.

In Merlin Chain, the decentralized oracle network interacts with the ZK-Rollup system to provide external data to verify the validity of transactions and execute contracts. This integration ensures the coordinated operation of all parts of the system, maintaining security and efficiency.

Data Availability

Data availability is critical in any blockchain system, especially those that use off-chain processing technologies such as ZK-Rollups. If the data is not available, network participants will not be able to verify transactions, which can lead to trust and security issues. Merlin Chain ensures data availability through a solution partnered with Celestia and Nubit, guaranteeing that all data used for transaction validation can be published and accessible to all participants in the network. When a new block is generated, the relevant data is published to the public data availability network to ensure its verifiability and accessibility.

Once the data is confirmed to be available, the responsibility for storing the historical data rests with the rollups and applications on the network. This decentralized storage reduces the burden on the main chain while ensuring that all necessary data is available for future validation.

The data availability solution also includes validation mechanisms to ensure that the published data is complete and consistent. When a node receives a new block, it verifies the availability of the data. If the data is unavailable or incomplete, the block will be rejected. This system helps maintain the reliability of the network and ensures that all transactions can be independently verified by any participant.

Bitcoin Fraud Proof Module on the Chain

The fraud proof module provides a security layer for the network, helping to maintain the integrity of the network and allowing participants to question the validity of transactions. This is especially important in decentralized systems, where the trust foundation is transparency and data verifiability. In Merlin Chain, these fraud proof modules allow users to directly submit evidence of fraudulent transactions to the Bitcoin blockchain.

When a transaction is suspected of fraud, users can submit evidence of fraud, and the network will then review it. If the transaction is determined to be fraudulent, it will be rejected to prevent it from being recorded on the blockchain.

This mechanism maintains trust in the network by ensuring that any fraud attempts can be detected and dealt with quickly. Since these proofs of fraud are performed on-chain, they are recorded on the Bitcoin blockchain, providing a permanent and immutable record of fraudulent activity.

Integration with Bitcoin

Merlin Chain's architecture is tightly integrated with Bitcoin, enhancing Bitcoin's capabilities without compromising its underlying principles. As a Layer 2 solution, Merlin Chain inherits Bitcoin's security features while addressing Bitcoin's limitations in terms of transaction speed and cost.

This integration is achieved through Taproot and other native Bitcoin technologies, enabling Merlin Chain to securely anchor its data on the Bitcoin blockchain, ensuring that all transactions processed on the Merlin Chain are as secure and immutable as those on Bitcoin itself.

EVM compatibility

The compatibility of Merlin Chain with the Ethereum Virtual Machine (EVM) extends its functionality beyond the limitations of Bitcoin. EVM compatibility allows developers to deploy and interact with Ethereum-based smart contracts on Merlin Chain, providing extensive possibilities for cross-chain applications and enabling projects to leverage the security of Bitcoin and the flexibility of Ethereum at the same time.

Developers familiar with Ethereum can easily port their dApps to Merlin Chain, enjoying lower transaction costs and higher throughput brought by the ZK-Rollup network. This compatibility also inspires innovation, enabling developers to create hybrid applications that leverage the advantages of both Bitcoin and Ethereum.

Highlights

  • ZK-Rollup technology processes transactions in batch mode, reducing costs and increasing throughput.
  • Decentralized oracle networks connect smart contracts with real-world data to ensure data accuracy and integrity.
  • Through cooperation with Celestia and Nubit, data availability is ensured, ensuring the verifiability of block data.
  • The on-chain Bitcoin fraud proof module provides an additional layer of security that allows for the detection and rejection of fraudulent transactions.
  • The architecture is compatible with Bitcoin and Ethereum, and supports a variety of application scenarios.
Disclaimer
* Crypto investment involves significant risks. Please proceed with caution. The course is not intended as investment advice.
* The course is created by the author who has joined Gate Learn. Any opinion shared by the author does not represent Gate Learn.