-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yaml
More file actions
472 lines (436 loc) · 19.3 KB
/
Copy pathconfig.yaml
File metadata and controls
472 lines (436 loc) · 19.3 KB
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
# yaml-language-server: $schema=./node_modules/envio/evm.schema.json
name: curve-crypto-pools
# Storage backends. Postgres serves the GraphQL API (via Hasura).
#
# ClickHouse dual-write is temporarily disabled — uncomment the `clickhouse`
# block below and set ENVIO_CLICKHOUSE_HOST / _DATABASE / _USERNAME / _PASSWORD
# in .env to re-enable the columnar analytics store. (When ClickHouse is on,
# Postgres's implicit default flips to false, which is why it is set explicitly.)
storage:
postgres:
default: true
# clickhouse:
# default: true
contracts:
- name: TricryptoFactoryNG
events:
- event: TricryptoPoolDeployed(address pool, string name, string symbol, address weth, address[3] coins, address math, bytes32 salt, uint256 packed_precisions, uint256 packed_A_gamma, uint256 packed_fee_params, uint256 packed_rebalancing_params, uint256 packed_prices, address deployer)
- name: TwocryptoFactoryNG
events:
- event: TwocryptoPoolDeployed(address pool, string name, string symbol, address[2] coins, address math, bytes32 salt, uint256[2] precisions, uint256 packed_A_gamma, uint256 packed_fee_params, uint256 packed_rebalancing_params, uint256 packed_prices, address deployer)
- name: TwocryptoFactoryV1
events:
- event: CryptoPoolDeployed(address token, address[2] coins, uint256 A, uint256 gamma, uint256 mid_fee, uint256 out_fee, uint256 allowed_extra_profit, uint256 fee_gamma, uint256 adjustment_step, uint256 admin_fee, uint256 ma_half_time, uint256 initial_price, address deployer)
- name: CryptoPool
events:
- event: TokenExchange(address indexed buyer, uint256 sold_id, uint256 tokens_sold, uint256 bought_id, uint256 tokens_bought, uint256 fee, uint256 packed_price_scale)
# Legacy tricrypto pool (e.g. tricrypto2 on mainnet) that was deployed
# manually rather than via a factory. Older TokenExchange event signature:
# no `fee`, no `packed_price_scale` fields. 3-coin pool.
- name: LegacyTricryptoPool
events:
- event: TokenExchange(address indexed buyer, uint256 sold_id, uint256 tokens_sold, uint256 bought_id, uint256 tokens_bought)
# Curve's original 2-coin crypto pools (cvxeth, crvEURTUSD, spelleth, teth,
# EURC/3Crv, XAUt/3Crv, USDC/EURS) — listed in the crypto registry
# (0x8F942C20) but deployed manually before the crypto factory. Same old
# 5-field TokenExchange signature as legacy tricrypto. 2-coin; static address.
- name: LegacyCryptoPool
events:
- event: TokenExchange(address indexed buyer, uint256 sold_id, uint256 tokens_sold, uint256 bought_id, uint256 tokens_bought)
- event: AddLiquidity(address indexed provider, uint256[2] token_amounts, uint256 fee, uint256 token_supply)
- event: RemoveLiquidity(address indexed provider, uint256[2] token_amounts, uint256 token_supply)
# Standalone 2-coin Curve crypto pool with donation features. Not deployed
# by any of the tracked factories above, so it is registered statically by
# address per chain. Pool entity is initialized lazily on the first event.
- name: TwocryptoPool
events:
- event: TokenExchange(address indexed buyer, uint256 sold_id, uint256 tokens_sold, uint256 bought_id, uint256 tokens_bought, uint256 fee, uint256 price_scale)
- event: AddLiquidity(address indexed provider, address indexed receiver, uint256[2] token_amounts, uint256 fee, uint256 token_supply, uint256 price_scale)
- event: Donation(address indexed donor, uint256[2] token_amounts)
- event: RemoveLiquidity(address indexed provider, uint256[2] token_amounts, uint256 token_supply)
- event: RemoveLiquidityOne(address indexed provider, uint256 token_amount, uint256 coin_index, uint256 coin_amount, uint256 approx_fee, uint256 packed_price_scale)
- event: RemoveLiquidityImbalance(address indexed provider, uint256 lp_token_amount, uint256[2] token_amounts, uint256 approx_fee, uint256 price_scale)
# Stableswap-NG factory. Deploy events carry NO pool address, so the address
# is resolved in contractRegister via pool_list(pool_count()-1).
- name: StableswapFactoryNG
events:
- event: PlainPoolDeployed(address[] coins, uint256 A, uint256 fee, address deployer)
- event: MetaPoolDeployed(address coin, address base_pool, uint256 A, uint256 fee, address deployer)
# Stableswap-NG pool, registered dynamically by the factory above. Pool
# entity is initialized lazily on the first event we see for it.
- name: StableswapPool
events:
- event: TokenExchange(address indexed buyer, int128 sold_id, uint256 tokens_sold, int128 bought_id, uint256 tokens_bought)
- event: TokenExchangeUnderlying(address indexed buyer, int128 sold_id, uint256 tokens_sold, int128 bought_id, uint256 tokens_bought)
- event: AddLiquidity(address indexed provider, uint256[] token_amounts, uint256[] fees, uint256 invariant, uint256 token_supply)
- event: RemoveLiquidity(address indexed provider, uint256[] token_amounts, uint256[] fees, uint256 token_supply)
- event: RemoveLiquidityOne(address indexed provider, int128 token_id, uint256 token_amount, uint256 coin_amount, uint256 token_supply)
- event: RemoveLiquidityImbalance(address indexed provider, uint256[] token_amounts, uint256[] fees, uint256 invariant, uint256 token_supply)
# Legacy stableswap — pools are registered via the Main Registry's PoolAdded
# (which, unlike the NG factory, carries the pool address). Metadata is read
# from the registry; swaps share the int128 TokenExchange signature.
- name: MainRegistry
events:
- event: PoolAdded(address indexed pool, bytes rate_method_id)
- name: LegacyStablePool
events:
- event: TokenExchange(address indexed buyer, int128 sold_id, uint256 tokens_sold, int128 bought_id, uint256 tokens_bought)
- event: TokenExchangeUnderlying(address indexed buyer, int128 sold_id, uint256 tokens_sold, int128 bought_id, uint256 tokens_bought)
# Curve's OLD stableswap metapool factory (pre-NG). Address-less deploy events
# (resolved via pool_list(pool_count()-1), like the NG factory). Deployed pools
# are registered as LegacyStablePool — same legacy int128 TokenExchange.
- name: MetapoolFactory
events:
- event: PlainPoolDeployed(address[4] coins, uint256 A, uint256 fee, address deployer)
- event: MetaPoolDeployed(address coin, address base_pool, uint256 A, uint256 fee, address deployer)
# Curve's factory-crvusd stableswap factory (mainnet only). Unlike the NG
# factory, its PlainPoolDeployed event CARRIES the pool address as the last
# arg, so no pool_list resolution is needed. Deployed pools are registered as
# StableswapPool — same int128 TokenExchange as Stableswap-NG.
- name: CrvUsdStableFactory
events:
- event: PlainPoolDeployed(address[4] coins, uint256 A, uint256 fee, address deployer, address pool)
# Curve Lend (one-way lending markets). NewVault carries every address, so
# controller/amm/vault are registered with no RPC resolution. The Controller
# + LLAMMA design is shared with the crvUSD mint markets.
- name: OneWayLendingFactory
events:
- event: NewVault(uint256 indexed id, address indexed collateral_token, address indexed borrowed_token, address vault, address controller, address amm, address price_oracle, address monetary_policy)
- name: LendController
events:
- event: UserState(address indexed user, uint256 collateral, uint256 debt, int256 n1, int256 n2, uint256 liquidation_discount)
- event: Borrow(address indexed user, uint256 collateral_increase, uint256 loan_increase)
- event: Repay(address indexed user, uint256 collateral_decrease, uint256 loan_decrease)
- event: RemoveCollateral(address indexed user, uint256 collateral_decrease)
- event: Liquidate(address indexed liquidator, address indexed user, uint256 collateral_received, uint256 stablecoin_received, uint256 debt)
- name: LendAMM
events:
- event: SetRate(uint256 rate, uint256 rate_mul, uint256 time)
- event: TokenExchange(address indexed buyer, uint256 sold_id, uint256 tokens_sold, uint256 bought_id, uint256 tokens_bought)
- name: LendVault
events:
- event: Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares)
- event: Withdraw(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)
# crvUSD mint markets. ControllerFactory.AddMarket registers the same
# Controller + LLAMMA contracts that Curve Lend uses, so the engine is shared.
- name: CrvUsdControllerFactory
events:
- event: AddMarket(address indexed collateral, address controller, address amm, address monetary_policy, uint256 ix)
# Gauges + GaugeController (CRV emissions / gauge weights).
- name: GaugeController
events:
- event: NewGauge(address addr, int128 gauge_type, uint256 weight)
- event: NewGaugeWeight(address gauge_address, uint256 time, uint256 weight, uint256 total_weight)
- event: VoteForGauge(uint256 time, address user, address gauge_addr, uint256 weight)
- name: Gauge
events:
# tx hash not stored by these handlers — skip the HyperSync tx join.
- event: Deposit(address indexed provider, uint256 value)
- event: Withdraw(address indexed provider, uint256 value)
- event: UpdateLiquidityLimit(address user, uint256 original_balance, uint256 original_supply, uint256 working_balance, uint256 working_supply)
# veCRV vote-escrow + fee distribution (protocol revenue).
- name: VotingEscrow
events:
# tx hash not stored by these handlers — skip the HyperSync tx join.
- event: Deposit(address indexed provider, uint256 value, uint256 indexed locktime, int128 type, uint256 ts)
- event: Withdraw(address indexed provider, uint256 value, uint256 ts)
- event: Supply(uint256 prevSupply, uint256 supply)
- name: FeeDistributor
events:
- event: CheckpointToken(uint256 time, uint256 tokens)
- event: Claimed(address indexed recipient, uint256 amount, uint256 claim_epoch, uint256 max_epoch)
# scrvUSD savings vault (ERC4626).
- name: ScrvUsdVault
events:
- event: Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares)
- event: Withdraw(address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares)
# crvUSD PegKeepers (v2) — peg-defense reserves (discovered via Regulator).
- name: PegKeeper
events:
- event: Provide(uint256 amount)
- event: Withdraw(uint256 amount)
- event: Profit(uint256 lp_amount)
chains:
# Ethereum Mainnet
- id: 1
start_block: 0
contracts:
- name: GaugeController
address:
- 0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB
- name: Gauge
- name: VotingEscrow
address:
- 0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2
- name: FeeDistributor
address:
- 0xA464e6DCda8AC41e03616F95f4BC98a13b8922Dc
- 0xD16d5eC345Dd86Fb63C6a9C43c517210F1027914
- name: TricryptoFactoryNG
address:
- 0x0c0e5f2fF0ff18a3be9b835635039256dC4B4963
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: TwocryptoFactoryV1
address:
- 0xF18056Bbd320E96A48e3Fbf8bC061322531aac99
- name: TwocryptoPool
address:
- 0x83f24023d15d835a213df24fd309c47dab5beb32
- name: LegacyTricryptoPool
address:
- 0xd51a44d3fae010294c616388b506acda1bfaae46
- name: LegacyCryptoPool
address:
- 0x9838eccc42659fa8aa7daf2ad134b53984c9427b
- 0x98a7f18d4e56cfe84e3d081b40001b3d5bd3eb8b
- 0xe84f5b1582ba325fdf9ce6b0c1f087ccfc924e54
- 0xb576491f1e6e5e62f1d8f26062ee822b40b0e0d4
- 0xadcfcf9894335dc340f6cd182afa45999f45fc44
- 0x98638facf9a3865cd033f36548713183f6996122
- 0x752ebeb79963cf0732e9c0fec72a49fd1defaeac
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0x6A8cbed756804B16E05E741eDaBd5cB544AE21bf
- name: StableswapPool
# reusdscrv (reUSD/scrvUSD, $7.5M) is in the NG factory registry but was
# missed by the deploy resolver (same-block multi-deploy → pool_list gave
# the wrong pool). It's registered statically here too; the NG swap
# handler's getStablePoolMeta populates it correctly since it IS in the
# factory. Static + dynamic (factory) addresses coexist.
address:
- 0xc522a6606bba746d7960404f22a3db936b6f4f50
- name: CrvUsdStableFactory
address:
- 0x4F8846Ae9380B90d2E71D5e3D042dff3E7ebb40d
- name: MainRegistry
address:
- 0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0xb9fc157394af804a3578134a6585c0dc9cc990d4
- name: OneWayLendingFactory
address:
- 0xea6876dde9e3467564acbee1ed5bac88783205e0
- name: LendController
- name: LendAMM
- name: LendVault
- name: CrvUsdControllerFactory
address:
- 0xC9332fdCB1C491Dcc683bAe86Fe3cb70360738BC
- name: ScrvUsdVault
address:
- 0x0655977FEb2f289A4aB78af67BAB0d17aAb84367
- name: PegKeeper
address:
- 0x9201da0D97CaAAff53f01B2fB56767C7072dE340
- 0xFb726F57d251aB5C731E5C64eD4F5F94351eF9F3
- 0x3fA20eAa107DE08B38a8734063D605d5842fe09C
- 0x338Cb2D827112d989A861cDe87CD9FfD913A1f9D
- 0x53876B157DeCf04389eEd66c7C29d73863f8C50b
# Arbitrum
- id: 42161
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0xbC0797015fcFc47d9C1856639CaE50D0e69FbEE8
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0x9AF14D26075f142eb3F292D5065EB3faa646167b
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0xb17b674D9c5CB2e441F8e196a2f048A81355d031
- name: OneWayLendingFactory
address:
- 0xcaEC110C784c9DF37240a8Ce096D352A75922DeA
- name: LendController
- name: LendAMM
- name: LendVault
# Optimism
- id: 10
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0xc6C09471Ee39C7E30a067952FcC89c8922f9Ab53
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0x5eeE3091f747E60a045a2E715a4c71e600e31F6E
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0x2db0E83599a91b508Ac268a6197b8B14F5e72840
- name: OneWayLendingFactory
address:
- 0x5EA8f3D674C70b020586933A0a5b250734798BeF
- name: LendController
- name: LendAMM
- name: LendVault
# Base
- id: 8453
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0xA5961898870943c68037F6848d2D866Ed2016bcB
- name: TwocryptoFactoryNG
address:
- 0xc9Fe0C63Af9A39402e8a5514f9c43Af0322b665F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0xd2002373543Ce3527023C75e7518C274A51ce712
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0x3093f9B57A428F3EB6285a589cb35bEA6e78c336
# Polygon
- id: 137
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0xC1b393EfEF38140662b91441C6710Aa704973228
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0x1764ee18e8B3ccA4787249Ceb249356192594585
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0x722272d36ef0da72ff51c5a65db7b870e2e8d4ee
# Gnosis (xDai)
- id: 100
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0xb47988ad49dce8d909c6f9cf7b26caf04e1445c8
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0xbC0797015fcFc47d9C1856639CaE50D0e69FbEE8
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0xD19Baeadc667Cf2015e395f2B08668Ef120f41F5
# BSC
- id: 56
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0x38f8D93406fA2d9924DcFcB67dB5B0521Fb20F7D
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0xd7E72f3615aa65b92A4DBdC211E296a35512988B
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0xEfDE221f306152971D8e9f181bFe998447975810
# Fantom
- id: 250
start_block: 0
contracts:
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0xe61Fb97Ef6eBFBa12B36Ffd7be785c1F5A2DE66b
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0x686d67265703d1f124c45e33d47d794c566889ba
# Fraxtal
- id: 252
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0xc9Fe0C63Af9A39402e8a5514f9c43Af0322b665F
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0xd2002373543Ce3527023C75e7518C274A51ce712
- name: StableswapPool
- name: OneWayLendingFactory
address:
- 0xf3c9bdAB17B7016fBE3B77D17b1602A7db93ac66
- name: LendController
- name: LendAMM
- name: LendVault
# Sonic
- id: 146
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0x635742dCC8313DCf8c904206037d962c042EAfBd
- name: TwocryptoFactoryNG
address:
- 0x1A83348F9cCFD3Fe1A8C0adBa580Ac4e267Fe495
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0x7C2085419BE6a04f4ad88ea91bC9F5C6E6C463D8
- name: StableswapPool
- name: OneWayLendingFactory
address:
- 0x30D1859DaD5A52aE03B6e259d1b48c4b12933993
- name: LendController
- name: LendAMM
- name: LendVault
# Avalanche
- id: 43114
start_block: 0
contracts:
- name: TricryptoFactoryNG
address:
- 0x3d6cB2F6DcF47CDd9C13E4e3beAe9af041d8796a
- name: TwocryptoFactoryNG
address:
- 0x98EE851a00abeE0d95D08cF4CA2BdCE32aeaAF7F
- name: CryptoPool
- name: StableswapFactoryNG
address:
- 0x1764ee18e8B3ccA4787249Ceb249356192594585
- name: StableswapPool
- name: LegacyStablePool
- name: MetapoolFactory
address:
- 0xb17b674D9c5CB2e441F8e196a2f048A81355d031