user80416: I was looking at bitcoin rich list and found binance cold wallet
For this transaction in particular https://www.blockchain.com/btc/tx/afb6523e4f5f060a076dcc2f8e5eb7a1aa58a3831456c62da946e2b5a41c24f0 whats going on under the hood? Why is the same address 8 times as input with different balances(?) number ?
Thanks

user60443: Bitcoin uses a UTXO (unspent transaction output) model for transactions, see here for why. This means each time you spend a coin you create an output that is assigned to an address (or multiple outputs to different addresses), and those outputs must references previous unspent outputs to your address. You have to spend all of the coins from the utxo, so usually there is a change output that goes back to the original owner (usually a different address that they own, for privacy reasons).

Because each output of a particular transaction can only be spent
  once, the outputs of all transactions included in the block chain can
  be categorized as either Unspent Transaction Outputs (UTXOs) or spent
  transaction outputs. For a payment to be valid, it must only use UTXOs
  as inputs. - https://bitcoin.org/en/developer-guide#block-chain-overview

You are seeing many unspent outputs on the left that the address 16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe is using to add up to the values on the right that it wants to send.


user63872: Bitcoin keeps track of coins by 'unspent output' (UTXO), not by 'address balance'. There is no such thing as an 'address balance' at the detailed technical level (though you can use the blockchain data to figure out what an 'address balance' might be. Most blockchain explorers display this info according to 'address balance', so it is easy to get confused at first).
When someone sends you some bitcoin, they will create a transaction output that specifies your address as the new owner of those coins. Think of this output (a newly formed UTXO) as a physical coin you have received. 
Now, lets pretend you have received 8 transactions, so you have 8 physical coins in your pocket. Those coins may all exist at the same address, but in order to spend them, you must pull all 8 coins out of your pocket. Despite existing at the same address, the coins have not joined together into one coin, they are still individual coins (UTXOs), and thus must be individually specified in your transaction.
This is why that transaction makes a payment by using 8 different UTXOs that all exist at the same address. A transaction must specify each UTXO you want to spend, not each address' balance. 

80416: <p>I was looking at bitcoin rich list and found binance cold wallet</p>

<p>For this transaction in particular <a href="https://www.blockchain.com/btc/tx/afb6523e4f5f060a076dcc2f8e5eb7a1aa58a3831456c62da946e2b5a41c24f0" rel="nofollow noreferrer">https://www.blockchain.com/btc/tx/afb6523e4f5f060a076dcc2f8e5eb7a1aa58a3831456c62da946e2b5a41c24f0</a> whats going on under the hood? Why is the same address 8 times as input with different balances(?) number ?</p>

<p>Thanks</p>
 60443: <p>Bitcoin uses a <strong>UTXO</strong> (unspent transaction output) model for transactions, see <a href="https://bitcoin.stackexchange.com/questions/49853/utxo-model-vs-account-balance-model">here for why</a>. This means each time you spend a coin you create an output that is assigned to an address (or multiple outputs to different addresses), and those outputs must references previous unspent outputs to your address. You have to spend all of the coins from the utxo, so usually there is a change output that goes back to the original owner (usually a different address that they own, for privacy reasons).</p>

<blockquote>
  <p>Because each output of a particular transaction can only be spent
  once, the outputs of all transactions included in the block chain can
  be categorized as either Unspent Transaction Outputs (UTXOs) or spent
  transaction outputs. For a payment to be valid, it must only use UTXOs
  as inputs. - <a href="https://bitcoin.org/en/developer-guide#block-chain-overview" rel="nofollow noreferrer">https://bitcoin.org/en/developer-guide#block-chain-overview</a></p>
</blockquote>

<p>You are seeing many unspent outputs on the left that the address <code>16ftSEQ4ctQFDtVZiUBusQUjRrGhM3JYwe</code> is using to add up to the values on the right that it wants to send.</p>

<p><a href="https://i.stack.imgur.com/AdPDk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AdPDk.png" alt="screenshot"></a></p>
 63872: <p>Bitcoin keeps track of coins by 'unspent output' (UTXO), not by 'address balance'. There is no such thing as an 'address balance' at the detailed technical level (though you can use the blockchain data to figure out what an 'address balance' might be. Most blockchain explorers display this info according to 'address balance', so it is easy to get confused at first).</p>

<p>When someone sends you some bitcoin, they will create a transaction output that specifies your address as the new owner of those coins. <strong>Think of this output (a newly formed UTXO) as a physical coin you have received</strong>. </p>

<p>Now, lets pretend you have received 8 transactions, so you have 8 physical coins in your pocket. Those coins may all exist at the same address, but in order to spend them, <strong>you must pull all 8 coins out of your pocket</strong>. Despite existing at the same address, the coins have not joined together into one coin, they are still individual coins (UTXOs), and thus must be individually specified in your transaction.</p>

<p>This is why that transaction makes a payment by using 8 different UTXOs that all exist at the same address. A transaction must specify each UTXO you want to spend, not each address' balance. </p>
