Lesson 3

Technical Architecture

This module provides an in-depth analysis of the technical backbone of the MAP protocol. You will learn about the MAP relay chain, its Proof-of-Stake mechanism, and Byzantine Fault Tolerant consensus. The module also delves into the technology of light clients, explaining their functionality, advantages, and implementation details. Finally, we will explore the application of Zero-Knowledge Proofs (ZKPs) in ensuring the security and efficiency of cross-chain verification, highlighting the protocol's complex architecture.

MAP Relay Chain

The MAP relay chain operates on a Proof-of-Stake (PoS) mechanism, which has several advantages over the traditional Proof-of-Work (PoW) system. PoS is more environmentally friendly because it does not require the massive energy consumption associated with PoW mining. The network relies on validators rather than miners, and the selection of validators is based on the amount of MAPO tokens they hold, as well as the amount they are willing to 'stake' as collateral.

In the MAP protocol, validators are responsible for collecting transactions from the network, executing any relevant smart contracts, and forming new blocks. The selection of validators is based on the amount of MAPO tokens they have staked, ensuring that the most at-risk validators are chosen to protect the network. This mechanism not only reduces energy consumption but also provides faster and cheaper transactions.

The MAP relay chain uses the Istanbul Byzantine Fault Tolerant (IBFT) consensus algorithm. This consensus model is designed to maintain the security and reliability of the network even when up to one-third of the nodes fail or behave maliciously. The IBFT algorithm achieves consensus by a series of steps in which validating nodes broadcast signed messages. The following is the working principle of IBFT consensus:

Pre-Prepare PhaseThe leader (designated validator) proposes a new block and broadcasts it to all other validators.

Prepare PhaseValidators receive proposed blocks, verify their validity, and broadcast 'prepare' messages after confirming their validity.

Commit PhaseOnce validators receive enough 'ready' messages, they will broadcast a 'commit' message.

FinalityWhen the validator receives a sufficient number of 'commit' messages, the block is finally determined and added to the blockchain.

This process ensures immediate finality, meaning that once a block is confirmed, it cannot be revoked, thereby enhancing the overall security and user experience of the MAP protocol network.

Validator dynamics and incentives

MAP Relay Chain supports a dynamic set of validators that are periodically updated based on the staking weight of MAPO tokens. This dynamic adjustment makes the network more robust and diverse, incentivizing token holders to actively participate in maintaining network security. Validators are rewarded for participating in the network, with rewards distributed based on the amount of staked MAPO tokens. These rewards include a portion of the transaction fees collected by the network, providing validators with ongoing incentives to ensure network security and smooth operation.

Epoch-based block generation

The MAP relay chain generates blocks using an epoch-based approach. At the end of each epoch, the validator group is refreshed to ensure the network remains decentralized and secure. Within each epoch, blocks are generated in a weighted round-robin manner, reflecting the staking weight of each validator. This approach ensures fair and balanced distribution of block production opportunities among validators.

Enhanced security

To further enhance security, the MAP relay chain is integrated with the Bitcoin network for checkpoint setting. This process involves regularly submitting the hash value and signature of the last block of each epoch to the Bitcoin network, using its immense computing power to timestamp these checkpoints. This integration helps prevent long-range attacks and enhances the overall security of the MAP protocol network.

Light client technology

Light client technology is the cornerstone of the MAP protocol, which can achieve secure and efficient cross-chain interaction without the need for a complete blockchain node. A light client, also known as a lightweight or thin client, operates by storing only necessary blockchain data (such as block headers) instead of the entire blockchain. This minimal data storage allows light clients to quickly verify the legitimacy of transactions and block headers through cryptographic proofs such as Merkle proofs. The main functions and advantages of light clients in the MAP protocol include:

  • Resource efficiencyLight clients consume significantly less bandwidth and storage space compared to full nodes, making them ideal for resource-limited devices such as smartphones or IoT devices.
  • SpeedThey can synchronize with the blockchain faster, thus quickly verifying transactions.
  • securityLight clients can perform self-verifying transactions, ensuring the accuracy and correctness of the data they receive and validate without relying on third-party intermediaries.
  • DecentralizationBy enabling more participants to run light clients, the MAP protocol enhances the decentralization and resilience of the network.

The MAP protocol uses complex lightweight client technology to achieve cross-chain communication. The specific working principle is as follows:

The lightweight client only downloads the block header from the blockchain. The block header contains important information such as the block hash and Merkle root. When transaction verification is needed, the lightweight client requests the Merkle proof from the full node to confirm whether the transaction is included in the block. This process ensures that the lightweight client can verify transactions with minimal data.

In a cross-chain scenario, the block header information (including validator signatures) of chain A is synchronized to the light client on chain B. These light clients are either embedded in the chain's infrastructure or deployed as smart contracts on the corresponding chain. This setup ensures that Chain B is able to independently verify Chain A's transactions using the provided block header and validator information.

The MAP protocol integrates zero-knowledge proof (ZKP) to further improve the efficiency and security of light client verification. ZKP allows for transaction verification without revealing transaction details, ensuring privacy and reducing verification costs. By combining ZKP with light client technology, the MAP protocol achieves efficiency and strong security in cross-chain transactions.

The MAP relay chain plays a key role in maintaining lightweight clients that connect all blockchains. It integrates various signature algorithms and hash functions from different blockchains using precompiled contracts, ensuring that the relay chain can verify transactions between multiple networks. This setup makes the MAP relay chain a universal translator, facilitating seamless cross-chain interaction.

By leveraging lightweight client technology, the MAP protocol provides a scalable and secure cross-chain interoperability solution, ensuring efficient and secure interaction between users and developers with multiple blockchain networks.

Zero-knowledge technology

Zero-Knowledge Proofs (ZKPs) are cryptographic protocols that allow one party (the prover) to prove the authenticity of a statement to another party (the verifier) without revealing anything other than the validity of the claim. The concept was first proposed in 1985 by researchers Shafi Goldwasser, Silvio Micali and Charles Rackoff in their paper "The Knowledge Complexity of Interactive Proof Systems". ZKPs are important in enhancing privacy and security, and are used in a variety of fields such as financial transactions, identity verification, voting systems, and secure supply chains. They allow data to be verified without exposing sensitive information, protecting privacy while ensuring data integrity.

In the context of MAP Protocol, zero-knowledge proof plays a crucial role in ensuring the security and efficiency of cross-chain verification. Its specific implementation is as follows:

The light client in MAP Protocol is responsible for verifying transactions between different blockchains. By integrating ZKPs, MAP Protocol improves the efficiency of this process. The light client can confirm the validity of block headers by validating zk-SNARK proofs without the need for extensive computational checks. This significantly reduces gas fees for cross-chain transactions while maintaining high security.

ZKPs allow MAP Protocol to verify transactions between different blockchains without revealing sensitive information about the transactions themselves. This is crucial for maintaining user privacy and data integrity during data transmission. By leveraging ZKPs, MAP Protocol ensures that the privacy and security of transactions are not compromised even if lightweight clients or relay chains are compromised.

Traditional cross-chain solutions typically rely on centralized entities or consortium systems to validate transactions, which may introduce vulnerabilities and single points of failure. In contrast, MAP Protocol achieves fully decentralized verification process by using ZKPs. This aligns with the protocol's goal of creating a trustless peer-to-peer network, where transaction verification depends solely on cryptographic proofs rather than any third-party intermediaries.

Overall, the integration of zero-knowledge proofs in MAP Protocol enhances the security, efficiency, and privacy of cross-chain transactions, making it a powerful solution for blockchain interoperability. Through innovative use of ZKPs, MAP Protocol is leading the way in decentralized, secure, and efficient cross-chain communication technology development.

Three-tier architecture

MAP Protocol Layer

The MAP protocol layer constitutes the core of the MAP protocol full-chain network infrastructure. It includes the MAP relay chain, lightweight clients deployed on various blockchains, and cross-chain maintenance programs. This layer is responsible for basic cross-chain verification to ensure the integrity and finality of cross-chain transactions.

  • MAP relay chain: As the backbone of cross-chain interaction, it achieves seamless communication between different blockchains. It adopts the Proof-of-Stake (PoS) mechanism and Byzantine Fault Tolerant (BFT) consensus to maintain security and efficiency.
  • Light Clients: Deployed on each chain, these clients verify transactions by storing minimal data (such as block headers) and using cryptographic proofs (e.g. Merkle proofs).
  • Cross-Chain Maintenance Program: This program updates and maintains the state of light clients on different blockchains to ensure the synchronization and accuracy of cross-chain interactions.

MAP Full Chain Service Layer (MOS Layer)

The MAP Full-Chain Service Layer (MOS Layer) serves as middleware that connects the underlying MAP protocol mechanism and the smart contract interface used by decentralized applications (dApps). It simplifies the development of cross-chain dApps by providing general services and modules required for cross-chain operations.

  • Insurance Vaults and Data: MOS includes the AssetVault contract for managing cross-chain asset transfers, which are based on cryptographic proofs and enable operations such as minting, burning, and transferring assets, ensuring secure and trustless asset management.
  • Message Relay: Facilitates the transfer of cross-chain messages and updates light clients with the latest block header information. Ensures the correct validation and execution of cross-chain transactions.
  • Developer Tools: MOS provides SDKs and APIs that allow developers to easily build, deploy, and manage cross-chain dApps, reducing technical barriers and driving innovation within the ecosystem.

MAPO application ecosystem

The MAPO application ecological layer aims to support a wide range of dApps by leveraging the capabilities of the underlying MAP protocol and the MOS layer. This layer ensures that dApps can achieve true interoperability between different blockchains, providing a seamless user experience and innovative application functionality.

  • Interoperable dApps: dApps built on the MAPO application layer can interact with multiple blockchains without the need for complex integration work. This includes applications in areas such as cross-chain lending, full-chain exchange, GameFi, and on-chain oracles.
  • Asset and Data Management: This layer ensures the finality of data and asset verification, enabling dApps to efficiently and securely manage cross-chain transactions.
  • Scalability and extensibility: By deploying on the MAP relay chain, dApps can automatically connect to all supported blockchains, ensuring scalability and expanding their user base.

The three-layer architecture of the MAP protocol - including the MAP protocol layer, the MAP full-chain service layer, and the MAPO application ecological layer - provides a comprehensive and powerful framework for building interoperable and scalable blockchain applications. It addresses the challenges of cross-chain interaction, realizing a truly interconnected Web3 ecosystem.

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.