I have been thinking about Diem/Move, and have been reading on how to really track a transaction (not in forensics way, but in e-commerce way). Let me explain a bit here.
Let's say Bob is a guy who sells products, and Alice is a customer of Bob. Bob has built an online platform where he can accept payments in Libra.
In Libra docs here, it says a transaction consists of,
- Alice's account address
- Bob's account address and the amount of payment
- Gas price
- Maximum gas amount
- Expiration time, and
- Sequence number
This is all good, but my question is this:
Bob won't have Alice's address stored when Alice makes a payment (especially if Alice is a new customer). Conversely, a third person (Jenna) could be making a purchase (with the same SKU) at the same time as Alice. If a Libra transaction only consist of sender's account address, How does Bob track that his transaction with Alice, and the subsequent payment he received from Alice, is actually Alice's (and not Jenna's)? Note that he won't have these account addresses on file, especially if both are new customers.
A simple way would be to assign a transaction ID as some sort of metadata when Bob requests that each of them pay him, so Bob can track against that transaction ID. But is this even possible?
I'm sure this exists in some form or another, since we have Bitcoin payment systems.
I'm Bob so I feel qualified to answer this.
Bob generates his master merchant wallet. From this prrivate key he can generate many other wallets, all accessible from that same private key. For each new customer (Alice, Jenna) he will generate one of these new wallets (trivial to do, with a nearly infinite amount of wallets that Bob can create from just his one private key). With a newly generated wallet, he will share the wallet address with one customer and take note that he sent Alice the address for wallet 1A and wallet address 1B to Jenna. Then, using a blockchain explorer he can know that when 1A receives funds, that it was in fact Alice who paid him.
You may have seen in some brick and mortar locations when they have to the option for customers to pay with cryptocurrency, that the customer scans the merchants QR code (public facing wallet address) and sends to it. Each time a customer sends to the merchant address, the merchant should be generating a new wallet to display to the next customer for reasons of both privacy and tracking which customer's have paid what.