Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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