[bisq-network/proposals] Future off chain trade protocol (#32)

Manfred Karrer notifications at github.com
Fri Aug 17 11:34:28 UTC 2018


After thinking a bit more about the details how to support a long living bond re-used in multiple trades I think that it quite feasible if we don't intend to protect against chargeback risks (because that would require a long locktime - up to 6 months - which makes it infeasible for most traders).

## Verification of Bond:
The traders send a nonce to the peer which need to be signed by the private EC key which was the used as input for the bond tx. That way they can be sure that the peer is the owner of the bond. 

## Keeping track of bond balance: (TradeWitness)
To verify if the bond is not over-used by too many trades we can introduce a new P2P network data object (le's call those objects TradeWitness) which consists in 2 sub objects: One for indicating the start of a trade and one for indicating the successful completion of a trade. Those TradeWitness objects contain the required bond for the trade (e.g. trade amount but can be also higher or lower) and the hash of the tx ID of the bond as well as the hash of the trade ID. Each peer can lookup in his data collection of TradeWitness objects if the bond has sufficient coverage. E.g. If a bond tx has 5000 BSQ as bond and it was used for 3 TradeStartedWitness objects which required bonds of 1000, 2000, and 1500 BSQ and one TradeCompletedWitness object which corresponds to the TradeStartedWitness with 2000 BSQ then the available bond is: 5000 - 1000 - 1500 = 2500 BSQ. The 2000 BSQ is canceled out as it is already completed. The TradeStartedWitness should alos be removed by the arrival of the TradeCompletedWitness.

```
TradeWitness object:
boolean isTradeStartedWitness;
byte[] hashOfBondTxId;
byte[] hashOfTradeId;
long requiredBond;
```
Both traders are publishing the TradeWitness objects so cheating of one peer will not help him to avoid that the data get broadcasted. If both are colluding to not send the TradeWitness they are at risk to get scammed by the other peer (no security is provided without bond). 

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/proposals/issues/32#issuecomment-413838127
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20180817/b627ee1a/attachment.html>


More information about the bisq-github mailing list