[bisq-network/projects] Define architecture and interfaces for the protocol layer (#54)

chimp1984 notifications at github.com
Thu Apr 29 18:16:53 CEST 2021


> _This is a Bisq Network project. Please familiarize yourself with the [project management process](https://bisq.wiki/Project_management)._

## Description
Define architecture and interfaces for the protocol layer with the requirement to support multiple protocols and potentially external protocls (e.g. farcaster).

## Rationale
To support multiple contract execution protocols (asset trades, loans,...) we need an architecture which allows different protocol implementations to be used.
Asset transfer and security are considered as separate aspects. They can be combined like in the current Bisq protocol or atomic swaps or be decoupled like in an off-chain protocol using BSQ bonds or reputation for security.

## Criteria for delivery
- A proposal for the architecture and basic interfaces 
- A prototype demonstrating the feasibility to support different types of protocols (mocked and just very high level). Integrating external protocols (farcaster) is not required
- Proposal how to integrate external protocols (farcaster)
	 
## Measures of success
The provided results are considered sufficient to be used for futher refinements .

## Risks
- No solution found
- No sufficient progress
- Quality of proposed architecture insufficient
- Solution does not fit goals or constraints of overall project
- It turns out the challenges are too high and not realistic to be solved within Bisq's resource constraints (not really a risk for that project but for the overall project, but better to fail fast if that is the case)

## Tasks
-[ ] Design architecture 
-[ ] Write up proposed solution 
-[ ] A prototype demonstrating the application for different types of protocols (all mocked and just high level)
-[ ] Proposal how to integrate external protocols (farcaster)

## Estimates
This investigation should be scoped from effort and time. It will likely require further interations before we get ready for implementing it. 
So this should be seen as a first shot to get a better understanding of the challenges and fail fast if it turns out the challenges cannot be solved within our resource constraints.
I think 4 weeks for 1 contributor should not be exceeded. According to that the contributor should post their expected compensation.

## Notes
A main challenge will be how we support external protocol implementations (e.g. farcaster project in Rust). To be able to hook into those instead of re-implementing those protocols and infrastructures in Java would be good.

There should be a close feeback loop with the contributor working on:
https://github.com/bisq-network/projects/issues/52

The protocol can be modeled as a finite state machine (likely it will require a hierarchy of FSMs). Farcasters seem to use a [Petri net](https://en.wikipedia.org/wiki/Petri_net). I am not familiar with that but might be worth to look into.

Formulating current Bisq protocol as RFC as an example protocol might be useful. But not sure if required/helpful at that moment. But if anyone wants to work on that would be a good to have. Can be done by another contributor and be seen outside of the scope of that project. 

Examples of protocol we should be able to support:
- Current Bisq trade protocol on different blockchains (BTC, LTC, Liquid, ZCash,...)
- LN based protocols (e.g. https://github.com/bisq-network/proposals/issues/312)
- Atomic crosschain swaps based on adapter signatures (e.g. https://github.com/farcaster-project, https://github.com/comit-network/xmr-btc-swap)
- Atomic crosschain swaps based on HTLC 
- Loans using Liquid covenants (e.g. https://github.com/comit-network/waves)
- BSQ bond based protocols. Transfer can be off-chain. Secuerity is provided by BSQ bond.
- Reputation based protocols. Transfer can be off-chain. Secuerity is provided by a variety of options to demonstrate reputation (e.g. using account age witness, useing social media reputation,...).



-- 
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/projects/issues/54
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210429/64ad2963/attachment-0001.htm>


More information about the bisq-github mailing list