Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 13 days 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 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-26T18:17:59.000Z (18 days ago)
- Last Synced: 2024-10-26T20:16:46.486Z (18 days ago)
- Topics: create, create2, governance-attack, metamorphic-contracts, selfdestruct, tornado-cash
- Language: Solidity
- Homepage: https://github.com/tornadocash
- Size: 94.7 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
[![Test smart contracts](https://github.com/pcaversaccio/tornado-cash-exploit/actions/workflows/test.yml/badge.svg)](https://github.com/pcaversaccio/tornado-cash-exploit/actions/workflows/test.yml)
[![License: WTFPL](https://img.shields.io/badge/License-WTFPL-blue.svg)](http://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).