<p>I've read that calculating how much Bitcoin you have in your wallet is going through the ledger and computing who has given Bitcoins to you and who you have given Bitcoins to.  Correct me if this statement is wrong.  So when a miner mines a block and earns Bitcoins, who is giving them to him (i.e. what does the transaction look like on the ledger)?  Is each Bitcoin some kind of unique identifier (like a number)?  If that's true, what's to prevent someone else from stealing his Bitcoins by figuring out what this identifier is?</p>

CC BY-SA 3.0
2018-01-04T22:42:09.903Z
Look up "coinbase transaction".  It's like any other transaction except that it has no inputs, so effectively it lets the miner spend coins that didn't previously exist.  Nobody is giving them to him.
Nate Eldredge
CC BY-SA 3.0
2018-01-04T22:56:42.783Z
If nobody is giving the miner coins (which makes sense) then where are they coming from?
Dave
CC BY-SA 3.0
2018-01-04T23:15:28.457Z
They do not come from anywhere.  A coin isn't a "thing"; this is just an analogy which breaks down when you look at how the implementation actually works.  A block with a valid proof-of-work is allowed by the Bitcoin protocol to contain a transaction which pays the miner with coins that didn't come from any previous transaction.  Since everyone follows the protocol and accepts this transaction as valid, it effectively gives the miner new coins.  They didn't used to exist and now they do.
Nate Eldredge
CC BY-SA 3.0
2018-01-04T23:18:09.980Z
Oh ok, I didn't realize the block itself contained a transaction.  So does that mean when the miner mines the block there is somethign in there that identifies him so taht it is clear who owns the bitcoins given as the reward?
Dave
CC BY-SA 3.0
2018-01-04T23:21:54.557Z
Yep, the coinbase transaction has one or more destination addresses just like any other transaction.  (Or more precisely, it has outputs that follow the same rules as for normal transactions, so it can pay out coins in all the same ways that someone could pay out coins they already held.)  A solo miner would set this to be an address that belongs to him; a pool might set it to a list of addresses corresponding to pool members who are owed payouts, each with an output value corresponding to what they are owed.
Nate Eldredge
CC BY-SA 3.0
2018-01-04T23:39:59.047Z
Good deal, thx Nate.  I upvoted your comment .
Dave
<blockchain><block><mining-theory><mining-reward>
Who actually gives the miner his Bitcoin reward?
Dave
# Who actually gives the miner his Bitcoin reward?

(Asked by: username_0 on 2018-01-04)

I've read that calculating how much Bitcoin you have in your wallet is going through the ledger and computing who has given Bitcoins to you and who you have given Bitcoins to. Correct me if this statement is wrong. So when a miner mines a block and earns Bitcoins, who is giving them to him (i.e. what does the transaction look like on the ledger)? Is each Bitcoin some kind of unique identifier (like a number)? If that's true, what's to prevent someone else from stealing his Bitcoins by figuring out what this identifier is?

**Tags:** blockchain, block, mining-theory, mining-reward

> **Comments:**
> **username_1**: Look up "coinbase transaction".  It's like any other transaction except that it has no inputs, so effectively it lets the miner spend coins that didn't previously exist.  Nobody is giving them to him.  
> **username_0**: If nobody is giving the miner coins (which makes sense) then where are they coming from?  
> **username_1**: They do not come from anywhere.  A coin isn't a "thing"; this is just an analogy which breaks down when you look at how the implementation actually works.  A block with a valid proof-of-work is allowed by the Bitcoin protocol to contain a transaction which pays the miner with coins that didn't come from any previous transaction.  Since everyone follows the protocol and accepts this transaction as valid, it effectively gives the miner new coins.  They didn't used to exist and now they do.  
> **username_0**: Oh ok, I didn't realize the block itself contained a transaction.  So does that mean when the miner mines the block there is somethign in there that identifies him so taht it is clear who owns the bitcoins given as the reward?  
> **username_1**: Yep, the coinbase transaction has one or more destination addresses just like any other transaction.  (Or more precisely, it has outputs that follow the same rules as for normal transactions, so it can pay out coins in all the same ways that someone could pay out coins they already held.)  A solo miner would set this to be an address that belongs to him; a pool might set it to a list of addresses corresponding to pool members who are owed payouts, each with an output value corresponding to what they are owed.  
> **username_0**: Good deal, thx username_1.  I upvoted your comment .  

---

## 0 answers

