Giter Site home page Giter Site logo

forkkit / 0x-mesh Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xproject/0x-mesh

0.0 2.0 0.0 100.74 MB

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

Home Page: https://0x-org.gitbook.io/mesh/

License: Other

Go 82.62% JavaScript 1.95% Makefile 0.29% Dockerfile 0.15% TypeScript 14.97% HTML 0.02%

0x-mesh's Introduction

Version Docs Chat with us on Discord Circle CI

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 0xProject#692 and 0xProject#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 0xProject#703, 0xProject#697, and 0xProject#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

0x-mesh's People

Contributors

albrow avatar amaurer avatar dekz avatar dependabot[bot] avatar fabioberger avatar jalextowle avatar kimpers avatar nfeignon avatar opaolini avatar pgebheim avatar pointtoken avatar z2trillion avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.