The whole world is now moving onto the blockchain very rapidly, and as of December 2021, approximately 696,251,416 transactions were done on Blockchain.com. The global blockchain market expectation by 2026 is going to be worth USD 67.4 billion.
As per a study by coinmarketcap.com, the average gas fee of an ERC20 transaction on Ethereum was about $46 in February, which is sky high compared to other blockchains. This rise in the gas fee is due to the increased popularity of Ethereum.
This is what has been the motto with which most blockchains are operating nowadays. With such high demand for blockchain technology, chains such as Ethereum are now working on reducing the gas fees per transaction to make sure that it stays in the market and people do not stop transacting over it.
Due to this high rise in the gas fees, it is now becoming mandatory that we work towards reducing the gas fee per transaction, and there are multiple ways to reduce it:
In this blog, we will talk about the Gas Station concept, interchangeably used as a Gas Pump, and how it can be very effective for DApps having custodial wallets.
Let us take an example of a platform on which users can pay for a lottery ticket in ETH, and a draw will happen after a few days to select a winner. This platform will create a custodial wallet for each and every user, where users will submit the ETH for purchasing the lottery tickets. Now, when the admin wants to transfer the ETH from all the custodial wallets, he needs to make the request for transfer by subtracting the approximate gas so that the transaction does not fail. As the gas fee is approximately estimated and not exact, a small amount of cryptocurrency remains in the wallet after a transaction, whose value is less than the minimum limit required for the transaction. This is Crypto Dust, simply put - leftover crypto. Assuming that 0.0001 ETH gets left in each custodial amount and there are 1000 custodial wallets, so this means almost 0.1 ETH will be left as dust, which is a huge loss for the platform. The workflow of such a system will be as follows:
To overcome this, we can use a Gas Station. Enabling the Gas Station, or Gas Pump, will allow the admin to withdraw the complete amount stored in their custodial wallet, and the admin wallet will take care of the Gas Fees.
The basic workflow after the implementation of the Gas Station can be as follows:
As you can see from the above infographics, the whole amount from the custodial wallets is withdrawn and deposited into the admin wallet, and the gas fee for the transaction has been deducted from the admin wallet itself. Now, as there is no estimation to be done, there would be no leftover cryptocurrency or Crypto Dust in the wallet, and the platform will no longer have to bear the loss due to it.
Gas Station replaces the address with a smart contract, and whenever a withdrawal request is made to the custodial wallet, the gas fee automatically gets deducted from the master address. This eliminates the need from deducting from the custodial wallet itself.
Following are the blockchains which are now offering the Gas Station feature:
Tatum is one of the API providers which is also offering this feature.
As you saw a Gas Station or a Gas Pump, whichever you prefer, can be very effective, especially for custodial-based platforms where this can work like a charm and help these platforms from suffering huge losses due to Crypto Dust.
Director of Engineering