Subject: [bitcoin-dev] Civ Kit: A Peer-to-Peer Electronic Market System

From: Antoine Riard <[email-masked]>
Date: Thu, 13 Apr 2023 15:10:01 +0100

Hi list,

We have been working since a while with Nicholas Gregory (Commerce Block),
Ray Youssef (the Built With Bitcoin foundation) and few others on a new
peer-to-peer market system to enable censorship-resistant and
permissionless global trading in all parts of the world. While the design
aims in priority to serve on-ramp/off-ramp trading, it can be extended to
support any kind of trading: goods, services, bitcoin financial derivatives
like discreet log contracts.

The design combines the Nostr architecture of simple relays announcing
trade orders to their clients with Lightning onion routing infrastructure,
therefore granting high-level of confidentiality to the market
participants. The market boards are Nostr relays with a Lightning gateway,
each operating autonomously and in competition. The market boards can be
runned as a federation however there is no "decentralized orderbook" logged
into the blockchain. The trades are escrowed under Bitcoin Script
contracts, relying on moderations and know your peer oracles for
adjudication.

The scoring of trades, counterparties and services operators should be
enabled by the introduction of a Web-of-Stakes, assembled from previous
ideas [0]. From the Bitcoin UTXO set servicing as a trustless source of
truth, an economic weight can be assigned to each market entity. This
reputation paradigm could be composed with state-of-the-art Web-of-Trust
techniques like decentralized identifiers [1].

A consistent incentive framework for service operators is proposed by the
intermediary of privacy-preserving credentials backed by Bitcoin payments,
following the lineaments of IETF's Privacy Pass [2]. Services operators
like market boards and oracles are incentivized to thrive for efficiency,
akin to routing hops on Lightning and miners on the base layer.

The whitepaper goes deep in the architecture of the system [3] (Thanks to
the peer reviewers!).

We'll gradually release code and modules, extensively building on top of
the Lightning Dev Kit [4] and Nostr libraries. All according to the best
Bitcoin open-source and decentralized standards established by Bitcoin Core
and we're looking forward to collaborating with everyone in the community
to standardize libraries and guarantee interoperability between clients
with long-term thinking.

Feedback is very welcome!

Cheers,
Nick, Ray and Antoine

[0]
https://lists.linuxfoundation.org/pipermail/lightning-dev/2020-November/002884.html
[1] https://www.w3.org/TR/2022/REC-did-core-20220719/
[2] https://privacypass.github.io
[3] https://github.com/civkit/paper/blob/main/civ_kit_paper.pdf
[4] https://lightningdevkit.org