15
3
Related Question: What can be done to mitigate the risk of a Finney attack?
The Finney attack is a form of double-spending attack where the attacker pre-mines a block containing a conflicting transaction and then publishes a transaction. A merchant relies on the published transaction to do something irreversible. The attacker then succeeds if he can publish the pre-mined block after the merchant has committed and before the network can find a different block. (The merchant must act irrevocably on a published, but unconfirmed, transaction.)
It has been suggested (by David Perry) that reducing the block generation time will make the network more resistant to this kind of attack. The reasoning is (I assume) that the window in which the attacker can launch the attack, the time after he publishes the transaction and before that transaction gets into a block, would be smaller. However, I don't find this argument convincing.
First, the attacker can stretch the interval by creating a burst of meaningless transactions using older coins or with small transaction fees. He can gather lots of new inputs into his transaction to reduce its priority. Thus, he can make it very unlikely that his published transaction will get in the next block found by the network anyway.
Second, with a faster block generation time, the difficulty will be lower. The attacker has to wait until he's lucky anyway. So maybe he can just wait until he mines two blocks ahead of the network. Then while it's more likely the network will find a block before he can complete his attack, the network has to find two blocks, not just one. And meanwhile, he can keep looking for even more blocks. (Imagine he is conspiring with a mining pool that has, say, 30% of the network's hashing power.)
So what is the correct analysis? Would a faster block generation time really make any difference to the effectiveness of Finney attacks?
Just realized some browsers may not correctly display "σ²" - for those who get blocky nonsense instead of pretty Greek letters that's "sigma squared" or the variance of the normal distribution.
– David Perry – 2011-09-22T16:49:19.443Small correction/addition: the time between two blocks is not distributed normally but follows an exponential distribution with λ=10min^(-1). The standard deviation of this distribution equals the mean time between consecutive blocks - it therefore overlaps regardless of the block time.
– Noah – 2011-09-22T16:57:46.777Sorry, please disregard the last sentence above - I was too slow to edit. What I wanted to add: Since the block generation itself is a Poisson process, the probability of a block being found within any fixed-length time interval is always the same. The time-window for a possible Finney attack therefore scales linearly with the average time between blocks. – Noah – 2011-09-22T17:15:47.633
Good to know, I'll edit my post with this new information. Thanks! – David Perry – 2011-09-22T17:26:13.767
I tried calculating the standard deviation of the time it takes for blocks to be found, but it's hard because the time stamps on blocks isn't accurate. Sometimes the timestamp on a block is earlier than the timestamp on the previous block. See for example blocks 163966 (2012-01-26 19:52:37) and 163967 (2012-01-26 18:41:05). Given this, the average over the last year is 546 seconds, and the standard deviation is 593 seconds. – Chris Moore – 2012-02-07T20:12:01.277