CommercePractice

Hedge By Bitcoin | Memberswill go by tor | RecentChanges | Join |

The number of confirmations is somewhat misleading by many cryptocurrency enthusiasts. Many people think any transaction with 1 or 6 blocks deep buried in the block chain is trustworthy, however it is not that naive. Trust is always about the cost of betray. Let the block reward be 50 and the average block fee 1.9977 coin, suppose a pizza is priced at USD 10 and a coin is at an exchange rate USD 0.001 per coin so that the pizza is priced at 10000 coins. Even the legit transaction is of 6 confirmation deep, the buyer of the pizza could still defraud the merchant by the following steps.

  1. Previously, prepare a transaction with fee 5010 coins (5.01 USD) which sends the 10000 coins back to himself.
  2. Send the legit pizza transaction to the pizza merchant with fee 10 coin, 0.01 USD
  3. The merchant will see the pizza transaction in many nodes to assure the coin is legit and deliver the pizza after that. The merchant delivers the pizza after 6 confirmation (60 minutes in bitcoin case).
  4. The pizza buyer defraud the merchant by sending the defraud transaction

All miners will roll back the 6 blocks because they all want the 5000 more coins. After all, there are only 311.9862 coins earned in the last 60 minutes. While miners replace the legit transaction and remine everything else, they could earn 5000 more coins. The buyer gets a pizza at the cost of 5.01 USD while he should get a pizza at the cost of 10.01 USD.

Denote

  • Ci the block reward of era i
  • F the average block fee
  • T the block interval time
  • t the additional time the merchant shall be waiting to assure legit coin after the merchant sees many mining nodes commit mining cost to the legit transaction
  • S the price of the service/goods of the merchant
  • h the ratio of the miners among all the network hash
  • g the fee difference of the defraud transaction minus the legit transaction

Then to have an incentive to replace the legit transaction with the defraud one, the miner shall have on the probability expectation:

h×g>(C i+F)×hT×th \times g> \frac{(C_i+F) \times h}{T} \times t

i.e.

g>C i+FTtg>\frac{C_i+F}{T}t

But a rational defrauder shall set the g less than S, therefore it suffices to conduct a defraud-free transaction by a longer time t before the service delivery:

C i+FTt>S\frac{C_i+F}{T}t>S

Simplify,

t>SC i+FTt>\frac{S}{C_i+F}T

The lower the S, the shorter the t, confident even without one confirmation when t is less than T. In the above pizza case, the merchant shall wait for 115390 seconds, about 1 and 1/3 days or 192 blocks, before the pizza delivery. As long as nodes claim no double spending for this legit transaction during the timeframe, merchants needn't worry about which chain is the would-be correct chain in case there are temporary competing blocks. Note that this conclusion has nothing to do with block size because the average block fee is irrelevant to block size. In the ultimate case where block reward is zero, contrary to those engineers who claim a utility token coin capable of fast confirmation with high confidence, the t is even irrelevant to the block interval time or the choice of cryptocurrency because of the mentioned conclusion . Only real-term price of the goods and the time preference matter; simplify then we have:

t>SqVt>\frac{S}{q V}

This shall be applicable to typical fiats transaction as well.


The above reasoning assumes the miners offer the service of answering the inquiry about the already-mining time for a specific transaction or simply have the built-in system to drop the double-spent transaction based on the additional fee. But so far, the mining industry is not matured enough; currently (2016~) mining is typically a gold-rush industry and they don't realize they are in fact the trust production industry. So, what to do?

Define the timing with respect to the time spot of the last block which is also the time spot the latest mining work starts.

  • r be the timing when the first legit transaction is received
  • t be the time span between the first and the double-spent transaction
  • T the remaining time the block of the latest mining work will find after r. This is the conditional random variable of block time: (block time | block time >r) - r
  • F be the probability distribution of T
  • be the fee per minute when the mining about the first (legit) transaction is wasted
  • be the fee per minute when the parking in the memory pool about the first transaction is wasted
  • f be the miner's operation cost per minute

Dependent on T, the first transaction is parking or is committed mining work with. Should t<T then miners switch the transaction without wasting the mining task because the mining starts later timing T and the first transaction is still parking in the memory pool. The mining time and parking time random variables that the double-spent transaction shall pay are:

  • mining time, t - T if T < t and 0 if otherwise
  • parking time, T if T < t and t if otherwise

The sum of the two random variables is always t. The average total cost is which shall be equal to ft.

For example, should the block time random variable be 10 minutes sharp and the miner sets and without honoring the ft, then the average cost is . Typically, the average cost will be dependent on the value of r but for exponential distribution with average 10 minutes, the conditional random variable T is irrelevant to r and the above calculation is then

Again, as an example without honerring the ft, this table below may be for the merchants about the intentional delay time for deliver service or for the miners about the additional fee to accept the double-spent transaction:

f1 2.69977 =(25+1.9977)/10
f2 0
t additional fee or S
0 0.00000000
0.1 0.00134540
0.2 0.00536372
0.3 0.01202838
0.4 0.02131304
0.5 0.03319163
0.6 0.04763835
0.7 0.06462763
0.8 0.08413418
0.9 0.10613296
1 0.13059916
1.1 0.15750823
1.2 0.18683587
1.3 0.21855802
1.4 0.25265083
1.5 0.28909074
1.6 0.32785437
1.7 0.36891862
1.8 0.41226059
1.9 0.45785761
2 0.50568725

Mining business owners can estimate their operation cost per minute f, typically the block revenue for 10 minutes, and set and to be this number to have simpler pricing and business management. In fact, people outside the mining business may not distinguish mining and parking unless being blockchain geeks and miners themselves may move the transaction multiple times between the two tasks due to transactions selection. That is, if the second double-spent transaction is received after t minutes of the first transaction, regardless to complex details, the additional fee shall be at least ft thanks to the simple fact that time length of t is wasted for whatever reasons. The real mechanism to prevent double-spent is always economics rather than ridiculous mirage developed by programmers.