RPCFailoverManager
sec.rpcfailovermanager
Security
planned
Spec started
frozen
Probe RPC providers continuously and fail over before a stale endpoint poisons our chain view.
What it does
Probe RPC providers continuously and fail over before a stale endpoint poisons our chain view.
Pipeline placement
runs after: System startup; continuous background probe
→
RPCFailoverManager
→
runs before: Any bot that makes on-chain read calls
Applies to: All Polygon RPC endpoints in the configured provider pool
Why it matters
| If this fails | Consequence |
|---|---|
| Single RPC endpoint goes stale | All bots reading chain state see an outdated block, causing mispriced or incorrectly-scoped orders. |
| No quorum check across providers | A forked or malicious RPC can poison chain state views used for contract address and balance checks. |
| No auto-quarantine of degraded provider | A slow or error-prone endpoint keeps being polled, adding latency to every on-chain check. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| eth_blockNumber from each configured RPC provider | onchain | required | Measure block height divergence across providers to detect stale endpoints. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Configured RPC provider pool and probe_interval_s | Admin UI | required | Pool of providers to probe and failover thresholds. |
| KillSwitch active flag | KillSwitch | required | Halt all chain reads during global pause. |
Authority
What this bot is permitted to do
Reject Pause
State
Readiness
Spec started
Status
planned
Class
Guardrail
Default mode
shadow_only
Developer owner
Polytraders core
Capital impact
Direct
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| KILL_SWITCH_ACTIVE | HARD_REJECT | Global kill switch is active. | Immediately return DENY. |
| RPC_QUORUM_LOST | HARD_REJECT | Fewer than min_providers_quorum healthy RPC providers available. | Return DENY on all chain reads until quorum restored. |
| RPC_PROVIDER_LAGGING | WARN | A provider's block height lags by 2 blocks; approaching quarantine threshold. | Log warn; keep provider active; increase probe frequency. |
| RPC_QUORUM_WARN | WARN | Only min_providers_quorum providers remain healthy; one more failure triggers reject. | Emit warn; notify ops. |
| RPC_FAILOVER_INFO | INFO | Primary provider switched to a new endpoint. | Log info; no action needed. |
Related bots in Security
Used by
Reverse index — strategies that currently reference sec.rpcfailovermanager. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| NBA H2H — moneyline market-make | demo-wired | last triggered 33m ago |
| US Elections — sentiment fade | demo-wired | last triggered 40m ago |
Showing 2 of 2 · demo-wired ≠ production-live
Why this matters
Security bots does NOT propose or execute trades; only guards signing and wallet operations. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →