-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.yaml
213 lines (173 loc) · 6.39 KB
/
config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
global:
# devnet or mainnet-beta
driftEnv: mainnet-beta
# RPC endpoint to use
endpoint:
# Custom websocket endpoint to use (if null will be determined from `endpoint``)
# Note: the default wsEndpoint value simply replaces http(s) with ws(s), so if
# your RPC provider requires a special path (i.e. /ws) for websocket connections
# you must set this.
wsEndpoint:
# optional if you want to use helius' global priority fee method AND `endpoint` is not
# already a helius url.
heliusEndpoint:
# `solana` or `helius`. If `helius` `endpoint` must be a helius RPC, or `heliusEndpoint`
# must be set
# solana: uses https://solana.com/docs/rpc/http/getrecentprioritizationfees
# helius: uses https://docs.helius.dev/solana-rpc-nodes/alpha-priority-fee-api
priorityFeeMethod: solana
# max priority fee to use, in micro lamports
# i.e. a fill that uses 500_000 CUs will spend:
# 500_000 * 10_000 * 1e-6 * 1e-9 = 0.000005 SOL on priority fees
# this is on top of the 0.000005 SOL base fee, so 0.000010 SOL total
maxPriorityFeeMicroLamports: 10000
# Private key to use to sign transactions.
# will load from KEEPER_PRIVATE_KEY env var if null
keeperPrivateKey:
initUser: false # initialize user on startup
testLiveness: false # test liveness, by failing liveness test after 1 min
# Force deposit this amount of USDC to collateral account, the program will
# end after the deposit transaction is sent
#forceDeposit: 1000
websocket: false # use websocket for account loading and events (limited support)
eventSubscriber: false # disables event subscriber (heavy RPC demand), this is primary used for counting fills
runOnce: false # Set true to run once and exit, useful for testing or one off bot runs
debug: false # Enable debug logging
txSenderType: "fast"
# subaccountIDs to load, if null will load subaccount 0 (default).
# Even if bot specific configs requires subaccountIDs, you should still
# specify it here, since we load the subaccounts before loading individual
# bots.
# subaccounts:
# - 0
# - 1
# - 2
eventSubscriberPollingInterval: 5000
bulkAccountLoaderPollingInterval: 5000
useJito: true
jitoBlockEngineUrl:
jitoAuthPrivateKey:
# which subaccounts to load, if null will load subaccount 0 (default)
subaccounts:
# perpMarketIndexes:
# - 1
# Which bots to run, be careful with this, running multiple bots in one instance
# might use more resources than expected.
# Bot specific configs are below
enabledBots:
# Perp order filler bot
- fillerLite
# Spot order filler bot
#- spotFiller
# Trigger bot (triggers trigger orders)
#- trigger
# Liquidator bot, liquidates unhealthy positions by taking over the risk (caution, you should manage risk here)
# - liquidator
# Example maker bot that participates in JIT auction (caution: you will probably lose money)
# - jitMaker
# Example maker bot that posts floating oracle orders
#- floatingMaker
# settles PnLs for the insurance fund (may want to run with runOnce: true)
# - ifRevenueSettler
# settles negative PnLs for users (may want to run with runOnce: true)
# - userPnlSettler
# - markTwapCrank
# below are bot configs
botConfigs:
fillerLite:
botId: "fillerLite"
dryRun: false
fillerPollingInterval: 6000
metricsPort: 9464
revertOnFailure: true
simulateTxForCUEstimate: true
filler:
botId: "filler"
dryRun: false
fillerPollingInterval: 6000
metricsPort: 9464
# will revert a transaction during simulation if a fill fails, this will save on tx fees,
# and be friendlier for use with services like Jito.
# Default is true
revertOnFailure: true
# calls simulateTransaction before sending to get an accurate CU estimate
# as well as stop before sending the transaction (Default is true)
simulateTxForCUEstimate: true
spotFiller:
botId: "spot-filler"
dryRun: false
fillerPollingInterval: 6000
metricsPort: 9465
revertOnFailure: true
simulateTxForCUEstimate: true
liquidator:
botId: "liquidator"
dryRun: false
metricsPort: 9466
# if true will NOT attempt to sell off any inherited positions
disableAutoDerisking: false
# if true will swap spot assets on jupiter if the price is better
useJupiter: true
# null will handle all markets
perpMarketIndicies:
spotMarketIndicies:
# this replaces perpMarketIndicies and spotMarketIndicies by allowing you to specify
# which subaccount is responsible for liquidating markets
# Markets are defined on perpMarkets.ts and spotMarkets.ts on the protocol codebase
# Note: you must set global.subaccounts with all the subaccounts you want to load
perpSubAccountConfig:
0:
# subaccount 0 will watch perp markets 0 and 1
- 0
- 1
spotSubAccountConfig:
0:
# subaccount 0 will watch all spot markets
# max slippage (from oracle price) to incur allow when derisking
maxSlippagePct: 0.05
# what algo to use for derisking. Options are "market" or "twap"
deriskAlgo: "market"
# if deriskAlgo == "twap", must supply these as well
# twapDurationSec: 300 # overall duration of to run the twap algo. Aims to derisk the entire position over this duration
# Minimum deposit amount to try to liquidiate, per spot market, in lamports.
# If null, or a spot market isn't here, it will liquidate any amount
# See perpMarkets.ts on the protocol codebase for the indices
minDepositToLiq:
1: 10
2: 1000
# Filter out un-liquidateable accounts that just create log noise
excludedAccounts:
- 9CJLgd5f9nmTp7KRV37RFcQrfEmJn6TU87N7VQAe2Pcq
- Edh39zr8GnQFNYwyvxhPngTJHrr29H3vVup8e8ZD4Hwu
# max % of collateral to spend when liquidating a user. In percentage terms (0.5 = 50%)
maxPositionTakeoverPctOfCollateral: 0.5
# sends a webhook notification (slack, discord, etc.) when a liquidation is attempted (can be noisy due to partial liquidations)
notifyOnLiquidation: true
trigger:
botId: "trigger"
dryRun: false
metricsPort: 9465
markTwapCrank:
botId: "mark-twap-cranker"
dryRun: false
metricsPort: 9465
crankIntervalToMarketIndicies:
15000:
- 0
- 1
- 2
60000:
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16