Smart cities are becoming increasingly popular worldwide as cities grow; technology evolves and improves daily. The internet of things devices are used in smart cities that are all interconnected to run critical systems that a city requires to function correctly. The Internet of Things controls traffic lights, security cameras, weather, infrastructure, meters, and other data collection devices to run the city. Because technological devices do not sleep, eat, or take breaks like humans, the systems can be relied on to operate continuously. Blockchain is a system of decentralized and immutable electronic ledgers or databases in which anyone can securely store and access public records while maintaining information integrity. Blockchain offers a method of communication, transactions, security, and governance that is transparent and available to all members of a town or society, which are several advantages of a smart city. This paper reviews how blockchain can aid in developing a smart city and proposes a security framework based on layers.