# EVM Receipt Gas Variance Calculator

> EVM Receipt Gas Variance Calculator is a paid API for AI agents from api.delx.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Computes the delta, direction, and fractional variance between actual gas used and estimated gas for an EVM transaction receipt.

## Facts

- Endpoint: POST https://api.delx.ai/api/v1/x402/evm-receipt-gas-variance
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-receipt-gas-variance-calculator-3e60ed43
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UIEQpoBOBAiPQO-7gS5R2

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability evm-receipt-gas-variance-calculator-3e60ed43 -d '<json body>'
```

Example prompt: My transaction used 22,000 gas but I estimated 21,000 — can you calculate the gas variance, tell me if it was under-estimated, and give me the fractional difference?

## When to prefer this

Choose this endpoint when you need a fast, stateless, in-memory computation of EVM gas variance after receiving a transaction receipt — particularly for preflight checks, gas model audits, or estimator benchmarking. Prefer it over manual calculation when you want a guaranteed schema-versioned, evidence-stamped result with no data retention, suitable for agent pipelines that must log provenance.

## Known failure modes

- Missing required field (gas_used or estimated_gas) returns a validation error
- Non-integer values for gas fields cause schema rejection
- Zero estimated_gas causes division-by-zero or undefined variance_fraction
- Negative gas values may produce unexpected sign behavior
- Payment not included or insufficient USDC causes x402 payment-required error

## How this service works

EVM Receipt Gas Variance: EVM Receipt Gas Variance compares gas used with a preflight estimate and reports variance from bounded caller-supplied values without an external provider. Call EVM Receipt Gas Variance before signing, submitting, replacing, or accepting an EVM/Base transaction assembled from caller-owned data. Returns normalized transaction evidence, calculated budget or shape findings, and a fail-closed preflight status for EVM Receipt Gas Variance as versioned deterministic JSON. Pr…

## Output

Returns a JSON object containing: delta_gas (integer difference between actual and estimated gas), under_estimate (boolean indicating whether the estimate was too low), and variance_fraction (float representing the proportional deviation). Also includes schema version, operation name, status, and an evidence block confirming no data retention and zero external calls.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "gas_used": {
   "type": "integer",
   "description": "Gas Used supplied to EVM Receipt Gas Variance; used only for this bounded calculation and processed in memory without retention."
  },
  "estimated_gas": {
   "type": "integer",
   "description": "Estimated Gas supplied to EVM Receipt Gas Variance; used only for this bounded calculation and processed in memory without retention."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "delta_gas": 1000,
   "under_estimate": true,
   "variance_fraction": 0.04761904761904762
  },
  "schema": "delx/util-evm-receipt-gas-variance/v1",
  "status": "pass",
  "evidence": {
   "retained": false,
   "input_sha256": "a8bc5f5e6432a5c0ce8704795f333314b6d4458c5d628cf11f5e511b08a257c6",
   "external_calls": 0
  },
  "operation": "evm_preflight:evm_receipt_gas_variance"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-receipt-gas-variance-calculator-3e60ed43/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.delx.ai](https://www.zero.xyz/host/api.delx.ai/llms.txt)
