Query editor
-- dSolver Base auction participation for settlement win/revert rates.---- Parameters:-- solver_address 0x-prefixed solver EOA-- blockchain must be "base" (guard for the Base-only first version)-- from_datetime inclusive ISO-8601 auction timestamp-- to_datetime exclusive ISO-8601 auction timestamp---- Participation means that CoW recorded at least one proposed solution for-- the solver, including proposals that were later filtered out. A successful-- settlement is attributed only when batch_data records a non-null transaction-- hash for that same solver. Do not select the latest batch across every-- solver: an auction can have another solver's later batch record after the-- configured solver's successful settlement.---- CoW's enriched bidding materialization supplies directional order pairs for-- solutions that contain an attributable CoW order. Auctions without such a-- row are retained with pair_attribution_status='unattributed' so pair-- coverage remains explicit instead of shrinking the overall denominator.---- Almost every participated auction has batch_data. Its auction timestamp is-- reconstructed from the deadline epoch: Base competitions start seven blocks-- before block_deadline, and the enriched bidding auction_time is exactly 14-- seconds after that start block timestamp. Auctions without batch_data first-- use enriched bidding time and finally the nearest Base batch as a bounded,-- explicitly labelled fallback.WITHparams AS (SELECTfrom_hex(replace(lower('{{solver_address}}'), '0x', '')) AS solver,from_iso8601_timestamp('{{from_datetime}}') AS from_time,from_iso8601_timestamp('{{to_datetime}}') AS to_timeWHERE lower('{{blockchain}}') = 'base'),participated AS (SELECTp.auction_id,bool_or(coalesce(p.is_winner, false)) AS is_winner,bool_or(NOT coalesce(p.filtered_out, false)) AS eligible,count(*) AS solution_countFROM dune.cowprotocol.proposed_solutions pCROSS JOIN params cfgWHERE p.blockchain = 'base'AND p.solver = cfg.solverGROUP BY p.auction_id),id_bounds AS (SELECT min(auction_id) AS min_id, max(auction_id) AS max_idFROM participated),base_batches AS (SELECTb.auction_id,max_by(b.block_deadline, b.block_number) AS block_deadlineFROM dune.cowprotocol.batch_data bCROSS JOIN id_bounds boundsWHERE b.blockchain = 'base'AND b.auction_id BETWEEN bounds.min_id - 500 AND bounds.max_id + 500GROUP BY b.auction_id),