GithubHelp home page GithubHelp logo

alejopinto77 / aux-exchange Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aux-exchange/aux-exchange

0.0 0.0 0.0 51.12 MB

AUX - The Universal Exchange

License: MIT License

Shell 0.03% JavaScript 51.94% Python 0.11% Go 0.50% Rust 0.20% TypeScript 3.81% CSS 11.23% HTML 23.25% Dockerfile 0.02% Move 8.93%

aux-exchange's Introduction

AUX

AUX is a decentralized exchange powered by Aptos. We support the following features:

  • Liquidity pools (AMM)
  • Central limit order book (CLOB)
  • Router for best execution between AMM and CLOB

Fees and Rebates

  • Liquidity pool fees are set by the pool creator. AUX expects fees to range from 0 bps to 30 bps. All fees are retained by the liquidity providers.
  • Central limit order book fees are 0 bps for both maker and taker sides.
  • The AUX router does not charge any fees on top of the underlying liquidity pool or central limit order book fees.

Start Trading

Navigate to our web app to start trading.

See our code examples to get started interacting with AUX with our API.

Developer Quickstart with podman

Run aux-exchange/aptos/testing/run.sh to start a podman container. The container will have a local validator with the aux contract deployed.

In the container: - Run ./example_amm.sh to trade the AMM locally - Run ./example_clob.sh to trade the CLOB locally

The example code is located in aptos/api/aux-ts/examples. The core package is located in aptos/api/aux-ts. You can modify the code and rerun the example scripts in the container.

Run the integration tests with ./test.sh. Note that the integration tests pollute the container state so subsequent runs may not be reliable, especially if you have been interacting with the local validator in other ways.

Running on localnet manually

node.js, yarn, golang, and rust are all necessary to run.

  • Install https://github.com/nvm-sh/nvm
  • nvm install 18; nvm use 18
  • npm install -g yarn
  • yarn set version berry
  • Install golang.
  • Install rust
  1. Setup Aptos and deploy AUX to localnet:

    go run ./go-util/aptos/cmd/setup-aux  -f
  2. Run end to end tests:

    cd aptos/api/aux-ts
    APTOS_LOCAL=true yarn test
  3. Publish a local package for examples:

    cd aptos/api/aux-ts
    yarn publish:local
  4. Run examples:

    cd aptos/api/aux-ts/examples
    APTOS_LOCAL=true yarn start:localnet-amm-trader
    APTOS_LOCAL=true yarn start:localnet-clob-trader

Using the API

See aptos/api/aux-ts/examples for examples of interacting with the AMM and CLOB.

Addresses

network contract address
devnet deployer 0x7af3306d26c59abae84394a781233310617aff2e6ea229fb383db89042be4a74
devnet aux 0xea383dc2819210e6e427e66b2b6aa064435bf672dc4bdc55018049f0c361d01a
testnet deployer 0x27a5ed998335d3b74ee2329bdb803f25095ca1137015a115e748b366c44f73be
testnet aux 0x8b7311d78d47e37d09435b8dc37c14afd977c5cfa74f974d45f0258d986eef53
mainnet deployer 0x5a5e124ea1f3fc5fcfae3c198765c3b4c8d72c7236ae97ef6e5a9bc7cfda549c
mainnet aux 0xbd35135844473187163ca197ca93b2ab014370587bb0ed3befff9e902d6bb541

aux-exchange's People

Contributors

fardream avatar lidatong avatar leina05 avatar ldippo avatar yuhanfang 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.