AthanorLabs / atomic-swap

💫 ETH-XMR atomic swap implementation
GNU Lesser General Public License v3.0
341 stars 44 forks source link

Why share private view keys? #509

Closed hoonkai closed 9 months ago

hoonkai commented 9 months ago

Hi I went through the protocol description https://github.com/AthanorLabs/atomic-swap/blob/master/docs/protocol.md which indicates that the private view keys are shared so that the other party can check the amount of XMR locked. Why not the public view keys though?

dimalinux commented 9 months ago

@hoonkai This is how Monero works. The public spend and public view keys are directly encoded into the wallet's primary address that you can give people for payment. These public keys do not give access to private information like the wallet's balance. To view balances from transfers into the wallet, you need access to the private view key. To spend funds in the wallet you need access to both the private spend key and the private view key. (Note: In most wallets, the private view key is derived from the private spend key, in which case having access to the private spend key is sufficient to spend funds.)