Robust Decentralized Proof of Location for Blockchain Energy Applications Using Game Theory and Random Selection
Abstract
:1. Introduction
2. Background and Related Work
2.1. Blockchain
 The first principle: Blocks are chained together by their hashes. The hash is the difficult mathematical problem that miners must solve to find a block. Usually, the SHA256 hash algorithm is used [12]. This goes according to main principles, which are: (i) For two different inputs, never obtain the same output. (ii) For a given output, it is theoretically impossible to obtain the corresponding input. Thus, each block is hashed with the hash of the previous block, so that chain tampering is detectable unless the hashes are changed appropriately.
 The second principle: The tamperproof structure of the blockchain is based on the principle “the longest chain wins”. Consequently, there are conditions attached to the block’s hash and readability that make adding a new block difficult and resource intensive.
2.2. Proof of Location
 Targettarget collusion: This occurs when two malicious target nodes collude with each other at different sites. A target node may send a signed PoL request to the colluding node, which then forwards it to the assigned provers on its behalf. The LP calculated by the provers would be based on the location of the collaborating node and would be appropriate for the second target node.
 Proverprover collusion: In this situation, a dishonest prover conspires with a remote malicious witness and provides him with a fake location proof. This form of malicious collaboration is most difficult to handle in degenerate untrusted positioning. Most implemented proof of location are centralized, i.e., there are defined anchor nodes that are trusted as location verifiers. There is a growing interest in implementing blockchainbased decentralized location proofs in a trustless architecture. However, as noted in [29], the main challenge in blockchainbased decentralized proof of location is the proverprover collusion. What we propose is a fully trustless blockchainbased proof of location that is specifically designed for blockchainbased energy applications and robust against proverprover collusion.
3. Blockchain Enabled P2P Trading Scheme
 totalSupply: A method that defines the total supply of tokens. When this limit is reached, the smart contract refuses to create new tokens.
 balanceOf: A method that returns the number of tokens that a given account has.
 transfer: A method that transfers a specified number of tokens from the total balance to a specified account.
 transferFrom: A transfer method that transfers tokens between user accounts.
 approved: This method checks whether a smart contract is allowed to allocate a certain number of tokens to a user, taking into account the total supply.
 allowance: This method is exactly the same as approved, except that it checks whether a user has enough funds to send a certain number of tokens to another.
Algorithm 1 ERC20 Smart Contract: ClaimToken 

4. Proof of Location for Blockchain Enabled P2P Trading Scheme
4.1. Entities
 The target nodes: These are the nodes that need their locations confirmed before their transactions may be recorded in the blockchain’s public ledger. In the context of the proposed P2P energy trading system, the target nodes are prosumer nodes, which are set and certified to request tokens upon the appropriate energy aggregation to the grid.
 Location prover nodes: These are end nodes that compete for a financial reward by calculating the location of a target node. To be a potential candidate for the location proving process, prover nodes must stake a certain amount of tokens in a specified smart contract. If a prover’s claimed location turns out to be false following verification, the prover forfeits his or her wager. If, following verification, the claim is found to be correct, the prover is rewarded with tokens proportionate to the amount of money wagered. This turns the target location claim into a Token Curated Registry in which curators (prover nodes) bet financially on the validity of their claim (target node’s location).
 The verifier: This is the entity in charge of verifying the target node’s location, which is provided by the assigned group of provers. The verification process is performed by an intelligent independent entity, i.e., a smart contract, which is tasked with rewarding trustworthy LPs and penalizing fraudulent ones in the proposed system. A smart contract’s verification ensures that it is decentralized and free of bias, collusion, or corruption. The prover nodes in the proposed scheme use the Difference Time of Arrival (TDoA) algorithm to calculate the distance between them and the target node, rather than the specific location of the target node. Trilateration, which is implemented in the location verifier smart device, is used to determine the exact location.
 Sink node: It collects and transmits to the location verifier smart contract the distances estimated by the selected set of prover nodes that separate them from the target node in question. The sink node is used to transfer locations calculated by different provers in a single transaction, rather than many transactions.
4.2. PoL Primary Model Architecture
4.2.1. Definition of Geographic Ranges for Prover and Target Nodes
4.2.2. Location Verification Process
Algorithm 2 Location Verifier Smart Contract: RequestPoL, Apply/Deposit 

4.2.3. Provers Random Selection
 Uniquenes: ∃$({x}_{1},{y}_{1}),({x}_{2},{y}_{2}):PROOF({y}_{1},{P}^{Key1})=PROOF({y}_{2},{P}^{Key2})$.
 Pseudorandomness: Given a set of n inputs ${S}_{input}={x}_{1},\cdots ,{x}_{n}$ and their respective set of output ${S}_{output}={y}_{1},\cdots ,{y}_{n}$, there is no pattern linking outputs together.
 Provability:
Algorithm 3 Location Verifier Smart Contract: SendDsoEncryptedNumber, SendProversNumber, DsoRevealNumber 

Algorithm 4 Location Verifier Smart Contract: SelectProvers 

4.2.4. Target Node Position Determination
Algorithm 5 Location Verifier Smart Contract: ComputetTargetNodePosition 

4.3. Enhanced Anti Collusion PoL Using Game Theory
 The parties for whom it is harmful if $({x}_{t},{y}_{t})\ne ({x}^{*},{y}^{*})$, but beneficial for them if $({x}_{c},{y}_{c})\ne ({x}^{*},{y}^{*})$, i.e., the DSO or other partners, because in the latter situation they could reject a legitimate prosumer’s request for a token and enjoy the free energy aggregation. However, if $({x}_{t},{y}_{t})\ne ({x}^{*},{y}^{*})$, and $({x}_{c},{y}_{c})=({x}^{*},{y}^{*})$, they could deliver an energy token to a nondeserving node.
 Parties that are harmed when $({x}_{c},{y}_{c})\ne ({x}_{t},{y}_{t})$ and $({x}_{t},{y}_{t})=({x}^{*},{y}^{*})$; these are the prosumer nodes and their partners that might be tempted to maliciously seek the position $({x}^{*},{y}^{*})$, to obtain a free energy token without having to supply the energy countervalue.
 Neutral parties who participate only for the financial reward.
Algorithm 6 SelectRandomProvers 

Algorithm 7 Location Verifier Smart Contract: ComputeTargetNodePosition 

Algorithm 8 Location Verifier Smart Contract: SetPoL, GetNodePol 

Algorithm 9 ERC20 Smart contract: Verify 

Time Difference of Arrival
 The nature of the received RF signal (especially its bandwidth);
 The different characteristics of the receivers;
 The different propagation paths between the transmitter and the receivers;
 The correlation method used.
5. Experiment Results and Analysis
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Acknowledgments
Conflicts of Interest
References
 Antal, T.L.C.; Antal, M.; Mitrea, D.; Cioara, T.; Anghel, I. A Lockable ERC20 Token for Peer to Peer Energy Trading. arXiv 2021, arXiv:2111.04467. [Google Scholar]
 Munoz, M.F.; Zhang, K.; Amara, F. ZipZap: A Blockchain Solution for Local Energy Trading. arXiv 2022, arXiv:2202.13450. [Google Scholar]
 Buccafurri, F.; Lax, G.; Musarella, L.; Russo, A. An Ethereumbased solution for energy trading in smart grids. Digit. Commun. Networks 2021. [Google Scholar] [CrossRef]
 Nakamoto, S. Bitcoin: A PeertoPeer Electronic Cash System, Decentralized Business Review, 21260. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 15 April 2022).
 Raval, S. Decentralized Applications: Harnessing Bitcoin’S Blockchain Technology; O’Reilly Media, Inc.: Newton, MA, USA, 2016; p. 118. [Google Scholar]
 Aste, T.; Tasca, P.; Matteo, T.D. Blockchain technologies: The foreseeable impact on society and industry. Computer 2017, 50, 18–28. [Google Scholar] [CrossRef] [Green Version]
 Nofer, M.; Gomber, P.; Hinz, O.; Schiereck, D. Blockchain. Bus. Inf. Syst. Eng. 2017, 59, 183–187. [Google Scholar] [CrossRef]
 Biryukov, A.; Khovratovich, D.; Pustogarov, I. Deanonymisation of clients in Bitcoin P2P network. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, Scottsdale, AZ, USA, 3–7 November 2014; pp. 15–29. [Google Scholar]
 Haber, S.; Stornetta, W.S. How to TimeStamp a Digital Document. Conference on the Theory and Application of Cryptography; Springer: Berlin/Heidelberg, Germany, 1990; pp. 437–455. [Google Scholar]
 Brown, D.R.L. Recommended Elliptic Curve Domain Parameters. In Standards for Efficient Cryptography, 3rd ed.; Certicom Research: Mississauga, ON, Canada, 2010; p. 33. [Google Scholar]
 Blundo, C.; Lovino, V.; Persiano, G. Privatekey hidden vector encryption with key confidentiality. In Proceedings of the International Conference on Cryptology and Network Security, Kanazawa, Japan, 12–14 December 2009; Springer: Berlin/Heidelberg, Germany, 2009; pp. 259–277. [Google Scholar]
 Hoy, M.B. An introduction to the blockchain and its implications for libraries and medicine. Med Ref. Serv. Q. 2017, 36, 273–279. [Google Scholar] [CrossRef]
 Coinmap. Available online: https://coinmap.org/ (accessed on 15 April 2022).
 Luu, L.; Chu, D.H.; Olickel, H.; Saxena, P.; Hobor, A. Making smart contracts smarter. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, Vienna, Austria, 24–28 October 2016; pp. 254–269. [Google Scholar]
 Christidis, K.; Devetsikiotis, M. Blockchains and smart contracts for the internet of things. IEEE Access 2016, 4, 2292–2303. [Google Scholar] [CrossRef]
 Klomp, R.; Bracciali, A. On symbolic verification of Bitcoin’s script language. In Data Privacy Management, Cryptocurrencies and Blockchain Technology; Springer: Cham, Switzerland, 2018; pp. 38–56. [Google Scholar]
 Asuquo, P.; Cruickshank, H.; Morley, J.; Ogah, C.P.; Lei, A.; Hathal, W.; Bao, S.; Sun, Z. Security and Privacy in LocationBased Services for Vehicular and Mobile Communications: An Overview, Challenges, and Countermeasures. IEEE Internet Things J. 2018, 5, 4778–4802. [Google Scholar] [CrossRef]
 Gartner, R.J.G.; Karimi, H.; Rizos, C. Applications of location–based services: A selected review. J. Locat. Based Serv. 2007, 1, 89–111. [Google Scholar]
 Gupta, R.; Rao, U. An exploration to location based service and its privacy preserving techniques: A survey. Wirel. Pers. Commun. 2017, 96, 1973–2007. [Google Scholar] [CrossRef]
 Saroiu, S.; Wolman, A. Enabling new mobile applications with location proofs. In Proceedings of the ACM HotMobile, Santa Cruz, CA, USA, 23–24 February 2009; pp. 1–6. [Google Scholar]
 Zhou, Z.Z.L.; Zhao, X.; Wang, G.; Su, Y.; Metzger, M.; Zheng, H. On the Validity of Geosocial Mobility Traces. In Proceedings of the ACM Workshop on Hot Topics in Networks (HotNets), Princeton, NJ, USA, 13–15 November 2013; pp. 1–7. [Google Scholar]
 Pham, A.; Huguenin, K.; Bilogrevic, I.; Dacosta, I.; Hubau, J. Secure Run: Cheat–proof and private summaries for location–based activities. IEEE Trans. Mob. Comput. 2016, 15, 2109–2123. [Google Scholar] [CrossRef] [Green Version]
 Javali, C.; Revadigar, G.; Rasmussen, K.; Hu, W.; Jha, S.; Alice, I.A. I Was in Wonderland: Secure Location Proof Generation and Verification Protocol. In Proceedings of the 2016 IEEE 41st Conference on Local Computer Networks (LCN), Dubai, UAE, 7–10 November 2016; pp. 477–485. [Google Scholar]
 Zhu, Z.; Cao, G. APPLAUS: A privacy–preserving location proof updating system for location–based services. In Proceedings of the IEEE INFOCOM, Shanghai, China, 10–15 April 2011; pp. 1889–1897. [Google Scholar]
 Boureanu, I.; Mitrokotsa, A.; Vaudenay, S. Practical and provably secure distance bounding. J. Comput. Secur. 2015, 23, 229–257. [Google Scholar] [CrossRef] [Green Version]
 Boureanu, I.; Vaudenay, S. Challenges in Distance Bounding. IEEE Secur. Priv. 2015, 13, 41–48. [Google Scholar] [CrossRef] [Green Version]
 Gambs, S.; Killijian, M.; Roy, M.; Traore, M. PROPS: A privacy–preserving location proof system. In Proceedings of the IEEE 33rd International Symposium on Reliable Distributed Systems, Nara, Japan, 6–9 October 2014. [Google Scholar]
 Kounadi, O.; Bernd, R.; Andreas, P. Privacy Threats and Protection Recommendations for the Use of Geosocial Network Data in Research. Soc. Sci. 2018, 7, 191. [Google Scholar] [CrossRef] [Green Version]
 Nosouhi, M.R.; Yu, S.; Zhou, W.; Grobler, M. Blockchain for secure location verification. J. Parallel Distrib. Comput. 2020, 136, 40–51. [Google Scholar] [CrossRef]
 Foamspace Corp. FOAM—The Consensus Driven Map of the World. 5 January 2018. Available online: https://foam.space/publicAssets/FOAM_Whitepaper.pdf (accessed on 7 April 2022).
 Shu, F.; Lei, K. Vger: A VRF based crosschain mechanism for blockchains. J. Phys. Conf. Ser. 2021, 1780, 012038. [Google Scholar] [CrossRef]
 Emmanuel, M.; Chacko, A.N. BSCDL: A Blockchain Based Smart Contract Digitized Lottery Scheme; EasyChair Preprint: Manchester, UK, 2020; p. 10. Available online: https://easychair.org/publications/preprint/W7Qp (accessed on 17 May 2022).
 Du, M.; Chen, Q.; Liu, L.; Ma, X. A Blockchainbased Random Number Generation Algorithm and the Application in Blockchain Games. In Proceedings of the 2019 IEEE International Conference on Systems, Man and Cybernetics (SMC), Bari, Italy, 6–9 October 2019; pp. 3498–3503. [Google Scholar]
 Phruksahiran, N.; Michanan, J. Iteration improvement of Taylorseries estimation using hyperbolic systems for FMradio source localization in Bangkok. Signal Image Video Process. 2021, 15, 247–254. [Google Scholar] [CrossRef]
 LoRa Alliance^{TM} Strategy Committee. LoRaWAN Geolocation Whitepaper. January 2018. Available online: https://loraalliance.org/sites/default/files/201804/geolocation_whitepaper.pdf (accessed on 7 April 2022).
DSO Prover Node  Lie: $({\mathit{x}}_{\mathit{c}},{\mathit{y}}_{\mathit{c}})\ne ({\mathit{x}}^{*},{\mathit{y}}^{*})$  Truth: $({\mathit{x}}_{\mathit{c}},{\mathit{y}}_{\mathit{c}})=({\mathit{x}}^{*},{\mathit{y}}^{*})$  

NonDSO Prover Node  
Truth: $({x}_{c},{y}_{c})=({x}^{*},{y}^{*})$  (−10, −10)  (10, 10)  
Lie (declared without computing): $({x}_{c},{y}_{c})=({x}^{*},{y}^{*})$  (−10, −10)  (10, 10) 
DSO Prover Node  Truth: $({\mathit{x}}_{\mathit{c}},{\mathit{y}}_{\mathit{c}})\ne ({\mathit{x}}^{*},{\mathit{y}}^{*})$ & $({\mathit{x}}_{\mathit{c}},{\mathit{y}}_{\mathit{c}})=({\mathit{x}}_{\mathit{t}},{\mathit{y}}_{\mathit{t}})$  Lie: $({\mathit{x}}_{\mathit{c}},{\mathit{y}}_{\mathit{c}})\ne ({\mathit{x}}^{*},{\mathit{y}}^{*})$ &$({\mathit{x}}_{\mathit{c}},{\mathit{y}}_{\mathit{c}})\ne ({\mathit{x}}_{\mathit{t}},{\mathit{y}}_{\mathit{t}})$  

NonDSO Prover Node  
Lie: $({x}_{c},{y}_{c})=({x}^{*},{y}^{*})$  (−10, −10)  (10, 10)  
Truth: $({x}_{c},{y}_{c})\ne ({x}^{*},{y}^{*})$ &$({x}_{c},{y}_{c})=({x}_{t},{y}_{t})$  (20, 20)  (30, −30) 
Wifi  Bluetooth  LoRaWan  ZigBee 

20–50 m  1–7 m  1000–2000 m  20–100 m 
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. 
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Merrad, Y.; Habaebi, M.H.; Islam, M.R.; Gunawan, T.S.; Mesri, M. Robust Decentralized Proof of Location for Blockchain Energy Applications Using Game Theory and Random Selection. Sustainability 2022, 14, 6123. https://doi.org/10.3390/su14106123
Merrad Y, Habaebi MH, Islam MR, Gunawan TS, Mesri M. Robust Decentralized Proof of Location for Blockchain Energy Applications Using Game Theory and Random Selection. Sustainability. 2022; 14(10):6123. https://doi.org/10.3390/su14106123
Chicago/Turabian StyleMerrad, Yaçine, Mohamed Hadi Habaebi, Md. Rafiqul Islam, Teddy Surya Gunawan, and Mokhtaria Mesri. 2022. "Robust Decentralized Proof of Location for Blockchain Energy Applications Using Game Theory and Random Selection" Sustainability 14, no. 10: 6123. https://doi.org/10.3390/su14106123