Skip to content

Market making funds

Here, we provide a step-by-step guide to create a market making fund and connect it to a bot running locally or on the cloud.

And if reading docs is not your thing checkout the demo video here:

Basic requirements:

  • Python v3.8
  • pip v20


  1. Create fund and set the delegate address for sending instructions
  2. Invest USDC in fund and have some SOL in delegate address
  3. Clone basic market making bot repo
  4. Set the bot on cloud and add in delegate address private keys
  5. Check the positions through manager dashboard and claim performance fee i.e $MNGO tokens

Create fund

  • Visit Investin dashboard and click on start fund


  • Select market making from type of fund selection and Add minimum deposit, performance fee % i.e. (Share of $mngo accrued which goes to the manager as performance reward)and manager would earn the usual performance fees if the fund performance goes above the minimum return percentage.

  • Select the perp market, currently we have BTC-PERP & SOL-PERP


  • After the fund is created, create a new wallet and set it as the delegate address using the manager dashboard (you can also use manager address with which fund was created)
  • Fund the newly created address with $sol

Basic market making bot

  • Clone repo:
  • git checkout sol-perp
  • Click open config button on dashboard page, copy it and paste in the cloned repo to the file: mainnet-investin.json
  • In the cloned repo terminal run the following commands and paste the private keys of delegate address or manager address. The private key should look something like this

    touch id.json
    cat > id.json 
    enter "your private key"   
    press ctrl+D
  • Setup the marketmaking bot in a python virtualenv:

    pip install virtualenv
    virtualenv venv
    virtualenv -p /usr/bin/python3 venv
    source venv/bin/activate 
    pip install -r requirements.txt
    make sure to check python location by using (which python) and put that in place of /usr/bin/python3
    sudo ln -s /usr/bin/python3 /usr/bin/pyston3
  • To run the marketmaking bot

    ./bin/marketmaker --name "Investin MM" --market SOL-PERP --oracle-provider pyth  --existing-order-tolerance 0.0001 --pulse-interval 10 --order-type POST_ONLY --chain ratios --ratios-spread 0.006 --chain fixedpositionsize --fixedpositionsize-value 0.2  --cluster-name mainnet --cluster-url --group-name mainnet.1 --id-file id.json --investin mainnet-investin.json 

  • If the fund was created for btc-perp make sure to change the --market BTC-PERP and for sol-perp to SOL-PERP

  • If everything goes well you will see something like this on terminal



To estimate the APY for mango rewards earned by market making fund over a time period we use the following formula:

\[ (mngoPerShare[T] - mngoPerShare[T-12])*mngoPrice*100*2*365 \]
  • T = time period

Performance Fee

The performance fee is collected on all the mango rewards accrued by market making and is set by manager on fund creation. The same percentage is also used to collect performance fee if the USDC evaluation of fund goes above the minimum return percentage.

Have any doubts or stuck at any step please join our discord for assistance

Back to top