Code Monkey home page Code Monkey logo

atlant-dex-contracts's Introduction

atlant-dex-contracts

ATLANT Decentralized Exchange (ADEX) contracts

Exchange matching engine implemented as a smart contract written in Solidity language (Ethereum).

Order matching supported, as opposed to many existing exchange contracts (e.g. EtherDelta). Ethereum ERC20 tokens traded versus Ether.

Supported features & benefits

  • Order matching
  • Any ERC20 token support
  • Exchange decentralization
  • Funds inaccessible for 3rd parties
  • Optimized performance
  • Reduced gas consumption

Currency pairs

  • Base currency: ERC20 token (any)
  • Quote currency: ETH

Any ERC20 Ethereum token may be deposited to this exchange contract and subsequently traded versus Ether.

This includes a series of at least two transactions: a deposit transaction (ETH or ERC20 token) and an exchange transaction (providing amount & price). Token exchange is conducted by the contract automatically.

This contract references the rbt-solidity library, providing RB tree data structure for the order book implementation (orders sorted by price).

Algorithmic complexity

  • Order search O(log n)
  • Order insertion O(log n)
  • Order removal O(log n)

Build instructions

Test

npm install -g ethereumjs-testrpc
./install-deps.sh
./testrpc.sh
truffle test

Production

./install-deps.sh
truffle compile
truffle migrate

Built with Truffle and OpenZeppelin.

Published under MIT license.

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.