DAPPCON 2018: Alethio: Do You Know What’s Going On? - Dominik Muhs (Alethio)
DappCon 2018 · July 2018 · 16:53
Raw Ethereum data does not by itself explain what applications and users are doing; the talk argues for adding application-specific semantics and context. It turns CryptoKitties births into a relationship graph and normalizes differing decentralized-exchange protocols into orders, tokens, amounts and fees, while noting that the live DEX database was still resolving details. A Sankey view traces ether from the EOS crowdsale toward exchange accounts, but the talk explicitly frames this as community-oriented analytics rather than forensics.
Speakers
Topics
From DappCon 2018, hosted by Dappcon Berlin.
Transcript
first things first a little bit about me and I'm gonna explain some way some principles about how we're doing in all it takes I'm Dominic I just recently finished my bachelor's degree I've been working for Alessio for not so long I didn't have a background and blockchain stuff before that I mainly focus on doing nice back-end things and data analytics whenever it's necessary some background about Alessio we're part of consensus we exist we've been existing for a little more than a year by now and we amassed in that time 23 members from China Brazil
the US Germany and Romania so we're fairly distributed and what we do is just the basic everyday business is way our business is extracting data from the etherium blockchain piping it through an analysis pipeline and then the way we actually make money to finance all our fun stuff is we provide dashboards to customers and different levels of complexity so beginners developers dev ops you name it but this talk is going to be more it's going to be less about Alessio products because I'm not a sales
guy I'm a deaf guy it's more going to be about complexity and awareness on how to deal with that kind of complexity so for many users the blockchain nowadays looks like this and in that haystack we have a plethora of data and people are desperately trying to pour out relevant information for them from that haystack and oftentimes they start to get frustrated with the complexity of of pulling that data out and even if they manage to put out relevant data to them they are still being faced with the complexity of actually making sense of that data so
just to quickly revisit what what the categories of data are that we have so we have for example Network data so everything related to transaction pools and minor data stuff outside of what we see in for example log events so blog entries when a smart contract executes basically give hints about normal operations right whenever a developer wants to write to a log they can do it but if anything fails we will rather see it in the transactions and contract messages or internal transactions as
easy as what is the name ether scan coined it so we try to gather all this data basically and we have a pool of guests and parity nodes running and our basic principle is that wherever you can call a method to get data we do it we gather everything we can and when we aggregate it it kind of looks something like this so this is our version of the haystack and it's fairly easy to see that becomes rather complex if you just mash it together so this is where we're getting to work and I wrote down some
interesting questions that people might recognize as fairly complex if you just focus on raw data extraction like just extracting events from an aetherium client that you're running so for example what can be considered a normal interaction with my DAP what other depths to my customers use when I pay out certain rewards to my clients what do they do with are they being traded are they being reinvested is there some kind of organization grouping among my clients so it becomes rather obvious that to
answer those questions we mainly need two things we need to add context to our small contract interactions and for each application that we're looking into we need some kind of semantic understanding we need to know what the dap is actually doing to provide relevant insights of course we can deal with normal metrics like transactions like transactions coming in or how many active users do I have but in the context of each tab specific to the application there's so many more interesting things to look at which the basis of it of these metrics
is still extracting raw data but we're focusing on making sense of that so if we look at either scan for example we might get event data like this so this is a crypto Kitty's birth we have the parameters we can decode them and when we when we do that decoding we might end up with something like this so this is the line where most people's analytics end so they have this table they can visualize it but what about the actual semantics of a crypto kiddies birth so if we add semantics we might end up with
something like this so this is a crypto kiddies birth graph right an arrow from a crypto Kitty to another means that the crypto Kitty on the the one end of the arrow is either a matron or saya so either father or a mother participating in the birth and the crypto kitty where the arrows are pointing at is the newly born kitty right so building that graph is not really hard it's easy to do when you extract the events but what about the semantics so a nice example for example be on this graph we can do incest detection so first-degree incest and crypto kitties
is not possible as it turns out but second third fourth degree incest obviously as possible and what we could do with the semantic understanding is come up with a metric of how incestuous the crypto kiddies universe actually is because it's it's a giant orgy basically this is this is a brother fun example we're gonna we're also gonna come up with a nice article with that with more detailed incest analytics but if we stay serious there's lots of nicer advanced use cases so the power of doing this
what is called semantic lifting of lifting raw data onto a semantic level is that we're not bound to any protocols anymore so in an example of decentralized exchanges we have a plethora of protocols and approaches we have 0x protocol we have Khyber we have Bank or we have a swap and all of them work in different ways but if we lift this data onto a semantic level it's always kind of the same we have orders they are being filled we have maker and taker tokens we have the amounts we have fees so they're all the same on the semantic level and when
we we actually went ahead and did that because Dex's are a large trend that is not that is to be reckoned with and we came up with a nice database actually doing life analysis and now currently we're monitoring 8 to 12 taxes we're still trying to figure out the nitty-gritty details of everything but we can have a unified table of all Dex queries happening on the etherium blockchain so with this this might be a little a little hard to see but when we do analytics on this it's fairly easy to recognize high-level trends and if we
pipe it into some neat visualizations we can actually see we can make sense of Dex trends as a whole generalized on the whole etherion blockchain so for example we can easily see do we have a laser pointer yeah we can easily see that idec's ism is a major player but we can also see a 0x growth for example we can see the distinct amount of tokens that are being traded we can see all the amounts of trades that we've gotten so this is over the course of ten days from July 3rd to July 13 July 3rd is when we took it online but it's it's still running the table are still filling so the true
power here is accessibility right so depending on whether you're a developer or a complete newbie trying to make sense of certain certain trends you don't really want to deal with this right because parsing the events dealing with finality problems and reorg and running your own clients and then the client instance hangs we already dealt with all of those problems and instead of this we can actually provide this so we just lift the raw data on a semantic level and when we have certain
addresses participating in simple trades like eath transfers we can easily semantically group them and say ok Alice owns this pair of addresses Bob owns the other pair and then what we can actually do is semantically express Alice trades with Bob we don't have these raw transactions anymore that we have to make sense of but we can just say we can just express this in triple subject-predicate object Alice trades with Bob and now we can do simple queries saying is Alice trading with Bob or what is the volume Alice is trading with Bob and when we have this kind of
data representation it's trivial to correlate certain activities visualize them in a nice way as you can see an hour an hour booth at the consensus stand we have a little visualization of blocks on the etherium block changes that come in and you can play around with it a little so you might want to check that out with that grouping however also it's fairly easy to to not group by users but group by dabs that leverage multiple smart contracts and suddenly when you can access that group and say what is the amount of of
internal transactions one smart contract sent to another or how many events have been triggered it's fairly easy now you don't have to take into account all smart contracts in your ecosystem you're just queried by your dad named now I said the word semantics a lot but what has been missing so far in the examples is actual context about our users or how dabs interact with it with each other so when we look at raw event data you can obviously see direct interactions but this is not all that is happening we might miss out on interesting activity right so I'm sure most of you guys heard
about the bank water security incident and funds being stolen now the interesting question would be where do those things go obviously you can look at the transaction on ether scan and you can try to click through it but it's it's fairly easy to distribute the stolen funds in a way through washing accounts and doing money laundering that with simple ether scan transaction clicking you just won't be able to follow it anymore of course you can sit down with your calculator and type in all the transaction volumes and try to see where it's going whether it ends up at an exchange but you don't really have to invest that work when you when you work
on a semantically lifted level anymore and that last question what happens to ether during and after I cos when people invested that bugged me personally a little because I'm sure all of you guys heard about this weird little project called EOS and here's the yours crowd sale contract is transferring all if it gets to the EOS owner contract and from there it's kind of weird because they the ICO is still running but ethers being transferred out and I asked myself okay well where does it go and there's actually little use cases for this
visualization but here it's spot on it's called a Sankey diagram so we can actually see the sale contract so we have all the contributors of the ICO we have the sell contract and we see one two one all either is going out to the EOS owner contract and from there it gets kind of fishy and as I said if you try to do this manually Jesus that would be too much work what if we zoom in here a little we can actually see that after some account eath is being traded at BitFenix
or or other exchanges further back we also have Kraken and Polonius so this is kind of weird but the whole point is we actually do not do forensics it's more about community empowerment and fun we do this because we really enjoy it but the basic principle is we can provide analytics we can hit up people with data and from there you guys the community can make educated decisions make the ecosystem a little more robust and further the whole cause of the etherium blockchain so there's some other stuff that really interests us I'm personal personally with my security background I have a
strong interest in post-attack analytics we do anti-money laundering we detect anomalies on a semantic level and we have a live pipeline where you can just submit a query and then as blogs come in you get life analytics for it and my boss told me to add a little personal touch and I'm a real fan of crypto Kitty's actually so we also do some some more analytics on crypto kitties but so to spread a little more awareness about about semantic analytics we have to do this even more we have the principal's bow down right now it's all fairly
stable but as a little call to action we're always looking for new cool interesting stuff for new interesting ideas not necessarily to sell them as a product but just to have fun and to give something to the community it's all about opening up the data that we have and using it to empower people so they can make educated decisions