摘要

The smart community (SC), as an important part of the Internet of Energy (IoE), can facilitate integration of distributed renewable energy sources and electric vehicles (EVs) in the smart grid. However, due to the potential security and privacy issues caused by 'intrusted and opaque energy markets, it becomes a great challenge to optimally schedule the charging behaviors of EVs with distinct energy consumption preferences in SC. In this paper, we propose a contract-based energy blockchain for secure EV charging in SC. First, a permissioned energy blockchain system is introduced to implement secure charging services for EVs with the execution of smart contracts. Second, a reputation-based delegated Byzantine fault tolerance consensus algorithm is proposed to efficiently achieve the consensus in the permissioned blockchain. Third, based on the contract theory, the optimal contracts are analyzed and designed to satisfy EVs' individual needs for energy sources while maximizing the operator's utility. Furthermore, a novel energy allocation mechanism is proposed to allocate the limited renewable energy for EVs. Finally, extensive numerical results are carried out to evaluate and demonstrate the effectiveness and efficiency of the proposed scheme through comparison with other conventional schemes.