  Over the past decade, blockchain technology has attracted a huge attention
from both industry and academia because it can be integrated with a large
number of everyday applications of modern information and communication
technologies (ICT). Peer-to-peer (P2P) architecture of blockchain enhances
these applications by providing strong security and trust-oriented guarantees,
such as immutability, verifiability, and decentralization. Despite these
incredible features that blockchain technology brings to these ICT
applications, recent research has indicated that the strong guarantees are not
sufficient enough and blockchain networks may still be prone to various
security, privacy, and reliability issues. In order to overcome these issues,
it is important to identify the anomalous behaviour within the actionable time
frame. In this article, we provide an in-depth survey regarding integration of
anomaly detection models in blockchain technology. For this, we first discuss
how anomaly detection can aid in ensuring security of blockchain based
applications. Then, we demonstrate certain fundamental evaluation metrics and
key requirements that can play a critical role while developing anomaly
detection models for blockchain. Afterwards, we present a thorough survey of
various anomaly detection models from the perspective of each layer of
blockchain. Finally, we conclude the article by highlighting certain important
challenges alongside discussing how they can serve as future research
directions for new researchers in the field.
