Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/cron/cache-pools.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Protocol } from '@uniswap/router-sdk'

Check failure on line 1 in lib/cron/cache-pools.ts

View workflow job for this annotation

GitHub Actions / Prettier

lib/cron/cache-pools.ts#L1

There are issues with this file's formatting, please run Prettier to fix the errors
import {
setGlobalLogger,
setGlobalMetric,
Expand Down Expand Up @@ -26,6 +26,7 @@
import dotenv from 'dotenv'
import { v4HooksPoolsFiltering } from '../util/v4HooksPoolsFiltering'
import { BUNNI_POOLS_CONFIG } from '../util/bunni-pools'
import { WSTETH_HOOKS_ADDRESS_ON_MAINNET } from '../util/hooksAddressesAllowlist'

// Needed for local stack dev, not needed for staging or prod
// But it still doesn't work on the local cdk stack update,
Expand Down Expand Up @@ -458,6 +459,28 @@
},
tvlETH: 44000.1795925485023741879813651641809,
tvlUSD: 95050000.95363442908526427214106054717,
} as V4SubgraphPool),
// Mainnet WETH/wstETH: https://app.uniswap.org/explore/pools/ethereum/0x62ef4c78f484594bae004aa6932f0f0a5cca898fe736576f3deb8a5a3942bed8
manuallyIncludedV4Pools.push({
id: '0x62ef4c78f484594bae004aa6932f0f0a5cca898fe736576f3deb8a5a3942bed8',
feeTier: '0',
tickSpacing: '60',
hooks: WSTETH_HOOKS_ADDRESS_ON_MAINNET,
liquidity: '482843960670027606548690',
token0: {
symbol: 'wstETH',
id: '0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0',
name: 'Wrapped liquid staked Ether 2.0',
decimals: '18',
},
token1: {
symbol: 'stETH',
id: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
name: 'Liquid staked Ether 2.0',
decimals: '18',
},
tvlETH: 44000.1795925485023741879813651641809,
tvlUSD: 95050000.95363442908526427214106054717,
} as V4SubgraphPool)
}

Expand Down
4 changes: 3 additions & 1 deletion lib/util/hooksAddressesAllowlist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ export const WETH_HOOKS_ADDRESS_ON_OP_MAINNET = '0x480dafdb4d6092ef3217595b75784
export const WETH_HOOKS_ADDRESS_ON_UNICHAIN = '0x730b109bad65152c67ecc94eb8b0968603dba888'
export const WETH_HOOKS_ADDRESS_ON_BASE = '0xb08211d57032dd10b1974d4b876851a7f7596888'
export const WETH_HOOKS_ADDRESS_ON_MAINNET = '0x57991106cb7aa27e2771beda0d6522f68524a888'

export const WETH_HOOKS_ADDRESS_ON_ARBITRUM = '0x2a4adf825bd96598487dbb6b2d8d882a4eb86888'

export const WSTETH_HOOKS_ADDRESS_ON_MAINNET = '0x3ac6e14a142251eb3fe739399e0a8da81ed06888'

// example pool: https://app.uniswap.org/explore/pools/unichain/0xeec51c6b1a9e7c4bb4fc4fa9a02fc4fff3fe94efd044f895d98b5bfbd2ff9433
export const BUNNI_ON_UNICHAIN = '0x005af73a245d8171a0550ffae2631f12cc211888'
// example pool: https://app.uniswap.org/explore/pools/unichain/0x7dbe9918ba991e7c2b078ec8ce882a060024a6126927cf66553a359e427f2f6a
Expand Down Expand Up @@ -75,6 +76,7 @@ export const HOOKS_ADDRESSES_ALLOWLIST: { [chain in ChainId]: Array<string> } =
BUNNI_HOOKS_ADDRESS_v1_1_1,
BUNNI_HOOKS_ADDRESS_v1_2_1,
WETH_HOOKS_ADDRESS_ON_MAINNET,
WSTETH_HOOKS_ADDRESS_ON_MAINNET,
],
[ChainId.GOERLI]: [ADDRESS_ZERO],
[ChainId.SEPOLIA]: [ADDRESS_ZERO, extraHooksAddressesOnSepolia],
Expand Down
11 changes: 11 additions & 0 deletions lib/util/v4HooksPoolsFiltering.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ export function v4HooksPoolsFiltering(chainId: ChainId, pools: Array<V4SubgraphP
additionalAllowedPool += 1
}

// stETH/wstETH
if (
pool.id.toLowerCase() === '0x62ef4c78f484594bae004aa6932f0f0a5cca898fe736576f3deb8a5a3942bed8'.toLowerCase() &&
chainId === ChainId.MAINNET
) {
pool.tvlETH = 8346090.336 // https://lido.fi/
pool.tvlUSD = 33384361344 // https://lido.fi/
log.info(`Setting tvl for stETH/wstETH pool ${JSON.stringify(pool)}`)
additionalAllowedPool += 1
}

// Check if this pool is in our Bunni pools configuration
const bunniPool = BUNNI_POOLS_CONFIG.find(
(config) => config.id.toLowerCase() === pool.id.toLowerCase() && config.chainId === chainId
Expand Down
Loading