12

It takes about 200 vbytes to spend from a Lightning Network (LN) Hashed Time-Locked Contract (HTLC) output used for routing a payment. At the default minimum feerate of 10 nBTC/vbyte, that makes it uneconomical to attempt to claim a routed micropayment below about 2,000 nBTC ($0.008 USD at $4,000 USD/BTC). As fees rise, larger and larger micropayments ...


9

A very low value output in Bitcoin (or any similar system) has zero actual value because the cost in fees to spend it would be equal to or greater than the coins it provides. Like someone writing you a check for $0.01, you'd be best off throwing it out because the time it takes to handle it (much less the tiny risk that it bounces and causes you a bounced ...


4

The HTLC isn't really a specific type of bitcoin transaction, it is more a specific output script with the required spend conditions. Thus to make an HTLC, you really need to create a custom script which the bitcoin core command line tools don't really accomplish. You could construct the script by hand or perhaps find another tool which allows more easy ...


3

One reason to use HTLCs for single-hop payments in the Lightning Network would be to make them indistinguishable from multi-hop payments to the receiver. This way, the receiver does not know whether it was their direct peer who initiated the payment, or whether they are merely forwarding the payment on for somebody else. Since they look identical to the ...


3

First of all at this point in time the whitepaper is pretty outdated and should only be considered as a rough conceptual guide. The Lightning Network Protocol itself is better and more accurately described / specified in the lightning rfc That being said the situation is that even in the single-hop payment case HTLCs are being used. To set up and settle ...


3

An htlc is a small output in the commitment transaction. As with any output it needs to be bigger than the dust limit. In particular if the amount is smaller than the expected on chain transaction transaction fee to spend it it becomes economically unviable.


3

The funds in the respective HTLC's get stuck for a time-out period if the payment_pre-image doesn't propagate back along the route to your originating channel. There is no guarantee beforehand that this propagation will be successful. That is why HTLC(sent)'s are always signed together with a respective time-out transaction, with a signed input that spends ...


3

The security implication of removing a checksig operation from the encumbrance script is that the coins can be stolen while in flight by anybody, and especially by miners. Obviously, on testnet, only someone who's bored or interested enough to grab the coins will take the time to "attack" your transactions. There's not much sense in listing and analyzing ...


2

How is it possible? Does the HTLC is not written on the blockchain? In the Lightning Network, HTLCs are part of the commitment transactions which are not broadcast to the network. This means that the HTLCs do not go onto the blockchain unless some fraud has occurred or someone is unresponsive. None of the conditions of a commitment transaction (all of the ...


2

I haven’t played the whole HTLC thing through, but was starting easy: try to create a redeem script, and the condition shall be, that a hash is checked with „equal verify“. Only play on testnet/regtest! My example below is on unixoide systems, at the command line with bitcoin in regtest mode. I have done this with "bitcoin_cli -version": v0.15.1 Attention, ...


2

So the question is: are commitment transactions between two nodes revoked through hashlocks or through private keys exchange? Either way will work, but hashlocks are simpler. They're described in section 4 of the paper you linked. In a private key exchange-based system, you need to store every breach remedy transaction, (about 250 bytes) but in a hashlock ...


2

The dust limit is an externality to lightning wich the protocol has to respect. In fact if a commitment transaction would encode an htlc below the dustlimit you could not force close the channel as the Bitcoin network would not accept that particular transaction. When it comes to htlcs below the dustlevel we work with a little trust in the payment channel. ...


1

How then further transactions can happen without waiting for the secret R? Does it mean that the HTLC contracts get simply "carried over" in the subsequent transactions between A and B? Yes, that is correct. You go on adding HLTC outputs in the commitment transactions as more and more HTLCs are added, and delete those HTLCs that are either fullfiled with a ...


1

An HTLC always "freezes" funds. It is a smart contract that says "here is the balance and a hash. If you give me the preimage of that hash within time T, the balance is yours. Otherwise I can take it back.". You can then use this functionality to achieve an atomic swap by going through a service node that is active in both networks and offers to swap ...


1

As far as what I have seen, nodes do not exchange their htlcsignatures (although we can derive the htlc public keys through basepoint). I believe you have overlooked the commitment signed message from bolt 02. From there I quote: When a node has changes for the remote commitment, it can apply them, sign the resulting transaction (as defined in BOLT #3), ...


1

The htlcs are just an additional output in the commitment tx which spends the funding transaction (as you described) So assume Alice and Bob have a channel of capacity 0.1 BTC in which alice owns 0.03 BTC. On chain you have a multisig wallet that has 0.1 BTC and offchain you have a commitment tx with two outputs. 0.03 to alice 0.07 to Bob Let's assume ...


1

Yes... ... But it is going to be a lot of work. First you should look at BIP 199 which defines htlc scripts. However that alone will only tell you how to create a htlc output. But with the transaction itself it is not done. You need to use the right channel state and keys so you could read BOLT 02, 03 and 05 to learn about the peer protocol and messages ...


1

The inputs of a transaction have absolutely no ability to effect the outputs in any situation. They can only define who can spend, not the conditions for how they go about spending it.


1

When a HTLC is created, a new commitment transaction is created. The HTLC is an additional output (script) in this new commitment transaction, in addition to the RSMC and “regular” outputs, and represents the amount that is pending “routing confirmation”. When the HTLC is cleared, another commitment transaction is created, absorbing the HTLC output amount ...


1

You would need to find another party to do the swap. An example: Alice and Bob have accounts on both chains. Alice has Litecoin that she wants to exchange into Bitcoin. Bob has Bitcoin that he wants to trade for Litecoin. Alice tells Bob that she is willing to give him 2.5 Litecoin for 1 Bitcoin. Bob agrees. They both agree that Alice will publish a ...


Only top voted, non community-wiki answers of a minimum length are eligible