An Enhanced Blockchain-Based Data Management Scheme for Microgrids qTrading of distributed energy resources is an important aspect to fully achieve energy efficiency. qModern microgrids and consumer/prosumer energy transactions are such kind of enablers. q qThe blockchain has been proposed as a solution to aid microgrid applications with the support of a decentralized trading model, operations processing, computation and storage. q Microgrids trading is still vulnerable to so-called False Data Injection (FDI) attacks, q That is the attempt by malicious participating nodes to distribute false measurements to the peers to gain personal advantages. qWe propose an enhanced blockchain mechanism to counteract possible FDI attacks by means of mobile software agents to control and detect malicious activities of sellers nodes. False Data Injection qEach household has specific quantities of energy that can be produced and stored and will bid excess energy to be traded by means of microgrid energy transactions. q q Each seller responds to the blockchain by letting it know the current amount of stored energy. q qAs discussed, False Data Injection (FDI) attacks are one of the main threats faced by microgrids, making the whole transaction process less trustful, as they introduce uncertainty about the values of energy bids. q qWe therefore describe an enhanced blockchain-scheme called Microgrid Blockchain Platform (MBP) based on mobile agents to enable the trusted and secure settlement of electricity trading transactions. q qEach agent monitors the activities of sellers in the network. The blockchain peer nodes use the mobile agent report to improve the decision making process, and make better decisions in the verification of the sellers declared information. qIn our context, a mobile agent is a standalone software entity that can start various tasks when visiting different computing nodes: such as collecting data, doing some computation, as well as visiting other computing nodes q q qIn the implemented platform, the blockchain platform will create a mobile agent dedicated to every selected seller. q qThe mobile agent will migrate to the selected seller. q qThen, the mobile agent will execute its code in the battery management sensor. qThe mobile agent computes the volume of energy V that is produced by each seller and reported by the sensors. q qThen the mobile agent compares V with D, where D is the declared value of power supply submitted to the blockchain. If D < V. then a potential FDI attack is suspected.