15 votes
Accepted

"HTLCs don't work for micropayments"?

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 ...
user avatar
15 votes
Accepted

How is a node in the middle prohibited from keeping the money in a routed Payment in Lightning network?

Lightning forwards payments using a construction called a "hashed timelock contract" (HTLC), which allows the payee to redeem the transaction if they know the preimage to a given hash, or allows the ...
user avatar
14 votes
Accepted

What is a hash pre-image as it is used for the breach remedy?

In the image below from Rusty Russell's Deployable Lightning paper, you can see a visualization of the commitment transactions and their outputs: For each payment in a channel, there are two ...
user avatar
8 votes

"HTLCs don't work for micropayments"?

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 ...
user avatar
  • 7,429
5 votes
Accepted

Single-hop Payment vs Multi-hop payments

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 ...
user avatar
4 votes

HTLC (Hash Time Lock Contract) using bitcoin-qt

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 ...
user avatar
  • 11.3k
4 votes

"HTLCs don't work for micropayments"?

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 ...
user avatar
4 votes

Single-hop Payment vs Multi-hop payments

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 ...
user avatar
  • 3,190
4 votes

What would happen to Bitcoin if GPS/Galileo timing ceased to be available?

Bitcoin needs approximately sundial time accuracy to operate. Computers have their own free running clocks which provide more than enough accuracy in the absence of other references, and NTP sources ...
user avatar
  • 15k
3 votes

Possible race condition(double spend) on HTLC-Timeout in the lightning network?

First of all I think there seems to be a small confusion about the notation. One does not spend a transaction but transaction outputs. In the case of offered htlcs the output is only one (of ...
user avatar
3 votes

Basic questions about lightning network HTLC

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 ...
user avatar
  • 60.4k
3 votes
Accepted

HTLC (Hash Time Lock Contract) using bitcoin-qt

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/...
user avatar
  • 4,996
3 votes

In which cases could I find funds locked in a failed route?

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 ...
user avatar
  • 2,423
3 votes
Accepted

Security implications of removing CHECKSIG in a test

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 ...
user avatar
  • 1,794
3 votes
Accepted

Can PTLCs and HTLCs be mixed along a route?

My first instinct was to write that we don't know this as we don't know how the exact protocol for PTLCs looks like but then I realized that unless someone finds a cool trick it will probably be hard ...
user avatar
3 votes

What does the abbreviation "HTLC" stand for?

Using "hashed" makes it sound like the contract itself is hashed. Because the contract uses a hash, but is not itself hashed, I would say the H should stand for "hash". Secondly, ...
user avatar
  • 11.3k
3 votes
Accepted

Taproot PTLC: Non-Multisig partly timelocked spending conditions

Yes, assuming James sends Bob two outputs with the following spending conditions: pk($bob) || (pk($alice) && older(10)) pk($bob) || (pk($carol) && older(10)) Bob can spend these ...
user avatar
  • 62.3k
2 votes
Accepted

Lightning Network: hashlocks vs private keys exchange

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 ...
user avatar
  • 28.6k
2 votes
Accepted

How can I create HTLCs below dust_limit_satoshi in Lightning Network?

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 ...
user avatar
2 votes

Why do we use CLTV instead of CSV in the HTLC output of the commitment transaction?

As you have said yourself, CSV is relative to when the transaction appears in the blockchain, while CLTV is absolute. They just have different meanings, which are useful for different things: The ...
user avatar
2 votes
Accepted

Remote node signature for HTLC-success and HTLC-timeout transactions

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 ...
user avatar
2 votes
Accepted

Can someone explain how an HTLC is redeemed?

There are three ways in which that offered HTLC output can be redeemed: Revocation using the revocation public key (the example you mentioned), redeemed using a valid payment preimage or back to the ...
user avatar
  • 6,898
2 votes

settling timelocked contracts based on amount of time elapsed in Lightning network

Such a functionality is currently not implemented and as far as I understand not intended. You can look at Discreet Log Contracts which where intended to solve CFD (Call for difference) contracts for ...
user avatar
2 votes
Accepted

Why does every HTLC in a commitment transaction require its own signature?

Why isn't the signature for the entire commitment transaction enough? Because the htlc_signature field contains the signature for the HTLC transactions spending from the htlc output(s) (either ...
user avatar
2 votes

Simulate HTLC in regtest c-lightning

In order for you to see these scripts you'll have to force the channel on-chain, along with the HTLC. Only then will the HTLC be swept using the script, otherwise you'll only see the P2WSH output for ...
user avatar
  • 8,694
2 votes
Accepted

Decode script return different value from my relative timelock

decodescript has this behavior because integers in Bitcoin are little endian. So decodescript is telling you what number the script interpreter would use when it processes your script.
user avatar
  • 60.4k
2 votes
Accepted

UNIX END TIME January 19, 2038 - Will it affect Timelock nLOCKTIME smart contracts past that date?

Timestamps in Bitcoin, including block timestamps and nLocktime values, are unsigned 32-bit. The last possible timestamp is Feb 7th 2106, at 06:28:15 UTC.
user avatar
2 votes
Accepted

Unilateral close because of HTLC in remote commitment

Thanks a lot to Rene Pickhardt, who spent some time with me digging into this. When my node A sends out an HTLC to my peer B, this is done using the update_add_htlc message defined in Bolt 02. ...
user avatar
  • 248
1 vote

Why do multihop LN payments start settling from the recipient's end?

I think you have answered your question yourself. If all nodes would behave honestly and in good faith your process would work. But in that case we would not need to go through the hustle of setting ...
user avatar
1 vote

Can someone explain how an HTLC is redeemed?

Check the Script wiki would be helpful. I once did this by hand, here's the process. First, put the unlocking script on top of the locking script, <remotehtlcsig> <payment_preimage> # ...
user avatar

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