.@aquifer on #Solana was reportedly exploited for ~$2.5M across 90+ attack transactions, draining its vaults. As the source code is unavailable, this post is based on our preliminary on-chain analysis. The likely root cause was a caller-controlled input-side token program that was not pinned to the canonical SPL Token Program. Aquifer trusted the CPI result without verifying the actual tokenIn balance delta, allowing the attacker to receive real output tokens without providing the required input.
Here, we use one of the attack transactions as an example. Both the USDC and HYPE mints were supplied as swap parameters, making it appear that the attacker was buying HYPE with USDC. However, the balance changes and execution trace show that only the HYPE vault transferred tokens to the attacker, with no corresponding USDC inflow.
Aquifer allowed the caller to supply tokenProgramA during the swap, enabling the attacker to replace it with the malicious DMBpPM... program. Aquifer then invoked this program via CPI, passing the tokenIn-related accounts, the user address, and amountIn. DMBpPM... accepted the SPL Token Transfer-formatted instruction and returned success without executing an actual token transfer.
Attack TX:
Link: https://t.co/ItnJUp7QxH
