BlockChain Major Project
BlockChain Major Project
BlockChain Major Project
Delivered By: -
Lokesh Singh Rajwar – 1918439 – Sec-E
Ritu Saini – 1918617 – Sec-F
Varsha Saini – 1918796 – Sec-G
Prachi Singh – 1918540 – Sec-E
Respective Mentor: -
Delivered To: -
Mr. Amit Gupta
Abstract
Ridesharing is a service that permits drivers to share trips with different riders, which
adds to the captivating advantages of shared travel expenses and traffic congestion.
Peer to Peer ridesharing technology conveys blockchain to manage the issues looked
by customary brought together ride-sharing applications. Blockchain is a sprouting
technology and decentralization of frameworks can be powered by it. Proposed ride
sharing framework will be conveyed on blockchain and will be decentralized from a
genuine perspective. This application permits drivers to give ride-sharing services
without depending on a third party. This project centers around developing a
distributed hassle-free, less error inclined ride-sharing application powered by
blockchain technology.
Vehicle sharing allows individuals to lease vehicles for a brief timeframe.
Normally, accessible vehicles are spread around a city in held parking spaces, making
it simple for clients to track down them and, surprisingly, stroll to them. The method
for opening a vehicle relies upon the vehicle sharing service. At times, a client is given
a key to a lock box that contains the vehicle key. Different organizations permit their
clients to open vehicles (and sometimes even start them) utilizing a versatile
application. Numerous vehicles sharing organizations value their services as a little
beginning charge in addition to an expense for the distance driven. Generally, the
base rental expense incorporates protection, gas, and vehicle support.
One of the greatest issues with vehicle sharing administrations is an absence of
trust. Since vehicle rentals occur with next to no up close and personal collaboration,
there's consistently a gamble of extortion. A client might find a way to not pay for the
rental or a vehicle proprietor might charge more than at first concurred. Blockchain
technology offers a quick and secure method for making a limiting monetary
understanding as a shrewd agreement. Like conventional agreements, shrewd
agreements indicate commitments of the two players, just dissimilar to customary
agreements, they automatically authorize them. When applied to vehicle sharing,
shrewd agreements can robotize exercises, for example, enlisting another rental and
computing installment in view of genuine use.
With a blockchain, it's likewise conceivable to execute an equilibrium locking
usefulness that works much the same way to a Mastercard approval hold utilized by
conventional vehicle rental administrations. This way, vehicle proprietors should rest
assured they will get extra installment on the off chance that a rental period is drawn
out, and clients should rest assured their cash will be opened assuming the vehicle is
returned on time. Furthermore, a blockchain guarantees that vehicle rental narratives
are immutable, so in the event of an occurrence, a vehicle sharing organization can
check who was driving the vehicle at that point. For the distributed vehicle sharing
model, brilliant agreements ensure vehicle proprietors that utilization of their vehicles
is straightforward, and that income is genuinely paid.
INTRODUCTION
Above figure expounds the elements and qualities of a decentralized framework and
portrays its benefits over conventional unified frameworks.
In decentralized ridesharing applications, travelers can analyze how a ride-sharing
business functions due to blockchain's capacity to make responsibility. Brilliant
agreements enable partners to utilize blockchain-empowered shared leasing of cars
for two gatherings really involved in view of foreordained fundamental prerequisites.
As a result, it reliably supplies appropriate costs, and the framework creates certainty
and straightforwardness.
Peer to peer and copyright infringement: - The first and most clear use of a P2P
network is related with copyright infringement. As these file sharing organizations
utilize the gadgets from both the finish of the client and the server, it becomes one
of the most generally involved stages for sharing electronic media, for the most part
for pilfered content. Furthermore, these organizations additionally track down their
application in conveying malware programming like spyware and viruses.
File Sharing: - File sharing is one more huge use of peer-to-peer organizing that
happens through document sharing technology. As the actual name suggests, it
permits the clients to access and move different sorts of sight and sound files like
recordings, pictures, music, and so forth. In this way, fundamentally, you can utilize
a file sharing organization across different gadgets to move any sort of record you
need. A few instances of a file sharing peer-to-peer network incorporate are
BitTorrent, uTorrent, Ares Universe, FrostWire, and BitComet.
Blockchain: - As a technology, a P2P network depends on the idea of
decentralization. The essential design of blockchain technology comparatively
empowers a client to move cryptocurrency across the globe without requiring any
broker or mediator. With such a decentralized dispersion, it becomes simpler for any
person to turn into a piece of this course of check.
Content Delivery Acceleration: - On the off chance that there is one organization
administration that can essentially help in lessening conveyance costs, it must be a
P2P content conveyance organization. The specialized functionalities of a peer-to-
peer organization might possibly incorporate with any happy conveyance framework
and proposition an extensive variety of administration capacities.
The Cosmos network is likewise called the web of blockchains since it incorporates
various applications and administrations that trade advanced resources and
information utilizing the Inter-Blockchain Communication (IBC) protocol.
The main reason for our smart contract is to mechanize the installment interaction: a
client pays for the time they utilize a vehicle and the vehicle's proprietor gets
installment.
There are three main files that constitute our smart contract: -
state.rs — contains the declaration of data structures used by the smart contract and
functions that the smart contract uses to access storage to read or write this smart
contract data.
msg.rs — contains the declaration of messages that the smart contract receives and
the responses it sends.
denom — the name of the token used for payment. In our example, we don’t
use a specific token type. You can specify any token type that is available in the
network where you deploy the smart contract.
The data we specify for the parameters mentioned above is saved in storage by
the config key as a singleton.
id — address that is bound to the car; messages from the car to other parties
will be sent from this address.
name — client’s name.
rent_price — rental price for a unit of time (in our case, an hour).
deposit_price — amount that will be locked to rent the car.
balance — amount earned by the car owner from the rental.
3. Client: - For the Client structure, we need to specify the following parameters:
id — client’s address.
name — client’s name.
verified — an indicator that tells whether the client has passed KYC verification.
balance — client’s balance.
locked_balance — client’s locked balance.
Following is the list of software, libraries, dependencies, and APIs used to develop
the proposed system: -
1. Android Studio 3.8: - Android Studio is an App Development IDE and in this
project it is used for developing native android applications.
2. 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: - Node used as an IDE for Javascript and Solidity development.
• Proposed Method: -
Login and Registration service is sent with a basic UI and google firebase
authentication service is utilized at the backend to store and approve login
certifications of the users. A map part is added on the map movement and
broadens GoogleApiClient, LocationListener, ConnectionCallbacks,
OnConnectionFailedListener, OnMapReadyCallback classes to carry out essential
map functionalities viz. Enabling user location, location markers, map type, etc.
The front end of the application is characterized in the xml document where it
comprises of login/registration, selection activity, map fragment, search bar,
drawer for mentioning rides, drawer for ride approvals. To set up the map API we
have executed GoogleApiClient on primary Activity. Map part, which is arranged
by OnMapReady method. Where we can perform tasks like padding; adding
listener for onMapLongclick, onMarkerClick; building GoogleApiClient, setting
current location of user, and so forth.
In Manifest, access to the web, course and fine location is granted. Location
Listener's method viz. onLocationChanged, onConnected,
onConnectionSuspended, onConnectionFailed are executed and location
Solicitation object is initialized in onLocationChange technique to get current
location. In Main activity Search Bar's onQueryTextListner is set to feed the latlng
of searched address as destination to the direction parser class.
• Flowchart Used: -
Below Flowchart makes sense of the work process of the proposed blockchain
based ridesharing framework. The application software cycle begins with clients
making a rideshare demand also, follows till the rider again endorses one of the
drivers' demands lastly information is divided among these users.
People with a smartphone and safe contemporary cars have more greater
market open doors since there are no mediocre. The system proposed in this
project has attempted to achieve these.
The subsequent android application handles user ride sharing requests and
coordinates them with different drivers nearby. Users can help matched with their
peers through the matchmaking that the application gives which is conveyed over
a blockchain. The system which is sent over android stage is extremely easy to
use and users can book rides effectively, safely, and as fast as could really be
expected.
1. A smart contract.
2. A CosmJs dApp to permit gatherings to interface with the smart contract.
One of the critical components of any ride sharing service is Know Your Customer
(KYC) support.
CONCLUsion
Applying blockchain innovation to vehicle sharing permitted us to execute a believed
model for a car sharing service. Clients can be guaranteed they won't pay more than
they consented to and vehicle owners always get payment for rentals.
In our simple smart contract model, we demonstrated the way that installment
can be flexible: the client just pays for the use time frame and income goes directly to
the car's balance. Thanks to locking the customer's deposit payment before beginning
a rental, car owners are constantly rewarded when their vehicles are utilized. In the
case of an accident, the car owner will know who used the vehicle, as information
stored in the blockchain can't be changed and can be passed to third parties, such as
insurance companies.
REFERENCES