A decentralized review system built on blockchain.
In current day, restaurants in Yelp may generate fake reviews in order to have a good rating in Yelp to attract more customer. In order to prevent this to happen, Yelp developed algorithms to filter the “fake” reviews which cause a heated controversy. Whereas, all the ratings are stored in Yelp’s database, and Yelp can manipulate the data very easily for their interest.
Therefore, I propose to build a decentralized rating system based on blockchain that not be control by any entity.
Bussiness informations and reviews are stored in the block's MPT. When a client want to post a bussiness or a review, the client need to pay the transaction fee to the miner.
- A Client can post a bussiness or a review with a transaction fee.
- A Minner can take a transaction, publish a block and take the transaction fee.
// 1. Post /business
Req:
{
business_name: “KO Ramen”,
business_location: “San Francisco”,
business_tag: “Restaurant”,
}
Res:
{
business_id: 1
}
// 2. Get /business?id=1
Res:
{
average_rating: 3.4,
reviews: [
{
rating: 4,
comment: “Good restaurant”
},
{
rating: 1,
comment: “Bad restaurant”
}]
}
3. Post /rate?id=1
Req:
{
rating: 3,
comment: “not bad”
}
Both reviews and business information are stored in the MPT of the block
Users will have unlimited starting gas for now. And they will attach transaction fee when they submit a transaction.
When a user create a transaction, the user will send the transaction to all its peers and peers will forward the transaction to their peers, so on and so forth.
When a miner recieve a transaction, it will store the transaction in the local transaction pool. When a miner tries to create a block, it polls a pending transaction (Check if the transaction is already in the chain) from local transaction pool, and tries to solve PoW. Once the miner succeed, it forward the new block to its peers.
Client is a node int
- Build data structure for business info - [x]
- Build data structure for transaction - [x]
- Implement integrity using public / private key - [x]
- Implement Post business
- Implement Post business's review
- Implement Get business's review
- Build interactive front end