A consensus layer is a program used in blockchain systems to achieve distributed agreement about the ledger's state. It is implemented in a network with many processes and users and replaces much slower human verifiers and auditing. Consensus mechanisms use cryptographic techniques to ensure data safety and integrity, preventing data tampering and unauthorized access, whether it is malicious or not. Different kinds of consensus mechanism algorithms exist, such as proof of work (PoW), proof of stake (PoS), proof of history (PoH), and proof of burn (PoB).