smart contract development

Smart Contract Development

We understand the architectures that safely perform and produce the results you need…

DeFi Protocol development

DeFi Protocols

We build DeFi protocols that enable the exchange of products and services…

cross-chain bridge development

Cross-Chain Bridges

Extend your app and enable token transfers, smart contracts, data exchange, and more…

NFT platform development

NFT Platforms

We build platforms that enable the creation, buying, and selling of non-fungible tokens (NFTs)…

VIEW ALL SERVICES

Discussion – 

0

Discussion – 

0

A Primer on Cross-Chain Bridge Architecture

How Do Cross-Chain Bridges Work?

A cross-chain bridge is like a bridge in real life. Except: when you walk across it, you get locked in a cage and cloned. Your clone exits the bridge on the other side and enjoys their life (Farming perhaps, or getting deals on JPEGs). When “you” want to go back, the clone walks to your cage and spontaneously combusts into ashes. Your cage then unlocks and you go home. Until you want to do that again. 

Most blockchain bridging works like this: Lock & Mint <–> Burn & Release. Lock tokens in a smart contract on one chain, then send a message to another chain. When the destination chain gets your message and verifies it, it mints synthetic (wrapped) representations of your token. Your cloned tokens are free to play in a new land. To go back the other way, you have to incinerate those and tell the first chain to unlock the originals.

 

Bridges are cross-chain communication

The tech behind sending messages from one chain to another. Most commonly, this message is data about who wants what token to go where. Broadly, the message could also include calls into smart contracts from one chain to another, creating cross-chain interoperability. Passing these messages is not a simple task.

In the first scenario, where you locked yourself in a cage, there are toll-bridge operators that manage the receipt of your locking, minting and burning. These people are constantly under attack. If someone disrupts the message or fakes a signature, much is at stake. A million clones of you could be minted on the other side and forced into slavery! The original you could be unlocked and forced into slavery too. The toll operator herself could be a villain out to do this. The toll operator (validator) needs to be vested (staked) in your success, and fined (slashed) should she mismanage your funds. Bandits (hackers) will always look for loose bolts in your cage (smart contract bugs).

 

Bridges Unblock Blockchain

Why would anyone want to subject themselves (their coins and tokens) to this situation? Blockchains and decentralized ledgers are aptly considered as walled-gardens. Perhaps one garden is at full capacity, and they’re charging an arm and a leg to smell flowers (trade tokens, use dApps, play games, vote in governance). Other gardens may have flowers that are not present in yours and you would like to move there. The other garden grows produce (yield); it has fertile soil to plant Bitcoin and get little baby Satoshis out of it. That is Wrapped Bitcoin, the first bridged asset.

Bridges are important for any blockchain. They allow for scalability solutions to exist; Layer 2’s, side-chains and rollups. By their nature, blockchains have blocks that fill up with data and can only handle so many transactions concurrently. In an ideal world, there would be one blockchain to verify everything for maximum security. Also in this ideal world, there would be no borders between countries and the human race would live in harmony. We can dream, but realistically, we will build bridges and border crossings. So let’s build them safe and efficient.

 

Architectural Trade-offs

There are trade-offs when it comes to building a bridge, and safety considerations when it comes to using one. Often this is listed as:

  1. Latency,
  2. Security,
  3. Complexity,
  4. Overhead, and
  5. Reusability.

Layer 2’s of Ethereum like Optimism and Arbitrum have “Canonical Bridges.” This is the native bridge they built themselves that prioritizes safety over speed so that large amounts of traffic and funds can move to-and-from Layer 1. Bridge providers can build on top of the canonical one. Think of a multi-level bridge, where the bottom charges high tolls, but provides a safe crossing. Another level has lower tolls but it’s made out of old wood, and prowled by bandits.

 

The Fastest Bridge is…

The fastest bridge would be one person managing one server; they watch you lock funds on a remote domain (chain), and mint equivalent funds on a local domain. Like handing a friend $100,000 in bills and telling him to immediately PayPal an equivalent in digital cash–you better trust your friend. The slowest bridge would involve hundreds of decentralized validators waiting for all verifications, with a baked-in period of time where the transaction’s validity can be challenged. Like a room with 100 friends all having to agree that they are working in your best interest, and they give your money back if anyone betrays you.

 

Strive for “Cryptoeconomically Secure”

Inside a single blockchain, you can make transactions cryptographically secure. That is the best security on Earth. Between blockchains, you can make them “cryptoeconomically” secure at best. That is, a toll operator could do something scandalous, but it’s going to cost him more than it’s worth. Every bridge service that charges a fee will advertise themselves as trustless, decentralized and secure, but they have all had to make tradeoffs.

 

Bridge Aggregators

In DeFi, a lot of swapping activity has moved to “DEX Aggregators.” Similarly, this could happen with “Bridge Aggregators” that will move assets through different individual bridges based on the tradeoff considerations in real time. If you’re moving a small amount of funds and want to quickly ape into a FOMO coin, you let the aggregator choose a fast bridge. You became super rich off of that brilliantly degenerate decision, so you choose a safe, slow bridge to bring the funds back. These risk tolerances could become settings in a wallet.

As bridge technology matures, Bridges will represent core tech for the industry, and they will mostly disappear from a users’ direct experience. They will become the “Transfer Layer” or “Layer 0”, and simply be “invisible” infrastructure. Nobody cares what goes on behind the scenes at PayPal or Venmo, what banks they route through, as long as the funds appear safe and quick. You don’t care who built the overpasses on your daily commute, but you might like some guarantee that they’ll be sued heavily if the bridge crumbles. If you’re driving an armored car full of gold, you would choose a longer route over a shortcut through a bad neighborhood. 

To continue on this thought, blockchain itself doesn’t matter to users. To bring DeFi to Billions of people, you’ll simply want them to open up PayPal, Apple Cash or a better yet a self-custodied wallet they already use and see “Earn 15% APR in this savings account.” Under the hood, these services will be sending messages across multiple ledgers freely, nobody has to get locked in a cage, and we can smell all the flowers.

Shane Neeley

As head of R&D, Shane’s passion for blockchain development is matched by his avid interests in skateboarding, biking, golf, comedy, time in nature, acting a fool with his daughters, date nights, and grilling steaks.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like

Database for Web3 Dapps

Database for Web3 Dapps

Data storage on the blockchain has been pretty rudimentary.  However, that appears to be changing, and as it does,...