Layel
Chuẩn bị giao dịch cho các tác nhân AI: số dư, hạn mức chi tiêu, nonce, gas, mô phỏng và biên nhận đã ký trong một lần gọi. Gas miễn phí. Mỗi lượt sử dụng có giá $0.01 bằng USDC qua x402.
Máy chủ MCP được lưu trữ
npx add-mcp 'https://api.layel.xyz/mcp'Cài vào Claude Code, Codex, Cursor và nhiều công cụ khác
Tài liệu
Check before your agent sends.
Transaction preparation for AI agents. Balance, allowance, nonce, gas, simulation and a signed receipt in one call, read at one block. Pay per call in USDC. No API key, no sign-up.
Read the guide Open the OpenAPI spec
Layel Gas · free
Know the fee before you set it.
The suggested max fee is two times the next base fee, plus the median priority fee of the last five blocks. Pick a chain to see it worked out.
Baseflat
Next base fee × 2 — gwei
Priority fee median of 5 blocks — gwei
maxFeePerGas — gwei
Base fee, last 20 blocks
GET https://api.layel.xyz/v1/gas?chain=base
Copy curlView response
{
"schema": "layel-gas/1",
"chain": "base",
"chainId": 8453,
"block": {
"number": 59486856,
"hash": "0xd206\u202653be",
"timestamp": 1795087746,
"ageSeconds": 0
},
"gasPrice": "6000000",
"baseFeePerGas": "5000000",
"maxPriorityFeePerGas": "1000000",
"maxFeePerGas": "11000000",
"maxFeeRule": "2 x next base fee + median priority fee of the last 5 blocks",
"gwei": {
"gasPrice": "0.006",
"baseFeePerGas": "0.005",
"maxPriorityFeePerGas": "0.001",
"maxFeePerGas": "0.011"
},
"recent": {
"blocks": 20,
"baseFeePerGas": {
"min": "5000000",
"median": "5000000",
"max": "5001268"
},
"currentBaseFeePercentile": 45,
"baseFeeRangePercent": 0.0254,
"nextBaseFeePerGas": "5000000",
"baseFeeTrend": "flat",
"maxPriorityFeePerGas": {
"p25": "1000000",
"p50": "1500000",
"p75": "9998732"
},
"avgGasUsedRatio": 0.11
}
}
Example values. Copy the curl to read the live ones.
Look at the gas, then check the transaction.
An agent starts with Gas, which is free. When it is about to send, one Scope call replaces the separate RPC reads and the simulation, with balances and the simulation read at one block. Every Scope result carries a receipt that Proof can verify.
Layel Gas
Free · Fair Use, 30 requests per minute per IP
Current EIP-1559 fees and a recent fee window, to decide whether to send now or wait.
Layel Scope
$0.01 per call · USDC on Base
Everything your agent needs before it sends, in one call: native balance, an optional token balance and allowance, nonce, gas and a simulation of the transaction. Balances, allowance and the simulation are read at one pinned block.
Layel Proof
Free
The signer address and a way to verify the EIP-712 receipt on every Scope result.
You are charged for Scope only when its consistency check passes. Otherwise the call returns HTTP 503 and costs nothing.
One call, start to finish.
The first request returns 402 with the price. The client pays in USDC on Base, sends the request again, and gets the result with a signed receipt.
POST /v1/scope
- → POST https://api.layel.xyz/v1/scopesent
- ← 402 Payment Required · $0.01 in USDC on Baseprice
- →Same request, with the x402 payment attachedpaid
- ← 200 checksumPassed: true · block 59,490,324result
- ←Receipt: EIP-712, signed by 0x2c75…5c23signed
Example values. If the consistency check fails, the call returns 503 and is not charged.
One request. One block.
Instead of several RPC reads and your own simulation, Scope reads balances, allowance and the latest nonce at the same block, simulates the transaction there, and checks that the block hash did not change while it read. The pending nonce and the priority fee come from the node's head, and the result says so.
Every result shows its work.
Scope returns the facts, the checks that make them trustworthy, and a signed receipt. If the checks fail you are not charged, and the call returns 503.
- Facts only. No risk score and no go or no-go verdict. The agent decides.
- Pay as you go. The first call returns 402 with the price. An x402 client pays in USDC on Base and retries.
- Signed receipt. The result is hashed and signed, so it can be stored and verified later.
Example result · Base · block 59,490,324 checksumPassed: true
- Block header read
- All 3 pinned reads returned at the same block
- Values decoded
- Block hash unchanged after the reads
Simulation
success · gas estimate 45,211 · suggested limit 54,253
Fees
maxFeePerGas 0.0130 gwei, from the next base fee and the median tip
Receipt
EIP-712, signed by 0x2c75…5c23 · verify at /proof
Built for agents.
Layel runs an MCP server over streamable HTTP. Add the URL to an MCP client and the agent can list the tools and call them. Scope asks for payment through x402, and Gas needs nothing.
curl "https://api.layel.xyz/v1/gas?chain=ethereum&blocks=50"
{
"schema": "layel-gas/1",
"chain": "ethereum",
"gasPrice": "138356311",
"maxFeePerGas": "274836931",
"maxFeeRule": "2 x next base fee + median priority fee of the last 5 blocks",
"gwei": { "gasPrice": "0.138356311", "maxFeePerGas": "0.274836931" },
"recent": {
"blocks": 50,
"currentBaseFeePercentile": 8,
"baseFeeRangePercent": 11.6138,
"baseFeeTrend": "falling"
}
}
# Free. Values in wei, plus the same in gwei.
# blocks: 1 to 200, default 20.
Call the API
Plain HTTPS and JSON. Start with Gas: no key and no sign-up.
Connect via MCP
Add https://api.layel.xyz/mcp to an MCP client. The agent lists layel_gas and layel_scope.
Pay with x402
Scope returns 402 with the price. An x402 client pays in USDC on Base and retries.
What it covers, and what it does not.
Chains
One chain per request.
BaseEthereumArbitrum OnePolygonSolana, roadmap
Payment
x402, in USDC on Base, whichever chain you read.
Access
No API key and no account. Gas is free under Fair Use.
Receipts
EIP-712 signed. The signer address and verification live at /proof.
Scope of the result
Advisory only. Layel does not assess counterparties, sanctions, phishing or contract security.