Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a ‘feeless’ ERC20 token?

Is it possible to create a feeless ERC20 token?

Or paying fees through another address?

I have a solution in mind, to refund the transaction fee amount to receiver’s adress from a central address.

Any ideas?

like image 391
Eugene Oz Avatar asked Nov 29 '25 07:11

Eugene Oz


1 Answers

You can't have another address pay for transaction fees. You have two options:

  1. Create a centralized server that your app makes calls to which will then delegate all of the activity to your contract. However, this approach is centralizing your app when one of the goals of the blockchain is decentralization. It's up to you to decide if you're ok with this (For example, MetaMask is a popular tool, but that centralizes your provider...is that wrong?).
  2. As you said, you can refund the transaction fee back to the user. Have your contract track individual balances and periodically issue refunds. Your contract can hold funds (which you can replenish through an ownersOnly payable fallback function) and process refunds when appropriate. Be sure to follow appropriate withdrawal patterns.
like image 166
Adam Kipnis Avatar answered Dec 02 '25 04:12

Adam Kipnis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!