Query editor
WITHconstants AS (SELECT'arbitrum' AS chain,0xaf88d065e77c8cc2239327c5edb3a432268e5831 AS usdc_token,0x2df1c51e09aecf9cacb7bc98cb1742757f163df7 AS hyperliquid_bridge2,0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9 AS usdt0_token,180 AS deposit_lookback_days,7 AS prior_flow_window_days,5.0 AS minimum_deposit_amount),stable_tokens(contract_address, stable_symbol) AS (VALUES(0xaf88d065e77c8cc2239327c5edb3a432268e5831, 'USDC'),(0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9, 'USDT0')),custom_address_labels(blockchain, address, protocol, category, role, confidence, source_url, notes) AS (VALUES('arbitrum', 0xf70da97812cb96acdf810712aa562db8dfa3dbef, 'Relay', 'cross_chain_router', 'solver', 'high', 'https://docs.relay.link/references/api/api_resources/contract-addresses', 'Relay EVM solver'),('arbitrum', 0xa5f565650890fba1824ee0f21ebbbf660a179934, 'Relay', 'cross_chain_router', 'receiver', 'high', 'https://docs.relay.link/references/api/api_resources/contract-addresses', 'RelayReceiver on Arbitrum'),('arbitrum', 0x4cd00e387622c35bddb9b4c962c136462338bc31, 'Relay', 'cross_chain_router', 'depository', 'high', 'https://docs.relay.link/references/protocol/addresses', 'Relay settlement depository on Arbitrum'),('arbitrum', 0x337685fdab40d39bd02028545a4ffa7d287cc3e2, 'Mayan Finance', 'cross_chain_router', 'forwarder', 'high', 'https://docs.mayan.finance/integration/forwarder-contract', 'Mayan Forwarder'),('arbitrum', 0x40ffe85a28dc9993541449464d7529a922142960, 'Mayan Finance', 'cross_chain_router', 'swift_source', 'high', 'https://docs.mayan.finance/architecture/swift-v2', 'Mayan Swift v2 source'),('arbitrum', 0xce16f69375520ab01377ce7b88f5ba8c48f8d666, 'Squid Router', 'cross_chain_router', 'router_proxy', 'medium', 'https://arbiscan.io/address/0xce16f69375520ab01377ce7b88f5ba8c48f8d666', 'Squid Router Proxy Arbiscan label'),('arbitrum', 0x53bf833a5d6c4dda888f69c22c88c9f356a41614, 'Stargate', 'bridge', 'router_v1', 'high', 'https://stargateprotocol.gitbook.io/stargate/developers/contract-addresses/mainnet', 'Stargate v1 Router'),('arbitrum', 0xe8cdf27acd73a434d661c84887215f7598e7d0d3, 'Stargate', 'bridge', 'pool_usdc_v2', 'high', 'https://stargateprotocol.gitbook.io/stargate/v2-developer-docs/technical-reference/mainnet-contracts', 'Stargate v2 USDC pool'),('arbitrum', 0xe35e9842fceaca96570b734083f4a58e8f7c5f2a, 'Across', 'bridge', 'spoke_pool', 'high', 'https://docs.across.to/chains-and-contracts', 'Across SpokePool on Arbitrum'),('arbitrum', 0x43de2d77bf8027e25dbd179b491e8d64f38398aa, 'deBridge', 'bridge', 'debridge_gate', 'high', 'https://docs.debridge.com/dmp-details/dmp/deployed-contracts', 'deBridge DMP gate'),('arbitrum', 0xef4fb24ad0916217251f553c0596f8edc630eb66, 'deBridge', 'cross_chain_router', 'dln_source', 'high', 'https://docs.debridge.com/dln-details/overview/deployed-contracts', 'deBridge DLN source'),('arbitrum', 0xe7351fd770a37282b91d153ee690b63579d6dd7f, 'deBridge', 'cross_chain_router', 'dln_destination', 'high', 'https://docs.debridge.com/dln-details/overview/deployed-contracts', 'deBridge DLN destination'),('arbitrum', 0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9, 'USDT0', 'stablecoin', 'token', 'high', 'https://docs.usdt0.to/', 'USDT0 token on Arbitrum')),hyperliquid_deposits AS (SELECTCONCAT(CAST(t.tx_hash AS VARCHAR), '-', CAST(t.evt_index AS VARCHAR)) AS deposit_id,t.block_time AS deposit_block_time,t.tx_hash AS deposit_tx_hash,t.evt_index AS deposit_evt_index,t."from" AS depositor,t.amount AS deposit_amount_usdc,t.amount_usd AS deposit_amount_usdFROM tokens.transfers tCROSS JOIN constants cWHERE t.blockchain = c.chainAND t.contract_address = c.usdc_tokenAND t."to" = c.hyperliquid_bridge2AND t.amount >= c.minimum_deposit_amountAND t.block_time >= NOW() - INTERVAL '180' DAY),flow_candidates AS (SELECTd.deposit_id,d.deposit_block_time,d.deposit_tx_hash,d.deposit_evt_index,d.depositor,d.deposit_amount_usdc,'bridges_evms.flows' AS source_table,1 AS source_priority,b.bridge_name,