Gasless Transactions on Binance Smart Chain, powered by Biconomy

Aditya Khanduri
Biconomy
Published in
3 min readMar 3, 2021

As users & Dapps move to Binance Smart Chain to escape the horrors of wallet-draining gas fees, a gasless experience takes the user experience to a whole another level!

Over the last month, which in the crypto time felt like eons, exorbitantly high gas fees on Ethereum has made people turn towards Binance Smart Chain. The number of unique addresses on the Binance Smart Chain increased by a mindblowing 2,265%!

Top DeFi projects such as 1inch Exchange are expanding to the BSC ecosystem. Many other projects are also actively building on or expanding to Binance Smart Chain to offer respite from high gas fees to their users.

Biconomy’s powerful & easy to use meta-transaction APIs will improve this user experience even further by enabling gasless transactions! Imagine all products on Binance Smart Chain with no requirement to pay gas anywhere!

Imagine paying ZERO fees on all your trading, farming, lending activities as your friend waits for gas fees to ‘cool down’ to pay 50$ for just 1 trade!

Furthermore, Biconomy is the inter-chain transaction layer for next-generation Web3.0 applications that ensures a simpler user experience. Through Biconomy’s APIs, developers can enable a simple and customized transaction journey so that their end users don’t get frustrated by blockchain complexities. That’s the future we want to enable — A simple gasless web 3 experience that will drive crypto mass adoption.

To celebrate this launch, we would be sponsoring all gas fees on your Dapp for the first month! (Terms & conditions apply). Just one more reason to integrate Biconomy on Binance Smart Chain!

How to integrate meta-transactions on BSC?

Currently, developers can integrate Biconomy testnet on their decentralized applications on Binance Smart Chain. We will be providing mainnet support in the coming weeks.

It’s a fairly quick and simple process. First you need to make changes in your smart contract:

  1. Import BaseRelayRecipient using
import “@opengsn/gsn/contracts/BaseRelayRecipient.sol”;

2. Inherit BaseRelayRecipient in your Contract.

contract <Contract-name> is BaseRelayRecipient

3. Override this function in your Contract

function versionRecipient() external virtual override view returns (string memory){return “1”;}

4. Replace msg.sender by _msgSender() in your Staking contract.

5. Make sure to install below package

npm i @opengsn/gsn

Next, you need to add the smart contract on Biconomy dashboard. Follow this simple documentation to do this.

Finally you need to make client script changes:

  1. Install @biconomy/mexa package
  2. Initialise Biconomy
let biconomy = new Biconomy(window.ethereum, {apiKey: “<api-key>”, debug: true});

3. Pass biconomy object in web3

let web3 = new Web3(biconomy)

4. Now you can call your methods using web3 object as you would generally do.

If you have any issues or are stuck anywhere, feel free to reach out to us on our Telegram! We also have a dedicated channel to help developers integrating Biconomy on BSC.

Moving forward, we have various projects in the pipeline that will make the entire multi-chain experience seamless and intuitive. The user will be able to use applications just like any web 2 app, while Biconomy will handle all complexities across Ethereum, Polygon, BSC, Avalanche, and other chains. Thus, Biconomy enables a simple interface for applications regardless of how they work behind the scenes to become more scalable.

--

--

Aditya Khanduri
Biconomy

Marketing @Biconomy | Interested in Blockchain, Artificial Intelligence, Biotech & emerging tech startups | Tea aficionado