Uniswap DAO debate shows devs still struggle to secure cross-chain bridges

1 year ago

Over $2.5 cardinal was stolen successful cross-chain crypto span hacks from 2021 to 2022, according to a study by Token Terminal. But, contempt respective attempts by developers to amended span security, a statement from December 2022 to January 2023 connected the Uniswap DAO forums has laid bare information weaknesses that proceed to beryllium successful blockchain bridges.

In the past, bridges similar Ronin and Horizon utilized multisig wallets to guarantee that lone span validators could authorize withdrawals. For example, Ronin required 5 retired of 9 signatures to withdraw, whereas Horizon required 2 retired of five. But attackers figured retired however to circumvent these systems and withdrew millions of dollars worthy of crypto, leaving users of these bridges with unbacked tokens.

After these multisig bridges were hacked, developers started turning to much blase protocols similar Celer, LayerZero and Wormhole, which claimed to beryllium much secure.

But successful December 2022, Uniswap DAO began discussing deploying Uniswap v3 to the BNB Chain. In the process, the decentralized autonomous enactment (DAO) had to determine which span protocol would beryllium utilized for cross-chain Uniswap governance. In the treatment that followed, the information of each solution was challenged by critics, leaving immoderate observers to reason that nary azygous span solution was unafraid capable for Uniswap’s purposes.

As a result, immoderate participants concluded that lone a multibridge solution tin unafraid crypto assets successful the cross-chain situation of crypto today.

Over $10 cardinal of crypto assets are presently locked connected bridges arsenic of Feb. 15, according to DefiLlama, making the contented of span information an urgent one.

How blockchain bridges work

Blockchain bridges enable 2 oregon much blockchains to share information with each other, specified arsenic cryptocurrency. For example, a span whitethorn alteration USD Coin (USDC) to beryllium sent from Ethereum to BNB Chain oregon Trader Joe (JOE) from Avalanche to Harmony.

But each blockchain web has its ain architecture and database, abstracted from others. So successful a literal sense, nary coin tin beryllium sent from 1 web to another.

Cybersecurity, Security, Web3, Smart Contracts, Hacks

To get astir this problem, bridges fastener coins connected 1 web and mint copies of them connected another. When the idiosyncratic wants to “move” their coins backmost to the archetypal network, the span past burns the copies and unlocks the archetypal coins. Although this doesn’t determination coins betwixt networks, it’s akin capable to suit the purposes of astir crypto users.

However, the occupation arises erstwhile an attacker tin either mint unbacked coins connected the receiving concatenation oregon retreat coins connected the sending concatenation without burning its copies. Either way, this results successful the receiving concatenation having other coins that are not backed by anything. This is precisely what happened successful the Ronin and Horizon hacks of 2022.

Ronin and Horizon: When bridging goes wrong

Ronin span was a protocol that allowed Axie Infinity players to determination coins betwixt Ethereum and the Ronin sidechain to play the game.

The Ethereum contracts for the span had a relation called “withdrawERC20For,” which allowed Ronin validators to retreat tokens connected Ethereum and springiness them to the user, with oregon without burning them connected Ronin. However, the Ronin bundle that validators ran was programmed lone to telephone this relation if the corresponding coins connected Ronin had been burned. Calling the relation required signatures from 5 retired of the 9 validator nodes, preventing an attacker from withdrawing the funds adjacent if they got power of a azygous node.

To further guarantee that the funds couldn’t beryllium stolen, Axie Infinity developer Sky Mavis distributed the bulk of validator keys to different stakeholders, including Axie DAO. This meant that if Sky Mavis’s computers were taken over, the attacker inactive wouldn’t beryllium capable to retreat coins without their backing since the attacker would lone person 4 keys.

But contempt these precautions, an attacker could inactive get each 4 of Sky Mavis’ keys, positive a 5th signature from Axie DAO to withdraw implicit $600 million worth of crypto from the bridge.

Recent: SEC vs. Kraken: A one-off oregon opening salvo successful an battle connected crypto?

Sky Mavis has since reimbursed victims of the onslaught and has relaunched the span with what the developers telephone a “circuit breaker” strategy that halts ample oregon suspicious withdrawals.

A akin onslaught happened to the Harmony Horizon Bridge connected June 24, 2022. This span allowed users to transportation assets from Ethereum to Harmony and backmost again. The “unlockTokens” (withdraw) relation could lone beryllium called if 2 retired of 5 signatures from the Harmony squad authorized it. The backstage keys that could nutrient these signatures were encrypted and stored utilizing a cardinal absorption service. But done immoderate chartless method, the attacker was capable to summation and decrypt 2 of the keys, allowing them to withdraw $100 million of crypto from the Ethereum broadside of the bridge.

The Harmony squad proposed a reimbursement program successful August 2022 and relaunched the span utilizing LayerZero.

After these hacks, immoderate span developers believed they needed amended information than a basal multisig wallet. This is wherever bridging protocols came in.

The emergence of bridging protocols

Since the Ronin and Horizon hacks person called attraction to the occupation of span security, a fewer companies person begun to specialize successful creating span protocols that different developers tin customize oregon instrumentality for their circumstantial needs. These protocols assertion to beryllium much unafraid than conscionable utilizing a multisig wallet to grip withdrawals.

In precocious January, the Uniswap DAO considered launching a BNB Chain mentation of its decentralized exchange. In the process, it needed to determine which protocol to use. Here are the 4 protocols considered, on with a little mentation of however they effort to unafraid their bridges.

LayerZero

According to the LayerZero docs, the protocol uses 2 servers to verify that coins are locked connected the archetypal concatenation earlier allowing them to beryllium minted connected the destination chain. The archetypal server is called the “oracle.” When a idiosyncratic locks coins connected the sending chain, the oracle transmits the artifact header for that transaction to the destination chain.

The 2nd server is called the “relayer.” When a idiosyncratic locks coins connected the sending chain, the relayer sends impervious to the 2nd concatenation that the locking transaction is contained wrong the artifact referenced by the oracle.

As agelong arsenic the oracle and relayer are autarkic and bash not collude, it should beryllium intolerable for an attacker to mint coins connected concatenation B without locking them connected concatenation A oregon to retreat coins connected concatenation A without burning them connected concatenation B.

LayerZero uses Chainlink for the default oracle and provides its ain default relayer for exertion developers that privation to usage it, but devs tin besides make customized versions of these servers if they privation to.

Celer

According to the Celer cBridge docs, Celer relies connected a web of proof-of-stake (PoS) validators called “state guardians” to verify that coins are locked connected 1 concatenation earlier being minted connected another. Two-thirds of the validators person to hold that a transaction is valid for it to beryllium confirmed.

In the Uniswap debate, Celer co-founder Mo Dong clarified that the protocol besides offers an alternate mechanics for statement called “optimistic rollup-style security.” In this version, transactions are taxable to a waiting period, allowing immoderate azygous authorities guardian to veto the transaction if the accusation it has contradicts the two-thirds majority.

Mo argued that immoderate app developers, including Uniswap, should usage the “optimistic rollup-like information model” and tally their ain app guardian to warrant they tin artifact fraudulent transactions adjacent if the web is compromised.

In effect to a question astir who the validators for the web are, the Celer co-founder stated:

“Celer has a full of 21 validators, which are highly reputable PoS validators securing chains specified arsenic Binance Chain, Avalanche, Cosmos and more, specified arsenic Binance, Everstake, InfStones, Ankr, Forbole, 01Node, OKX, HashQuark, RockX and more.”

He besides emphasized that Celer slashes validators who effort to get fraudulent transactions confirmed.

Wormhole

According to a forum station from the team, Wormhole relies connected 19 validators called “guardians” to forestall fraudulent transactions. 13 retired of 19 validators person to hold for a transaction to beryllium confirmed.

In the Uniswap debate, Wormhole argued that its web is much decentralized and has much reputable validators than its peers, stating, “Our Guardian acceptable comprises the starring PoS validators, including Staked, Figment, Chorus One, P2P, and more.”

DeBridge

The deBridge docs say that it is simply a proof-of-stake web with 12 validators. Eight of these validators person to hold that a transaction is valid for it to beryllium confirmed. Validators that effort to walk done fraudulent transactions are slashed.

In the Uniswap debate, deBridge co-founder Alex Smirnov stated that each deBridge validators “are nonrecreational infrastructure providers that validate galore different protocols and blockchains” and “all validators carnivore reputational and fiscal risks.”

In the aboriginal stages of the debate, Smirnov began advocating for a multibridge solution alternatively than for utilizing deBridge arsenic the sole solution for Uniswap, arsenic helium explained:

“If deBridge is chosen for the somesthesia cheque and further governance voting, the Uniswap-deBridge integration volition beryllium built successful the discourse of this bridge-agnostic model and thus, volition alteration different bridges to participate.”

Throughout the Uniswap span debate, each of these protocols was subjected to disapproval successful presumption of its information and decentralization.

LayerZero allegedly gives powerfulness to app devs

LayerZero was criticized for allegedly being a disguised 2/2 multisig and for putting each powerfulness into the hands of the app developer. On Jan. 2, L2Beat writer Krzysztof Urbański alleged that the oracle and relayer strategy connected LayerZero tin beryllium circumvented if an attacker takes power of the app developer’s machine systems.

To beryllium this, Urbański deployed a caller span and token utilizing LayerZero, past bridged immoderate tokens from Ethereum to Optimism. Afterward, helium called an admin relation to alteration the oracle and relayer from the default servers to ones nether his control. He past proceeded to retreat each of the tokens connected Ethereum, leaving the tokens connected Optimism unbacked.

Urbański’s nonfiction was cited by aggregate participants successful the debate, including GFX Labs and Phillip Zentner of LIFI, arsenic reasons wherefore LayerZero shouldn’t beryllium utilized arsenic the sole bridging protocol for Uniswap.

Speaking to Cointelegraph, LayerZero CEO Bryan Pellegrino responded to this criticism, stating that a span developer utilizing LayerZero “can pain [its] quality to alteration immoderate settings and person it beryllium 100% immutable.” However, astir developers take not to bash this due to the fact that they fearfulness imposing immutable bugs into the code. He besides argued that putting upgrades into the hands of a “middlechain auth” oregon third-party web tin beryllium riskier than having an app developer power it.

Some participants besides criticized LayerZero for having an unverified oregon closed-source default relayer. This would allegedly marque it hard for Uniswap to make its ain relayer quickly.

Celer raises concerns astir information model

In an initial non-binding vote connected Jan. 24, the Uniswap DAO chose to deploy to BNB Chain with Celer arsenic the authoritative Uniswap span for governance. However, erstwhile GFX Labs started investigating the bridge, they posted concerns and questions astir Celer’s information model.

According to GFXLabs, Celer has an upgradeable MessageBus declaration nether the power of 3 of 5 multisigs. This could beryllium an onslaught vector by which a malicious idiosyncratic could summation power of the full protocol.

In effect to this criticism, Celer co-founder Mo stated that the declaration is controlled by 4 highly-respected institutions: InfStones, Binance Staking, OKX and the Celer Network. Dong argued that the MessageBus declaration needs to beryllium upgradeable to hole bugs that whitethorn beryllium recovered successful the future, arsenic helium explained:

“We made the MessageBus upgradeable with the extremity of making it easier to code immoderate imaginable information issues conscionable successful lawsuit and adhd must-have features. However, we attack this process with attraction and continually measure and amended our governance process. We invited further progressive contributors specified arsenic GFXLabs to beryllium much involved.”

In the aboriginal stages of the debate, Celer began supporting a multibridge solution alternatively of arguing for its ain protocol being the lone bridge.

Wormhole not slashin’

Wormhole was criticized for not utilizing slashing to punish misbehaving validators and for allegedly doing a little measurement of transactions than it is admitting.

Mo argued that a PoS web with slashing is usually amended than 1 without, stating, “Wormhole does not person immoderate economical information oregon slashing built successful the protocol. If determination is immoderate different centralized/off-chain agreement, we anticipation wormhole tin marque them known to the community. Just by looking astatine this comparison, a tenable level of economical information successful protocol >> 0 economical information successful the protocol.”

Mo besides claimed that Wormhole’s transaction measurement mightiness beryllium little than the institution admits. According to him, implicit 99% of Wormhole transactions travel from Pythnet, and if this fig is excluded, “there are 719 connection per time successful the past 7 days connected Wormhole.”

DeBridge had precise small disapproval directed against it, arsenic astir participants seemed to deliberation that Celer, LayerZero and Wormhole were the ascendant choices.

In the aboriginal stages of the debate, the deBridge squad began advocating for a multibridge solution.

Toward a multibridge solution?

As the Uniswap statement continued, respective participants argued that nary azygous bridging protocol should beryllium utilized for governance. Instead, they argued that aggregate bridges should beryllium utilized and that a bulk oregon adjacent unanimous determination from each bridges should beryllium required to corroborate a governance decision.

Celer and deBridge came astir to this constituent of presumption arsenic the statement progressed, and LIFI CEO Phillip Zentner argued that Uniswap’s determination to BNB should beryllium postponed until a multibridge solution could beryllium implemented.

Ultimately, the Uniswap DAO voted to deploy to BNB Chain with Wormhole arsenic the authoritative bridge. However, Uniswap enforcement manager Devin Walsh explained that deployment with a azygous span does not preclude adding further bridges astatine a aboriginal date. So the advocates for a multibridge solution volition apt proceed their efforts.

Can blockchain bridges beryllium secure?

No substance what yet happens to Unsiwap’s cross-chain governance process, the statement has illustrated however hard it is to unafraid cross-chain bridges.

Putting withdrawals into the hands of multisig wallets creates the hazard that atrocious actors whitethorn summation power of aggregate signatures and retreat tokens without the consent of users. It centralizes the blockchain satellite and makes users trust upon trusted authorities alternatively of decentralized protocols.

Recent: DeFi security: How trustless bridges tin assistance support users

On the different hand, proof-of-stake-style bridging networks are analyzable programs that whitethorn beryllium recovered to person bugs, and if their contracts are not upgradeable, these bugs can’t beryllium fixed without a hard fork of 1 of the underlying networks. Developers proceed to look a tradeoff betwixt putting upgrades into the hands of trusted authorities, who whitethorn get hacked, versus making protocols genuinely decentralized and, therefore, non-upgradeable.

Billions of dollars of crypto assets are stored connected bridges, and arsenic the crypto ecosystem grows, determination whitethorn beryllium adjacent much assets stored connected these networks implicit time. So the occupation of securing a blockchain span and protecting these assets continues to beryllium critical.

View source