<oembed><type>rich</type><version>1.0</version><author_name>npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_name><author_url>https://nostr.ae/npub1zw7cc8z78v6s3grujfvcv3ckpvg6kr0w7nz9yzvwyglyg0qu5sjsqhkhpx</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2017-12-18&#xA;📝 Original message:&#xA;Andy Schroder &lt;info at AndySchroder.com&gt; writes:&#xA;&gt; What&#39;s the rational for using millisatoshis as the units for lightning &#xA;&gt; channels? Aren&#39;t you going to loose up to 1/2 of a satoshi when the &#xA;&gt; channel is closed?&#xA;&#xA;You can lose up to 0.999 satoshi per in-progress payment, yes.  BOLT #3:&#xA;&#xA;    The amounts for each output MUST be rounded down to whole satoshis.&#xA;&#xA;&gt; Is this because it doesn&#39;t hurt and you might as well &#xA;&gt; be open to the opportunity for these sub satoshi transactions, because &#xA;&gt; if you aren&#39;t, you are giving up the opportunity to get accumulated &#xA;&gt; revenue from many of those small transactions, that could end up being &#xA;&gt; greater than 1/2 of a satoshi?&#xA;&#xA;In practice, payments of less than a few thousand satoshi are&#xA;impractical, as they cost more than that to spend.  Channel closing&#xA;costs dwarf the gains to be made from cheating, however.&#xA;&#xA;&gt; Since millisatoshis is used, is there a maximum channel funding size?&#xA;&#xA;Yes, the upper 32 bits must be zero, from BOLT #2:&#xA;&#xA;  - for channels with `chain_hash` identifying the Bitcoin blockchain:&#xA;    - MUST set the four most significant bytes of `amount_msat` to 0.&#xA;&#xA;This gives a maximum HTLC value of .04294967295 BTC, which, back when&#xA;we started, was about $10.&#xA;&#xA;&gt; Is the optional initial push of millisatoshis during the channel &#xA;&gt; creation there in order to motivate the other party to be willing to &#xA;&gt; waste their time with the channel creation in the first place? If not, &#xA;&gt; what&#39;s it for?&#xA;&#xA;It&#39;s for the common case where you want to connect to someone and&#xA;make a payment immediately.  I&#39;m not sure how widely it will be used,&#xA;though.  It&#39;s also the only mechanism for the payer to have *zero* funds&#xA;in channel (ie. below reserve).&#xA;&#xA;&gt; In all of the clients that I&#39;ve looked at, I can&#39;t seem to find out how &#xA;&gt; to define the timeout closing out a channel when someone does not &#xA;&gt; cooperate. Is there a fixed value for this as part of the protocol? Or &#xA;&gt; do most clients have a default that they enforce over all channels that &#xA;&gt; they create?&#xA;&#xA;If there&#39;s no in-progress payment, there&#39;s no reason to close a channel&#xA;to an unreachable peer, unless you want to abandon the channel and get&#xA;the funds back.&#xA;&#xA;If there is, BOLT #2 has you covered:&#xA;&#xA;        https://github.com/lightningnetwork/lightning-rfc/blob/master/02-peer-protocol.md#requirements-8&#xA;&#xA;Hope that helps,&#xA;Rusty.</html></oembed>