[Ethereum] ERC20 Transaction Fee – setFeeCurrency

feestransactions

Hi i now read everywhere that a transaction fee has to be paid in ETH.

But I also found via the ethereum page the following page:

https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs#data-feeds

where it says

setFeeCurrency

setFeeCurrency(address _feeCurrency)

Sets the currency that the fee is paid in

The latter two methods are optional; also, note that the fee may be
charged either in ether or subcurrency;

So is it finally possible to create an ERC20 Token that is able to transfer its tokes and is paid in the token itself? If so, is there an example contract somewhere or do I just have to add it into the constructor? If so what exactly has to be the _feeCurrency variable? The AdminAddress of the contract?

Best Answer

Transaction fee on Ethereum is called Gas and is paid to the miners for the processing power they spent on the function call, here being ERC20 transfer(). Tokens on miner's level don't have any value and does not mean anything, rather than just a state change in a smart contract. Gas can only be the same coin/token that the blockchain is using to incentivize the miners, so here on Ethereum blockchain Gas is Ether.

To understand more of this concept you can read here: https://ethereum.stackexchange.com/a/62/3157