Code Monkey home page Code Monkey logo

dex's Introduction

Aisland Crosschain Dex (Decentralised Exchange)

This package is a Crosschain DEX that is supporting natively 8 different blockchains:

  • Ethereum
  • Polygon
  • Binance Smart Chain
  • Optimism
  • Fantom
  • Celo
  • Avalanche
  • Arbitrum

Hackaton Winner

official Results

You can use the on-line version clicking here:
https://dex.aisland.io

With > 4000 tokens listed.

Under the hood, it uses the great 0x protocol
and the list of tradable tokens is filtered out from https://tokenlists.org/ (an Uniswap Project).

You can easily make your own DEX with a minimal effort, just changing the logo and colors in a few html/css files inside the html folder.

Installation Requirements:

Operating System:

Packages to be installed:

Hardware Requirements:
4 GB RAM, 10 GB disk for the OS and couple of CPU.
A virtual machine from any cloud provider will work perfectly.

Installation Debian/Ubuntu:

Install Mariadb, Git, Curl and Nginx:

apt-get -y install mariadb-server git nginx curl

The version in the package of the OS is quite old so following the instructions from the official website: https://nodejs.org to install the version >= 20.x.

From command line, clone this repository in the folder /usr/src/:

 cd /usr/src/  
 git clone https://github.com/aisland-dao/dex/  

Install the required packages using npm:

npm install  

Create a database with:

mysql   
create database dex;  

create the database tables with:

mysql dex <dump.sql  
  • customise all the files .sh
  • configure the Nginx reverse proxy to reach port tcp/3000

Run

Execute:

/usr/src/dex-server.sh

to let it work in background, use systemctl

Tokens Update

There is an utility to load/update the tokens list reading the data from https://tokenlists.org/. You should configure the database parameters editing the text file:

dex-load-coingecko-tokens.sh  

and launch it from the standard folder:

/usr/src/dex/dex-load-main-tokens-coingecko.sh

You should run automatically the app one time a week from crontab. You can add the automatic job with:

crontab -e

and add the following line:

15 0 * * 0 /usr/src/dex/dex-load-main-tokens-coingecko.sh >>/tmp/dex-load-main-tokens-coingecko.log

It will be executed every Sunday at 15 minutes past Midnight

Tokens Ranking

There is an utility to update the ranking from coingecko api. You should configure the database parameters editing the text file:

dex-update-tokens-ranking-coingecko.sh

and launch it from the standard folder:

/usr/src/dex/dex-update-tokens-ranking-coingecko.sh

You should run automatically the app one time a week from crontab. You can add the automatic job with:

crontab -e

and add the following line:

0 0 * * 0 /usr/src/dex/dex-update-tokens-ranking-coingecko.sh >>/tmp/dex-update-tokens-ranking-coingecko.log

It will be executed every Sunday at Midnight.

Protocol Fees

You can customise the protocol fees and address to receive them, changing the following variable values in "dex-server.sh":

export WALLET='0xbec1Ed0dFc75955486977cc843293fe03ecA657D'
export FEES=0.001

You can leave our wallet if you wish to contribute to our efforts or place yours. 0.001 = 0.1% of fees, 1 = 100%.

Code Changes

Remember to execute:

cd /usr/src/dex/react/
./build.sh
to update the bundle.js

if you change dex.js, since it's bundled together with some open source libraries.

Contribution

  • Code contribution are welcome, please feel free to make a pull request.
  • You give a good financial help to make more features, using our public app https://dex.aisland.io, the protocol will forward us 0.01% on the transaction value.

dex's People

Contributors

poseidon-aisland avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

dex's Issues

MultiLanguage

Use translation API to setup a multi-language website (manage the cache for the translated string)
Set automatically the browser language and allow to select a different language between those available.

HACKATON: Improve UI

More modern design with card and logos for each feature.
Make a common header/footer ad build the other pages with the same.

Coinbase Wallet does not work

Gives a weird error:
This dApp is most likely missing the headlessMode: true flag in the custom CoinbaseWalletConnector options. See documentation for more details.

Smart Contracts

Publish the smart contracts used from the protocols and the auditing documents.

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.