Key Information

The challenge is finished.

Challenge Overview

Mythril has an exploration feature for searching and analyzing smart contracts on the Ethereum blockchain:

To enable this feature, Mythril builds its own smart contract database. The contract data is received from an Ethereum node over IPC or RPC (--sync-db command). This is however slow and inefficient. A much better way would be to directly access the LevelDB database of a locally installed go-ethereum node.

In this challenge, your task is to add a local geth leveldb interface to Mythril. This should be accomplished by writing a Python class capable of doing the following:
  • Obtain the runtime bytecode and balance of a contract account by address;
  • Access the storage of any account by address;
  • Iterate through all existing contract accounts;
  • Iterate through a subset of contract accounts, such as those with non-zero balance.
Use of the leveldb interface should be optional. By passing the --leveldb flag to Mythril, users should be able to execute the following existing functions without the need to first sync over RPC:
$ myth -d/-x/-g -a [address] # disassemble / analyze / create CFG of contract at address
$ myth —search # search all smart contracts for opcode and function patterns
$ myth --storage 0,1 # read account storage contents


States in the leveldb are represented as a Merkle patricia tree (the “trie"). The goethereum implementation can be found here:

Article about the Trie:

Related issue on the Mytrhil Github repo:

A few stack overflow posts (unfortunately not very helpful):

Final Submission Guidelines

Submit Git patch for Mythril (against the latest commit in master branch, which is a603772956bca7059635627f87966fa8879e900b at the moment of writing), along with verification instructions and a brief demo video.


2018 Topcoder(R) Open


Final Review:

Community Review Board


User Sign-Off


ID: 30063861