{"record":{"id":"d77d94c53485ab46","repo":"nautechsystems/nautilus_trader","slug":"hypersync-parsing-of-setfeeprotocol-event-is-not-d","errorCode":null,"errorMessage":"HyperSync parsing of SetFeeProtocol event is not defined in this dex: {}:{}","messagePattern":"HyperSync parsing of SetFeeProtocol event is not defined in this dex: (.+?):(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/blockchain/src/exchanges/extended.rs","lineNumber":404,"sourceCode":"                self.dex.chain,\n                self.dex.name\n            )\n        }\n    }\n\n    /// Parses a `SetFeeProtocol` event from a HyperSync log.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the DEX does not have a HyperSync `SetFeeProtocol` event parser defined or if parsing fails.\n    pub fn parse_fee_protocol_update_event_hypersync(\n        &self,\n        log: &HypersyncLog,\n    ) -> anyhow::Result<FeeProtocolUpdateEvent> {\n        if let Some(parse_fn) = &self.parse_fee_protocol_update_event_hypersync_fn {\n            parse_fn(self.dex.clone(), log)\n        } else {\n            anyhow::bail!(\n                \"HyperSync parsing of SetFeeProtocol event is not defined in this dex: {}:{}\",\n                self.dex.chain,\n                self.dex.name\n            )\n        }\n    }\n\n    /// Parses a `CollectProtocol` event from a HyperSync log.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the DEX does not have a HyperSync `CollectProtocol` event parser defined or if parsing fails.\n    pub fn parse_fee_protocol_collect_event_hypersync(\n        &self,\n        log: &HypersyncLog,\n    ) -> anyhow::Result<FeeProtocolCollectEvent> {\n        if let Some(parse_fn) = &self.parse_fee_protocol_collect_event_hypersync_fn {\n            parse_fn(self.dex.clone(), log)","sourceCodeStart":386,"sourceCodeEnd":422,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/blockchain/src/exchanges/extended.rs#L386-L422","documentation":"Raised by parse_fee_protocol_update_event_hypersync when the DEX has no HyperSync parser for the SetFeeProtocol event (parse_fee_protocol_update_event_hypersync_fn is None). SetFeeProtocol is emitted by Uniswap v3 pools when the protocol fee changes; DEXs that do not model protocol fees never register this parser, so the call bails with chain:name.","triggerScenarios":"Calling dex.parse_fee_protocol_update_event_hypersync(&log), typically from send_dex_event_log while decoding pool governance/fee-configuration logs, on a DEX without SetFeeProtocol support.","commonSituations":"Feeding v3 pool logs to a DEX adapter that ignores protocol fees; new DEX registrations missing the fee-protocol parser; forks (e.g. PancakeSwap v3 vs Uniswap v3) with divergent fee-protocol event support.","solutions":["Register the SetFeeProtocol HyperSync parser on the DEX if protocol-fee tracking is required.","Exclude SetFeeProtocol topics from this DEX's HyperSync filters when unsupported.","Confirm the log comes from a pool belonging to this DEX before parsing.","Skip fee-protocol logs for DEXs that declare no parser, logging at debug level."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if !dex_supports(dex, DexEvent::SetFeeProtocolHypersync) { return Ok(()); }","typeGuard":"fn has_fee_protocol_update_parser(dex: &Dex) -> bool { dex.parse_fee_protocol_update_event_hypersync_fn.is_some() }","tryCatchPattern":"match dex.parse_fee_protocol_update_event_hypersync(&log) {\n    Ok(evt) => handle_fee_protocol_update(evt),\n    Err(e) if e.to_string().contains(\"not defined in this dex\") => tracing::debug!(\"SetFeeProtocol unsupported on {}\", dex.name()),\n    Err(e) => return Err(e),\n}","preventionTips":["Gate protocol-fee tracking behind DEXs that model v3 protocol fees.","Derive topic filters from registered parsers, never the reverse.","Cover fee-protocol events in per-DEX integration tests.","Skip-and-log unsupported governance events during ingestion."],"tags":["dex","hypersync","event-parsing","fee-protocol","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"}