Crypto ELI8: UTXO

Understanding Unspent Transaction Outputs

moreReese
5 min readDec 8, 2020

The Crypto ELI8, or Explain Like I’m Eight, series is for anyone who wants to learn about the exciting world of cryptocurrency. Each post is organized around a specific term, concept, question, or other topic related to crypto.

For more on what the series is and a full list of posts check out this series guide.

************************************************************

Sorry to disappoint, but UTXOs don’t have anything to do with hugs n’ kisses in Utah. Rather, they’re the building blocks that ultimately make up your bitcoin balance. Although they can be confusing at first, it’s important to understand them because they’re key to understanding bitcoin transactions. Admittedly, this post gets a little technical but stick with it! By the end, you’ll be well on your way to knowing the ins and outs of bitcoin transactions and balances.

Imagine this…

You’re at the coolest theme park in the world. Let’s call it Awesomeness Town. It has everything you could ever want in a theme park — roller coasters, water slides, carnival and arcade games, toys, plus stands for every type of food you can imagine.

Another reason Awesomeness Town is so cool is because it gives kids free Awesome Bucks on their birthday. Awesome Bucks are what you use to pay for stuff in the park. There are two types of Awesome Bucks: BigOnes and Bits. 1 BigOne is equal to 2 Bits.

1 BigOne = 2 Bits

Since it’s your birthday, you get 10 BigOnes at the entrance gate. That means you have equivalent to 20 Bits.

Your first stop is the pizza stand because you haven’t eaten lunch yet. There’s a pizza & soda special for 1 Bit so you get a slice of pepperoni pizza and a root beer. Since you only have BigOnes in your pocket, you give the worker 1 BigOne and they give you 1 Bit in change.

Now, you have 9.5 BigOnes, or 19 Bits.

After lunch, your next stop is Bulls n’ Bears, the tallest roller coaster in the world! It’s the most popular ride in the park and the line is over a 2 hour wait. Fortunately, there’s an express lane to skip the line. It costs 3 Bits to take the express lane plus 3 more Bits to ride the roller coaster. That’s 6 Bits total, or 3 BigOnes. Since you have 3 BigOnes in your pocket, you give exact change to the line attendant and run to the front of the line.

Now, you have 6.5 BigOnes, or 13 Bits.

Turns out eating lunch right before riding the biggest roller coaster in the world wasn’t the best idea and you feel sick. You decide to take it easy on the rides and spend the rest of your day in the game park. There are all sorts of games with all sorts of prizes. Some games cost as much as 2 BigOnes while others cost as little as 1 Bit.

Whenever you can’t pay with the exact amount, the worker gives you 1 Bit in change. The games are so much fun that you end up spending the rest of the day in the game park. When you’re all gamed-out, you have 5 Bits in your pocket.

Now, you have 2.5 BigOnes, or 5 Bits.

After such a fun birthday, you are exhausted and ready to call it a day. You make one last stop at the toy store. Since you’re an awesome older sibling, you decide to use the rest of your Awesome Bucks to buy your younger brother a giant stuffed dinosaur, since dinosaurs are his favorite animal. It costs 2.5 BigOnes exactly! You hand the rest of your Awesomeness Bucks over to the cashier and leave with the surprise for your brother!

So, what’s a UTXO?

A UTXO is sort of like the Bits you put back in your pocket each time you couldn’t pay for something with the exact amount. A UTXO is similar to the change you get when you pay for something at a store in real life.

UTXOs, or unspent transaction outputs, are similar to the change you receive when making a transaction in cash. Image credit: Tbel Abuseridze. Source: unsplash.com

UTXO stands for “Unspent Transaction Output”. In cryptocurrency, transactions happen anytime you send or receive crypto. Transactions consist of inputs and outputs and they always involve a sender and receiver. The sender’s input amount is equal to the sender’s output amount.* However, sometimes the sender’s output amount is equal to the receiver’s input amount and other times it’s not. UTXO’s happen when it’s not.

always true…

sender’s input = sender’s output

sometimes true…

sender’s output = receiver’s input

A simple way to think about it is there are two types of transactions: type A and type B.

Type A transactions are when the amount sent is exactly equal to the amount received. Another way to say it is that the sender’s output is equal to the receiver’s input. It’s like paying with exact change.

in a type A transaction…

sender’s output = receiver’s input

Type B transactions are when the amount sent is more than the amount received. Another way to say it is that the sender’s output is greater than the receiver’s input. The difference between the amount sent and received is the UTXO, or “change” the sender gets back.

in a type B transaction…

sender’s output > receiver’s input

UTXO = sender’s output — receiver’s input

UTXOs in Awesomeness Town

If this hasn’t fully clicked, let’s use the example from Awesomeness Town. Every time you paid for a ride, game, or food you made a transaction. BigOnes and Bits were the transaction inputs and outputs. Since you were the one paying, you were the sender and the workers were the receiver. You made both types of transactions.

When you paid to ride Bulls n’ Bears or for the stuffed dinosaur, you made a type A transaction because you paid with exact change. In this case, there was no UTXO. But when you got change, like you did when you paid for pizza or games, you made a type B transaction. You can think about a UTXO as your change in Bits.

Summary

Cryptocurrency transactions consist of inputs and outputs. Both are closely related to one another; the sender’s total input is always equal to the total output.* UTXOs, or “Unspent Transaction Outputs”, are like the change the sender gets back when their input/output amount is greater than the amount paid to the receiver.

UTXO = sender’s output — receiver’s input

*For simplicity, this description does not include transaction fees.

--

--