- Open Access
- Authors : Sarvesh Wadi , Mrunal Shidore , Malhar Surangalikar , Devarshi Talewar, Vedant Savalajkar
- Paper ID : IJERTV11IS090045
- Volume & Issue : Volume 11, Issue 09 (September 2022)
- Published (First Online): 19-09-2022
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License: This work is licensed under a Creative Commons Attribution 4.0 International License
P2P Ride-Sharing using Blockchain Technology
Sarvesh Wadi, Mrunal Shidore, Malhar Surangalikar, Devarshi Talewar, Vedant Savalajkar
Department of Electronics and Telecommunication Engineering
Abstract:- Ride-sharing is a service that allows drivers to share trips with other riders, which contributes to the enticing benefits of shared travel costs and traffic congestion. Peer-to- Peer ridesharing technology deploys blockchain to deal with the problems faced by traditional centralized ride-sharing applications. Blockchain is a blooming technology and decentralization of systems can be powered by it. Proposed ride sharing system will be deployed on blockchain and will be decentralized in a true sense. This application allows drivers to provide ride-sharing services without relying on a third party. This paper focuses on developing a peer-to-peer hassle- free, less error prone ride-sharing application powered by blockchain technology.
Keywords:- Blockchain, Android, Peer-to-Peer, Decentralization, Ridesharing, Smart Contracts
Ride-sharing services have gained in popularity as a viable means of transportation in recent years. Services that enable consumers to make better use of their personal vehicles. A ride-sharing driver shares his ride with other passengers. Individuals can benefit from ride sharing in a variety of ways as well as the community as a whole, including increased occupancy rates, splitting trip expenses, extending social circles, and lowering both fuel usage and pollution. Many companies, such as Flinc, UberPool, Ola and others, provide online ridesharing services all over the world.
Cab service aggregators carry out their day-to-day activities using a centralized technology.Furthermore, the payment process for cab bookings is handled by mediators or third- party businesses. With more parties engaged, this becomes a problem since a lack of transparency emerges.
Most of the existing ride sharing applications like Uber, Ola deploy centralized 3rd party based systems to provide ride sharing services to customers. The problem with these traditional ride sharing systems is the centralization of data which could at times lead to failure of the whole system if server failure is encountered. Moreover, Centralized systems have a single point of corruption, single point of failure and are fragile in nature when compared with decentralized systems.
Fig 1. Features of a decentralized system
Above Figure 1 elaborates the features and characteristics of a decentralized system and depicts its merits over traditional centralized systems.
In decentralized ridesharing apps, passengers can examine how a ride-sharing business works because of blockchain's ability to create accountability. Smart contracts empower stakeholders to use blockchain-enabled peer-to-peer renting of autos for two parties actually involved based on predetermined essential requirements. As a consequence, it consistently supplies proper prices, and the system develops confidence and transparency.
Peer to Peer technology is a decentralized platform wherein individual peers can directly interact with each other without any 3rd party handling the transfer data, this is a lot beneficial in terms of security concerns of the systems. Since transactions happen peer to peer, they cannot be controlled or manipulated by 3rd party clients or even the developers that established the system in the first place. Now Blockchain comes into picture to help deploy Peer to Peer technology, making it decentralized, making it more secure and more immune to cyber attacks which are becoming a big concern to modern day technologies because of the frequency and impact of these kinds of attacks.
With the publishing of the Bitcoin whitepaper in 2008, blockchain became popular . Aside from cryptocurrencies, blockchain technology has been critical in enabling a variety of applications such as supply-chain management, financial technologies, healthcare, data sharing, and the Internet of Things (loT), to mention a few. It has transformed the sharing economy with apps such as Filecoin , music and other digital assets . Blockchain could be used to create a safe, trustworthy, and decentralized autonomous ITS environment, allowing for improved use of legacy ITS infrastructure and resources, which is especially useful for crowdsourcing technology .
An Android application that will enable users to know if vehicles are available for carpooling in their desired path and allow them to sign in for it . Allowing drivers to provide ride-sharing services without the use of a third party . The relevance of blockchain systems for development of dApps was determined through a survey cited in . The use of smart contracts to build a sustainable application which can help in the field of logistics is explained in . The survey on advantages and challenges of using decentralized apps and centralized applications is explained in . As a reason, a decentralized platform, such as the blockchain solution, is considered as one of the best solutions available. We focused on the usage of blockchain in the sector of vehicle sharing in this paper. This was highlighted as one of
the major blockchain applications that might emerge in the future by .
It is evident that blockchain is an emerging secure robust manipulation-free technology that would help in the development of modern robust and more secure systems. A ride-sharing peer-to-peer application that handles the economic power to drivers and riders to create a manipulation free market could be developed using blockchain technologies.
The proposed system comprises 2 software aspects viz. Blockchain development and Android development. Following is the list of softwares, libraries, dependencies and APIs used to develop the proposed system
Android Studio 3.8
Android Studio is an App Development IDE and in this project it is used for developing native android applications.
Google Maps/Directions API
Google Maps API provides the app a map fragment. Google Directions API is used to parse directions between 2 points on a map.
3. Node v16.13.1
Ganache is a software that hosts a personal ethereum based blockchain.
It is a development environment used to write smart contracts and is based on Ethereum Virtual Machine(EVM)
Solidity is language for implementing smart contracts.
Fig 2. The proposed diagram of P2P ride-sharing system
Flowchart in figure 2 explains the workflow of the proposed blockchain based ridesharing system. The application software cycle starts with users creating a rideshare request and follows till the rider again approves one of the drivers requests and finally data is shared between these users.
The Android Application consists of multiple classes activities to support the functionality of the project as a whole.Most of the existing ride sharing applications like Uber, Ola deploy centralized 3rd party based systems to provide ride sharing services to customers.
Login and Registration service is deployed with a simple User interface and google firebase authentication service is used at the backend to store and authorize login credentials of the users.
A map fragment is added on the ma activity and extends GoogleApiClient, LocationListener, ConnectionCallbacks, OnConnectionFailedListener, OnMapReadyCallback classes to implement basic map functionalities viz. Enabling user location, location markers, map type, etc.
The front end of the application is defined in the xml file where it consists of login/registration, selection activity, map fragment, search bar, drawer for requesting rides, drawer for ride approvals.
To set up the map API we have implemented GoogleApiClient on main Activity.Map fragment, which is configured by OnMapReady method.Where we can perform tasks like padding; adding listener for onMapLongclick, onMarkerClick; building GoogleApiClient, setting current location of user, etc.
In Manifest, access to the internet, course and fine location is granted. Location Listeners' method viz. onLocationChanged,onConnected,onConnectionSuspended
,onConnectionFailed are implemented and location Request object is initialized in onLocationChange method to get current location.
In Main Activity Search Bars onQueryTextListner is set to feed the latlng of searched address as destination to the direction parser class.Geocoder object is created and geocoder.getFromLocationName is implemented to get latlng of destination. When a query is fed to the search bar, the most relevant location on the map is fed and displayed as a marker on the map, thus a polyline is displayed between users location and destination and this coordinate data along with the other data entities is fed to rider requests and sent on the blockchain network.
Public class TaskRequestDirections which is an AsyncTask is created to create a response string which acts as a URL to be sent to directions API to parse polyline for directions. Public Class Task Parser parses the polyline received from Directions API through the object of class DirectionParser.java whose sole work is the build polyline on map from input params.
Fig. 3: Illustration of data exchange in blockchain and time flow of request approvals
Above figure 3 illustrates the flow of drivers and riders data in blockchain transactions. The flow is completed in 3 steps which in turn approves a ride request and connects riders and drivers. Rider publishes a request by sending user data, travel route information onto a blockchain transaction.
Drivers send their data, location coordinates onto a new blockchain transaction. Rider then receives driver data and approves this request which is again fed to blockchain.
A private blockchain network is deployed on ganache, truffle v5.0.2 environment is used for coding in solidity v0.5.0 and scripting smart contracts. The procedure followed here is to create a transaction on the rider end through a function call, createRequests which has the rider data, location, destination as params.
This data is fed to blockchain as a transaction through smart contract wherein this rider data is stored in the format of structure. Now this request is made visible at the driver application end, the driver approves the request through the approval drawer, which in turn calls a function approveRequest which has driver data, location, vehicle license no, rider id, fare as params.
This data is again fed to the blockchain as a transaction and returned to the rider, now the rider has the driver data and other information regarding the trip.
Fig 4. Visualization of Decentralized Ride Sharing System
Figure 4 depicts a peer to peer network of riders and drivers in an area connected by a blockchain.
Thus the proposed android application is made to talk with blockchain through transactions and users data is shared with each other through this process. A secure robust way of ridesharing is established by integrating these modern technologies.
RESULTS AND DISCUSSION
Existing ride-sharing services, while functional and popular, can be improved in proper pricing models, increased security, transaction transparency, and data security. Riders may communicate directly with drivers via the blockchain's decentralized network, minimizing the need for extra fees.
People with a smartphone and safe contemporary automobiles have greater market opportunities since there are no intermediaries. The system proposed in this paper has tried to accomplish all of these.
The resulting android application handles user ride sharing requests and pairs them with other drivers in the vicinity. Users can get paired with their peers through the matchmaking that the application provides which is deployed over a blockchain.The system which is deployed over android platform is very user friendly and users can book rides easily, securely and as quickly as possible.
Fig 5. Selection Activity
The above image 5 illustrates selection activity wherein the user needs to select designation from the provided options. Users are directed to login/register pages where they can log into their accounts. Accounts are created and saved to keep a track of users data and ride-share history.
Fig 6. Map/Main Activity with Snackbar for input
The above figure 6 displays the map fragment wherein the user can input source & destination. Users data, lat/lng of source destination are sent to the blockchain and recorded as
a transaction this data is made visible to drivers in the vicinity who approve or deny the users requests.
Fig 7. Searching a driver for the user inputted route
In figure 7, Application shows the user a snackbar notifying them that the request is being processed and when approved by any driver near them, drivers details would be displayed on their application.
The scalability of the system needs to be taken into consideration, in the alpha phase a set of customers requests can be handled but with increasing traffic on the application many of the params need to be modified dynamically except the blockchain which itself is scalable and dynamic in nature and in core of the proposed solution. Many more application features can be deployed in beta release where the app implements a reasonable price suggesting algorithm so the user can get insight into the price range and compare it with what the drivers are suggesting.
The following could also be looked into in future i) To investigate the technology from the standpoint of data processing because blockchain technology is a trustless system that allows users to trust data. Although blockchain technology improves overall quality of data, it is critical to understand data processing capabilities when connecting the blockchain with a broader software system. ii) Examine data processing demands on blockchain platforms.
The major goal of this paper was to investigate Blockchain, a revolutionary technology. This article proposed a blockchain-based ridesharing service architecture that is decentralized and peer-to-peer. A decentralized application
is developed to support this ride-sharing system. This DApp makes use of Ethereum, a permissionless public blockchain, and cryptographic protocols to automate network transactions and data sharing.
To summarize, blockchain might be used to build a system that stores digitally encoded smart contracts in transparent and decentralized databases. Any of these databases are meant to have mutable data.
The system proposed in the paper attempted to decentralize ridesharing services and succeeded to do so to an extent. Advantages of decentralized platforms over centralized ones were achieved by doing so. The deployed P2P Android Application provides ride sharing services in a similar way like the prevailing company services provides to its user base if looked at in a superficial manner, interface and user experience is maintained on the same level as of the traditional ridesharing services whereas the core of the system is decentralized.
Users can request for a shared ride or share a ride with others hassle free though the proposed plaform and thus the problem statement that we began with was addressed and solved in a secure , manipulation-free, resilient, non- susceptible to crashes and very user friendly way.
VII.REFERENCES V. Buterin. Ethereum, April 2014  S. Nakamoto, "Bitcoin: A peer-to-peer electronic cash system", January 2008SSRN Electronic Journal.  T. Report, "Filecoin: A cryptocurrency operated file storage network."  MovieBloc, "Decentralized Movie & Content Distribution ", White PaperVer. 1.14 / APR. 2019.  Yong Yuan, Fei-Yue Wang, "Towards blockchain-based intelligent transportation systems" , 2016 IEEE 19th International Conference on Intelligent Transportation Systems (ITSC).  Surbhi Dhar, Sandra Arun, Vivek Dubey, Nilesh Kulal, App for Ride Sharing,International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 07 Issue: 03,
Mar 2020. M. Baza, N. Lasla, M. M. Mahmoud ,G. Srivastava, M. Abdallah, "B-Ride: Ride Sharing with Privacy-preservation, Trust and Fair Payment atop Public Blockchain", IEEE Transactions on Network Science and Engineering.  Cai W., Wang Z., Ernst J. B., Hong Z., Feng C., Leung V. C. M. , "Decentralized Applications: The Blockchain-Empowered Software System, IEEE Access.  Panayiotis Christodoulou, Klitos Christodoulou, Andreou Andreas, "A Decentralized Application for Logistics: Using Blockchain in Real-World Applications", 2018 Cyprus Review, 30(2), 181-193.  David Schuff, Robert St Louis, "Centralization vs. Decentralization of Application Software", Communications of the ACM, June 2001, Vol. 44 No. 6, Pages 88-94.  A. Dorri, M. Steger, S. S. Kanhere, and R. Jurdak, "Blockchain: A distributed solution to automotive security and privacy", IEEE Communications Magazine, vol. 55, no. 12, pp. 119-125,2017.