nautechsystems/nautilus_trader · error

RPC tick topology does not match positions: derived {} ticks

Error message

RPC tick topology does not match positions: derived {} ticks, received {}

What it means

Derived-topology check in validate_rpc_snapshot_topology: replaying all snapshot positions must reproduce exactly the tick set the RPC returned; extra or missing derived ticks mean the position list and tick data are inconsistent.

Source

Thrown at crates/adapters/blockchain/src/data/core.rs:2227

            if position.tick_lower <= snapshot.state.current_tick
                && snapshot.state.current_tick < position.tick_upper
            {
                active_liquidity = active_liquidity
                    .checked_add(position.liquidity)
                    .context("active position liquidity overflow")?;
            }
        }

        if active_liquidity != snapshot.state.liquidity {
            anyhow::bail!(
                "RPC active liquidity mismatch: positions sum to {active_liquidity}, global state reports {}",
                snapshot.state.liquidity
            );
        }

        if derived_ticks.len() != actual_ticks.len() {
            anyhow::bail!(
                "RPC tick topology does not match positions: derived {} ticks, received {}",
                derived_ticks.len(),
                actual_ticks.len()
            );
        }

        for (tick_value, (liquidity_gross, liquidity_net)) in derived_ticks {
            let actual_tick = actual_ticks
                .get(&tick_value)
                .with_context(|| format!("RPC snapshot omitted position boundary {tick_value}"))?;

            if actual_tick.liquidity_gross != liquidity_gross
                || actual_tick.liquidity_net != liquidity_net
            {
                anyhow::bail!(
                    "RPC tick {tick_value} does not match positions: derived gross={liquidity_gross} net={liquidity_net}, received gross={} net={}",
                    actual_tick.liquidity_gross,
                    actual_tick.liquidity_net

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Re-fetch the snapshot so positions and ticks come from the same block
  2. Re-sync HyperSync data for the pool
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/adapters/blockchain/src/data/core.rs:2227 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/b1e257f3c3645a2b. Report an issue: GitHub.