Post
Topic
Board Project Development
Re: Coinffeine - (P2P bitcoin exchange) code now available!
by
Phil Dann Ward
on 10/04/2014, 12:14:53 UTC
And, if I've understood it correctly, I think their exchange algorithm is inherently susceptible to (accidental and/or malicious) failure due to bitcoin transaction malleability.

Their github wiki shows a worked example of the bitcoin transactions http://github.com/Coinffeine/coinffeine/wiki/Exchange-algorithm#transaction-definitions.

It shows that their algorithm is based on creating and signing transactions to spend outputs from other transactions that haven't even been broadcast yet.

So if, for example, Sam's Tx0.1 is subject to a malleability modification it's hash will not be the same as Tx0.3 assumes thus Tx0.3 is useless as a means for Sam to get his (potentially large chunk of) bitcoins back.

If Bob refuses or is no longer around to help Sam create and sign a new version of Tx0.3 referencing Tx0.1's actual, confirmed hash then Sam's bitcoins are permanently locked in Tx0.1.  Sad