<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://lightningwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZmnSCPxj</id>
	<title>lightningwiki.net - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://lightningwiki.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ZmnSCPxj"/>
	<link rel="alternate" type="text/html" href="http://lightningwiki.net/index.php?title=Special:Contributions/ZmnSCPxj"/>
	<updated>2026-10-18T21:52:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.0</generator>
	<entry>
		<id>http://lightningwiki.net/index.php?title=Satoshi%27s_Vision&amp;diff=205</id>
		<title>Satoshi&#039;s Vision</title>
		<link rel="alternate" type="text/html" href="http://lightningwiki.net/index.php?title=Satoshi%27s_Vision&amp;diff=205"/>
		<updated>2019-01-14T07:00:24Z</updated>

		<summary type="html">&lt;p&gt;ZmnSCPxj: Created page with &amp;quot;Satoshi&amp;#039;s Vision is often quoted. Aside from the fact this phrase is based on a blind religious following of some kind of &amp;quot;one true way&amp;quot;, it is helpful to realize that the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Satoshi&amp;#039;s Vision]] is often quoted.&lt;br /&gt;
Aside from the fact this phrase is based on a blind religious following of some kind of &amp;quot;one true way&amp;quot;, it is helpful to realize that the original Satoshi client included an insecure implementation of update systems.&lt;br /&gt;
&lt;br /&gt;
Today, update systems ([[Poon-Dryja]], [[Decker-Wattenhofer]], and [[Decker-Russell-Osuntokun]]) are used as the basis of Lightning Network payment channels.&lt;br /&gt;
While the original Satoshi whitepaper did not include a description of any kind of transaction update system, the original Satoshi client included such a system in &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Original &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Each input of a transaction has an &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; field.&lt;br /&gt;
In modern Bitcoin, this field is now used to impose a relative time, measured from the block confirmation of the output being spent by the specific input, as well as to signal RBF.&lt;br /&gt;
&lt;br /&gt;
However, in original Satoshi client, the intent of this field was different.&lt;br /&gt;
The mempool was programmed such that if a new transaction arrived that consumed the same inputs as an existing transaction, the client would only accept the new transaction (and remove the old transaction) if the new transaction had every conflicting input with a higher &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt;.&lt;br /&gt;
Then a &amp;quot;final&amp;quot; tranaction could be made by setting &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; to the maximum value (&amp;lt;code&amp;gt;0xFFFFFFFF&amp;lt;/code&amp;gt;), signalling that it would not be replaceable.&lt;br /&gt;
&lt;br /&gt;
=== Intended Micropayment Channel Behavior ===&lt;br /&gt;
&lt;br /&gt;
The intent was that a transaction which used &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; would &amp;quot;open a tab&amp;quot;, which would be closed when the transaction was finalized, or when the transaction was confirmed.&lt;br /&gt;
&lt;br /&gt;
For instance, suppose some customer wanted to pay for drinks at a bar.&lt;br /&gt;
The customer would create a transaction spending some of their coins, but with &amp;lt;code&amp;gt;nSequence = 0&amp;lt;/code&amp;gt;.&lt;br /&gt;
The customer would then transmit it over the network and the bartender would then release the drink to the customer.&lt;br /&gt;
&lt;br /&gt;
On the next drink, instead of the customer spending from the change output of the previous transaction to create a new transaction, the customer would re-issue a new transaction spending the same coins (plus possibly new coins if the previous coins in total could not cover the total money) with a higher &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt;.&lt;br /&gt;
So at the next drink, a new transaction with &amp;lt;code&amp;gt;nSequence = 1&amp;lt;/code&amp;gt; would be created, giving more money to the bartender.&lt;br /&gt;
&lt;br /&gt;
This would continue until the latest transaction got confirmed, or the customer decided to go home.&lt;br /&gt;
If the customer wanted to &amp;quot;close the tab&amp;quot; it would simply reissue the last transaction with &amp;lt;code&amp;gt;nSequence = 0xFFFFFFFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
Since that is the largest number possible, the bartender knew that there would never be future transactions and would simply keep the final transaction alive in the mempool until it got confirmed.&lt;br /&gt;
&lt;br /&gt;
Such a construction is very similar to modern micropayment channels.&lt;br /&gt;
Thus, at the very start of Bitcoin, a system to support a &amp;quot;layer 2&amp;quot; payment system was already part of the client.&lt;br /&gt;
This means that the idea of moving payments offchain and batching multiple small payments into a single large onchain payment, were already part of the intended Bitcoin system.&lt;br /&gt;
&lt;br /&gt;
=== Insecurity of original &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; ===&lt;br /&gt;
&lt;br /&gt;
Although the above was the intended behavior, incentives at the miner level did not have this behavior.&lt;br /&gt;
In particular, once a transaction is confirmed, fullnodes cannot &amp;quot;reverse&amp;quot; the transaction if it turns out that a transaction with higher &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; exists.&lt;br /&gt;
Miners were instead incentivized to accept transactions with higher fees (either explicitly on the transaction, or via a direct payment elsewhere).&lt;br /&gt;
It was this realization (that miners would prefer to ignore &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt; and take whichever version had the highest fee) that lead to modern RBF.&lt;br /&gt;
Indeed, modern &amp;quot;opt-in&amp;quot; RBF is signalled by a non-&amp;lt;code&amp;gt;0xFFFFFFFF&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt;, indicating that the transaction could be replaced.&lt;br /&gt;
&lt;br /&gt;
In particular, before the tab is closed, the customer could bribe the miner to confirm an older version of the transaction with lower &amp;lt;code&amp;gt;nSequence&amp;lt;/code&amp;gt;.&lt;br /&gt;
Because of this misalignment of incentives, the above construction could not be safely used at all.&lt;br /&gt;
&lt;br /&gt;
However, this same insecurity lead to research for actually secure micropayment channels.&lt;br /&gt;
That research has culminated in modern Lightning Network, which is a non-custodial secure micropayment channel protocol including support for inter-channel payment forwarding.&lt;/div&gt;</summary>
		<author><name>ZmnSCPxj</name></author>
	</entry>
	<entry>
		<id>http://lightningwiki.net/index.php?title=Channel_Factory&amp;diff=190</id>
		<title>Channel Factory</title>
		<link rel="alternate" type="text/html" href="http://lightningwiki.net/index.php?title=Channel_Factory&amp;diff=190"/>
		<updated>2019-01-12T03:32:56Z</updated>

		<summary type="html">&lt;p&gt;ZmnSCPxj: Created page with &amp;quot;A Channel Factory is a multiparticipant non-custodial cryptocurrency system that contains channels.  == Blockchains as multiparticipant cryptocurrency system ==  A blo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A [[Channel Factory]] is a multiparticipant non-custodial cryptocurrency system that contains [[channels]].&lt;br /&gt;
&lt;br /&gt;
== Blockchains as multiparticipant cryptocurrency system ==&lt;br /&gt;
&lt;br /&gt;
A blockchain manages a state called the &amp;quot;UTXO set&amp;quot;.  The UTXO set is effectively a multimap from addresses (which may represent singlesig pubkeys or multisig pubkeys) to Bitcoin values.  Each transaction deletes some entries in this multimap and creates new entries.  For example, suppose ZmnSCPxj owes KEabZAYi 1.0 BTC.  Suppose currently the UTXO set contains &amp;quot;ZmnSCPxj: 2.0&amp;quot;.  ZmnSCPxj can create a transaction and have the blockchain system process it, then the UTXO set then contains &amp;quot;ZmnSCPxj: 1.0, KEabZAYi: 1.0&amp;quot;.  Each blockchain transaction effectively is an update to the state of the UTXO set.&lt;br /&gt;
&lt;br /&gt;
Blockchains have open membership sets (anyone can participate), but with the drawback that any increase in its processing capacity translates to a decrease in its openness and usability.&lt;br /&gt;
&lt;br /&gt;
== Channels as multiparticipant cryptocurrency systems ==&lt;br /&gt;
&lt;br /&gt;
A channel is a multiparticipant cryptocurrency system which is similar to a blockchain, except with a fixed membership set.  It can also only be updated if all participants are online and willing to continue updating (the rules of the channel are imposed by the participants by refusing to participate in invalid updates).  Finally, a channel can fall back to a lower-level cryptocurrency system (such as a blockchain) in order to enforce any rules by forcing enforcement to a lower-level system.&lt;br /&gt;
&lt;br /&gt;
For example, suppose ZmnSCPxj and KEabZAYi have a channel originally created by ZmnSCPxj.  On the blokchain level, the blockchain sees something like &amp;quot;ZmnSCPxj+KEabZAYi: 2.0&amp;quot;.  However, inside the channel, both ZmnSCPxj and KEabZAYi have agreed that the state is &amp;quot;ZmnSCPxj: 2.0, KEabZAYi: 0.0&amp;quot;.  Suppose that ZmnSCPxj owes KEabZAYi 1.0 BTC.  Then both of them can agree that new channel state is &amp;quot;ZmnSCPxj: 1.0, KEabZAYi: 1.0&amp;quot;.  After both of them agree on the update, however, only the channel state is changed; the state of the blockchain is &amp;#039;&amp;#039;not&amp;#039;&amp;#039; changed and there is no transaction made on the blockchain layer.  The blockchain layer remains with the state &amp;quot;ZmnSCPxj+KEabZAYi: 2.0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The security of a channel is dependent on each user looking out for its own interests and refusing to allow updates that it does not intend.  For example, even if KEabZAYi proposes to change the state to &amp;quot;ZmnSCPxj: 0.0, KEabZAYi: 2.0&amp;quot; afterwards, if ZmnSCPxj is not intending to pay that, then ZmnSCPxj will simply refuse to sign the new state and the channel state does not change.&lt;br /&gt;
&lt;br /&gt;
Because channel security is based on self-interest rather than trust in some custodian, there is no need for a large membership set (like those required for custodial systems like federated sidechains) in the hope that the majority of the membership set is honest (and without having to hope that the members are not sybils).  Instead, simply being able to veto any invalid updates is enough.  Thus, channels may safely have as few as 2 participants. In fact, 2 participants is ideal since every participant of the channel must be online in order to update the channel state; it is far more likely that 2 participants are online, than 3 or 4 or more.&lt;br /&gt;
&lt;br /&gt;
== Channel factories as channels within channels ==&lt;br /&gt;
&lt;br /&gt;
Of note is that a channel itself, while needing some other cryptocurrency system to fall back to, imposes nothing else on the lower-layer cryptocurrency system other than the ability to assign money to a multisignature address.&lt;br /&gt;
&lt;br /&gt;
Now suppose we have a channel with three participants, ZmnSCPxj, KEabZAYi, and AoywPQUw.  At the blockchain layer, it might be represented as the UTXO &amp;quot;ZmnSCPxj+KEabZAYi+AoywPQUw: 4.0&amp;quot;.  However, inside this 3-participant channel, it might have the state &amp;quot;ZmnSCPxj: 4.0, KEabZAYi: 0, AoywPQUw: 0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now suppose ZmnSCPxj proposes to create two channels &amp;#039;&amp;#039;inside&amp;#039;&amp;#039; the 3-participant channel, and all participants agree that such an operation is valid.  So now the 3-participant channel contains the state &amp;quot;ZmnSCPxj+KEabZAYi: 2.0, ZmnSCPxj+AoywPQUw: 1.0, ZmnSCPxj: 1.0, KEabZAYi: 0, AoywPQUw: 0&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The two sub-channels inside the larger 3-participant channels have their own state indepedently of each other and of the 3-participant channel.  The ZmnSCPxj+KEabZAYi channel would have the state &amp;quot;ZmnSCPxj: 2, KEabZAYi: 0&amp;quot;, while the ZmnSCPxj+AoywPQUw channel would have the state &amp;quot;ZmnSCPxj: 1, AoywPQUw: 0&amp;quot;.  The 3-participant channel, since it creates factories, is now actually a channel factory.&lt;br /&gt;
&lt;br /&gt;
Suppose AoywPQUw goes offline (for example, went to sleep).  In that case, the 3-participant channel (the channel factory) is &amp;quot;locked&amp;quot; and its state cannot change.  Now suppose ZmnSCPxj wants to pay KEabZAYi 1 BTC.  Since AoywPQUw is offline, ZmnSCPxj &amp;#039;&amp;#039;&amp;#039;cannot&amp;#039;&amp;#039;&amp;#039; change the state of the 3-participant channel to &amp;quot;ZmnSCPxj+KEabZAYi: 2.0, ZmnSCPxj+AoywPQUw: 1.0, ZmnSCPxj: 0, KEabZAYi: 1.0, AoywPQUw: 0&amp;quot;.  However, ZmnSCPxj &amp;#039;&amp;#039;&amp;#039;can&amp;#039;&amp;#039;&amp;#039; change the state of the ZmnSCPxj+KEabZAYi subchannel to &amp;quot;ZmnSCPxj: 1.0, KEabZAYi: 1.0&amp;quot;.  This is because this sub-channel only requires the participation of ZmnSCPxj and KEabZAYi to update.&lt;br /&gt;
&lt;br /&gt;
Thus, channel factories, by splitting up a multiparticipant channel to multiple 2-participant channels, give the advantage of 2-participant channels (i.e. only need two participants to be online to work).&lt;br /&gt;
&lt;br /&gt;
At the same time, even though there are two channels (the ZmnSCPxj+KEabZAYi channel and the ZmnSCPxj+AoywPQUw channel), at the blockchain layer, only one UTXO is needed (&amp;quot;ZmnSCPxj+KEabZAYi+AoywPQUw: 4.0&amp;quot;).  This reduces the capacity used on the blockchain layer.&lt;br /&gt;
&lt;br /&gt;
If a channel factory had even more members, there may be dozens of channels hanging off a single blockchain UTXO, greatly multiplying the capacity of the blockchain for Lightning Network operation.&lt;/div&gt;</summary>
		<author><name>ZmnSCPxj</name></author>
	</entry>
	<entry>
		<id>http://lightningwiki.net/index.php?title=AMP&amp;diff=189</id>
		<title>AMP</title>
		<link rel="alternate" type="text/html" href="http://lightningwiki.net/index.php?title=AMP&amp;diff=189"/>
		<updated>2019-01-12T02:55:07Z</updated>

		<summary type="html">&lt;p&gt;ZmnSCPxj: fill in&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Atomic Multipath Payments&amp;#039;&amp;#039;&amp;#039; or [[AMP]] involves splitting up a single logical payment into multiple parts, then (possibly) sending each part via a different route.&lt;br /&gt;
&lt;br /&gt;
Below are various proposals for AMP:&lt;br /&gt;
&lt;br /&gt;
* OG AMP (Original AMP) - originally created by Olaoluwa Osuntokun and Conner Fromknecht; preimage is generated by payer, and split up in pieces and sent over each sub-payment.  Sacrifices proof-of-payment and requires spontaneous payment.&lt;br /&gt;
* High AMP - proposed by ZmnSCPxj jxPCSmnZ; uses BIP32 hierarchical deterministic derivation, with the payee-generated payment point as the seed point and each sub-payment paying to a derived child point, revealing the derivation path to the payee.  Revealing any of the derived child scalars also reveals the original payment scalar.  Requires switching to points and scalars instead of hashes and preimages, which requires either Schnorr, 2p-ECDSA, or a complicated SCRIPT with 3 &amp;lt;code&amp;gt;OP_CODESEPARATOR&amp;lt;/code&amp;gt;s; compatible with payment decorrelation.&lt;br /&gt;
* Base AMP - proposed by Antony Towns; just splits up the payment with the same hash in all sub-payments.  Economically, the payee is selling the proof-of-payment for the entire payment; the price of the proof-of-payment is the total payment, so the payee is incentivized to take payments only once all pieces have reached it, and thus is &amp;quot;economically-incentivized atomic&amp;quot; instead of &amp;quot;information-theoretic&amp;quot; or &amp;quot;computationally-intractible&amp;quot; atomic.&lt;/div&gt;</summary>
		<author><name>ZmnSCPxj</name></author>
	</entry>
</feed>