nautechsystems/nautilus_trader · error · anyhow::Error

Cached token {} does not match its deployment manifest ident

Error message

Cached token {} does not match its deployment manifest identity

What it means

Pre-trade plan validation: a token cached in the local pool plan no longer matches the deployment manifest's identity (name/symbol/decimals) for that address, indicating stale or tampered cache state; the plan is rejected.

Source

Thrown at crates/adapters/blockchain/src/execution/client.rs:4156

            && pool.fee == plan.pool.fee.expect("validated pool fee")
            && factory == plan.factory,
        "Cached pool {} does not match its deployment manifest identity",
        plan.pool_address
    );

    for token in [&plan.pool.token0, &plan.pool.token1] {
        let identities = manifest
            .tokens
            .iter()
            .filter(|identity| Address::from_str(&identity.address).ok() == Some(token.address))
            .collect::<Vec<_>>();
        anyhow::ensure!(
            identities.len() == 1,
            "Token {} does not have exactly one deployment manifest identity",
            token.address
        );
        let identity = identities[0];
        anyhow::ensure!(
            identity.name == token.name
                && identity.symbol == token.symbol
                && identity.decimals == token.decimals,
            "Cached token {} does not match its deployment manifest identity",
            token.address
        );
        let expected_role = if token.address == plan.pool.get_base_token().address {
            "base"
        } else {
            "quote"
        };
        anyhow::ensure!(
            matches!(identity.asset_role.as_str(), "both") || identity.asset_role == expected_role,
            "Token {} is not permitted as the pool {expected_role} asset",
            token.address
        );
    }
    Ok(quote_contract)

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Refresh the cached token from the manifest values
  2. Correct whichever source is wrong and re-sync
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/adapters/blockchain/src/execution/client.rs:4156 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/b612f8b01ef79bc9. Report an issue: GitHub.