Due to the cheap price and decent performance of used cars, the second-hand vehicle market is quite active in Taiwan. However, the vehicle information in the market of second-hand vehicles is centralized at present. In other words, the vehicle information is still provided by the second-hand vehicle dealers, which are not transparent and have no tampering cost. As the result, the authenticity, accuracy, and fairness of these second-hand vehicle data are worth discussing. To solve the above problems, this paper proposed a trusted vehicle data source system based on blockchain technology. The system is built on the Ethereum platform with the private chain structure. With the help of our platform, a trusted third party (e.g., maintenance plant and government branch) can record vehicle information into Blockchain so the integrity of vehicle information can be maintained. Customers can easily query the relevant vehicle information through our system interface and avoid receiving fake vehicle information. This system is a Proof of Concept (PoC), and the feasibility is examined by evaluating transactions per second (TPS) of the proposed system.
The second-hand vehicle market is quite active in Taiwan. The reason is that although the second-hand vehicles are relatively old, they still maintain good performance due to the technological advancement of the automobile industry. Coupled with their relatively inexpensive price, many people will still consider used vehicle when purchasing a car. According to statistics from the Ministry of Transportation and Communications, Taiwan, there are about 600,000 transactions of vehicles a year in Taiwan’s second-hand vehicle market [
Blockchain technology is a novel way to manage data. Due to its characteristics, a group of people (nodes) can work together to store, manage, and protect the blockchain without anyone trusting anyone, thereby eliminating the possible adverse consequences of centralized data control by third party. Moreover, each node would replicate the whole blockchain data through peer-to-peer networks, and so the information can hardly be destroyed. Therefore, we believe that blockchain technology can be applied to record the condition of second-hand vehicles.
This paper uses the blockchain architecture provided by Ethereum [
The first successful blockchain application is Bitcoin [ Transparency: The data on the blockchain is public and can be read by anyone; so, the record and flow of each transaction can be easily queried Decentralization: Bitcoin does not depend on additional third party to control the transactions. Each node in the Bitcoin network realizes verification, transmission, and management of transactions Tamper proof: Each block will contain the hash value of the previous block. Therefore, if someone tries to modify the data in the block, it will be immediately detected and rejected by other nodes, and so the blockchain cannot be tampered with
The evolution of blockchain mechanism begins with trading of cryptocurrency, then gradually expands to the application of smart contract [ Smart contract: The smart contract featured in Ethereum is written by a programming language called Solidity [ Decentralized Application (DApp): DApp is defined as an application running on a Peer-To-Peer (P2P) network. In this network, every computer has the same status and same data and can execute the code of DApp, which giving DApp, following advantages
DApp running in the network will not be interrupted as long as there is at least one computer running in the P2P network When DApp is deployed in the blockchain network, the data stored in the block cannot be tampered with, even those who wrote and deployed DApp
Ethereum smart contract execution flow.
In this paper, our vehicle condition recording system belongs to nonfinancial DApp, because the system does not involve the trading of vehicles.
Consensus is a mechanism to ensure that all the transactions occurring on the blockchain are genuine. It is often achieved by the contribution of other participants in the chain network. Below are three common types of consensus.
PoW is the consensus mechanism used by Bitcoin and some other popular cryptocurrency networks. It requires participant nodes to solve a compute-intensive problem to receive the right to add new transactions to the blockchain. The participants who try to solve the problem are commonly called “miners” since they can get Bitcoins by verifying the blocks. However, this whole mining mechanism of Bitcoin needs high energy consumption and longer processing time.
PoS is another common consensus algorithm that serves as a low-energy consuming alternative to the PoW algorithm. Its algorithm is simple, and the node that has more cryptocurrency has more chance to verify transactions. The hypothesis behind this mechanism is that the node will have more motivation to maintain the genuineness of the system if they have more property on the chain. Since PoS does not include solving compute-intensive problems, it can significantly reduce the computing power than PoW. However, the scalability of transaction verification is still not improved in PoS.
PoA is a consensus algorithm proposed in 2017 by Ethereum cofounder and former CTO Gavin Wood. It introduces a practical solution for scale-up blockchain networks. Its concept is similar to PoS, but instead of using the number of cryptocurrencies, PoA decides the right of verifying transactions by nodes’ reputation. In other words, transactions are verified by nodes that are selected as trustworthy entities. Since there are only a limited number of block validators, it makes PoA a highly scalable system. The PoA model enables companies to maintain their privacy while availing the benefits of blockchain technology. Microsoft Azure is an example where the PoA is being implemented.
At the present time, two types of blockchain are considered base on their publicity:
Public chains are open to anyone in the world and can be accessed, sent, received, and authenticated by anyone. It is a blockchain in which everyone can participate in a consensus process; thus, public chains are usually considered to be completely decentralized. However, the transaction on public chain is slow to update and iterate, and the initial set-up cost is very high if a developer wants to build his own chain with the current technology development framework [
A private chain is a completely private blockchain. Its write access is restricted to one organization. Access rights are either open to the public or restricted to a certain extent. The entire network is jointly maintained by the member organizations, and access to the network is generally through the member organizations’ gateway nodes. With the consensus process controlled by preselected nodes, this type of blockchain is considered to be partially decentralized. However, at the expense of partial decentralization, private chains have characteristic of fast transaction, privacy-protecting, and having very low transaction costs and low set-up costs [
There are lots of DApps that have been developed since the emergence of blockchain [
In [
Another research [
Comparison between the proposed system and EGCC.
The proposed system | EGCC | |
---|---|---|
Blockchain platform | Ethereum private chain | Engine Chain |
Query fee | Free for query | Purchase for unlocking information |
Record permission | Trusted third party | Registered user |
Consensus algorithm | PoA | VDPoS |
Therefore, in this paper, we use blockchain technology to achieve the purpose that vehicle condition information cannot be tampered with, so as to help customers to have authentic information of vehicles for reference when choosing second-hand vehicles.
Our system is designed according to the following three main goals.
Transparency of vehicle condition information: Our system is based on the PoA consensus of Ethereum so that the condition information of vehicles can be stored on the private blockchain of Ethereum by specific users, and the information recorded on Blockchain is transparent to everyone in this private network Access control of smart contract and tamper proof of blockchain information: Because our system must rely on the help of some specific users (e.g., government branch and maintenance plant) to record or update the information of vehicle condition to change the state of smart contract, we must only allow these specific users to update the state of smart contract; so, we use the conditional branch in a smart contract to judge whether the transaction sender has the permission to change the state or not, so as to achieve the access control of the smart contract User friendly of operation: We also design a web user interface (UI) for the system. Each user can use the web page to interact with the contract function to record or update the information of vehicle condition without having any background knowledge of smart contract. We design different web UI for users depending on each user’s identity to record or read different information on the contract
There are many roles in the proposed system (Figure Vehicle manufacturer: For vehicle manufacturers, the only function provided is the deployment of new contracts to the blockchain. After a manufacturer completes a car build, they can use the proposed system to deploy a smart contract that contains initial information about the vehicle. Initial information includes car model, year of release, mileage, and engine capacity. Maintenance plant: The maintenance plant can use the functions of the proposed system to record the maintenance history of vehicles. A maintenance record includes two types of information, one is the maintenance time, and another is the maintenance description. For instance, the maintenance plant can record the mileage of the vehicle to prevent customers from suffering from odometer fraud. In addition, before recording the information to blockchain, the owner ID of the vehicle is needed. Since the owner ID is a secret from the vehicle owner, this approach ensures that the maintenance plant can only record vehicle information with the vehicle owner’s consent Government branch: The government branch can use the proposed system to record information. First, the Motor Vehicles Office, the government branch that is in charge of vehicles in Taiwan, can update the ownership history when the owner of a vehicle is changed. This information can make customers go through the ownership history of a vehicle and bring it into assessment. Motor Vehicles Office also has the permission to maintain the mapping table which maps the Vehicle Identification Number (VIN) to its Owner ID and only they can maintain this table. VIN is like an ID card number of a vehicle; thus, each vehicle has a different VIN. Second, when dealing with a traffic accident, the traffic police can record the time of the accident by our system, and this allows customers to understand the accident history of a vehicle and prevents them from buying an accident car. Third, when a vehicle is scrapped, the contract which represents the vehicle needs to be destructed by triggering the self-destruct function in the contract. Only Motor Vehicles Office has the permission to trigger the function Customer: Customers can use our system to query about the information of vehicles, including initial information, accident history, and maintenance records. Customers can simply enter the VIN of the vehicle and the token acquired from a second-hand vehicle dealer on the web page to query the information of the vehicle. Besides, when a general user wants to query the information of his vehicle, he can just input the VIN and owner ID to get his vehicle information rather than input a token. Customers do not need to have an account to query about the information of vehicles, as long as the customer inputs the correct token or owner ID, and he has the permission to read the information from blockchain. Moreover, they do not have the permission to change the state of smart contracts Second-hand vehicle dealer: The second-hand vehicle dealer in the proposed system do not have the permission to record or update the information of vehicles. They are only responsible for generating a query token for the customer who wants to query the vehicle information. After inputting this token by the customer, our system will verify the token. If it is valid, then the system will return the vehicle information Authority node: As mentioned before, our system is based on the PoA consensus of Ethereum blockchain called Clique. Different from the PoW consensus, there has no miner in the PoA network. The accounting right of blocks is handled by predefined authority nodes. By using the PoA consensus Clique, transactions can be verified and accounted into the new block by the authority nodes without costing any fee
System model.
In our design, the vehicle manufacturer is responsible for pushing the initial information of each vehicle to each contract, including car model, released year, mileage, and engine capacity. After the sale of the vehicle, the government branch (Motor Vehicles Office) needs to update the ownership history and change the owner ID of the vehicle on the contract. When using the vehicle, every using data that includes accident history, maintenance history, and mileage will be recorded or updated in the contract by the government branch and maintenance plant, respectively. When the owner of the vehicle sells the car to a second-hand vehicle dealer, Motor Vehicles Office also needs to update the ownership history. Customers can use our system to query the information of each vehicle by a valid token at any time in the life cycle of each vehicle until the vehicle is scrapped. When the vehicle is scrapped, the contract that represents the vehicle is also destructed by the self-destruct function of the contract (Figure
The life cycle of a vehicle in our system.
In this chapter, we will focus on the details of the proposed system, including a full description of each function and the user interface of the system. In the first section, we explain the structure of the system and what software and tools are used. In the second section, we describe the functions of the proposed system in detail.
The proposed system is performed on a private blockchain environment using Go-Ethereum (Geth) [ Private chain setup: Puppeth [
In the configuration, we create different nodes for different identities of participants in the proposed system including vehicle manufacture, maintenance plant, and government branch for account management. In addition to the above nodes, three authority nodes are set up for system simulation.
User interface (UI): The UI of the proposed system is a web page. The server side is constructed by the http- server suite provided by Node.js [
The system structure is shown in the following figure (Figure
The overview of the proposed system structure.
Log-in process: Since there are different roles of users in the proposed system, each user must choose which role to log in. Every user’s account is connected to the accounts in Geth nodes. Different roles lead to connect to different Geth nodes. Because of the serial number of the account list in the Geth node, users can just input the serial number as the account number instead of inputting the account address (Figure Operation of customer: Because of avoiding anyone that can query the vehicle information without any permission, the customer needs to input a token which is generated by second-hand vehicle dealer for token authentication. After passing the authentication, the customer can get the information of the vehicle. For the authentication purpose, we keep an array in smart contract to record these valid tokens for authentication. The customer needs to input the VIN of the vehicle and a token generated by a second-hand vehicle dealer to query its information. We use a smart contract to keep a mapping table to store each VIN and corresponding contract address; thus, the customers do not need to input complicated contract address string. Our system provides information query function in smart contract which can return car model, released year, engine capacity, mileage, ownership history, accident history, maintenance history, and so on Operation of vehicle nanufacturer: In the proposed system, the vehicle manufacturer is responsible for deploying a new contract that represents a vehicle. After logging in the system, the vehicle manufacturer can input the initial information of the vehicle and deploy the contract (Figure Operation of maintenance plant: The maintenance plant in our system is responsible for recording maintenance history and mileage of vehicles. Before recording the information, our system will require that the maintenance plant should input the owner ID of the vehicle at first. If the owner ID is correct, then they can start recording the vehicle information. We use the mapping table
The log-in process of the proposed system.
The code of deploying a contract.
When recording the information, the program in smart contract will check whether the role of the transaction sender is the maintenance plant that exists in the account list of the node. If the identity of the transaction sender is authentic, the program will append the time and the description of maintenance history to the Struct array Operation of government branch: The operation of the government branch is similar to maintenance plant. For the ownership history, the program in smart contract which is triggered by Motor Vehicles Office will update the ownership number when the owner of the vehicle is changed. Motor Vehicles Office is also responsible for maintaining the mapping table
For the accident history, the program in smart contract which is triggered by police will append the time of the accident to the String array Operation of second-Hand vehicle dealer: The second-hand vehicle dealer does not have the permission to record or update the information of vehicles. They are only responsible for generating a query token for the customer who wants to query the vehicle information. For the token generation, our system concatenates the password of the second-hand vehicle dealer and current time as the input string and output the hash value (token). Then, the dealer will write this token into an array in the smart contract
Every token generated by a second-hand vehicle dealer has its lifetime. The proposed system will delete it by sending a transaction to delete the token in three minutes after its generation. This ensures that every token is timeliness and difficult to reuse (Figure
The operation of second-hand vehicle dealer.
The analysis is performed on a PoA private Blockchain development based on the Ethereum platform, using Go-Ethereum (Geth) client implementation. Since there is no fee for sending transactions in a private Blockchain environment, we focus on the throughput of transactions. The proposed system is feasible only if the throughput of transactions is greater than the daily transactions.
Ethereum platform prevents transaction spamming and rewards block miners by charging a gas fee on transactions. There are three important concepts in the Ethereum gas mechanism, gas, gas price, and gas limit.
Gas: Each bytecode instruction in the EVM execution process requires a corresponding amount of gas, and the more complex the logic, the more gas is required. The table of gas spend to corresponding bytecode is defined in Ethereum yellow paper [ Gas price: Gas price means how much you are willing to pay for each gas, in unit Gwei, which equals to 10-9 Ether, the basic unit of coin in Ethereum Gas limit: The gas limit is the maximum amount of gas you are willing to buy for the transaction. The reason for the gas limit is that no one knows how much gas will be used in the execution of a smart contract until it is actually executed, and so the gas limit is meant to cap the fee for each executed smart contract
Transactions per second (TPS) is a common criterion to evaluate how fast can a transaction be verified on the blockchain. The theoretical maximum TPS can be calculated using the following equation [
The gas limit and the block time could be set as a configuration parameter. We set the gas limit to 8,000,000 gas by default configuration in the proposed system, which is the same as the gas limit of Ethereum main network [
We test the throughput using different block times, 5 s, 10s, and 15 s, respectively. For the gas cost of each transaction, we use Remix [
The TPS of each function execution using
Function description | Transaction cost | TPS | Transactions per day |
---|---|---|---|
Deploy the contract | 2,738,400 | 0.58 | 50,482 |
Record the accident time | 63,522 | 25.18 | 2,176,253 |
Record the maintenance history | 88,448 | 18.08 | 1,562,952 |
Update the mileage | 27,897 | 57.35 | 4,955,371 |
Update the ownership history | 41,814 | 38.26 | 3,306,069 |
Average (without deploy contract) | 55,420 | 34.71 | 3,000,161 |
The TPS of each function execution using
Function description | Transaction cost | TPS | Transactions per day |
---|---|---|---|
Deploy the contract | 2,738,400 | 0.29 | 25,241 |
Record the accident time | 63,522 | 12.59 | 1,088,126 |
Record the maintenance history | 88,448 | 9.04 | 781,476 |
Update the mileage | 27,897 | 28.67 | 2,477,685 |
Update the ownership history | 41,814 | 19.13 | 1,653,034 |
Average (without deploy contract) | 55,420 | 17.36 | 1,500,080 |
According to Tables
The TPS of each function execution using
Function description | Transaction cost | TPS | Transactions per day |
---|---|---|---|
Deploy the contract | 2,738,400 | 0.19 | 16,827 |
Record the accident time | 63,522 | 8.39 | 725,417 |
Record the maintenance history | 88,448 | 6.03 | 520,984 |
Update the mileage | 27,897 | 19.12 | 1,651,790 |
Update the ownership history | 41,814 | 12.75 | 1,102,023 |
Average (without deploy contract) | 55,420 | 11.57 | 1,000,054 |
This paper’s implementation relies on the existing platform (Ethereum). Thus, the functionality is restricted by the functions their system provides. In addition, this paper’s method is a proof of concept; thus, it might still have problems when it runs online, such as how to choose a proper trusted third party to record the chain. Also, PoS is not a fully centralize consensus algorithm; thus, it is not as decentralized as Bitcoin which uses PoW. However, it still could avoid second-hand traders hold car information by themselves. So, it is still could solve this problem.
This paper builds a trusted vehicle data source system based on blockchain technology. With the help of trusted third parties to record vehicle information to our platform instantly, customers no longer need to worry about the problem of getting untrustworthy vehicle condition information from second-hand vehicle dealers. Moreover, because of the property of blockchain, we can ensure that the information of vehicle condition in the system is transparent to everyone and cannot be tampered with.
Vehicle manufacturers can use the system to deploy a smart contract that represents a vehicle. The maintenance plant and government branch can record or update the vehicle condition information by using the proposed system. Customers can easily query the relevant vehicle information through the system interface. All of the above operations can be done without costing any fee.
In the evaluation of the proposed system, the result shows that the transaction throughput is enough for daily transactions.
The code implementation used to support the findings of this study were supplied by Hung-Min Sun under license and so cannot be made freely available. Requests for access to these data should be made to Hung-Min Sun:
The authors declare that there is no conflict of interest regarding the publication of this paper.
This study was funded by the Ministry of Science and Technology, Taiwan [grant numbers MOST 106-2221-E-007-026-MY3, MOST 107-2221-E-007-015-MY3, and MOST 108-2218-E-001-001].