{"record":{"id":"e4c84bc963046700","repo":"nautechsystems/nautilus_trader","slug":"hypersync-parsing-of-collect-event-is-not-defined","errorCode":null,"errorMessage":"HyperSync parsing of collect event is not defined in this dex: {}:{}","messagePattern":"HyperSync parsing of collect event is not defined in this dex: (.+?):(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/exchanges/extended.rs","lineNumber":367,"sourceCode":"                self.dex.chain,\n                self.dex.name\n            )\n        }\n    }\n\n    /// Parses a collect event from a HyperSync log.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the DEX does not have a HyperSync collect event parser defined or if parsing fails.\n    pub fn parse_collect_event_hypersync(\n        &self,\n        log: &HypersyncLog,\n    ) -> anyhow::Result<CollectEvent> {\n        if let Some(parse_fn) = &self.parse_collect_event_hypersync_fn {\n            parse_fn(self.dex.clone(), log)\n        } else {\n            anyhow::bail!(\n                \"HyperSync parsing of collect event is not defined in this dex: {}:{}\",\n                self.dex.chain,\n                self.dex.name\n            )\n        }\n    }\n\n    /// Parses a flash event from a HyperSync log.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the DEX does not have a HyperSync flash event parser defined or if parsing fails.\n    pub fn parse_flash_event_hypersync(&self, log: &HypersyncLog) -> anyhow::Result<FlashEvent> {\n        if let Some(parse_fn) = &self.parse_flash_event_hypersync_fn {\n            parse_fn(self.dex.clone(), log)\n        } else {\n            anyhow::bail!(\n                \"HyperSync parsing of flash event is not defined in this dex: {}:{}\",","sourceCodeStart":349,"sourceCodeEnd":385,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/exchanges/extended.rs#L349-L385","documentation":"Raised by parse_collect_event_hypersync when the DEX lacks a HyperSync parser for collect events (position fee collection), i.e. parse_collect_event_hypersync_fn is None. The adapter cannot decode the log and bails with the DEX chain and name. Collect events are concentrated-liquidity (Uniswap v3-style) specific, so AMM DEXs without that model legitimately never register this parser.","triggerScenarios":"Calling dex.parse_collect_event_hypersync(&log), often from send_dex_event_log while streaming position-manager logs, for a DEX that never defined a HyperSync collect parser.","commonSituations":"Applying a v3-style event set to a v2-style DEX; a new DEX registration missing the collect parser; logs from a position manager routed to a DEX adapter that only handles swap/mint/burn; chain-specific forks without full event coverage.","solutions":["Register the HyperSync collect event parser on this DEX if it supports concentrated liquidity.","Filter collect-topic logs away from DEXs that do not support collect events before dispatch.","Match logs to the correct DEX adapter by emitted contract address.","Skip and log the event when the DEX declares no collect support instead of failing the stream."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if !dex_supports(dex, DexEvent::CollectHypersync) { return Ok(()); }","typeGuard":"fn has_hypersync_collect_parser(dex: &Dex) -> bool { dex.parse_collect_event_hypersync_fn.is_some() }","tryCatchPattern":"match dex.parse_collect_event_hypersync(&log) {\n    Ok(evt) => handle_collect(evt),\n    Err(e) if e.to_string().contains(\"not defined in this dex\") => tracing::debug!(\"collect unsupported on {}\", dex.name()),\n    Err(e) => return Err(e),\n}","preventionTips":["Only route concentrated-liquidity (v3-style) logs to DEXs with collect support.","Declare per-DEX event capabilities centrally and derive subscriptions from them.","Add CI checks that every DEX with v3 semantics registers collect parsers.","Treat unsupported-event errors as skip-and-log, not fatal."],"tags":["dex","hypersync","event-parsing","concentrated-liquidity","rust"],"backgroundTag":"unsupported-operation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}