• Stars
    star
    258
  • Rank 158,189 (Top 4 %)
  • Language
    Go
  • License
    Other
  • Created over 5 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A peer-to-peer network for sharing 0x orders

Version Docs Chat with us on Discord Circle CI

⚠️ 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

We intend to keep 0x-mesh bootstrap nodes up for the foreseeable future, however you can always set up your own mesh-bootstrap nodes 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.

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 #692 and #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 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 #703, #697, and #694), there are still some important missing features and issues to address 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 😄 If you are interested in helping develop 0x Mesh, please read the Development Guide. If you are looking for a place to start, take a look at the issues page and don't hesitate to reach out to us on Discord.

Additional Background

More Repositories

1

0x-monorepo

0x protocol monorepo - includes our smart contracts and many developer tools
TypeScript
1,412
star
2

OpenZKP

OpenZKP - pure Rust implementations of Zero-Knowledge Proof systems.
Rust
646
star
3

0x-launch-kit

Start an exchange in under a minute
JavaScript
380
star
4

protocol

TypeScript
362
star
5

0x-api

An HTTP Interface to 0x liquidity and tooling
TypeScript
362
star
6

0x-starter-project

A project showcasing how to get started with 0x.js
TypeScript
200
star
7

0x-launch-kit-backend

Launch a 0x relayer in under a minute [DEPRECATED]
TypeScript
173
star
8

standard-relayer-api

Standard specifications for 0x relayer public APIs
164
star
9

0x-protocol-specification

Specification for 0x protocol
148
star
10

0x-launch-kit-frontend

TypeScript
112
star
11

tools

TypeScript
96
star
12

ZEIPs

0x Improvement Proposals
91
star
13

swap-demo-tutorial

JavaScript
67
star
14

website

0x.org website
TypeScript
54
star
15

0x-nextjs-demo-app

Example ERC20 swapping app made with 0x Swap API, Next.js, and ConnectKit
TypeScript
52
star
16

rpc-gateway

A failover proxy for node providers
Go
47
star
17

0x-relayer-registry

A collection of relayers using 0x
TypeScript
43
star
18

whitepaper

Technical document that specifies 0x protocol.
TeX
33
star
19

0x-parser

🧾 A library that parses 0x transactions from EVM blockchains into a format that is user-friendly and easy to understand.
TypeScript
30
star
20

web3-typescript-typings

[DEPRECATED] A preliminary Web3 v0.x typescript type definition
30
star
21

dev-tools-truffle-example

An example Truffle project showing how to use the 0x Dev Tools with the Truffle framework
JavaScript
28
star
22

fast-abi

ABI encoding, fast
Rust
27
star
23

0x-event-pipeline

A node.js app for pulling 0x event info to inform things like staking.
TypeScript
26
star
24

0x-examples

A collection of 0x API code examples
TypeScript
19
star
25

VDF

A Solidity implementation of a VDF verifier contract
Solidity
16
star
26

0x-sdk

TypeScript SDK for building exchange functionality on Ethereum and EVM-compatible chains 🛠.
TypeScript
15
star
27

0x-codesandbox

0x Codesandbox
TypeScript
14
star
28

0x-debug

TypeScript
14
star
29

quote-server

An RFQ quote server that can be used to provide quotes via 0x API
TypeScript
14
star
30

0x-settler

0x settlement contracts using Permit2
Solidity
11
star
31

0x-instant

JavaScript
10
star
32

0x-staking-pool-registry

A collection of metadata about staking pools on 0x - https://0x.org/
TypeScript
10
star
33

connect-starter-project

A tutorial for interacting with a relayer that conforms to the standard relayer API
TypeScript
10
star
34

0x-coordinator-server

A reference implementation of a 0x coordinator server (soft-cancel variant)
TypeScript
9
star
35

sutro

Eye of Sutro: Ethereum State Watcher
Rust
7
star
36

pm

6
star
37

branding

Logos and other media
5
star
38

p2p_incentives

Python
5
star
39

node-anvil

Nodejs bindings to Foundry Anvil
Rust
5
star
40

zrx-buyer

A demonstration of using asset-buyer to buy ZRX
TypeScript
4
star
41

0x-subgraph

TypeScript
4
star
42

mesh-viz

https://mesh-viz.0x.org/
TypeScript
4
star
43

matcha-flagged-tokens

4
star
44

0x-exchange-proxy-subgraph

TypeScript
4
star
45

0x-api-forked-testnet-example

A basic example for how you can test 0x API using a private for of Ethereum mainnet
TypeScript
4
star
46

proxy

Simple Go Proxy
Go
3
star
47

mesh-mock-graphql-api

Demo of the new Mesh GraphQL API using mock data
TypeScript
3
star
48

setup-helm

Github Action for Helm installation
TypeScript
3
star
49

mesh-workshop-demo

TypeScript
3
star
50

exchange-v3

TypeScript
2
star
51

0x-mesh-demo-client-javascript

[DEPRECATED] A demo 0x Mesh WebSocket client written in Javascript
TypeScript
2
star
52

ts-doc-gen

A CLI for generating a single MD reference doc file for a TS project
TypeScript
2
star
53

setup-govulncheck

Setup govulncheck: https://go.dev/security/vuln/
TypeScript
2
star
54

setup-foundry

Install foundry-rs/foundry in your Github Action workflow
TypeScript
2
star
55

mesh-rs

Rust implementation of the 0x Mesh protocol
Rust
1
star
56

matcha-unsupported-tokens

1
star
57

permit2-matcha

A headless prototype of how the Matcha API works with permit2 smart contracts.
TypeScript
1
star