nautechsystems/nautilus_trader · error
HyperSync parsing of SetFeeProtocol event is not defined in
Error message
HyperSync parsing of SetFeeProtocol event is not defined in this dex: {}:{} What it means
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.
Source
Thrown at crates/adapters/blockchain/src/exchanges/extended.rs:404
self.dex.chain,
self.dex.name
)
}
}
/// Parses a `SetFeeProtocol` event from a HyperSync log.
///
/// # Errors
///
/// Returns an error if the DEX does not have a HyperSync `SetFeeProtocol` event parser defined or if parsing fails.
pub fn parse_fee_protocol_update_event_hypersync(
&self,
log: &HypersyncLog,
) -> anyhow::Result<FeeProtocolUpdateEvent> {
if let Some(parse_fn) = &self.parse_fee_protocol_update_event_hypersync_fn {
parse_fn(self.dex.clone(), log)
} else {
anyhow::bail!(
"HyperSync parsing of SetFeeProtocol event is not defined in this dex: {}:{}",
self.dex.chain,
self.dex.name
)
}
}
/// Parses a `CollectProtocol` event from a HyperSync log.
///
/// # Errors
///
/// Returns an error if the DEX does not have a HyperSync `CollectProtocol` event parser defined or if parsing fails.
pub fn parse_fee_protocol_collect_event_hypersync(
&self,
log: &HypersyncLog,
) -> anyhow::Result<FeeProtocolCollectEvent> {
if let Some(parse_fn) = &self.parse_fee_protocol_collect_event_hypersync_fn {
parse_fn(self.dex.clone(), log)View on GitHub (pinned to 18893faf8b)
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.
Defensive patterns
Strategy: try-catch
Validate before calling
if !dex_supports(dex, DexEvent::SetFeeProtocolHypersync) { return Ok(()); } Type guard
fn has_fee_protocol_update_parser(dex: &Dex) -> bool { dex.parse_fee_protocol_update_event_hypersync_fn.is_some() } Try / catch
match dex.parse_fee_protocol_update_event_hypersync(&log) {
Ok(evt) => handle_fee_protocol_update(evt),
Err(e) if e.to_string().contains("not defined in this dex") => tracing::debug!("SetFeeProtocol unsupported on {}", dex.name()),
Err(e) => return Err(e),
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- HyperSync parsing of burn event is not defined in this dex:
- HyperSync parsing of initialize event is not defined in this
- HyperSync parsing of collect event is not defined in this de
- HyperSync parsing of flash event is not defined in this dex:
- HyperSync parsing of CollectProtocol event is not defined in
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/d77d94c53485ab46.
Report an issue: GitHub.