# Blockchain-Based Resource Allocation Model in Fog Computing
## 1 Introduction
### Related Works
Because the proposed method is not complicated and easy to model and configure, it also has lower time complexity and memory consumption, so that the blockchain technology can be better combined with the cloud computing or fog computing architecture. [PERSON] and [PERSON] [38] introduced a mixture of networking architecture. This architecture combines a blockchain-based social network to support the fog computing architecture, ensuring security in an untrusted IoT environment. Therefore, users can establish tamper-resistant digital identity management intelligent objects in an environment with a low-trust level, and establish a series of new authentication and authorization mechanisms for the Internet of Things system, which significantly improves the security performance of the traditional IoT system. [PERSON] et al. [39] introduced an auction-based market model to efficiently perform computational resource allocation in a cloud or fog computing environment. The main aim is to offload computing tasks in the PoW and to solve cloud problems in a cloud or fog server computing resources. The authors consider that the computing resources in the PoW-based blockchain network are limited, and the allocation of externalities is individually considered when designing the auction mechanism. Instead, they have developed two bidding options, the fixed demand plan and the multiple demand plan. The approximation algorithm solves the NP problem of maximizing the return of all participants in the multiple schemes. [PERSON] et al. [40] consider that, in the fog-based car networking environment, the users may have a certain degree of security and privacy issues when sharing their sensitive information (such as identity and location) during carpooling. This situation could allow malicious users to upload incorrect location information to produce errors in the matching system. The authors propose a carpooling scheme that is efficient and protects user privacy. The scheme uses blockchain technology to assist vehicles to support conditional privacy, with one-to-many target matching and data auditable traceability. The performance of the scheme is evaluated based on the computational cost and communication overhead. [PERSON] et al. [41] propose a user authentication scheme in a fog node that involves blockchain. The fog node in the scheme and the Ethereum contract interface are employed for user access to the IoT device for authentication. The fog node provides scalability for the entire system by mitigating the heavy computational tasks of IoT devices. [PERSON] et al. [42] designed a marginal Internet of things framework, called EdgeChain internal tokens. This framework integrates the licensed chain system by moving the edge server resource pool and the behavior of the state of each IoT devices together. Moreover, the proposed framework is supplemented by a resource management system based on a credit scheme and intelligent contract. The solution introduced by the authors can standardize the behavior of Internet equipment, to control the IoT devices from the edge of the server resources. In the above research, scholars mostly use the characteristics of collective maintenance, traceability, and high security in blockchain technology to solve security problems in the fog computing environment [33; 34; 35; 38; 40], and resource allocation issues [39; 42]. Some scholars have also studied the problem of the blockchain itself so that it can better serve cloud computing or fog computing [37]. Further, some scholars have developed blockchain-based systems under the environment of cloud computing or fog computing [36; 41]. Although there are still some problems in the above studies, such as low system throughput, high energy consumption, and too ideal experimental environment, it can be recognized that the use of blockchain technology could solve many problems in fog calculation, and it is a simple and efficient way.