change default params; create run.sh; fix readme

This commit is contained in:
dd 2021-11-28 13:08:28 -05:00
parent fbdda70b98
commit d292b53c61
4 changed files with 18 additions and 12 deletions

View File

@ -15,11 +15,13 @@ To run the market maker you will need:
| -------- | ------- | ----------- | | -------- | ------- | ----------- |
| `ENDPOINT_URL` | `https://mango.rpcpool.com` | Your RPC node endpoint | | `ENDPOINT_URL` | `https://mango.rpcpool.com` | Your RPC node endpoint |
| `KEYPAIR` | `${HOME}/.config/solana/id.json` | The location of your wallet keypair | | `KEYPAIR` | `${HOME}/.config/solana/id.json` | The location of your wallet keypair |
| `PARAMS` | `params/default.json` | path to params file | | `PARAMS` | `default.json` | params file |
## Market Maker Params ## Market Maker Params
### See params/default.json for an example ### See params/default.json for an example
| Variable | Default | Description |
| -------- | ------- | ----------- |
| `group` | `mainnet.1` | Name of the group in ids.json | | `group` | `mainnet.1` | Name of the group in ids.json |
| `interval` | `10000` | Milliseconds to wait before updating quotes | | `interval` | `10000` | Milliseconds to wait before updating quotes |
| `mangoAccountName` | N/A | The MangoAccount name you input when initializing the MangoAccount via UI | | `mangoAccountName` | N/A | The MangoAccount name you input when initializing the MangoAccount via UI |
@ -29,6 +31,7 @@ To run the market maker you will need:
| `charge` | `0.0010` | Half the quote width | | `charge` | `0.0010` | Half the quote width |
| `lean_coeff` | `0.0005` | How much to move the quotes per unit size of inventory | | `lean_coeff` | `0.0005` | How much to move the quotes per unit size of inventory |
| `bias` | `0` | Fixed amount to bias. Negative values bias downward. e.g. -0.0005 biases down 5bps | | `bias` | `0` | Fixed amount to bias. Negative values bias downward. e.g. -0.0005 biases down 5bps |
| `requoteThresh` | `0` | How much new bid/ask price must change to requote; e.g. 0.0002 implies 2bps |
## Setup systemd ## Setup systemd

View File

@ -30,9 +30,9 @@
}, },
"ETH": { "ETH": {
"perp": { "perp": {
"charge": 0.0020, "charge": 0.00075,
"sizePerc": 0.02, "sizePerc": 0.1,
"leanCoeff": 0.0010, "leanCoeff": 0.000375,
"bias": 0.0, "bias": 0.0,
"requoteThresh": 0.0002, "requoteThresh": 0.0002,
"takeSpammers": true, "takeSpammers": true,
@ -64,9 +64,9 @@
}, },
"RAY": { "RAY": {
"perp": { "perp": {
"charge": 0.0020, "charge": 0.0015,
"sizePerc": 0.02, "sizePerc": 0.03,
"leanCoeff": 0.0010, "leanCoeff": 0.00075,
"bias": 0.0, "bias": 0.0,
"requoteThresh": 0.0002, "requoteThresh": 0.0002,
"takeSpammers": true, "takeSpammers": true,
@ -75,9 +75,9 @@
}, },
"FTT": { "FTT": {
"perp": { "perp": {
"charge": 0.0020, "charge": 0.0010,
"sizePerc": 0.02, "sizePerc": 0.04,
"leanCoeff": 0.0010, "leanCoeff": 0.0005,
"bias": 0.0, "bias": 0.0,
"requoteThresh": 0.0002, "requoteThresh": 0.0002,
"takeSpammers": true, "takeSpammers": true,
@ -88,7 +88,7 @@
"ADA": { "ADA": {
"perp": { "perp": {
"charge": 0.0010, "charge": 0.0010,
"sizePerc": 0.1, "sizePerc": 0.06,
"leanCoeff": 0.0005, "leanCoeff": 0.0005,
"bias": 0.0, "bias": 0.0,
"requoteThresh": 0.0002, "requoteThresh": 0.0002,

2
run.sh Normal file
View File

@ -0,0 +1,2 @@
source .env
yarn mm

View File

@ -35,9 +35,10 @@ import { OpenOrders } from '@project-serum/serum';
import path from 'path'; import path from 'path';
import { loadMangoAccountWithName, loadMangoAccountWithPubkey } from './utils'; import { loadMangoAccountWithName, loadMangoAccountWithPubkey } from './utils';
const paramsFileName = process.env.PARAMS || 'default.json';
const params = JSON.parse( const params = JSON.parse(
fs.readFileSync( fs.readFileSync(
process.env.PARAMS || path.resolve(__dirname, '../params/default.json'), path.resolve(__dirname, `../params/${paramsFileName}`),
'utf-8', 'utf-8',
), ),
); );