Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BitCoin: how quickly are transactions verified? [closed]

I am curious if BitCoin transfers can occur in real-time. The example I am thinking of is much like paying for coffee at Starbucks using a QR code on your smartphone. The 2D/3D barcode reader is able to scan the QR code, which deducts the amount from your account. In BitCoin terms, your wallet address would send payment to the Starbucks wallet address.

Can BitCoin transactions be confirmed in real-time? If not, how long does it take? Why does charging a transaction fee change the time?

like image 373
Sun Avatar asked Jan 15 '23 02:01

Sun


1 Answers

Bitcoin transactions are instant - the confirmations aren't. It usually takes less than an hour for the first confirmation.

Someone could try a double spend attack and would have a 50% chance that Starbucks gets the money and 50% chance he gets the money back to his other address he used for the double spend.

This said, starbucks should wait for one confirmation before they'd accept the payment.

A few days ago on #bitcoin or #bitcoin-dev on freenode I saw someone explaining this: They could connect to a few big mining pools, then wait about 10 seconds before continuing, then they should be able to detect double spends if there are any. This decreases double spend risk quite a lot.

Charging a transaction fee will increase the chances that a miner will include your transaction in the block he mines.

A few miners don't include transactions without fees, if you want to ensure that your transaction gets included you should set the fee a bit higher than the enforced fee.

like image 146
Nothing4You Avatar answered Jan 19 '23 11:01

Nothing4You