blink icon indicating copy to clipboard operation
blink copied to clipboard

proof of reserve

Open nicolasburtey opened this issue 4 years ago • 5 comments

Reach out on slack if you're interested in the bounty

Proof of reserve is key for the success of bitcoin. To understand why, some useful reading: https://niccarter.info/wp-content/uploads/Proof-of-Reserves-.pdf

https://github.com/olalonde/proof-of-assets https://blockstream.com/2019/02/04/en-standardizing-bitcoin-proof-of-reserves/

Some idea of how this could be rolled out progressively:

Step 1 (proof of liabilities): Proof of reserve with public account listing. This is what Coinfloor is currently doing. one hash per user, so that each user can verify that their balance has been included correctly

Step 2 (proof of reserve): For every UTXO on our onchain wallet, sign a message showing the wallet own the UTXO For lnd wallet, more research is being needed: https://github.com/lightningnetwork/lnd/issues/5391 (TODO: look at how this should be published?)

Step 3 (better proof of liabilities): Instead of publishing the whole list of hashed user with amount, use a merkle tree and only published the merkle root. This would require adding an API so that the user can send his hash, and can receive the merkle path and the balance so that the client can verify that their balance has been included themselves

Step 4 (zero knowledge proof: improve the privacy by not disclosing the total amount): This is the difficult part. Step 2 and 3 involves that the total amount is published to the world (or the user at least). This would be preferable to have a proof that the total assets is >= than the total liabilities without having to disclose the total balance.

nicolasburtey avatar May 12 '21 07:05 nicolasburtey

Idea for Proof of Liabilities

Use blockcerts algorithm to create the Merkle tree proposed in step 3

Steps to create the proof

  1. Create a hash for each wallet (id of wallet or username, balance, date, time)
  2. Create a Merkle tree
  3. Save the Merkle tree path for each user, it could be and additional field in user schema or just a plain file uploaded to a publicly available storage (in this case we cant make the proof with the username)

or just use the blockcert library

  1. Include the Merkle root hash in the same procedure of proof of reserve

Steps to validate

  1. Add an additional setting in mobile app to:
  • allow the user to download the proof of reserve (for his/her wallet)
  • view the content of the proof/certificate
  1. Create and publish a validation tool or... just copy or use blockcerts validation tool

dolcalmi avatar Jul 26 '21 19:07 dolcalmi

https://blog.bitmex.com/addressing-the-privacy-gap-in-proof-of-liability-protocols/

nicolasburtey avatar Aug 12 '21 12:08 nicolasburtey

https://blog.bitmex.com/addressing-the-privacy-gap-in-proof-of-liability-protocols/

https://github.com/BitMEX/proof-of-reserves-liabilities

dolcalmi avatar Aug 12 '21 19:08 dolcalmi

https://blog.bitmex.com/proof-of-reserves-liabilities-bitmex-demonstration/

jrbuhl93 avatar Aug 14 '21 16:08 jrbuhl93

Should be looked at: https://github.com/jakecraige/provisions

nicolasburtey avatar Apr 25 '22 00:04 nicolasburtey

@nicolasburtey can we close this?

sandipndev avatar Nov 01 '22 10:11 sandipndev

I think so but we should copy the documentation/link maybe to the poof of sats repo in a RESEARCH.md (or another better name)

nicolasburtey avatar Nov 01 '22 10:11 nicolasburtey

this will be implemented in other layers (bria, cala) so closing this ticket.

nicolasburtey avatar Sep 19 '23 19:09 nicolasburtey