Author

Topic: How to track lightning network payment? (Read 157 times)

hero member
Activity: 714
Merit: 1010
Crypto Swap Exchange
May 02, 2024, 11:42:22 AM
#9
Hold your horses, to me it seems there's a way to prove a LN payment between payee and payer:

How to prove that a lightning invoice was paid?

In the realm of the Lightning Network (LN), a Proof of Payment (PoP) serves as a verifiable acknowledgment that a specific transaction has successfully occurred. Lightning payments are atomic meaning that if there is a pre-image received by the payer the payment was surely received by the destination node.

How Does Proof of Payment Work in the Lightning Network?

    1. Invoice Generation by the Payee's Node:

        * The process begins with the creation of a Lightning Network invoice by the payee's node. This invoice is not just a simple payment request but a complex structure comprising various elements crucial for the transaction. One of the critical components of this invoice is a cryptographic hash of a secret, known as the 'payment pre-image'.

    2. Invoice Signing:

        * To ensure authenticity and prevent tampering, the payee's node digitally signs the invoice. This signature is a cryptographic proof that the invoice was indeed generated by the actual owner of the node and not an imposter.

    3. Payment and Disclosure of Pre-Image:

        * Once the payer decides to fulfill the invoice, the payment is routed through the Lightning Network to reach the payee. Upon successful receipt of the payment, the payee's node releases the 'payment pre-image' to the payer. This pre-image is essentially the secret whose hash was included in the invoice.

    4. Combination of Invoice and Pre-Image as Proof of Payment:

        * The final step in establishing a Proof of Payment is the combination of the original LN invoice and the payment pre-image. The payer can use these two pieces to prove that a payment was made to the payee. Essentially, with this two pieces of information anyone can verify that the hash in the invoice corresponds to the pre-image provided upon payment, proving that the transaction indeed occurred as claimed.

Why is Proof of Payment Important?

    1. Verification of Payment:

        * PoP is crucial for parties to confirm that the transaction was processed correctly without needing to relying on a third party.

    2. Non-repudiation:

        * With the cryptographic evidence provided by the PoP, the payee cannot deny receiving the payment, and similarly, the payer cannot deny making the payment. This is crucial for dispute resolutions and trust-building in digital transactions.

    3. Security:

        * The cryptographic nature of the invoice and the pre-image ensures that the transaction is secure and resistant to tampering or fraud.

In summary to prove a lightning invoice was paid there are two pieces of information needed:

1. The original Lightning Invoice provided by the node
2. The payment pre-image received by the payer on the successful payment

The Lightning Invoice is easy. This is what the payee presents to you. To obtain the payment pre-image shouldn't be rocket science but don't ask me, someone with more Lightning Network knowledge has to step in. The next mystery is how to mangle both to show the proof.
We'll get there eventually...


Untested (adjust accordingly):
Can a payment through Lightning Network be proved?

A confirmed Lightning Network withdrawal will include the preimage in the hash field. The preimage is a secret value that is generated by the receiver (the node that generated the invoice). This value remains secret until the payment is received. The receiver must reveal this value to collect the payment. That is, a sender can prove a payment was delivered correctly by showing the payment preimage.

Follow these steps to make sure the preimage matches the payment:

[1] Extract the payment hash from the Lightning invoice. You can use any invoice decoding tool, for example: https://lndecode.com/
[2] Take the preimage ("hash" field) displayed in SouthXchange and calculate its SHA256 in hex/binary format (not in text format). You can use any tool for this purpose, for example: https://www.fileformat.info/tool/hash.htm (enter in "Binary hash")
[3] Compare the SHA256 of the preimage calculated in item [2] with the payment hash in item [1]. If they match then the proof is complete.

I assume "displayed in ..." at step [2] is equivalent to your own payment confirmation record (should be obtainable from your own LN node).
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
March 27, 2024, 04:02:42 AM
#8
Assuming that there is a lightning network transaction between two people and they want to make evidence to be available to another person as witness, you can send the txid of bitcoin transaction to the third person which the person can use to trace the transaction on blockchain.
It can neither be used as evidence. How can the witness verify that the merchant indeed requested his coins to be sent at the address provided by the client?

Assuming that there is a lightning network transaction between two people and they want to make evidence to be available to another person as witness
What's the use case here? Is it to be able to prove fraud, for instance when a seller says you didn't pay, while you say you did?
Yes
I can only think of one way, but very few merchants do it: use PGP. The merchant signs a message including the address he wants you to send your coins in. Later, you send them. He cannot deny that's his, as you have a signed, solid evidence.

No, you can't use this in LN. Only the peers (the two LN nodes) can have this information for themselves, and cannot prove it to a third-party.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
March 27, 2024, 03:45:22 AM
#7
Yes
That means you'll also need to be able to prove the seller gave you a certain payment request. I always considered LN to be mainly useful to pay services, and if you pay a service, it's also not possible to prove which deposit address they gave you (unless you get a signed message). Somehow nobody seems to care about that.
legendary
Activity: 1064
Merit: 1298
Lightning network is good with small amount of BTC
March 27, 2024, 03:38:09 AM
#6
Assuming that there is a lightning network transaction between two people and they want to make evidence to be available to another person as witness
What's the use case here? Is it to be able to prove fraud, for instance when a seller says you didn't pay, while you say you did?
Yes
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
March 27, 2024, 03:31:36 AM
#5
Assuming that there is a lightning network transaction between two people and they want to make evidence to be available to another person as witness
What's the use case here? Is it to be able to prove fraud, for instance when a seller says you didn't pay, while you say you did?
member
Activity: 66
Merit: 5
Eloncoin.org - Mars, here we come!
March 27, 2024, 02:42:43 AM
#4
Lightning network transactions are true privacy, it's end to end encrypted to to only the two participants in the transaction which means it's not visible to anyone else, hence can not be tracked (explored in the block explorer).

Since lightning network transactions cannot be explored or are not visible in the block explorer, there are lightning network explorers[1] that shows the stats and information about the nodes on the network. You can use any of the LN explorer, there are many of them which include; https://1ml.com/ , https://amboss.space/ , https://lightningnetwork.plus/nodes etc you can use it to know the statuses of your lightning network.


[1] https://lightningwiki.net/index.php/Lightning_Network_explorers
sr. member
Activity: 450
Merit: 220
March 27, 2024, 02:13:55 AM
#3
But how about lightning network? Is there a way it can be tracked?
Check ride the Lightning web app  https://www.ridethelightning.info/. It is a web browser app
It may help you with your query.
hero member
Activity: 2366
Merit: 793
Bitcoin = Financial freedom
March 27, 2024, 02:07:04 AM
#2
I want to use lightning network because of the cheap transaction fee and fast transaction that it has, but I do not think it is possible for third person to trace it which will let me to use the normal transaction that can be tracked using txid.

Even lightning network transactions can be traced via hashes which are unique id for each payment but to track the hashes you need to provide payment channel information and hashes but it's never been as simple as pasting txid on an explorer and seeing the inputs and outputs since LN txs are offline transactions.
legendary
Activity: 1064
Merit: 1298
Lightning network is good with small amount of BTC
March 27, 2024, 02:01:09 AM
#1
Assuming that there is a lightning network transaction between two people and they want to make evidence to be available to another person as witness, you can send the txid of bitcoin transaction to the third person which the person can use to trace the transaction on blockchain. But how about lightning network? Is there a way it can be tracked?  I want to use lightning network because of the cheap transaction fee and fast transaction that it has, but I do not think it is possible for third person to trace it which will let me to use the normal transaction that can be tracked using txid.
Jump to: