https://github.com/pcaversaccio/tornado-cash-exploit
This repository implements a simplified PoC that showcases how a contract can morph. A similar approach was used as part of the governance attack on Tornado Cash in May 2023.
https://github.com/pcaversaccio/tornado-cash-exploit
create create2 governance-attack metamorphic-contracts selfdestruct tornado-cash
Last synced: 6 months ago
JSON representation
This repository implements a simplified PoC that showcases how a contract can morph. A similar approach was used as part of the governance attack on Tornado Cash in May 2023.
- Host: GitHub
- URL: https://github.com/pcaversaccio/tornado-cash-exploit
- Owner: pcaversaccio
- License: wtfpl
- Created: 2023-05-25T21:26:07.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T10:28:47.000Z (about 1 year ago)
- Last Synced: 2024-12-19T11:32:44.492Z (about 1 year ago)
- Topics: create, create2, governance-attack, metamorphic-contracts, selfdestruct, tornado-cash
- Language: Solidity
- Homepage: https://github.com/tornadocash
- Size: 101 KB
- Stars: 48
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tornado Cash Governance Attack via Metamorphic Contracts
[](https://github.com/pcaversaccio/tornado-cash-exploit/actions/workflows/test.yml)
[](https://www.wtfpl.net/about/)
This repository implements a simplified [PoC](./test/MetamorphicContract.t.sol) that showcases how a contract can morph using a combination of [`CREATE2`](https://eips.ethereum.org/EIPS/eip-1014), `CREATE`, and `SELFDESTRUCT`. A similar approach was used as part of the [governance attack on Tornado Cash](https://x.com/samczsun/status/1660012956632104960)[^1] in May 2023.
[^1]: A detailed post-mortem can be found [here](https://forum.tornado.ws/t/full-governance-attack-description/62), and a full technical replication (using [Foundry](https://github.com/foundry-rs/foundry)) of the attack [here](https://github.com/coinspect/learn-evm-attacks/tree/master/test/Business_Logic/TornadoCash_Governance).