Vehicle-to-grid (V2G) networks have emerged as a new technology in modern electric power transmission networks. It allows bi-directional flow of communication and electricity between electric vehicles (EVs) and the Smart Grid (SG), in order to provide more sophisticated energy trading. However, due to the involvement of a huge amount of trading data and the presence of untrusted entities in the visiting networks, the underlying V2G infrastructure suffers from various security and privacy challenges. Although, several solutions have been proposed in the literature to address these problems, issues like lack of mutual authentication and anonymity, incapability to protect against several attack vectors, generation of huge overhead, and dependency on centralized infrastructures make security and privacy issues even more challenging. To address the above mentioned problems, in this paper, we propose a blockchain oriented hierarchical authentication mechanism for rewarding EVs. The overall process is broadly classified into the following phases: 1) System Initialization, 2) Registration, 3) Hierarchical Mutual Authentication, and 4) Consensus; wherein blockchain's distributed ledger has been employed for transaction execution in distributed V2G environments while Elliptic curve cryptography (ECC) has been used for hierarchical authentication. The designed hierarchical authentication mechanism has been employed to preserve the anonymity of EVs and support mutual authentication between EVs, charging stations (CSs) and the central aggregator (CAG). Additionally, it also supports minimal communicational and computational overheads on resource constrained EVs. Further, formal security verification of the proposed scheme on widely accepted Automated Validation of Internet Security Protocols and Applications (AVISPA) tool validates its safeness against different security attacks.