ERC20 Token Transfers – How to Add a Fee in Ether

address.transfererc-20etherfees

New to Solidity…

Is it possible to have a fee for transfers of an ERC20 Token in Ether? The fee would be 0.000001 Ether per transfer. Each time the ERC20 Token is sent to another user, the fee in Ether would be sent to a contract. Source example of how to transfer the fee in ether would be most helpful.

(note: this question does not pertain to gas fees. This refers to an additional fee in Ether for transfers of an ERC20 Token.)

Best Answer

You can see the specifications set out by the ERC-20 standard here.

For the relevant functions, transfer and transferFrom, there is no mention of mutability restrictions (or for any other function).

If you made these functions payable, and required that the value be 0.000001 ETH, it probably wouldn't be breaching the ERC-20 standard (as laid out by this document).

Related Topic