Civ Kit: A Peer-to-Peer Electronic Market System



Summary:

Antoine Riard, along with Nicholas Gregory and Ray Youssef, has been working on a peer-to-peer market system that enables censorship-resistant and permissionless global trading. The design combines the Nostr architecture of simple relays announcing trade orders to their clients with Lightning onion routing infrastructure. The market boards are Nostr relays with a Lightning gateway, each operating autonomously and in competition. The market boards can be run as a federation, but 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.One of the most relevant feedbacks that Antoine received on the paper publication was the lack of underscoring front-running resistance as a fundamental property wished for a peer-to-peer marketplace. It is expected that the level of front-running resistance aimed by the market participants will be heavily functioned by the types of trades considered. For some classes of goods, one cannot expect the same level of item liquidity due to cycles of production and exogenous factors like weather. Some types of trades marketplaces might be exposed to far less front-running risks and rather would have to deal with accurate risk modeling of the underlying goods.There are two security paradigms proposed to mitigate front-running happening peer-to-peer marketplace. The first one is to duplicate the announcement of the offers to a number of concurrent board operated by independent identities and in parallel monitor the latency. Latency anomalies should be spotted on by watchtower-like infrastructure at the service of makers/takers, and in case of repeated anomalies, a maker should disqualify the misbehaving board from future announcements. Another paradigm can be to run the bulletin boards as a federation e.g under Honey Badger BFT as used by Fedimint. The incoming board offers become consensus items that must be announced to all the federations members' onion gateway and which are not announced before a consensus proposal has been adopted.The scoring of trades, counterparties, and services operators should be enabled by the introduction of a Web-of-Stakes, assembled from previous ideas. 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. 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. The whitepaper goes deep into the architecture of the system (Thanks to the peer reviewers!). The researchers will gradually release code and modules, building extensively on top of the Lightning Dev Kit and Nostr libraries. They'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!


Updated on: 2023-06-16T17:24:18.721138+00:00