Skip to content

Commit 205160c

Browse files
committed
feat: update bunni hooks in allowlist, add bunni pool list to routing
1 parent 0befc04 commit 205160c

File tree

4 files changed

+938
-187
lines changed

4 files changed

+938
-187
lines changed

lib/cron/cache-pools.ts

Lines changed: 19 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { metricScope } from 'aws-embedded-metrics'
2525
import * as zlib from 'zlib'
2626
import dotenv from 'dotenv'
2727
import { v4HooksPoolsFiltering } from '../util/v4HooksPoolsFiltering'
28+
import { BUNNI_POOLS_CONFIG } from '../util/bunni-pools'
2829

2930
// Needed for local stack dev, not needed for staging or prod
3031
// But it still doesn't work on the local cdk stack update,
@@ -303,43 +304,27 @@ const handler: ScheduledHandler = metricScope((metrics) => async (event: EventBr
303304
}
304305
}
305306

306-
if (chainId === ChainId.MAINNET) {
307-
// https://bunni.xyz/explore/pools/ethereum/0x9148f00424c4b40a9ec4b03912f091138e9e91a60980550ed97ed7f9dc998cb5
308-
manuallyIncludedV4Pools.push({
309-
id: '0x9148f00424c4b40a9ec4b03912f091138e9e91a60980550ed97ed7f9dc998cb5',
310-
feeTier: '1',
311-
tickSpacing: '60',
312-
hooks: '0x0010d0d5db05933fa0d9f7038d365e1541a41888',
313-
liquidity: '173747248900',
314-
token0: {
315-
id: '0x0000000000000000000000000000000000000000',
316-
},
317-
token1: {
318-
id: '0x000000c396558ffbab5ea628f39658bdf61345b3',
319-
},
320-
tvlETH: 73.23,
321-
tvlUSD: 416830,
322-
} as V4SubgraphPool)
307+
for (const bunniPool of BUNNI_POOLS_CONFIG) {
308+
if (bunniPool.chainId === chainId) {
309+
manuallyIncludedV4Pools.push({
310+
id: bunniPool.id,
311+
feeTier: bunniPool.feeTier,
312+
tickSpacing: bunniPool.tickSpacing,
313+
hooks: bunniPool.hooks,
314+
liquidity: bunniPool.liquidity,
315+
token0: {
316+
id: bunniPool.token0.id,
317+
},
318+
token1: {
319+
id: bunniPool.token1.id,
320+
},
321+
tvlETH: bunniPool.tvlETH,
322+
tvlUSD: bunniPool.tvlUSD,
323+
} as V4SubgraphPool);
324+
}
323325
}
324326

325327
if (chainId === ChainId.UNICHAIN) {
326-
// https://bunni.xyz/explore/pools/unichain/0xeec51c6b1a9e7c4bb4fc4fa9a02fc4fff3fe94efd044f895d98b5bfbd2ff9433
327-
manuallyIncludedV4Pools.push({
328-
id: '0xeec51c6b1a9e7c4bb4fc4fa9a02fc4fff3fe94efd044f895d98b5bfbd2ff9433',
329-
feeTier: '0',
330-
tickSpacing: '1',
331-
hooks: '0x005af73a245d8171a0550ffae2631f12cc211888',
332-
liquidity: '173747248900',
333-
token0: {
334-
id: '0x078d782b760474a361dda0af3839290b0ef57ad6',
335-
},
336-
token1: {
337-
id: '0x9151434b16b9763660705744891fa906f660ecc5',
338-
},
339-
tvlETH: 5371.42857143,
340-
tvlUSD: 15040000,
341-
} as V4SubgraphPool)
342-
343328
// UNICHAIN ETH/WETH: https://uniscan.xyz/tx/0x935979a7e4a1e3ea92b180009c46242b89a787fb4f2f5799bd53c675d5e0f9fd#eventlog
344329
manuallyIncludedV4Pools.push({
345330
id: '0xba246b8420b5aeb13e586cd7cbd32279fa7584d7f4cbc9bd356a6bb6200d16a6',

0 commit comments

Comments
 (0)