We very much like working with like-minded folks in the blockchain space. An opportunity for one interesting project arose earlier this year when we met Frederic Vedrunes of PassLfix at EDCON 2017. When we met, Frederic outlined the idea of a decentralized, data-driven app where Ethereum smart contracts are used to create a security layer for peer-to-peer delivery services. There’s also a significant data angle to the project, given that parcel deliveries would be monitored by IoT sensors. We were all ears, given that such ideas link nicely with our own vision of a decentralized data backbone as described in Streamr whitepaper.
To make a long story short, Frederic asked for our help in getting out a package delivery Ðapp prototype. We were happy to oblige, and the video below shows the whole thing in action from pickup all the way to delivery. The video was filmed and produced on a shoestring budget, but it’s probably all the better for it; it will bring a smile on your face.
The idea behind peer-to-peer delivery is simple: Where there’s people who’ll be travelling anyway from A to B, there’s folks who wouldn’t mind some extra income for taking a package along the ride. There’s already companies such as Dolly, Roady and Grabr out there with tens of thousands of users. Much of the activity has been in the U.S., but similar services are emerging in Europe (Nimber and Colis-Voiturage), and even international peer-to-peer delivery is on its way (PiggyBee). People clearly like interacting with people, and that’s one of the great aspects of peer-to-peer delivery networks.
The concept is catching on. But it is not like P2P delivery networks yet pose a huge threat which keeps the CEO of UPS or Fedex awake and sweating through the night. One reason why the big boys still sleep well is that they’ve earned trust. If you go with a P2P startup, you’ll hand over that sought-after Rihanna ticket to a person you’ve never met before, and expect him or her to hand it over to your favourite niece in Philly in time for Saturday’s concert.
In the case of UPS or Fedex, you trust the courier because they are employed by a big, reputable company. In the case of newly set up P2P services, several trust-building ways have been proposed, including reputation systems, designated points of pick-up and delivery, and parcel insurance. But we all know that one of the great advantages of the blockchain is the built-in trust. Can we leverage the chain and Ðapps to come up with a better delivery service?
In our mind the answer is a definite “yes”, and the paradigm becomes one of “trust but verify”. You offload the paperwork to smart contracts, and cryptographically sign all the face-to-face transactions in the blockchain. The rewards are automatic: The courier gets back the safety deposit on delivery, and receives the agreed fee in their wallets as soon as the package is delivered to the recipient. And you can complement all of this by a community, a DAO which handles the inevitable but hopefully rare disputes. All in all, this is a great example of a decentralized app with a significant real-life use case.
Apart from a clever use of smart contracts, this project makes a definite inroad to the IoT world. The sender can add one or more connected devices (sensors) in the package. The sensors (see below how they look like) will monitor conditions such as temperature, humidity, and acceleration while in transit. The idea is that the smart contract — as well as the sender and the recipient — will immediately know if the parameters stray beyond what was agreed, and appropriate compensation can then be meted out by the contract.
To make all this work, the prototype makes use of the Streamr platform as an off-chain processing engine. With the IoT data streaming in from the sensors, there’s simply way too much data for the blockchain and smart contracts to handle. In the prototype, telemetry data (such as temperature, GPS, speed and elevation) from each parcel in transit transmitted via a Bluetooth connection to the courier’s smartphone. On the smartphone, there’s an app that leverages the API of Ethereum Android to interact with the blockchain. The mobile app also sends sensor data to Streamr platform where visualizations (charts, tables, and maps) are automatically created. The visualizations can viewed by the sender, courier, and the recipient. Any contract breaches (e.g., parcel crossing a temperature limit) are automatically detected and reported to the appropriate Ethereum smart contracts.
As we see it, the prototype is an archetypal example of a data-driven Ðapp. There is a decentralized backend implemented as smart contracts which handle the delivery process. The prototype web3 frontend (see below) handles parcel and delivery setup, and the tracking view shows the real-time location of the parcel along with related sensor metrics. As such, we hope that the prototype serves as inspiration to the coders and developers out there working on the next big decentralized thing. May the Force be with you!