Skip to content
Code corresponding to my analysis of Bancor front-running
Branch: master
Clone or download
Ivan Bogatyy
Ivan Bogatyy Merge pull request #3 from delirious-lettuce/dump_to_hex
Update `dump_to_hex` format code
Latest commit 95800a2 Jan 22, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
solidity Refactors & new Bancor contract addresses Oct 8, 2017

Front-running Bancor

This code is supplementary to the blog post Front-running Bancor in 150 lines of Python with Ethereum API, which expands on the research done in Cornell and implements a front-running attack as a mere full node (no need to be a miner).


Install and run the geth Ethereum client first:

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository -y ppa:ethereum/ethereum
$ sudo apt-get update
$ sudo apt-get install ethereum
$ geth --rpc --unlock 0xYOUR_ACCOUNT_ADDRESS
......wait for the chain to sync........

The front-runner code automatically attaches to a running geth client:

$ sudo pip install requests
$ python


For any bugs in the code, raise a GitHub issue or send me a pull request. For more general discussions, feel free to send me an email at

You can’t perform that action at this time.