-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.example.yaml
208 lines (182 loc) · 9.67 KB
/
config.example.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
# Global Underwriter configuration
global:
# ! The 'privateKey' of the account that will be submitting the underwrites is by default
# ! loaded from the environment variable 'UNDERWRITER_PRIVATE_KEY'. Alternatively, the privateKey
# ! may be specified here (not recommended).
# privateKey: ''
# ! Optionally, custom privateKey loaders may be implemented and specified (NOTE: the 'env'
# ! loader is used if no privateKey configuration is specified):
# privateKey:
# loader: 'env' # The privateKey loader name (must match the implementation on src/config/privateKeyLoaders/<loader>.ts).
# customLoaderConfig: '' # Custom loader configs may be specified.
logLevel: 'info'
monitor:
blockDelay:
5 # Delay with which to process the chain blocks (on top of the relayer's
# blockDelay). Use this to prevent handling blocks that eventually reorg.
retryInterval: 5000 # Time to wait before retrying connection with the relayer's monitor
listener:
maxBlocks: 1000 # Maximum number of blocks to query in a single call
underwriter:
enabled:
true # Defaults to 'true' if the key is missing. Disabling the underwriter
# can be used to only handle past underwrites' expiries.
retryInterval: 30000 # Time to wait before retrying an underwrite
maxTries: 3 # Maximum tries for an underwrite
maxPendingTransactions: 50 # Maximum number of orders within the 'underwrite' pipeline
minRelayDeadlineDuration: # Minimum time specified on the message relay incentive 'deadline'
86400000 # (prevent underwriting a packet with too short of a deadline.)
underwriteDelay:
500 # Time to wait before start processing an underwrite (used to allow
# the relayer to process any relevant related data).
maxUnderwriteDelay:
300000 # Maximum time before which to evaluate the underwrite (since the
# orignal swap is executed.)
maxSubmissionDelay: 300000 # Maximum time for the wallet to submit the 'underwrite' transaction.
allowanceBuffer:
0.05 # Extra buffer allowed on top of the calculated required funds for
# performing an underwrite.
maxUnderwriteAllowed: 500 # Maximum underwrite value (EXCLUDING THE COLLATERAL).
# In the 'pricingDenomination' specified on the Relayer.
minUnderwriteReward: 0.5 # Minimum underwrite reward desired.
# In the 'pricingDenomination' specified on the Relayer.
relativeMinUnderwriteReward: 0.1 # Minimum relative underwrite reward desired (w.r.t. the
# underwrite amount plus the tx cost).
profitabilityFactor: 1.0 # Profitiability evaluation adjustment factor. A larger
# factor implies a larger profitability guarantee.
lowTokenBalanceWarning: '1000000000000000000' # Token balance below which a 'low balance' warning is emitted.
tokenBalanceUpdateInterval:
50 # Number of transactions after which to update the
# Underwriter token balance from the rpc.
relayDeliveryCosts: # Average swap delivery costs for underwritten swaps. Used to estimate underwrites profitability
gasUsage: '300000' # The gas used.
# gasObserved: '300000' # The gas observed by the escrow contract.
fee: '200000000000' # The fee taken on transaction submission (relevant for L2 chains.)
# value: '0' # The value sent to the escrow as payment (e.g. to execute the return 'ack' cross-chain message).
# ! The following setting is here for illustrative purposes, but it MUST ALWAYS be applied on
# ! a per-chain basis as it is CRITICAL to prevent the underwriter from being stolen from.
# minMaxGasDelivery: 200000
expirer:
enabled: true # Defaults to 'true' if the key is missing. Disabling the expirer. (Not recommended!)
# ! The following properties default to the values of the 'underwriter' if missing
retryInterval: 30000 # Time to wait before retrying an expiry
maxTries: 3 # Maximum tries for an expiry
maxPendingTransactions: 50 # Maximum number of orders within the 'expire' pipeline
expireBlocksMargin:
1000 # Number of blocks before the expiry deadline at which to expire
# an underwrite (only applies to underwrites by this underwriter)
wallet:
retryInterval: 30000 # Time to wait before retrying a failed transaction
maxTries: 3 # Maximum tries for a transaction
maxPendingTransactions: 50 # Maximum number of transactions within the 'submit' pipeline
confirmations: 1 # Number of confirmations to wait before accepting a transaction as 'completed'.
confirmationTimeout: 90000 # Timeout for a transaction to confirm
lowGasBalanceWarning: '1000000000000000000' # Gas balance below which a 'low balance' warning is emitted.
gasBalanceUpdateInterval: 50 # Number of transactions after which to update the Underwriter gas balance from the rpc.
# EIP-1559 Transactions
maxFeePerGas: '10000000000' # 'maxFeePerGas' set for all transactions (for chains that support eip-1559)
maxAllowedPriorityFeePerGas: '5000000000' # Upper bound to the 'maxPriorityFeePerGas' set on transactions (for chains that support eip-1559)
maxPriorityFeeAdjustmentFactor:
1.01 # Decimal factor used to adjust the 'maxPriorityFeePerGas' returned by 'getFeeData()'.
# The resulting value is set as the 'maxPriorityFeePerGas' property of the transaction
# if it is smaller than the configuration property 'maxAllowedPriorityFeePerGas' (if set).
# Legacy Transactions
maxAllowedGasPrice: '10000000000' # Upper bound to the 'gasPrice' set on transactions (for chains that do not support eip-1559)
gasPriceAdjustmentFactor:
1.01 # Decimal factor used to adjust the 'gasPrice' returned by 'getFeeData()'. The resulting
# value is set as the 'gasPrice' property of the transaction if it is smaller than the
# configuration property 'maxAllowedGasPrice' (if set).
# All Transactions
priorityAdjustmentFactor:
1.05 # Decimal factor used to adjust **all** the gas prices (including 'maxFeePerGas') for
# priority transactions.
# The AMBs configuration
ambs:
- name: wormhole
enabled: true # TODO not implemented. Defaults to 'true' if the key is missing
relayPrioritisation: true # Defaults to 'true' if the key is missing
# Chain configuration
chains:
- chainId: 10
name: 'OP Mainnet'
rpc: 'https://mainnet.optimism.io'
underwriter:
minMaxGasDelivery: 200000
# The tokens that are to be undewritten
tokens:
- name: 'WETH'
tokenId: "ethereum"
address: '0x4200000000000000000000000000000000000006'
allowanceBuffer:
'10000000000000000000' # Amount by which to 'buffer' the token approvals
# to prevent having to approve tokens for every
# single underwrite. If not specified an
# 'unlimited' approval is set.
# Overrides (uncomment if desired)
# maxUnderwriteAllowed: 500
# minUnderwriteReward: 0.5
# relativeMinUnderwriteReward: 0.1
# profitabilityFactor: 1.0
- chainId: 81457
name: 'Blast Mainnet'
rpc: 'https://rpc.blast.io'
underwriter:
minMaxGasDelivery: 200000
tokens:
- name: 'WETH'
tokenId: "ethereum"
address: '0x4300000000000000000000000000000000000004'
allowanceBuffer: '10000000000000000000'
- chainId: 8453
name: 'Base Mainnet'
rpc: 'https://mainnet.base.org'
underwriter:
minMaxGasDelivery: 200000
tokens:
- name: 'WETH'
tokenId: "ethereum"
address: '0x4200000000000000000000000000000000000006'
allowanceBuffer: '10000000000000000000'
endpoints:
- name: 'OP Mainnet'
amb: 'wormhole'
chainId: 10
factoryAddress: '0x00000000E5E81E25aeaD7fCCb4C9560C6b5b718F'
interfaceAddress: '0x23bC307c20941164025624455bdda22B754468b2'
incentivesAddress: '0x8C8727276725b7Da11fDA6e2646B2d2448E5B3c5'
channelsOnDestination:
81457: '0x0000000000000000000000000000000000000000000000000000000000000018'
8453: '0x0000000000000000000000000000000000000000000000000000000000000018'
vaultTemplates:
- name: 'Volatile'
address: '0x0000000003b8C9BFeB9351933CFC301Eea92073F'
- name: 'Amplified'
address: '0x000000004aBe0D620b25b8B06B0712BDcff21899'
- name: 'Blast Mainnet'
amb: 'wormhole'
chainId: 81457
factoryAddress: '0x00000000E5E81E25aeaD7fCCb4C9560C6b5b718F'
interfaceAddress: '0x2AC500c5f53D0219B1691B785aa857A0fbb2035D'
incentivesAddress: '0x3C5C5436BCa59042cBC835276E51428781366d85'
channelsOnDestination:
10: '0x0000000000000000000000000000000000000000000000000000000000000024'
8453: '0x0000000000000000000000000000000000000000000000000000000000000024'
vaultTemplates:
- name: 'Volatile'
address: '0x0000000003b8C9BFeB9351933CFC301Eea92073F'
- name: 'Amplified'
address: '0x000000004aBe0D620b25b8B06B0712BDcff21899'
- name: 'Base Mainnet'
amb: 'wormhole'
chainId: 8453
factoryAddress: '0x00000000E5E81E25aeaD7fCCb4C9560C6b5b718F'
interfaceAddress: '0x2AC500c5f53D0219B1691B785aa857A0fbb2035D'
incentivesAddress: '0x3C5C5436BCa59042cBC835276E51428781366d85'
channelsOnDestination:
10: '0x000000000000000000000000000000000000000000000000000000000000001E'
81457: '0x000000000000000000000000000000000000000000000000000000000000001E'
vaultTemplates:
- name: 'Volatile'
address: '0x0000000003b8C9BFeB9351933CFC301Eea92073F'
- name: 'Amplified'
address: '0x000000004aBe0D620b25b8B06B0712BDcff21899'