Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xProject/0x-mesh
A peer-to-peer network for sharing 0x orders
https://github.com/0xProject/0x-mesh
0x dapp ethereum golang libp2p webassembly webrtc
Last synced: about 1 month ago
JSON representation
A peer-to-peer network for sharing 0x orders
- Host: GitHub
- URL: https://github.com/0xProject/0x-mesh
- Owner: 0xProject
- License: other
- Archived: true
- Created: 2019-03-28T20:34:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-11-10T15:17:48.000Z (about 1 year ago)
- Last Synced: 2024-11-07T23:27:33.532Z (about 1 month ago)
- Topics: 0x, dapp, ethereum, golang, libp2p, webassembly, webrtc
- Language: Go
- Homepage: https://0x-org.gitbook.io/mesh/
- Size: 99.5 MB
- Stars: 259
- Watchers: 25
- Forks: 111
- Open Issues: 130
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- best-of-crypto - GitHub - 38% open · ⏱️ 10.11.2023): (Decentralized Finance (DeFi))
README
[![Version](https://img.shields.io/badge/version-11.2.0-orange.svg)](https://github.com/0xProject/0x-mesh/releases)
[![Docs](https://img.shields.io/badge/docs-website-yellow.svg)](https://0x-org.gitbook.io/mesh)
[![Chat with us on Discord](https://img.shields.io/badge/chat-Discord-blueViolet.svg)]
[![Circle CI](https://img.shields.io/circleci/project/0xProject/0x-mesh/master.svg)](https://circleci.com/gh/0xProject/0x-mesh/tree/master)⚠️ **DEPRECATION NOTICE** ⚠️
This repository is no longer being maintained. 0x Labs isn’t keeping it aligned with future 0x protocol versions, nor is updating its dependencies with other blockchain protocols. We welcome other team’s contributions to do that if they find value in it.
If you’re looking to integrate orderbook-like capabilities in your application, we encourage you to try [0x API /orderbook service instead](http://0x.org/docs/api)We intend to keep 0x-mesh bootstrap nodes up for the foreseeable future, however you can always set up your own [mesh-bootstrap nodes](cmd/mesh-boostrap) and configure the 0x-mesh nodes via the `BOOTSTRAP_LIST` environment variable.
---
# 0x Mesh
0x Mesh is a peer-to-peer network for sharing orders that adhere to the
[0x order message format](https://0x.org/docs/guides/v3-specification#orders).## Project status
We have reached the point where Mesh is being used by some teams in production. We feel that for many use cases, Mesh is stable enough for production. However, we caution that there are some issues and shortcomings in its current state, which generally fall into two categories:
- Order sharing: We have recently made significant improvements to our order sharing algorithm, including reducing bandwidth usage and CPU usage by at least an order of magnitude on average. See https://github.com/0xProject/0x-mesh/pull/692 and https://github.com/0xProject/0x-mesh/pull/732. However, we are still working on accurately testing and measuring the speed at which orders propagate through the network with different network sizes and topologies. In some circumstances, it may take longer than we would like for orders to reach the majority of nodes in the network. This is an area we will continue to focus on and improve.
- Browser usage: Mesh can run directly in the browser via the [@0x/mesh-browser](https://www.npmjs.com/package/@0x/mesh-browser) package. We have supported this for a while and have examples and integration tests in this repository. While we have made recent improvements to stability and performance (see https://github.com/0xProject/0x-mesh/pull/703, https://github.com/0xProject/0x-mesh/pull/697, and https://github.com/0xProject/0x-mesh/pull/694), there are still some [important missing features and issues to address](https://github.com/0xProject/0x-mesh/issues?q=is%3Aopen+is%3Aissue+label%3Abrowser) before `@0x/mesh-browser` is feasible for most production use cases.## Overview
0x Mesh has a lot of different use cases for different categories of users:
- Relayers can use Mesh to share orders with one another and to receive orders
from market makers. This allows them to increase the depth of their order
books and provide a better user experience.
- Market makers can use Mesh to reach a broader audience. Their orders will be
sent throughout the network and picked up by many trading venues and are therefore more likely to be filled.
- Mesh allows for a new type of relayer called a "serverless relayer". In the
serverless relayer model, each user runs Mesh in their browser and there is
no backend server or database. Instead, peers share orders directly with one
another. (There are pros and cons to this approach and it is probably not
suitable for all markets).Both Relayers and Market makers can use Mesh to watch a set of 0x orders for changes in fillability (e.g., cancellations, fills, expirations, etc...).
0x Mesh is intended to be entirely automatic. It takes care of all the work of
receiving, sharing, and validating orders so that you can focus on building your
application. When you run a 0x Mesh node, it will automatically discover peers
in the network and begin receiving orders from and sending orders to them. You
do not need to know the identities (e.g., IP address or domain name) of any
peers in the network ahead of time and they do not need to know about you.Developers can use the GraphQL API to interact with a Mesh node that they
control. The API allows you to send orders into the network, query for existing
orders, and get notified when an order is added or the status of an existing
order changes (e.g. when it is filled, canceled, or expired). Under the hood,
Mesh performs efficient order validation and order book pruning, which takes out
a lot of the hard work for developers.## Documentation
You can find documentation and guides for 0x Mesh at
https://0x-org.gitbook.io/mesh.## Development
We love receiving contributions from the community :smile: If you are interested
in helping develop 0x Mesh, please read the
[Development Guide](https://github.com/0xProject/0x-mesh/blob/master/CONTRIBUTING.md).
If you are looking for a place to start, take a look at the
[issues page](https://github.com/0xProject/0x-mesh/issues) and don't hesitate to
reach out to us on Discord.## Additional Background
- [Announcement blog post](https://blog.0xproject.com/0x-roadmap-2019-part-3-networked-liquidity-0x-mesh-9a24026202b3)
- [MVP architecture doc](https://drive.google.com/file/d/1dAVTEND7e1sISO9VZSOou0DN-igoUi9z/view)
- [Video of talk at ETHNewYork](https://youtu.be/YUqe4fKBA2k?t=723)