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
- 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.
Navigate to our web app to start trading.
See our code examples to get started interacting with AUX with our API.
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.
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
-
Setup Aptos and deploy AUX to localnet:
go run ./go-util/aptos/cmd/setup-aux -f
-
Run end to end tests:
cd aptos/api/aux-ts APTOS_LOCAL=true yarn test
-
Publish a local package for examples:
cd aptos/api/aux-ts yarn publish:local
-
Run examples:
cd aptos/api/aux-ts/examples APTOS_LOCAL=true yarn start:localnet-amm-trader APTOS_LOCAL=true yarn start:localnet-clob-trader
See aptos/api/aux-ts/examples
for examples of interacting
with the AMM and CLOB.
network | contract | address |
---|---|---|
devnet | deployer | 0x7af3306d26c59abae84394a781233310617aff2e6ea229fb383db89042be4a74 |
devnet | aux | 0xea383dc2819210e6e427e66b2b6aa064435bf672dc4bdc55018049f0c361d01a |
testnet | deployer | 0x27a5ed998335d3b74ee2329bdb803f25095ca1137015a115e748b366c44f73be |
testnet | aux | 0x8b7311d78d47e37d09435b8dc37c14afd977c5cfa74f974d45f0258d986eef53 |
mainnet | deployer | 0x5a5e124ea1f3fc5fcfae3c198765c3b4c8d72c7236ae97ef6e5a9bc7cfda549c |
mainnet | aux | 0xbd35135844473187163ca197ca93b2ab014370587bb0ed3befff9e902d6bb541 |