Modern power systems face different challenges such as the ever-increasing electrical energy demand, the massive growth of renewable energy with distributed generations, the large-scale Internet of Things (IoT) devices adaptation, the emerging cyber-physical security threats, and the main goal of maintaining the system's stability and reliability. These challenges pose extreme pressure on finding advanced technologies and sustainable solutions for secure and reliable operations of the power system. The blockchain is one of the recent technologies that have gained lots of attention in different applications including smart grid for its uniqueness and decentralized nature. In the last few years, this technology grew a momentum specifically with the cryptocurrencies' industry such as the Bitcoin and Etherium. The Blockchain's applications in the smart grids could offer many innovative and affordable solutions to some of the challenges that the future and the current smart grids will be facing. This paper reviews different prospects, advantages, approaches, and technical challenges of utilizing the blockchain technology in the smart grid, and presents frameworks for key smart grid blockchain-based applications; more specifically, it is shown that how the blockchain can be used as the smart grid's cyber-physical layer. INDEX TERMS Blockchain applications, cyber-physical security, energy trading, electric vehicles, microgrid monitoring and control, smart grids.