Add Base network support (chainId 8453) - #14
Merged
Conversation
Adds Base as a first-class SupportedChain across the server: core types, RPC/provider URLs and setup prompts, DefiLlama pricing, Basescan, and contract registrations for the protocols that have canonical Base deployments. Protocols enabled on Base: - Aave V3 (pinned Pool address for the pre-sign allowlist) - Uniswap V3 (Factory + NonfungiblePositionManager) - Compound V3 (cUSDCv3, cUSDbCv3, cWETHv3) Protocols deliberately NOT enabled on Base in this PR: - Lido and EigenLayer — L1-only; readers already short-circuit when the relevant key is missing from CONTRACTS[chain]. - Morpho Blue — deployed on Base but the discovery scan in modules/morpho/discover.ts needs a verified deployment block to start the getLogs walk from. Adding it with a wrong block would either silently miss positions (too high) or burn RPC budget (too low). Tripwire test in base-chain-support.test.ts asserts this absence so the deferral isn't undone by accident. Tests: - chains.test.ts gets Base RPC resolution cases (env override, Infura/Alchemy provider URL). - base-chain-support.test.ts locks down the chain-registration invariants: CHAIN_IDS[base]==8453, ETH as native symbol, viem Chain wired, Aave Pool hard-pinned, Uniswap + Compound present, USDC + WETH addresses pinned, Lido/EigenLayer/Morpho absent. - session-regression.test.ts's EIP-55 checksum invariant automatically covered the new addresses and caught two bad checksums during implementation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Apr 28, 2026
Closed
This was referenced Apr 28, 2026
szhygulin
added a commit
that referenced
this pull request
Apr 28, 2026
Beyond adversarial cases (prompt injection, rogue subagent, malicious skill, deliberately rogue agent), a safety-tuned non-injected agent can still produce harmful behavior through hallucinated addresses / chain IDs, stale knowledge of deprecated contracts, post-training- cutoff protocols, long-context attention drift, sycophancy under user pressure, cross-tool reasoning gaps, numeric mistakes, and tool-name confusion. Threat-model-wise these are functionally equivalent to a narrow agent compromise: the agent emits bytes / advice / args that don't match user intent, with no adversarial intent required. Two edits: 1. "Why trust VaultPilot?" preamble — explicit second paragraph naming the honest-model-error category alongside the adversarial cases, with the user-facing implication that benign-looking responses should not be trusted more than adversarial ones. 2. "Threat → what catches it" — new bullet listing each model-error sub-class and which specific defenses (PREPARE RECEIPT, Inv #1.a, Inv #2.5, Inv #14, Inv #15, agent-side ABI decode, Ledger device display, skill-side unconditional refusals) catch it. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SupportedChainacross the server: core types (CHAIN_IDS.base = 8453,CHAIN_ID_TO_NAME[8453] = "base",SUPPORTED_CHAINS), viem chain registration, Infura/Alchemy/custom RPC URL templates,BASE_RPC_URLenv var, DefiLlama (base) and Basescan (api.basescan.org) endpoints, andNATIVE_SYMBOL.base = "ETH".Deliberately NOT enabled on Base in this PR
CONTRACTS[chain].lido/eigenlayeris absent, matching how Polygon is handled.src/modules/morpho/discover.tsneeds a verified deployment block to starteth_getLogsfrom. Guessing risks silently missing positions (block too high) or wasting RPC budget (too low). A tripwire test asserts the absence so the deferral doesn't get silently undone.Tests
test/chains.test.ts— new cases for Base RPC resolution (env override + Infura/Alchemy provider URLs).test/base-chain-support.test.ts(new) — locks down chain-registration invariants: chainId, native symbol, viem Chain wiring, Aave Pool pinned to the canonical Base deployment, Uniswap + Compound present, USDC + WETH addresses pinned, Lido/EigenLayer/Morpho absent.test/session-regression.test.ts— the existing EIP-55 checksum invariant automatically extended to the new addresses and caught two bad checksums during implementation (now fixed).Test plan
npm run build— cleannpm test— 235 tests pass (up from 209)get_token_balance/get_lending_positions/get_portfolio_summarywithchain: "base"against a known wallet; verify Aave V3 and Compound V3 Base positions show up.recon-crypto-mcp-setupand confirm the new "Base RPC URL" prompt appears in the custom-provider flow.🤖 Generated with Claude Code