Code Monkey home page Code Monkey logo

dexduels's Introduction

README

Arbitrage program demo using web3js lib to implement interaction with dex which is running on smartbch chain like Benswap, Mistswap, etc. By the way, it can also run on other EVM compatible sidechain after a few modifications.

Notice

The demo was made only in order to share the arbitrage model, please must be careful to run it on production enviroment. There are some problems still need you to resolve like consensus problem.

Strategy summary

According to DEXDUELS_DEXES, the program would generate pairs of dexes to make some arbitrage attempts and according to different pairs of input token and output token which was generated by BASE_SYMBOL and QUOTE_SYMBOLS, each pair of dexes would make some profitable swaps with the pair of tokens.

Usage

  • Install MongoDB
  • Fill properties in .env.template file like below and rename it to .env
    SMART_BCH_WSS=wss://smartbch-wss.greyh.at
    SMART_BCH_HTTPS=https://global.uat.cash
    QUOTE_SYMBOLS=EBEN,FLEX         // quotes for the arbitrage
    BASE_SYMBOL=WBCH                // base for the arbitrage
    BASE_QTY=1                      // amount of base for the arbitrage
    INTERVAL=5000                   // interval for check the opportunities
    TRIGGER_PROFIT_IN_USD=4         // profit for trigger the arbitrage
    HTTP_PROXY=                     // setting proxy if your machine has configured
    DEXDUELS_DEXES=Benswap,Mistswap // name of dex which would participate in the arbitrage
    WALLET_ADDRESS=<YOUR WALLET ADDRESS>
    WALLET_PRIVATE_KEY=<YOUR ACCOUNT PRIVATE KEY OF WALLET>
    
  • Run with node dexduels.js

Contact me

If you're interested in quant or web3 technology, we can be friends and share experience for each other.

dexduels's People

Contributors

zmovane avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar Zhiyang Chen avatar Cyb3rN8 avatar  avatar  avatar

Watchers

 avatar  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.