nautechsystems/nautilus_trader · error · anyhow::Error
Token {} is not permitted as the pool {expected_role} asset
Error message
Token {} is not permitted as the pool {expected_role} asset What it means
Token role validation found a token occupying a pool asset slot (base or quote, per expected_role) that it is not permitted to fill per the deployment allowlist/role configuration; the plan's pool composition violates the manifest, so the swap plan is rejected.
Source
Thrown at crates/adapters/blockchain/src/execution/client.rs:4168
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)
}
async fn validate_profiler_event_verified(
position: &BlockPosition,
expected_block_hash: B256,
pool_address: Address,
pool: &Pool,
verification: &VerificationCoordinator,
) -> anyhow::Result<()> {
let transaction_hash = B256::from_str(&position.transaction_hash).with_context(|| {
format!(
"Invalid profiler transaction hash {}",View on GitHub (pinned to 18893faf8b)
Solutions
- Correct the pool's base/quote configuration to match the manifest
- Update the manifest if the pool roles legitimately changed
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/adapters/blockchain/src/execution/client.rs:4168 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/8fa42ca4cd2bd1ab.
Report an issue: GitHub.