# AzukiDAO Bean: signature replay in claim() mints tokens

AzukiDAO Bean token claim() failed to validate signatures, letting an attacker replay one signature 200 times to mint ~$69k of Bean tokens.

- Payout: Real-world hack
- Severity: high
- Program: AzukiDAO
- Analysis by: DeFiHackLabs
- Disclosed: 2023-07-03
- Write-up quality: 6/10
- Original: https://github.com/SunWeb3Sec/DeFiHackLabs/blob/main/src/test/2023-07/AzukiDAO_exp.sol
- Library page: https://bugbountylibrary.com/r/dhl%3A20230703-azukidao
- Tags: area:web3 domain:web3 impact:funds-loss kind:incident platform:defihacklabs sev:high tech:evm tech:solidity vuln:access-control vuln:signature-replay

**Target:** Bean token claim() function on Ethereum
**Root cause:** The claim() function did not properly verify the signature, allowing the same signature to be reused multiple times to claim tokens repeatedly.
**Steps:**
1. Obtain a valid signature for a claim (r=0xd044..., s=0x341d..., v=27) with specific contracts, amounts, tokenIds, claimAmount=31250e18, endTime=1688142867.
2. Call `Bean.claim(contracts, amounts, tokenIds, 31250e18, 1688142867, signature)` repeatedly (200 times) with the same signature.
3. Each call mints/transfers 31,250 Bean tokens to the attacker.
**Exploitation:** Attacker replayed a single valid signature 200 times to claim 31,250 Bean tokens each time, accumulating ~$69k worth of tokens.
**Insight:** Signature-based claim functions must include a nonce or unique identifier and mark it as used to prevent replay; also verify the signer and all parameters.

