Takers
Routing Against pAMM Liquidity
Audience: searchers, solvers, and aggregators routing flow or arbitrage paths through pAMM liquidity in ETHGas blocks.
Multi-candidate bundle submission
Send us N candidate bundles for the same trade, each routing differently. At build time we evaluate every candidate against live state, including the freshest streamed quote from every pAMM, and include whichever gives the best outcome.
Construct your normal path through CFMM liquidity.
Construct additional variants where one or more hops route through pAMMs.
Submit all variants. We evaluate each against current state at build time and re-evaluate on every pAMM quote update until inclusion.
Use the same bundle submission path you already use.
pAMM state stream
Takers can consume a JSON stream of pAMM state overrides for makers that opt in to publishing their state. The stream is intended for searchers, solvers, and dex aggregators that want fresher routing inputs for pAMM liquidity before submitting candidate bundles.
The stream is maker opt-in. Makers choose whether to publish state, and configure the update thresholds and delay applied before state is emitted.
Some maker streams may require permissioned access. For example, a maker may only allow whitelisted takers such as dex aggregators to consume their stream. Please reach out if there are pAMM quotes you want access to that are not currently available.
pAMM stream addresses
Metric
0xe844701934d9c6085b292e428f41b911cc0b3872 0x30a88bf894d1b806125a23ebf23d715496fd7102
0x99ab7c1c5eab47801f7937075998527a550fba8a
Tempest
0x00000003f1ec2379e79f58e12ec6c4f51ee92149
0x00000003f1ec2379e79f58e12ec6c4f51ee92149
TaurusFi
0x20861433d9119b866eeb398cb1ad46652a3cf953
Endpoints
pAMM data is served from the regional data hosts.
us-east-1
wss://us.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://us.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://us.propamm.data.ethgas.com/data
eu-central-1
wss://eu.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://eu.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://eu.propamm.data.ethgas.com/data
ap-northeast-1 (Tokyo, 1a)
wss://ap.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://ap.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://ap.propamm.data.ethgas.com/data
ap-northeast-1 (Tokyo, 1d)
wss://ap-2.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://ap-2.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://ap-2.propamm.data.ethgas.com/data
Hoodi staging (stable version):
ap-east-1c
wss://hoodi.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://hoodi.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://hoodi.propamm.data.ethgas.com/data
ap-east-1c
wss://hoodi-2.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://hoodi-2.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://hoodi-2.propamm.data.ethgas.com/data
Hoodi dev (active development version)
ap-east-1c
wss://hoodi-test.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://hoodi-test.propamm.data.ethgas.com/ws/pamm_price_levels_v2
https://hoodi-test.propamm.data.ethgas.com/data
ap-east-1c
wss://hoodi-test2.propamm.data.ethgas.com/ws/pamm_quote_stream_v2
wss://hoodi-test2.propamm.data.ethgas.com/ws/pamm_price_levels_2v
https://hoodi-test2.propamm.data.ethgas.com/data
Format
Each WebSocket message is JSON.
maker
string
Maker publishing the venue.
quoteAddress
string
Address the maker publishes under (see pAMM stream addresses).
pricedAddresses
string[]
quoteAddress plus any pool addresses that price from this quote.
assetPairs
object[]
Pairs the quote covers, each as token_1 and token_2 ERC20 addresses.
pairSequences
number[]
Quote sequence for each entry in assetPairs.
slot
number
Beacon slot of the block being built. The block timestamp is 1606824023 + 12 * slot
blockNumber
number
Execution block number the state targets.
timestamp
number
ETHGas snapshot time in nanoseconds. This is not the block timestamp; use slot for block time
stateOverride
object
State override set for the venue.
stateOverride uses the same structure as the Ethereum eth_call State Override Set. Its keys are account addresses, and each account override may include balance, nonce, code, state, and stateDiff. stateDiff maps storage slot keys to overridden storage values.
The stateOverride object can be passed directly as the third parameter to eth_call, or as stateOverrides in an eth_simulateV1 block state call. To simulate against several pAMMs at once, merge their stateOverride objects into a single object keyed by account address.
Latest state over JSON-RPC
Takers that do not want to maintain a WebSocket connection can request the latest pAMM state over JSON-RPC on the regional data endpoint (see Endpoints).
Request:
The result is a snapshot of every pAMM venue you have access to. The result has the same shape as a WebSocket message.:
Example (Python)
pAMM price levels
Takers can also consume a live pAMM price level stream. Unlike the state stream, this stream is already quoted by ETHGas, with one book per maker and market.
Each message is a complete snapshot. Keep the newest message and treat older ones as superseded.
Use the /ws/pamm_price_levels_v2 path on the regional data hosts (see Endpoints).
Latest price levels over WebSocket
Each WebSocket message is JSON. The books array contains one book per maker and market.
Latest price levels over JSON-RPC
The result has the same shape as a WebSocket message.
pAMM quote helpers
ETHGas exposes two JSON-RPC quote helpers on the regional data endpoints, backed by the latest price level snapshot.
ethgas_getPammQuoteVenue quotes one pAMM. It mirrors the LambdaClass router quoteVenueV1 / quoteV1 flow.
ethgas_getPammQuote scans all pAMMs in the latest snapshot and returns the best quote plus the pAMM that produced it.
Both methods return the same response shape:
On-chain routing
On-chain routing is another integration path for pAMM liquidity. It is not a separate ETHGas endpoint, but a router- or solver-side pattern that can be used alongside the bundle flow above.
The idea is to move route selection into the execution transaction. Instead of submitting a single pre-selected path, the transaction carries multiple candidates per hop. For a route from asset A to asset B to asset C, the A → B hop could have several candidate venues, and the B → C hop could have several candidate venues. Some candidates may route through standard AMM liquidity, others through pAMMs.
Because execution happens on-chain, the router evaluates the candidate set against the exact execution state and selects the best valid combination. This suits pAMM routing well because quote state can change between path construction and inclusion: if a maker update lands earlier in the same block, the router sees the updated state when the taker transaction executes.
Last updated