VeChain Kit: Social Login & Smart Accounts
Fee Delegation
Learn how to remove gas fees for users by enabling fee delegation with VeChainKit. This lesson shows how to use vechain.energy for a seamless user experience without requiring VTHO.
Removing Gas Fees for Your Users
For VeChainKit to function properly, fees on your app must be delegated. This allows developers to cover gas costs for users, eliminating the need for them to hold or manage VTHO, making onboarding seamless, reducing drop-off, and enabling smoother UX.
One of the biggest friction points in blockchain adoption is gas. Most users don’t want to worry about holding a separate token just to use your app. On VeChain, the gas token is VTHO, which fuels transactions, but users don’t have to be aware of this.
On VeChain:
VET = value token (used for payments or staking)
VTHO = transaction fee token (used to execute operations)
Thanks to VeChainKit’s fee delegation, users can interact with your app without ever holding VTHO or paying for gas.
How It Works in Practice
VeChainKit supports fee delegation with a simple configuration:
Use the <VeChainKitProvider /> in your frontend
Set the FEE_DELEGATION_URL in the provider config
That URL points to a signer service that signs transactions on behalf of users
VeChain allows you to manually set up your own fee delegation service, where you control the infrastructure that signs transactions for your users. This option is ideal for enterprise or advanced use cases requiring full control.
However, we won’t cover this setup in this course. Instead, we’ll use the default service provided by VeChain - vechain.energy.
Use vechain.energy
VeChain provides a hosted fee delegation service you can use out of the box. The template script includes a fee delegation URL, but it's recommended that users create their own.
To do this, go to vechain.energy, create a Testnet App, and get your fee delegation URL from the dashboard.
With that ready, simply configure your VeChainKitProvider like this:
Note: Use the mainnet or testnet URL depending on your environment.
Run the App
Navigate to my-app directory and start your app locally:
Click the login button. You’ll see a wallet selector. If the selected wallet supports it, users can authenticate using their email or social accounts.
Join our Telegram