Developer discovers MCP server faked blockchain trades for three months despite passing all tests
A developer built an MCP server to let an AI assistant trade tokens on a Solana-based platform, only to discover three months later that transactions were never actually being signed or sent, even though all 337 tests passed. The bug stemmed from tests that only checked return values like success: true, never verifying whether real network calls were made. To fix the vulnerability, the developer redesigned the write flow around a two-step confirmation system where the first tool call generates a single-use, time-limited token tied to a SHA-256 fingerprint of the exact arguments, and only a second call with matching arguments can execute the transaction. Additional safeguards include pre-signing simulation, per-transaction and per-session SOL spend caps, and explicit opt-in flags for edge cases. The incident highlights a broader lesson: a passing test suite proves code runs, not that it integrates correctly with external systems.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in