PLEASE DO NOT FORK THIS REPOSITORY.
Hello, we're excited to have your interest in ConsenSys Diligence, and we appreciate you taking the time to complete our take home challenge.
In this repository you'll find a contract name HackableToken.sol
. This is an ERC20 contract, with a totalSupply of tokens based on ETH deposits. A deposit of 1 ETH, get's 1 token. There is an issue with this token, which makes it possible for an attacker to withdraw more than they have deposited!
To complete the challenge:
- Write the
Attacker.sol
contract - Complete the second test in
test/attack.js
, so that all tests pass. - Complete the content in
Vulnerability.md
, according to the headings and comments in that file.
Once complete, send us a zip file containing this repository with your additions.
- Use
npm run test
to ensure you're using the same version of truffle as the reviewers. - You may find it helpful to use Remix for writing the contracts.
It's quite possible there's some detail missing from this description.