2

On my site I want to allow two parties to trade between each other without me posing as a middle man. That means that vendor would provide his own address to which a negotiated amount would be deposited. My site would only scrape the public bitcoin transaction list for given address to find out if the payment was done to trigger post processing on my site.

Since people generally reuse bitcoin addresses, checking an immediate balance will not give me a proof that transaction really came through, thus I want to parse all transactions for a given address, filter out those transactions that are older than defined time frame (assume I have timestamp of offer's creation time) and calculate the sum from the rest.

Is this a valid solution or am I missing something?

  • Transactions as such have no timestamp. Only blocks have a timestamps in their headers, which is not accurate. Maybe you should check the payment protocol (bip70). – Stefan Feb 1 '16 at 7:13
2

Why not require the merchant to have a unique address and not allow reuse? They could give you an xpub so you can generate them yourself if that's easier. You don't care if the buyer reuses her address.

I'd be careful with depending on time frames. That sounds fragile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.