Skip to content

Instantly share code, notes, and snippets.

@zurgl
Last active July 19, 2021 17:54
Show Gist options
  • Save zurgl/12ab1752019dd89241363b7ab63f17f1 to your computer and use it in GitHub Desktop.
Save zurgl/12ab1752019dd89241363b7ab63f17f1 to your computer and use it in GitHub Desktop.
example of educational content

How would a DAO administrating the bridge work? I have to be honest, I'm a bit lost on this - as most web2 devs are, how would you explain in the simplest terms? as if i was the typical learner going through this curriculum

Younger, I remember my first solo road trip. When I've bought my first car, I thought I was definitly a freeman. Just put some gas in the tank, and any land trip was possible.

Once, far away I saw an amazing stuff: Normandy Bridge. "The perfect spot to take some selfies and boild up my socials networks" I thought. Unfortunatly at the entry, I've realized: this bridge is a tolled road for car, and I let my credit card at home.

Later I've learned from an insider, than:

  • Truck cannot cross it
  • Car have to pay some fees
  • Motorcycle's entrance are almost free of charge

Who has decided such rules ?

Story aside(1), this picture fit pretty well how our conceptually bridge is working. Not every asset can cross the bridge, and even if two classes of asset can cross it, it's very likely they won't have to afford the same amount. The good new: rules can change. And in order to make it possible. We need what we call a DAO Dapps.

How does it work ?

  • Someone want to make some change of the existing rule.
  • Then a proposal is submitted taking into account it's cost.
  • When enough partener accept to funded it, the proposal will go throught a voting process in order to accept or reject it.
  • Finaly, rule will change (or not).

(1) It was a fictinal one, in real life i cannot even afford to put gas into my tank then how could I expect to cross such a bridge =). Anyway if you can't take it, just make it


And btw, why are bridges such a central tech for the evolution of blockchains? I keep hearing about them but I'm still trying to figure out what problem they solve and how.

Blockchains arise as lost and isolated volcanoes in the middle of an ocean populated by web2 tech.

If some meerkat from NEAR island want to trade their exotic-fruits against retro-gaming-shoes produce by metroid people living in Solana island they just cannot.

Remember volcano are isolated, they do not share land (state). Then exotic-fruits (which are token) and their meerkat holding them (which are smart-contract) are unable to cross ocean by themselve. A similar sketch hold on Solana island.

Which's why, a bridge need to be built between these two isolated world. Then meerkats will be able to enjoy the unique specifities produce by the Solana world.

The following scheme describe which kind of problem a bridge can adress

-----------------------------------------------------------------------------------------------
                                  The Walt-disney of blockchains 

__________________                                                         ___________________
|                |             __________________________________          |                  |
|   NEAR Volcano |          <            Bridge allowing           >       |  Solana Volcano  |
|   ------------ |          <  fruits to be exhange against shoes  >       |  --------------  |
|                |          <                                      >       |                  |    
|    Fruits      |          <    flying fish --- walking crab      >       |   Retro-shoes    |
|    Meerkat     |          < __________________________________   >       |   Cyborg         |
|_______________ |                                                         |__________________|

------------------------------------------------------------------------------------------------
                                 The reality of blockchains
__________________                                                         ___________________
|                |             __________________________________          |                  |
|   NEAR network |          <            Bridge allowing           >       |  Solana cluster  |
|   ------------ |          <  NFT NEAR based <=> NFT Solana Based >       |  --------------  |
|                |          <                                      >       |                  |    
|    NFT         |          <   SPA* (javascript) --- Rust indexer >       |   NFT            |
| Smart-contract |          < __________________________________   >       |   Program        |
|_______________ |                                                         |__________________|

-----------------------------------------------------------------------------------------------

*SPA = single page application (react stuff)

Going one level depper into technical details:

  • Dev A holds an NFT on NEAR blockchain.
  • Dev B holds SOL on Solana blockchain.
  • Dev B want to buy Dev A NFT using his SOL.
  • Dev A will lock his NFT using the NEAR-Bridge.
  • NEAR-Brige will create a wrapped-NFT and transfer it to Dev A NEAR-account.
  • Dev A will transfert wNFT from NEAR to SOLANA using NEAR-Bridge
  • Dev A will unwrap the NFT on Solana side
  • Dev B can now buy the NFT using SOL

Also, we got a submission by a dev to write a tutorial on a bridge between Polygon & Ethereum, with a UI/dashboard. It looks to me like it could be the equivalent of what you pitched but for the Solidity world no? Here's the gist the user submitted. Is it similar? What are the differences?

No, it is not. There the dev are going to build a dashbord allowing one to visualize analytics of a bridge. He will build a web2 apps, reading the state of a bridge.

On my side, I expect to developp a bridge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment