A decentralized ride-hailing service using blockchain technology with DIMO for car identity, Web3Auth for authorization, Sign Protocol for attestation, and XMTP for secure communication between riders and drivers. The service connects riders to drivers and emergency responders using smart contracts and OpenStreetMap API for real-time location tracking.
- Introduction
- Features
- Tech Stack
- System Workflow
- Getting Started
- Smart Contract Details
- Emergency Responder Workflow
- Future Plans
- Contributing
- License
This project is a decentralized taxi service that empowers riders to request rides, drivers to offer services, and emergency responders to provide safety assistance—all through a decentralized, blockchain-driven platform. The key components include:
- DIMO for vehicle verification via token IDs.
- Web3Auth for decentralized authorization.
- Sign Protocol for identity attestation.
- XMTP for secure communication between rider and driver.
- Request a ride and connect to the nearest driver.
- View the real-time location of the ride using OpenStreetMap.
- Contact emergency responders if needed by pressing the emergency button.
- Secure communication with the driver via XMTP.
- Register by providing a valid DIMO token ID.
- Operate on a Proof of Work (POW) model, accepting or rejecting rides.
- Secure communication with riders using XMTP.
- Ratings system based on rider feedback; falling below a certain threshold leads to removal from the program.
- Register by staking a predefined amount.
- Operate on a Proof of Stake (POS) model.
- Receive and respond to emergency requests from riders.
- Earn rewards in tokens for successfully assisting riders.
- Subject to removal and stake forfeiture if multiple complaints are received.
- Blockchain: Smart Contracts (Solidity or similar)
- DIMO: Car identity management
- Web3Auth: Authorization and authentication
- Sign Protocol: Attestation
- XMTP: Secure, decentralized messaging protocol
- OpenStreetMap API: Real-time location tracking
- Frontend: React, Next.js (or your preferred framework)
- Backend: Node.js, Solidity (for smart contracts)
-
Driver Registration:
- The driver provides a DIMO token ID for car identity verification and goes through an attestation process using Sign Protocol.
-
Ride Request:
- The rider requests a ride through the application. The nearest available driver receives the request, which they can accept or reject using a smart contract.
-
Emergency Response:
- During the ride, the rider can press an emergency button if they feel unsafe. The nearest emergency responder is alerted and, upon helping the rider, receives tokens and ratings based on performance.
-
Communication:
- Secure, decentralized conversations between rider and driver are facilitated via XMTP during the ride.
-
Rating System and Removal:
- Drivers and emergency responders receive ratings after each ride. Multiple complaints or low ratings result in removal and forfeiture of stake or driver privileges.
- Node.js and npm
- Solidity for smart contract deployment
- MetaMask for interacting with the blockchain
-
Clone the repository:
https://github.com/varun-r-mallya/EthOnline.git cd dimond
-
Install dependencies:
npm install
-
Start the frontend:
npm run dev
- Make sure you have MetaMask connected to the correct blockchain.
- Interact with the smart contracts via the frontend to request rides, register drivers, or become an emergency responder.
- Ride Management: Handles ride requests, driver assignments, and status updates.
- Emergency Response: Manages the interaction between the rider and emergency responders.
- Rating and Penalty System: Monitors ratings and handles automatic removal and stake forfeiture.
- Register and stake a predefined amount to participate.
- Receive emergency alerts from riders.
- Assist the rider and receive rewards.
- Maintain good ratings to stay in the program.
-
KYC Integration with Kinto: We aim to integrate Kinto for KYC processes. However, we encountered challenges due to excessive documentation requirements, which were not feasible for our student team. We plan to revisit this integration in the future to streamline and simplify the KYC process.
-
Decentralized Databases: We are exploring the implementation of decentralized databases for storing data. This approach will enhance data security, availability, and redundancy while aligning with the decentralized ethos of our platform.
-
Custom Neural Network Architecture: We plan to develop a custom neural network architecture for predictive pricing of rides. This model will analyze various factors, including historical ride data, demand patterns, and location-based metrics, to provide dynamic and accurate fare predictions.