Giter Site home page Giter Site logo

mit-dci / opencx Goto Github PK

View Code? Open in Web Editor NEW
199.0 26.0 63.0 31.26 MB

An open-source cryptocurrency exchange toolkit for implementing experimental exchange features

License: MIT License

Go 100.00%
lightning exchange bitcoin crypto timelock puzzle cryptocurrency cryptocurrency-exchanges crypto-exchange

opencx's Introduction

opencx

Build Status License GoDoc

Cryptocurrency exchanges are some of the largest businesses in the cryptocurrency space, and their reserves are often viewed as "honeypots" of cryptocurrencies. Because of this, cryptocurrency exchanges have been a hotbed of crime in the form of hacks, front-running, wash trading, fake orderbooks, and much more. In order for cryptocurrency to be successful, we need safe, trustworthy ways to exchange cryptocurrencies, without fear that coins will be stolen, or trades executed unfairly. Additionally, the vast majority of exchange software is closed-source, and exchanges have historically not implemented technological upgrades that would substantially decrease risk for users.

OpenCX hopes to solve this problem by making it trivially easy to run a secure, scalable cryptocurrency exchange which implements many of these features, including:

  • Layer two compatibility
  • Non-custodial exchange
  • Anti front-running
  • Public orderbook auditability
  • More to come...

Additionally, all of the components of OpenCX are designed to be swappable, secure, and scalable. The goal is to fit those requirements and implement features similar to that of modern cryptocurrency exchanges, while keeping high quality software.

DO NOT use in a production environment, this project is a work in progress!

Pull requests and issues encouraged!

Demo

gif of program in normal use

Contributing

Please see the contributing file to get started with contributing!

Setup

Requirements

  • Go 1.12+
  • A MySQL Database (not needed for client)
  • GMP (GNU Multiple Precision Arithmetic Library)

Installing

Installing GMP

Debian

sudo apt-get install libgmp3-dev

macOS

brew install gmp

Clone repo and install dependencies

git clone [email protected]/mit-dci/opencx.git
cd opencx
go get -v ./...

Running opencx server / exchange

You will need to run MariaDB or any other MySQL database in-order to run the server. You can configure authentication details for your database at ~/.opencx/db/sqldb.conf

Start your database (MariaDB in this case)

Linux

sudo systemctl start mariadb

macOS

mysql.server start

Now build and run opencx

go build ./cmd/opencxd/...
./opencxd

Running opencx CLI client

go build ./cmd/ocx/...
./ocx

You can now issue any of the commands in the cxrpc README.md file.

Configuration

There are configuration options (both command line and .conf) for the client and the server, and by default home folders for these files will be created at ~/.opencx/opencxd/ and ~/.opencx/ocx/ respectively. You can decide whether or not to use the NOISE protocol for authentication, which hostnames and ports to use for connecting to certain clients, which coins you would like to support, and whether or not to support lightning.

If you'd like to add your own coins, just add a coinparam struct like in lit.

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.