Frontend leaks mainnet RPC requests to eth.merkle.io while connected to local Anvil (chain 31337) #81
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#81
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found Monday 2026-04-27 during browser walkthrough on the live YO frontend (vite dev / chain 31337 / connected to local Anvil RPC).
Summary
While browsing the TimeCurve Arena page (
/timecurve/arena) connected to local Anvil chain 31337, the browser console is flooded with CORS-blocked fetch requests tohttps://eth.merkle.io(Ethereum mainnet public RPC).The requests are blocked by CORS so they don't succeed — but the frontend is still issuing them, which means:
eth.merkle.iois not anywhere in frontend/src — it must be coming through a wagmi / viem default-chains config or a multicall preflight that doesn't honor the configured chainRepro
SKIP_ANVIL_RICH_STATE=1 bash scripts/start-local-anvil-stack.shcd frontend && npm run devhttp://127.0.0.1:5173/timecurve/arena(or/timecurve)0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)Observed
Repeats ~10+ times across page renders.
Source check
grep -rn 'eth.merkle.io\|merkle.io' frontend/src/ frontend/public/ frontend/index.html frontend/vite.config.tsreturns no matches. So the URL is injected by a transitive dep (wagmi config, viem default chains, or a connector preflight).Suggested investigation
frontend/src/lib/wagmi*.ts(or wherever wagmi config lives) for chain-list defaults that include mainnetchainsto anvil (chain 31337) only when in dev mode against localSeverity
LOW-MEDIUM. Not a current bug breaking functionality (CORS blocks the leak), but:
Out of scope
Not blocking the active sale / buy / WarBow / redeem flows on the local stack. Application-level UX is functional. Filing as housekeeping / hygiene item.
cc @PlasticDigits
mentioned in issue #51
mentioned in commit
351a41ffffUpdate (pushed to
mainin351a41f): @brouie can you verify on your side?What changed
frontend/src/wagmi-config.tsnow registers onlyconfiguredChain()(no bundledmainnet/sepolia). That stops viem from opening default HTTP transports to public Ethereum RPCs (e.g.eth.merkle.io) when the wallet is on Anvil 31337 — the CORS noise in the report.VITE_CHAIN_ID/resolveChainRpcConfigand the fallback inwagmi-confignow default to Anvil 31337 (andhttp://127.0.0.1:8545for RPC inchain.ts), matchingscripts/start-local-anvil-stack.shand E2E.frontend/.env.exampleupdated..cursor/skills/yieldomega-guardrails/SKILL.mditem 21, play skill skills/verify-yo-local-wagmi-single-chain/SKILL.md.Checklist to verify
SKIP_ANVIL_RICH_STATE=1 bash scripts/start-local-anvil-stack.shthencd frontend && npm run dev, open/timecurve/arenaonhttp://127.0.0.1:5173, connect Anvil acct #0 on 31337eth.merkle.iomerkle→ zero rows after load/navigation.env.local)Leaving the issue open until you confirm.
@PlasticDigits verified on
351a41f.Verification
Browser walkthrough on the same live local-anvil stack used to repro the original bug. After git pull + Vite restart to pick up the new wagmi-config.ts:
Result
Zero requests to eth.merkle.io. Zero CORS errors.
The console now only shows:
Sanity check
Page-level functionality unaffected:
Closing #81.
mentioned in issue #82
mentioned in issue #100
mentioned in issue #219
mentioned in issue #269