Query editor
withswap_events as (selecte.blockchain,e.block_date,date_trunc('minute', e.block_time) as block_minute,e.block_time,e.block_number,e.tx_hash,e.tx_index,e.contract_address,e.event_name,e.event_address as user_safe,casewhen e.event_name = 'etherfi_cash_crosschain_swap_executed' then e.event_idelse cast(null as uint256)end as request_id,e.blockchain as source_chain,casewhen e.event_name = 'etherfi_cash_crosschain_swap_executed' then (casewhen e.amount1 = cast(1 as uint256) then 'ethereum'when e.amount1 = cast(10 as uint256) then 'optimism'else cast(null as varchar)end)else e.blockchainend as destination_chain,e.token_address as token_sold_address,e.token_symbol as token_sold_symbol,e.token_amount_raw as token_sold_amount_raw,e.token_amount as token_sold_amount,e.secondary_token_address as token_bought_address,e.product_symbol as token_bought_symbol,e.product_amount_raw as token_bought_amount_raw,e.product_amount as token_bought_amount,casewhen e.event_name = 'swap_on_openocean'and ((e.blockchain = 'optimism' and e.contract_address in (0x5765177E7A0226F6a9969770bd24CBd67950c375, 0x850D01FfCD8d23fA29751Eb26F8A473FFa4FFD0A))or (e.blockchain = 'scroll' and e.contract_address = 0x4dEAa5f2e1CD1A792304d1649EdfA35D565F9346))then 'OpenOcean'when e.event_name = 'etherfi_cash_crosschain_swap_executed'and e.blockchain in ('ethereum', 'optimism')and e.contract_address = 0xac6BcA0bB66D4587171CFc77b19E5E68F74De55ethen 'Enso'when e.event_name = 'etherfi_cash_crosschain_swap_executed'and e.blockchain in ('ethereum', 'optimism')and e.contract_address = 0x241D0227e6Ae4df1747f2A04F4bF3d33eD850cA7then 'Across'else cast(null as varchar)end as swap_providerfromdune.ether_fi.result_etherfi_ecosystem_enriched_events_latest ewhere e.block_date >= date_trunc('day', now() - interval '8' day)and e.product_category = 'cash'and e.event_name in ('etherfi_cash_swap_v1', 'swap_on_openocean', 'etherfi_cash_crosschain_swap_executed')),