Lisk restaurant is as a proof-of-concept built with the Lisk SDK. It demonstrates how easy it can be to create a restaurant based backend that consumes the Restaurant Sidechain. So, why a backend for a restaurant?
Blockchain is a distributed data structure that is replicated and shared among the members of a network, incremented and linked by blocks between them. It is a computational system that behaves like replicated and distributed state machines composed of several elements, mainly peer-to-peer(P2P) networks, consensus protocol, cryptographic keys, and sidechains or smart contracts. Get more info about Lisk blockchain at https://lisk.io/what-is-blockchain.
DPoS (Delegated proof of stake) is a consensus algorithm used by Lisk and composed of a numeric quantity of nodes configured with delegate accounts.
Each blockchain has a specific amount of time to generate a block. Currently, the standard block forging time on a sidechain of Lisk is set to 10 seconds.
The problem discussed in this presentation is the difficulty to find a payment system supported anywhere in the globe to buy food. Currently, people use different coins, which are not always easily exchanged. Also, few solutions accept digital coins as payment in restaurants for different reasons, lack of knowledge in technology, difficulty to access the technology, scalability issues, instability of token value, or feeling that it takes too much time ...
The necessity of a payment solution for restaurants that allow anyone to request food, anywhere in the globe/region using the same digital coin. Restaurant owners can use one single digital currency for all of their restaurants around the globe. Travelers could make use of a single digital currency to pay at every restaurant connected to the system. The restaurant sidechain solution is discussed, how it can be used by other restaurants, and how it can scale.
The Luxury restaurant was created as a proof of concept for the Lisk sidechain blockchain. The goal is to demonstrate how easy it can be to create a restaurant based backend that consumes the same restaurant sidechain of other restaurants.
Let's suppose a customer of Luxury restaurants commands a food. Once commanded the food then a FoodTransaction will be created in the restaurant sidechain, the transaction value will be placed on the restaurant Lisk address and the food value will be debited from the customer wallet. Also, the sidechain owner receives a fee on each Food Transaction successfully completed.
Above you see a screenshot of a restaurant using the Restaurant Sidechain proposed here, it's a development environment. To test it access the link. Choose an option from the menu by clicking it. Fill in the required fields. Use the sample passphrase included at the page (copy it and paste it into the passphrase field). When you have all fields informed, click at the button to order the food. The information of fields will be encrypted and stored this way at the sidechain to preserve customer privacy. A confirmation message should appear with the transaction id.
The sidechain node allows communication between them through private network subnets. Nodes are placed even in different datacenters. The backend of each restaurant communicates with the sidechain using the private network too. This ensures, fast communication to any node of the sidechain. The backend was developed with Nodejs technology and the web application of each restaurant was developed with React technology. The web application communicates to the backend through a public network. At the moment of the development of this proof of concept the transaction pool size was 1000 transactions, and more 1000 transaction multi-signature transactions.
The sidechain has two types of transactions registered, the FoodTransaction and RefundTransaction. Also, Basket transaction and Delivery transactions are transaction types studied and can be implemented. Currently, the sidechain block forging time is 10s. Furthermore, seed peer nodes are only on internal networks, while regular nodes can be exposed, especially in the development phase. Some advantages of a backend are:
●Possible to include specific validations that should not be in the client or the transaction class
●Allow connections from different clients (web, mobile, desktop)
●Business value included. Specifics characteristics to each restaurant business
●The cryptography of user name, address, phone on the sidechain
Each restaurant has its own Lisk address (differents franchise owners)
●Restaurant 1 has around 200 users on each meat time (lunch, dinner)
●Restaurant 2 has around 150 users on each meat time (lunch, dinner)
●Each user in average requests a menu option
●Sidechain owner fee on each transaction is 0.5 LSK
●Sidechain delegates fee on each transaction is 0.1 LSK
In this scenario, in a single day, the sidechain owner can receive 350 LSK if 700 transactions were performed.
The use case above demonstrates that the restaurant sidechain owner decided to accept more than 1 restaurant on its business. So each new restaurant represents a new backend and a new web application. Business is split in different countries with different timezones, this way launch and dinner times are different, therefore not representing an issue for the sidechain transaction pool capacity.
One benefit of this scenario is the use of the same digital coin even in different countries. Also, in a single day, the sidechain owner can receive 475 LSK.
In this scenario, each region has its sidechain. It means that each region is independent and can have its digital token and capacity.
In this scenario, there is no web application, forget about it. This is a restaurant business that people go to eat at the restaurant. Knowing that imagine a regular restaurant has, usually, 1 to 5 payment machines, and this restaurant started to accept digital coins from the restaurant sidechain business. To allow payment of digital coin, the restaurant uses a mobile application that allows a customer to pay with the digital coin to the restaurant wallet address of the sidechain.
One advantage for the sidechain owner business is the possibility of expanding to more restaurants, as the number of concurrent payment are few. Therefore, it is possible to expand the business to more restaurants, for example, 200 restaurants in the entire world.
This site and project are under evolution and new features will be included.
I presented this Proof of concept at the Lisk community builders meetup on 30/04/2020
Also, I am the author of scientific papers:
Title: A Strategy for Mitigating Denial of Service Attacks on Nodes with Delegate Account of Lisk Blockchain
ACM book title: 2020 The 2nd International Conference on Blockchain Technology (ICBCT'20), March 12--14, 2020, Hilo, HI, USA
ACM digital library https://dl.acm.org/doi/abs/10.1145/3390566.3391684
Title: Proof-of-Concept (POC) of Restaurants food requests in the Lisk Blockchain/sidechain
ISAIC 2020: 2020 International Symposium on Automation, Information and Computing, December 2nd-4th, 2020, Online
JOURNAL OF PHYSICS. CONFERENCE SERIES
ISSN: 1742-6596 (Online) 1742-6588 (Print)
IOP Science Journal of Physics Conference Series https://iopscience.iop.org/article/10.1088/1742-6596/1828/1/012110/pdf
Title: The impact of Denial of Service attack for Bitcoin miners, Lisk forgers, and a mitigation strategy for Lisk forgers.
IntechOpen 2020/2021 book: Cybersecurity Threats with New Perspectives, London, United Kingdom.
(to be published Open Access book)