# A New Blockchain-Based Multi-Level Location Secure Sharing Scheme
## 4 Our Proposed Scheme
### Our Proposed Scheme
#### 4.2.2 Location Record
### Computation Overhead of the Location Update Phase

In the location update phase, a location update record \(\textit{U}\textit{d}\textit{r}\textit{e}_{LP}^{p}\) is generated by \(LP\) and recorded into the blockchain by _Miners_ to make \(LD\)s update the \(LP\)'s location. We set \(N=10\) and evaluate the computation overhead of \(LP\) and \(LD\), respectively. Figure 11 shows that the computation overhead of \(LP\) and \(LD\) in our proposed scheme is much lower than that of \(LP\) and \(LD\) in BMPLS. The computation overhead of \(LP\) and \(LD\) in our proposed scheme is about 9.76% and 0.22% of that in BMPLS, respectively. The reason is that the location-record phase and the location-sharing phase need to be executed again when the \(LP\) updates location in BMPLS. Figure 10: Computation overhead in the location sharing phase. Figure 9: Computation overhead in the location record phase. We evaluate the computation overhead of \(LP\) completing all the work with different location update times. Figure 12 shows that the computation overhead in our proposed scheme is significantly lower than that in BMPLS, which is more obvious as the times of location update increase. ### Gas Cost of Smart Contract SC

_SC_ is designed to implement attribute-based access control and establish an incentive and punishment mechanism, as introduced in Sections 4.3 and 4.4. First, the gas cost of deploying SC to the blockchain is 1,014,599 gas. The gas cost of \(LD\) recording the public attribute and the authority confirming it is 44,394 and 42,953 gas, respectively. The gas cost of \(LP\) recording policy depends on the size of the policy, as shown in Figure 6.0 This is the gas cost of the first time that \(LD\) and \(LP\) record attribute and policy, and the gas cost of modifying is much cheaper. For example, the gas cost of \(LP\) modifying the attribute to the same one is 19,429 gas. The gas cost of \(SC\) recording license is 26,382 gas. The gas cost of a \(Fnode\) reporting \(LP\) is 49,127 gas. We noticed that \(Fnode\) reporting \(LP\) costs 49,127 gas in Ethereum. This means about Figure 6.112 and the number of \(Fnodes\), which would be a large amount. This

Figure 6.2 Computation overhead in the location update. Figure 6.3 Computation overhead of \(LP\). may result in our proposed scheme not being put into practice. For this reason, we propose two methods to solve this problem. (1) _Fnode_ does not report _LP_ in the smart contract, but reports to the authority. The authority records the report result (whether _LP_ provides real data) and the dishonest _Fnode_s in the smart contract. In this way, the report in the smart contract is executed only once by the authority. The gas cost of the authority recording increases with the number of dishonest _Fnodes_, as shown in Figure 6.4 In theory, the margin needs to be greater than the product (maximum gas cost possible) of $1.6 and half of the number of _Fnodes_, which is much lower than before. (2) We used the Ethereum test network discussed above to evaluate the gas cost of the smart contract. Ethereum is one of the hottest blockchain projects, and the cost of the smart contract is high. It is not necessary to use Ethereum in practice. In some cases, system initiators can even create a private chain or alliance chain to implement our proposed scheme, which costs much less. However this is not the focus of this paper. Figure 6.5 Gas cost of the authority recording the report result and the dishonest _Fnodes_. Figure 6.6 Gas cost of _LP_ recording policy. ## 6 Performance of Our Proposed Scheme

In this section, we theoretically analyze the performance of our proposed scheme and prove that, when compared with other related works, our proposed scheme has better performance overall. Specifically, our proposed scheme has the following properties. ### Multi-Level Location Privacy Protection and Verifiability

Information security is crucial, but different for the provider and the demander, in an information-sharing process.