Author: Ganeshram Ramamurthy
The number of decentralized finance (DeFi) dApp users is growing, with 4.8 million DeFi wallets out in cyberspace as of July 2022, a 69% increase from a year prior.1
In this blog, we’ll explore DeFi dApps and why they’re gaining in popularity. We’ll also cover gasless transactions (also called meta transactions) and what these new developments mean for the future of DeFi apps.
What are dApps
First, what’s a dApp? A dApp is a decentralized application built on a blockchain network — in most cases, the Ethereum blockchain. These applications can appear like any other web application to their users, but under the hood they function much differently. Instead of communicating with a centralized server, they run on a decentralized network. Additionally, any agreement reached while using a dApp automatically executes via smart contracts if all terms have been reached. That means there is no need for a single entity to control these dApps.
These decentralized applications have use cases in many industries, including gaming, social media, and e-commerce.
Have dApps taken over the world of finance
DeFi dApps enable anyone with an internet connection to manage their personal finances. As an alternative to traditional finance, DeFi dApps are gaining traction due to the trustless, transparent, and immutable features of blockchain technology. From lending and borrowing to saving and investing, the financial services consumers are familiar with are offered by these DeFi dApps — with the added ability to trade with cryptocurrencies as well as fiat.
Popular DeFi dApps include PancakeSwap, Uniswap, and Compound, where users can exchange cryptocurrencies and tokens as well as earn interest through lending these digital currencies.
Are dApps easy to use
DeFi dApps haven’t been easy to use. Up until recently, if you wanted to interact with a dApp, it required a three-step process:
- Create a digital wallet.
- Fund a wallet.
- Interact with dApp.
The first step, creating a digital wallet, is an easy process. Funding that wallet, however, is not an easy process. To fund that wallet, you must:
- Search for an exchange.
- Create an account.
- Enter personal data and upload proof of identity.
- Deposit fiat currency.
- Wait for funds to be accredited, which can take 1–3 days.
- Purchase the cryptocurrency needed for the transaction.
- Transfer currency to the wallet that you created earlier.
While more tech-savvy users shouldn’t have a problem with these steps, most people won’t know where to even start.
On top of this complicated process, users must pay gas fees when transferring currencies out of their wallet and when withdrawing and exchanging.
What are gas fees, and why are they needed
Gas fees are essentially service charges for processing transactions. They are what you need to pay to execute a smart contract on a blockchain. For instance, when buying an NFT, you interact with a smart contract. When swapping tokens, you interact with a smart contract. When transferring currencies from your digital wallet, you interact with a smart contract. All these interactions will need to be validated and approved in order to be recorded onto a blockchain.
Gas fees are needed to compensate network validators. In the case of the Ethereum blockchain, which now uses a proof-of-stake consensus model thanks to “the merge,” validators stake their own coins. Blocks are then verified using the machines of the validators. Without gas fees, becoming a validator would be far less enticing.
What are gasless transactions
Let’s go back to the complicated process of funding a wallet, as well as the gas fees associated with it.
What if you could interact with a dApp without funding a wallet?
What if you could transact without paying gas fees?
This can be done with gasless transactions (also called meta transactions). A gasless transaction primarily separates the signer and the gas fee payer of the transaction. There are 3 main actors in meta transactions. The user, the relayer, and the contract. A user is the end user of the transaction. A relayer is a third-party, such as one belonging to the Gas Station Network, who can sign and send Ethereum transactions. And a contract is the dApp that the user wants to be in touch with.
How do gasless transactions work
- User signs the transaction with his private key.
- User sends the signed transaction to the relayer.
Note: At this stage, a gas fee is not incurred, as nothing has reached the smart contract yet.
- The relayer verifies the transaction received from the user.
- The relayer wraps the signed transaction into an Ethereum transaction and executes it.
Note: Because the relayer interacted with the smart contract, the relayer pays the gas fees.
- The smart contract receives the transaction made by the relayer.
- The smart contract then unwraps the original signature and uses it.
You may be wondering why there’s a gas fee when I said this was a gasless transaction. Simply put, gasless transactions are transactions in which the user does not pay the gas fee.
So, why do relayers agree to pay the gas fees? Because they can then turn around and charge the user the amount, payable via fiat currency, as well as a tiny bit extra as a fee for their services. Or, relayers could charge the dApp platform the fee, or a portion of it, which the dApp platform would view as part of its customer acquisition costs.
What are the advantages of gasless transactions
- Users don’t need to go through a complicated process of funding their digital wallets.
- Users can avoid paying gas fees. Instead, they can seamlessly pay transaction fees via fiat currency.
- DApp platforms can onboard more customers by removing the barriers of complicated processes and gas fees.
What are the disadvantages of gasless transactions
- Gasless transactions do not work on all contracts. To support gasless transactions, dApps need to import the appropriate code and libraries.
- Gasless transactions are not backward compatible. That means you can’t use it on contracts that have already been created.
What is the future of DeFi
Removing the barriers of gas fees and complicated processes is certainly a boon for DeFi dApps. While these aren’t the only barriers to mainstream DeFi adoption, other barriers can also be overcome to promote DeFi adoption.
In addition to making it easier for users to join dApp platforms and transact, removing these obstacles also will lead to more seamless user experiences, as users won’t have to comprehend the inner workings of the dApp to participate. I foresee that the resulting easier, simpler transactions will lead to increased crypto adoption and dApp adoption as a whole. And because DeFi dApps allow anyone with internet access to receive financial services, they will also further promote financial inclusion.