Spectral Labs Hack

Reported loss $250K
Base
Bonding Curve Exploit

What happened

On December 1, 2024, an attacker exploited Spectral's Syntax V2 bonding curve contracts on Base. Spectral said the flaw affected select agent tokens on the bonding curves and was used to remove about $200K in liquidity; QuillAudits' analysis puts the drain at about 14,793 SPEC, worth roughly $250K at the time.

The root cause was an unintended infinite approval in the agent token contract (AgentToken.sol). During the tax calculation, the code granted AgentBalances.sol unlimited allowance to spend agent tokens held by the deployer contract. The attacker used that allowance to pull agent tokens out of the bonding curve, which made the remaining tokens look far more valuable against SPEC.

Spectral deactivated the Syntax app and paused the contracts after being alerted. In its post-mortem it said the bonding curve vulnerability was fixed, Zellic was engaged to audit the contract updates, and SPEC was being replenished to restore the bonding curves to their pre-exploit state. QuillAudits lists the attacker EOA as 0x000000000000E921f69f1df9E0540ccdD4847A0D and the vulnerable contract as 0xD84B6CAccFCc9FA5F48c6277C40FaC0620f1d0c2.

How it happened

  1. The attacker took a flash loan of SPEC.
  2. They swapped SPEC for an agent token with swapExactSPECForTokens, then swapped back with swapExactTokensForSPEC, which ran the token's tax logic and triggered the unintended infinite approval to AgentBalances.sol.
  3. They called deposit() on AgentBalances.sol, using the approval to move almost all of the agent token balance out of the bonding contract.
  4. With the agent token reserve nearly empty, the constant-product (XYK) curve priced the agent token far above its real value, so a small amount of it swapped back for an outsized amount of SPEC.
  5. Repeating the cycle drained about 14,793 SPEC from the curves.

Protocol details

Classification Protocol Logic / Other / Access Control
Protocol Type Exploit/Other
Protocol links Website @Spectral_Labs

Understand the attack patterns

Build your security review skills

Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.