Aquifer
Why it happened
Attack class: Logic errorThe swap trusted a caller-supplied token program, so a fake program could report a payment that never happened.
What would have stopped it
- Pin the token program to the canonical SPL Token Program
- Check the input balance after the transfer
Not scored before the exploit
BlackHart had not scored Aquifer before this exploit.
On August 31, 2026, about $2.47 million was drained from Aquifer, a Solana AMM. Per third-party analysis, the swap let the caller choose the token program that handled the input payment, so a fake program reported a payment that never happened and Aquifer paid out real tokens. Aquifer offered an on-chain 20% bounty for return of at least 80%, and nothing had been returned as reported in early September. The team's first statements pointed to compromised wallet access, and it had not published a post-mortem.
Aquifer's swap accepted a caller-supplied token program, and the attacker's program reported success for the input transfer without moving tokens. Aquifer then paid out from its vaults, about 212 times in roughly 45 minutes, to the attacker Solana wallet, and the attacker Ethereum wallet also received funds, as named in Aquifer's on-chain message per Shattered.
Attack flow
All 4 on-chain stepsThe attack in 3 steps. Step 1, Root control: Aquifer swap instruction (source). Step 2, Drain: Attacker wallet (Solana) (attacker), about $2.47M reached this step. Step 3, Exit: Attacker wallet (Ethereum) (exit).
Step 1: Root control
- SourceAquifer swap instructionaccepts a caller-supplied token programtrusted its success reply
Step 2: Drain
- AttackerAttacker wallet (Solana)receives output tokens~ $2.47M7fTe9pvrwX...4gRk7J
Step 3: Exit
- ExitAttacker wallet (Ethereum)funds swapped and bridgednone returned as reported0x2Dfe9e96...922746
Why each step worked
- Token program not pinnedcaller chose the program that handled the input transfer
- No input balance checkmissing controlpayout made without confirming payment arrived
- Real output paid for fake inputvault tokens left with nothing received
- No outflow limitsmissing controlvaults paid out in many repeated swaps
Full forensic detail
Step-by-step reconstruction, root cause, counterfactuals, remediation, and disclosure timeline.
Exploit anatomy
Root cause
Aquifer's swap accepted the token program for the input side of a trade from the caller instead of requiring the canonical SPL Token Program, per DeFiLlama and the SonarX analysis. A malicious program in that slot accepted the transfer instruction and returned success without moving any tokens. Aquifer then released real output tokens from its vaults without checking that the input balance had actually grown. The attacker needed no stolen key. The team's first statements pointed to compromised wallet access as a likely cause and said no contract bug was confirmed, and the team had not published a post-mortem when the sources used here were written, so the swap-validation account comes from third-party analysis of on-chain data. SonarX notes that the defect is inferred from on-chain data and not confirmed against unpublished source code.
Prevention analysis
Rejecting any other program in the token program slot would have stopped a fake program from reporting payment.
Confirming that the vault's input balance grew by the expected amount before paying out would have caught the missing payment.
Capping vault outflow per period would have limited the drain to a small share of the roughly 45 minute run.
Similar incidents
A Solana AMM program released real vault tokens after trusting an input the caller supplied, without checking what had been paid in.
A vault trusted a caller-controlled input where it needed a fixed, checked one.
Remediation
Timeline
Get your protocol scored across 12 dimensions, or request ongoing coverage.