Your Public RPC Leaks Every Trade — What a Hunter Sees in 10
I run a simple script against public RPC endpoints every week. Not to break things — to see what leaks.

The answer: almost everything.
Your wallet address. Your swap amounts. Your token approvals. Your pending transaction before it lands on chain. All visible to anyone who runs `eth_getBlockByNumber` with a free JSON-RPC endpoint.
I could be wrong here but most hunters waste time on already-audited contracts when the real attack surface is the RPC pipe itself.
What a Public RPC Exposes in 10 Minutes
Open a terminal. Point at any public endpoint — Ankr, Infura, Alchemy free tier, QuickNode shared node. Run:
```bash
curl -X POST -H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' \
https://rpc.ankr.com/eth
```
You get back a block object. Inside: every transaction hash, `from` address, `to` address, `value` in wei. No encryption. No rate limit. No authentication.
That `from` field is your wallet. That `to` field is the contract you're interacting with. That `value` field is the exact amount you're sending.
> Public RPC nodes don't hide transaction metadata. They return it raw. Any observer can map wallet addresses to contract interactions in real time.
Now run `eth_getTransactionReceipt` with those hashes. You see `logs` — token transfers, approvals, swap events. All indexed. All public.
In 10 minutes I can build a map of:
- Which wallets interact with which DeFi protocols
- What time of day they trade
- How much they move
- Whether they use aggregators or direct swaps
The MEV Hunter's Playbook
This isn't theoretical. MEV searchers run this exact workflow.
They watch the public mempool — the queue of pending transactions before miners include them. Your transaction sits there for 12 seconds. During those 12 seconds, a bot can:
1. Read your swap intent
2. Calculate the slippage you'll tolerate
3. Front-run you with a higher gas price
4. Profit off your price movement
The $25M MEV bot lesson from that post applies here: your own code can drain you if you don't control the data pipe.
I've seen bots that specifically target public RPC users because private RPC users are harder to track. Private nodes don't broadcast pending transactions to the same mempool.
What Private RPCs Actually Hide

Private RPC endpoints (Flashbots, BloxRoute, Eden, your own node) do one thing differently: they skip the public mempool.
Your transaction goes directly to miners or to a private relay. No one sees it until it's in a block.
But here's the catch: private RPCs still log your wallet address on their side. The relay operator sees your `from` field. They just don't broadcast it to the public mempool.
So you're trading one leak for another. The question is which leak you trust.
The One Guardrail That Actually Works
The AI agent that leaked your API key taught this lesson: if you don't control the endpoint, you don't control the data.
The fix is boring but effective:
1. Run your own RPC node. Full archive node. Cost: ~$100/month on a VPS.
2. Point your wallet at `localhost:8545`.
3. Never use public endpoints for transactions that matter.
Or use a private relay like Flashbots for MEV-sensitive trades. That's the one guardrail.

Why Most Hunters Skip This
Most bug hunters audit contracts. They look for reentrancy, integer overflow, access control.
Those are real bugs. But the RPC layer is where the data lives. If you can see the data, you don't need to exploit the contract — you just need to front-run the user.
I've seen hunters spend weeks on a Uniswap v3 audit while the real vulnerability was the user's public RPC endpoint leaking their entire trading history.
The Hard Truth
You can't fix this with a better contract. You can't fix it with a better wallet. You fix it by changing where your data goes.
Private RPC is the only answer. Not because it's perfect — because it's less public.
The bridge hack pattern you keep missing applies here too: the vulnerability isn't always in the code. Sometimes it's in the pipe.
🔎 Found this useful? Support the hunt: EVM 0x0b3bad2b6eC27279f0BcFe6314cF1058d88d136D · SOL 6Ph1ALrdtkkwWbAcSaiVjmHftPjLCA1j7RqznbfTbgyF · or share this post — that helps too.
Disclosure: some links here are affiliate links. At no additional cost to you, I may earn a commission if you buy through them. I only recommend things I've actually used.
Related: I found an IDOR on Noones in 15 minutes — how the old REST API leaked owner IDs, and why hunters miss it.
Comments
Post a Comment
Thanks for reading! Share your thoughts below