DeFiDay - Securing DeFi Panel - NexusMutual, ChainSecurity, Opium & Ease
CryptoCanal·Sun, Oct 9, 2022, 12:00 AM
On April 25th 2022 we hosted DeFi Day during Devconnect in Amsterdam. Enjoy this fantastic panel discussion, gathering the best working in securing DeFi! - Matthias Egli (Co-Founder & CTO ChainSecurity) https://chainsecurity.com/ - Ricky Tan (Head of Business Development Nexus Mutual) https://nexusmutual.io/ - Robert Forster (Co-founder and Director Ease) Ease.org - Andrey Belyakov (Founder of Opium Protocol) opium.finance We would like to thank our partners and sponsors that made this event possible. 🌷 Ethereum Foundation https://ethereum.org/en/ Balancer https://balancer.fi/ Oasis https://oasis.app/ Perpetual Protocol https://perp.com/ Lido https://lido.fi/ Figment: https://www.figment.io/ Uniswap: https://uniswap.org/ 🦦 CryptoCanal offers education, event and consultancy services for the crypto industry. Join our telegram community and stay free. https://t.me/CryptoCanalCommunity ETHDam in the making https://www.ethdam.com/
Transcript
foreign [Music] you can actually go and sit down if you if you would like so my name's Jonathan and I'm going to be hosting some of the panels today um aka the wooden bow tie guy [Applause] um I would like to make you aware of two things one there's the chain link Workshop starting now so if that's something that any of you wanted to go to now's the chance if you want to stay here also cool um one thing uh yeah on the fifth floor very important one thing that is very important about the panels and also about the rest of the day especially on this stage is there's a slido so you can go to the that link right there you can put in the code and that will allow you to ask questions and what's going to happen is while the panel's ongoing I'm going to be looking at those questions I can either try to slip them in straight away or towards the end of every panel I'll try and make sure and cover the most upvoted questions so this is a collaborative experience imagine it a little bit like Reddit and we'll try and get and cover those uh cover those topics so without further Ado I'd like to move on to the first panel which is securing D5 I already have my ties you guys already know him so I'd like to invite Andre up to the stage as well as Ricky hey Ricky um I'm gonna sit here and we also have Robert thanks a lot guys yeah you can yeah take it easy yeah there should be a water also behind there as well so guys um oh thanks a lot for being here today thanks a lot for being here off the Rave as well I know maybe you guys win I'm not sure anyone go okay there we go responsible humans um so yeah for the next uh half an hour or so we're going to be just going through some questions and um obviously because there's actually four of you on this panel um you know if they're if you feel like you don't have any value to give to any of the questions then you also don't have to answer it's okay no stress [Music] so uh let's just jump into the first question we all know that hacks are happening right which matais just explained that and um yeah it's an important topic um what do you think that the ecosystem can do more of to present prevent these hacks from happening in the future tour could any of us just jump in um a year a year and a half ago I guess I would have said further focus on bug bounties and further focus on users demanding audits and we're continuing to improve in all of those areas I think active security new novel bug Bounty methods all of those coming up will be very helpful but at this point I also think we have to come to the conclusion that we can't always prevent them there will be nothing we can do to always prevent hacks and really getting covered against tax is an important part that when they do happen everyone's still safe No One loses funds I think it's also part of it is just like it's so early and it's also just a matter of like education and awareness because there's this thing called hacks but you know there's all these different types of hacks like your retail user might think that if he or she loses his PRI his or her private key or gets fished they call that a hack versus I think um similar to what Robert just mentioned like we would focus more on like the smart contract events and exploits um versus like in the industry everything's just colloquially referred to as a hack when in fact there's very like there's this whole comma of gamut of things that can happen to your funds I do believe in the market and I do believe that uh it should be a market who is putting um I call it check-in balances so if there is a market of hackers let's say so they're always going to try to hack so we don't know where they are there's going to be a kind of market so it should be Market of protection or Market that resist and I believe only Market mechanisms uh can prevent us so we can we can say okay there's going to be a mandatory audit because it's also hackable and any system is hackable but if we say okay there is a market there is a price of the risk and if your assess it high then it's going to be high then probably you need to work out and make it low increase quality and so on so on these type of mechanisms that's mostly what I believe in in the long term I just want to add one thing I think in this case thinking about the common goods approach is also very valuable because it can be very devastating for someone to lose their private key with a thousand dollar value in it and and that is not something which which anyone can really follow up it's not something where the governments the police can help they don't have the technical capabilities as was already mentioned we think of hacks as smart contract tags we think of hacks as hacks when they exceed usually something significant so usually that's seven digits Plus nowadays and having this base level security provided which totally doesn't exist today of um some groups some incentives which not through insurance but through active enforcement tries to help recover those funds and to some degree increase the stakes significantly which hackers today have um that that would already I think help a lot to to like prevent the long tail of hacks fishing skimming all of these things and I want to add on to Andre I guess I guess I want to kind of disagree because panels need more of that I think they um I think markets can be super irrational and markets don't always know well never know what's going to happen uh our model really does more of a risk sharing alternative where people share a loss when it occurs people pull their tokens if a loss hack it happens everyone pitches in to pay them back I think they're a lot more definative models like that that can be used and we can disregard markets for a lot of things like insurance or risk sharing thanks so much if the Market's uh irrational yeah they are sometimes they are but show me this market so I'm going to jump in with the money I'm going to make it traditional and I'm going to make myself reach that's how it works so and that's why I say I believe it's uh in the long term so when my little everything is a little bit more mature so then these mechanisms mechanism will work don't you think so uh I don't think so with insurance specifically with coverage specifically um I think trying to price that risk in an industry such as this is nearly impossible I don't think people really understand with our data from last year the worst case scenarios were 0.25 cost for users for full coverage but if you're trying to guess at risk and you lower it that much and so the Black Swan event happens you're screwed in that case as to traditional markets stock markets something like that maybe are much more rational but for something where you really have to be telling the future and preparing for something you have no clue how it's going to go I think they're much better alternatives well let me not take the hold the panel but I just want to make an example if you make a contract which is for insurance contract CDs contract whatever it is and then it covers certain smart contracts hack if it's a lot of if it's too expensive um then I'm going to sell it basically and I'm going to be rich and I'm going to sell it uh as much as I can if it's too cheap then I'm gonna buy it and uh market price should be somewhere around so there is like if it's very simple there's no way around of course there are technicalities but let's not discuss all the other panel that's kind of my idea so yeah I think at 11 o'clock there's also going to be a lot of discussion about insurance with D5 so I think so the next question I have is particularly when it comes to securing D5 as people that are working in the space in the security space what are kind of tips that you would give to people about securing default kind of what you what do you wish more people that are building D5 protocols would be aware of I had a lot in the talk so I'll leave leave it to the others to add theirs I think composability is one of the biggest things I think watching out how your contract interacts with other contracts is essentially is currently and will continue to be the biggest risk in the ecosystem that you can get your on your contract audited 20 times but if another protocol comes out a month later which add some sort of capabilities to tokens that you never thought of you're screwed so without you really need active security monitoring and bug bounties I guess bug bounties are a big thing we had a problem where one company upgraded their contracts behind ours so even though we had no bugs it just stopped working I think there's gonna be a lot more of that yeah and I would I would just also add that one of the I mean I'm also looking at this from like an insurance angle like one of the things that we see a lot is that these protocols days changed they just changed their stuff so quickly it's like one month they're chasing they're building one product and three months later is something totally different and just means that if you're always chasing the next thing shit's gonna break like just not you know just to put it bluntly and like the most I think the the com the common denominator with like the protocols that people deem and so far have been proven say for example avian compound is that you know compound V2 it's like it hasn't changed basically or not significantly because they've just been so much focused on product and the same goes like in this in the stable coin landscape you know there's all these algo stable coins well lots of them are changing every month like what the mechanism is and there's only like a few out there that you know have just kept focusing on one thing I have to bring bad news in that regard right but especially compound is an example of continuous changes to governance which famously introduced bucks which is I think it's on top five in the leaderboard yeah but that's stuff like oh which you know which Which acid are we going to add and I know that they had the order work the infamous Oracle bug which happened like what a year and a half ago when Marcus just crapped themselves but I think it's a broader ecosystem is actually very stable and like I mean let's see what V3 brings but yeah just not this is a problem like whenever you change code on chain there is a risk and um this year's list of things which compound was vulnerable to was adding the true USD which has dual entry point where you could steal everything it was a governance upgrade which dripped compound tokens to basically anyone who called it in it was inflating the supply of course in that sense it's not a direct hack but that was I think I don't know how many millions eighty eighty Millions and com tokens so yeah this is just like and they are doing very good work on the security side of things right so it is I absolutely agree this fast moving space is one of the main problems um I have a very small tip infinite approvals or evil so um and then this includes protocols right because you know infinite approvals you give to metamask because you don't want to spend that gas again this is one way but also whenever you use something like um uni swap you give infinite approval to UNI swap to use your token and they ask for that and many other projects do too there is a safer way to basically always reset it after that transaction to not be exposed for all eternity to removing all your future funds if there is a bug but yeah there are many many of these recommendations out there that's exactly so that's you can still override it but I think it's responsibility of the project to be a bit more responsible just to give a little bit less than infinite and what we need in D5 I think we need projects to think about these type of things instead of users So Pro I would really be happy to see that projects of projects are thinking of security and they buying security and offering security so they may still give you an option you want to use it with security without security but it's I believe it's not the user who are going to decide that he needs security then he's gonna research the market then he's going to say okay maybe I buy this security and that can be very complex and okay and then buy security for himself so it's very difficult I should be I should think I need to wake up uh I think that it should be the project who is deciding which security is credible uh making sure that it's very easy UI and giving a user an option just to be secured and have a little bit less return or be unsecured on on the topic of also smart contracts and all of this um one of the big talks of devconnect has obviously being l2s but also there's been a lot of hacks in kind of cross chain and this kind of environment um what are your thoughts about you know uh the things behind the cross chain is one of the main attack vectors at the moment and protecting against that a lot of it what is that is sold to the public as cross chain or bridge is essentially a form of a multi-sig wallet and that's the reality that we face right now because you know obviously there's a lot of yield and it's called like Returns on other chains or just like swapping from one chain to the next but what a lot of users don't know is that part that their funds are essentially stuck in them well are stuck on one side of the chain with a multi-sig so there you just have all these just call them like fishing or social engineering issues which I mean that's happened a couple times have passed couple of months um so it's just something to be aware of yeah a hack yeah it's terrifying it's terrifying well they just they control everything as such a base layer that if they get hacked everyone's screwed it's very scary um yeah and there are a lot of improvements I know a lot of talks here about different ways to do it and I think they'll keep improving so hopefully it won't happen as much in the future but it is a very scary weak point in the system and one we definitely have to watch out for they they need to spend a lot of money on protecting those yeah well so the the following question going down that route is obviously you have the technical attacks you have the phishing attacks but there's also in defy these economic attacks right where you may be trying to you know one-up everybody else or governance and things like that what are your thoughts on those sorts of this new generation of attacks that didn't exist before well that's very interesting topic because uh indify projects trying to reinvent Finance sometimes so we have all good instruments like Futures options uh so on and um we see a lot of new instruments which can be economically not very well designed and some projects and some people are not going to put the names but they make 10 projects a nine are hacked so economically not because the smart contract is bad so I think that there is nothing wrong in a financial system uh in terms of mathematics in terms of yield Curves in terms of instruments yes there are problems in maybe overregulating Financial system and transparency of banks greatness of Banks and so on but the future contract basically it's amazing instrument so and I believe it should be some balance between like okay over engineering overkilling and creating something completely new while still the whole system still allows you to solve problems just make it transparent just make it on a blockchain and so on I got a question did anyone ever use a flash loan and not to attack a project so we have some users nice nice okay seven no no there's actually a decent amount here it's a shy hand Rising so I'd say like 10 plus in this audience of perhaps what to see if no this is decent this is very good because in my security mind flash loans are like a tool for attackers and then suddenly we have to think about everyone having billions at their hand and being able to Market manipulate like crazy with with no skin in the game um and and I'm happy that that flash loans do serve a different purpose too in practice but um I I would also Lobby for like probably limiting the um ease of access put some cap in the Y2 billion right I mean it's probably hard you always say like hey someone else but then do it but these projects aren't only Market driven I would say they are also Community Driven I'll give you one famous example flashbots right so flashbots is this project which allows you to bundle transactions exit they are then going to be executed uh one after another which is otherwise not possible you can always be sandwiched front run whatever so this is an attack quick test this is how you can attack smart contracts but also the community agreed that we want to put this tool in everyone's hand not only in the hand of the big mining pools anyway can do this right so this is something to think about which tools do we want to give to everyone and where do we want to put in cups to to at least limit the damage and I can tell you with limiting with not having 2 billion plus in the other flash loan pools some famous famous hacks wouldn't have been able to be executed in the way and we haven't seen flash loan-like attacks before when Wales had the same amount of money right so this is something to think about anything else out about it economic attacks I I implying that flash loans are not so good instrument just to be clear or they are an in it's it's like something which can be used by an attacker against a smart contract so in that sense they aren't good and they are useful for other things obviously to to allow Arbitrage to everyone so but yeah then again I don't know if an Arbitrage opportunity needs to it's very rare I assume that an arbitration is so big that 2 billion makes sense to invest to and then be able to pay the fees which which aren't eligible uh just a small example maybe uh when you uh buying long position on a let's say we have defy all instruments identify when you're buying a long position and you selling a short position it's basically the same thing and uh to match those type of positions when one wants to let me think sell his long position and another one wants to buy shirt it's not obvious for smart contract and for example how some projects are doing they give a flash loan they convert long into short and then the orders can be matched for example and some engines work like this using flashlight every time so they use Flash launch every second and that's amazing because you don't need the capital to to fund these small type of things but you can get flashlight sorted out done so which how much do you need a flash loan uh depends on the order so any order can be matched distributed so if you put what do you see in practice well the practice now volumes are growing still in device so we see small volumes but like a million or yeah okay but I'd like I'd like to move on to the next question um maybe we can have a flash loans panel later um so this last question that I'll ask and then move to the audience question so vote now um the last question I have and if you can go through this quite quickly is uh bug Bounty is a super important part of securing defy um what is one of the top tips that you could give when designing a bug Bounty program to the D5 protocols and the people building in the space uh mimic how do I say it make a critical bug hurt uh critical bug should be big enough that it it would hurt you as a company uh you don't you need to give so much incentive to bounty hunters to actually take a look at your code and it's almost at this point with the growth of bug bounties it's almost more of a marketing task than just getting it out there alone it even if you put up a hundred thousand dollars or something you have no promise that anyone's actually going to take a look at the Bounty and spend time on it and I think there are also new methods we can kind of deal with those we recently paid a bounty hunter a fixed amount of money to look at the code for a certain amount of time and then he also got the money from the Bounty itself if there if you found anything um I think you really need to focus nowadays on marketing because it's also hard if you put it up no one responds you think it's safe but you also just don't know if no one looked at it at all so you need to put a lot of effort to make sure people look at it don't expect anyone to look at it but expect that people who realize that there is an issue that they then Target you and will use the back bounty to claim their rewards right it is not like an audit where you look into what ads what all can be done where where are all the insecurities it's too very to protect against a very targeted attacks and then there it's very effective and then because you ask about like how to best approach it there I'd say go to one of the um if you're a small protocol use what's out there which basically is go to one of the big providers and check out how they say you should onboard this because they have excellent educational material what to think about this is the best I can advise thank you well we all know about the bug bounties problems and so on but I'm a market guy again and I want to say that uh it can be a market and giving a bounty for a box you're basically selling insurance and what I really want to see that Auditors are joining this so Auditors take their money they put skin on the game they sell this insurance that's nice and that's the market mechanism how I can decide that this hacker or hacker this auditor is good so if I see that they put skin in the game they joining selling insurance they provide boundaries as well I'm gonna do on audits with them and that's very strong signal not happening in the moment but that's a really great I think I'd like to see that happening as well yeah I'm with Andre it's like focused Less on the Shilling and marketing and more on alignment so well let's make that happen I think I'd really like to see that um all right the audience questions so the first ones from Michael with seven upvotes with eip4337 coming do you think it's possible for standard user wallets to shift to being smart contract based versus eoa and will this change risk perception so okay um for for the general audience perhaps um so what we see currently is a shift especially driven through l2s that it's not directly in a wallet your letter controlling your funds but it's being done through a smart contract which can put limits in place um and this is done primarily for technical reasons currently not for security reasons so with um I'm not aware exactly what this EIP went through because there are a lot in this area um I can just say in general that by educating people to have Smart contracts being the central entry point you can centrally through these smart contracts enforce or support some limits which which are very hard to do otherwise so there is supposedly risk obviously so one smart can to control them all is like obviously a centralized risk but there's also this chance to to limit damages this way yeah I think the I don't know if this is directly the question but I think that's why our contract while it's her great overall I know at one point vitalik was championing uh social recovery wallets just wallets where you had you essentially needed someone else on a multi-sig to allow you to send funds if it's over a certain amount or if you need to do it within a certain time frame and it adds so much security that you wouldn't have otherwise as well as if I just lose my ledger or something it may be gone whereas I could text a friend they have it some funds out to somewhere else I think there's a lot of potential and much safer while it's there could we want the security out of the box right and and this is one step towards it was mentioned before projects should provide that it's like an don't make everyone think about it educate them on what's needed at the bare minimum which you can't get away with and then this is being drilled home like the 24 forward thing or the 12 word thing that is super critical there's just no way around it without giving up like the decentralization of it but from there on it should be in the hands of um the protocols and and the chains and so on to help everyone stay as secure as possible imagine you making a mailbox on Gmail and then they say okay you have a mailbox but now you need to go to the market and find a security to secure it and good luck yeah um so the next question from Anonymous is what type of defy protocol is the most complex to audit Bridges lending amms and why is this so if we can quick fire this one I have another one as well probably to me but the most complex ones are those which interact with most other D5 projects and have to interact with them in a way where they need to trust them primarily I'm thinking of like fund management tools which which kind of need to interact with all of these defy things to to do their transactions so the urines of the world the these these ones just are incredibly hard because of the complexity you need to understand many many projects and then there are the math heavy ones where it kind of single out curve as one of the most complex ones from the mouth um yeah these ones are both on very different levels incredibly challenging to audit any other thoughts guys no I was literally going to say the journey curve type type cut down oh and like the the bridges and the off-chain solutions where you know and we're starting to see they're just like aggregators of bridging Solutions which just like compound all the you so you have all the issues of the individual Bridge Solutions the wild the wild west um so there's one question I would just like a yes or a no from each of you our emergency shutdowns a must maybe no no but at this stage yes I know this this state of the market no cool trust something which has an emergency shutdown don't trust it it has an emergency child and I mean if I the only option I had out there was to do that like if every protocol had it and I knew like that no matter which one I use and there are some great simple fully decentralized like no control any more projects out there some stable coins like that some like the uni swap uh V2 is famous for that right so I really like that we have that today and it's secure uh from all we can tell cool and I want to give each of you one opportunity to maybe share something with the audience something interesting something cool that you've seen and then we can wrap up from there or words of inspiration focus on building something for the long term nice yes and we need more developers in solidity yeah so and we're hiring by the way um come come and reach out to learn like to to learn all these super interesting things in the space especially security of course because he'll be deep down in Rabbit Hole very quickly and and it will be it will be a ride you won't regret in a way used if I use all the benefits that D5 provides don't take finance and move it onto the blockchain actually create blockchain Finance cool thanks ever so much Blaze please please give a round of applause [Applause] good [Music]
Automatic transcript — names and jargon may be misspelled.