Carol Protocol Hack

Reported loss $61K
Flash Loan Attack

What happened

On 2023-11-30 an attacker drained about 29.92 ETH (roughly $61,164 at the time) from CAROL Protocol, a bond-and-stake token project on Base. The contract priced a user's position from the live balances of the CAROL/WETH pool, and its sell() function sent ETH to the caller in the middle of the calculation. The attacker used flash loans to push the pool price, then re-entered during sell() to shift the pool again before the contract finished its accounting.

Attacker: 0x5AA27D556f898846B9BaD32f0cDba5B1F8bC3144. Attack contract: 0xc4566ae957ad8dde4768bdd28cdc3695e4780b2c. Vulnerable contract: 0x26fe408bbd7a490feb056da8e2d1e007938e5685. Attack transaction: 0xd962d397a7f8b3aadce1622e705b9e33b430e86e0d306d6fb8ccbc5957b4185c. Earlier records listed 0xcDd37Ada79F589c15bD4f8fD2083dc88E34A2af2 as holding the funds on 2023-12-14. DeFiHackLabs estimates the loss at about $53K.

How it happened

  1. In a preparation transaction the attacker bought a small CAROL bond with about 0.03 ETH and staked it with about 0.039 ETH, opening a position in the protocol.
  2. About 18 hours later the attack contract took nested flash loans of WETH from Synapse, Balancer, Kokonut and a Uniswap V3 pool, then borrowed more through a V2 flash swap, reaching about 3,400 WETH.
  3. It swapped all of that WETH into CAROL on BaseSwap. This pushed up the pool price that userBalance() relies on, inflating the attacker's claimable balance.
  4. It called sell(). The contract swapped CAROL for ETH with swapExactTokensForETH and sent ETH to the attack contract. Its receive() hook re-entered and dumped 90% of its CAROL back into the pool, changing the pool state before sell() finished its accounting.
  5. The attacker swapped the rest of its CAROL back to WETH, repaid every flash loan, and left with about 29.92 ETH.

Protocol details

Classification Other
Protocol Type Exploit/Flash Loan Attack
Affected asset / contract CAROL
Protocol links Website @carolprotocol

Understand the attack patterns

Build your security review skills

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