This is the utmost exciting and promising project I've seen in the last time, wow!
I'm not through the text material, but I noticed one thing:
Use case 3: Dispute
In case that Bob does not receive the Fiat payment after the defined timeout period he can contact the arbitrator. He sends a request to the arbitrator with the contract attached and a new payout tx where the arbitrators arbitration fee is included as payment to the arbitrator and where Bob gets back his payments.
Did you think about adding time locked transactions to all this? The basic process would be this:
1. Alice wants to sell 2 BTC for fiat, Bob agrees to buy.
2. Bob and Alice exchange public keys and create a 2-of-2 multisig wallet from which can only be spent, if both parties agree.
3. Alice prepares a transaction which sends 2 BTC to this wallet, but does not reveil it at this moment.
4. She also creates a transaction which spends those 2 BTC back to herself - from the P2SH wallet. This "refund" transaction makes use of nLockTime with a number far in the future - before this time (or block height) the transaction cannot be mined. She passes this transaction to Bob.
5. Bob signs the refund transaction.
6. Alice actually sends the 2 BTC to the 2-of-2 multisig wallet.
7. Once confirmed, Bob initiates the fiat transfers.
8. After Alice receives the fiat, both sign a transaction which spends the coins to Bob.
If Bob doesn't pay, Alice ultimately receives her coins back.
If Alice acts fraudulent and doen't release the coins with the intention of claiming the refund, she has to wait nevertheless and Bob can start to hunt her.
Combined with collaterals and arbitrators it might get even more exciting.
More:
https://bitcoin.org/en/developer-guide#escrow-and-arbitrationEdit: just noticed this exists for some months.
Thanks for your input!
I was considering timelocked refund tx initially but ASAIK there is still no secure solution for the malleability problem, which makes that feature problematic (the refund tx depends on the deposit tx which might have a different tx id in the blockchain as it has when it was created locally, so the refund tx get invalid).
Beside that, the arbitrator can solve any of those problems as well, so an extra refund mechanism would be redundant and like with any feature would introduce new attack surfaces.
Thanks for reading and reviewing the docs. I know its quite a bit of text, but I tried to cover the most important parts (knowing that its still not precise enough).
It is important for the project that others review all that. Until now probably nobody has really analysed it in depth. There might be critical flaws and the more people reviewing it critically the higher the chances to find them.
For me the arbitration system seems to be the most critical part as it solves a lot of other areas but introduce a hi-trust environment which must not introduce any single point of failure or any point of centralisation. The way I designed the arbitration system is that it is itself a P2P system, but it was the latest part and it definitely needs more analysis and review.
Here are the links to the docs:
Basics:
https://docs.google.com/document/d/1d3EiWZdaM89-P6MVhS53unXv2-pDpSFsN3W4kCGXKgY/edit#Arbitration system:
https://docs.google.com/document/d/1LJCRFdtM2Jn2Oiv49qRXwBDG8HZD0Hiedy8tNjErHps/edit#heading=h.llbmn2coe21aRisk analysis:
https://docs.google.com/document/d/1LJCRFdtM2Jn2Oiv49qRXwBDG8HZD0Hiedy8tNjErHps/edit#heading=h.llbmn2coe21aBtw: Bitsquare got some media attention recently.
Interview about bitsquare on Beyond Bitcoin/Lets Talk Bitcoin (start at min 20):
http://letstalkbitcoin.com/blog/post/beyond-bitcoin-9-a-new-breed-of-exchangeMike Hearn:
"...it works how I expected a P2P exchange to work."
"...this is the kind of app I hoped people would build on top of bitcoinj."
https://plus.google.com/+MikeHearn/posts/BGsiRBLJEh6