Bitcoin Forum
May 15, 2024, 07:29:40 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to reveal / prove the amount of bitcoin in a lightning address  (Read 274 times)
unrealisticexpectations (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 55


View Profile
January 21, 2022, 12:50:20 PM
Merited by LoyceV (4), hugeblack (4), o_e_l_e_o (4), BlackHatCoiner (4), dkbit98 (3), pooya87 (2), ABCbits (2), Welsh (1), Pmalek (1)
 #1

Hello, I have a question that crossed my mind already a few times. I tried to search the answer but I did not end up with anything conclusive, so here we go

On the bitcoin mainchain proving ownership of a certain amount of BTC is an easy operation since all the data is publicly available.
This can be incredibly useful for exchanges and various bitcoin related business since they can publish publicly auditable data amount of much they have in their cold storage.

My question is: I know the lightning network works differently, but would there be a way to "prove" I own a certain amount or even revealing the balance? If so what would be the process? Sure I could publish somewhere the balance but then again you would need to trust me to publish the right number.

jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
January 21, 2022, 12:56:05 PM
Merited by o_e_l_e_o (4), pooya87 (2), ABCbits (2), mocacinno (1), Pmalek (1)
 #2

I think this has been attempted to be proven by sending multiple htlcs to a channel and seeing if it has capacity. I don't know if it still works though or if some adjustments have been made to try to better hide where some funds are stored.
mocacinno
Legendary
*
Online Online

Activity: 3388
Merit: 4923


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
January 21, 2022, 12:59:46 PM
Merited by hugeblack (4), o_e_l_e_o (4), pooya87 (2), ABCbits (2), Pmalek (1)
 #3

You can see how much capacity the public channels between nodes have... But that's the best you can do without "tricks" (like jackg explained).

You cannot see the capacity of private channels (unless you know the transaction used for opening the private channel), nor is there a way that i know of to know how much each node has in each channel.

It might be a "wrong" idear to think about the lightning network in terms of "addresses"... The addresses that get funded when opening a channel are proving of the capacity of the channel, that's about it.

If you're just interested in capacity, there are many lightning network explorers around... Here's my node's public channel list: https://1ml.com/node/03301e633b25d769377bf75ce6b6ed2ec570270bc06c8c02bf33c5bd2aa47da098

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
unrealisticexpectations (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 55


View Profile
January 21, 2022, 01:11:30 PM
Merited by LoyceV (2)
 #4

Thank you for your answers Smiley

My main interest is to accept donation for a goal on my website and I would like to be transparent to the public. With the main chain anyone can easily check how much was received / sent and know if we reached the goal.

Adding support for lightning would help a lot since it would enable people to send micro transaction however there would be as I understand no ways to know exactly how much was received and they would have to trust that I publish the correct numbers.

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7366


Farewell, Leo


View Profile
January 21, 2022, 01:44:04 PM
 #5

First off, there's not such thing as a lightning address. It's called lightning invoice. As for your issue, this is an excellent question.

Let's start with what it means to have a balance in the Lightning Network. Once you open a channel, you have a sending capacity equal with approximately the amount of funds you deposited, say 0.1 BTC. Let's assume you convert this to receiving capacity by spending the entire sending capacity for on-chain BTC. This would increase your receiving capacity by 0.1 BTC.

Each time you make a Lightning transaction, your local balance changes. Once someone donates you 0.02 BTC, your receiving capacity becomes 0.08 BTC. Thus, if you don't spend from this “donation channel”, your donations will be equal with 0.1 - receiving capacity BTC.

I believe there must be a better answer.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
mocacinno
Legendary
*
Online Online

Activity: 3388
Merit: 4923


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
January 21, 2022, 02:01:21 PM
 #6

--snip--
I believe there must be a better answer.

I'm not sure there is... I've been racking my brain over OP's previous post... It's something i had never actually tough about. How to prove to the outside world that you received a donation...

Internally, you have a big toolset that allows you to obtain your "balance" (in c-lightning, for example, you use "listfunds" for your funds, and "listinvoices" for invoices). Even if you didn't have such a toolset, you'd have the commitment transactions (which you cannot publicize, ever).

An invoice doesn't contain any info that'll enable an outsider to steal from you, but it can contain sensitive info (like, for example, private channels and descrptions), and afaik it does not prove the invoice was payed.
I guess maybe the only "hard" evidence of receiving donations is that if you setup a node for the sole purpose of receiving donations, you'll have the closing transactions funding your addresses on-chain each time a channel gets closed. I guess setting up a node for the sole purpose of receiving donations might pose it's own difficulties tough: for example, you'll need people to open channels to your node with enough capacity to send those donations, so you'll probably have to invest some funds into swaps or something? If not, you won't have enough inbound liquidity...

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7366


Farewell, Leo


View Profile
January 21, 2022, 02:13:33 PM
 #7

I guess maybe the only "hard" evidence of receiving donations is that if you setup a node for the sole purpose of receiving donations, you'll have the closing transactions funding your addresses on-chain each time a channel gets closed.
But this doesn't answer on how to prove the amount of owned coins in a channel. It proves the amount owned by an address. I think the answer is rather simple than complex: You can't. LN-BTC is an IOU. You can't have a hard evidence without introducing trust between the donators and the owner's lightning node.

That's why Lightning transactions are considered private. Because there's no way for outsiders to grope your business.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
mocacinno
Legendary
*
Online Online

Activity: 3388
Merit: 4923


https://merel.mobi => buy facemasks with BTC/LTC


View Profile WWW
January 21, 2022, 02:28:41 PM
 #8

I guess maybe the only "hard" evidence of receiving donations is that if you setup a node for the sole purpose of receiving donations, you'll have the closing transactions funding your addresses on-chain each time a channel gets closed.
But this doesn't answer on how to prove the amount of owned coins in a channel. It proves the amount owned by an address.

--snip--
i agree completely... The point i tried to make is that you can basically proof that you've closed x channels in the last 12 months and that your addresses were funded x times with a total value of y satoshi's. This doesn't mean anything for the single donation, there is no way of proving Bob donated 100 sats to Alice. However, if Alice wants, she can proof ownership of all addresses that were historically funded with unspent outputs coming from closing transactions of a bunch of channels, thus she can semi-proof she's receiving donations. Especially if she creates signed messages with the address getting funded with the (on-chain) closing transaction and matches these with messages signed with addresses whose unspent outputs were used for the (on-chain) opening transactions. Even if she can only provide signatures for the addresses getting funded by the closing transactions, you can still calculate how much value was transferred between the two nodes during the life of the channel.

Defenately not conclusive proof tough (since i see a lot of opportunity to fake this "proof"), nor is it any proof for the individual donator....

So, yeah, OP, you might end up hoping your users will trust your word when you say you received donations...
If this really is an issue, you can think about hiring a trustworthy escrow to receive your donations and periodically pay all donations using an on-chain transaction + a message signed by the escrow about the specifics of the donations? This doesn't solve your issue on a techical level tough, but it might be a workaround that's worth looking into?

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
unrealisticexpectations (OP)
Newbie
*
Offline Offline

Activity: 18
Merit: 55


View Profile
January 26, 2022, 09:52:20 AM
 #9

Hi, thank you for your answer.

I was thinking something along the line of what was suggested here. Sadly using an escrow kind of defeat the idea of not having to trust anyone. I could also sign any invoice received and publish on mainchain the hash when closing the channel.

Maybe I could offer mainchain donations and lightning donation. For a big amount you can do it on mainchain, for low amounts you probably do not need that level of trust and so you can do it on lightning.

But this also open the question: If I as a client pay on lightning and the merchant pretend to not have received the money, could I use a proof that I paid / sent the amount required without using trusted third party?
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
January 26, 2022, 10:17:45 AM
Merited by LoyceV (4), BlackHatCoiner (2), mocacinno (1), ABCbits (1)
 #10

But this also open the question: If I as a client pay on lightning and the merchant pretend to not have received the money, could I use a proof that I paid / sent the amount required without using trusted third party?

The receiver (merchant) generates a secret and makes a hash of it. Then, that hash is put in the invoice and used in HTLCs during routing. So, as the sender, you can prove that you have paid the invoice if you provide the secret and the invoice.

Lightning invoices are signed by the node which generates them. It is impossible to modify the amount, the payment hash or the destination as it would invalidate the signature, which is included in the invoice.
LoyceV
Legendary
*
Offline Offline

Activity: 3304
Merit: 16658


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
January 26, 2022, 03:03:12 PM
 #11

But this also open the question: If I as a client pay on lightning and the merchant pretend to not have received the money, could I use a proof that I paid / sent the amount required without using trusted third party?
Don't you have the same problem when you pay on-chain? Most services that accept Bitcoin don't sign a transaction to prove they own the address they give you, so if for instance an exchange gives you an address and changes it after funding, you can't really prove it either.

Lightning invoices are signed by the node which generates them. It is impossible to modify the amount, the payment hash or the destination as it would invalidate the signature, which is included in the invoice.
Does this mean it's easier to prove you paid to a certain LN node (and thus a certain service provider) than it is on-chain?

Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
January 26, 2022, 03:42:06 PM
Merited by ABCbits (1), AdolfinWolf (1)
 #12

Does this mean it's easier to prove you paid to a certain LN node (and thus a certain service provider) than it is on-chain?

Yes. Service providers can claim that they do not own a particular on-chain address as they are not forced in any way to sign a message with it.

If the destination node id (a public key) is not encoded directly in the invoice, it is recovered from the message (invoice data) and the signature. If the public key is included in the invoice then the signature recovery is omitted and the signed message is verified.

As per specifications, wallets are required to validate the signature. If the validation fails, the invoice should not be paid.

Requirements:
A reader:
    MUST check that the signature is valid (see the n tagged field specified below).
DaveF
Legendary
*
Offline Offline

Activity: 3472
Merit: 6273


Crypto Swap Exchange


View Profile WWW
January 29, 2022, 01:08:53 PM
 #13

Thank you for your answers Smiley

My main interest is to accept donation for a goal on my website and I would like to be transparent to the public. With the main chain anyone can easily check how much was received / sent and know if we reached the goal.

Adding support for lightning would help a lot since it would enable people to send micro transaction however there would be as I understand no ways to know exactly how much was received and they would have to trust that I publish the correct numbers.

For years people have been able to donations on websites and people have had to take it on trust.

If you had a PayPal email address or a way to process credit cards or the ability to take mail in donations as someone coming to your site I have no way of being sure the numbers / amounts you have up are accurate or if you are posting all of them or some of them or making up higher numbers.

Yes, I could probably go get a lawyer to come up with some reason to take you to court to get you to disclose the information but that is expensive and can take years.

Lightning is supposed to be private. Trying to force it not to be is going to take more time / effort and still not be perfect.
You can either post a BTC address that everyone can see and it's all out there. And if you want to take smaller amounts, post a DOGE or LTC address. It's all public and easy to track. OR you take lightning and it's private. OR you can do all of the above.

But making lighting information public is trying to put a round peg in a square hole.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
AdolfinWolf
Legendary
*
Offline Offline

Activity: 1946
Merit: 1427


View Profile
February 01, 2022, 07:21:37 PM
 #14

Quote
My question is: I know the lightning network works differently, but would there be a way to "prove" I own a certain amount or even revealing the balance? If so what would be the process? Sure I could publish somewhere the balance but then again you would need to trust me to publish the right number.

Hmm. It's not foulproof but I guess you could publish all of the received individual donations in terms of invoices (and sum the amounts)? If you exclude a certain invoice then that would be proveable by the individual who paid the invoice as he could reveal the invoice (which is routed to your node's pubkey) + secret?

Not sure what this would prove as it does not at all imply that you used the donated funds as intended, something that could much easier be tracked if you were to be using an on-chain address.
though here you could also most definitely probably publish the invoice of it going to charity xyz's node (along with the secret to prove it was infact paid)

BlackHatCoiner
Legendary
*
Offline Offline

Activity: 1512
Merit: 7366


Farewell, Leo


View Profile
February 01, 2022, 09:17:09 PM
 #15

Hmm. It's not foulproof but I guess you could publish all of the received individual donations in terms of invoices (and sum the amounts)?
Don't you have to trust that all these are paid invoices? Yes, a user could provide an invoice you haven't included, which I don't see it ever happening, but anyway: How can the viewers verify that the invoices have been properly paid?

You can neither be sure even with a Bitcoin address. You can't know if the administrator hasn't changed the donation addresses before you visit the website for the first time. Some don't even have a unique one, but generate new for each visitor which is how things should work.

I really don't find a reason to lie. You're instantly becoming unlikeable if you lie for your own charity.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!