DEV Community

AnggaPurz
AnggaPurz

Posted on

(Cross Token) Blockchain Bridge?

Emerging trends of blockchain & crypto have bring enormous blockchain network. Bitcoin network, Ethereum, Polygon, Solana, Binance, Arbitrum, and many other network, you can name it.

While each network compete to be fastest, safest or cheapest network, a problem arise. They stand by themself. No communication between networks.

No Communnication

Ethereum network is a famous network, it brought concept of smart contract to blockchain, it start era of DeFi, (Shit)Token Era and NFTs. It makes traffic on Ethereum network, and trigger spike on gas price. People charged by high fee for transfering token (PoW also takes credit for this fenomena). That was insane moment.

This problem then inspire creation of other network. Some comes as L2 network (Network to support Ethereum) such as Polygon Network, others come as Ethereum Competitor.

Blockchain Everywhere

A solution is just an opportunity for a problem to be born.

Let say you invest in a DeFi Project and hold their tokens called "ShittyToken" on Ethereum Network. You enjoy creating transactions on this ShittyToken project and gain rewards. Suddenly, the gas price goes high. People stop using the project because they cannot make transaction caused by the gas price. Then the developer move their project to other Network, let say they move to NewEthereum Network because the gas is cheap, they re-create their ShittyToken and ask you to buy their ShittyToken on NewEthereum Network and ask you to start the transactions on NewEthereum Network.

Will you do that?

You might not doing that, because it means you need to spend your money to buy same ShittyToken (just in this time on different network). You possibly pay more expensive price to buy the token on new network & gain less token. And your ShittyToken on Ethereum now just a useless token.

To prevent angry users, ShittyToken Developer start to figuring out how to make the token able to move from Ethereum Network to NewEthereum Network. And they create a Token Bridge. This Token bridge will facilitate the token to move between these networks. Some famous bridge are Polygon Bridge, Binance Bridge, Anyswap, Allbridge.

As long as I see, all these bridge just moving the same asset between network and I didn't find any bridge that able to bridge and converting token at the same time. Let say you have $1000 ETH on Ethereum Network, and you see opportunity to gain 20% APY from staking on a ShittyToken Project on Arbitrum Network. All you need to do is bridge your ETH to Arbitrum, and then swap ETH to ShittyToken and then stake. looks like a big effort, huh?

How about a bridge that can move your Tokens from a network/chain to other network/chain and it will convert your token to any token that you want?


Let's start with WHY

WHY the existing bridge not doing that?

If that is really that good , why the existing bridge not doing it?
In my opinion, they not doing it because they not own the money or liquidity pool. Even if they wanna doing it they need to handle the swap process and using DEX that not owned by them, and they cannot guarantee about how much token you will get after swap (cause the DEX is not owned by bridge, and everything is decentralized, it makes bridge cannot guarantee amount of token users will get in other chain, too much to risk).

WHY that kind of bridge needed?

We can say blockchain is a new thing, many improvement needed, and this new kind of bridge is something that I believe can improve user experience.

How to make that kind of bridge?

Let's call this bridge as "Cross Token Bridge" or CTB. We will make this CTB simple as possible, bridging 2 network that support smart contract.
We only need to add simple swap process before bridging the tokens.
We assumed both network are L1 network, and the bridge operator holding some amount of tokens on both network (Not like Polygon bridge, on polygon bridge they have authority to mint token in L2 network).
Here the diagram :

Cross Chain Bridge

This bridge come with some challenges :

  • The Bridge need to hold token on both sides
  • If the token is not exist on destination chain, user cannot bridge the token
  • Bridge monitor need to maintain tokens supply that owned/hold by bridge to prevent insufficient amount of token when user bridge their tokens
  • User will be charged for the fees : Transaction fees on Source Chain (when user Approve and Trigger Swap&Bridge function), Transaction fee when The Bridge Monitor transfer token to user on Destination Chain (User cannot directly pay for this transaction because The Bridge Monitor is the initiator of the transaction. The solution might be taking additional fee when user trigger Swap&Bridge function)

Top comments (0)