Maybe this is just part of being so new to this Bitcoin thing, or because I am using lightning for all my stuff instead of the blockchain, but I have no idea what the fuck a UTXO is. 😅

Reply to this note

Please Login to reply.

Discussion

Unspent sats as I understand it.

UTXO, or Unspent Transaction Output, is a fundamental concept in Bitcoin and the Lightning Network. It refers to the amount of Bitcoin that has been sent to a specific address but has not yet been spent. UTXOs are created when a Bitcoin transaction is broadcast and confirmed on the blockchain. Each UTXO has a unique identifier, which is used to track its ownership.

In the Lightning Network, UTXOs are used to open and close payment channels. When two parties open a channel, they each lock up a certain amount of Bitcoin in a multi-signature address. This address is controlled by both parties, and neither party can spend the Bitcoin without the other's consent.

Once a channel is open, the parties can make payments to each other by exchanging state updates. These state updates are off-chain, meaning that they are not broadcast to the Bitcoin blockchain. This allows the parties to make payments to each other very quickly and cheaply.

When the parties want to close their channel, they exchange their final state updates and broadcast a closing transaction to the blockchain. This transaction closes the channel and returns the Bitcoin to each party's on-chain wallet.

UTXOs play an important role in the Lightning Network because they provide security and flexibility. For example, if one party in a channel goes offline, the other party can still close the channel and recover their Bitcoin. Additionally, UTXOs can be used to create complex payment routes that allow users to make payments to anyone on the Lightning Network, even if they do not have a direct channel with that person.

Here is an example of how UTXOs are used in the Lightning Network:

Alice and Bob want to open a Lightning channel.

Alice creates a UTXO for 1 BTC and sends it to a multi-signature address controlled by herself and Bob.

Bob creates a UTXO for 1 BTC and sends it to the same multi-signature address.

The channel is now open and Alice and Bob can make payments to each other by exchanging state updates.

Alice wants to send 0.5 BTC to Carol.

Alice finds a route to Carol that includes a channel she has with Bob.

Alice sends a state update to Bob, instructing him to send 0.5 BTC to Carol.

Bob updates his state accordingly and sends 0.5 BTC to Carol.

Carol receives the payment and updates her state accordingly.

The payment is now complete and Carol has received 0.5 BTC from Alice.

UTXOs are an essential part of the Lightning Network and they play a vital role in making it a fast, cheap, and secure way to make Bitcoin payments.

I don't think I ever had to open any "lightning channels". Is that something that Alby is doing for me, and I just never realized it?

Yes magic internet money

Yeah Alby does that for you. Most people don't need to know how the sausage is made 😂

You can kind of look at lightning wallet as a checking account and the blockchain as a savings account.

That assumes there's something I would spend it on, besides zaps.

Maybe I need to look into setting up something on the blockchain for savings...

Yes, best practice is to consolidate relatively large amounts of BTC into one transaction/UTXO in a cold wallet. A cold wallet being a dedicated device or computer that is not necessarily always online and is used less often than a lightning wallet for on-chain transactions. Unlike a lightning wallet which are always online and are considered hot wallets with lower security and more risk of loss of funds.

Think of it like a dollar bill in your wallet. Some are bigger like $20, $50 while others are smaller $1, $5.

Bitcoin has the same thing, except digitally. To pay for a 0.1 BTC item, you pay with 1 BTC but get 0.9 BTC back as change. You now have a 0.9 BTC UTXO (Unspent Transaction Output). Your digital wallet sums up all the UTXOs in your wallet in order to show your balance, but in truth they are distinct.

The fee for making a transaction in bitcoin is based on the data usage and the more UTXOs involved, the more data used. So, right now people are spending their small UTXOs into a payment to themselves to combine their $1 bills into $100 bills.

It’s like the change you receive in a physical store.

Say you buy smth worth $6,45. And you pay with a $10 note. You’ll receive $3,55 back. That $3,55 is the UTXO, at least I think so

Incorrect

Enlighten me then?

In your example both the beginning amount and the remainder are UTXOs. Not just the remainder. Of course, she would only be able to spend the remaining UTXO which is generally called change or a UTXO sent to change address. All BTC on-chain are UTXOs.

It's better to think of it as a ledger or a flow chart where the earlier transactions are completely consumed/crossed out after being spent.

What he said