FAQ
Common questions about Bench from developers, protocols, and researchers.
What is Bench in one sentence?
Bench queries 13 DEX aggregators in parallel, computes consensus best price, and issues a cryptographic certificate proving your agent got the best execution.
Is Bench a DEX aggregator?
No. Bench does not execute trades or route swaps. It is an oracle that certifies best-execution by comparing quotes from 13 existing aggregators. Think of it as the auditor, not the executor.
How is Bench different from Chainlink or Pyth?
Chainlink and Pyth provide general price feeds (e.g., "ETH is $2,847"). Bench provides swap-specific quotes — "for this exact swap, across 13 aggregators, the best price is X, and here's the cryptographic proof." Different problem, different solution.
Which DEX aggregators does Bench query?
13 sources: 1inch, Paraswap, KyberSwap, OKX DEX (via Onchain OS MCP), OpenOcean, 0x/Matcha, CoW Swap, Odos, LI.FI, Socket, Jupiter (Solana), Uniswap AI, and Dexalot. More sources can be added by contributing an adapter.
What chains does Bench support?
Bench is chain-aware — adapters support different chains. X Layer (chain 196) is the primary deployment. Ethereum, BSC, Polygon, Arbitrum, and other EVM chains are supported by most aggregator adapters. Jupiter handles Solana.
How fast is a certification request?
Typically under 3 seconds. All 13 sources are queried in parallel. The bottleneck is the slowest responding aggregator. Quotes are cached for 12 seconds to avoid redundant queries.
What does "CERTIFIED" vs "WARNING" mean?
CERTIFIED means the agreement score is ≥70 and at least 3 sources responded — strong consensus that the best price is accurate. WARNING means fewer sources responded or agreement is lower — the certificate is valid but the user should be cautious. Single-source certificates always get WARNING.
Can anyone verify a Bench certificate?
Yes. Install @usebench/verifier (npm) and call verify(cert). It reconstructs the canonical hash, recovers the signer from the EIP-712 signature, and checks the on-chain anchor. Zero trust in Bench infrastructure required.
What is on-chain anchoring?
After issuing a certificate, Bench writes the cert hash to the BenchRegistry smart contract on X Layer. This creates a permanent, tamper-proof record that the certificate existed at a specific time. Anyone can query the registry to verify.
Where is the BenchRegistry contract?
0x6a400d858daA46C9f955601B672cc1a8899DcE3f on X Layer Mainnet (chain 196). It's a simple mapping from cert hash → (attestor, timestamp). You can view it on the OKX Explorer.
Do I need an API key?
Write endpoints (POST /v1/certify) require an API key for rate limiting. Read endpoints (GET /v1/stats, /v1/certs, etc.) are public — no authentication required.
Is Bench open source?
Yes. The entire codebase — attestor, contracts, verifier, explorer, and shared libraries — is open source. You can audit every line, run your own attestor, and independently verify any certificate.
What happens if an aggregator is down?
Bench adapts gracefully. If a source fails to respond within the timeout, it is excluded from consensus. The certificate reflects how many sources actually responded (e.g., 11/13). As long as ≥2 sources respond, a certificate can be issued.
Can I run my own Bench attestor?
Yes. Clone the repo, configure your .env with an attestor keypair, and run the attestor server. You'll be signing certificates with your own key. You can even deploy your own BenchRegistry.
How does the consensus algorithm work?
Quotes are first filtered for outliers (>2 standard deviations from median). Remaining quotes are weighted by source tier (Tier 1 = higher weight). The weighted median is computed as the consensus price. Each source gets an agreement score (0-100) based on distance from consensus. The overall agreement score is the weighted average.
What is a Bench Execution Certificate (BEC v2)?
The BEC v2 is the structured data format for a Bench certificate. It contains the cert hash, all quote data, consensus results, certification level, and an EIP-712 signature. It's the artifact that proves best-execution.