Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lmvdz/zo-mm

01.xyz Market Maker - Solana
https://github.com/lmvdz/zo-mm

bot cryptocurrency solana web3js

Last synced: 3 months ago
JSON representation

01.xyz Market Maker - Solana

Awesome Lists containing this project

README

        

# 01.xyz Perp DEX Market Making Bot

> Should be easily configurable by anyone, plug and play
> Should place both ask and bid orders around some mid price
> The spread should be configurable
> Should automatically rebalance, and be able to maintain 24/7 liquidity
> Written in either TS, Python, or Rust
> Should be Open Sourced and available to all

### Install

`git clone [email protected]:lmvdz/zo-mm.git`
`cd zo-client`
`git clone [email protected]:01protocol/zo-client.git`
`yarn`
`yarn build`
`cd ..`
`yarn`

### Setup

`cp .env .env.local`

```.env
# the private key of the bot can be UInt8Array or base58
BOT_KEY=

# the RPC url
RPC_URL=https://ssc-dao.genesysgo.net/

# the delimiter which separates the markets to make
ACTIVE_MARKETS_DELIMITER=,

# the pairs which the bot should act on ( BTC,ETH,SOL,LUNA,AVAX,APE,NEAR,GMT )
ACTIVE_MARKETS=BTC,ETH

# how often in seconds the bot should cancel open orders and open fresh orders using the MM_SPREAD_PERCENTAGE to determine the distance from mark price
REBALANCE_INTERVAL=60

# the total distance from short to long with mark price residing in the middle
MM_SPREAD_PERCENTAGE=0.1

# the maximum loss percentage to allow before closing an open position
MAX_LOSS=0.25

# the maximum gain percentage to allow before closing an open position
MAX_GAIN=0.25
```

### Running

`yarn start`

![image](https://user-images.githubusercontent.com/2179775/167247190-00387c13-f40c-4368-86dc-2e9107a7a16e.png)
![image](https://user-images.githubusercontent.com/2179775/167247194-69d451c4-9155-4b79-bd82-5acf02d012c0.png)