The Next Generation of Crypto Antivirus - Michael Rosmer (De.Fi)
ETHMilan 2023 · 24 Nov 2023 · 27:33
Michael Rosmer of De.Fi explains why web3 needs a crypto antivirus to bring more people on-chain safely. He covers fragmented user experience, billions lost to hacks and scams, and why manual audits cannot scale to millions of contracts. The talk describes automated static and dynamic contract scanning, a database of past failures, and a platform that connects wallets across many chains. The Q&A touches on tracing stolen funds and integrating dozens of chains.
Speakers
Topics
From ETHMilan 2023, hosted by ETH Milan.
Transcript
all right well thank you for being here everyone how's everybody doing awesome awesome sounds great so as I was kind of contemplating the topic of today's discussion one of the things that I was thinking about is a little bit of the subject of why are we here so why are you here why am I here what brought us into web 3 and I think you know some people come to make money that's cool uh but I think the more noble purpose that we're probably here for is really to build a new Financial system and when we think about that this does not mean rebuilding the existing
Financial system on web two rails or something like that we're aiming for something much more challenging which is to build a new system that is based on this principle of decentralization and the reason we're doing that is because we somehow feel that the existing system is grossly unjust there is something flawed about it at the core that cannot be addressed I sometimes tell people whenever I'm doubting web 3 I just go and use the traditional banking system and my faith is immediately restored it's just a a terrible terrible thing uh but doing that brings with it a lot of challenges
when we go got started my co-founders and I in uh this project d.f we started creating you know we were out there trying to do stuff ourselves and all of a sudden you realize wow this is really complex there's lots of challenges with lots of fracturing you don't know what the smart contracts are there's weird names like sushi and you know you're like what is this stuff so we created the first uh telegram group specifically devoted to yield farming and we went and were the first ones to open- Source the audit process we hired a team of Auditors and people could request and that was quite successful uh fast forward a little bit and see if my thing is working here oh
maybe it's not working okay well we'll leave it for a second he'll he'll fix it um anyway fast forward a couple years we have ah perfect thank you should work let's just check y perfect thank you um we've grown a lot we've got over 3 million user wallets uh on our our platform tracked now over $25 billion doll worth of assets and I think that's you know a pretty pretty big success this being said this is a far cry from where we need to be I think no matter what your reason is for being in this room today
one of the really critical critical points of achieving this objective is expanding the number of people who are in the space and this is necessary if you believe in building a new Financial system because of the fact that Finance has these deep Network effects right I was talking to a friend the other day and we were discussing a little bit about the idea of putting corporate Bonds on the blockchain and it might seem like a great idea but then you realize well hang on a minute if the company is making money that's offchain and it needs to then Bridge it onchain well this is an added friction there then how do you even know that this is in fact the company that's issuing the bonds it's not somebody who's claiming to be the company who's issuing the
bonds and so you have all this host of different challenges and so it really only works well if we set up an environment where we can bring everyone on and we talk Lots in certain circles about the next billion users or something like that but really it is that it should touch everyone who has anything to do with Finance and what we discover as soon as we go out and we try and Achieve that objective is there are a whole host of challenges and certainly there are you know some great people probably you guys are among them working on really interesting things for us there's a few key areas that we're heavily focused on and these would be first of all the usability one of the things that we
notice a lot and you guys have probably seen it yourself is there is a lot of fracture experience out there so just a simple example if you were to tell somebody hey you should get into defi what what do they do where do they go it's not really that easy to figure this out you know do you go and download metamask well then what you know you have nothing in there you can't do anything with it do you go and sign up on a centralized exchange well that's not really defi okay you know so how do you go from that to actually getting money into a wallet but on the other hand once you get money into a wallet where do you go then it's you know you have to find these random web pages and somebody's spoofing it creating a fake
version of Unis Swap and they're going to drain your wallet or something like this it's a terrible experience and the second part is we track in DFI all the different hacks and scams and things like this well over 77 billion dollars have been lost to hacks and scams we're not talking about people who have bought up high and then it's gone down we're talking about you know projects that have had rug polls we've talked about situations where people have gone and created infinite minting inside the contract deliberately to take away from the money of the users let's just be honest you will not get billions of people coming into an environment where that is the case can you imagine if you
put your title of your house onto the blockchain and somebody could go and through some exploit take it away from you like this is a terrible environment uh I remember back in the day losing money on centralized exchanges I had a couple cases where there was some exit scam and it made me deeply distrustful of centralized institutions I'm like hey look the whole point of web 3 is supposed to be decentralization supposed to be self- custody we shouldn't be in a situation where we need to rely on these centralized actors so great when I discovered Unis Swap and tried swapping something for the first time without needing to give up custody of my tokens this was amazing this was like the greatest thing ever I was like oh wow
and then you see that well actually you know you deposit money into vaults and those vaults get drained and you know somebody goes and finds some other way of taking your private keys or whatever so we have to do something to solve that problem if we really care about bringing many many people into the space so this is where we are working really hard to try and build a software solution that addresses this and I think at the core of what we're doing at the core of our mission here is to try and solve problems with technology I'll talk in a little bit about kind of the regulation side of it but I see a lot of people who sort of flee the underlying ethos which is deeply anti-regulation at
the first signs of trouble because Hey listen Regulators protect us as opposed to the whole idea what do we say code is law right there's this idea that at the core we should be trying to come up with Solutions that are applied equally across everyone and that we can internally solve the issues and that creates all sorts of Downstream effects that are really positive because our iteration cycle is much quicker we have are participatory so you can have a lot more people involved you're not in a situation where you have these large incumbent organizations and these corporate hierarchies you need to go through some sort of a messed up situation just to have permission to do something are you kidding me this is ridiculous so for us to kind of Advance this Mission it's really really
important to build great technology driving it and so for us this goes and looks at a couple different key areas so the first is to pay attention to being able to connect everything in one place I mentioned before we have this fractured problem in web 3 and it's fracturing liquidity it's fracturing the user experience etc etc etc well what are we doing here we're trying to bring it all together and so that starts with building a platform that connects not only the decentralized but also the centralized options our goal is not to be centralized at some point in time but the reality is that's how you get started is a lot of people are going to have to buy their tokens through some
centralized form and so we need to be able to connect that all in one place very very important when uh then what what I often say is it's like okay we need to meet the users where the users are right you don't have a realistic expect expectation of getting broad adoption if people have to go into these little silos for this thing and this thing and this thing it's not not going to be sufficient so the whole is greater than the sum of the parts and I think that's one of the wonderful things that we get in web 3 is we get composability and we get interoperability and all this sort of thing but at the same time what is the deal the deal is that you need to have a user experience that facilitates
that and brings it all together and so what we've tried to do is we've tried to say what do people need people need to be able to do some research they need to be able to track the things that they're doing they need to actually be able to engage in some sort of transactions they need to be able to do this very very importantly in a way that is safe so one of the things that you've got you can go on to uh d.f it's free you can sign up you can connect your wallet you can uh track all of your assets across your centralized exchanges or 40 different chain Etc uh you can you can do these things and we've brought that to this is all functional today so that's that's really excellent um but what we need is a suite right we need a suite of solutions and
this is not particularly easy because it puts you in a situation where people are going to have a hard time understanding so this a communication challenge of like you could go and you could create some small little thing and it' be easy to explain but is it useful I always say you getting users requires usefulness it requires usability that's very very important and so I'll skip through here so what have we built we built this concept of the antivirus and some people say hang on antivirus it's the wrong word it's like well again do we want to bring on tens of millions billions of users we need to communicate in the language that makes sense to those people and as I said back in the day what we
did was we went out and we hired audit teams and we got people in internally and we open sourced that to the community and that was quite successful the problem is what do you guys all know audits take days maybe weeks they cost a lot they're prone to human error and you're in a situation where there are tens of thousands at some point probably Millions probably there will be billions of smart contracts out there you simply cannot deal with that in a conventional fashion and the good news about this problem is this is a problem that has been solved in the past if you think back to sort of the Windows XP days I
remember people moving from Windows to Mac largely because of the malware that was popping up all the time on systems it was a really terrible experience but did they need Regulators to do deal with that no they didn't they were able to build a suite of different tools that would keep the users safe and we really strongly believe that this this is important so the idea of building this kind of web 3 antivirus project is to automate the smart contract audit process and so we started with static analysis we went through and we uh we documented through what we call the wrecked database and our weakness
pedia as we call it all the different failures that have happened within smart contracts and so we could scan these different smart contracts for it and on top of that we built Dynamics scanning which allows us to go and look at the code and look at the execution maps and pay attention to all right what are the different uh dependencies that are here what's the current state and what does that mean in terms of the safety of the overall project or the overall uh protocol smart contract Etc very very important so the idea here is that we can have literally hundreds of thousands of smart contracts scanned in a very very short period of time and you don't have to wait for an audit you don't have
to be in a situation where you're like okay I'm out there looking for the latest opportunity oh I don't know if it's safe let me hold off or for a user they don't have to know anything about code they don't have to know anything about the types of vulnerabilities that exist they don't have to know you know what happened in the Ronin hack or what happened with you know whichever different project has had issues all they have to know is that this scanner will scan for them and identify how risky it is and the truth is you'll probably never get it 100% probably today there's still some ways that people are able to exploit things in terms of releasing viruses or whatever but what we can do as a community hopefully is change the game theory on it and I think it's one of the really
interesting uh Dynamics that's at work in web 3 that's different from a lot of different other environments is we start with the Assumption of adversarial environments if you think about Byzantine fault tolerance if you think about sort of the way that consensus algorithms work they assume Bad actors right and what is you're trying to build a system that is resistant to those Bad actors well you sort of need the same thing here why is it that so many people are coming out and finding exploits in different contracts and creating different uh you know projects that are malicious well it's because of the fact that it's really profitable to do so right you can with relatively little
money deploy something that can take a whole bunch from people and we need to change those economics we need to make it really expensive for people to attack with very little payoff and one of the ways to do that is that every user should be able to see in advance whether there are these vulnerabilities if they can see in advance that these there are these vulnerabilities they're just not likely to put their money in there if they're not likely to put their money in there then the people who are going and deploying them are not going to deploy contracts like that and you kind of reverse this whole effect and Hope hopefully drive out a bunch of the Bad actors again we'll never be perfect but if you can get the majority of the way there you know there's a certain tolerance if you think about the
conventional Financial system what have we got is there a certain amount of fraud in traditional Finance yeah there is you know do people make mistakes and lose money and things like this yeah they do but there's like some probably reasonable percentage that you're willing to tolerate and it can still be functional that's where we need to get to as a community so it's really important to do that in such a way that it builds not just for us and the user but across the whole ecosystem and so one of the things we've done is we've gone and we've created apis so that uh anyone can now access the same technology and be able to stretch it across their own platforms
so we've partnered with coin gecko they're one of the people who's integrated us now uh you can see there's a bunch of different universities are using us in their research Etc anchor protocol uh a bunch of others that are starting to engage in this because the idea is to build not just a piece of software that somebody might or might not use but to build an entire Lair that stretches across web 3 and connects it and keeps people safe so that they can get onto this new technology they can take advantage of all the benefits without having to worry about the drawbacks now one thing about that that is also an issue I was mentioning usability very important the reality is what do we know
we know that people are probably not going to sit there and manually scan each thing you just kind of think again using the analogy of you know I don't Norton or sofos or something like this would somebody go to a website click okay scan the website wait for this to happen Etc no they're probably not going to do that right it's just it interferes with the user experience too much so what we need to do is we need to automate the process for them so it's just happening in the background so we created what we call our Shield product and what is this this will scan your wallet this will identify any malicious uh contracts or vulnerable contracts uh you can revoke access to those and preemptively make sure that you're not going to be exposed to Something in the
future that you might not be aware of uh we're launching some really cool stuff here coming up in the next few days that's also going to help give some sense of okay when I'm getting involved in a particular project what does that look like you know are are there risks here and you can sort and filter and make make assessments so that your decisions are risk weighted you think about within the traditional Finance industry what do we got we've got Bond ratings right well we should have something similar to look at what is the safety of different projects like you're going to deposit into some sort of a lending protocol right you need to sort of know on a risk weighted basis what's going on here it's one thing to say okay
well you know I'm getting this yield there's been a big Focus you kind of think back back to going to some of these aggregators and you would see a million apy or something a million apy sounds pretty good I would love a million apy uh but if you're just going to lose all your money not so great so you need to have some context that is security oriented and so we want to bring that directly to the users let me just see I'm doing here on time okay now as I mentioned we have this through this wrecked database you can all go and check it out it's an open source uh tool so art what basically happened and how we've built all of this is our Engineers go through and they look at every uh hack scam rug pole Etc they examine the code they look at what
went wrong they look at the addresses where the money went it's actually a really useful tool for anyone who's lost money and I'm guessing probably if you're in this room you know you might have been exposed to something that uh you've you've lost a little bit on uh so so it's really cool in that sense and it's a great open source tool for the community because other people can take that information and they can build on it Etc uh but at the same time it helps to inform so that we're always up to date one of the challenges in this space for sure is there are new uh vulnerabilities new attack vectors that are always coming out now to be fair what we've discovered from our research is that the vast majority of them follow kind of a similar uh pattern which is
why you can get rid of 90 plus% just by looking at all the different past vulnerabilities and if you're on top of it again the good news here is this is a solved problem it's a problem that's been addressed in the traditional web 1 web2 space with traditional uh software and so we're excited to be able to kind of take that learning and apply it in this particular field and do that at a way that is basically infinitely scalable we've also gone and taken that information and we've tried to put it out there as some proactive reports some times you know uh projects learn from it and one of the really cool things that we've seen is we've seen that people are coming out and they will actually use
our scanner proactively to look at their own code because sometimes they're in a situation where they you know just inadvertently make mistakes it's be honest solidity H you know has some has some drawbacks and uh so it's really good that you can proactively look at your own code see if there's vulnerabilities before you ever kind of publicize it and uh throw it out there and so that's that's really useful on the other hand some people when we've gone and we've exposed what's going on they've stolen the money and run off because that was their original plan and they didn't want to be exposed so you know it goes goes both ways but what we're hoping is that as we do more of this we educate people and as we educate them it ends up being really really positive because of this kind of
permeation across the the whole ecosystem as I was mentioning so we wrote a book on this subject uh one of our early EXP experiences as uh as co-founders of d.f uh sadly was uh was being exposed to one of these one of these rug Poes and so what I always say and I think is the the goal here is look we are as Founders you probably as some of the people in this room have lost millions of dollars in the last few years building on being Pioneers in this key area of trying to create this new Financial system but if we do our jobs really well and we learn from it and we take it and we iterate it and we build
technology to solve the problems that we have had then in the future those billions of people will not need to thank you very much all right all right uh we're going to get questions now we got a couple of microphones that we can uh place it around just raise your hand and uh we go for it who got questions can see your name hello Carlo just a curiosity question I got scammed once with infinity approval
contract uh on a few token on my wallets and I was I got in touch with the project I got in touch with the metamask support team I was curious about uh why there is not standardized uh function or place where you can track the scam and uh then the way this way the the scammer cannot get away with the with uh with the found stolen it didn't seem that metamask had it uh so it felt like okay but it all is all traceable how will it get out with the money uh and and but it didn't
appear to exist uh a fun uh such a database or a easy way to track stolen founds because it's very probably easy to do I don't know how to use metamask per um it scan perfectly so I was kind of lost but I guess it's all traceable so why doesn't exist something like this already yeah I think you know part of my optimism for what's going on in general is that we're quite early and so uh it was interesting we hosted uh web 3 security conference yesterday and so people talked specifically about that uh that subject so there are some tools out there and uh the issue is basically
number one that they're not ubiquitous yet so we're just kind of too early in terms of rolling them out I would encourage you to go and check out our our rec database and see what's going on there uh but there's some other monitoring tools that are becoming pretty sophisticated and are helping with this and they're increasingly getting rolled out into various different uh places like centralized exchanges Etc but I think part of the problem fundamentally unfortunately is that there's a financial incentive for people to accept those funds and flow them through Bridges and accept them onto exchanges and things like this and so certainly as a community we need to do more to push on uh on that because you know that's exactly
it's all trable so it's like this it is all traceable yeah everything I mean you know barrowing like Monero or something like that uh every transaction is public and immutable so you can follow it through and there's some pretty good tools for being able to follow those funds where they've been where they're going Etc and so in theory it's something that they can address and you'll see some examples of where exchanges of Frozen funds specific to given hacks Etc but you're right it's not nearly as much as it should be uh one last question for the sake of time thank you very good good uh talk I
wanted to ask you more about interoperability because like you mentioned that you are currently integrated with 42 chains and that's a lot of chains so like do you how do you handle that and do you plan to let's say build a standard so that also other chain can get into your ecosystem more easily yeah so it depends on which aspects of what we're doing so we've built some sdks so that's one thing that's helpful you do have to kind of look at it from both directions right from the direction of okay we can go and build stuff to integrate but ideally other people build Integrations with us but of course people have to want to do that so hence sdks help a little bit in that regard and the API definitely are
opening up a lot of possibilities so really happy about that which is fairly new for us um then in terms of stuff beyond that I mean the challenge of course at this stage is man hours are limited right so you kind of have to prioritize what you're integrating and what you're not integrating and so for us right now it's fairly easy to integrate evm compatible stuff because you know it's kind of generally the same there's some subtle differences like say the way the Master Chef protocol works with Avalanche in terms of counting blocks versus ethereum or something like that but generally we can integrate fairly quickly like that uh if you start going and saying okay well let's go and integrate with cardano we actually
support cardano for uh for our platform but you know it's using extended utxos and it's it's just a completely different system right different programming language Etc so yeah our goal is as much as possible to try and roll that out and to make everything work together uh but it's a it's a journey so all right thank you well thank you everyone it was uh wonderful to uh be able to talk to you here and uh yeah definitely go and check out d.f as I said it's free so you can go and uh use it for uh for seeing it's actually very cool to just go and connect the shield product and see what's going on with your wallet because you don't know what you don't know and
then you're suddenly surprised you're like okay hang on let me uh let me revoke some access here so anyway thank you very much awesome thank you
Related talks
- Read-only Reentrancy - a Novel Vulnerability class responsible for 100m+ funds at risk
- DeFi Security 101 2023: Full Day, 14 July
- Secureum 🛠 Smart Contract Security The Good, the Bad, and the Ugly - Rajeev
- Holistic Approach of Full Stack Web3 Security, Anouar Ali, Valkyri | ETHSofia 2025
- Smart Contract Security and On-Chain Fraud Prevention with AI
- Notable security incidents since Devcon V | Devcon Bogotá
- DeFi Security Summit 2023: Day 2, 16 July
- Zilliqa ~ Smarter than the Contract: Secure Solidity Patterns and Alternatives
- The streets of Dark Forest are paved with gold
