-
Notifications
You must be signed in to change notification settings - Fork 70
/
example.config.yaml
232 lines (191 loc) · 7.84 KB
/
example.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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
global:
# devnet or mainnet-beta
driftEnv: mainnet-beta
# RPC endpoint to use
endpoint: https://you-need-your-own-rpc.com
# 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:
# optional endpoint to use for just confirming txs to check if they landed.
# loop purposefully runs slow so should work with public RPC
txConfirmationEndpoint: https://api.mainnet-beta.solana.com
# `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
# skips preflight checks on sendTransaciton, default is false.
# this will speed up tx sending, but may increase SOL paid due to failed txs landing
# on chain
#txSkipPreflight: true
# 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: true # 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
# 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
subaccounts:
- 0
eventSubscriberPollingInterval: 5000
bulkAccountLoaderPollingInterval: 5000
useJito: false
# one of: ['non-jito-only', 'jito-only', 'hybrid'].
# * non-jito-only: will only send txs to RPC when there is no active jito leader
# * jito-only: will only send txs via bundle when there is an active jito leader
# * hybrid: will attempt to send bundles when active jito leader, and use RPC when not
# hybrid may not work well if using high throughput bots such as a filler depending on infra limitations.
jitoStrategy: jito-only
# the minimum tip to pay
jitoMinBundleTip: 10000
# the maximum tip to pay (will pay this once jitoMaxBundleFailCount is hit)
jitoMaxBundleTip: 100000
# the number of failed bundles (accepted but not landed) before tipping the max tip
jitoMaxBundleFailCount: 200
# the tip multiplier to use when tipping the max tip
# controls superlinearity (1 = linear, 2 = slightly-superlinear, 3 = more-superlinear, ...)
jitoTipMultiplier: 3
jitoBlockEngineUrl: frankfurt.mainnet.block-engine.jito.wtf
jitoAuthPrivateKey: /path/to/jito/bundle/signing/key/auth.json
onlySendDuringJitoLeader: false
# 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
- filler
# 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:
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: 9464
revertOnFailure: true
simulateTxForCUEstimate: true
liquidator:
botId: "liquidator"
dryRun: false
metricsPort: 9465
# 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:
# specify which subaccount is ok with inheriting risk in each specified
# perp or spot market index. Leaving it null will watch
# all markets on the default global.subaccounts.0
perpSubAccountConfig:
0: # subaccount 0 will watch perp markets 0 and 1
- 0
- 1
spotSubAccountConfig: # will watch all spot markets on the default global.subaccounts.0
# deprecated (bad naming): use maxSlippageBps
maxSlippagePct: 50
# Max slippage to incur allow when derisking (in bps).
# This is used to calculate the auction end price (worse price) when derisking
# and also passed into jupiter when doing swaps.
maxSlippageBps: 50
# duration of jit auction for derisk orders
deriskAuctionDurationSlots: 100
# 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
# Will consider spot assets below this value to be "dust" and will be withdrawn to the authority wallet
# in human USD terms: 10.0 for 10.0 USD worth of spot assets
spotDustValueThreshold: 10
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