<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kschieck</id>
	<title>Bitcoin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.bitcoin.it/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Kschieck"/>
	<link rel="alternate" type="text/html" href="https://en.bitcoin.it/wiki/Special:Contributions/Kschieck"/>
	<updated>2026-04-28T01:14:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Lightning_Network&amp;diff=69371</id>
		<title>Lightning Network</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Lightning_Network&amp;diff=69371"/>
		<updated>2022-07-13T00:24:47Z</updated>

		<summary type="html">&lt;p&gt;Kschieck: Update &amp;quot;see also&amp;quot; link for lightning lab&amp;#039;s list of resources, as it seems it was moved.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Lightning Network&#039;&#039;&#039; is a proposed implementation of [[Hashed Timelock Contracts]] (HTLCs) with bi-directional [[payment channels]] which allows payments to be securely routed across multiple peer-to-peer payment channels.&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;&amp;gt;[https://lightning.network/lightning-network-paper.pdf Lightning Network paper, v0.5.9.1]&amp;lt;br&amp;gt;Joseph Poon &amp;amp; Thaddeus Dryja&amp;lt;br&amp;gt;&#039;&#039;Retrieved 2016-04-10&#039;&#039;&amp;lt;/ref&amp;gt;  This allows the formation of a network where any peer on the network can pay any other peer even if they don&#039;t directly have a channel open between each other. As of March 2019, there were more than 37,000 channels carrying more than 764 bitcoins.&amp;lt;ref name=&amp;quot;p2sh_data&amp;quot;&amp;gt;[https://p2sh.info/dashboard/db/lightning-network?orgId=1&amp;amp;from=1514764800000&amp;amp;to=1550915801588 Lightning Network - Sum of channels value]&amp;lt;br&amp;gt;Lightning Network - Sum of channels value&amp;lt;br&amp;gt;&#039;&#039;Retrieved 2019-03-08&#039;&#039;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Key features == &lt;br /&gt;
Key features of the Lightning Network proposal include,&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Rapid payments:&#039;&#039;&#039; payments within an established channel can be made almost as fast as data can travel over the Internet between the two peers.&lt;br /&gt;
* &#039;&#039;&#039;No third-party trust:&#039;&#039;&#039; the two peers in a channel pay each other directly using regular Bitcoin transactions (of which only one is broadcast) so at no point does any third party control their funds.&lt;br /&gt;
* &#039;&#039;&#039;Reduced blockchain load:&#039;&#039;&#039; only channel open transactions, channel close transactions, and (hopefully infrequent) anti-fraud respends need to be committed to the blockchain, allowing all other payments within Lightning Network channels to remain uncommitted.  This allows Lightning Network users to make frequent payments secured by Bitcoin without placing excessive load on full nodes which must process every transaction on the blockchain.&lt;br /&gt;
* &#039;&#039;&#039;Channels can stay open indefinitely:&#039;&#039;&#039; as long as the two parties in the channel continue to cooperate with each other, the channel can stay open indefinitely -- there is no mandatory timeout period.  This can further reduce the load on the blockchain as well as allow the fees for opening and closing the channel to be amortized over a longer period of time.&lt;br /&gt;
* &#039;&#039;&#039;Rapid cooperative closes:&#039;&#039;&#039; if both parties cooperate, a channel can be closed immediately (with the parties likely wanting to wait for one or more confirmations to ensure the channel closed in the correct state). Non-cooperative closes (such as when one party disappears) are also possible but they take longer.&lt;br /&gt;
* &#039;&#039;&#039;Outsourceable enforcement:&#039;&#039;&#039; if one party closes a channel in an old state in an attempt to steal money, the other party has to act within a defined period of time to block the attempted theft.  This function can be outsourced to a third-party without giving them control over any funds, allowing wallets to safely go offline for periods longer than the defined period.&lt;br /&gt;
* &#039;&#039;&#039;Onion-style routing:&#039;&#039;&#039; payment routing information can be encrypted in a nested fashion so that intermediary nodes only know who they received a routable payment from and who to send it to next, preventing those intermediary nodes from knowing who the originator or destination is (provided the intermediaries didn&#039;t compare records).&lt;br /&gt;
* &#039;&#039;&#039;Multisignature capable:&#039;&#039;&#039; each party can require that their payments into the channel be signed by multiple keys&amp;lt;ref name=&amp;quot;poon_multisig&amp;quot;&amp;gt;[https://lists.linuxfoundation.org/pipermail/lightning-dev/2016-January/000403.html 2-of-3 Instant Escrow, or How to Do &amp;quot;2-of-3 Multisig Contract&amp;quot; Equivalent on Lightning]&amp;lt;br&amp;gt;Joseph Poon&amp;lt;br&amp;gt;&#039;&#039;Retrieved 2016-04-11&#039;&#039;&amp;lt;/ref&amp;gt;, giving them access to additional security techniques.&lt;br /&gt;
* &#039;&#039;&#039;Securely cross blockchains:&#039;&#039;&#039; payments can be routed across more than one blockchain (including altcoins and sidechains) as long as all the chains support the same hash function to use for the hash lock, as well as the ability to create time locks.&lt;br /&gt;
* &#039;&#039;&#039;Sub-satoshi payments:&#039;&#039;&#039; payments can be made conditional upon the outcome of a random event, allowing probabilistic payments.&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt;  For example, Alice can pay Bob 0.1 satoshi by creating a 1-satoshi payment with 10-to-1 odds so that 90% of the time she does this she pays him 0 satoshis and 10% of the time she pays him 1 satoshi for an average payment of 0.1 satoshis.&lt;br /&gt;
* &#039;&#039;&#039;Single-funded channels:&#039;&#039;&#039; when Alice needs to send a payment to Bob and doesn&#039;t currently have a way to pay him through the Lightning Network (whether because she can&#039;t reach him or because she doesn&#039;t have enough money in an existing channel), she can make a regular on-chain payment that establishes a channel without Bob needing to add any of his funds to the channel. Alice only uses 12 bytes more than she would for a non-Lightning direct payment and Bob would only need about 25 more [[segwit]] virtual bytes to close the channel than he would had he received a non-Lightning direct payment.&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Glossary ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This section attempts to document the most frequently used terms found in Lightning Network literature that may not be familiar to a general technical audience, including both the new terms created by Lightning Network designers as well as pre-existing terms that may not be well known from Bitcoin, cryptography, network routing, and other fields.&lt;br /&gt;
&lt;br /&gt;
The list below should be in alphabetical order. Any commonly-used synonyms or analogs for a term are placed in parenthesis after the term.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Bi-directional payment channel:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; a payment channel where payments can flow both directions, from Alice to Bob and back to Alice. This is contrasted with Spillman-style and CLTV-style payment channels where payments can only go one direction and once Alice has paid Bob all of the bitcoins she deposited in the channel funding transaction, the channel is no longer useful and so will be closed.&lt;br /&gt;
* &#039;&#039;&#039;Breach Remedy Transaction:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; the transaction Alice creates when Mallory attempts to steal her money by having an old version of the channel state committed to the blockchain. Alice&#039;s breach remedy transaction spends all the money that Mallory received but which Mallory can&#039;t spend yet because his unilateral spend is still locked by a relative locktime using &amp;lt;code&amp;gt;OP_CSV&amp;lt;/code&amp;gt;. This is the third of the maximum of three on-chain transactions needed to maintain a Lightning channel; it only needs to be used in the case of attempted fraud (contract breach).&lt;br /&gt;
* &#039;&#039;&#039;Channel&#039;&#039;&#039; (Lightning channel&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt;, payment channel&amp;lt;ref name=&amp;quot;spillman_channel&amp;quot;&amp;gt;[https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2013-April/002433.html Anti DoS for tx replacement]&amp;lt;br&amp;gt;Jeremy Spillman&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt;) a communication channel that allows two parties to make many secure payments between each other in exchange for making only a few transactions on the blockchain.&lt;br /&gt;
* &#039;&#039;&#039;Commitment Transaction:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; a transaction created collaboratively by Alice and Bob each time they update the state of the channel; it records their current balances within the channel. The &#039;&#039;&#039;Initial Commitment Transaction&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; is the first of these transactions; it records the initial balances within the channel. This is the second of the maximum of three on-chain transactions needed to maintain a Lightning channel; it can be combined with a &#039;&#039;funding transaction&#039;&#039; for a new channel under the cooperative conditions necessary to create an &#039;&#039;exercise settlement transaction&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Contract:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;szabo_smart_contracts&amp;quot;&amp;gt;[http://szabo.best.vwh.net/smart_contracts_idea.html The Idea of Smart Contracts]&amp;lt;br&amp;gt;Nick Szabo&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; an agreement between two or more entities to use Bitcoin transactions in a certain way, usually a way that allows Bitcoin&#039;s automated consensus to enforce some or all terms in the contract. Often called a &#039;&#039;smart contract&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;CSV:&#039;&#039;&#039; (&amp;lt;code&amp;gt;OP_CheckSequenceVerify&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OP_CSV&amp;lt;/code&amp;gt;)&amp;lt;ref name=&amp;quot;bip68&amp;quot;/&amp;gt; a opcode that allows an output to conditionally specify how long it must be part of the blockchain before an input spending it may be added to the blockchain. See &#039;&#039;relative locktime.&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Delivery Transaction:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; not really a transaction but rather the name for the outputs in the &#039;&#039;commitment transaction&#039;&#039; which Alice and Bob receive if one of them closes the channel unilaterally in the correct (current) state. If the channel is closed in an old state (indicating possible fraud), a &#039;&#039;breach remedy transaction&#039;&#039; will be generated from the output that would have paid the party closing the channel. If the channel is closed cooperatively, they&#039;ll create an &#039;&#039;exercise settlement transaction&#039;&#039; instead.&lt;br /&gt;
* &#039;&#039;&#039;Dispute period:&#039;&#039;&#039; (dispute resolution period&amp;lt;ref name=&amp;quot;poon_time_bitcoin_ln&amp;quot;&amp;gt;[https://lightning.network/lightning-network-presentation-time-2015-07-06.pdf Time, Bitcoin, and the Lightning Network]&amp;lt;br&amp;gt;Joseph Poon&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt;) the period of time that Alice has to get her &#039;&#039;breach remedy transaction&#039;&#039; added to the blockchain after Mallory has an old &#039;&#039;commitment transaction&#039;&#039; added to the blockchain. If the dispute period ends without a breach remedy transaction being added to the blockchain, Mallory can spend the funds he received from the old commitment transaction.&lt;br /&gt;
* &#039;&#039;&#039;Dual-funded channel:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;&amp;gt;[https://docs.google.com/presentation/d/1G4xchDGcO37DJ2lPC_XYyZIUkJc2khnLrCaZXgvDN0U/edit?pref=2&amp;amp;pli=1#slide=id.g85f425098_0_2 LN as a Directed Graph: Single-Funded Channel Topology]&amp;lt;br&amp;gt;Thaddeus Dryja&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; a channel opened by a &#039;&#039;funding transaction&#039;&#039; containing inputs from both Alice and Bob. Compare to a &#039;&#039;single-funded channel&#039;&#039; where only Alice&#039;s inputs contribute to the balance of the channel.&lt;br /&gt;
* &#039;&#039;&#039;Encumbrance:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[http://chimera.labs.oreilly.com/books/1234000001802/ch02.html Mastering Bitcoin, Chapter 2: How Bitcoin Works]&amp;lt;br&amp;gt;Andreas Antonopoulos&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; a generic name for any conditions that must be satisfied before a bitcoin output may be spent. Early Bitcoin transactions placed all their conditions in the scriptPubKey; later the introduction of P2SH allowed conditions to be added in a redeemScript which the scriptPubKey committed to; the introduction of soft fork [[segwit]] will add a similar mechanism for detached conditions that the scriptPubKey commits to; in addition, there are even more novel ways to add conditions to outputs that are discussed but rarely used. The term &amp;amp;quot;encumbrance&amp;amp;quot; allows specifying what the conditions do without fussing over exactly where the conditions appear in a serialized transaction.&lt;br /&gt;
* &#039;&#039;&#039;Exercise Settlement Transaction:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; a form of the &#039;&#039;commitment transaction&#039;&#039; created cooperatively by Alice and Bob when they want to close their channel together. Unlike a regular commitment transaction, none of the outputs on an exercise settlement transaction are time locked, allowing them to be immediately respent.&lt;br /&gt;
* &#039;&#039;&#039;Exhausted:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt; (exhausted channel) a payment channel where no additional payments can be made in one direction (such as from Alice to Bob). The person controlling the exhausted side of a Lightning channel loses nothing from fraudulently trying to commit an old channel state, so allowing a channel to become exhausted (or too near to being exhausted) is unpreferable. (Exception: channels can be securely started in an exhausted state, such as a &#039;&#039;single-funded channel.&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Full push:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt; when Alice pays the full amount of the channel to Bob in the &#039;&#039;initial commitment transaction&#039;&#039;, which &#039;&#039;exhausts&#039;&#039; the channel without incentivizing fraud because Alice doesn&#039;t have a previous &#039;&#039;commitment transaction&#039;&#039; that she can broadcast. This term is used in the context of a &#039;&#039;single-funded transaction&#039;&#039; and stands in contrast to an &#039;&#039;overpayment&#039;&#039; where Alice deposits more than she pays Bob in that initial payment so that she can continue to use the channel without needing to &#039;&#039;rebalance&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Funding Transaction:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; (deposit transaction) a transaction created collaboratively by Alice and Bob to open a Lightning channel. In a single-funded channel, Alice provides all the funding;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt; in a dual-funded channel, Alice and Bob both provide some funding. This is the first of the maximum of three on-chain transactions needed to maintain a Lightning channel; it can be combined with a commitment transaction from a previous channel being closed under cooperative conditions.&lt;br /&gt;
* &#039;&#039;&#039;Half-signed:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; a transaction input which requires two signatures to be added to the blockchain but which only has one signature attached. (More generally, this could be any input that has fewer signatures attached than it needs to be added to the blockchain.)&lt;br /&gt;
* &#039;&#039;&#039;Hash lock:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[https://www.mail-archive.com/bitcoin-development@lists.sourceforge.net/msg05135.html BIP - Hash Locked Transaction]&amp;lt;br&amp;gt;Tier Nolan&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; an encumbrance to a transaction output that requires the pre-image used to generate a particular hash be provided in order to spend the output. In Lightning, this is used to allow payments to be routable without needing to trust the intermediaries.&lt;br /&gt;
* &#039;&#039;&#039;HTLC:&#039;&#039;&#039; (Hashed Timelocked Contract&amp;lt;ref name=&amp;quot;russell_deployable_lightning&amp;quot;&amp;gt;[https://github.com/ElementsProject/lightning/raw/master/doc/deployable-lightning.pdf Reaching the Ground with Lightning]&amp;lt;br&amp;gt;Rusty Russell&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt;) a contract such as that used in a Lightning Channel where both a &#039;&#039;hash lock&#039;&#039; and a &#039;&#039;time lock&#039;&#039; are used, the hash lock being used to allow Alice to route payments to Bob even through a Mallory that neither of them trust, and the time lock being used to prevent Mallory from stealing back any payments he made to Alice within the channel (provided Alice enforces the contract).&lt;br /&gt;
* &#039;&#039;&#039;Intermediary:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; When Bob has one channel open with Alice and another channel open with Charlie, Bob can serve as an intermediary for transferring payments between Alice and Charlie. With Lightning payments being secured with a &#039;&#039;hash lock,&#039;&#039; Bob can&#039;t steal the payment from Alice to Charlie when it travels through Bob&#039;s node. Lightning payments can securely travel through a theoretically unlimited number of intermediaries.&lt;br /&gt;
* &#039;&#039;&#039;Limbo channel:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt; an optional special state for a Lightning channel where it cannot be immediately closed by one or both of the parties unilaterally (it can still be immediately closed cooperatively). This is used in particular for &#039;&#039;PLIPPs.&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Multisig:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;bitcoin_0_1_code&amp;quot;/&amp;gt; (multisignature, m-of-n multisig) a transaction output that requires signatures from at least one of a set of two or more different private keys. Used in Lightning to give both Alice and Bob control over their individual funds within a channel by requiring both of them sign &#039;&#039;commitment transactions&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Node:&#039;&#039;&#039; (Lightning node&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt;) a wallet with one or more open Lightning channels. This should not be confused with a Bitcoin [[full node]] that validates Bitcoin blocks, although a full node&#039;s wallet may also be simultaneously used as a Lightning node to the advantage of the Lightning network user.&lt;br /&gt;
* &#039;&#039;&#039;Overfunding:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt; in a &#039;&#039;single-funded channel,&#039;&#039; Alice deposits more bitcoins into the channel than she pays Bob in the initial payment, allowing her to make additional payments through the Lightning network. This stands in contrast to a &#039;&#039;full push&#039;&#039; where Alice only deposits enough to pay Bob in the initial payment.&lt;br /&gt;
* &#039;&#039;&#039;PILPP:&#039;&#039;&#039; (Pre-Image Length Probabilistic Payments&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt;) a specific type of &#039;&#039;probabilistic payment&#039;&#039; within a payment channel where Alice creates string with a random length and Bob guesses the length; if he guesses correctly, Alice has to pay him; if he guesses incorrectly, Alice gets to keep her money.&lt;br /&gt;
* &#039;&#039;&#039;Pre-image:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[https://en.wikipedia.org/wiki/Image_%28mathematics%29#Inverse_image Image (mathematics)]&amp;lt;br&amp;gt;English Wikipedia contributors&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; (R&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt;) data input into a hash function, which produces a hash of the pre-image. Inputting the same pre-image into the same hash function will always produce the same hash; Lightning uses this feature to create &#039;&#039;hash locks&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Probabilistic Payment:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[[Nanopayments]]&amp;lt;br&amp;gt;Bitcoin Wiki contributors&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; a payment where Alice only pays Bob if some event outside of Alice&#039;s and Bob&#039;s control occurs in Bob&#039;s favor. Probabilistic payments are usually proposed for scenarios where payments can&#039;t conveniently be made small enough for technical reasons (such as not being able to pay less than 1 satoshi) or economic reasons (such as having to pay a transaction fee for every on-chain payment, making small payments uneconomical). See &#039;&#039;PLIPP&#039;&#039; for a specific type of probabilistic payment possible within a Lightning channel.&lt;br /&gt;
* &#039;&#039;&#039;R:&#039;&#039;&#039; the variable commonly used&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; in formulas to represent a &#039;&#039;pre-image&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;Rebalance:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[https://web.archive.org/web/20160121161716/https://blockstream.com/2015/09/01/lightning-network/ The Lightning Network: What Is It and What&#039;s Happening?]&amp;lt;br&amp;gt;Rusty Russell&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; a cooperative process between Alice and Bob when they adjust their balances within the channel. This happens with every payment in a Lightning channel and is only noteworthy because single-directional channels (such as Spillman-style and CLTV-style channels) are unable to rebalance and so must close as soon as Alices has paid Bob all the bitcoins she deposited into the channel. See &#039;&#039;bi-directional payment channels.&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Relative locktime:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;bip68&amp;quot;/&amp;gt; the ability to specify when a transaction output may be spent relative to the block that included that transaction output. Enabled by BIP68 and made scriptable by BIP112. Lightning uses relative locktime to ensure &#039;&#039;breach remedy transactions&#039;&#039; may be broadcast within a time period starting from when an old &#039;&#039;commitment transaction&#039;&#039; is added to the blockchain; by making this a relative locktime (instead of an absolute date or block height), Lightning channels don&#039;t have a hard deadline for when they need to close and so can stay open indefinitely as long as the participants continue to cooperate.&lt;br /&gt;
* &#039;&#039;&#039;Revocable Sequence Maturity Contract (RSMC):&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; a &#039;&#039;contract&#039;&#039; used in Lightning to revoke the previous &#039;&#039;commitment transaction&#039;&#039;. This is allowed through mutual consent in Lightning by both parties signing a new commitment transaction and releasing the data necessary to create &#039;&#039;breach remedy transactions&#039;&#039; for the previous commitment transaction. This property allows Lightning to support &#039;&#039;bi-directional payment channels&#039;&#039;, recover from failed &#039;&#039;HTLC&#039;&#039; routing attempts without needing to commit to the blockchain, as well as provide advanced features such as &#039;&#039;PILPPs.&#039;&#039;&lt;br /&gt;
* &#039;&#039;&#039;Single-funded channel:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;dryja_directed_graph&amp;quot;/&amp;gt; a channel opened by a &#039;&#039;funding transaction&#039;&#039; containing only inputs from Alice. Compare to a &#039;&#039;dual-funded channel&#039;&#039; where Alice and Bob both contribute inputs to the initial balance of the channel.&lt;br /&gt;
* &#039;&#039;&#039;Timelock:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[http://rusty.ozlabs.org/?p=450 Lightning Networks Part I: Revocable Transactions]&amp;lt;br&amp;gt;Rusty Russell&amp;lt;br&amp;gt;2016-04-17&amp;lt;/ref&amp;gt; either an encumbrance to a transaction that prevents that transaction from being added to the blockchain before a particular time or block height (as is the case with [[nLockTime]], or an encumbrance that prevents a spend from a transaction output from being added to the blockchain before a particular time or block height (as is the case of OP_CLTV, consensus enforced sequence number relative locktime, and OP_CSV). In Lightning, this is used to prevent malicious intermediaries from holding other users&#039; funds hostages as well as to allow victims of attempted theft to submit breach remedy transactions before the thief can respend the funds he stole.&lt;br /&gt;
* &#039;&#039;&#039;TTL:&#039;&#039;&#039; (Time To Live&amp;lt;ref&amp;gt;[http://lists.linuxfoundation.org/pipermail/lightning-dev/2015-July/000019.html Re: Routing on the Lightning Network?]&amp;lt;br&amp;gt;Rusty Russell&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt;) when Alice pays Bob with a &#039;&#039;hash locked&#039;&#039; in-channel payment that&#039;s ultimately intended for Charlie, she specifies how long Bob has to deliver the payment (its time to live) before the payment becomes invalid. When Bob pays Charlie with his own in-channel payment that has the same hash lock, Bob specifies a slightly shorter amount of time that Charlie has to reveal the pre-image that unlocks the hash lock before Bob&#039;s payment becomes invalid. This ensures that either Bob receives the data necessary to remove the hash lock from the payment he received from Alice or the payment he made to Charlie is invalidated; Alice gets the same guarantee that either the payment she made to Bob ultimate goes through to Charlie or her payment to Bob is invalidated.&lt;br /&gt;
* &#039;&#039;&#039;Unilateral:&#039;&#039;&#039;&amp;lt;ref name=&amp;quot;ln_pdf&amp;quot;/&amp;gt; any action performed by only one of the participants in a channel without requesting or needing permission from the other participant. Lightning allows channels to be closed unilaterally (so Alice can close the channel by herself if Bob becomes unresponsive) and attempted fraud can be penalized unilaterally (so Alice can take any bitcoins Mallory tried to steal when he broadcast an old &#039;&#039;commitment transaction&#039;&#039;).&lt;br /&gt;
* &#039;&#039;&#039;UTXO:&#039;&#039;&#039;&amp;lt;ref&amp;gt;[https://bitcoin.org/en/glossary/unspent-transaction-output Unspent Transaction Output (UTXO)]&amp;lt;br&amp;gt;Bitcoin.org Developer Glossary&amp;lt;br&amp;gt;Retrieved 2016-04-17&amp;lt;/ref&amp;gt; (Unspent Transaction Output) spendable bitcoins. A transaction output lists a bitcoin amount and the conditions (called an &#039;&#039;encumbrance&#039;&#039;) that need to be fulfilled in order to spend those bitcoins. Once those bitcoins have been spent on the blockchain, no other transaction in the same blockchain can spend the same bitcoins, so an Uspent Transaction Output (UTXO) is bitcoins that can be spent.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[Payment channels]]&lt;br /&gt;
* [[Hashed Timelock Contracts]]&lt;br /&gt;
* [[Off-Chain Transactions]]&lt;br /&gt;
* [https://docs.lightning.engineering/community-resources/resource-list Lightning Lab&#039;s list of resources]&lt;br /&gt;
* [https://github.com/dan-da/lightning-nodes/blob/master/README.md List of network nodes].&lt;br /&gt;
* [https://www.reddit.com/r/Bitcoin/comments/7pwna9/lightning_network_megathread/ Lightning Network Megathread on Reddit]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;bitcoin_0_1_code&amp;quot;&amp;gt;[http://satoshi.nakamotoinstitute.org/code/ Bitcoin 0.1 code]&amp;lt;br&amp;gt;Satoshi Nakamoto&amp;lt;br&amp;gt;Retrieved 2016-04-11&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;ref name=&amp;quot;bip68&amp;quot;&amp;gt;[https://github.com/bitcoin/bips/blob/master/bip-0068.mediawiki BIP68: Relative lock-time using consensus-enforced sequence numbers]&amp;lt;br&amp;gt;Mark Friedenbach,   BtcDrak, Nicolas Dorier, and kinoshitajona&amp;lt;br&amp;gt;Retrieved 2016-04-12&amp;lt;/ref&amp;gt;&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;br /&gt;
[[Category:Scalability]]&lt;br /&gt;
[[Category:Privacy]]&lt;/div&gt;</summary>
		<author><name>Kschieck</name></author>
	</entry>
	<entry>
		<id>https://en.bitcoin.it/w/index.php?title=Seed_phrase&amp;diff=69370</id>
		<title>Seed phrase</title>
		<link rel="alternate" type="text/html" href="https://en.bitcoin.it/w/index.php?title=Seed_phrase&amp;diff=69370"/>
		<updated>2022-07-12T00:03:01Z</updated>

		<summary type="html">&lt;p&gt;Kschieck: Updated 2 &amp;quot;see also&amp;quot; links because the locations were moved or removed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{sample}}&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;seed phrase&#039;&#039;&#039;, &#039;&#039;&#039;seed recovery phrase&#039;&#039;&#039; or &#039;&#039;&#039;backup seed phrase&#039;&#039;&#039; is a list of words which [[Storing bitcoins|store]] all the information needed to recover Bitcoin funds [[Transaction|on-chain]]. Wallet software will typically generate a seed phrase and instruct the user to write it down on paper. If the user&#039;s computer breaks or their hard drive becomes corrupted, they can download the same wallet software again and use the paper backup to get their bitcoins back.&lt;br /&gt;
&lt;br /&gt;
Anybody else who discovers the phrase can steal the bitcoins, so it must be kept safe like jewels or cash. For example, it must not be typed into any website.&lt;br /&gt;
&lt;br /&gt;
Seed phrases are an excellent way of backing up and [[storing bitcoins]], so they are used by almost all well-regarded wallets.&amp;lt;ref&amp;gt;[https://bitcoin.org/en/choose-your-wallet Bitcoin.org: Choose your wallet]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Seed phrases can only backups funds on the [[block chain]]. They cannot store funds involved in [[off-chain transactions]] such as [[Lightning Network]] or [[Blinded bearer certificates]]. Although these technologies are in their infancy as of 2019 so its possible in future seed phrases could be used to backup them.&lt;br /&gt;
&lt;br /&gt;
== BIP39 and its flaws ==&lt;br /&gt;
&lt;br /&gt;
[[BIP_0039|BIP39]] is the most common standard used for seed phrases. One notable example is [[Electrum|Electrum wallet]], which is using its own standard, and for good reasons. BIP39 has some flaws, known in the technical community but not known much wider. They are described [https://electrum.readthedocs.io/en/latest/seedphrase.html#motivation here on this electrum doc page]. Most seriously, BIP39 flaws mean it is not true to say that backing up a BIP39 seed phrase and name of wallet software is the only thing a user needs to do to keep their money safe. BIP39 works this way because its designers wanted their hardware wallet to also support [[altcoin]]s. [https://walletsrecovery.org/ walletsrecovery.org] is an attempt at helping with this issue, but ideally there will be a better solution in the future.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
An example of a non-BIP39 seed phrase is:&lt;br /&gt;
&lt;br /&gt;
    witch collapse practice feed shame open despair {{taggant private key}}creek road again ice least&lt;br /&gt;
&lt;br /&gt;
The word order is important.&lt;br /&gt;
&lt;br /&gt;
[[File:Mnemonic-seed-still-life.jpg|300px|thumb|none|alt=An example seed phrase written on paper|Example seed phrase on paper.]]&lt;br /&gt;
&lt;br /&gt;
== Explanation ==&lt;br /&gt;
&lt;br /&gt;
A simplified explanation of how seed phrases work is that the wallet software has a list of words taken from a dictionary, with each word assigned to a number. The seed phrase can be converted to a number which is used as the seed integer to a [[Deterministic wallet|deterministic wallet]] that generates all the [[Private key|key pairs]] used in the wallet.&lt;br /&gt;
&lt;br /&gt;
The English-language wordlist for the BIP39 standard has 2048 words, so if the phrase contained only 12 random words, the number of possible combinations would be 2048^12 = 2^132 and the phrase would have 132 bits of security.  However, some of the data in a BIP39 phrase is not random,&amp;lt;ref&amp;gt;[https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#Generating_the_mnemonic BIP39: Generating the mnemonic]&amp;lt;/ref&amp;gt; so the actual security of a 12-word BIP39 seed phrase is only 128 bits.  This is approximately the same strength as all Bitcoin private keys, so most experts consider it to be sufficiently secure.&amp;lt;ref&amp;gt;[https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#Security BIP32: Security]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is not safe to invent your own seed phrase because humans are bad at generating randomness.  The best way is to allow the wallet software to generate a phrase which you write down.&lt;br /&gt;
&lt;br /&gt;
As seed phrases use natural language words, they have excellent error correction. Words written in bad handwriting can often still be read. If one or two letters are missing or unreadable the word can often still be deduced. The [[#Word_Lists|word list]] that the seed phrase words are drawn from is carefully chosen so that the first four letters of each word are enough to uniquely identify it. This compares well with writing down a raw [[private key]] where a single letter being unreadable or incorrect can make the private key useless (depending on the serialization format).&lt;br /&gt;
&lt;br /&gt;
== Two-factor seed phrases ==&lt;br /&gt;
&lt;br /&gt;
Seed phrases, like all backups, can store any amount of bitcoins. It&#039;s a concerning idea to possibly have enough money to purchase the entire building just sitting on a sheet of paper without any protection. For this reason many wallets make it possible to encrypt a seed phrase with a password.&lt;br /&gt;
&lt;br /&gt;
The password can be used to create a two-factor seed phrase where both &#039;&#039;&amp;quot;something you have&amp;quot;&#039;&#039; plus &#039;&#039;&amp;quot;something you know&amp;quot;&#039;&#039; is required to unlock the bitcoins.&lt;br /&gt;
&lt;br /&gt;
This works by the wallet creating a seed phrase and asking the user for a password. Then both the seed phrase and extra word are required to recover the wallet. Electrum and some other wallets call the passphrase a &#039;&#039;&#039;&amp;quot;seed extension&amp;quot;&#039;&#039;&#039;, &#039;&#039;&#039;&amp;quot;extension word&amp;quot;&#039;&#039;&#039; or &#039;&#039;&#039;&amp;quot;13th/25th word&amp;quot;&#039;&#039;&#039;. The BIP39 standard defines a way of passphrase-protecting a seed phrase. A similar scheme is also used in the Electrum standard. If a passphrase is not present, an empty string &amp;quot;&amp;quot; is used instead.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: Forgetting this password will result in the bitcoin wallet and any contained money being lost. Do not overestimate your ability to remember passphrases especially when you may not use it very often.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Warning&#039;&#039;&#039;: The seed phrase password should not be confused with the password used to encrypt the wallet file on disk. This is probably why many wallets call it an extension word instead of a password.&lt;br /&gt;
&lt;br /&gt;
== Storing seed phrases for the long term == &lt;br /&gt;
&lt;br /&gt;
Most people write down phrases on paper but they can be stored in many other ways such as [[Brainwallet|memorizing]], engraving or stamping on metal, writing in the margins of a book, chiselling into a stone tablet or any other creative and inventive way.&lt;br /&gt;
&lt;br /&gt;
In the past many people have accidentally lost bitcoins because of failed backups, mistyped letters, forgotten hard drives, or corrupted SSD devices. It&#039;s also important to protect the seed from accidental loss.&lt;br /&gt;
&lt;br /&gt;
It could be a good idea to write some words of explanation on the same paper as the seed phrase. If storing for the long term you may forget what a phrase is how it should be treated. A sample explanation that can be adapted is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;These twelve words have control over BITCOINS. Keep this paper safe and secret like cash or jewellery. The bitcoin information on this paper is encrypted with a passphrase. It is part of a multi-signature wallet and was made by Electrum bitcoin wallet software on 2019-01-01.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Paper and pencil backup ====&lt;br /&gt;
&lt;br /&gt;
Through bitter experience it has been found that one of the most practical storage mediums is &#039;&#039;&#039;pencil and paper&#039;&#039;&#039;. The private keys of a bitcoin wallet are encoded into [[seed phrase|random words from a dictionary]] which can be written down. If your hard drive crashes, you can find the paper with the [[seed phrase]] and restore the entire wallet. As [[seed phrase]]s use natural language words, they have good error correction. Words written in bad handwriting can often still be read. If one or two letters are missing the word can often still be deduced. The [[Seed_phrase#Word_Lists|word list]] that the seed phrase words are drawn from is carefully chosen so that the first four letters of each word are enough to uniquely identify it.&lt;br /&gt;
&lt;br /&gt;
For storing on paper writing with pencil is much better than pen.&amp;lt;ref&amp;gt;[http://www.joethorn.net/blog/2011/12/07/pencil-does-not-fade Pencil Does Not Fade]&lt;br /&gt;
&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[https://www.quora.com/How-do-I-maintain-a-paper-notebook-that-can-remain-for-years How do I maintain a paper notebook that can remain for years?]&lt;br /&gt;
&amp;lt;/ref&amp;gt;&lt;br /&gt;
Paper should be acid-free or archival paper, and stored in the dark avoiding extremes of heat and moisture.&amp;lt;ref&amp;gt;[https://www.loc.gov/preservation/care/deterioratebrochure.html Essential facts about preservation of Paper]&lt;br /&gt;
&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[https://www.quora.com/If-I-write-with-a-pencil-on-my-notebook-will-the-writing-last-for-a-long-time-say-50-years-or-will-it-just-fade-away-gradually Writing in a notebook with pencil]&lt;br /&gt;
&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;[http://copar.org/bulletin14.htm CoPAR: Creating records that will last]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Metal backup ====&lt;br /&gt;
&lt;br /&gt;
Seed phrases can also be [https://blog.lopp.net/metal-bitcoin-seed-storage-stress-test--part-ii-/ stamped or engraved into metal] which is significantly more durable than paper. Metal backups are recommended if the threat model involves fire, water, extremes of temperature or physical stress.&lt;br /&gt;
&lt;br /&gt;
==== Methods that are not recommended ====&lt;br /&gt;
&lt;br /&gt;
Some methods that are not recommended are: storing in a file on a computer (including online), or storing online.&lt;br /&gt;
&lt;br /&gt;
Some people get the idea to split up their phrases, like storing 6 words in one location and the other 6 words in another location. This is a bad idea and should not be done, because if one set of 6 words is discovered then it becomes far easier to brute-force the rest of the phrase. Storing bitcoins in multiple locations like this should be done with [[multi-signature]] wallets instead.&lt;br /&gt;
&lt;br /&gt;
The [[Shamir Secret Sharing]] algorithm is sometimes promoted as a way to divide control of bitcoins, but in practice there are many pitfalls and trade-offs that make it not worth it.&amp;lt;ref&amp;gt;[https://blog.keys.casa/shamirs-secret-sharing-security-shortcomings/ Shamir&#039;s Secret Sharing Shortcomings] by Jameson Lopp, Casa blog, 2020&amp;lt;/ref&amp;gt; &amp;lt;!-- See the main article: [[Shamir Secret Snakeoil]] (the other one redirects here, no need to have 2 wikilinks with different captions going to the same article --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another bad idea is to add random decoy words that are somehow meaningful to you and later remove them to be left with only the 12-word phrase. The phrase words come from a known dictionary (see next section), so anybody can use that dictionary to weed out the decoy words.&lt;br /&gt;
&lt;br /&gt;
It&#039;s possible but risky to memorize ([[Brainwallet]]s) seed phrases. This should probably only be done in situations that really need it, such as crossing a hostile border where one expects to be searched.&lt;br /&gt;
&lt;br /&gt;
== Word lists ==&lt;br /&gt;
&lt;br /&gt;
Generally, a seed phrase only works with the same wallet software that created it. If storing for a long period of time it&#039;s a good idea to write the name of the wallet too.&lt;br /&gt;
&lt;br /&gt;
The BIP39 English word list has each word being uniquely identified by the first four letters, which can be useful when space to write them is scarce.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0039/bip-0039-wordlists.md BIP39 wordlists]&lt;br /&gt;
* [https://github.com/spesmilo/electrum/blob/1.9.8/lib/mnemonic.py Electrum old-style wordlist]&lt;br /&gt;
* [https://github.com/spesmilo/electrum/blob/master/electrum/wordlist/english.txt Electrum new-style wordlist]&lt;br /&gt;
&lt;br /&gt;
== Alternative name &amp;quot;mnemonic phrase&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Seed phrases are sometimes called &#039;&#039;mnemonic phrases&#039;&#039;, especially in older literature. This is a bad name because the word &amp;quot;mnemonic&amp;quot; implies that the phrase should be memorized. It is less misleading to call them seed phrases.&lt;br /&gt;
&lt;br /&gt;
== The power of backups ==&lt;br /&gt;
&lt;br /&gt;
An especially interesting aspect in the power of paper backups is allowing your money to be two places at once. At the London Inside Bitcoin conference, the keynote speaker showed 25 paper backups they were carrying&amp;amp;mdash;all password-protected. With that, one can carry $100,000 which can instantly be moved to a phone or transferred yet with total security. If it&#039;s stolen, then there is no risk because it is backed up elsewhere. That is powerful.&amp;lt;ref&amp;gt;https://www.reddit.com/r/Bitcoin/comments/2hmnru/poll_do_you_use_paper_wallets_why_why_not_what/&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki BIP39 seed phrase standard]&lt;br /&gt;
* [[Deterministic wallet]]&lt;br /&gt;
* [[Storing bitcoins]]&lt;br /&gt;
* [[Brainwallet]]&lt;br /&gt;
* [https://github.com/6102bitcoin/6102bitcoin/blob/main/content/faq-bitcoin-seed.md FAQ regarding bitcoin seeds]&lt;br /&gt;
* [https://web.archive.org/web/20210214135049/https://www.hodlalert.com/2020/12/21/generating-cryptographically-secure-random-numbers-with-coins-and-a-cup/ Generating Bitcoin Seed Phrases With Coins and A Cup]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Technical]]&lt;/div&gt;</summary>
		<author><name>Kschieck</name></author>
	</entry>
</feed>