# Bridges **Published by:** [0xDanki ( Tin Erispe )](https://paragraph.com/@tinerispe/) **Published on:** 2023-06-03 **URL:** https://paragraph.com/@tinerispe/bridges ## Content Danki iz in a crossroad right now. At the time it looks like I’m in the perfect spot to be a bridge. Em smart enough to build and fully understand what’s going on the cryptoverse but em also dumb enough to only talk about it using relatable human language. And maybe dat is how I got you, my few handful of subscriber frends. That, or you enjoy seeing me make awkward metaphors about an obscure, super niche subject that my mom would never understand. But here’s where being a bridge gets tricky: at one point, you’ll feel the gravity pulling you towards the world with the larger entropy. In one of those days, you start thinking “What if I stop half-assing these two worlds and commit to just one?” That day is today. I’ll tell you the story at the end of this post, but first let’s talk about cross-chain bridges.Why do we even bridge?Say you want to send some ETH as a gift to your crush who is a Solana moonboy. Surprisingly, he would gladly accept your ETH (and maybe your little hart as well) but there’s just a little problem: Solana is a different chain from Ethereum. Now you might ask, “Why is there even a problem with sending ETH to Solana? Can’t we just send it to the other chain and transact in peace like god intended us to be?” Well, sadly, the two networks are built differently. Their data structures, mechanisms, as well as programming languages are not the same. Imagine wanting to send a text message using telegram. You can’t no matter how destined you are. Here’s another more realistic scenario because let’s be honest your crush doesn’t like you: what if you wanted to use your ETH as collateral to a loan to a DeFi protocol in Solana? How do you even do that?Breaking down the problemMy dankibrain got very confused when bridges are explained to me. But then I realized it is confusing because it is a complex problem that needs to be broken down. So after hours of chewing and chewing information, I decided that there are three components to the cross-chain interoperability problem:How the blockchains communicate their state Since the chains vary so much in their design, there is only one way they can communicate their state to each other, and that is through off-chain attestation. Meaning, you get an intermediate blockchain or a decentralized oracle network to tell the chain what is happening to the other. This is how LayerZero and other bridges that use Chainlink’s CCIP work.How the tokens are ‘transferred’ Lock and Mint aka. Asset Wrapping - the user locks their tokens inside a contract (or a node depending on the design of the network). An attester verifies that the user has locked their tokens and then mint a synthetic version of it in the destination network. When the user wishes to bridge back, they burn their synthetic token and get released their locked original tokens back. Omnichain Fungible Tokens - this is basically just lock-and-mint but instead of minting a chain-compatible synthetic asset, you deploy a locked proxy contract in the omnichain so that the tokens remain in their native form, and then you can mint it to a destination chain. Cross-chain Pools - This clever mechanism didn’t even require cross-chain communication. Just buy a stable asset of a protocol that has it in many chains, and then exchange that asset back in the destination chain that you wish. Voila.How the bridge ensures that no tokens will be stolen This is probably the most heated topic when it comes to bridges but also the most no-brainer. You got two options when it comes to who manages your locked bridge tokens: Trusted/Custodial bridges- when your locked original tokens get managed by a central governing authority that verify and confirm your transaction and then mint a synthetic equivalent token that you can use on the other chain. The downside, of course, is that you have to trust them to not run away with your real tokens while you’re using their synthetic version. This was implemented in wBTC with BitGo as their institutional custodian. Trustless bridges- when your tokens get minted and burned algorithmically. Your tokens are locked in a smart contract until you have burned the synthetic token. There is no getting around the system. As in the case of Bitcoin, one example of a trustless bridge is Wanchain’s renBTC, where the token-holding nodes are cryptographically secured through Multiparty Computation. Participants only hold a component of the key to the locked tokens so that no single node can steal it.A Game of Weakest LinkIt’s always the bridges that get hacked in DeFi. At first, it’s unclear to my little dankibrain why, but then I put it like dis: Why do airports always have the tightest security? Aha, because the entry of even just a single bad actor can terrorize the whole country. If your neighbors are sick, you get sick as well. If one of the chains are compromised, it can result in an imbalance of tokens for both. The attack surface just significantly got bigger. And some of the biggest bridge hacks that I can remember aren’t even because of a bug. Bridge design is quite complex that sometimes, the architecture of the system is the bug. And then there is also that single smart contract that keeps all that valuable locked tokens, which is a pretty hot target for a lot of mallories. Anyway, that’s enough caution to using bridges for you. Just use native tokens if you can. And may the odds be ever in our favor. ****** I had two brushes with the larger blockchain world this week. First is dat I met a frend who is hellbent on spreading a blockchain movement in the country. He is a very well-connected guy but he wanted to start developing in this small city in the mountains. I can see his idea though. He got jaded in the mainstream web3 culture in the big city where people seldom talk about real world use cases of decentralized tech. So he’s starting here where the population is young and passionate and highly educated. A clean slate. We are on the same cause. Two days later, I met my mentor. For some cosmic anomaly this guy who is already deeply entangled in the global DeFi scene found Danki on the webz while he was takin a vacation in his hometown. And his hometown, of all places, happens to be this sleepy town where I live. Dankibrain haz never expanded so much as the few hours he haz talked about DeFi. And I have never thought so hard about where I wanna go after that conversation. Which leads me to my point… I’d stop being your bridge and start tying you to my waist so I can pull you to the other world. And I might talk more freely in this blog 😅 I’d probably write about some alien topics dat I’m scared no one will read. Or yeah, the goal anyway iz to tap dance alone so it doesn’t really matter if anyone is reading dis. But I hope you still hang around in dis little rabbit hole. DeFi is a big place, I’d tell mor shiny moon math soon. 🐴✨ ## Publication Information - [0xDanki ( Tin Erispe )](https://paragraph.com/@tinerispe/): Publication homepage - [All Posts](https://paragraph.com/@tinerispe/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@tinerispe): Subscribe to updates