-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutxos.html
More file actions
174 lines (159 loc) · 15 KB
/
Copy pathutxos.html
File metadata and controls
174 lines (159 loc) · 15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<!DOCTYPE html>
<!-- SPDX-License-Identifier: AGPL-3.0-or-later | TestnetHub © 2026 Tech1k -->
<html lang="en" data-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Understanding UTXOs · TestnetHub</title>
<meta name="description" content="The UTXO model explained: how Bitcoin and Litecoin track balances as unspent outputs, what "change" really is, and why coin selection matters.">
<link rel="canonical" href="https://testnethub.com/utxos">
<meta name="robots" content="index, follow">
<meta name="referrer" content="no-referrer">
<meta name="theme-color" content="#14161b">
<meta name="author" content="Tech1k">
<meta property="og:type" content="article">
<meta property="og:site_name" content="TestnetHub">
<meta property="og:title" content="Understanding UTXOs · TestnetHub">
<meta property="og:description" content="The UTXO model explained: how Bitcoin and Litecoin track balances as unspent outputs, what "change" really is, and why coin selection matters.">
<meta property="og:url" content="https://testnethub.com/utxos">
<meta property="og:image" content="https://testnethub.com/assets/og.png?v=2">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="TestnetHub: learn crypto with fake coins and real protocols">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Understanding UTXOs · TestnetHub">
<meta name="twitter:description" content="The UTXO model explained: how Bitcoin and Litecoin track balances as unspent outputs, what "change" really is, and why coin selection matters.">
<meta name="twitter:image" content="https://testnethub.com/assets/og.png?v=2">
<link rel="icon" href="/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/assets/icon-192.png">
<link rel="manifest" href="/manifest.webmanifest">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; manifest-src 'self'; object-src 'none'; base-uri 'none'; form-action 'none'">
<script src="/assets/theme-init.js?v=1"></script>
<link rel="stylesheet" href="/assets/style.css?v=5">
<script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://testnethub.com/#org","name":"TestnetHub","url":"https://testnethub.com/","logo":"https://testnethub.com/favicon.svg"},{"@type":"WebSite","@id":"https://testnethub.com/#website","name":"TestnetHub","url":"https://testnethub.com/","publisher":{"@id":"https://testnethub.com/#org"},"description":"Learn the Bitcoin, Litecoin, and Monero testnets with free coins and real protocols."}]}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://testnethub.com/"},{"@type":"ListItem","position":2,"name":"Guides","item":"https://testnethub.com/guides"},{"@type":"ListItem","position":3,"name":"Understanding UTXOs","item":"https://testnethub.com/utxos"}]}</script>
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Understanding UTXOs","description":"The UTXO model explained: how Bitcoin and Litecoin track balances as unspent outputs, what \"change\" really is, and why coin selection matters.","inLanguage":"en","isPartOf":{"@id":"https://testnethub.com/#website"},"publisher":{"@id":"https://testnethub.com/#org"},"author":{"@id":"https://testnethub.com/#org"},"dateModified":"2026-08-07","mainEntityOfPage":"https://testnethub.com/utxos"}</script>
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<span id="copy-status" role="status" class="visually-hidden"></span>
<nav class="navbar">
<a href="/" class="brand" aria-label="TestnetHub home">
<svg class="brand-logo" viewBox="0 0 64 64" width="26" height="26" aria-hidden="true"><rect class="mark-bg" width="64" height="64" rx="14"/><g stroke="currentColor" stroke-width="3.4" stroke-linecap="round"><line x1="32" y1="32" x2="19" y2="19"/><line x1="32" y1="32" x2="45" y2="19"/><line x1="32" y1="32" x2="19" y2="45"/><line x1="32" y1="32" x2="45" y2="45"/></g><g fill="currentColor"><circle cx="19" cy="19" r="5"/><circle cx="45" cy="19" r="5"/><circle cx="19" cy="45" r="5"/><circle cx="45" cy="45" r="5"/><circle cx="32" cy="32" r="6.5"/></g></svg>
<span class="brand-name">Testnet<b>Hub</b></span>
</a>
<input type="checkbox" class="menu-toggle" id="menu-toggle" aria-label="Open the navigation menu" aria-controls="nav-links">
<label for="menu-toggle" class="hamburger"><div></div><div></div><div></div></label>
<div class="nav-links" id="nav-links">
<a href="/">Home</a>
<a href="/testnets">Testnets</a>
<a href="/guides">Guides</a>
<a href="/tools">Tools</a>
<a href="/status">Status</a>
<a href="/donate">Donate</a>
<button class="theme-toggle" id="theme-toggle" type="button" aria-label="Toggle light / dark theme" title="Toggle theme"><svg class="ico ico-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg><svg class="ico ico-moon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg></button>
</div>
</nav>
<main id="main" class="filled" tabindex="-1">
<p class="crumb"><a href="/guides">Guides</a> / Understanding UTXOs</p>
<div class="card hero">
<div class="card-body">
<h1><span class="grad">Understanding UTXOs</span></h1>
<p class="lede">Your Bitcoin or Litecoin balance isn't a number in an account. It's a pile of distinct coins called UTXOs. Once that clicks, change addresses, fees, and coin selection all make sense.</p>
</div>
</div>
<div class="toc">
<p class="toc-title">On this page</p>
<ul>
<li><a href="#model">The UTXO model</a></li>
<li><a href="#spending">Spending and change</a></li>
<li><a href="#selection">Coin selection & dust</a></li>
<li><a href="#contrast">Other models</a></li>
<li><a href="#practice">See it yourself</a></li>
</ul>
</div>
<div class="card"><div class="card-body prose">
<h2 id="model">The UTXO model <a class="anchor" tabindex="-1" href="#model" aria-hidden="true">#</a></h2>
<p><strong>UTXO</strong> stands for <em>Unspent Transaction Output</em>. Think of your wallet as holding a set of distinct coins and bills of different values, rather than one running total. Your "balance" is the sum of all the UTXOs you're able to spend. Each UTXO came from a previous transaction's output and hasn't been spent yet.</p>
<h2 id="spending">Spending and change <a class="anchor" tabindex="-1" href="#spending" aria-hidden="true">#</a></h2>
<p>The key rule: <strong>you must spend whole UTXOs.</strong> You can't shave a piece off one. So to pay someone 0.3 from a single 1.0 UTXO, your wallet consumes the entire 1.0 and creates new outputs:</p>
<div class="table-wrap"><table>
<thead><tr><th scope="col">Input (spent)</th><th scope="col">Outputs (created)</th></tr></thead>
<tbody>
<tr><th scope="row">1.0 UTXO</th><td>0.3 to the recipient<br>~0.7 back to you as <strong>change</strong><br>the small remainder is the <a href="/fees">fee</a></td></tr>
</tbody>
</table></div>
<p>That 0.7 goes to a <strong>change address</strong> your wallet controls. It's not lost, just a new UTXO belonging to you. This works like paying for a $3 item with a $10 bill and getting change back.</p>
<figure class="diagram">
<svg viewBox="0 0 560 250" role="img" aria-label="A transaction spends two input UTXOs and produces a payment output and a change output, with a fee to the miner" xmlns="http://www.w3.org/2000/svg">
<defs><marker id="ar1" markerWidth="9" markerHeight="9" refX="7" refY="4.5" orient="auto"><path d="M0 0 L9 4.5 L0 9 z" style="fill:var(--muted)"/></marker></defs>
<text x="83" y="24" style="font:600 12px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">INPUTS (you spend)</text>
<text x="477" y="24" style="font:600 12px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">OUTPUTS</text>
<rect x="8" y="42" width="150" height="56" rx="8" style="fill:var(--accent-bg);stroke:var(--accent);stroke-width:1.5"/>
<text x="83" y="68" style="font:700 15px ui-sans-serif,system-ui,sans-serif;fill:var(--text);text-anchor:middle">0.60 tBTC</text>
<text x="83" y="86" style="font:400 11px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">a coin you own</text>
<rect x="8" y="130" width="150" height="56" rx="8" style="fill:var(--accent-bg);stroke:var(--accent);stroke-width:1.5"/>
<text x="83" y="156" style="font:700 15px ui-sans-serif,system-ui,sans-serif;fill:var(--text);text-anchor:middle">0.50 tBTC</text>
<text x="83" y="174" style="font:400 11px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">a coin you own</text>
<rect x="232" y="86" width="96" height="60" rx="8" style="fill:var(--surface);stroke:var(--border2);stroke-width:1.5"/>
<text x="280" y="112" style="font:700 13px ui-sans-serif,system-ui,sans-serif;fill:var(--text);text-anchor:middle">one</text>
<text x="280" y="130" style="font:700 13px ui-sans-serif,system-ui,sans-serif;fill:var(--text);text-anchor:middle">transaction</text>
<line x1="158" y1="70" x2="228" y2="104" style="stroke:var(--muted);stroke-width:2" marker-end="url(#ar1)"/>
<line x1="158" y1="158" x2="228" y2="128" style="stroke:var(--muted);stroke-width:2" marker-end="url(#ar1)"/>
<rect x="402" y="42" width="150" height="56" rx="8" style="fill:var(--surface);stroke:var(--border2);stroke-width:1.5"/>
<text x="477" y="68" style="font:700 15px ui-sans-serif,system-ui,sans-serif;fill:var(--text);text-anchor:middle">0.80 tBTC</text>
<text x="477" y="86" style="font:400 11px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">payment to someone</text>
<rect x="402" y="130" width="150" height="56" rx="8" style="fill:var(--surface);stroke:var(--accent);stroke-width:1.5"/>
<text x="477" y="156" style="font:700 15px ui-sans-serif,system-ui,sans-serif;fill:var(--text);text-anchor:middle">0.29 tBTC</text>
<text x="477" y="174" style="font:400 11px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">change, back to you</text>
<line x1="328" y1="104" x2="400" y2="70" style="stroke:var(--muted);stroke-width:2" marker-end="url(#ar1)"/>
<line x1="328" y1="128" x2="400" y2="158" style="stroke:var(--muted);stroke-width:2" marker-end="url(#ar1)"/>
<text x="280" y="170" style="font:400 11px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">fee 0.01</text>
<text x="280" y="234" style="font:600 12px ui-sans-serif,system-ui,sans-serif;fill:var(--muted);text-anchor:middle">1.10 in = 1.09 out + 0.01 fee</text>
</svg>
<figcaption>One transaction spends whole UTXOs and creates new ones: a payment, your change, and the fee. Inputs always equal outputs plus fee.</figcaption>
</figure>
<h2 id="selection">Coin selection & dust <a class="anchor" tabindex="-1" href="#selection" aria-hidden="true">#</a></h2>
<p>When you spend, your wallet does <strong>coin selection</strong>: it picks which UTXOs to combine to cover the amount. More inputs mean a bigger transaction, which means a higher <a href="/fees">fee</a>. Very tiny UTXOs are called <strong>dust</strong>: so small that spending them would cost more in fees than they're worth.</p>
<h2 id="contrast">Other models <a class="anchor" tabindex="-1" href="#contrast" aria-hidden="true">#</a></h2>
<p>Not every chain works this way. Ethereum-style chains use an <strong>account model</strong>, one balance that goes up and down, like a bank account. Monero also uses outputs, but hides them with ring signatures and stealth addresses, so you can't see the individual coins the way you can on Bitcoin. See the <a href="/monero">Monero guide</a>.</p>
<h2 id="practice">See it yourself <a class="anchor" tabindex="-1" href="#practice" aria-hidden="true">#</a></h2>
<p>Testnet is perfect for this. Send a payment, then open the transaction on <a href="/explorer">TestnetScan</a> and spot the recipient output and the change output side by side. It's the same machinery behind <a href="/broadcast-raw-tx">raw transactions</a>.</p>
</div></div>
<div class="warnbox">
<span class="wb-ico" aria-hidden="true">⚠️</span>
<div class="wb-body">
<h3>Testnet coins are fake money</h3>
<ul>
<li>They have no market value, so never buy or sell them.</li>
<li>Never use a real seed phrase or import a real wallet on testnet.</li>
<li>Never send mainnet BTC, LTC, or XMR to a testnet address.</li>
</ul>
</div>
</div>
<div class="pagenav">
<a href="/fees"><div class="pn-dir">← Previous</div><div class="pn-t">How fees work</div></a>
<a class="pn-next" href="/why-no-value"><div class="pn-dir">Next →</div><div class="pn-t">Why testnet coins have no value</div></a>
</div>
</main>
<footer>
<div class="foot-inner">
<a class="ext" href="https://cypherfaucet.com" target="_blank" rel="noopener">Faucet</a>
<a class="ext" href="https://testnetpool.com" target="_blank" rel="noopener">Pool</a>
<a class="ext" href="https://testnetwallet.net" target="_blank" rel="noopener">Wallet</a>
<a class="ext" href="https://testnetscan.com" target="_blank" rel="noopener">Explorer</a>
<a class="ext" href="https://testnetswap.com" target="_blank" rel="noopener">Swap</a>
<a href="/guides">Guides</a>
<a href="/status">Status</a>
<a href="/donate">Donate</a>
<span class="faint">·</span>
<span>Part of the <a class="ext" href="https://tech1k.com" target="_blank" rel="noopener">Tech1k</a> testnet ecosystem</span>
<span class="faint">·</span>
<a class="ext" href="https://github.com/Tech1k/testnethub.com" target="_blank" rel="noopener">Source</a>
<a class="ext" href="https://github.com/Tech1k/testnethub.com/blob/HEAD/LICENSE" target="_blank" rel="noopener">Code AGPL-3.0</a>
<a class="ext" href="https://github.com/Tech1k/testnethub.com/blob/HEAD/LICENSE-CONTENT" target="_blank" rel="noopener">Content CC-BY-SA-4.0</a>
<span class="faint">· testnet only · coins have no value</span>
</div>
</footer>
</body>
</html>