Paying a transaction fee with an ERC20 token

  • As far as I understand, one of the ERC20 token's features is that you can pay a transaction fee with it. In other words, you can send them without having Ether. I transferred REP tokens to the exchange and back without using Ether on that exchange so that works.

    I suppose that fee goes to miners. Where else?

    So someone creates a token that has no value at all, makes a transfer and pays a fee with it, then some miner gets it but he doesn't have any idea what it is.

  • It is not really true at the moment that you can pay fees in anything except ETH, although there is some discussion about changing this. The way things normally work, you have to pay the fee in ETH. When you sent REP to the exchange you probably used ETH in your own account to deposit tokens in the exchange, and the exchange would have paid for the transaction to send them back out.

    In theory, since it's up to the miner whether they include your transaction, you could send a low or zero fee in ETH and have a separate arrangement with a miner where you would give them some ERC 20 token, or send them USD via PayPal, or FedEx them a chicken. This depends on the miner thinking what you are giving them is valuable and being prepared to accept it as payment. If you've sent them a chicken but they don't want one, or you've sent them an ERC 20 token that they've never heard of and don't consider valuable, you shouldn't expect them to mine your transaction.

    I love the chicken example. It conveys a very essential and deep understanding of miners' incentives.

    The perception of value is interesting, and I suppose it'd a market for conversion or an escrow who finds the ERC20 token valuable (sounds hackish). I'd assume there's an EIP open on this already.

    I'm wondering will all of this change when EIP1559 goes through? There'll always be a base fee in ETH so FedEx chickens on there own won't be an option anymore. This is gonna result in lost jobs in the delivery sector and less demand from chicken factories and this will cause the whole economy and "ethosystem" to collapse...

    @david-callanan Economically what's happening is that the miners have an extra cost for including your transaction so you'll need to send them enough chickens to make this worth their while, and they'll pay the ETH that get burned. However the spec seems to require (unnecessarily) that the sender of each tx have enough ETH in their account to cover the basefee, so to send a tx without having ETH, the miner will have to add an extra transaction crediting your account with the ETH, which is then immediately deducted to pay the basefee.

    @EdmundEdgar Yes that is the unfortunate problem

License under CC-BY-SA with attribution


Content dated before 7/24/2021 11:53 AM

Tags used