The Sakura Auto-Trader is an open source market making bot created by the Tegro team that can be used to deploy a pure market making strategy on the Tegro Exchange. This bot can also automates earning points in the Tegro points program.

The term market maker refers to a firm or individual who actively quotes two-sided markets in a particular security by providing bids and offers (known as asks) along with the market size of each. Market makers provide liquidity and depth to markets and profit from the difference in the bid-ask spread.

This is a highly profitable strategy that is used by a variety of players ranging from individual traders, small boutique trading firms and large institutions.

Tegro wants to give its early users a chance to get in on the ground level and enjoy the benefits from this highly sought after strategy.


STEP 1: Download the Code from Github

To deploy this bot you will have to download the code in the following Github repository and follow the installation instructions.

Sakura Auto-Trader

STEP 2: Start following the steps in README.md

There are a number of steps to be followed to install the bot and start running it. This includes running a npm command to install all the dependencies required for the bot to run and setting up environment variables that are unexposed to the web, like your private key. These instructions can be found here.

At the end of setting up the '.env' file and completing the setup, your screen might look something like this.


STEP 3: Setting up and understanding the configuration file

Once you have the setup ready you really need to make sure you understand what you have set up in the prod.json file.

The README.md explains what each individual parameters function is.

Make sure you understand what are Max Quote Balance Utilisation, Max Base Balance Utilisation, Price Step Levels andWallet Allocation thoroughly. These are the items that determine what is the amount and placement of your orders.

Example: In the sample file below, I will be market making and earning points for my service:

  1. I have enabled market making for the WETH/USDC pair on the base blockchain.
  2. I want the bot to deploy $15 worth USDC and 0.01 WETH to this strategy.
  3. I want my first order to be placed at 0.5% away from the current price the market is trading at, second at 0.75% and so on.
  4. In these orders mentioned above, I want to utilise 10% for the first order closest to the mid price, 20% to the next and so on.
  5. I want these orders to be re-calculated and placed if there is an order execution or if the market is moved every ~12 seconds.

*STEP 4: Give Approvals to Tegro to trade using your wallet

Option 1: For deploying a bot on the WETH_USDC pair. Go to the Tegro website and try to place a Buy order. You will be prompted to approve Tegro bot to trade your USDC. Give it the maximum approval so that Tegro can easily spend on your behalf. You can choose to reject the signing of the actual transaction that comes after this.

Next, go to the Sell tab, and repeat the steps so that you can give approval to trade your WETH as well.

STEP 5: Run the strategy

Run the following command in the folder where the to deploy the strategy.

node strats/main.js

A successfully deployed strategy would look something like this in the terminal:


And, would like like this in the your Open Orders on the Tegro exchange: