Reproduced Exploit
Entangle Trillion — dynamic delegatecall lets a compromised master drain Compounder
Compounder.compound accepts a callee and payload from its authorized master then runs the pair with delegatecall. If that master EOA is compromised, it can run arbitrary code with Compounder authority and move every held underlying token.
Chain
Other
Category
dependency
Date
Feb 2024
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 51376-vulnerability-in-compounder-contract-allowing-compromised-eo. Standalone Foundry PoC and full write-up: 51376-vulnerability-in-compounder-contract-allowing-compromised-eo_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/dependency/unsafe-external-call · vuln/access-control/missing-auth
Reproduction: Fully local, cheatcode-free synthetic. Run
forge test -vvvin this folder.
Key info#
| Field | Value |
|---|---|
| Protocol | Entangle Trillion |
| Finding | AuditVault 51376 |
| Impact | High |
| Reproduction | Local synthetic; no mainnet fork |
| Vulnerable contract | Compounder |
| Compiler | Solidity 0.8.24 |
TL;DR#
Compounder.compound accepts a callee and payload from its authorized master then runs the pair with delegatecall. If that master EOA is compromised, it can run arbitrary code with Compounder authority and move every held underlying token.
Vulnerable code#
The minimized contract preserves the reported operation with an @> VULN marker in the synthetic.
Root cause#
The authorization check validates only the caller. It does not constrain dynamic delegatecall targets or payloads to a trusted allowlist, so the authorized caller can select arbitrary executable code in the Compounder context.
Preconditions#
The master SynthChef authorization is compromised or malicious, and Compounder holds an underlying asset balance.
Attack walkthrough#
The synthetic seeds Compounder with 100 tokens. Its compromised master submits a call configuration pointing to a malicious payload. Delegatecall makes that payload transfer the Compounder balance to the master, and the proof verifies a zero Compounder balance.
Diagrams#
Impact#
Compromise of the master authorization becomes a direct loss of all underlying assets held by Compounder. The test uses a 100-token reserve and proves the transfer is executed in the Compounder context.
Remediation#
Do not delegatecall dynamic callee and payload inputs. Restrict allowed code to immutable or governance-controlled trusted implementations, validate each selector, and minimize master authority.
How to reproduce#
cd /workspaces/RustroverProjects/audits/evm-hack-registry/51376-vulnerability-in-compounder-contract-allowing-compromised-eo_exp
forge test -vvv
Sources#
- AuditVault finding
- Halborn assessment
- Reduced local source: test/51376-vulnerability-in-compounder-contract-allowing-compromised-eo.sol
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 51376-vulnerability-in-compounder-contract-allowing-compromised-eo_exp (evm-hack-registry mirror).
- AuditVault finding: 51376-vulnerability-in-compounder-contract-allowing-compromised-eo.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.