{"uid":"cap_UIEQpoBOBAiPQO-7gS5R2","slug":"evm-receipt-gas-variance-calculator-3e60ed43","name":"EVM Receipt Gas Variance Calculator","description":"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…","url":"https://api.delx.ai/api/v1/x402/evm-receipt-gas-variance","method":"POST","headers":{},"bodySchema":{"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."}}},"responseSchema":{"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"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_SfnfKjN5bSyXlSZJt_ob7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the delta, direction, and fractional variance between actual gas used and estimated gas for an EVM transaction receipt.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Post-transaction gas audit","prompt":"My smart contract call just settled and it used 85,000 gas, but I had estimated 80,000 — can you calculate the variance fraction and tell me whether my estimate was too low?"},{"title":"Gas estimator accuracy benchmarking","prompt":"I want to benchmark my gas estimator: actual gas used was 45,500 and my estimate was 50,000. What's the delta, was it an over-estimate, and what fraction off was I?"},{"title":"Pre-deployment gas model validation","prompt":"Before I deploy my next contract, I want to validate my gas model — my simulation predicted 120,000 gas but the test receipt shows 126,000. Can you compute the variance so I know how much headroom to add?"}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:52:41.120Z","isFirstParty":false}