SotN#20: HARDENING! w/ Demian Brener of OpenZeppelin (Harvest, 'Trustless', DEFENDER)
27 Oct 2020 · 1:15:45
Bankless's Supply on the Network series talks with Demian Brener of OpenZeppelin about the Harvest Finance hack and what made the exploit possible. The conversation unpacks whether the vulnerability was avoidable, works through a definition of what it means for a protocol to be trustless, and covers OpenZeppelin's new Defender platform for securing smart contracts after deployment.
Speakers
Topics
Transcript
unstoppable domains has two products that's helping make the crypto world feel like the old world that we're familiar with but with these new cryptoeconomic protocols under the hood and that is human readable crypto addresses as well as uncensorable domains so i've got my unstoppable domains account open here and i've got my domains registered and so i've got davidhoffman.crypto right and i have my one of my ethereum addresses pointed to it and i'm also going to be able to add my bitcoin address here as well because this is a blockchain agnostic product any wallet that has unstoppable domains integrated will allow you to type in davidhoffman.crypto and if you're sending bitcoin or if you're sending eth or litecoin or hell even ripple it will send it to the address that i've associated on my account so i'm going to pull up my ether wallet here and i've
loaded up an address with a small amount of eth and i'm going to send a little bit of eth to myself at davidhoffman.crypto it's going to populate with the ethereum address that it has but it's also linked to my twitter account because in unstoppable domains i've linked my twitter account to all of the addresses that i've plugged in and so chain link is actually associating my twitter account with my ethereum address unstoppable domains also allows you to spin up unsensible websites which is i think going to become increasingly important in the world ahead of us using unstoppable domains you can purchase a website and use a decentralized storage providers to host it as well meaning that no nation state can take down your website there is no cancelling in unstoppable domains world they even have templates ready to go to help you build out your first unstoppable domain so go
to unstoppabledomains.com register your crypto addresses with a human readable name and maybe launch your uncensorable website today zapper is this new tool that i use to check out all of my assets in d5 as you guys have known d5 has absolutely exploded recently and so managing your assets is getting harder and harder because there's so many different places and so many different assets that it could be so i'm going to put my ethereum address in here and zapper is going to tell me where all of my assets are across ethereum right so uh here are all of the assets in this wallet uh there's there's a decent amount of them and it's also going to tell me where i've deposited assets into various d5 protocols right so there's some yield farming going on there's some liquidity pooling going on we can also look more granularly at the
specific protocols that it's involved with in this explore feature so it's got some assets deposited into uniswap it's got some assets deposited into bouncer and also with zapper you can just exchange straight from the zapper interface right so this is just another layer on top of uniswap or other exchanges on ethereum that allow you to swap assets right so check them out at zapper.fi it'll give you a nice clean portal to invest your assets in defy and you can also connect to multiple wallets if you use multiple wallets all at once and it'll give you an aggregate of every single wallet that you own check them out at zapper.fi also this is definitely not my wallet everyone to state of the nation number 20. we are super excited to bring this to you every tuesday live on youtube we've got a really jam-packed exciting
agenda we've got damien brenner here who is the founder and ceo of open zeppelin he is a security expert we're gonna be talking about the recent 30 something million dollar harvest hack so we'll we'll definitely start there and get into the topic is d5 secure yet but this is a a show where we talk about what's happening generally in d5 particularly what's happened over the weekend or the last week and we relate those events to the big picture insights that you get from the bankless newsletter and our primary podcast what we hope to do is every single episode of state of the nation is drop some insights and action items for you of course this comes out on youtube every
tuesday you may be watching it live now if not you can catch it in podcast format on wednesdays as well it's released there david how you doing man it's it's btc pump day so i'm just having a great day btc is pumping and david is happy about that all right so we've got a jam-packed agenda about d5 security about the dark side of composability um really the definition of trustlessness too so for this episode to catch all of that but let's talk about some other things that are new in the bankless nation we just dropped an episode with our friend nick carter it's the third time i think i want to say a
third time nick has been on some bankless assistance yeah yeah media format what'd you like about that podcast yeah i think what nick was talking about in that podcast and in the article that that podcast kind of was stood on uh gave a pretty compelling reason as to why like the d5 yield farming defy summer ended so quickly right as soon as gas prices hit 400 way that was it it was over because so many people got priced out people had to sit on their hands and stop participating and kind of one of the fundamental reasons why defy summer 2020 was a thing was that everyone was able to participate until gas prices hit 400 gwy so we got nick carter on to talk
about this cycle that happens where you know people transact then gas fees go up and then people get priced out so they stop transacting and then the party kind of stops right but uh the the question that remains is like all right well this is a cycle so at some point you know we have like 20 30 40 grey blocks block uh gas prices right now so like the party is is it's it's ready to be it's an open invitation to get that party started again that's kind of where we are in the d5 block space cycle so i really enjoyed that conversation with nick yeah it was great so david wants to get the d5 party started again he's gonna be low gas fees we'll do that as my take away all right also we've got some uh really exciting news we've been trying to do
this for a while and it's finally about to happen raul paul from real vision is coming to the bankless nation so we are scheduling a podcast with raul paul he's accepted our invitation we hope to talk a little bit about central bank digital currency i'm sure we will but we also have to talk about his case his thesis for ethereum and d5 i mean he's a well-known kind of macro investing guy he totally understands the space he totally understands bitcoin the asset uh i want to talk to him about ethy asset and ethereum and d5 so i'm super excited about that man what about you yeah raul paul he's one of those guys
he's very similar to us at least with me at bankless and producing podcasts and articles like i actually do that for so i can be more educated and then i kind of just share that education with like what i learned with everyone else and that's what that's what bank list is to me uh right i think that's what raul paul's you know real vision is to him like he is teaching but he's also learning at the same time right and i think he and i listen and follow to rob paul and what he puts out and i think he's really in that learning phase where he's really curious about what's going on in the crypto world and he he now understands bitcoin like he's been going down the bitcoin rabbit hole for like the past two months he's onboarded to to bitcoin ethereum's harder ethereum's
harder to get onboarded onto it what's going on in default is harder to it's harder to pull out signal there because we're going in every single direction and so i'm really excited to get that conversation going with raul paul and kind of give him the bankless pitch as to what defy means to us yeah pure educator and he also invests so he puts his money where he's uh where he's selling his education which is the best way to do it really excited about that so that will be let's see we'll record with him next week so two weeks from now on monday you should expect the episode on the bagless podcast uh lastly we are it's gonna be hot it's gonna be hot uh lastly we are releasing something else that's hot our first nft art piece so not gonna show that just to tease
because we'll get to that at the end of the episode but it's on one of david's favorite subjects that's that's your hint yeah you got to wait till the end of the episode to see what that is it's been in the news cycle recently yeah okay all right so let's start with the question i always ask you david every single state of the nation it's this what is the state of the nation right now david yeah the state of the nation is hardening and before we get into any inappropriate jokes hardening is referenced to code getting better getting more locked in getting more solidified think of like a turtle shell right and so you know the the and this conversation started at the dow hack right the dow hack wasn't a hack it was
an unintended use of the protocol that resulted in the loss of funds because the dow wasn't a hard system it had exploits it had soft soft points that could be attacked and and what we're talking about with damien in a second is how code on ethereum code and d5 is hardening it's getting more efficient it's getting more secure and that's what we're doing this week in the bankless nation very cool all right so every time something attacks the bankless nation attacks ethereum attacks d5 we get stronger i'm not gonna use the word harder but that's the hardest play with fire with that yeah all right very good all right well but before we go into other territory we
want to welcome our guest who is a security expert damian brenner he is from open zeppelin damien is the ceo of open zeppelin which is a an ethereum and defy really related uh security firm we're going to start with him by talking about the harvest hack damien how are you doing today sir you there hey ryan hey david thank you for having me here thanks for being here it's great to have you like uh david and i are not security experts we wanted to put somebody who is in front of the bagless nation to talk about some of these things this is of course not the first um event in d5 we've had but over the weekend there was
a hack in a protocol called harvest um i think uh sasel on his daily guay uh site called it a rotten harvest was was the the subtitle there maybe we could start there what happened this weekend with that i guess maybe you could call it a hack you could call it an exploit we'll get to that in a little bit but can you tell us what happened yeah so harvest uses price speeds to understand the value of their assets and makes distributions accordingly so [Music] they were using in particular curves amm automatic market maker spot price
and the the attacker someone that we don't know yet who who they are they use the plush loan to borrow total of kind of 70 something million dollars they use around 11 million dollars to buy usdt uh using usdc which actually created uh the usdt price to go up then they deposited 60 million dollars into the harvest box then they did it kind of like the opposite operation where they sold 11 million dollars of uct dropping the usd price uh down and then they withdrew around 61 million dollars from the vault so overall what they did was they used
the flash loan to get huge amounts of money to manipulate the market price of usdt and they entered and they sold they entered the vault and they they exited the votes netting the difference which was around like 500k uh per cycle the thing is like this person did this several times 32 times in total so by 500k times 32 that's a lot of money this person made like 20 30 million dollars um which also again um economic exploit as we can say exploit okay so we've seen this kind of attack before how would you classify an
economic exploit like how would you characterize an economic exploit versus a different kind of exploit yeah we've seen this things happening uh people manipulating price bids or price oracles using flash loans to manipulate the market and you know buy and sell at different moments in time this some this something very similar happened at bcx one of the hacks that they suffered a couple of weeks or months ago where again there was a flash loan market was manipulated there was a small difference there where like there were two automated market makers so it was
more of a sophisticated operation but going back to your question uh the important thing here is that the security of the systems was compromised like money was stipend because of uh kind of like economic or financial operation that manipulated price and allow people to get kind of like better terms in their deals or their trades okay so and the important point of conversation is the difference between a an attack an art like an economic attack and arbitrage because on one side of the spectrum we like
people take advantage of of arbitrage opportunities on ethereum all of the time there is maybe the balancer die usdc eath pool and then there's the uniswap die eath pool and the uniswap eoscc east pool and arbitragers can make sure that these exchanges are balanced with each other and take a small cut of the profit by balancing out the differences in prices from these different exchanges and then there's what just happened here where this is that same thing but at the same time the attacker also changed itself the the uh the balance of each of these pools uh tokens right and so if this is just an arbitrage opportunity but it the
arbitrage opportunity is created by the attacker right and so how how do you draw the line between what is just normal arbitrage and what's an arbitrage attack it's a very interesting question uh from an ethical standpoint what is the hack what is an exploit and what is an opportunity in a traditional world would you call high frequency trading buying a couple of servers and putting them really close to a near stock exchange an arbitrage opportunity or is that an exploit on on the system you can also say that it depends about the amounts that people trade or you know win or lose but uh i don't i don't like it's a very complex
thing also there are a lot of blurred lines between what an economic vulnerability is as opposed to a logic error or vulnerability in the end these are like systems where code powers real money so when money is compromised either because of a logical flaw or because of an economical flow or a flowing design you as a project need to take all the necessary steps to avoid that and you as a user need to educate yourself or trust uh different people or institutions to do their due diligence and know where you're putting your money okay so we we know that this is an
attack because uh there was an un unintended use of the protocol that lost people money right but that unintended word is actually like subjective and on ethereum there's nothing subjective about code on ethereum there's either code on ethereum and it runs as deployed or there's not and so this is kind of where we were taught what we were talking about on the bankless newsletter yesterday like how do we actually define trustless if we are using these systems that may be unintended by the way that the author of the code deployed it but still intended because that's what the code initially like actually explicitly uh enabled right so so damian i'm wondering if you have your own version of the word
trustless and how how would you define trustless yeah uh i think in the end you always need to trust something or someone like in your example you say that there's like smart contract code deployed on ethereum so if you send a transaction you don't need to trust that code because you can verify it but in the end you're also trusting that the evm works as intending intended you're trusting that the you know pool of miners will validate your transaction accordingly so with respect to trust or trustless it's all about understanding what your threat model is what are the things that you trust what are the things that you can verify what are the things that you
do not trust and how do you you know build your system accordingly and how do you take the necessary steps and how do you monitor also your systems or your trades if you are if you are interacting with these systems so you prevent bad things from happening so is trustlessness even real is is that a real thing ah it's a it's a very blank concept to me um i think in the end you always need to trust something or someone the more you can verify that the better like in a smart contract you can audit the code so you know what what the code is going to do as opposed to a traditional you know legal agreement or a bank where you have no idea how the
bank operates you have no idea what's going on behind the curtains uh but in the end like going back to a smart contract code uh maybe there's someone that has the power to upgrade and change the rules of the smart contract so even you're trusting them so are you trusting a single person are you trusting a multi-sig with five people are you trusting uh you know a dao with thousands of of members across the globe what's the probability and the likelihood of those people colluding and and going against you so damien let's talk about what harvest uh now that we have information about the this attack this attack did happen
so now that we know now now that it did happen we know that it could happen after the fact what how should have harvest changed how their protocol was uh constructed in order to have prevented this what was the weakness that was really exploited here yeah now so on one side the harvesting took all necessary steps in terms of you know building the code open sourcing it hiring security auditing firms to review the code i think their one mistake that they did was you know it was very they they naively relied on curse amm for a price oracle knowing that that was a vulnerability that was previously exploited in vcx for
example there are different protocols that address the price oracle feed from different perspectives and we can go into that because that's a huge challenge at the ethereum space phases especially if you do it in a decentralized fashion but it was definitely avoidable and also i want to say something related to the audience like as security auditors these things can happen you can you know miss things but also it's important to know that a security is not a sign of a security outlet firm it's not now vouching for the security of something and ensuring that something secure is just an information and
thing that we provide based on our experience we have you know i think the best security researcher team in the world with respect to smart contracts and ethereum in particular and and we take a lot of time and effort making sure that they're always up to date with the laser things that are happening so that our chances of missing something are diminished or reduced so damian you offered to tell us a bit more about this in this particular exploit economic exploit where people lost money bottom line people lost money um it was due to a reliance on a price oracle from curve and you indicated that that's you know somewhat of a soft spot
in d5 in general um david called the the episode title of state of the nation hardening right um you know we've had a couple of these now that target price oracle's soft spots in automated market makers with flash loans are we starting to get smarter are we starting to to harden around this particular problem subset what are the possible solutions here yeah so in particular this was a known vulnerability so one problem that we're seeing is even though neuralitis are already known not everyone is implementing them and here we get into the you know kind of struggle that projects have between going fast to market and shipping new
products versus being diligent and reducing the risk that their users have uh and some know some profits have some projects have different no profile risk or different pressures from their token holders or investors or team and that's why we as a company always try to the question is how do you scale security in that respect because if the space needs to you know become harder and how do you uh scale security with the how with the you know the exponential growth that defy or the space is having and we as a company don't think that you scale uh security by hiring more auditors or you know training
all this stuff but something something we did like three years ago is we created uh this uh open source library called opens up link contracts which became the standard library for developing smart contracts with over 2 million downloads and our approach here was to provide developers with standard modules of smart contracts that were already vetted by the community and vouch that they could use and reuse and put together for building their own applications so they already have security practices built in so they could not only ship faster but also with security in mind as opposed to reinventing the wheel yeah what you start to get is into a place with these libraries where you've got all of these
different eyes on the libraries right so you get tons of people looking at it it's it's not fresh code it's code that's trusted in production being used you know i even noticed in d5 summer basically everyone who was doing some kind of a yield form farm of one type or another it wasn't net new code it was like a fork of synthetics right and some of the hardened contracts that they already built out so it it almost seems like that is the way to sort of scale up security is you use these very trusted you know modules contract modules that other projects are using that other projects have eyes on you you try to minimize the amount of
net new code that that you're putting out there is that kind of what you're saying to some extent yes like i think that's a good thing that people are using other modules but in the end like if someone is using let's say a synthetic staking module synthetics build it for your own use case and your usb would be probably very different yeah and you know customizing that contract and also planning it to other contracts that's when things start to get complicated our approach with the contracts library was to build standard kind of like plain vanilla modules so that they could fit every situation and the things that you could build on top
would be quite standardized in some way uh so that's actually something we're exploring right now when we have an open discussion in our community forum about you know how do we find uh the basic foundational components of defy and provide those to the community as plain by nila standardized contracts that everyone can use and again i think or we think that's a way to scale security which is tied to our mission as a company to protect the open economy very cool and that is something i think folks lose track of this because um we talk so much in d5 about scalability right and generally when we're talking about scalability we're talking about things like transactions
per second if only ethereum could could uh host more transactions per second well that's only one dimension of scalability when we're talking about a global financial system you know security maybe that's even more important than the amount of transactions are the contracts that we trust are the core primitive d5 protocols that we trust actually secure right so uh security is a massive dimension of scalability for this open financial system that's why we appreciate the work that you guys are doing but i want to get back to something a thread that david was unpacking a little bit about this this notion of trustlessness right and what what we might want to use is a bit more of the term like um
given that we were just talking about it's like it's kind of a spectrum so we might use a term like trust minimization right rather than trustlessness to sort of narrow down the actual pieces that we are trusting and that we can't see but you mentioned something earlier about hey even in these d5 protocols you are trusting something this is what the transaction behind the harvest hack actually looks like right so um it you know for folks listening on the podcast you can't see this i call this attack uh the 160 iq attack yeah exactly i mean it's uh it's it's just a blob of of you know uh lines and and dots and transactions in and out and this happened in like a seven minute period of time maybe less and it
repeated over and over again i mean a typical defy user on the bank list journey does not understand this right does not understand this and does not understand why harvest like went wrong and if they had funds in it probably doesn't understand why they just lost a whole bunch of money so that's back to your point about some trust being being required even in these d5 transactions i i guess you know the question is like we're not trusting necessarily a bank we can see all of the code executed on chain but in the most trust minimized sorts of d5 protocols what core things do we have to trust how can we boil out everything else and get
to the kind of the core pieces in the most trust minimized d5 protocols and david in his piece earlier this week talked about that hey that's the way we scale d5 is we get to a place of massive trust minimization of these protocols but how do we get to that place and what do those protocols even look like what are we still even trusting in that scenario yeah even though as you said the smart contract code is open and anyone everyone can or anyone can can inspect it uh very few have actually actual skills to understand all of this so in the end you're kind of like trusting that the project team that is building this has understood what they're building and took all the necessary steps to minimize
those potential exploits what that means is like you know defining what the threat model is implementing normal or kind of security measures for non-vulnerabilities understanding in which scenarios their system could fail because in the end these are like living systems and there could be scenarios with respect to price manipulation others where their systems could break and generate losses for people systematize that audit your system and then perform continuous operation monitoring on your system so that you can see if your system is approaching one of
those critical scenarios and if that were to be the case have the necessary safe words or circuit breakers implemented in your code to make sure that you can take action and prevent bad things from happening for example if you're seeing that there's a price manipulation happening you could have functionality in your contracts where you can post that feature and and then you see that happening and you do something about it can we get to a place with some of these d5 protocols where the only things that we have to trust are a theory in the protocol and obviously the evm right because anything on ethereum requires that at a minimum requires trust in ethereum and the platform and then just trust in the smart contract code itself
that there's enough value secured in it that it's gone through enough kind of eyes on the security that it is um like trusted enough and that and that's kind of it like is that is that sort of what the objective is for a lot of these d5 protocols to minimize everything until all you have left is ethereum the protocol and just some code in a contract securing billions of dollars with you know hundreds of thousands of developers who've looked at the code and audited it and it's gone through every security you know review that that exists is that kind of the gold standard i guess the most trust minimized thing that you can do maybe something like a uniswap v1 comes to mind
yeah yeah like in the end there's something about the lindy effect here yeah the more mature projects in the space are not suffering that much you know whenever it is as the new ones and there's uh you know learning experience plus resources plus community plus uh you know infrastructure that they have and they built to prevent things like this from happening so again because the problem is how do new projects get access to all these things uh so that they can build with a safe foundation or a strong foundation but without having all the necessary
resources experience or community and that's that's our approach to that's what we what we built with the contracts library and our approach to security how do we build the right infrastructure with security best practices built in and how do we make that a standard in the industry so people actually focus on their core activity and record area of expertise not about building things that could be you know surface attack for for hackers that should be a given so it is worth noting that the bitcoiner perspective on how to construct a blockchain is that you build a maximally secure base layer that is
does one thing and one thing very well and then you build complexity on top of that where ethereum is starting to or at least with include the inclusion of the evm is enabling more complexity at the base layer and this is where bitcoiners throw up the flag and say like any complexity at the base layer is bad because you want that base layer to be as hard as possible and they don't think anything can be built on ethereum and even though later stuff already being built on ethereum it's already too late to make that claim but i take the i take the leaf out of their book and i bring it to defy and say some the the d5 protocol that got spun up and introduced yesterday will never be as safe as the d5 protocol that got spun up and introduced three years ago
or six years ago or 20 years ago right and i think that's just because the way that d5 works is that things that like you said lin that have lindy and for those that for those that don't know lindy is kind of just a measure of um the predictiveness of how of how long something is going to be in existence into the future based off of how long it's already existed right so like a really good example is the pyramids of egypt probably going to be here for a really long time because they've already been here for a really long time maker dao and uniswap are like the two protocols on ethereum have that have really good lindy and i would generally consider these protocols pretty hard right they are pretty locked down pretty secure protocols and i think the way
that defy grows is that it finds ways to develop these same things that harvest was trying to develop or maybe still is but finds ways to lock it down harder like make it make it a harder protocol and then that sinks down to the bottom of the protocol sync thesis right damian are you familiar with the protocol sync thesis i don't think i am okay it doesn't matter the protocol sync thesis means that dense protocols fall to the bottom and there's a number of different ways to describe density but i would consider the hardness of a protocol as something that's really dense which allows it to be scalable and so the way that i see d5 growing is that protocols we find harder and harder ways to achieve the same goals and those fall
down to the bottom of the stack and then things grow on top of that is that kind of how uh you view it exactly that's that's what we did with the contrast library you know building common infrastructure that's standardized that anyone can use so that people can build more interesting things on top and going back to your example like i've been in this space for almost like eight nine years now so even before ethereum existed uh so when ethereum came up and then the dao hack scandal happened and the first icos were happening that was the one if this is the you know wide west that was i don't know uh so
i think the same thing happened in the early 90s with the internet era and i'm sure that happened like 150 years ago with banks it's just a matter of time and i think the space has a lot of very very smart people building amazing stuff and i'm quite confident that as you know as we provide the infrastructure not only us you know it's the whole ecosystem and the community and our partners and our team uh we're learning and and i'm confident that this is gonna be able to relatively soon support you know trillions of dollars or that's kind of our thesis you know there will be a trillion dollar economy powered by smart contracts developers
will be building these applications and they will need a set of tools products and services to make sure that worker building is safe and reliable so that's open zappone's mission very cool all right we are going to get to open zeppelin's mission what you guys are doing in in terms of building this the security shell and i think we're going to answer the critics questions because every time something like this happens in d5 there's a critic out there who says yup this is exactly why defy will never work it can always be hacked right no it's exactly why it's going to work exactly so i i think that um you know every time what ends up happening is actually we get stronger there's a hardening process we go through and i think some of the tools that you guys
are developing are are kind of key to that it's actual code that's being put out there and and hardening the entire d5 layer so we're going to talk about that and you've got an exciting thing that you just announced today i know uh the the open zeppelin platform something you call defender so guys we are going to uh talk about our sponsors but stay tuned to that because we are going to come back with damien and talk all about the new open zeppelin platform and how we scale ether ethereum and particularly security on define just a minute the bankless state in the nations are brought to you by wiring wiring is defy's first self-building community run project which i just get really really excited about wiring is a system that
seeks out yield in d5 and it does that in a number of different ways a very aggressive way is with the vaults where you can deposit your preferred asset of choice and different defy experts will come in and generate a strategy for what to do with your deposited token right and so it'll go find ways to get yield in that deposited token in d5 for those who want to just earn yield on their stable coins the earn system is for you where you can deposit your preferred stablecoin and wiring will go and figure out which money market on d5 and device producing the best interest rate whether it's dydx it's compound or ave it looks around defy to see where the yield is coming from and it directs stable coins automatically so you don't
have to check them out at yearn.finance to get started and also check out the stats page to see what other people are doing as well we're also brought to you by monolith monolith is your cool new defy account your d5 savings account your d5 checking account except the cool thing about the monolith defy account is that it gets software updates right you actually get to increase the usefulness of this over time so here are some of the features monolith is a smart contract wallet with a lot of the features that you would expect if you've come to know defy and what it is you can you can add money to it you can put that money to work in compound and accessing yield uh but you can and you can also swap through uniswap what was cool with monolith is that they will send you a very sexy
monolith visa card that connects to your smart monolith smart contract wallet on ethereum so it's a really awesome tool to live a bankless life with a a savings account that gets software updates so this is something that you're never gonna find out in the real world but you can still do real world things with you know real money it like buy your groceries so that's just fantastic coming soon to monolith actually already here to monolith is now you can buy die and get it sent to your wallet directly right so it's also being an on-ramp so you don't have to go through your centralized exchange like coinbase or gemini or wherever you can just go straight from your bank account right into your monolith checking account smart contract wallet so check them out
at monolith.xyz all right bankless nation we are back with damian who is the ceo of open zeppelin and we are talking about scaling security on defy it is a necessary component to scale this platform to trillions of dollars and to be an open financial system for the world uh damien you guys introduced something super cool just today actually so this week for for folks that catch the podcast and it's a platform that you're calling defender it is a operations platform for ethereum you guys say with built-in security can you tell us a little bit about that
you were talking earlier about these libraries that you've you've created over time that millions of people have downloaded and and used like these are simple things like erc20 standard type libraries but now this seems like you're taking it to the next level with a full operations platform can you tell us about what you've built here exactly yeah so today we launched open zeppelin defender it's the first security operations platform for ethereum the story for open zeppelin defender is we've now done over 150 audits so now many of the most prominent blockchain and ethereum projects out there so we work with compound uniso up coinbase ave many others
and by doing these audits we learned that there's no no comprehensive solution for managing high value smart contracts after they are released and deployed and also by building these libraries we understood how valuable it is for the community to have this you know standard infrastructure that they can build on top going back to the conversation we were having before it's like all projects today have this struggle between moving fast shipping new products going fast to market while being diligent and minimizing user risk so open zappone defender tries to address that by providing standard components and a
standard security operations platform with security best practices built in so that projects and so having to build and maintain their own infrastructure they can use open zeppelin defender ship high quality products faster while also having these buildings best practices so they can minimize uh security risk for both known and potentially unknown vulnerabilities yeah so like one thing that that we're seeing here it seemed a very common function this is one that i totally understand very common function across all kind of d5 protocols is the ability to administer a smart contract after it goes into production right governing who can actually execute
changes how they can be upgraded that sort of thing and that is a a weak point in the defense of all of these protocols right so with your platform with defender you've got i tell me about this but it says there's an admin feature the ability to automate and secure all smart contract administration is that kind of what you're talking about it's basically a a smart contract administration module that's been audited that's been looked at by like all of the the largest security kind of firms in it and you've created a module out of it that can be just dropped into a new d5 protocol is that right yeah so admin is one of the four components that defender has okay
this admin component as you said allows development teams to automate and secure their smart contract administration today what they're doing is basically you know managing their smart contract operations using uh you know their own multi-sig wallets by using uh home grown screen scripts or like there's a it's a very messy process that it's prone to manual errors and mistakes so what we're providing here is a very clean and seamless user interface where developers can upload their smart contracts use their multisig wallets to perform operations so they
don't need to trust defender on having access to these contracts and again i think or we think this is a way to scale ethereum and scale d5 to the next level because not everyone knows and should know all the technicalities of things how things work or how things should work and what are the open vulnerabilities that could exist no use this don't worry about the underlying things just focus on what you need to do uh it's it's kind of you can think of it like from going from command line to like mac os beautiful interface yeah super cool it goes back to something that david was saying earlier
with that these high lindy high uh density in the protocol sync thesis hard protocols be you know the hard ones the hard d5 protocols lay at the very bottom of this right so um this administration functionality one of the four core pillars of what you built uh works with multi-sigs like gnosis uh safe which are already securing hundreds of millions and billions of dollars and we use no synonyms as a component right so you're taking these already very high lindy protocols and then kind of bundling them up with others and that's how we build this entire financial economy in these like very trusted secure components that have high lindy
effect so i think we while we saw you know throughout d5 summer 2020 we saw these this like friction between there being admin keys controlling uh these protocols that just got spun up and people want like people wanting to reduce that admin key risk but also wanting that protocol to innovate and iterate right and i don't think as a community we've really figured out how do we square this risk like we don't want admin keys because then we are trusting individuals but we do want really rapid development and innovation and it seems to be that what uh to me that what i'm getting out of this out of this defender uh product is that you guys are providing infrastructure for
more safe more secure admin keys to control the protocol but without having uh without without having um admin key risk right right at least narrowing some attack vectors around admin key risk is that is that one of the features of the defender uh so that depends on the project how they want to manage it whether you want to have a single owner with an admin key or they want to distribute it to a dial of token holders what we do at defender is you know you as a project you choose what decisions you need to make and you choose what your governance model is and don't worry about the rest you know how it's done how you make those decisions
how those get approved how do you communicate to all the others that's what defend the results yeah so it doesn't matter to you like from a defender perspective whether the admin key is is controlled by one single key or whether it's controlled by some multi-sig or whether it's controlled by by dow vote but the beauty of defy of course is that all of this is fully transparent on chain so folks can see for themselves the degree of control that so-called admins have who has the access and the ability and the right to access a given contract and factor that in in how they're evaluating the trust minimization of a given d5 protocol exactly yeah in the end different
applications the protocols have different goals but what we want to focus on is whatever your goal is you build it and manage it using best practices yeah so you also have a couple of other things as core pillars i guess of defender one is a relay module um another is around auto task creating automated scripts another is around just you know advice on security best practices i'd imagine that last one that you call advisor would have given security best practices about the bzx issue that farm just ran into maybe could have prevented maybe would have
prevented that um but can you talk about some of these other modules too yeah so with relayers we provide secure infrastructure for sending transactions so that projects don't need to build around and maintain it then with uh uh um the auto tasks again we allow projects to build their own scripts to perform continuous actions for smart contracts but using a serverless environment within defenders so you need to don't need to build their own systems dedicate them on that which are also kind of like surface attacks for hackers to do something there and and affect the operations of your smart contract and
finally advisor is a collection of security best practices that we have and we're always updating on every step of the journey from development to testing to monitoring to operations so that if you're a project again like uh going back to what we're talking about harvest what are the best practices that you need to implement uh you know these are at least from the infrastructure level these are the risks that you might be facing this is what we provide you with the advisor list at different you know steps of your development journey and we provide you with the you know off-the-shelf secure infrastructure for you to build on top so that you do it in minutes instead of
months and then we give you this really cool seamless user interface to manage all your operations uh reducing the you know potential errors of human mistakes that could put user user risk user funds at risk so damian before we went to break i talked about the the the critics um they they see another defy hack and they say oh my god d5 is never going to work you're never going to be able to secure this thing what what's your response to that well i think look at the space and look what's happening talk to anyone who's building uh you know something on defy and and
they're the smartest people i i know and uh at least like look at the d5 protocol for example these are like 10 100 x better services than what i will get in a bank for getting a loan or you know transacting something uh it's the same as the internet i think the with the the more activity that happens uh because you know dfi and the open economy is a way much better alternative to the traditional systems that we're used to the more activity and funds that go there the more you know creative people that will build amazing things and innovate as included as a company our mission is to you know protect the open economy so
that we can foster its development that accelerate its adoption in the world and solutions exist it's a matter of you know being smart being on top of things implementing them and collaborating so damian let's say this product came out at the beginning of the d5 summer 2020. uh what well how would you have guessed that these uh protocols these farms that got popped up really really fast really really quickly how would how would have defy summer 2020 gone differently if they if people had been using this product then that's a great question so uh first many of the vulnerabilities or exports that we've been we've seen in the past
few months were from known vulnerabilities uh these vulnerabilities could have been prevented with the right no advice or documentation or like for example the advice or component that we provide with all these best practices so uh just to start knowing these practices and implementing them across your whole development journey should alleviate many headaches and then if you actually add monitoring to defender which is kind of in a roadmap you will be able to understand if there are critical scenarios that could be happening with your smart contract and be able to implement implement some you
know auto tasks or some automated safeguards to uh you know take action and prevent bad things from happening or at least but things but things from repeating themselves like the harvest 32 times iteration and damian one of the things that we saw throughout d5 summer and i wouldn't think and probably continuing into the future is that there's probably a lot of people that have some interesting ideas for how to build something on ethereum except auditing and getting an audit is really really expensive and we saw this with yams right where they had this idea they spun it out in 10 days they didn't get an audit because they like they didn't no one really
wanted to cough up you know 30 thousand dollars for an audit how does this help people that you know a 30 000 audit is just too far out of the budget how does this work for them yeah uh all it's our bottleneck today to defy or ethereum growth um we don't think that uh again you scale d5 or ethereum security with more auditors you scale it from a kind of like a strategic level by providing the right infrastructure that being said audits are not replaceable like people will need audits especially if they're you know transacting a lot of money in their their platforms but at least at least
with opensupply defender we're trying to address this uh struggle that projects are finding with respect to moving fast and breaking things to some extent but also you know protecting their users from those mistakes uh which is critical when code powers real money so it seems to me that defender is a product that really raises the floor for security around new protocols right so like it doesn't replace an audit like if you are transacting a lot of money a lot of value you probably should still get an audit but you can get out the door in a faster and much more safer way and so i think when we're talking about like trying to get defy hardened and
making that code just better it seems to be that defender as a product is is really just uh elevating the threshold for the protocol that gets out of the gate is that a way to look at it yeah like in the end defender was developed over the past year in collaboration with top d5 teams including compound ave open uh dydx foundation notional so this is kind of like what they need and and if they're if they're listening to this like thank you for trusting us and thank you for for giving us your your input and feedback uh we heard like the feedback that we've been receiving for defender
is amazing actually we launched it we already have a lot of signups which is great and and in the end going back to your your previous question it's like we at open zeppelin we're thinking like security and risk management a comprehensive level uh it's not that you just need defender or you just need an audit we provide like contracts library for you to build things then we provide our security audits to inspect things that you build and then we provide defender for you to manage and operate things when they're lunch and this is like a continuous cycle that we think is a healthy for you know projects to you know operate in a secure way and in a responsible way towards their users
damien it has been absolutely fantastic to have you on state of the nation thanks for all the work that you and open zeppelin do to defend the open finance space and to scale it up we appreciate it very much where can folks find a bit more about defender so you can go into openzeppelin.com defender that's a website that you've been showing there's opens up into a is open and free for everyone to use on test nets so you can try it out you can play with it and we're uh having applications are open for mainnet usage so if you want to use it on mainnet you need to fill out an application and we'll be getting back
to you shortly fantastic damian thanks so much for joining us thank you very much i appreciate your kind words and uh now this is a great forecast take care appreciate it wow um very cool stuff david so um you know i'm going to say something a little outlandish here but i am almost as excited about operation security platforms like that as i am about roll-ups right right yeah we talked about roll-ups which are basically scaling layer two that are layer one with layer two and that gets a ton of attention but just as important if we want to
bring the world to bankless to open finance is that we have secure protocols that people can trust with trillions of dollars in value this is like some of the unsung work that builders are doing to level up and it's really lowering the barriers to entry to create a type of contract that can secure massive amounts of money in just like a few lines of trusted code this is huge this is as big to me as as roll-ups this kind of work that goes on behind the scenes yeah absolutely and and if money legos aren't easy to snap together then we failed right yeah money legos they're
legos they're totally safe when you do it like it's safe when you date yeah they they can't break and there needs to be some sort of you know set up some sort of infrastructure to make sure that when you build a money lego that it snaps into the rest of the money legos and i see that that's what open zeppelin is building with defender right uh you know the the bold case i have for defy is dragging and dropping applications into each other and it comes out as a new product that's safe out of the box that's that's how we get d5 to take over the world is that we reduce the barrier to entry for builders to be you know people that know how to operate a laptop like that's that's that's what the end
result of where we are trying to go and so tip of the hat to open zeppelin and damien and all the people building the defender products because that is a big step in the direction of dragging and dropping money legos all right david we uh we promised this at the beginning of the episode but are we ready to veil unveil the first bankless art nft i think we're ready to do that i think so all right we're about to do that live can you give us some context absolutely what this is so about this there there are constant through lines coming through the bankless education uh channels right and one of the through lines is moloch right what are we here in d5 what are we here in ethereum to do we are here to coordinate right and
moloch is the embodiment of human coordination failure and so we had we had an illustrator his name's fred uh frederick he he illustrated this this uh piece of artwork for one of my moloch articles which we've used for the moloch podcast and then he turned turned it into a gif and so there's only going to be one of these we're going to make it available to purchase on the wearable site right after this live stream so it's already up and running there it's not yet purchasable because we're not done with the live stream yet but it will be purchasable after the fact right and there's only one and we're going to kind of for every single through line that we talk about on the bankless podcast where there's going to be some sort of nft to go with it right so this is the molok
nft uh there is a an nft nft coming soon uh we're calling that one the the metaverse uh you guys saw the still image for that on andrew steinwald's piece and so the the gif the gif nft version of that is in production it's coming out next week so this is just going to be a thing that we do we nft the through lines that of conversations that we talk about on the bankless media yeah so you know part of the bankless experience is what we always encourage is like um eat your own dog food go try this stuff i mean so we did this uh fantastic podcast episode with jake and andrew uh steinwell talking about nfts and i think i came into that article a little bit or that podcast rather a little bit
skeptical right like so what is actually the value of some piece of art on chain and um i feel like they sort of convinced me uh that it does have value right and that this can be a new form as physical art is this can be a new form of asset on the blockchain on ethereum in particular so we're using this as an experiment to uh you know to see how it works so it should be pretty fun we'll see how that works out and we will keep you updated as always we are trying the stuff that we preach and this is just one of those ways um this is david's it's also worth noting that the the there's a nice feature in wearable that unlocks like a little uh section of the nft that
is only unlockable by the owner where you can go and get the mp4 version of this rather than the gif so it's high quality more frames yeah so as an owner of the nft you have an advantage versus the non-owners because you can access that file yeah and fred is just an awesome artist yes so cool he found him we found him in the bankless nation somewhere yeah he's been illustrating my articles for a while now he he's done the ether rocket uh in the in the night sky emoji uh he's done a bunch of fantastic stuff so i'm looking forward to seeing what else he can produce all right cool last thing we uh speaking of experimenting doing your own dog food we probably owe the nation an update on our bap tokens
and what we were doing there so that was the launch of our bapt shirts with apparel these um scare shirts we're only launching 50 of them and uh we did an initial launch on uniswap but we've long promised a second phase launch and we're getting ready to do that here soon with something that is new and cool that we're writing a tactic on a balancer smart pool this is a draft of the article that you are leading david you want to give uh give folks a a quick peek into what that's going to be absolutely speaking of gifts that fred has generated that's that's another one right there um so this is something that we are doing in collaboration with balancer and so for those for those that don't
know balancer has two types of pools one of them is public and the other one is private right and the private pools have all possible privileges opened up to the admin of that pool and then the public pools have ever has everything locked down and there are certain parameters that every single balancer pool has that's free to change uh which tokens are included in the balancer pool the weights of the tokens the swap fee of the tokens and then a few other ones and in order to be trustless all of those rights and privileges have been removed from public pools so the public pools are fixed and the private pools are totally open except there's this total middle ground maybe ryan if you scroll down i think i have that
spectrum of the trust spectrum in there right exactly so there's this whole middle ground that isn't accessible to either of these pools like maybe we want to unlock the ability to change the weights of tokens but keep everything else fixed in order to maintain trustlessness and so balancer is rolling out their smart pools which allows that middle ground to be expressed and one of these types of pools is called a liquidity bootstrapping pool right and so what this does is that there's two tokens and there could be more but in the the basic example there's two tokens and one token starts at like a ninety percent weight and the other token starts at a ten percent weight and over time they switch right they cross and the way that that how that changes the token is that the one that token that
starts uh with ninety percent of the supply is the token that is trying to be distributed and the one that starts with ten percent of the ply the supply is probably something like die or ether right and so you can put you can put like maybe a thousand dollars of dye into a balancer liquidity bootstrapping pool is what they call it and then they you can put a bunch of tokens that you just minted on the other side of it and the token that is to be distributed in our case the the tokens that represent our t-shirts but in other cases tokens that represent a token sale which is how the this uh smart pool first got generated uh the price of the uh uh token to be distributed starts high and moves downward in a dutch auction
fashion right and so it's we for example the the what we're going to do is we're going to start the tokens at a thousand dollars and then it's going to trend towards zero dollars and then at some point in between that time however long it takes uh it the all the tokens will be sold right because at some point before it gets to zero dollars everyone will buy the token and there's a ton of different reasons why a balancer pool like this will be really really useful and it's a really useful money lego a really useful tool for people that want to mint tokens and get them out into the hands of individuals and the reason why we have to do this is you know swap was a great way just to simply like inject a token into a uniswap pool and have people purchase
them but at some point you run into a dead end because the token price gets too high and then all of a sudden like no one wants to pay a ridiculous amount of price for a shirt right and then we get stuck and so that's how we ended up only distributing 16 out of the 50 tokens and so the remaining 34 tokens are getting added into the balancer pool we're going to start the price at i think like roughly 1400 and then over 30 days it's going to trend towards zero and at some point in time but before 30 days is over all the shirts will be sold because i'm assuming people will at least pay one dollar for the shirts i will i will do that and so and and then that's how we get tokens into the hands of people that actually want to redeem the tokens for
the shirts which is the whole point of the experiment so this tactic comes out tomorrow i'm really excited about it i'm working with the balancer team right now to get the pool up and running uh i'm and i'm actually just really overall bullish on this particular construction of a balancer pool i'm really so stoked about it yeah awesome so i've you you explain it very well so like to i guess in summary there's two things for you one is the tactic tomorrow that's going to teach you about this new primitive basically a balancer smart pool that is just coming out it's the thing that we've been waited for it's one of the many use cases is a way to bootstrap liquidity for a token and make the distribution of it uh very fair and then the second thing i guess to know is that with that we are actually
relaunching the bap token on top of that new money lego the balancer distribution tool and uh that will be a dutch auction 30 days and it will start at the the high price david mentioned and then be be cut down until all the tokens are distributed in a fair manner both of those things will be included in the post to teach you how to use this thing so very cool we are nice nice drop balancer yeah it's very exciting the the things they are building all right david um we should probably end it here this has been a fantastic article uh fantastic episode where we talked about harvest we talked about this defy security layer we talked about the hardening of d5 i got that word in for you one last time my
friend uh and uh very excited about what is in store for the future of course guys risk and disclaimers is risky so are the d5 protocols we talked about um you could deposit money in you could lose that money be careful what you put in but for those of us on the journey we are headed west it's not for everyone but we're glad you're with us on the bankless journey this has been state of the nation number 20 with ryan and david