How trustless bridges can help protect users

Blockchain Bridge allows decentralized finance (DeFi) users to use the same token across multiple blockchains. For example, traders can use USD Coin (USDC) on the Ethereum or Solana blockchains to interact with decentralized applications (DApps) on the network.

While the protocol may be convenient for DeFi users, there is a risk of exploitation by malicious actors. For example, last year, the Wormhole bridge – a popular cross-chain crypto bridge between Solana, Ethereum, Avalanche and others – was hacked, with attackers stealing more than $321 million worth of wrapped Ethereum (wETH), the largest ever hack in DeFi. history in time.

Just over a month later, on March 23, 2022, the Ronin Network bridge – Ethereum-based sidechain Axie Infinity – was hacked for more than $620 million, and on August 2, the Nomad bridge was hacked for more than $190 million. In total, more than $2.5 billion was stolen from the cross bridge between 2020 and 2022.

Trustless bridges, known as noncustodial or decentralized bridges, can improve user security for cross-chain transfers.

What is a blockchain bridge?

A cross-chain bridge is a technology that allows the transfer of assets or data from one blockchain network to another. This bridge allows two or more separate blockchain networks to talk and share information. The interoperability provided by cross-chain bridges makes it possible to move assets from one network to another.

New: SEC vs. Kraken: A one-off or open salvo in the attack on crypto?

Most bridging technologies use smart contracts on both blockchains to make cross-chain transactions possible.

Cross-chain bridges can transfer many assets, such as cryptocurrencies, digital tokens and other data. Using this bridge makes it easier for different blockchain networks to work together and for users to take advantage of each network’s unique features and benefits.

trusted bridge vs trustless bridge

When it comes to bridging protocols, there are two main types, centralized (trusted) bridges and decentralized (trustless) bridges. Trust bridges are managed by a centralized entity that takes custody of tokens after they are transferred to the bridge. The main risk with a custodial bridge is a single point of failure (centralized custodian), which makes it an easier target for hacking attempts.

Instead of using a centralized custodian to transfer tokens through blockchains, trustless bridges use smart contracts to complete the process.

A smart contract is an automated program that executes certain actions after the conditions are met. Because of this, trustless bridges appear to be a safer alternative because each user maintains custody of the token during the transfer process.

However, untrusted bridges can still be compromised if the smart contract code has vulnerabilities that are not identified and addressed by the development team.

Pascal Berrang, blockchain researcher and core developer at Nimiq, a blockchain-based payment protocol, told Cointelegraph, “In general, the use of cross-chain bridges introduces additional risks over the use of a single blockchain.”

“It increases the attack surface through blockchains, potential custodians and smart contracts. There are different types of cross bridges, which differ depending on the risk. He continued:

“Cross-chain bridges naturally involve two or more blockchains, usually using different security mechanisms. Therefore, the security of the bridged asset depends on the weakest block on the bridge. For example, if one of the blocks is attacked, it will be possible to recover the swap cross-chain in one chain but not in the other – resulting in an imbalance of assets.

Berrang also emphasized the vulnerability associated with bridged assets that are locked to the bridge. “Funds are usually stored or locked in a central place, as a single point of failure. Depending on the type of bridge, the funds are subject to different risks: In a bridge based on smart contracts, bugs in the contract can make the bridged assets worthless ,” said Berrang.

“An example could be a bug that allows the unlimited printing of new bridged tokens. A bridge operated by a trusted custodian will expose its partners to risk if the custodian misbehaves or the key is stolen,” he said.

Jeremy Musighi, head of growth at Balancer, an automated market maker, believes that additional risks lie in the complexity of blockchain bridges, telling Cointelegraph that “Cross-chain bridges come with some significant risks. Security is one of the biggest risks; because of the complexity and difficulty of implementing bridges cross-chain, they are prone to errors and vulnerabilities that can be exploited by malicious actors to steal assets or commit other malicious acts.

Musighi also noted that the issue of scalability poses more risks to the bridging process, stating, “Another risk is scalability, because cross-chain bridges may not be able to handle a large amount of traffic, causing delays and increased costs for users.”

Protect the bridge from exploitation

Developers can prevent cross-chain bridges from being hacked by implementing a number of security measures that help ensure the confidentiality, integrity and authenticity of transferred assets.

One of the most important steps is to ensure that the smart contract code that forms the core of the cross-chain bridge is secure and free from vulnerabilities. This can be achieved through regular security audits, bug bounty programs and code reviews, which help identify and fix potential security issues.

Another measure that developers can take is to use cryptographic algorithms, such as digital signatures and hash functions, to secure the transfer of assets and information between different blockchain networks. This helps to ensure that the assets being transferred are protected and that malicious actors cannot interfere with the transfer process.

Additionally, regular network monitoring is essential to detect suspicious activity and prevent attacks. By monitoring the network, developers can detect security issues and take appropriate actions to resolve them before they cause harm.

Finally, developing and deploying secure cross-chain bridges requires best practices, such as secure coding practices, testing and debugging, and secure deployment methods. By doing so, developers can help ensure the security and stability of cross-chain bridges.

Preventing cross-chain bridges from being hacked requires a combination of secure code, cryptographic algorithms, strong consensus mechanisms, network monitoring and following best practices.

Is a trustless bridge a better solution?

Trustless bridges can provide a more secure solution for linking assets on a blockchain only if the smart contract code is fully audited to ensure there are no vulnerabilities.

The main security benefit of a trustless bridge is that the user maintains custody of the token throughout the entire process, with smart contracts taking care of the transfer process. In addition, the lack of a central authority to lock tokens makes the bridge more difficult to attack because there are no points of failure.

New: Binance banking problems highlight the divide between crypto companies and banks

Musighi told Cointelegraph, “I generally consider trustless bridges to be more secure than trusted bridges because they operate transparently and rely on decentralized networks to validate and facilitate asset transfers between chains, while trusted bridges rely on centralized third parties, means there is a single point of failure and a concentrated attack surface for hackers to target.

“Untrusted bridges are easier to audit and have a clear benefit in reducing trust. Since many centralized bridges also use smart contracts (simpler), trustless bridges can be considered a less risky option but not without risk,” said Berrang.

As the decentralized finance space matures, developers must take additional steps to secure cross-bridges. However, as crypto users become more interested in custody and decentralization, trustless bridges may become popular.