IOTA Hackathon: Fraud Detection (Part 2)

This is the second installment in our posts about the experiences of the „Freedom Pass“ team during the IOTA Hackathon. In the first post (found here), Kira set the stage and explained the current issues of the London Freedom Pass. In this post, we’ll get a bit more detailed with regards to how we built the project.

DISCLAIMER: Even though the project is called „Fraud Detection“ the technological focus is very much on IOTA and not at all on machine learning-methodologies or data science, as one would commonly associate with fraud detection and prevention.

After we’d narrowed the scope down sufficiently to what we thought would be achievable during a hackathon, we started getting familiar with the IOTA tangle. We followed this tutorial for making a simple transaction, written only a few weeks earlier but already with some modifications required. After having gotten ourselves familiar with the general concepts of the Tangle (much accelerated by a presentation and Q&A by Chris Dukakis of IOTA) we connected to a testnet node and started issuing transactions.

Before we get into the details of the project, I’ll make a short comment about the decision whether to run a full node, the IOTA Reference Implementation (IRI) or to connect to pre-existing nodes. In short, to run the IRI, one needs a complete Java Runtime Environment, which is one of the reasons why IOTA can’t be run on an IoT device at this point. Each node connected to the tangle exposes an HTTP API through which transactions can be issued. To set up an instance of the IRI, one has to acquire the addresses of the already connected nodes in the tangle. The recommended way to do this is by asking people in the slack-channel #nodesharing. Because of the above restrictions and our requirements in time, we didn’t think it would be necessary to run our own node.

Back to the task of solving the problem of fraud in the application process for the Freedom Pass in London boroughs. We settled for the JavaScript library since it does a lot of the heavy lifting on top of the API and is by far the best-documented library. (The winning team used the mostly undocumented Python library and still managed to interact fairly smoothly with the tangle). The iota.lib.js implements both the standard API, some useful functionality like signing, unit conversion and reading from the tangle. In our project, we had set out to supply the following interactions between the tangle and our users:

  1. Register Doctor as a seed on the tangle
  2. Register Applicant as a seed on the tangle
  3. Perform a transaction for each certificate between the issuing Doctor to the Applicant.
  4. Verify that a certificate was registered on the tangle given a Doctor and an Applicant
  5. Read information off of the tangle about outgoing transactions from all Doctors

Given the above functionality, how could we leverage the existing IOTA library in the best way possible? Well, since smart contracts or most types of advanced transactions aren’t really possible on IOTA (yet), we will need some off-tangle processing, storage and UI.

For this, we implemented a backend and some wrapping to process the information from the applications. The server-side was written using Node.JS and the express-framework. To model the logic and structure of the database, we used MongoDB and mongoose. The MongoDB contained a simple key-value store, saving relevant applicant information. One could imagine that is could be upgraded to a graph-model to better mirror the tangle structure and to be able to more efficiently analyse connections between Doctors and Applicants, however, that was out-of-scope during the ~24h of coding we had.

In order for the user to interact with the tangle in an easy way, we built a small web-frontend. It allows the user to enter information about an application such as the national insurance number of an Applicant, postal code of the Doctor and Applicant, phone numbers, etc. At this stage, four things need to happen:

  1. The information is saved in the MongoDB-collection,
  2. seeds for the Applicant and Doctor are created based on an aggregate of identifying information,
  3. new test tokens are generated and sent to the Doctor’s account and
  4. an IOTA transaction is issued from the Doctor to the Applicant.

To save the information into a MongoDB-collection a controller instantiates and returns a new model containing the just entered data. It passes it on to the server.jswho handles the HTTP-requests from the client.

There is no dedicated IOTA API-call for generating seeds, but they do supply a command line command for generating a random seed. We made our seeds relatable to the private information by concatenating the private key with the national insurance number for the Applicants and the Doctor’s ID for the Doctors. After the seed was generated, a fresh address is created for each new transaction.

To make the functions from the iota.lib.js a bit more usable, we wrapped the existing callbacks-based structure in Promises. This allowed our code to become a bit more asynchronous than it is ‚out-of-the-box‘.

Here is an overview of the architecture:

„Freedom Pass“ System Architecture

Once the data and the transactions were issued, the next step was to provide a way of viewing the existing applications and certificates. So we created a second page of the UI for listing all applications with relevant information read from the MongoDB-collection.

UI for entering Doctor’s and Applicant’s data

This doesn’t, however, provide such a great way of finding the main type of fraud that we were considering, namely Applicants reusing information about Doctors. This makes it look like a single Doctor issued an unreasonable amount of certificates. A pretty easy case to catch, one would think, but considering it is a completely analog process done by on  paper in different boroughs by different administrators, it sums up to quite a large amount of faked applications. This is the type of fraud we focussed on in our processing.

So how can we in a user-friendly way flag cases that should be investigated? We chose the simplest option and created a second view of the UI where each Doctor in the system is listed along with the number of certificates they’ve, supposedly, issued. The list is sorted by the number of certificates issued. Here one could imagine making it a bit smarter by including the date the certificate was issued and creating a more differentiated metric of certificates per time unit, but it wasn’t in scope this time around.  If a Doctor issued more than 10 certificates, they were highlighted in red. A very simple but potentially efficient way of communicating to the user that something needs to be investigated. Of course, the number 10 was completely arbitrary and could have been chosen differently. In fact, to decide that number, one would have to, first of all, analyze historical data.

Hitlist of certificates issued by Doctors

To sum up, Team Freedom had a lot of fun and learned tons about IOTA, ideation, cooperation, and creation in a short time-frame. We managed to build a functioning Proof of Concept for how IOTA can be used for the secure issuing of medical certificates in order to prevent and detect fraud. The application to the Freedom Pass was done so that it would be easier to understand what was being done and why. But that does in no way mean that the base structure cannot be used for other purposes, in fact, it was written specifically to be general enough that it is also interesting in other areas.

Is this the only way that the problem could have been solved? No. Was it the easiest way of solving it? Absolutely not. However, we believe that only by experimenting and utilizing one of the few scalable and future-resistant distributed ledger solutions can we achieve applicability. There is, generally speaking, almost no distributed ledger application that could not have been done without the use of a distributed ledger, but it would have incurred great financial, organizational or trust costs. IOTA is a very cost-effective and scalable solution, but with the caveat that it is still in its infancy.

Freedom!
Team „Freedom Pass“ at the IOTA Hackathon in Gdansk, Poland

  Here is an overview of all reports on the IOTA Hackathon’s projects:

1st place – „PlugInBaby“:

…describes the idea and the pivot of the project
Team „PlugInBaby“: Open Car Charging Network (Part 2)
…describes the technical level and provides resources

2nd place – „Freedom Pass“:
Team Freedom Pass: Fraud Detection (Part 1)
…describes the high level of the project
Team Freedom Pass: Fraud Detection (Part 2)
…describes the technical level of the project

IOTA Hackathon

The blockchain tech sphere in the fall of 2017 looks totally different than in the same period of 2016. Then, many people heard about blockchain for the very first time, now there are several dedicated blockchain platforms for specific applications. In the field of Industry 4.0, beside supply chain and robotics, IoT applications provide a hotbed for highly scalable blockchains, such as IOTA, NEO, or QTUM.

For and with one of these IoT-specific blockchains, IOTA, we will organize a hackathon, a week-end full of code, co-creation and ideas.

BUILD THE FUTURE WITH US!

Today is blockchain, tomorrow is industry 4.0 and the internet of everything. Autonomous cars, sensors and intelligent factories are the future but how will they communicate and transact among one another on a worldwide scale? IOTA is a blockless ledger system which enables scalable autonomous machine to machine micro-transactions without fees. Want to get your hands dirty and take part in building the future?

WHAT’S THE IOTA HACKATHON ALL ABOUT?

  • Developing services or products for the internet of things
  • Gaining experience with IOTA’s blockless ledger system for cutting-edge machine to machine transactions
  • Keynote speeches by key players in the industry
  • Networking, fun, free food and friendly competition

THREADS TO BE PURSUED

  • IoT Based Business Plans
  • Hardware Connectivity Layer: Bluetooth, Z-wave, ZigBee or LoRa
  • Application Layer: MQTT, XMPP
  • Fog, Mist & Edge Computing for IoT
  • Quantum security
  • IoT Maintenance & Lifecycle Management
  • Identity of Things (IDoT)

WHO CAN PARTICIPATE?

  • Developers (Esp. JavaScript, Java, Python)
  • Business Practitioners & Economists
  • UI/UX Designers

SCHEDULE

FRIDAY 17 NOV
18:00 – 19:00
Reception and Networking: Get comfortable and get to know one another

19:00 – 21:30
Keynote Presentations: Introductions and food for thought
– Jörg Blumtritt (Datarella)
– Dominik Schiener (IOTA)

SATURDAY 18 NOV
9:00 – 9:30
Breakfast and Coffee: Fuel up for the Hackathon

9:30 – 10:15
Individual Introductions: Barcamp style three keywords per person
30 Second Elevator Pitches: Explain your idea, build a team that can execute it!

10:15 – 11:00
Team Building: Chat with team leaders of interest & decide which team you want to hack with.

11:00 – 12:00
Speakers round: Getting started with IOTA: Dev Tools & Resources from Baltic Data Science

12:30 – 13:30
Lunch Break: Enjoy some delicious food and get ready

13:30 – 16:30
Time to Hack: Build, Test, Iterate

16:30 – 16:45
Movement Break: Get your blood pumping!

16:45 – 19:30
Time to Hack: Build, Test, Iterate

19:30 – 20:30
Dinner Break: Take some time to nourish the body and get ready for the all nighter to come!

20:30 – Late
Hack Till Your Heart’s Content: It’s up to you. The accelerator is open all night. Code till you drop.

SUNDAY 19 NOV
9:00 – 9:30
Breakfast and Coffee: Fuel up for the final day

9:30 – 12:30
Hacking and Presentation Prep: Get your demos running!

12:30 – 13:30
Lunch Break: Nutrition for the final stretch

13:30 – 14:00
One Last Check: Audio Visual and Tech Check for Demos

14:00 – 16:30
Demo Presentations: Show us what you’re made of!

16:30 – 17:30
Jury Session: Enjoy some refreshments while the jury deliberates

17:30 – 20:30
Awards Ceremony: Celebrate with the winners, network and celebrate

APPLICATION
To apply for the IOTA HACKATHON 2017 register now!
Don’t wait for too long – the number of participants is limited.

LOCATION
Lęborska 3b, 80-386 Gdańsk
NIP: 583-290-74-40

Based on our experiences with hackathons we think that Gdansk, Poland, is a perfectly suited location for this IOTA hackathon. Looking forward to hacking with you!

Predictive modeling – an interview with Datarella CEO Joerg Blumtritt

Most of the time, we at Datarella deal with the very near future: what will be the most likely thing that individuals want or what they are up to next? We use mathematical models to predict human behavior. But not only human behavior is what Datarella is interested in. Research papers, internal customer data and external data are being used by Datarella to predict probabilities of success of specific products. We detecs patterns, weaknesses and events in behavior and product design and – together with our customers – we define workarounds, optimizations or completely new data-driven products.

Telling the story of people’s lives – Strata+Hadoop, Feb 15, San Jose

We can draw a colorful picture of people’s everyday lives from the data we collect via smartphones. To tell the data-story, we need to translate the raw measurements into meaningful events, like “driving a car”, “strolling in a mall”, or even more intimate, like “being nervous”. We will show how to access the phone’s data, how to derive complex events from the phone’s raw data, and how to bring it into a meaningful story, and how to make it work for businesses.

Cases we’ll show: an app for the automotive industry to support ecological driving, learning about preferences of Chinese passengers at an international airport, and supporting people suffering from osteoporosis to stabelize their condition and maintain mobility.

More on Strata+Hadoop

 

Wearable Data Hack Munich 2015

Today, we would like to announce something special. Something we can’t wait to take place and until mid June it’s going to be tough to sit tight. Please, feel invited to our Wearable Data Hack Munich 2015!

The Wearable Data Hack Munich 2015 is the first hack day on wearable tech applications and data. It will take place right after the launch of Apple Watch – the gadget we expect to rise the tide for all wearables. Withe the Wearable Data Hack Munich 2105, we aim to kick-off app development for the emerging smartwatch and wearable tech market. During this weekend you will have the first occasion to share your views and ideas and jointly gather experience with the new data realm.

Apple calls the Apple Watch “Our most personal device ever”. And with good cause: The data from wearable tech, smartphones and smartwatches are really the most personal data ever. Our mobile devices accompany every step we take, every move we make. A plentitude of sensors on the devices draw a multidimensional picture of our daily lives. Applications of wearable data range from fitness to retail, from automotive to health. There is hardly an industry that cannot make direct use of it. And yet, wearable apps still are in their childhood. The Apple Watch will be hitting the street in April and will get the ball rolling.

The Wearable Data Hack Munich 2015 is jointly organized by Stylight and Datarella.

THREADS TO BE PURSUED
Developers, data geeks and artists will pursue one or more of these threads:
– Data-driven business models for wearables
– Data-driven wearables
– Smartphone app (Stand alone / combined with smartphone)
– User Experience
– API
– Open Data
– mHealth / Medical Data

So let’s explore what we can do with this data! Let’s play with the possibilities of our wearable gadgets and mobile sensors.

APPLICATION
To apply for the Wearable Data Hack Munich 2015, please send us an email with
– your name
– your profession
– your take on wearable data
– 3 tags describing yourself best.
Don’t wait for too long – the number of participants is limited.

For more information, please have a look here! See you at Wearable Data Hack Munich 2015!

The Datarella World Map Of Behavior

Every smartphone user produces more than 20 MB of data collected by her phone’s sensors per day. Now, imagine the sensor data of 2 billion smartphone users worldwide, translated into realtime human behavior, shown on a global map. That is the vision of the Datarella World Map of Behavior.

A typical 2015 generation smartphone sports up to 25 sensors, measuring activities as diverse as movements, noise, light, or magnetic flux. Most smartphone users aren’t even aware of the fact that their phone’s camera or microphone never are really „off“ but that they constantly collect data about the noise level or the intensity of light the user is experiencing.

Actions speak louder than words
Actions speak louder than words – if we want to really know a person we have to know how she behaves, and not only what she says. And that’s not only true for politicians. We all form our opinions on others by looking at their actions, more than their words. Many inter-personal problems result from NOT looking at people’s actions, but focusing on other aspects, such as their looks or their words. Behind superficial distinctions such as physical appearances, over time we often realize similarities with other people based on their and our actions.

(null)

Our vision of a World Map of Behavior
At Datarella, our vision is to show the actions of people around the world on a global map. By displaying the actions of people of all continents, we want to tell stories about the differences and similarities of global human behavior – to draw a picture of human co-existence. There already are snapshots of global behavior, provided by data focused companies, such as Jawbone, who map sleep patterns worldwide. From that we know that Russians get up latest, and Japanese get the least sleep in total . And there are different behavior-related maps, showing the world’s most dangerous places, defined by the number and seriousness of crimes or actions of war.

Co-operation & Participation
To create the World Map of Behavior is our ambitious project for 2015 that we won’t complete alone. We need your support: if you are an expert in the field of mobile sensor data or if your company already focuses on collecting and interpreting mobile sensor data in the fields of mobility, finance, health or transport and travel. If you are interested to play a role in this project, please send us an email with a brief description of how you would like to contribute. We are looking forward to hearing from you!

Access Smartphone Data With our new API

Datarella now provides an API for our app ‚explore‘, that allows every user to access the data collected and stored by the app.

An Application Programming Interface, in short API, is an interface for accessing software or databases externally. Web-APIs giving us access via the internet, have become the principle condition for most businesses in the web. Whenever we pay something online with our credit card, the shop system accesses our account via the API of the card issuing company. Ebay, Amazon, PayPal -they all provide us with their APIs to automatize their whole functionality to be included in our own website’s services. Most social networks offer APIs, too. Through these we can post automatic messages, analyze data about usage and reach, or control ad campaigns.

The ‚explore‘ app was developed by Datarella to access the smartphones internal sensors (or probes), and to store the data. It is however not just about standard data like location, widely known because of Google Maps. ‚explore‘ reads all movements in three dimensions via the gyroscope, accelleration, magnetic fields in the environment. Mobile network providers and Wifis in reception are also tracked. From these data we can learn many interesting things about ourself, our surroundings and environment, and about our behavior. To set the data in context, the API also gives out data from other users. For the sake of privacy and information self-determination, this is aggregated and averaged over several users, so that identification of a specific person is not possible.

With our API, Datarella commits to open data: We are convinced, that data has to be available for users.

➜ Here is our API’s documentation: explore.datarella.com/data_1.0.html

➜ Here the download-link for ‚explore‘: play.google.com

We are excited to learn, what you will make from the data.

Download the 'explore' app here.
Download the ‚explore‘ app here.

Sharing Goods And Sharing Data: Both Is Fun, Big Business And A Social Responsibility

Around 2010, Lisa Gansky coined the term Sharing Economy, or Mesh companies, offering their customers efficient shared access to their products instead of selling their products to them. Recently, it’s being called Collaborative Consumption or Collaborative Economy. It’s all about finding ways to make better use of valuable resources that have remained unused. Convenient access is being made affordable to people who can’t afford different products, or simply don’t need to own those products since they would only use them infrequently.

Typical mesh businesses like AirBnB, LendingClub or Cookening, demonstrate the power of sharing in very different ways: AirBnB is on the way to pass Hilton as the world’s largest hotelier in 2015, that is 7 years after its inception. The US peer-to-peer lending company Lending Club has originated over 4 billion USD in loans – it was originally founded as a Facebook app in 2006. The typical Mesh business runs a stylish app with a high usability. It’s service is new, easy to use and affordable. But all that does not fully explain the tremendous speed they conquer one market after the other. Who is the driver behind the Sharing Economy and it’s success?

It’s the user.
It’s the user. The user offers and asks for private overnight stays on AirBnB, the user provides and lends money on LendingClub. Even with services like Zipcar, when the product is provided by a company, the user „uses“ a product instead of buying and owning it. He has to rely on other users‘ good maintenance of Zipcars, since if there were too many ‚abusers‘ the company had to raise rates and the product would become unaffordable for most people. The same is true for AirBnB and others: users have to be sure that landlords don’t sell cubbyholes to them, whereas – vice versa – landlords have to trust their guests not to steal the TV or destroy the flat. So, the user has to use the service and she has to behave in an orderly manner – this is the foundation for a properly working and successful Sharing Economy.

The Sharing Economy

Image: The Sharing Economy, Latitude

Now let’s adopt the principles of the Sharing Economy to the individual who shares her statuses with her social graph on Facebook, discusses the latest news on Twitter and shares her preferred fashion designs on Pinterest. She dos it because she wants to express herself and she wants to communicate with a wider circle of friends than she can meet in person. She communicates in both, synchronous and asynchronous ways. She has learnt that the more she adds to discussions, the more she gets in return. In Social Media, she experiences the Pay-it-Forward principle in action at its best.

Sharing Economy has attained full age in 2014
Let’s assume we can all agree on that: communication openly and actively, sharing ideas, opinions, homes, cars, money and much more with others is not an extravagant imagination of Utopia, Inc., but a multi-billion dollar business eclipsing traditional business models around the world. Furthermore, it’s not just a gigantic business but a sympathetic and friendly way of matching supply and demand of individuals. Who wouldn’t prefer an individually furnished private home over a standard hotel room?

If we agree on the power of sharing the above mentioned martial and immaterial goods, can we also agree on the power of sharing data? Our data? Our own body’s data? Can we agree on the tremendously positive and socially relevant effects of sharing the data we produce ourselves, day by day? If you own a smartphone (you most probably will), you produce about 20 MB of smartphone data (i.e. data racked with your smartphone’s sensors) each day. Perhaps you haven’t been aware of that fact, or you just didn’t know how relevant this data could be for yourself, and for your social graph, respectively. Do you know how much you move each day? The U.S. Surgeon General wants you to move at least 10,000 steps a day to prevent and decrease overweight and obesity. (It’s very easy to know your steps: just get yourself one of those fitness trackers.)

And, did you know that your Vitamin D level is one of the key drivers of your well-being? Most North Americans, North and Central Europeans suffer from a Vitamin D deficiency. Do you actually know your Vitamin D level? Do you know that you can find it out yourself?

Let’s get more complex regarding data: microbes in the human body are responsible for how we digest food and synthesize vitamins, our overall health and metabolic disorders. The aggregate of microbes is called microbiome. Do you have any idea about your individual microbiome? Do you know that you can find out about your microbiome yourself, by using a simple kit?

Sharing Data still in its infancy, but…
So far, we have talked about the relevance and value of our data for ourselves. But – weren’t you interested in preventing your first stroke because thousands of other men at your age have provided their heart and respiratory rates anonymously and based on the analysis of this data you had been warned early enough to take appropriate action?

Wouldn’t you agree that the Pay-it-Forward principle works perfectly in the field of personal body data? The difference to the AirBnB model is that you provide your body data anonymously. It will be aggregated and used in a way that nobody knows that’s you behind your data. Since data analysis and respective actions or recommendations rely on big data, it’s necessary that many people participate and share their own data.

… will become a Social Responsibility in 2017
Today, in late summer of 2014, many people are sceptical and hesitate to provide their data. We think that personal body data sharing will be regarded as quite normal within a few years. If this movement takes up the same speed as the Sharing (Goods) Economy, it will be accepted as „normal“ within 2-3 years. We believe, that data sharing will become a social responsibility, comparable to fasten one’s seat belt or wearing a bike helmet. It probably won’t be called data sharing since this is a B2B term. There already is a very good term  – the Quantified Self, or QS. The term itself does not include the sharing element. But for every active members of the QS movement sharing is a relevant part of the quantification process because the value of an individual’s data is even bigger if used for general purposes.

We regard data sharing – our Quantified Self – as one of the most important movements of modern times and we would love to know how you think about it: please comment, provide us with your feedback: do you already share your data? How do you do it? Or, are you still sceptical?

Feature Image: Max Gotzler of Biotrakr, presenting findings of a Testosterone study at #QSEU14