Genomic data repositories are rapidly growing due to the decline in the cost of DNA sequencing. This has increased the demand from stakeholders such as researchers to analyze these datasets to advance areas in biomedical research. Genomic datasets are mostly maintained by third-party direct-to-consumer (DTC) genomic companies who operate a business model of collecting DNA data from their customers and selling them to pharmaceutical companies. This puts the privacy of their customers at risk since each individual’s human genome is unique. In addition, customers lose ownership of and access to their genomic data to DTCs and DTCs do not share profits from data sales with them. In this paper, we propose a system based on blockchain technology and homomorphic computation to address the aforementioned problems. We use blockchain transactions and smart contracts to allow genomic data owners (DOs) to have control of their data and sell access to it, and homomorphic computation with secure two-party protocol to enable genomic data users (DUs) to run queries to securely discover DOs of interest. We further optimize the query response time by proposing an approach based on genomic data partitions, binary search trees and bloom filters to reduce the search space. We also propose a blockchain penalty mechanism to encourage parties to behave honestly to avoid malicious behaviors such as uploading fake or non-human genomic data. We conduct our experiments on real genomic datasets and demonstrate that our proposed scheme allows DOs to control access to their data and is feasible and efficient in terms of computation cost, query response time and scalability.