This repo contains everything to produce a snapshot of pre-hack DAI equivalent in pDAI Jar.
For a technical writeup of the hack, refer to banteg/evil-jar repo.
MerkleDistributor deployed at: 0x8896C47Cf854644cDC4Dd949a11048a57bDBA9Bc
Cornichon deployed at: 0xa456b515303B2Ce344E9d2601f91270f8c2Fea5E
To deploy the distributor on the mainnet:
brownie run snapshot deploy --network mainnet
To claim the distribution:
brownie accounts import alias keystore.json
brownie run claim --network mainnet
To burn CORN for DAI:
brownie run claim burn --network mainnet
All testing is performed in a forked mainnet environment.
To run end to end claim and burn test:
brownie run distribution
To run the unit tests:
brownie test
To generate the snapshot data:
pip install -r requirements.txt
brownie networks add Ethereum archive host=$YOUR_ARCHIVE_NODE chainid=1
rm -rf snapshot
brownie run snapshot --network archive