Isn't 0x0000000000000000000000000000000000000000
a burn address where no one has private key? If that is the case, how can this address send tokens to other addresses? If you look at Etherscan's ERC-20 Token tab, there is a lot of OUT records: https://etherscan.io/address/0x0000000000000000000000000000000000000000#tokentxns
2 Answers
Per the ERC20 standard, newly created ERC20 tokens are sent from 0x0000000000000000000000000000000000000000
to the address they are meant to be sent to. It was done as a way of logging and to avoid creating tokens out of nothing.
Update
The ERC20 standard does not actually define that the tokens are sent from 0x0000000000000000000000000000000000000000
. Tokens are created simply by adding to the balances
mapping of the desired user, emitting a Transfer()
event, and adding that value to the _totalSupply
.
While it is not defined in the standard, it is best practice to emit a Transfer()
event with 0x0
as an address when creating tokens. It allows front-end clients to read events and display data based on this event. From this post:
This is done that way so block explorers and wallets that only interpret the 'Transfer' event can show the operation to the user. There were some complaint from users that the transfer failed because it didn't show up in their wallet (or block explorer).
Only the 'Transfer' event is part of the ERC20 standard, and the events 'Mint' and 'Burn' are not. It is a workaround around that limitation to generate a transfer from 0x0 to simulate a 'Mint' event and, a transfer to 0x0 to simulate a 'Burn' event.
Each of those transactions you see on the page you linked are Etherscan's representation of a token creation.
To add to this point, take a look at any address that has transferred an ERC20 token elsewhere. If you click on the "ERC20 Token Tx" tab, you will see transactions that send tokens from one user to another. What is actually happening is a transaction from the sender to the token contract, which reduces the sender's balances
mapping, adds to the receiver's balances
mapping, and emits a Transfer()
event. What you see on that tab is simply Etherscan reading of the Transfer()
events of tokens.
-
1I don't see that anywhere in the standard, could you give a direct quote? Oct 24, 2018 at 1:42
-
It is actually not there. The interaction with
0x0
is actually used in theTransfer()
event when creating the token. I have updated the answer accordingly. Oct 24, 2018 at 2:38 -
1When creating the initial supply
Transfer()
may or may not be used. Tokens I have created do not use it. The event is mainly for EtherScan and other block explorer support, in the absense of standard mint and burn events. Oct 24, 2018 at 8:22
Additionally, you can find transactions of certain tokens from addresses that could not possibly send them by emitting bogus Transfer events to fool etherscan into recognising it as a token transfer. These are not even real tokens.
Etherscan flags these as "SPAM tokens" once they are notified of it.