What is '0x0' address in Solidity (Ethereum)?
Asked Answered
S

1

6

I'm studying solidity programming, and I have a question on this line of code:

Transfer(0x0,msg.sender,tokens);

I don't understand what 0x0 means. Is it the new token address or is it the new smart contract's address?

Simoniac answered 29/5, 2018 at 9:23 Comment(3)
ransfer(0x0,msg.sender,tokens); => Transfer(0x0,msg.sender,tokens); Sorry to miss it.Simoniac
You can edit the question if you want.Arian
Check this answer: ethereum.stackexchange.com/a/18427Schoening
S
16

0x0 is essentially a black hole of an address. Ether funds go in, none come out (kind of like a marriage!). It's an abbreviation for the genesis address 0x0000000000000000000000000000000000000000, which with almost absolute certainty nobody has the private key for, so it can't be spent. Note that tokens like ERC20 can be transferred OUT depending on the contract, but not Ether.

Amusingly/tragically a lot of people screw up and send money here by accident.

In your case, it looks like the contract is trying to send money to this address. Apparently, there's some use cases for this called "proof of burn" which I guess means that you can send ether? I don't quite understand that as it's literally taking Ether out of circulation.

Other cases can be for using it as a large amount for an address for comparison. Example is your_ETH_balance < 0x0 (Is probably TRUE).

Currently, 0x0 has 7251 ether (and growing since I started typing). Today's trading puts it worth about $4.2 million, so it'd be one of the more valuable addresses to crack if you happen to have a functional quantum computer (which you don't).

Settlement answered 31/5, 2018 at 20:13 Comment(7)
kind of like a marriage xDStarcrossed
15 months since my original answer, 0x0 has increased by 528 Ether, however due to the price reduction, the current balance in USD is ONLY $1.714 million. Also amusing if you look on EtherScan comments, you'll see people still continue to make donation requests. "Please help me, I am from xyz... my ether address is... "Settlement
Checking back in on this post over three years later... the total burned ETH lost to this address is now valued at $16 million, with an additional 1 million in other tokens. 😳Settlement
"which you don't" you don't know meSuperload
@JakeSmith $18,815,443 says you don't....Settlement
@Settlement touche ;-)Superload
It's been 2 years since last comment (six since original post) and it's always fun to check back in on stats which are: Total USD blundered by folks not realizing that this is a black hole of an address (aka MARRIAGE and thanks for the likes ☻) is... $41.5 MILLION with ETH balance of 13,370 ........... log your predictions for 2027 when reviewed again.... I say $60 mil?Settlement

© 2022 - 2024 — McMap. All rights reserved.