0% found this document useful (0 votes)
173 views4 pages

Decentralised Ride Sharing System

The ride sharing system is a centralized system where customers depend on the service providers for the setup, tracking, cancellation, fare calculation etc., of the rides.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views4 pages

Decentralised Ride Sharing System

The ride sharing system is a centralized system where customers depend on the service providers for the setup, tracking, cancellation, fare calculation etc., of the rides.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Volume 6, Issue 6, June – 2021 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165

Decentralised Ride Sharing System


Rahul Kumar Shivangi Balodia
Department of Computer Science and Engineering Department of Computer Science and Engineering
B.M.S College of Engineering B.M.S College of Engineering
Bangalore, India Bangalore, India

Rounak Kumar Kedia Sai Dileep Suvvari


Department of Computer Science and Engineering Department of Computer Science and Engineering
B.M.S College of Engineering B.M.S College of Engineering
Bangalore, India Bangalore, India

Dr Gowrishankar
Professor
Department of Computer Science and Engineering
B.M.S College of Engineering
Bangalore, India

Abstract:- The ride sharing system is a centralized In this paper, we try to implement a new system,
system where customers depend on the service providers inspired by blockchain, for the ride sharing application.
for the setup, tracking, cancellation, fare calculation etc., Blockchain is a shared database that records every
of the rides. Also, the fairness involved in the ride is transaction [1]. Transaction can be as simple as sending
destroyed by any vicious activity in a centralized server- money to someone in the network. In our ride sharing
based system and causes inconvenience to both the application, blockchain helps in achieving decentralization
drivers and riders. Therefore, we have implemented a by letting the drivers and riders connect directly to each other
blockchain application on Ethereum platform which through the app without any involvement of a third party,
decentralizes the system and hence ensures fairness of and implementing all the procedures such as ride set up, fair
the ride. calculation and payment. This makes the whole system
transparent and increases its reliability and fairness.
Keywords:- Ride Sharing; Decentralised; Blockchain;
Fairness; Ethereum. II. LITERATURE SURVEY

I. INTRODUCTION Satoshi Nakamoto is the one who invented the


cryptocurrency Bitcoin and deployed the first digital
In today’s world, transportation should be trust worthy currency [2] and also helped in implementing the first
and convenient for every individual with an efficient system Blockchain. Blockchain is a collection of individual blocks
for public transport. The number of vehicles per person has which are stored as an immutable ledger that helps in
increased drastically over the last few years, all over the maintaining records in a trust less system. By employing a
world, which results in slow traffic movement. So, a solution hash key, each block is connected to the one before it.
to this would be the full utilization of the vehicle’s capacities,
i.e. a vehicle owner shall be encouraged enough to use his After the advent of the first generation blockchain,
vehicle as part of a public transport system. Thus, this would Vitalik Buterin has developed Ethereum that has become the
result in smooth traffic movements and would also somewhat second-largest blockchain next to Satoshi Nakamoto’s
help in reducing the air pollution levels. It would all be Bitcoin [11]. While Bitcoin focused on the development of a
possible if the vehicle owners and riders find the platform system where peer-to-peer digital currency transfer becomes
simple and convenient to use, cost efficient and fair. easy; Ethereum also focused on providing a framework on
which the developers can execute their decentralized
The ride sharing system which currently exists, Applications.
provided by institutions like Uber and Ola, is centralized. It
is a trust-based system which has centralized servers to Giuseppe Antonio Pierro, Roberto Tonelli, and
monitor all the details of every ride. This kind of system Michele Marchesi [3], speak in their paper about how 2nd
appears to be less transparent and has safety concerns related generation blockchain offers the ability to code the smart
to the customer and his information. Centralization leads to contract in a Turing complete programming language which
the systems being questionable; in terms of data integrity and helps developer to write the smart contract using all the
flexibility. tools present in a traditional software system.

IJISRT21JUN916 www.ijisrt.com 1347


Volume 6, Issue 6, June – 2021 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
A smart contract is a program or protocol which is in the network by taking on some responsibility for
immutable and intended to do certain things based on the maintaining the infrastructure.
rules and ways laid out in the contract. These smart
contracts are deployed and stored on a blockchain-based The paper by Panchalika Pal and Sushmita Ruj
platform that is accessible to all. discusses how payment fairness is important when building
a decentralized ride-sharing application [8]. The driver
The above-explained smart contract can be used in a should be guaranteed that he will receive his payment once
variety of use cases where two or more parties are involved. the ride is completed. At the same time, the rider should be
Ridesharing is one such use case where a smart contract ensured that payment will go through only after he confirms
help transacts in a trust less manner between the rider and the completion of the ride.
driver without the help of a central server.
Research of Mohamed Baza, Noureddine Lasla,
We can leverage blockchain technology, existing peer- Mohamed Mahmoud, Gautam Srivastava, and Mohamed
to-peer networks, and smart contracts to eliminate the need Abdallah on making a blockchain-based ride-sharing service
for a middle man (central authority) when the connecting which is known as B-Ride [9] helps in preserving the
riders in need of someone willing to share their ride. privacy and trust between the riders and drivers. A point to
be from this research is that their work is the first which
Blockchain does not eliminate trust but rather integrate ride-sharing services and open blockchains. Their
minimizes it by distributing trust among various nodes main focus is to get rid of the middle man between the riders
rather than just trusting a central server. and drivers and make the use of blockchain and smart
contracts a household name for future ride-sharing services.
Bitcoin in its original state doesn’t support smart
contracts, some other cryptocurrencies working on the same One of their focus in their research is to make sure that
blockchain principle extend support for smart contracts. the transaction between the rider and driver be done in a
trust less and fair manner which can be done with the help
Ethereum is one such blockchain that helps developers of a smart contract that transfers the fare to the driver.
in deploying and executing decentralized applications,
which are coded in Solidity [3]. Such smart contracts are They used their application together with Ethereum
immutable which has both pros and cons. The cons being which is a real-world public blockchain.
that the bugs can’t be fixed once the code has been deployed
and the pros being that the system is immutable and the Sowmya Kudva, Renat Norderhaug, Shahriar Badsha,
rules can’t be changed which ensures trust in the system. Shamik Sengupta, A.S.M. Kayes proposed a system where
users will interact with the fog computing nodes (Road Side
Ref. [4] Noted that the annual congestion cost is Units) that acts as a validator and agent who find and match
around 160 Billion dollars, therefore it is necessary to take drivers with passengers [10]. It also talks about how the gas
steps towards a system where carpooling is more prevalent. fee varies according to the storage required. It cost around
20000 units of gas for every 256 bits of data. Therefore, it is
Ref. [5] noted how centralized ride-hailing platforms important to use as less of space as possible to reduce the
are vulnerable to security risks and sometimes can even fail gas fee per transaction which is eventually paid by the rider
to disclose any data breaches. These platforms are and the driver.
vulnerable to DDOS attacks as they have a single point of
failure. III. APPROACH

In their case study Salam Khanji, Sameer Assaf talks We implement our ride sharing framework using two
in his paper about how the transport sector could heavily peers, driver and rider. Any individual can use the app as a
reduce co2 emissions by using a ride-sharing alternative to driver or a rider at a point of time. The rider can create
each person using private vehicles in places with poor public requests for a ride which reaches all nearby drivers and the
transport infrastructure [6]. The paper quotes the example of ride is confirmed if any of the drivers accepts the ride. The
Jordan where co2 amounts could be reduced by 5% on calculated fare amount is presented to the rider before the
average annually and a cost of around 300 to 450 million ride starts and after the ride is completed, the fare amount is
dollars could be saved in direct and indirect expenses transferred to the driver’s wallet (in ethers). The payment
procedure is handled with the help of smart contracts using
Ryan Shivers, Mohammad Ashiqur Rahmany, and blockchain.
Hossain Shahriarz point out how running a ride-hailing
platform is very costly and has the risk of a single point of The following modules used in the smart contract
failure [7]. The paper also talks about how vehicle owners provide the core functionality of the proposed system and
can benefit from a decentralized application by providing will be called by the client application by both drivers and
services to a large network of users without having to riders at different points of time to facilitate the ride-sharing
depend on a third-party service or having to create an process:
independent application. This helps in providing flexibility.
Blockchain technology helps the vehicle owners participate

IJISRT21JUN916 www.ijisrt.com 1348


Volume 6, Issue 6, June – 2021 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
 Initialize (): this function is used to set/initialize the When the user selects his choice, he is presented with
address of the nodes, i.e. driver and rider. It is also used to basic login functionality. If the user is new, he is supposed to
setup the ride fare amount. register on the application by entering his basic personal
 FundRide (): through this function, ride fare amount from details along with his wallet address. In case of registering as
driver’s wallet is being transferred to the smart contract, a driver the person also has to enter the amount, he would
after the ride has been confirmed and before the ride like to charge per kilometer in rupees which he can update in
starts. his profile from time to time.
 ConfirmRide (): this function is used to confirm if the ride
has actually been completed and the rider has reached its If the user has logged into the application as a rider
destination. then, he is presented with a screen with the map pointing to
 ReleaseFunds (): this function is used to transfer the ride his current location as shown in figure 2(b). The latitude and
fare amount to the driver’s wallet from the smart contract longitude of his current location is updated in the application
after the ride is successfully completed. once the rider click the allow button to detect its
location. Then the rider is supposed to enter the destination
where he seeks to go and search for drivers. This request for
a ride is sent across to all the online drivers who are nearby
the rider’s location. If a driver accepts the request, then the
information is sent to the rider along with the fare details.
The fare for every driver can be different. The amount
charged per km by a driver is multiplied with the total
distance in kilometres between the rider’s current location
and destination to which the rider is going to travel to, this
gives the fare of the ride. After receiving the fare details, the
rider can accept or cancel the ride. Once the rider accepts the
ride details, the initialise () function of the smart contract is
triggered where the driver’s and rider’s wallet address and
fare amounts are initialised in the ledger. Also, the fare
amount is converted into ethers for the transaction.

After the driver reaches rider’s location and starts the


trip for the destination, the fundRide () function of the smart
Fig 1: High level design of the application
contract is invoked. This makes sure that the driver will
receive payment for his service. Through this function, a
These functions are invoked by the client application at
transaction is initiated in the blockchain, in which the ride
different points of time to provide the base ride sharing
fare amount is transferred from the rider’s wallet to the smart
service.
contract.
The application starts with a main screen, where the
When the rider reaches his destination, it is confirmed
user is provided with two choices, to become either a rider or
by the confirmRide () function of the smart contract. After
a driver. the call to the confirmRide () function, when the driver ends
the trip, the releaseFunds () function is invoked, which again
initiates a transaction in the blockchain to transfer the ride
fare amount from the smart contract to the driver’s wallet.

IV. EXPERIMENTAL RESULTS

We have implemented our ride sharing application on


Ethereum test networks. We have used a system with
Windows 10 Home, 64-bit operating system, x64-based
processor Intel(R) Core (TM) i7-7700HQ CPU @2.80GHz
and RAM- 16.00GB (15.9 GB usable). The smart contract
was compiled using remix ide and deployed to the
RINKEBY test network of Ethereum, using infura API.
Table I shows the gas required for each key procedure and
the corresponding values in INR. We can see that the initial
contract deployment attracts around 77 INR. This is the
highest value among all. For all other cases cost per
transactions are within 12 INR. All the INR values are based
Fig 2(a): user switching Fig 2(b): rider UI on the fact 1 ether= 140810.5 INR as on 21st June, 2021.

IJISRT21JUN916 www.ijisrt.com 1349


Volume 6, Issue 6, June – 2021 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
Table 1: Gas fee table for each transaction [8]. P. Pal and S. Ruj, "BlockV: A Blockchain Enabled
Function Gas fee/ INR/ Transaction Peer-Peer Ride Sharing Service," 2019 IEEE
Transaction International Conference on Blockchain (Blockchain),
(ETH) 2019, pp. 463-468, doi:
10.1109/Blockchain.2019.00070.
Contract creation/ 0.0005516 77.81 [9]. M. Baza, N. Lasla, M. Mahmoud, G. Srivastava and
deployment M. Abdallah, "B-Ride: Ride Sharing with Privacy-
initialize 0.0000903 12.74 preservation, Trust and Fair Payment atop Public
fundRide 0.00003013 4.25 Blockchain," in IEEE Transactions on Network
Science and Engineering, doi:
releaseFunds 0.00004187 5.91 10.1109/TNSE.2019.2959230.
[10]. S. Kudva, R. Norderhaug, S. Badsha, S. Sengupta and
V. CONCLUSION A. S. M. Kayes, "PEBERS: Practical Ethereum
Blockchain based Efficient Ride Hailing Service,"
In conclusion, this paper presents a framework for 2020 IEEE International Conference on Informatics,
developing a decentralized ride sharing application. This IoT, and Enabling Technologies (ICIoT), 2020, pp.
application can serve as a platform to connect the riders 422-428, doi: 10.1109/ICIoT48696.2020.9089473.
directly with the drivers. This concept maintains [11]. Buterin, Vitalik, et al, “A next-generation smart
transparency between the two peers and also there is no contract and decentralized application platform,” white
involvement of third-party commission, which is further paper, 2014. Available:
profitable as the entire ride becomes cheap. Also, the use of https://blockchainlab.com/pdf/Ethereum_white_paper
blockchain to carry out transactions provides an extra layer a_next_generation_smart_contract_and_decentralized_
of transparency and high security of the users’ monetary application_platform-vitalik-buterin.pdf
data. Using this application, any user can behave as a rider or
a driver based on his current needs. If the person wants to
drive to some place and seeks to earn some money on the
way, then he can choose to be a driver and if he wants to ride
to some location and needs some company, he can opt for the
rider option. This also helps people socialize and saves
transportation costs and the environment at the same time.

REFERENCES

[1]. Z. Zheng, S. Xie, H.-N. Dai, X. Chen, and H. Wang,


“Blockchain challenges and opportunities: A survey,”
International Journal of Web and Grid Services, vol.
14, no. 4, pp. 352–375, 2018.
[2]. Satoshi Nakamoto, “Bitcoin: A peer-to-peer electronic
cash system,”, 2008. Available:
https://bitcoin.org/bitcoin.pdf
[3]. Giuseppe Antonio Pierro, “Smart-Corpus: an
Organized Repository of Ethereum Smart Contracts
Source Code and Metrics”, (v1), 2020.
[4]. https://news.mit.edu/2016/how-ride-sharing-can-
improve-traffic-save-money-and-help-environment-
0104
[5]. https://medium.com/golden-data/case-study-uber-
technologies-inc-data-breach-7261484d6471
[6]. S. Khanji and S. Assaf, "Boosting Ridesharing
Efficiency Through Blockchain: GreenRide
Application Case Study," 2019 10th International
Conference on Information and Communication
Systems (ICICS), 2019, pp. 224-229, doi:
10.1109/IACS.2019.8809108.
[7]. Ryan Shivers, Mohammad Ashiqur Rahman, Hossain
Shahriar, "Toward a Secure and Decentralized
Blockchain-based Ride-Hailing Platform for
Autonomous Vehicles", [v2], 2019

IJISRT21JUN916 www.ijisrt.com 1350

You might also like