Market maker bot

Instead of traditionally LP'ing funds into a liquidity pool, on ZigZag's order book users can run a market maker bot. This means users are stepping into DeFi and getting yield on their funds without impermanent loss. Market making supports ZigZag with more liquidity, while the user gets a profit from the spread. Make sure to rebalance when needed!

Anyone can run a market maker bot on zkSync Lite. The market maker bot fills market and limit orders. Technical instructions on how to run the bot can be found in the README in the market-maker repository on GitHub. The code can be found on this specific GitHub page.

If you need a more simplified step-to-step explanation on how to start running your own market maker bot, please continue reading.

Market maker bot guide

If you still run into issues after this guide, join our Discord. We're also giving out Discord roles ('MM bot') to anyone that is running a market maker. Join Discord to claim your role!

Note: every now and then you will need to update your market maker. Be sure to check up on the GitHub repository and claim your 'MM bot' role on Discord to receive announcements.

Requirements

  • Activated zkSync account

  • Ethereum private key of your Ethereum address (don't share your pkey!)

  • Funds in the account corresponding to the pairs you want to market make

  • CryptoWatch API public key (free for limited time)

  • Node.js

  • Optional: VPS when you have high ping running the bot

macOS/Windows/Linux

  1. Download and open/extract the zip file

  2. a) Open terminal on macOS or Linux b) Open cmd on Windows or install terminal from the Windows App Store

    1. Run cd <drag the folder from finder>

    2. Run npm install

  3. Duplicate the config.json.EXAMPLE file from the market maker folder and rename it to config.json

  4. Open config.json with TextEdit

    1. Paste the CryptoWatch API public key

    2. Paste the Ethereum private key (don't share your pkey!)

    3. Add price feeds Note: always use a secondary price feed to prevent losses

      1. More information on other price feeds on GitHub: https://github.com/ZigZagExchange/market-maker#price-feed

    4. On active change the pairs to true if you want to market make them or let them stay on false if you don't want to run that pair

    5. Adjust Size (in base asset) and Spread (in percentage)

    6. Save and close

  5. Open terminal/cmd and run the bot node marketmaker.js

  6. Optional: Stop the bot with control+c

Last updated