Difference between revisions of "Confirmation"

(Created page with "After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network. When that happens it is said that the transaction has...")
 
 
(47 intermediate revisions by 5 users not shown)
Line 1: Line 1:
After a transaction is broadcast to the Bitcoin network, it may be included in a block that is published to the network.
+
'''Bitcoin transaction confirmation''' is the process of finalising a transaction - with an economically expensive attestation - by the Mining network that the transaction is valid, and does not conflict with any previously seen transactions. One of the key functions of Bitcoin, is that it solves the problem of [[Double-spending|double-spending]] by establishing the order in which conflicting transactions have been publicly broadcast on the network. [https://bitcoinsv.io/bitcoin.pdf], i.e. the risk that a digital currency token may be copied and spent more than once. In spite of having no central authority to verify that its tokens are not being duplicated, Bitcoin successfully avoids double-spending through a system of distributed transaction confirmation, based on the [[Nakamoto Consensus|consensus]] of a network of validators. Bitcoin SV transaction confirmation time cannot be precisely predicted. However, once a transaction has been relayed around the network it has a high probability of being included in the next mined [[block]] if the including transaction fee is sufficient to satisfy most Miners.
When that happens it is said that the transaction has been mined at a depth of 1 block.
 
With each subsequent block that is found, the number of blocks deep is increased by one.
 
To be secure against [[double spending]], a transaction should not be considered as '''confirmed''' until it is a certain number of blocks deep.
 
  
Note that unconfirmed transactions do not [[Transaction expiration|expire]].
+
==How Bitcoin transactions are confirmed==
 +
A transaction is the exchange of information between parties. That information can be a quantity of [[Satoshis}, tokens or data of some other kind. Confirmation occurs when that transaction is included in a block that is added to the Bitcoin [[Blockchain]]. When a user wishes to have a transaction confirmed, the complete transaction is broadcast from their wallet to Miners in the network who verify that it is valid.
 +
Once validated, [[Mining|Miners]] will decide whether or not to include this transaction in their block template and attempt to mine it.
 +
When a Miner discovers a block that includes the transaction, it is considered '''confirmed'''. Each time a new block is added to the chain, the transaction is said to be confirmed again with the number of confirmations, being the number of blocks added to the ledger that build upon the block containing the transaction. This generally considered to be a measure of how difficult it would be for a dishonest Miner to invalidate the transaction by mining a longer competing chain containing a double-spend.
  
=Number of Confirmations=
+
== Bitcoin SV confirmation time ==
 +
Typically, a transaction that is sent to the network with fees that adhere to the acceptance rate of X% of the network's hash rate, will have X% chance of being mined in the next block.
  
The classic bitcoin client will show a transaction as "n/unconfirmed" until the transaction is 6 blocks deep.
+
For example, if it is known that 20% of nodes will accept transactions at a given fee rate, the user can assume that there is a 20% chance of it being included in the next block, or conversely that it is likely to be mined in 1 of the next 5 blocks, or within a 50 minute timeframe.
Merchants and exchanges who accept [[trade|bitcoins as payment]] can and should set their own threshold as to how many blocks are required until funds are considered confirmed.
+
For users whose transactions are less time critical, this is a mechanism to reduce transaction fees, especially in high volume applications.
When potential loss due to double spending as nominal, as with very inexpensive or non-fungible items, people may choose not to wait for a transaction to be confirmed, and complete the exchange as soon as it is seen on the network.
 
Most [[:Category:Exchanges|exchanges]] and other merchants who bear the risk from double spending require 6 or more blocks.
 
  
There is nothing special about the default, often-cited figure of 6 blocks. It was chosen based on the assumption that an attacker is unlikely to amass more than 10% of the hashrate, and that a negligible risk of less than 0.1% is acceptable.
+
==Confirmations in commerce==
Both these figures are arbitrary, however;
+
Transaction confirmations are a means for receivers to gain assurance that the information they have received is valid, [[immutable]], and backed by the proof of work on the network. For most applications, including small to medium value commerce, confirmations are not required, however many businesses including cryptocurrency exchanges will make users wait for up to 6 confirmations before accepting funds for trade. Importantly, it is up to the user to set their own comfort threshold for doing business.
6 blocks are overkill for casual attackers, and at the same time powerless against more dedicated attackers with much more than 10% hashrate.<ref>[https://bitcoil.co.il/Doublespend.pdf Analysis of hashrate-based double-spending]</ref>
 
 
 
Freshly-mined coins cannot be spent for 100 blocks.
 
It is advisable to wait some additional time for a better chance that the transaction will be propagated by all nodes.
 
Some older bitcoin clients won't show generated coins as confirmed until they are 120 blocks deep.
 
 
 
==How Many Confirmations Is Enough==
 
 
 
Transactions with 0/unconfirmed can be reversed with not too much cost via [[Irreversible_Transactions#Attack_vectors|Finney attack and race attack]], but in some cases may still be acceptable especially for low-value goods and services, or ones which can be clawed back.
 
 
 
For transactions with confirmations, the website (https://people.xiph.org/~greg/attack_success.html) can be used to calculate the probability of a successful doublespend given a hashrate proportion and number of confirmations. Note that in the reality of bitcoin mining today, more than 6 confirmations are required. (60 confirmations to have <1% odds of succeeding against an entity with 40% hash power). See Section 11 of the (https://bitcoin.org/bitcoin.pdf bitcoin whitepaper) for the AttackerSuccessProbability formula.
 
 
 
Some mining enterprises may hide their hash power across several mining pools. Also mining [[Mining#ASIC_Mining|ASICs]] can be temporarily overclocked to increase their hash power. This is less power-efficient but could be used for a brief burst of hashrate. For maximum safety, it is recommended that for the irreversible sale of items with value comparable to the block reward, a large number of confirmations (144 blocks = 1 day) is required before completing the exchange.
 
 
 
See also: [[Irreversible Transactions]]
 
 
 
=Confirmation Times=
 
 
 
Each additional confirmation is a new [[block]] being found and added to the end of the [[blockchain]].
 
 
 
Miners create blocks by solving the [[proof of work]] for their proposed block. The block interval has an average of 10 minutes but not every block interval is exactly 10 minutes. It follows a statistical process known as a [https://en.wikipedia.org/wiki/Poisson_point_process poisson process], where random events happen with the same probability in each time interval. Another way of expressing this is that the mining process has no memory, at every second a block has the same chance of being found. Poisson processes are well-understood but can be unintuative.
 
 
 
[[File:Block-interval.png|600px|center|alt text]]
 
 
 
There are lots of block intervals with a time less than 10 minutes but then a few block intervals much longer which bump up the average to 10 minutes. So the bitcoin network can get unlucky and a block won't be found for a whole hour.
 
 
 
[[File:Block-cumulative-interval.png|600px|center|alt text]]
 
 
 
In a 10 minute interval, the probability of a block being found is about 63% (or 1 - e^(-1)). So approximately two-thirds of the time a block will be found in 10 minutes or less. In 30 minutes a block has a 95% chance of being found, which rises to 99.7% if the time interval is 60 minutes.
 
  
 
=See Also=
 
=See Also=
  
* [[Blocks]]
+
* [[block|Blocks]]
* [[Transaction]]
+
* [[Bitcoin Transactions|Transaction]]
 +
* [[Merchant API]]
  
 
=References=
 
=References=
<references />
+
[1] Nakamoto, Satoshi. "Bitcoin: A Peer-to-Peer Electronic Cash System."
 +
 
  
 
[[Category:Technical]]
 
[[Category:Technical]]

Latest revision as of 02:14, 22 April 2022

Bitcoin transaction confirmation is the process of finalising a transaction - with an economically expensive attestation - by the Mining network that the transaction is valid, and does not conflict with any previously seen transactions. One of the key functions of Bitcoin, is that it solves the problem of double-spending by establishing the order in which conflicting transactions have been publicly broadcast on the network. [1], i.e. the risk that a digital currency token may be copied and spent more than once. In spite of having no central authority to verify that its tokens are not being duplicated, Bitcoin successfully avoids double-spending through a system of distributed transaction confirmation, based on the consensus of a network of validators. Bitcoin SV transaction confirmation time cannot be precisely predicted. However, once a transaction has been relayed around the network it has a high probability of being included in the next mined block if the including transaction fee is sufficient to satisfy most Miners.

How Bitcoin transactions are confirmed

A transaction is the exchange of information between parties. That information can be a quantity of [[Satoshis}, tokens or data of some other kind. Confirmation occurs when that transaction is included in a block that is added to the Bitcoin Blockchain. When a user wishes to have a transaction confirmed, the complete transaction is broadcast from their wallet to Miners in the network who verify that it is valid. Once validated, Miners will decide whether or not to include this transaction in their block template and attempt to mine it. When a Miner discovers a block that includes the transaction, it is considered confirmed. Each time a new block is added to the chain, the transaction is said to be confirmed again with the number of confirmations, being the number of blocks added to the ledger that build upon the block containing the transaction. This generally considered to be a measure of how difficult it would be for a dishonest Miner to invalidate the transaction by mining a longer competing chain containing a double-spend.

Bitcoin SV confirmation time

Typically, a transaction that is sent to the network with fees that adhere to the acceptance rate of X% of the network's hash rate, will have X% chance of being mined in the next block.

For example, if it is known that 20% of nodes will accept transactions at a given fee rate, the user can assume that there is a 20% chance of it being included in the next block, or conversely that it is likely to be mined in 1 of the next 5 blocks, or within a 50 minute timeframe. For users whose transactions are less time critical, this is a mechanism to reduce transaction fees, especially in high volume applications.

Confirmations in commerce

Transaction confirmations are a means for receivers to gain assurance that the information they have received is valid, immutable, and backed by the proof of work on the network. For most applications, including small to medium value commerce, confirmations are not required, however many businesses including cryptocurrency exchanges will make users wait for up to 6 confirmations before accepting funds for trade. Importantly, it is up to the user to set their own comfort threshold for doing business.

See Also

References

[1] Nakamoto, Satoshi. "Bitcoin: A Peer-to-Peer Electronic Cash System."