Bridging IoT & Blockchain for Smarter Cities and Businesses
EDCON 2019 · April 2019 · 16:09
Vlad Trifa explains how Ambrosus combines sensor data, distributed storage and blockchain commitments for supply-chain verification. He covers common data models, predictable fees, access controls and Merkle proofs, then uses vaccine tracking to show how businesses and consumers could check product authenticity and handling conditions.
Speakers
Topics
From EDCON 2019, hosted by EDCON.
Transcript
okay so we have the second speaker of large triva also from Switzerland I mean he's the chief product officer for and versus and he'll be talking about how blockchain can be used with Internet of Things okay all right good morning Sydney alright so I want you to talk a little bit about the work we've been doing in this space we come from the IOT world I've been working for 10 to 15 years in that space and when I've seen like the whole development the whole excitement around blockchain we found it
was really interesting to start see how the two fit together what's the cool stuff we can do by combining the two together and how can we essentially make businesses cities everyday life a little bit better by combining the two so you know the starting point for our work was just reading the news really so you see every day there are people getting sick they are getting some people are even dying because they are eating food that's unfit for consumption because there are consuming country feed medicine and stuff like that so we were wondering I mean wine 2019 that's still happening I mean all the progress in technology and supply chains and and the food weed seems to get just worse and worse every
day so how could we fix this how can we use those new cool technologies to make that a little bit better so the starting point was really realizing that there is a little love story developing between blockchain Internet of Things there are some very nice overlaps and our work was really how can we bring the two together to make each other much more interesting like each one of those technologies so our vision was first by using trusted sensors or really small embedded sensors that we can put around food around packages we can start measuring the state we can measure all sorts of real-time conditions around it and combine that with any distributed ledger technology so we can record all the data
around products a very trusted way so that they can be shared with trade partners they can be shared with the end consumers just like us or they can be used also for for auditing and even more cool things such as triggering smart contracts payment for for a payment and stuff like that so you know the the solution is essentially how could we use blockchain to build the solution where we can track and to end all all the products all the way to consumers so how do we build that essentially there are some huge challenges that still haven't been solved not just in the blockchain space but in general to make such a system a reality the first which is quite
important is just the volatility in crypto prices going up down that's really a no-go for many businesses because if they use any system they need to know how much it's gonna cost at the end of the month so if you tell them well depends on the market it's been on speculation that's just not gonna fly so we need to find a solution to to give them access to such a service so that it's stable in US dollars or any currency they're using the second even bigger problem is essentially that there is no single standard for IOT I mean they're like hundreds of them sure but there's not one single standard that really defines in a clear simple Universal way what data is regardless of the device it comes from how do you
model temperature how do you describe properties such as location and stuff like that so how can we connect all sorts of devices if they don't speak the same language essentially the third one is essentially you know scalability performance when you read all those reports around 50 billion devices connectivity by 2022 and stuff how can you collect how can you manage those huge amounts of data I mean it's essentially terabytes everyday of data how do you store that how do you secure how do you connect that how do you interface it with the blockchain the other issue as well is end-to-end security is very very rare in in the IOT world today like essentially the vast
majority of IOT solutions they will I just don't encryption across hops but there is no you know sensor side signing so essentially I've absolutely no way of proving whether some temperature measure really came from the sensor or if it has been tampered with somewhere along the way that's a big issue that also needs to be solved and finally just the development tooling the developer tooling all the all the software SDKs that makes it a lot easier for people to just very quickly build scale operate their apps so that's essentially what we were trying to solve so Ambrose's we try to combine and make our IT and blockchain great again so we we
essentially build on that that's our core solution so we've we've essentially announced it last year at con and now we're gonna go live in a couple of days with it with our main net so we've had a test and for a few months that we've been improving testing and we are about to release that so essentially it's decentralized middleware to build enterprise-grade blockchains application and it's essentially the layer on top of blockchain that offers a higher level interface that makes it a lot easier for businesses to sort in integrating with blockchain technology and leverage real time data from sensors so the first thing it offers is really this Universal data model there is a very simple REST
API Jason model that describes how can you model anything in your in your application and instead of using the the low-level transaction wallets type of metaphors we have a higher level data model which is essentially assets and events and everything can be mapped just as assets and events it also supports private and public data and that was something very very important because lots of businesses if you talk to the big food companies they are not yet they're in the mentality where they really want to share all their data so they understand you have to do it unison they have to get there but they really want to have some sort of control initially over over the data because that's competitive advantage for them
anyway it supports Stan stable fees for using the system for the same of data it's entirely governed by crypto economics so all of the logical of the coordination between the different actors happens via smart contracts and it's fully open source so if you look at the stack let's just dive a little bit deeper in how we architected that at the core there is the blockchain layer so that's essentially a permission poa with your network that we're using but on top of that we've built our own distributed storage solution which I'll describe in a second and it's a sanction incentivized storage where you can put metadata and huge amounts of data
without necessary putting it all on the blockchain itself and on top of course the api's gateways all the SDKs to make it very very easy to build your applications and especially your your labs so how does that work in practice the first component one of the the central piece we've build is essentially we call that the Herrmann's node it's essentially a gateway a simple service it's fully open source so that's the the code it's on our github you can run it unload it and what it offers is very simply a REST API with this data model and an API I was referring to before it's it has a local database so all of the data from sensors from your
applications machines scanning equipment enterprise systems you can just send it to that place but what's interesting is that every single data you enter in that database what we do is we take the metadata of that data so such as timestamp such as who has signed the data itself so the public address the hash of the data itself and we put that in a big fine that we call a bundle and then we use the hash of every single entry in your database if you want to create a miracle tree that allows us to prove every single entry modification in your database so anytime when you want to take this file and you want to commit
it essentially what we do is this this hermas gateway also has a blockchain client and it cause a smart contract function which says I want to upload this bundle now and you can call you can upload as many bundles as you want knowing that in one bundle you can put right now until 16000 sensor reading in one single smart contract Collison tree you pass the hash the the root of your miracle tree in that function you pass the URL so where anyone can download the bundle because it needs to be publicly visible and a duration like how long would you want the network to store the bundle for in number of years
and the fee you will have to pay with this transaction is going to be a proportion of a base fee which is stable in USD as I mentioned and the duration in number of years essentially so as soon as you send that transaction and it gets into a block what happens is you have those community nodes atlases they're run by anyone anyone can run those they are essentially monitoring what happens some chain and as soon as they see a bundle they all jump on it and apply for it like hey me can I host it can I host it and what happens then in the smart contract it selects a certain amount of bond of of Atlas nodes that gets selected and you and you you will be storing that bundle and you will
earn a small you will be rewarded periodically a small fee for hosting that file over time and of course the smart contract and others are watching to make sure that at no point you disappear with a bundle otherwise you'd not only don't get paid but also you are staking so essentially you might lose your stake if the bundle is not available now what happens is you can build anytime a simple application or add app that first gets the data the actual data regardless if it's private or not you would have access to that data if you if you're allowed in a centralized way in the in the Gateway then second you can get the metadata to verify the data you just got from those
bundles and you can obviously once you get the full bundle or just a chunk you can verify if it if it's a if it corresponds to the route that was stored into into the blockchain so that's essentially it Thanks so just a very small use case that you can build once you have such a system it becomes very very easy to implement all sorts of of of applications so one example would be transporting for example vaccines so vaccines need to be stored at a very specific temperature so the first thing you would do is that every single vaccine pack would get a unique identity that identity will go in one of those
bundles and then you can seal the physical product with an RFID tag being linked to that identity you put all of those boxes into into a cold cold case you can put a sensor as I mentioned inside that cold case you close it and then you transport it all the way to a pharmacy for example the sensor monitors the temperature it also can verify if someone has tried to open the box or if someone removed or put back one of those boxes so that when the pharmacy receives it they can open the box they can look at the inventory is everything there and they can take every single individual pack verify okay pack number three was it the the genuine one or has it been
changed by or replaced by another pack and this they can verify all of that with the application for example the dap i mentioned before and likewise the end consumer goes to pharmacy just by a vaccines or some insulin or whatever it is they can buy the pack and themselves they can verify as well if the pack they have is authentic is it really the right one and also because it's going to be linked to the temperature in which it was transported and they can see the entire history they can also verify okay has this pack of medicine being stored at the right temperature i mean is it still effective or should i not buy it so you know just the takeaway here the first point is is what we have observed
by building the system is that the the combination of one single public ledger combined with those different decentralized data storage nodes and those gateways are a very effective way to scale to the global IOT like scenarios where you can have billions of devices connected to it sharing data with each other the second point is data interoperability is going to be one of the most fundamental challenges so until we solve the ability for any device or application to kind of talk to each other in in a universal Esperanto it's gonna be very hard to build one single global scale iot system the third point
is blockchain security and the level of security that we see every day in blockchain technology is not yet very common in IOT systems and that definitely needs to change and finally the whole developer tooling the whole you know SDKs and everything you give to developers is really important because that's really gonna make a difference either you make for your developers to start building combining the blocks build and operate apps the more successful we are gonna be we as you everyone : so thanks a lot everyone and happy to talk with you after that so thank you thank you so you actually said something quite
interesting because recently I've been working with a company that's looking to put a chip a sensor into solar panels so that they can have like really granular data that's coming off it and the financier is saying that well if we can actually monitor how the solar farm is doing then that'd be very interesting we don't need to trust the data that's been provided for by you know people operating these farms and we can actually monitor it I know that it's correct and that's very interesting point yeah I mean the same principle you can apply to any an use case essentially you just need to have a way to measure real data and trust it and that's why for example we enforce a lot signing every single sensor reading on the device itself so even if it passes
through untrusted all operators or or other systems then you know for a fact that the data was signed in hardware like hardware wallets essentially but for sensors yes so just just really quickly what do you is the biggest challenge in combining IOT with blockchain technology I think it's two different mentalities or two different worlds historically but I think there are lots of things that are in common such as data management and especially security each side can learn from each other I think a lot so really the cooperation and and seeing more and more projects that get very closer to hardware that yet very very close to embedding blockchain technology directly on chips that's that's not easy but I
see more and more projects that are exploring and making the old work at scale that's the challenge great thank you thank you thanks