Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions docs/ai-agents/trading.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'Trading on Base'
description: 'Base-specific patterns, fee calibration, and onchain signals for trading agents.'
---

Base offers two structural advantages for trading agents: **Flashblocks** (200ms preconfirmed block state, 10× faster than the 2-second block) and an exposed L1/L2 fee structure that enables explicit cost-vs-speed tradeoffs. This page covers only what is unique to Base — general EVM execution patterns are in the [Ethereum documentation](https://ethereum.org/developers/docs), and Base's RPC methods are in the [JSON-RPC API Reference](/base-chain/reference/json-rpc-api) and [Flashblocks API Reference](/base-chain/flashblocks/api-reference).
Base offers two structural advantages for trading agents: **Flashblocks** (200ms preconfirmed block state, 10× faster than the 2-second block) and an exposed L1/L2 fee structure that enables explicit cost-vs-speed tradeoffs. This page covers only what is unique to Base — general EVM execution patterns are in the [Ethereum documentation](https://ethereum.org/developers/docs), and Base's RPC methods are in the [JSON-RPC API Reference](/base-chain/reference/json-rpc-api).

---

Expand All @@ -15,11 +15,11 @@ Always connect to `mainnet-preconf.base.org` (or `sepolia-preconf.base.org` for

### Simulate against preconfirmed state before signing

Call [`eth_simulateV1`](/base-chain/flashblocks/api-reference#eth_simulatev1) against the preconf endpoint with `"blockStateCalls"` targeting the `pending` block before signing any transaction. This catches reverts against current Flashblocks state rather than the last sealed block — which may be up to 2 seconds stale by the time your transaction lands.
Call [`eth_simulateV1`](/base-chain/reference/rpc-methods/eth_simulateV1) against the preconf endpoint with `"blockStateCalls"` targeting the `pending` block before signing any transaction. This catches reverts against current Flashblocks state rather than the last sealed block — which may be up to 2 seconds stale by the time your transaction lands.

### Poll `base_transactionStatus` instead of blocking on a receipt

After submission, [`base_transactionStatus`](/base-chain/flashblocks/api-reference#base_transactionstatus) returns preconfirmed inclusion status within a single Flashblock interval (~200ms). Blocking on `eth_getTransactionReceipt` waits for a full sealed block (up to 2 seconds). For latency-sensitive strategies, poll `base_transactionStatus` first and only fall back to the receipt for finality confirmation.
After submission, [`base_transactionStatus`](/base-chain/reference/rpc-methods/base_transactionStatus) returns preconfirmed inclusion status within a single Flashblock interval (~200ms). Blocking on `eth_getTransactionReceipt` waits for a full sealed block (up to 2 seconds). For latency-sensitive strategies, poll `base_transactionStatus` first and only fall back to the receipt for finality confirmation.

---

Expand Down Expand Up @@ -79,8 +79,9 @@ Base exposes data that most chains don't provide at this resolution. The table m

## Related

- [Flashblocks API Reference](/base-chain/flashblocks/api-reference) — `eth_simulateV1`, `base_transactionStatus`, subscription types
- [Flashblocks Integration Guide](/base-chain/flashblocks/apps) — endpoints, library setup (Wagmi, Viem, Ethers)
- [eth_simulateV1](/base-chain/reference/rpc-methods/eth_simulateV1) — simulate against preconfirmed state
- [base_transactionStatus](/base-chain/reference/rpc-methods/base_transactionStatus) — check mempool status before receipt
- [Block Building](/base-chain/network-information/block-building) — Flashblocks timing, per-transaction gas maximum
- [Network Fees](/base-chain/network-information/network-fees) — EIP-1559 parameters, GasPriceOracle methods
- [JSON-RPC API Reference](/base-chain/reference/json-rpc-api) — complete RPC method reference
Expand Down
Loading