# Distributed Ledger Technologies and Their Applications: A Review
## 2 Distributed Ledger Technology
### Blockchain  
Blockchain technology was first used to solve the problem of double spending [1]. Cryptographic algorithms and distributed ledgers form the basis of this technology. It consists of a chain of blocks linked to each other, with each block containing numbers of transactions merged to the previous block and linked to previous transactions. As a general rule, an initial block is formed, and then new transactions result in a new block that is linked by keeping the previous block's hash data. Moreover, these blocks are widely distributed within a distributed network without central management, making it difficult to easily add a fake block or question a block's existence. With these features, transactions are immutable; therefore, data can be recorded on a Blockchain network without any changes or the ability to track the record history [41]. In addition, each Blockchain has a unique consensus algorithm for agreeing on a new block to prevent attacks such as Sybil attacks [14]. The selection of a trusted entity to make a new block in Blockchain can be based on algorithms such as proof of work [42], proof of burn [43] and proof of stake [44]. Distributed databases and cryptographic algorithms are combined in Blockchain technology to reliably store transactions [45]. Data integrity can be guaranteed by this technology without a centralized entity managing or controlling it. All transactions made with Blockchain technology are placed into a block and verified by all the nodes. Additionally, a hash of the transaction will be recorded in the block, and a hash from the previous block will be recorded to provide a link [46]. Therefore, if one transaction in a block changes,the newly calculated hash will differ from the hash already registered, and the block will become invalid [46]. The structure of the Blockchain is multiple blocks chained together in a timestamped chronological manner. Blocks generally consist of three parts: data, hash for the current block, and hash for the previous block that is included in the new block to determine the order of the blocks. The genesis block will be the first block created, and the next block will keep the hash of the genesis block with its own data and hash. A hash is a mathematical function that changes data into a short, arbitrary size, array of data [47]. The hash function produces results that cannot be decrypted and should be unique so that every dataset has its own fingerprint. By changing data on a block, the hash will no longer be the same, and if the hash has also been altered, the chain of the subsequent block cannot be linked due to the difference between the hash recorded in the next block and the current block. Therefore, the following chain will be considered invalid [46]. Figure 1 illustrates the Blockchain and the block, which consists of data, their current hash and the previous block hash. Any tampering with a block will result in the invalidity of the block and the following chain of blocks. In Blockchain, a hash function acts as a fingerprint [48], whereas in central systems changing the hash data is easy due to the single-failure node issue. Therefore, to prevent the data from being altered in a distributed network, a copy of the Blockchain will be shared among all participants. Whenever a node joins the network, they will receive a copy of all Blockchain records, so in the event of an attack, the attacker will need to gain the support of more than 50 percent of the network to change the data that exist in the Blockchain. Furthermore, every participant on the Blockchain should verify and agree on the new block before it is added to the Blockchain. It is here that consensus algorithms play a vital role. As a result of the consensus algorithm, one of the participants wins the ability to declare and share the new block with the network. The other participants are required to verify the block to ensure that the data and hashes on the block are valid.