PADaaV: Blockchain-based Parking Price Prediction Scheme for Sustainable Traffic Management

In most countries, traffic congestion has reached a level where managing traffic is tedious for regulatory bodies. The traffic management faced many issues such as route routing based on congestion, delivery of messages/emails to end-users, and real-time allocation of parking slots. There have been many works on predicting parking prices for traffic management, but most favor users or owners and are not secure. To address these issues, a blockchain and Interplanetary File System (IPFS)-based parking price prediction scheme (PADaaV) is proposed to facilitate the users to reserve a parking slot securely and efficiently. It mainly focuses on ensuring security, privacy, and transparency for parking slot owners and users. Furthermore, we employ a second price auction model to optimize the parking price for users, and parking slot owners can also get benefit from it. The performance of the PADaaV has been simulated for 100 users with 40 parking slots based on different auction models. The various performance parameters considered are profit for users, profit for parking slot owners, overall revenue of the system, scalability, computation time, and data storage cost. The performance results show that the PADaaV is secure and beneficial for users and parking slot owners.


I. INTRODUCTION
T RAFFIC management is one of the challenging tasks that need to be controlled efficiently. It is necessary to regulate the flow of traffic for sustainable traffic management. Traffic congestion is the main reason that it is getting difficult day by day for the drivers to find an empty parking slot, especially during peak hours (1). There are many research studies conducted (2) (3), which state that vehicles looking for free parking slots include approximately 8% of traffic. Drivers spend approximately 3.5 to 14 minutes to find an empty parking slot (4) (5). Even in developing countries, many types of fatal accidents are caused due to traffic congestion (6) (7). There are various studies on vehicle parking prices, and they have shown that a vehicle pays approximately 5 dollars or more, which is a huge amount of total travel cost (8) (9). The survey data of 2013 and 2015 states that on-street parking price on weekdays has increased from 2.00 USD to 4.40 USD per hour (10). Many researchers worldwide discussed the various parking price prediction schemes. Still, with the help of a centralized authority, which is vulnerable to various security issues such as data modification, spoofing, Man-inthe-middle (MitM) attack, etc. (11). Centralized authority can charge high parking prices to allocate a parking slot for users for their benefit (12) (13). These issues can deviate users from utilizing the parking slots leading to the loss of parking slot owners. VOLUME 4, 2016 It is necessary to ensure security, privacy, and transparency while predicting the parking price so that users can book the parking slot at the optimum price. To mitigate the aforementioned issues, a blockchain-based trusted system is needed to ensure parking price security, confidentiality, and privacy (21) (22). Many researchers discussed the blockchain-based system to mitigate the security and privacy issues of the centralized authority. Some of the works are: Chai et al. (16) proposed a consortium-based blockchain model for resource sharing on the internet of vehicles using a consensus mechanism to ensure security in the system. Later, Syed et al. (17) presented a blockchain-based framework for vehicle tracking integrated with IoT devices.
Authors in (15) presented a blockchain-based layered architecture for a smart parking system to establish trust between users. Then, Hassija et al. (12) proposed a distributed parking slot allocation framework based on virtual voting and an adaptive pricing algorithm to allocate the parking slot for users in an optimal way. Later, Jog et al. (23) discussed a smart parking technology and automated parking to allocate parking space for users using different technologies such as wireless sensors networks, RFID technology, etc. Then, Simhon et al. (14) proposed a smart parking pricing system to predict the occupancy rate of a parking area using a machine learning approach.
Peyal et al. in (19) proposed a smart car parking system in urban areas with the help of IoT. The main focus is to reduce traffic congestion and make parking easy for users. Table 1 shows the comparative analysis of various state-ofthe-art parking price prediction schemes with the PADaaV PADaaV with or without blockchain. Some of the solutions in (15) (16) (17) (19) given by the researchers are only focusing on enhancing the security of the system. Still, there is no emphasis on optimizing the parking prices for users, profit for vehicle owners, cost-efficiency, scalability, and computation time. Although there are some research works in (12) (14), which emphasize optimizing the parking price for users, they are not focusing on enhancing the security of the system.
Motivated by this, we propose a secure blockchain-based parking price prediction scheme using a second price auction model for sustainable traffic management. The second price auction model optimizes the price for users so that users who booked parking slots with the highest price get the parking slot, but they have to pay the second-highest price. Furthermore, the integrated IPFS with the proposed scheme mitigates the cost storage issues of the blockchain, which further enhances the scalability and reduces computation time and data storage cost of the system. So, users can book the parking slot at the optimized price, reducing traffic congestion, and parking slot owners can also benefit from it.

A. RESEARCH CONTRIBUTIONS
The research contributions of this paper are as follows: • We propose an IPFS and blockchain-based parking price prediction scheme for cost-efficient and sustainable traffic management.
• We employ a second price auction model to optimize the parking price for users so that parking slot owners can also get benefit from it. • Finally, we estimate the performance of the PADaaV in terms of profit for users, profit for parking slot owners, revenue of the system, scalability, computation time, and data storage cost of the system.

B. ORGANIZATION OF PAPER
The rest of the paper is organized as follows. Section II discusses the system model and problem formulation. Then, section III shows the proposed model, and Section IV shows the performance evaluation based on the different auction models and blockchain-based results. Finally, Section V concludes the paper. TABLE 2 shows the various symbols and their description used in the blockchain-based proposed scheme using the second price auction model to predict optimum and cost-efficient parking prices for users.

II. SYSTEM MODEL AND PROBLEM FORMULATION
A. SYSTEM MODEL FIGURE 1 shows a blockchain-based parking price prediction scheme(PADaaV) for sustainable traffic management. It consists of a set of users (S u ), the set of parking slots (S ρ ), and the set of parking slot owners (S ϱ ) communicating through distributed Ethereum network. S u can communicate with any parking slot owners to book a parking slot by spending an amount from their wallet. S ϱ can set the reserve price (r p ) so that users can book the parking slots with the bidding price of b p with the condition that the bidding price of user should be greater than the reserve price of the parking slot. Users can book the parking slots assigned by the parking slot owners, but they should fulfill some conditions priority. However, before that, the transaction between users and parking slot owners about the parking allocation can be performed efficiently with the help of blockchain through the usage of IPFS. But, data storage in the blockchain tends to be costly due to its feature of storing a whole block of data. Therefore, an IPFS data storage protocol can be incorporated with the blockchain after executing the smart contract for authentication purposes. A smart contract can validate the user's and parking slot owner's data that needs to be stored in the IPFS. If a smart contract finds malicious data in the network, then data access can be denied, ensuring the system's security and confidentiality. Now, certain conditions need to be discussed to allocate the parking slot to the user with a fair parking price. Firstly, users can bid for a parking slot in a network to check whether the current time (ζ t ) is greater than the bidding period (β p ) or not. If ζ t is greater than β p , then the second price auction model can be implemented directly. Then, after implementing the second price auction model, there is a condition to check, i.e., whether b p is greater than r p or not. If the bidding price(b p ) is greater than the reserve price(r p ), a smart contract can be executed to allocate the parking slot to the user. Implementing the smart contract  ensures the security in the system to allocate the parking slot to the users efficiently. There can also be a condition that if ζ t is less than β p , then it has to check for the available parking slots, i.e., whether the number of parking requests(N pr ) is greater than a number of available parking slots (N as ) or not. If (N pr ) > (N as ), then a second price auction model can be implemented to allocate available parking slots to the user. We have to check one more scenario in which if any additional parking slots need to be added; then a smart contract can be executed to add the additional parking slots with its reserve price and count, i.e., {r p , c}. Finally, different conditions can be considered to allocate the available parking slot to the user and add any available parking slot in the blockchain network through the intermediary IPFS for improved cost-efficiency.

B. PROBLEM FORMULATION
The proposed scheme consists of set S ∈ {S u , S ρ , S ϱ } in which S u is a set of p users {u 1 , u 2 , . . . . . . , u p } ∈ u k with the bidding prices of {b p1 , b p2 , . . . . . . , b ps } ∈ b pu , which can be associated with set S ρ of r parking slots {ρ 1 , ρ 2 , . . . . . . , ρ r } ∈ ρ h with their reserve prices {r p1 , r p2 , ..., r pr } ∈ r pq assigned by the set S ϱ of t parking slot owners {ϱ 1 , ϱ 2 , . . . . . . , ϱ t } ∈ ϱ o so that users can get a parking slot assigned. u k can trade with any o th parking slot owner, i.e., ϱ o to book any h th parking slot with the help of their wallet (Ψ). The above mentioned associations can be represented as follows: where α signifies the relationship between p ′ number of users and t ′ number of parking slot owners. Users u k can bid to reserve a parking slot in a distributed network. For that, there is a condition to check if ζ t is greater than the β p or not. A smart contract can be implemented to allocate the parking slot based on the second price auction model if the condition is satisfied. In the second-price auction VOLUME   But there can also be a possibility that if ζ t is less than the β p , then we have to verify another condition, i.e., if N pr > N as , then second-price auction model can be executed to allocate the parking slot to the user. These associations can be represented as follows: If current time greater than bidding period χ, If current time less than bidding period where γ and γ ′ denotes the r ′′ and o ′ number of parking slots assigned to the users based on the current time and bidding period, so users can get the parking slot based on the different conditions by executing the smart contract using the second price auction model. We have introduced the second price auction model so that users with the highest b p can get the parking slot, but they have to pay the second-highest price (P rice u k ), which can be represented as follows: where amt denotes bidding amount of u + 1 th user. ω signifies the p ′′ prices users have to pay to book the parking slots associated with s ′ number of bidding prices. In PADaaV, the allocation scheme should be implemented in such a way that the prediction of parking price should be in favor of users so that it also encourages them to bid high. After allocating the parking slot to a user, all other users participating in reserving the parking slot can get their residual amounts (δ u k ) back. It can be represented as follows: where ξ denotes the association between v number of users to get their residual amount back. But, if the user is not allocated any parking slot due to the unavailability of the parking slot of the low bid, then the amount can be returned to the user. If there is any available parking slot that has been made unreserved by the user, then a smart contract can be executed to add the available parking slot with a reserve price and count, i.e., ρ h (r pq , c).
PADaaV focuses on allocating the parking slot to the users efficiently and maximizing the revenue of the parking slot owners. Choosing an appropriate allocation scheme is required to satisfy the users to get the parking slot at an optimized price. So, implementing an allocation scheme with a second price auction model is advantageous for users to reserve a parking slot with the second-highest price, i.e., less than their bidding price. The allocation has been executed properly so that if users don't get the parking slot, then their residual amount can be returned. So, PADaaV is beneficial for users and parking slot owners.

III. PADAAV:THE PROPOSED MODEL
The price to reserve a parking slot needs to be predicted for the users, parking slot owners, and parking slots in a distributed network. Users can reserve the parking slots available by the parking slot owners in the blockchain network. Blockchain and IPFS protocol implemented with the second price auction model plays an important role in storing the transactions of users and parking slot owners in a secure and cost-efficient way. However, there is a major difference between blockchain and IPFS in data storage cost. As IPFS incorporated with the blockchain seems beneficial for users due to its feature to store hash data instead of storing the whole block of data. Furthermore, this section proposes algorithms to efficiently allocate the parking slots to the users.

A. DYNAMIC PRICING ALLOCATION SCHEME
A dynamic parking pricing scheme is elaborated to allocate the parking slot to the users efficiently. FIGURE 2 shows a blockchain-based parking price prediction scheme, PADaaV, in which a second price auction model is implemented to allocate the price to the users efficiently in a distributed network. The proposed second-price auction model works based on the concept of a sealed-bid auction in which users do not know about the other users' bidding price, which maintains the privacy and security of the system. Furthermore, a smart contract is used to run the dynamic pricing allocating scheme based on the second pricing model so that users can get the parking slots at the optimized price according to their bid. Parking slot owners can add the parking slot back to the parking slots if they have been made unreserved by the user by submitting the request to the smart contract. FIGURE 2 depicts that the multiple parking slots and multiple users are connected in the network. There are r parking slots ρ h for which p users can bid b pu in the distributed network. We have considered an example in which, initially, two users are bidding with bidding prices {b p1 ,b p2 } to reserve a parking slot. Firstly, user bids have been collected so that these bids can be compared for allocating the parking slot. VOLUME 4, 2016 In the next step, the second price auction model has been implemented as an allocation scheme with the help of a smart contract based on the various conditions.
In this section, various algorithms are proposed, which decide that users bidding for multiple parking slots pay the second-highest price according to the second price auction model, which is less than their bidding price. We have compared it to other approaches like the first-price auction model, in which the user has to pay more price than the second price auction model. The second price auction model helps maximize parking slot owners' revenue and ensures that users get the parking slot at an optimized price conveniently. Moreover, the parking slot owner can set the reserve price r p for parking slot ρ h , which ensures that the parking owners meet their minimum required amounts. Definition 1: In the proposed scheme, second-price auction model works on the principle of sealed-bid in which p number of users can reserve r number of parking slots with the bidding prices of {b p1 > b p2 >, . . . . . . , > b ps } in descending order. However, they don't have any information about the bidding price (sealed-bid) of the others to ensure security and privacy in the system. The proposed model allocates the parking slot to the user u k with the highest bidding price and the user has to pay the second-highest bidding amount b pu+1 .amt (24).
Also, there is an assumption that users looking for a parking slot have to submit their bids within a duration called the β p . Algorithm 1 explains the detailed procedure of dynamic pricing allocation of m number of parking slots which can be performed in time complexity of O(m + n) in which the inputs are stored in descending order. The highest price bidder is matched with the highest reserve price r p parking slot, which is less than the price of the user. Therefore, parking slots can be searched linearly and allocated suitably to a user using the second-price auction model in which the user has to pay the second-highest price, i.e., P rice uk . So, remaining bidding amount can be transferred back to the user with the help of expression b pi .bidder.transf er_the_money(b pi .amt−P rice u k ). Moreover, algorithm 2 describes the procedure of addition of any additional parking slots available with the help of their r p and c. The amount of bid can be collected corresponding to the bid submitted by each user, which helps in ensuring the authenticity of a bid by a user. Now, users are bidding to reserve the parking slots, but as we already discussed using the second price auction model, they have to pay the secondhighest price, which means that users can get their residual amount δ u k back from b p . It can be represented as follows: b pu k = b pu .bidder.transf er_the _ money(b pu .amt), (10)

B. EFFECT ON THE PRICE DUE TO BIDS
The number of vehicles is increasing on the road. However, limited infrastructure, uncontrolled externalities, and varying traffic conditions make predicting parking demand at a particular time slot challenging based on the past condition. The use of an auction-based model helps accurately reveal the demand at a particular instance. In contrast to a single price auction model, the highest bidder wins. The highest bidder wins in the second price auction model but pays the second-highest bid amount, as shown in equation 8. Therefore, to win, the bidders are motivated to bid the highest amount while still ensuring that they are not paying an amount much higher than others. If a user is not allotted a parking slot due to the low bid's unavailability of the parking slot, then the amount can be returned to the user. Algorithm 2 explains how we can add a parking slot with its r p and c in the blockchain network. It defines a utility function for entering new parking slots on the blockchain network. The utility function adds the additional parking slots corresponding to a parking slot owner with a count and reserve price accordingly. It is also used to add the parking slots back once freed from a user. The time complexity of algorithm 2 turns out to be O(m) where m are the number of parking slots present in the sequence, and It has O(1) space complexity, but the array to store m parking slots require O(m) space. The additional parking slots that needs to be added to the blockchain network can be represented as follows: Algorithm 3 explains the procedure of accepting bids in which the users are bidding to reserve a parking slot. It defines a utility function for accepting bids of users within the given ζ p . Users can resubmit their bids within the ζ p ; for that, the newly submitted bid must be greater than the previous ones. The function, i.e., map[user], helps to track the bids already made by the user in the distributed blockchain network. The use of maps helps reduce the gas consumption for searching the presence of users and checking the validity of bids, which further reduces the gas costs. Now, in case the user resubmits the bid, then bid b ploc .amt←amount is updated and the bids are reordered in the b p sequence, which takes linear time O(n). In the case of a new bid, the bid is inserted at an appropriate position as shown in Algorithm 3, which leads to the linear time complexity of O(n) for accepting the bids.
In a smart contract, the use of bidding price b p in descending order and parking slots ρ h in descending order helps avoid extra gas costs due to additional memory for sorting methods like merge sort. It also helps avoid the time complexity of O(nlogn) or O(n 2 ) for the allocation process in Algorithm 1. It gives a better time complexity of O(n) in the allocation of parking slots and it has O(1) space complexity for the number of bids. To avoid costly gas loops, we need to maintain a map to track the already submitted bids.

IV. PERFORMANCE EVALUATION BASED ON THE DIFFERENT AUCTION MODELS AND BLOCKCHAIN
In this section, the performance evaluation of the dynamic pricing allocation scheme is analyzed based on the different auction models such as fixed price, first-price auction model with the proposed second-price auction model. We have also analyzed the performance of the blockchain-based proposed scheme in terms of scalability, computation time, and data storage cost of the system. The evaluation of the results has been analyzed in Remix integrated development environment (IDE) to show the improved and cost-efficient parking slot VOLUME 4, 2016 booking in favor of users and parking slot owners. The results based on the different auction models and blockchain, along with the simulation, can be represented as follows:

A. SIMULATION 1) Dataset Generation and Initial Experiment Setup
The analysis of the proposed scheme has been simulated over the Remix IDE (25). The smart contracts of the proposed scheme are developed, compiled, run, and tested over the Remix IDE using solidity source code (26). The experiment has been simulated for 100 users with 40 parking slots. We have randomly generated a valuation of the parking slot for a u i corresponding to his purchasing power using a Gaussian distribution with a mean of 50 and a variance of 15 (30% of the mean). In addition, the reserve prices rp j of the parking slots have been randomly generated with a mean of 40 and a variance of 10 (25% of the mean). The second price auction model simulation has been performed in python 3.2 with the help of generated dataset for 100 users and 40 parking slots, along with the generated reserve prices of the parking slot.

2) Bids and Prices in Different Models
The second price auction model is a revealing demand model. Therefore, bid b pu of a parking slot by a u k in a second price auction model has been assumed to be equal to the valuation V ρ h . In a first-price auction model, users do not reveal they are true price. So, a bid b pu of a u k , which is less than valuation V ρ h has been randomly selected. The simulation results in the first pricing model have been averaged over multiple iterations. A profit rate of 15% over the r p has been assumed for determining the price in simulating a fixed price model. The prices for a parking slot in a first-price and second-price auction model have been determined based on the auction allocation scheme. A user with the highest bid is allocated a parking slot with the highest r p in the auction allocation scheme. In a second price auction model, the price P rice r of a parking space is the second-highest bid. In the first-price auction model, the price P rice r of the parking space is the bid's value.

3) Evaluation of profit based on different auction models
Profit for a u k can be defined as follows • Profit for the user P r u k = 0, if a user is not allocated a parking slot. • Profit for the user P r u k = V ρ h -P rice r , if user is allocated a parking slot. where P rice r is the price of the r th , parking slot allocated based on the different models. Profit for users is relatively less when they are quoted a price closer to their valuations. As auction-based models help reflect consumer demand at a time, thus it helps in driving the prices up, which are closer to the users' valuation. As the second price auction model is a revealing demand mode, the bids in a second price auction model are closer to the users' valuation. Therefore, driving the prices of the parking slots high, the net profit for all users is the least in the second price auction model.
Profit for parking slot owners: Profit for a r th parking slot can be defined as follows • Profit for r th parking slot P r ϱo = 0, if the parking slot is not allocated to a user. • Profit for r th parking slot P r ϱo = P rice r − rp r , if user is allocated a parking slot where P rice r is the price of the r th parking slot allocated based on the different models, higher prices help increase the net profit for parking slot owners. As the prices go high in a second-price auction model, parking slot owners have the highest net profit. As discussed in the previous scenario, the auction-based models help drive the prices up, thus reducing the profit for users. It helps transfer the profit from the users to the owners of the parking slots. As the profit for users is least in the second price auction model, the net profit for parking owners is highest according to the second price auction model.

4) Revenue
Revenue can be defined as follows: • Revenue = P rice r * x • x = 0, if r th parking slot is not allocated. • x = 1, if the r th parking slot is allocated to a user. where P rice r is the price of the r th parking slot allocated based on the different models. As the prices of the allocated parking slots increase, the system's total revenue increases. As previously mentioned, the prices are higher in a second price model. Thus, it has the highest revenue among all the auction models.

5) Confidence Interval for First Price
The first price auction model has calculated the parameters, i.e., revenue and profit. As in a first-price auction model, the bids submitted by the users are not equal to true bids, i.e., true valuations V ρ h . So, we have randomly generated bids for the users corresponding to the valuations. The

6) Scalability
The usage of IPFS with the blockchain-based proposed scheme proves to be cost-efficient for the users and parking slot owners involved in the system. FIGURE 7 distinguishes between the proposed scheme with IPFS and blockchain data storage in terms of scalability. It can be perceived from the graph that the scalability of the proposed scheme with IPFS tends to provide more efficient data storage than the usage of blockchain as the number of transactions increases. However, the graph shows that the scalability seems to be in the same alignment due to the involvement of a lesser number of transactions between users and parking slot owners for both the data storage.

7) Computation time
This section discusses the computation time of the proposed scheme to store and retrieve parking allocation data of users and parking slot owners from the blockchain. Foremost, the computation time of uploading the data in the blockchain directly after authentication with a smart contract can be determined in 80ms (27). However, the computation time for users and parking slot owners involved to upload data to the blockchain with the usage of IPFS can be calculated in 110ms (28). Now, it can be observed that IPFS consumes slightly higher computation time to store data than blockchain due to the involvement of an intermediary storage protocol. However, usage of IPFS protocol with its feature of hash data storage reflects a quite low data retrieval time than blockchain, which is being discussed further. As data retrieval time of blockchain incorporated with IPFS or without IPFS should be calculated to show the benefits of the low data storage cost protocol. Therefore, the computation time involved in the data retrieval from the blockchain for users and parking slot owners can be determined as 6 * 10 5 ms (29), with the help of the SHA-256 algorithm. On the other hand, the computation time of the data retrieval from blockchain through an intermediary IPFS is computed as 75ms (27), which seems to be quite improved and low than the traditional schemes with blockchain.

8) Data storage cost
In this section, we have considered the IPFS with the Ethereum blockchain to obtain the efficient data storage cost VOLUME 4, 2016 so that users and parking slot owners can access the IPFS for data storage after validation with the smart contract. The cost associated with the blockchain to store data is somewhat high, making the system unfavorable for the users and parking slot owners. We can find the cost of blockchain with the help of the gas price of a single word of 256 bits. The gas price for the single word and 1KB of data can be computed as: 1wd = 20, 000 Gas(G s = 20K) G KB = (2 10 /256) * 20, 000 Gas Furthermore, cost (Cos P ) for data storage of P number of word in blockchain can be determined with the parameters standard gas price (Gs pr ) and Ethereum price (Et pr ) which are 23.186 gwei and 232.96 USD. The cost for P words can be calculated considering the two : 1E t = 10 9 gwei and Exp = (p * G s )/10 9 Therefore, the computation of cost (data storage of P words in USD) can be written as follows: Cos P U S = (Gs pr * Cos P ) * Et pr (16) Finally, it can be concluded that blockchain incurs high data storage costs than incorporated IPFS with the blockchain. Therefore, the blockchain-based proposed scheme with the IPFS tends to cost optimization for users and parking slot owners' data storage (30).

B. SECURITY VERIFICATION OF THE PADAAV
In this section, the smartcheck security tool has been used for security analysis of the smart contracts designed for the PADaaV. We have implemented the source code from the Ethereum platform to detect the security-related issues in the PADaaV. FIGURE 8b depicts how the smartcheck tool verifies that the source code of the PADaaV does not contain any threat or vulnerability. But, smartcheck tool generates one severity in the source code by default as depicted in the FIGURE 8a (31). We have removed that identified severity from the source code as depicted in FIGURE 8b.

V. CONCLUSION
In this paper, a blockchain-based parking price prediction scheme, PADaaV, is proposed for sustainable traffic management. First, we explored the traditional systems with or without blockchain to get insights into their security, privacy, and optimized parking price issues. Then, we employ the second price auction model to predict the optimized price for users to reserve a parking slot conveniently and parking slot owners can also benefit from it. We have performed the security analysis of the PADaaV by implementing source code on Remix IDE using a smart contract. Finally, the performance of the PADaaV has been evaluated in terms of profit for users, profit for parking slot owners, and overall revenue of the system considering different auction models and blockchainbased results in terms of scalability, computation time, and data storage cost.Results show that the proposed scheme is more secure, cost-efficient, and beneficial for users and parking slot owners than the traditional schemes.
In the future, we will explore the scenario in which multiple bidders bid the same amount simultaneously to reserve the parking slot with the optimized price using gametheoretical aspects.