The code hosted in this repository is a technology preview and is suitable for demo purposes only. The features provided by this draft implementation are not meant to be functionally complete and are not suitable for deployment in production.
Use this software at your own risk.
The goal of this demo is to explore, ideate, and create the next set of decentralized exchange (DEX) projects that can be built on the Cosmos SDK. This platform intends to utilize certain DEX frameworks toward creating a decentralized exchange network that utilizes various crypto primitives for the facilitation of value transfers across systems.
The easiest way to get the code is to download one of our pre-built testnet release binaries at https://github.com/tendermint/dex-demo/releases.
To access our live testnet via a non-validating node, do the following:
- Make sure to clean out your
.dexdand.dexclidata directories. - Run
dexd init --chain-id=uex-testnet myvalidatorto initialize your node with the testnet's chain ID. - Copy the
genesis.jsonfile in the root of this repo to your.dexd/configdirectory. Make sure to overwrite the copy that was initially in there. - Set the
seedsin yourdexdnode'sconfig.tomlto the following value:[email protected]:26656. - Start your
dexdnode by runningdexd start. Blocks should start to synchornize. - Create a key called
dex-demoby runningdexcli keys add dex-demo. Remember the password you create as it will be used to log in to the UI. - Run
dexcli rest-server --chain-id=uex-testnet --trust-node. - Browse
http://localhost:1317/to access the web interface.
Charts and graphs may look off until the chain is fully synced. You will be unable to post orders until synchronization is complete.
API docs are available at https://api.serverfuse.tools/
To get coins to play with on the live testnet, you'll need to use the faucet. To do so, follow these steps:
- Click the wallet icon in the left sidebar. It looks like this:

- Copy the address that appears on screen.
- Navigate to faucet.serverfuse.tools in your web browser.
- Paste in your address, choose a coin type, and click the Send button. Once your request is processed, you will receive some coins of the specified type.
To create a local testnet, do the following:
- Compile and install the application.
- Run the
make-genesis.shscript in this directory. Part of this process will ask you to create a password - remember it, since it will be used to log in to the UI. This command will also create a genesis account, generate a genesis transaction, and validate the chain's initial genesis state. - Run
dexd startto begin block creation. - In a separate terminal, run
dexcli rest-server.
You now have a single-validator dexd chain and an attached REST server. You should now be able to play with the DEX at http://localhost:1317.
This DeX Demo is a standard Cosmos SDK application. It consists of two tools:
dexd, which runs the blockchain itself.dexcli, which runs the REST server and acts as a CLI client fordexd.
The Makefile contains all necessary tasks to build the DeX Demo. No dependencies beyond go 1.13 or
above are necessary to build the dexd and dexcli tools out-of-the box. To build these, run
make install.
If you make some changes in the directory ui, you need to rebuild the web UI:
$ make update-ui
To update the UI you will need:
packr- Node.js v11 or above
Unit tests can be run via make test-unit. Unit tests are marked as such via calls to testflags.UnitTest within the test functions themselves.
Integration tests can be run via make test. Note that this will build all tools prior to execution. Integration tests execute against the CLI. As such, they are somewhat resource-intensive and slow.

