Git Product home page Git Product logo

dfk-avax-arb-bot's Introduction

cross-chain-uni-arbbot

Arbitrage bot for cross-chain arbitrage written in Javascript. Only supports Uniswap-like pools.

Current support

  • DFK => Avalanche
  • Avalanche => DFK

Commands

Start the bot

yarn start

Start the bot with continious run

Session will be restarted if error occurs. Errors are logged in ./logs/err.log and all stdout in ./logs/out.log. Note that for this command the forever module needs to be installed globally with yarn add global forever.

yarn start-forever

Run tests

yarn test

Add pool

yarn add-pool <pool-address> --dex <dex-id>

Add all pools for listed factories

Adds all pools for the factories listed in ./src/static/dexes.json.

yarn add-all-pools <dex-id>

Generate paths

Generates paths for listed pools based on the rules specified in ./src/tools/path-gen.js.

yarn gen-paths

dfk-avax-arb-bot's People

Contributors

halo3mic avatar

Watchers

 avatar  avatar

dfk-avax-arb-bot's Issues

Create opportunities logger

Log opportunities:

  • txs that caused opportunity?
  • gross-profit
  • amounts
  • path-description?
  • path-id
  • opportunity-id
  • blockNumber

Create `config.json` file

Now, some settings are spread out across files as constants or even hardcoded. They should be accessible through a single-source - config.json file.

Improve path finding

Add:

  • internal paths for DFK (non-cross-chain arbs)
  • paths that start with $JEWEL

Resync reserves every X blocks

Reserves are updated on Sync events that the bot might miss and become out of sync. To mitigate this issue balances could be fetched every X number of blocks with reserves call to each pool.

Create inventory

Create module that tracks assets bot is trading.

  • Needs keep the balance of certain tokens in local storage
  • Initial balance is obtained by fetching balanceOf for every token (similar to reserves module)
  • Update it with every Transfer event to or from the bot-address
  • As extra precaution it could pull the token balance with balanceOf calls every X blocks

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.