Over the last few weeks I read the signing code of a lot of open-source Solana bots and agents: trading bots, copy traders, launchpad tools, AI agents with a wallet. The same pattern shows up again and again:
const tx = VersionedTransaction . deserialize ( Buffer . from ( body . swapTransaction , "base64" ) ) ; tx . sign ( [ wallet ] ) ; // signs whatever came back await connection . sendTransaction ( tx ) ;
Enter fullscreen mode
Exit fullscreen mode
The transaction is built by someone else (Jupiter's /swap or Ultra /order , PumpPortal, a launchpad API) and the bot signs it without reading it. Most of the time that's fine. But if the response is ever wrong (a bad config, a compromised endpoint, a proxy in between, a decimals slip), the key signs it anyway: an extra transfer out of the wallet, a different output token, a swap that pays someone else.…