# Resource Allocation on Blockchain Enabled Mobile Edge Computing System
## 2 Overview of the System
### Framework of the System  
In this part, the detailed blockchain-based MEC system architecture is proposed. As shown in Figure 1, the proposed model mainly consists of two parts: service layer and client layer, and the service layer can be further separated into blockchain layer and edge computing layer.  
The client layer consists of many mobile devices, such as temperature and humidity sensors, smart watches, and monitors, which are common in normal life and industry application scenario currently. Each device connects to a blockchain wallet, as the wallet contains a certain amount of crypto token which is a basic instrument in the blockchain system. The connection between mobile devices and edge computing servers is achieved wirelessly, for both the connection between wallet and blockchain system and data uploading. The service layer consists of two parts, which are blockchain layer and edge computing layer. Many edge computing service nodes, which provide the computing resources to take charge of processing the clients' data, make up the edge computing layer. Meanwhile, each service node also plays the role of the miner in the blockchain system to maintain the ongoing of the whole system, which means they generate blocks after finishing a neural network training task released by the PoL consensus mechanism. Service node needs to upload the results of the training task, for example: accuracy, neural network parameters, so that other service nodes (miners) can verify the correctness and make sure it will not do malicious things. To ensure that the computing resources will be allocated efficiently, the smart contract, which consists of several functions that control the working flow, needs to make optimal decisions on such limited computing resources.  
The specific framework is designed for three reasons.  
1. While using the blockchain technology, the MEC system that could previously run only on a trusted intermediary, can now operate safely without the need for a central authority [29]. Furthermore, the heavy use of cryptography brings authoritativeness and security [29]. For example, the zero-knowledge proof can protect the information with anonymity [18], the consensus algorithms can avoid malicious attacks [30], and the script validation used in transactions, namely Pay-to-Public-Key-Hash transaction  
Figure 1: Blockchain-based MEC system architecture.  
(en.bitcoinwiki.org/wiki/Pay-to-Pubkey_Hash, accessed on 4 February 2020) and multi-signature transaction (en.bitcoin.it/wiki/Multi-signature, accessed on 20 July 2021), can improve the security [31].
2. As the MEC system is in a quite decentralized environment, using just an online platform may suffer from \"a central point of failure\" [32]. The decentralized trait of blockchain technology can build mutual trust among participants by implement specific consensus: PoW, proof of stake (PoS), and thus enhance the robustness of the system [31]. The model proposed by [PERSON] et al. [31] have proved its correctness.
3. Smart contracts, which are scripts that reside on the blockchain that allow for the automation of multi-step processes, translate contractual clauses into code and embed them into property that can self-enforce them. They operate as autonomous actors, whose behavior is based on the embedded logic [30]. When combined with MEC system, the smart contract can provide flexible and scalable computing capability to address the tradeoff between limited computing capacity and high latency [33]. The work performed by [PERSON] et al. [34] has proved that the combination of blockchain and MEC can have an improvement on optimal allocation policy compared with other existing schemes.