© 2020 by the authors.Using blockchain technology as one of the new methods to enhance the cyber and physical security of power systems has grown in importance over the past few years. Blockchain can also be used to improve social welfare and provide sustainable energy for consumers. In this article, the effect of distributed generation (DG) resources on the transmission power lines and consequently fixing its conjunction and reaching the optimal goals and policies of this issue to exploit these resources is investigated. In order to evaluate the system security level, a false data injection attack (FDIA) is launched on the information exchanged between independent system operation (ISO) and under‐operating agents. The results are analyzed based on the cyber‐attack, wherein the loss of network stability as well as economic losses to the operator would be the outcomes. It is demonstrated that cyber‐attacks can cause the operation of distributed production resources to not be carried out correctly and the network conjunction will fall to a large extent; with the elimination of social welfare, the main goals and policies of an independent system operator as an upstream entity are not fulfilled. Besides, the contracts between independent system operators with distributed production resources are not properly closed. In order to stop malicious attacks, a secured policy architecture based on blockchain is developed to keep the security of the data exchanged between ISO and under‐operating agents. The obtained results of the simulation confirm the effectiveness of using blockchain to enhance the social welfare for power system users. Besides, it is demonstrated that ISO can modify its polices and use the potential and benefits of distributed generation units to increase social welfare and reduce line density by concluding contracts in accordance with the production values given.