# Anomaly Detection in Blockchain Networks Using Unsupervised Learning: A Survey
## 3 Blockchain Overview
### Consensus Mechanisms  
Consensus algorithms serve as the foundation in ensuring the decentralized and secure nature of distributed ledgers. They foster agreement among nodes in a blockchain network, validating transactions, preventing double-spending, and upholding overall ledger integrity [24]. One prominent consensus algorithm, the Proof of Work (PoW), has gained prominence through its association with Bitcoin. PoW relies on participating nodes' computational power to solve complex mathematical puzzles, with the first successful solver earning the right to validate and add a new block to the blockchain. While effective, PoW faces criticism for substantial energy consumption, prompting the exploration of eco-friendly alternatives [71]. Proof of Stake (PoS) has emerged as one such alternative, addressing environmental concerns linked to PoW. In a PoS system, validators create new blocks based on the cryptocurrency amount they hold and are willing to \"stake\" as collateral [83]. This energy-efficient approach contrasts sharply with PoW, showcasing the diverse range of consensus mechanisms within the blockchain space. The Delegated Proof of Stake (DPoS) combines elements of both PoW and PoS. DPoS involves a group of delegates, chosen through community voting, to validate transactions and produce new blocks. This approach aims to enhance efficiency by reducing the number of participants involved in the consensus process, rendering it a more scalable solution [24; 71]. The Proof-of-Authority (PoA) engages a small number of selected users to perform transaction validations and update the network's distributed registry [84; 85]. The selected validators create and embed into the network the new transactions' blocks, which are accepted without any further verification. On many occasions, the above-mentioned acceptance can be achieved by the unanimous vote of the block generators, or by considering the users' majority. Rendering a user as a validator depends on several criteria such as high moral standards, no criminal record, wide acceptance by the network users, validator's willingness to stake her/his reputation, etc. One of the major advantages provided by PoA is the fact that it does not require a lot of computing power. Finally, we report two environments related to continuous authentication and verification, namely, the zero-trust and zero-knowledge proof architectures. The functional principle of zero-trust architecture (ZTA) is to maintain tight access control over every user, action, or request entering the network without any trust, even when the user is part of the network. ZTA aligns with the decentralized and distributed nature of blockchain networks, emphasizing the importance of continuous authentication and verification in ensuring the integrity of transactions and data. Additionally, it could be efficiently used to enhance protection against various types of attacks and anomalies [86]. On the other hand, zero-knowledge proof is a cryptographic method where one party (the prover) can prove to another party (the verifier) that they know a specific piece of information without revealing the actual information itself. This concept is crucial for maintaining privacy and security in decentralized systems, where participants may want to verify transactions without exposing sensitive details [87]. When a particular event is detected as an anomaly, the whole network must reach a consensus to validate that result to enable appropriate actions against it. Therefore, the complexity involved in the consensus algorithm directly impacts the anomaly detection process. This impact is significantly enhanced when some of the network's nodes act as malicious ones [26]. The above issue becomes crucial and must be considered when designing anomaly detection models [88]. In addition, a quantity that is proportional to the complexity of consensus algorithm is the required energy consumption. As such, the implementation of unsupervised learning is directly affected by the consensus mechanism.