Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk7 min

Building a Multi-DEX Arbitrage Scanner on Arbitrum: When APIs Fail, Query the Blockchain

A direct RPC quote on Arbitrum One gives a simulated swap result, not a profit. Here is how to confirm the chain, call Uniswap v3's Quoter safely, and compare venues at one block.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When a quote API is down, rate-limited, or does not cover a pool you need, a scanner can still ask the chain for a price. On Arbitrum One (chain ID 42161), that means sending a simulated call to a DEX’s quoter contract through an RPC endpoint and decoding the result. That gives you one thing: a simulated quote for one trade at one block. It does not by itself give you a price difference between venues, and it does not show that a multi-leg trade would be profitable. Those are three separate questions, and the scanner needs a separate answer to each.

Question What answers it What it does not establish
(a) What would this swap return at this block? A simulated quote from the DEX’s quoter contract, called through RPC Whether pool state will still hold when a transaction is mined
(b) Do two venues disagree on the price of the same trade? Comparing quotes from (a) across two or more pools using identical inputs and the same block Whether the difference survives fees, gas, slippage, and competition
(c) Can the full trade execute and leave a profit? An executed transaction, or a simulation that counts every leg and every cost Not covered by the Arbitrum or Uniswap v3 documentation cited in this article

What you need before the first call

  • An Arbitrum One RPC endpoint. Arbitrum’s public endpoint is https://arb1.arbitrum.io/rpc. Arbitrum’s chain information page states that “Arbitrum public RPCs do not provide Websocket support,” and it points developers to node providers as another way to access the chain.
  • The Uniswap v3 QuoterV2 address for Arbitrum One, taken from Uniswap’s Arbitrum deployments page. At the time of writing that page lists 0x61fFE014bA17989E743c5F6cB21bF9697530B21e. Confirm it on the live page before you use it, because deployment listings change.
  • The QuoterV2 ABI, plus the contract addresses and decimal counts for the tokens in each pair you quote.
  • A list of the pool fee tiers you intend to query on each venue.

Confirm you are on Arbitrum One

Every later step assumes the endpoint serves the chain you think it does. Check that first.

As an Amazon Associate I earn from qualifying purchases.

  1. Send an eth_chainId request to your endpoint:
    curl -s -X POST https://arb1.arbitrum.io/rpc -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
  2. Expect a result of 0xa4b1. That is hexadecimal for 42161, the documented chain ID for Arbitrum One.
  3. If the result is any other value, stop. Your scanner would be quoting a different network, and every address and fee tier below would be wrong for it.

How a direct quote works

Why the Quoter is called as a simulation

Uniswap’s guide on getting a quote with the v3 SDK explains that the Quoter functions are written as state-changing calls that revert in order to return their result. The guide says not to call them on-chain. In practice, the scanner sends an eth_call against the node’s current state, and the quote comes back as revert data rather than as a normal return value.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

That detail changes how you handle errors. Depending on your client library, the revert payload may appear in the error’s data field and be reported as a failure. A decoder that only reads successful return values will treat every good quote as an error. Your code has to read the payload and decode it against the Quoter ABI.

#1 Best Overall
Sale
TANGEM Crypto Wallet Pack of 3 – Trusted Cold Storage Hardware Wallet
  • Proven security at scale: Over 9 years and millions of cards issued with no known remote hacks, while military‑grade EAL6+ security keeps your private keys locked inside the chip. Your cryptocurrencies stay strongly protected from online attackers.
  • Tap once to manage your entire crypto wallet across 90 blockchains - no USB cables or Bluetooth, no batteries, no setup. Access 14,100+ coins & tokens, DeFi, NFTs, and staking instantly from your phone
  • Smart backup: Use your second Tangem Wallet as your Backup keys with end‑to‑end encryption; no more papers, pictures. If one card is lost, the remaining can still restore full access, with an optional seed phrase available for advanced users.
  • Engineered to last up to 25 years: Waterproof (IP69K), shockproof and tested for extreme temperatures from −25°C to 50°C. A durable cold wallet with long‑term protection and independently audited security.
  • Trusted by 6 million users worldwide (4.9 App Store, 4.8 Google Play) - buy, sell, swap, stake, and spend cryptocurrency directly. The secure offline storage wallet designed for how people actually use crypto wallets

Inputs that decide whether a quote means anything

  • Token direction. The input and output tokens define the direction of the swap. Reversing them produces a quote for a different trade.
  • Fee tier. A Uniswap v3 pool is identified by its token pair and its fee tier. Uniswap v3 uses several fee tiers; the common ones are 0.05%, 0.30%, and 1.00%, passed as 500, 3000, and 10000. A tier with no deployed pool will not return a quote, so confirm which pools exist on Arbitrum before you query them.
  • Amount units. The input amount is in the token’s smallest unit. One USDC, which has 6 decimals, is 1000000. One WETH, which has 18 decimals, is 1000000000000000000.
  • Path. Uniswap’s guide on quoting documents single-pool and multi-pool quote methods. A single-hop quote takes the two tokens, the fee, and the amount. A multi-hop quote takes a packed path that alternates token addresses and 3-byte fee values in swap order, for example tokenIn, fee, tokenMid, fee, tokenOut.

For how a route with several hops is built, see Uniswap’s routing guide. The scanner needs to know which hops it is pricing before it calls the quoter, because the quote only covers the path it was given.

Check deployment addresses before calling them

Uniswap’s Arbitrum deployments page publishes the chain-specific contract mapping and cautions integrators to confirm it rather than assume that addresses match across chains. Do not copy an address from another network’s list. Before the first quote, check that the contract has code on Arbitrum One:

curl -s -X POST https://arb1.arbitrum.io/rpc -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"eth_getCode","params":["0x61fFE014bA17989E743c5F6cB21bF9697530B21e","latest"]}'

A result of 0x means no contract is deployed at that address on the chain your endpoint serves. Treat that as a configuration error, not as a market signal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
TANGEM Crypto Wallet Pack of 2 – Trusted Cold Storage Hardware Wallet
  • Proven security at scale: Over 9 years and millions of cards issued with no known remote hacks, while military‑grade EAL6+ security keeps your private keys locked inside the chip. Your cryptocurrencies stay strongly protected from online attackers.
  • Tap once to manage your entire crypto wallet across 90 blockchains - no USB cables or Bluetooth, no batteries, no setup. Access 14,100+ coins & tokens, DeFi, NFTs, and staking instantly from your phone
  • Smart backup: Use your second Tangem Wallet as your Backup keys with end‑to‑end encryption; no more papers, pictures. If one card is lost, the remaining can still restore full access, with an optional seed phrase available for advanced users.
  • Engineered to last up to 25 years: Waterproof (IP69K), shockproof and tested for extreme temperatures from −25°C to 50°C. A durable cold wallet with long‑term protection and independently audited security.
  • Trusted by 6 million users worldwide - buy, sell, swap, stake, and spend cryptocurrency directly. The secure offline storage wallet designed for how people actually use crypto wallets

From two quotes to a price difference

A price difference is a comparison between quotes, so the comparison has to be built carefully. The steps below turn raw quote outputs into a candidate gap:

  1. Fix the input. Use the same token pair, the same direction, and the same input amount for every venue you compare.
  2. Pin the block. Pass the same block number to each eth_call, so every quote reflects a single state. Quotes taken at different blocks can differ for reasons unrelated to price.
  3. Normalize the units. Convert each output to the same token decimals before comparing.
  4. Compute the gap as (outputA − outputB) ÷ outputB, expressed as a percentage.
  5. Record the block number, pool fee, venue, and time for every quote, so a suspicious gap can be reproduced later.

A gap at this stage is a candidate for investigation. It is not a finding that a trade would make money.

Why a quote is not an executable profit

The quote is a simulated swap result. It sits upstream of several things that decide whether a trade pays:

Rank #3
DCENT Hardware Wallet | Biometric Cold Storage, Bluetooth, Multi-Crypto
  • EAL5+ CERTIFIED SECURE ELEMENT + FINGERPRINT PROTECTION — Your private keys stay encrypted offline on a certified EAL5+ chip, the same security tier used in EMV bank cards. Built by DCENT, securing crypto since 2018. Fingerprint authentication adds a second layer no PIN-only wallet can match.
  • 10,000+ ASSETS NATIVE ON 100+ BLOCKCHAINS — Hold Bitcoin, Ethereum, XRP, Solana, Cardano, popular stablecoins (USDT, USDC), and NFTs in one wallet. No third-party apps, no fragmented setup — every supported asset works straight out of the box.
  • TAP-TO-SIGN MOBILE EXPERIENCE — Pair your wallet with the DCENT mobile app over Bluetooth. Manage tokens, review transactions, and access in-app swap features directly from your phone — no cables, no desktop required.
  • WEB3 & dAPP ACCESS VIA METAMASK — Connect to MetaMask and other browser extension wallets to manage NFTs, claim airdrops, and access dApps. A large screen and intuitive 4-button interface keep every transaction clearly visible before you sign.
  • SEAMLESS FIRMWARE UPDATES & 30-DAY MONEY-BACK GUARANTEE — Apply security updates without resetting your wallet or migrating funds. Backed by Amazon's 30-day money-back guarantee — your purchase is risk-free.
  • Costs outside the quote. The pool fee is built into the quoted output, but a multi-leg trade pays the fee on every leg, and gas is not part of the quoted amount. QuoterV2 returns a gas estimate for the swap itself, not for a complete arbitrage transaction.
  • Slippage and state change. Pool state moves between the quote and the moment a transaction is included. A gap that exists at one block may be gone at the next.
  • Competition. Other actors may see the same gap and trade it first, which changes the outcome for your transaction.
  • Latency. Time spent between reading state, deciding, and submitting changes which quotes are still valid when the transaction lands.

Neither Uniswap’s documentation nor Arbitrum’s documentation supplies numbers for these factors. Measuring them is the scanner’s own job, and it has to happen before any profit claim is made.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Extending the scanner beyond Uniswap v3

A multi-DEX scanner needs one adapter per venue. Each adapter should use that protocol’s own verified addresses, ABI, and quote method. Uniswap’s Quoter behavior does not transfer to other protocols; check each protocol’s official documentation before you assume a similar call pattern. A practical design is to normalize every adapter’s output into one common record: venue, pool or contract, token in, token out, amount in, amount out, fee, and block number. That makes the comparison step in the section above independent of which protocol produced each quote.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Keeping the RPC layer replaceable

Treat the endpoint as a dependency you can swap, not as a fixed part of the design. Arbitrum’s documentation does not rank providers, so test each candidate against the same criteria:

Rank #4
Ledger Nano X - Classic Crypto Wallet with Bluetooth | Compact, go anywhere, 1.1" display. Desktop & iOS/Android compatible
  • Effortlessly build your crypto portfolio via the all in one Ledger Wallet app: buy, sell, send, receive, swap, stake and more across popular blockchains. 15,000+ coins & tokens in a single dashboard. Keep a close eye on the market. Compare service providers. Track performance. Get timely alerts. Build your portfolio with confidence.
  • Effortlessly build your crypto portfolio via the all in one Ledger Wallet app: buy, sell, send, receive, swap, stake and more across popular blockchains. 15,000+ coins & tokens in a single dashboard. Keep a close eye on the market. Compare service providers. Track performance. Get timely alerts. Build your portfolio with confidence.
  • Enjoy Bluetooth connectivity, iOS access, and hours of battery use with this mobile-first, secure backup signer. Freedom you can depend on.
  • Genuine Check: confirm your signer is authentic during setup with the Ledger Wallet app.
  • Protect your signer: keep it in mint condition at all times with a bespoke Pod or Case to avoid scratches and everyday wear and tear.
  • Supported request methods, including whether it offers the subscriptions your design needs
  • Rate limits and observed reliability under your query volume
  • Chain and contract coverage for Arbitrum One
  • Quote behavior at the trade sizes you intend to scan
  • How quickly the node reflects new blocks, and whether it lets you pin calls to a specific block

The public endpoint is useful for the chain-ID check and for light testing. A scanner that relies on live updates will need a provider that supports WebSocket connections.

Troubleshooting failed quotes

Symptom Likely cause What to check
Every quote is reported as an error, even though the call succeeds on the node The client treats the revert payload as a failure Read the error’s data field and decode it against the Quoter ABI
The call returns 0x with no decodable result No contract is deployed at that address on the endpoint’s chain Run eth_getCode on the address and compare it with Uniswap’s Arbitrum deployments page
A pair reverts on one fee tier only No pool exists at that fee tier Query the other fee tiers and confirm which pools are live
The quote is for an unexpected trade Token direction or path order is reversed Check tokenIn and tokenOut, and the byte order of a multi-hop path
Quotes for identical inputs differ between runs Calls were made at different blocks Pass the same block number to every call in a comparison
WebSocket subscriptions fail on the public endpoint Arbitrum’s public RPC does not support WebSocket Switch to a node provider that offers WebSocket access
Results are wrong on the scanner’s chain The endpoint is serving another network Confirm that eth_chainId returns 0xa4b1

The Bottom Line

Querying the blockchain directly is a workable fallback for obtaining DEX quotes on Arbitrum One when an API is unavailable, provided the endpoint is confirmed as chain 42161, the Quoter address is verified on the live deployments page, and the revert payload is decoded correctly. The output is a simulated quote and, when compared across venues at one block, a candidate price difference. Calling that a profitable arbitrage requires separate measurement of fees, gas, slippage, and competition.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.