As the size of data is increasing exponentially, its security is a major concern, emerging technology like blockchain is used to provide security. Since the inception of blockchain, it has been adopted by researchers and industry, however, it gained enormous attention after cryptocurrency. It can be defined as a means of storing information in such a way that modification and hacking the system is difficult or impossible. A blockchain is a decentralized ledger that is digital and public, consisting of records of transactions called blocks. A consensus technology assures that all nodes agree on a unique sequence for appending blocks. A comprehensive examination of these algorithms will aid in understanding how and why each blockchain operates in the manner that it does. In this study, we addressed extensively used consensus techniques in the blockchain and the importance of consensus protocol in blockchain technology. The underlying consensus algorithm is a critical component of every blockchain system which determine the performance and security of the system. Ensuring the correctness of consensus protocols is uttermost important to create trust in the blockchain-based systems and formal methods are the way to create that trust and develop correct and verified systems. Formal modeling is a method of writing a system mathematically and examining the correctness and verifying the developed system. This study analyzed the importance of consensus mechanisms and how formal methods are helping to develop a correct blockchain-based system. This paper is a rigorous study on the current scenario of the application of formal methods in the consensus mechanism of blockchain for their verification.