Cointime

Download App
iOS & Android

How to Build a Fake Decentralized Cross-Chain Protocol

Validated Media

Adam Back (Bitcoin core development team leader, BlockStream CEO) has a sentence that impressed me, "Great design looks very simple, but the process of designing it is extremely complicated". But not all product designs that look simple, like LayerZero, are great.

Everyone thinks it's safe until the cross-chain protocol goes down, but when it does, it's a big, scary thing. Security incidents on cross-chain protocols topped the list in terms of the amount of money lost to security incidents that occurred on each chain over the past two years. The importance and urgency of solving cross-chain protocol security issues is even greater than Ethereum scaling. Interoperability between cross-chain protocols is an inherent requirement of Web3 connectivity. The amount of financing for such agreements is often huge, and the number of TVLS and deals is growing, driven by rigid demand. However, due to the low recognition degree of the public, the security level of these cross-chain protocols cannot be recognized.

Let's start with a product design architecture. The communication process between Chain A and Chain B is carried out by Relayer, and Oracle supervises Relayer. First of all, this architecture has the advantage of avoiding the traditional communication between ChainA and ChainB by the third chain (generally not deployed dApp in this chain) to complete the consensus algorithm and dozens of nodes verification, so it can bring "fast cross-chain" user experience to end users. Because the architecture is light, the code is minimal, and Oracle has a Chainlink, this type of project is easy to launch, but also easy to imitate, and the technical threshold is Zero.

Fake decentralized cross-chain protocol, basic version

There are at least two problems with the above architecture:

  1. LayerZero reduces the verification of dozens of nodes to a single Oracle verification, which naturally greatly reduces the security factor.
  2. After simplification into a single verification, it is necessary to assume that Relayer and Oracle are independent. However, this trust hypothesis cannot be established forever and is not Crypto Native enough to fundamentally guarantee that the two cannot conspire to do evil.

This is the basic pattern that LayerZero adopts. As an "ultralights" cross-chain solution of a separate security type, it is only responsible for transferring messages and is not responsible for the security of the application, nor is it capable of being responsible.

How about freeing Relayer so that everyone can run the repeater? Figure 2 enlarges the number of figures in Figure 1. First of all, Decentralized does not mean a decentralized number of operators so that everyone can join. It is called Permissionless. The demand side has always been Permissionless, and the supply side also Permissionless is not an epoch-making change. It is a change on the market side, which has nothing to do with the security of the product itself. LayerZero's Relayer was simply an intermediary responsible for forwarding information, essentially a Trusted Third Party like Oracle. Trying to improve cross-chain security by increasing the number of trusted principals from 1 to 30 is a fool's errand. Instead of changing product features, new problems will be created.

Fake decentralized cross-chain Protocol Advanced Edition

If a cross-chain token project allows the configured LayerZero node to be modified, it could be replaced with its own "Layerzero" node by an attacker, thus forging arbitrary messages. As a result, projects using Layerzero still have a huge security problem, which is worse in more complex scenarios. The replacement of just one link in a large system can cause a chain reaction. LayerZero doesn't have the potential to solve this problem on its own. If a security incident does occur, LayerZero will naturally pass the buck to an external application. Because end users need to carefully judge the security of each LayerZero project, those "user-oriented" projects will carefully access LayerZero to avoid being polluted by malicious applications that belong to the same ecosystem, which makes it difficult to build an ecosystem.

If Layer0 can't share security like Layer1 or Layer2, then Layer0 can't be called Infrastructure, because infrastructure is "basic" because it can share security. If a project party calls itself Infrastructure, it should provide consistent security for all of its ecological projects like any other infrastructure, that is, all ecological projects share the security of the infrastructure. So LayerZero isn't exactly Infrastructure, it's Middleware. App developers who access the Middleware SDK/API do have the freedom to define their security policies.

The L2BEAT team wrote on January 5, 2023, Circumventing Layer Zero: Why Isolated Security is No Security, arguing that their assumption that app owners (or people with private keys) can't do evil is incorrect. Bad guy Bob gains access to the LayerZero configuration. Bad guy Bob can change the seer and repeater from default components to components he controls, convincing the LayerZero smart contract on Ethereum to let him withdraw all of the good guy Alice's tokens on Ethereum. The original link: https://medium.com/l2beat/circumventing-layer-zero-5e9f652a5d3e

The Nomad team posted on January 31, 2023, that the LayerZero repeater has two critical vulnerabilities that are currently in a two-party, multiple-signed state, so they can only be exploited by insiders or team members with known identities. The first allows a fraudulent message to be sent from LayerZero with multiple signatures, and the second allows a message to be modified after the prophecy machine and multiple signatures have signed the message or transaction, both resulting in the theft of all user funds. The original link: https://prestwich.substack.com/p/zero-validation

When confused by fancy watches, try to go back to your roots.

On October 31, 2008, the Bitcoin White Paper appeared. On January 3, 2009, BTC Genesis block was born. An excerpt from the white paper, "Bitcoin: A Peer-to-Peer Electronic Money System":

Abstract. A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution. Digital signatures provide part of the solution, but the main benefits are lost if a trusted third party is still required to prevent double-spending. We propose a solution to the double-spending problem using a peer-to-peer network. The network timestamps transactions by hashing them into an ongoing chain of hash-based proof-of-work, forming a record that cannot be changed without redoing the proof-of-work. The longest chain not only serves as proof of the sequence of events witnessed but proof that it came from the largest pool of CPU power. As long as a majority of CPU power is controlled by nodes that are not cooperating to attack the network, they'll generate the longest chain and outpace attackers. The network itself requires minimal structure. Messages are broadcast on a best-effort basis, and nodes can leave and rejoin the network at will, accepting the longest proof-of-work chain as proof of what happened while they were gone.

(By Frederick Kang, founder of Fox Tech and Way Network and chairman of Danyang Investment)

Read more: https://tokeninsight.com/en/research/miscellaneous/how-to-build-a-fake-decentralized-cross-chain-protocol

Comments

All Comments

Recommended for you

  • Morgan Stanley: The U.S. dollar will peak before the end of the year and enter a "bear market pattern" in 2025

    Morgan Stanley predicts that the strong US dollar will peak before the end of the year and then enter a "bearish market trend", slowly declining until 2025. The bank believes that due to the Bank of Japan's rate hikes and gradual easing actions by the Reserve Bank of Australia, the potential for the yen and Australian dollar to rise next year is the greatest.

  • Equation News calls out Binance for "insider trading": You are destroying the sentiment of the trading market

    On November 25th, Formula News reported that to those insider traders who participated in the listing of Binance perpetual contracts, please slow down when selling your chips next time. The WHY and CHEEMS crashes you caused resulted in a 100% negative return for everyone involved in the trade, and you are destroying the emotions of the trade. Earlier today, Binance announced the listing of 1000WHYUSDT and 1000CHEEMSUSDT perpetual contracts, which caused a short-term crash in WHY and CHEEMS and sparked intense discussion within the community.

  • U.S. Congressman Mike Flood: Looking forward to working with the next SEC Chairman to revoke the anti-crypto banking policy SAB 121

     US House of Representatives will investigate Representative Mike Flood's recent statement: "Despite widespread opposition, SAB 121 is still operating as a regulation, even though it has never gone through the normal Administrative Procedure Act process." Flood said, "I look forward to working with the next SEC chairman to revoke SAB 121. Whether Chairman Gary Gensler resigns on his own or President Trump fulfills his promise to dismiss Gensler, the new government has an excellent opportunity to usher in a new era after Gensler's departure." He added, "It's not surprising that Gensler opposed the digital asset regulatory framework passed by the House on a bipartisan basis earlier this year. 71 Democrats and House Republicans passed this common-sense framework together. Although the Democratic-led Senate rejected it, it represented a breakthrough moment for cryptocurrency and may provide information for the work of the unified Republican government when the next Congress begins in January next year."

  • Indian billionaire Adani summoned by US SEC to explain position on bribery case

    Indian billionaire Gautam Adani and his nephew, Sahil Adani, have been subpoenaed by the US Securities and Exchange Commission (SEC) to explain allegations of paying over $250 million in bribes to win solar power contracts. According to the Press Trust of India (PTI), the subpoena has been delivered to the Adani family's residence in Ahmedabad, a city in western India, and they have been given 21 days to respond. The notice, issued on November 21 by the Eastern District Court of New York, states that if the Adani family fails to respond on time, a default judgment will be made against them.

  • U.S. Congressman: SEC Commissioner Hester Peirce may become the new acting chairman of the SEC

    US Congressman French Hill revealed at the North American Blockchain Summit (NABS) that Republican SEC Commissioner Hester Peirce is "likely" to become the new acting chair of the US Securities and Exchange Commission (SEC). He noted that current chair Gary Gensler will step down on January 20, 2025, and the Republican Party will take over the SEC, with Peirce expected to succeed him.

  • Tether spokesperson: The relationship with Cantor is purely business, and the claim that Lutnick influenced regulatory actions is pure nonsense

     a spokesperson for Tether stated: "The relationship between Tether and Cantor Fitzgerald is purely a business relationship based on managing reserves. Claims that Howard Lutnick's joining the transition team in some way implies an influence on regulatory actions are baseless."

  • Bitwise CEO warns that ETHW is not suitable for all investors and has high risks and high volatility

    Hunter Horsley, CEO of Bitwise, posted on X platform that he was happy to see capital inflows into Bitwise's Ethereum exchange-traded fund ETHW, iShares, and Fidelity this Friday. He reminded that ETHW is not a registered investment company under the U.S. Investment Company Act of 1940 and therefore is not protected by the law. ETHW is not suitable for all investors due to its high risk and volatility.

  • Musk said he liked the "WOULD" meme, and the related tokens rose 400 times in a short period of time

    Musk posted a picture on his social media platform saying he likes the "WOULD" meme. As a result, the meme coin with the same name briefly surged. According to GMGN data, the meme coin with the same name created 123 days ago surged over 400 times in a short period of time, with a current market value of 4.5 million US dollars. Reminder to users: Meme coins have no practical use cases, prices are highly volatile, and investment should be cautious.

  • Victory Securities: Funding Rates halved and fell, Bitcoin's short-term direction is not one-sided

    Zhou Lele, the Vice Chief Operating Officer of Victory Securities, analyzed that the macro and high-level negative impact risks in the cryptocurrency market have passed. The risks are now more focused on expected realization, such as the American entrepreneur Musk and the American "Efficiency Department" (DOGE) led by Ramaswamy. After media reports, the increase in Dogecoin ($DOGE) was only 5.7%, while Dogecoin rose by 83% in the week when the US election results were announced. Last week, the net inflow of off-exchange Bitcoin ETF was US$1.67 billion, and the holdings of exchange contracts and CME contracts remained high, but the funding rates halved and fell back, indicating that the direction of Bitcoin in the short term is not one-sided, and bears are also accumulating strength.

  • MarbleX and Netmarble Launch $20 Million Ecosystem Promotion Plan

    Ethereum game platform Immutable has announced a partnership with the blockchain game division Marblex of South Korean gaming giant Netmarble. The collaboration will migrate Marblex's ecosystem and its multiple games from the Klaytn blockchain to the Ethereum Layer 2 network Immutable zkEVM. The games include "Ni no Kuni: Cross Worlds", "A3: Still Alive" and "Meta World: My City", and the two parties will also launch an "ecosystem promotion plan" to provide up to $20 million in support to developers to attract new games to join Marblex and Immutable. It is currently unclear whether the Immutable migration will affect Saga's plans, and the project representatives have not commented on the issue.