Crypto exploits

GiddyVaultV3 exploit analysis

GiddyVaultV3's `compound()` signs only the hash of each swap's calldata, never its `fromToken`, `toToken`, `amount`, or `aggregator`, so the reproduction set itself as the swap destination and had the strategy force-approve it for unlimited spending before sweeping out the BTC-pegged gauge tokens. DeFiHackLabs and DeFiLlama both report a $1.3 million loss across the tBTC, cbBTC, and WBTC vaults on 2026-04-23.

David

Security ·

Reported loss
$1.3M
Occurred
Logged
Chain
Ethereum

Logged as “2026-04-23: Incomplete Signature Coverage on GiddyVaultV3”.

Analysis3 min read

GiddyVaultV3 is one of several auto-compounding vaults the Giddy protocol runs on top of Yield Basis's BTC-pegged gauge tokens, with separate vaults wrapping the tBTC, cbBTC, and WBTC gauges. A compound() call is meant to let an authorized, signature-checked caller swap whatever reward tokens a strategy has accrued into more of the vault's base assets and redeposit them. DeFiHackLabs titles its reproduction "incomplete signature coverage," and the deployed vault source verified on Etherscan shows exactly where that coverage stops.

GiddyVaultV3.compound() first calls the internal _validateAuthorization, which builds an EIP-712 digest out of auth.nonce, auth.deadline, a top-level auth.amount, and a single keccak256 of the concatenated keccak256(data) hashes of every SwapInfo entry in auth.vaultSwaps and auth.compoundSwaps. That digest is recovered against isAuthorizedSigner, and the nonce is marked spent. Nothing else about each SwapInfo struct enters the signed message. Its fromToken, toToken, amount, and aggregator fields are left out entirely, so whoever submits the transaction can set those four fields to anything as long as the data bytes hash to what the signer actually signed.

_compound passes the signed compoundSwaps straight to the strategy's swapRewardTokens, which hands each entry to `GiddyLibraryV3.executeSwap`. For any SwapInfo where fromToken differs from toToken, that function calls SafeERC20.forceApprove(fromToken, aggregator, amount) before calling aggregator.call(data), then checks only that the strategy's fromToken balance fell by some amount no greater than swap.amount and that its toToken balance rose above zero. Both checks pass on the smallest possible changes.

The reproduction's attack contract exploits both halves of that gap in one call. For each vault it submits a compound() authorization whose SwapInfo sets fromToken to the strategy's real holding, the BTC-pegged gauge token, and sets toToken and aggregator to a helper contract it deployed itself, with amount set to type(uint256).max. Because those fields carry no signature weight, a validly signed data hash still clears _validateAuthorization. From there:

  1. executeSwap force-approves the helper for the maximum uint256 allowance over the strategy's gauge token holding.
  2. It calls the helper, which doubles as a fake toToken: it pulls one unit of the gauge token from the strategy through the allowance just granted, then increments its own internal balanceOf mapping for the strategy by one, satisfying both of executeSwap's balance checks with negligible, self-manufactured amounts.
  3. compound() returns normally, leaving the strategy holding a live, unlimited approval in the helper's favor.
  4. Once compound() returns, the helper reads the strategy's real gauge-token balance and allowance and calls transferFrom to sweep it to the attacker.

The same four steps ran against all three vaults inside one transaction on Ethereum. That transaction's own "to" field is empty: it is itself a contract-creation call, and it created a second contract along the way, matching the PoC's separate "Attack Deployer" and "Attack Contract" addresses. Etherscan's token-transfer log for the transaction shows the attacker's wallet, 0x81Fe3D7d35dFeFa15b9E6800B6aeFC3358E7b156, receiving 3.531384449443560254 units of the tBTC gauge token, 6.935949844931976725 units of the cbBTC gauge token, and 6.274444990265641146 units of the WBTC gauge token, each pulled from its respective strategy contract in turn.

DeFiHackLabs reports the loss at $1.3 million. DeFiLlama's hacks dataset carries the same incident under the protocol name Giddy, dated 2026-04-23, with the loss recorded as $1,300,000 and the classification "Input Validation." It lists no return of funds. Neither that dataset nor the alert that first flagged the exploit traces where the gauge tokens went after the attacker's wallet received them. No protocol statement, pause, patch, or compensation plan for GiddyVaultV3 has been published, and Giddy's own social accounts carry nothing referencing the incident.

The fix belongs entirely inside _validateAuthorization. The EIP-712 struct hash needs to cover fromToken, toToken, amount, and aggregator for every SwapInfo, not only its data bytes. With the full struct bound into the signature, an authorized signer's approval for one swap route could never be redirected to a different token, a different amount, or an attacker's own contract standing in as both the destination and the counterparty token.

Sources read (8)

Other exploits

Query every incident yourself — free, no signup

Updated 9 Nov 2026. Figures are as reported by the sources listed above and are not independently verified.