Post
Topic
Board Games and rounds
Re: CoinWallet.eu Stress Test Cancelled + Bitcoin Giveaway
by
basil00
on 13/09/2015, 04:37:02 UTC
I thought this was an interesting experiment, so I tried it: double-spending the 0-conf coinwallet "sweeper" spam. Below is a quick write-up:

You can see the results here:

http://coinsecrets.org/

Each transaction marked "DS", "XX", "XY", "XW", or "R" is a successful double spend. Here are some recent samples: 1, 2, 3, etc. These double spent some transactions that are days old.

Method:
  • Intercept a sweeper tx (using a pseudonode).
  • Replace the original output with an OP_RETURN with value 0.
  • Resign with the coinwallet private keys (used libcbitcoin for this).
  • Broadcast the new tx, discard the old tx.

The original sweeper transaction has done most of the hard work for me. I merely modify the output(s). This is possible because the private keys are publicly known.

By using OP_RETURN, I am sending 100% of the coinwallet "giveaway" coins to miner as fees (I'm not getting a single red satoshi out from this). My motivation is:
  • Unlike the original, the OP_RETURN does not create a new UTXO, bloating the UTXO set, and needing to be redeemed later (i.e. yet more spam).
    My replacement transactions are smaller, have a higher priority, and have a higher fee. So RBF miners should prefer the replacement over the original transactions.
  • My transactions merely replace the original, and therefore do not increase node mempool usage.
  • Note that most of the transactions that are been double spent were generated days ago.

Results & Analysis:

Success! In principle this kind of double spending should be difficult for two reasons: (1) the network should not propagate the double spends, and (2) miners should ignore the double spends. However, it seems this method is very effective:
  • The transactions seem to propagate OK. I guess it is because of the number of XT nodes that propagate double spends by design?
  • It seems like some big miners, e.g. AntPool, BitFury, GHash.IO, 21 Inc., Slush, will happily mine the new transactions with the higher fee. I guess they are implementing some form of /u/petertodd 's RBF patch?

I think however the miner's themselves should get organised to sweep the transactions directly. This will help discourage a flood of transactions being generated for this kind of event. I think F2Pool has done this to some extent.