PaybSwap, Smart Chains & Bridge Modules

1. Introduction

Keeping with the pace of the digital revolution, exclusivity and staying isolated had never been the solution to thrive in the industry. The same goes for the blockchains that had to come up with a system supporting their parameters, but the challenge, as it had always been as far as the blockchains are concerned, is to keep them decentralized, ruling out any third party. This whole scenario gave rise to interoperability, where the need to promote interaction between the blockchains was highlighted. Broadly, this concept is interoperability, which is defined as the system that connects or bridges the two disparate blockchains.

The ultimate aim of any innovation in the industry had always been to turn intricate processes into easily doable systems. And that demanded a blueprint that could do so, leading to innovations that we today have on our table. In blockchain terms, this need was to connect with other blockchains, access the information without being confined to just a single model, the possibility to share the solution, and promote partnerships.

2. Smart Chains

Following are three renowned smart chains:
i) Binance Smart Chain
ii) Ethereum
iii) Polkadot

Binance Smart Chain was introduced after BC (Binance Chain), the latter primarily known to host decentralized apps or Dapps. Like any digital model, there’s an algorithm behind a blockchain that precisely differentiates BC from BSC. BSC is primarily designed to support smart contracts, although there are other parameters too, but this one holds much significance. Further, it’s the compatibility it offers to the Ethereum network via Ethereum Virtual Machine (EVM). Smart contracts are driven by “If & Then” conditional statements and allow blocks to be created after certain conditions are met by the process to be held. These conditions are preprogrammed and vary. Unlike BC (on PoA), BSC is based on the PoSA (Proof of Staked Authority) model, now what that means is simple, it’s a phenomenon that demands a certain amount of set value (BNB, in this case) to be deposited equivalent to the authority over being a validator (administrator to control transaction data) after Binance approves it.

Ethereum is the first network that introduced smart contracts leading to inundation of the decentralized applications, obliterating any third party. The idea behind the advent of Ethereum blockchain, as it’s claimed to be a programmable blockchain, was to rule out chances for frauds and censorship that previously had seeped in. It’s based on a hybrid PoW+PoS (Proof of Work + Stake) consensus mechanism that demands around 15 seconds before a block is created.

The Polkadot chain stands on the PoS (Proof of Stake) model. As with BSC, Polkadot demands its validators to make a deposit, which in this case is DOT. This then authorizes them to get hold of the processes being held on the chain.

3. Bridges

There are multiple bridging solutions now circulating in the industry and the ultimate aim behind each of them is the same, to allow the access of digital assets across different chains. Previously, we’ve deliberated on how critical it is to look for a bridge and execute decentralized apps across various platforms for the masses. Now, we’ll delve into what these bridges are & how they work.

Broadly, there’d always be two major classes of any system in Crypto; Centralized and Decentralized. Although crypto always was intended to be decentralized, there are some parameters where centralized administrators had to embrace the responsibility. Centralized bridges are where there’s a mediator, the bridge is to be trusted. It’s then responsible for handling the transactions between chains. Opposingly, the mediators are outta the game when it comes to a decentralized system. The software and the programmed structures carry out the transaction on their own, obliterating any chances of possible corruption.

3.1. PolkaBridge

As the name suggests, Polkabridge is designed to connect the Polkadot chain with other blockchains like Ethereum, Bitcoin, etc. It’s not a traditional “send and receive” approach when it comes to bridging between the blockchains. The assets to be sent are frozen in the parent account and the equivalent value is created on a different blockchain. Whenever the user thinks of redeeming its value, the asset in the equivalent chain is burnt and the asset in the parent account is then unfrozen again. This is how most of the time, the bridging mechanism works behind each transaction.

As far as the Polkadot bridge is concerned, it differentiates itself in a number of ways, broadly known as the modules of the bridges. One-fits-all strategy ain’t gonna work in this case because the chain it’ll be employed to disseminate information might be entirely different than its receiver’s framework. As we studied above, there are chains based on PoA, PoSA, PoW, and PoS consensus mechanisms, so there had to be some system in finalizing these bridges and here they are:

A. Pallets

If the chain on the receiving end is based on a substrate blockchain framework, then this specific type of bridge is preferred. For instance, Kusama bridges the gap between both substrates.

B. Smart Contracts

If the blockchains are not substrates then there’s another way of bridging the solution which is the usage of smart contracts. As stated above, the smart contracts carry information, and this information is based on an “If and Then” model, where if a certain need is met, the programmed move will then occur. So, if the blockchains involve the usage of smart contacts on both ends, then this sort of bridging solution would work. Also, there could be a disparity in the consensus mechanism so, to bring them all on a single platform, this one comes into play.

C. Higher-Order Protocols:

If the blockchain to interact with is neither a substrate nor a framework based on smart contracts, then higher-order protocols offer an escape route. This is then the way that can be opted in order to disseminate the data to the other chains. A prime example can be the Bitcoin chain where it’s not based on smart contracts and on the substrate either.

How does it work?

In order to proceed with the transfer, there’s an entire algorithm that runs in the background and supports the whole process. It’s the Relayer Service that accounts for the transaction to take place between an account on BSC & Ethereum. In literal terms, relayer is basically something that passes on the information, and the same stands true here as well. The idea is to connect multiple (In this case, BSC & Ethereum) substrate nodes to a single node, and the relay monitors to aid in getting the message across. How it’s done is a process that we previously have given a general overview on, a lock contract feature is used which blocks the amount (tokens) in the wallet. Then, this info is read by the relayer service and translates the same amount on the Polkadot bridge. From here on, tokens can be transferred to any blockchain. Once it’s decided, the ones on Polkadot are burnt and the address is generated to create an equivalent strength of the token on a decided blockchain.

4. PaybSwap

The Ethereum chain has been in use by the masses for some time but the limitations it imposes are right there involving soaring gas costs and poor scalability. Binance Smart Chain was a successful try to fix some of Ethereum’s issues and offers a solution — low economic cost giving it leverage that it previously did not have, scalability scope, and keeping the transparency intact.

PaybSwap is a cross-chain automated market maker on the Binance Smart Chain integrated with the Polkadot and Ethereum chains using the bridge modules. . The liquidity that Paybswap offers is another measure to be cherished. Previously, there was a concept introduced Uniswap that only entertained the Ethereum and ERC-20 tokens, while the cross-chain token swap was an idea beyond realization and with the advent of PaybSwap, this has been made possible and operational, allowing easy cross-chain swaps and a higher liquidity proportion.

The systematic process to transfer tokens from BSC to Ethereum or vice-versa is pretty simple. Let’s dive a bit into it and see how exactly that happens so you better be in control to make a transaction yourself for the first time. The first thing you gotta do is to connect your wallet with Metamask or any other wallet you use. Once it’s approved and can read the info in there, it gets super-easy. Because all you have got to do is to select a network to swap tokens between the two blockchains. An approval message will pop up asking you to allow the monitors to extract data out of your wallet and transfer it. Once you allow that, it will then be transferred using the PaybSwap bridge. The time it will take for the transaction to take place depends on the traffic the networks are exposed to.

In the backend, Keeper, the backend application, checks the state of the bridge smart contracts in different networks. The keeper application stores information about token transfers between networks. It uses call functions of the contracts in both BSC and Ethereum.

In Polkadot, the relayer service is used to synchronize the transaction headers between blockchains and is based on XCMP messaging, which will allow us to integrate other substrate nodes to our node.

For example, to exchange tokens from Ethereum to BSC, the user calls the lock function, to lock tokens in Ethereum, after which the relay monitors the status of the transaction. Once done, using the polkadot API, tokens are issued and reserved on Polkadot. In the next step a substrate node is called to transfer and display the tokens on the destination chain. To do this, the burn contract is called and burns the generated tokens on Polkadot, while passing the token address as a parameter, so the relay service will track the address of the token and issues tokens on the destination blockchain, i.e. BSC.

On Polkadot, as the cross-chain communication commenced, there had to be some system that validated the data on the nodes and conveyed it all the way to the relay. The points where this validation occurs are known to be the validators. To keep the speed and efficiency of the system, the tasks are managed simultaneously on multiple chains. So, the transactions that have been done on the parachains are brought to the validators where they are checked. From these nodes, the transactions are brought to the relay chain. Paybswap recently launched their NFT marketplace, it runs both on Binance Chain and Ethereum Chain, they are also implementing crosschain purchase on the marketplace. They recently partnered with Galaxy to run some NFT giveaway campaigns. Do check them out.

Concluding Notes

Over the years, a lot has been introduced in the blockchain industry. For instance, Ethereum is transforming its PoW based consensus mechanism to PoS to reduce the energy consumption needs and the same has been true for every other smart chain. The need to absorb the functional algorithms of all these chains is vital because, in the long run, it’ll set a base for any user to make an investment. It’s an accumulated knowledge that is needed to circulate the funds across these bridges. From the discussion done above, it’s pretty evident what those smart chains and the bridging solutions are and what is demanded by these chains to interact. This has been broken into the segments above and each has been briefly delved in to make sense of them.

 

 

 

Related Posts

Premium Partners