ZK Podcast: Aave with Stani Kulechov

3 Feb 2021 · 1:02:03

Anna Rose and Tarun Chitra talk with Stani Kulechov, co-founder of Aave, about the project's origin and evolution within the changing DeFi landscape. They cover collateralized debt in crypto, how flash loans and flash minting work, Aave's credit delegation feature, and where Kulechov sees decentralized finance heading next.

Speakers

Topics

Transcript

[Music] welcome to xero knowledge i'm your host anna rose in this podcast we will be exploring the latest in zero knowledge research and the decentralized web as well as new paradigms that promise to change the way we interact and transact online this week guest host tarun shitro and i chat with stani from ave we talk about the early days of defy the introduction of collateralized loans and stable coins flash loans flash minting and ave's new credit delegation function we also touch on the effects of gas

l2s and where the space might be headed but first i want to say thank you to this week's sponsor hermes hermes is an l2 solution that scales token transfers on top of ethereum which can handle up to 2 000 transactions per second designed for high frequency tokens hermes is a zk roll up a topic we often cover on the show including this one and a project which leverages zk snarks for validity proofs with on-chain data availability these zero knowledge circuits are developed using iden 3's circuit compiler language circom the system also brings a novel consensus algorithm called proof of donation that gives 40 of each transaction fee back to the ethereum community

as a donation which supports ethereum development now after passing two security audits hermes is running a bug bounty program they're offering up to 100 eth to whoever discovers any critical vulnerabilities if you want to hear more about the project i recently had jordi beilina technical lead at hermes on the show for an interview i've added the link in the show notes and if you want to find out more about hermes and the bug bounty program head over to hermes hermes.io i've also added the link there so thank you so much hermes for sponsoring now here is our conversation with stani from avi [Music] so today i'm chatting with stani from ave

and guest host to roon hi tyrone hey happy to be back and welcome to the show stani uh thanks anna and tarun for having me here so stani you're from the project ave i want to hear and i i know like you've probably said this every time you've been on a podcast but i i think our audience actually doesn't know that much about the ave project can you give us a very short timeline of like what it was and what it is today yeah i mean the products itself was named of a couple of years ago so before that we were used to called uh eat land which is short for ethereum landing and uh it ethan was a project that we we started to actually

build in already 2016 very very kind of slowly so uh i was still studying in in university uh in helsinki finland where i'm originally from and uh i was actually studying law so i i have a background in software development so i used to develop financial technology so practically more of front-end user experiences and that was kind of like my first startup experiences and always with fintech you end up meeting regulation quite a lot and somehow i got excited about law because i didn't understand well all of these rules you know why there's so many rules when you want to

do some innovation and you know you want to help people and you see a lot of potential and i started to read more and more and and then i went to study law and at some point end of law school i i i got interested in contracts contract law and kind of like how to make contracts more efficient automated and also somehow the whole legal industry something that's actually modern you know we still have a legal literacy that is is a bit a lot of paper based and and feels quite old-fashioned at least to me when i was studying and i started to read about a lot of things ai

uh contracts in general digitalization and one of the things i uh stumbled upon was practically uh smart contracts and started to dig deep dig deeper and and uh understood that there's practically a concept where you can uh publish code into a distributed ledger uh a blockchain ledger and and practically it's very difficult to manipulate that data so you you you can put data that is very hard uh to manipulate and one of the places where you could do that uh actually the only one i was was widely used well widely it was still early uh was ethereum and that kind of like

got me excited that uh actually you know we can do contracts and codified things you know in a way that they execute by themselves so you're kind of the need to go later into court and prove things you know of course like this is the black and white uh uh thing and then i wanted to just try like what we could create uh and somehow went back and cr we started to build financial applications because i already did that so uh we created basically first proof of concept of uh it land which is practically a on-chain was on peer-to-peer learning protocol back then was ethlend a hackathon project or was it like a

like how did you was it a team how did how did that come about and by the way your story of coming from law to blockchain is cool i don't know that we've had and like and the fact that you also had that technical background it's just neat it's like a kind of a unique perspective yeah i mean it's it's quite different and that's what makes the space interesting because it really doesn't matter that much the background itself so to contribute in in uh it's a decent as finance or any kind of like unchanged system you don't need to be let's say developer there's it's so kind of uh more wider than that so there's different areas you can contribute and that's what that's pretty interesting but i would say it was a hackathon project in the sense that

you know we were doing something that was very challenging for us and we we didn't have the skills you know we fed a lot of times it was frustrating at some points uh and at some points we were like quitting that this is just too hard this is like it's really difficult and but at some point we realized a bit that okay that practically it's uh we can actually do this and it was as early as 2017 january uh when we actually released a coven version of the italian protocol and was very simple i mean you practically uh uh had only very basic functions you could do loans between

two peers it's not the same that we see in d5 with the pulled systems that that we see today pulled capital but uh it was something back then and this was when we practically had only one decentralized exchange uh theater delta and a bit later that year for example kyber came so liquidity started to pile up a bit this ecosystem was very small then so what we did that wasn't beautiful at all so i would say that it was a hackathon in in in mindset okay but like we actually tried to make something that people would use so yeah like who are your co-founders by the way like because you say we so i'm guessing you didn't do this alone

yeah i guess like funny thing about the whole project it started that i started to build a bit and uh we had another kind of uh a person back then uh his name was anton and he was already building stuff like very small blockchain related things he tried to build some sort of a way to ensure market prices very very uh early also i practically went to reddit with my idea and and also actually into facebook and there was this ethereum group back then that started to grow mainly mainly of uh people who actually are kind of like more interested in in going along on ethereum but uh in in in reddit and in facebook

practically i was voicing out that i would like to create this kind of a project and and see how it goes and if there's someone who wants to wants to join uh there's different tasks that you could do like will be pretty awesome and then people start to come uh jordan for example he's our ceo he was one of the the uh first persons and i think uh he was i think i made the post roughly months after the covent release or something like that so it was very very early and uh yeah that's how the team formed and funny part about uh reddit was that when i posted about this idea like nobody like there was so many kind of like a comments against that

why would you even like put assets as a collateral so the way the the way that this wow over over collateralized lending works is that as a borrower you put a you put a deposit collateral and against your deposit you can borrow something else so actually there was like a lot of uh resistance and and kind of vocaling about why would you actually put put anything as a collateral and borrow when you could actually sell the asset and kind of i understood that uh this was in the ethereum subreddit so i kind of understand that wow like in terms of like understanding of economics definitely like there's still like big gaps and ways to go and today probably whole ecosystem is based in a

way that there's some sort of a collateral so i mean collateral for for for borrowing uh collateral for let's say to provide liquidity leaving funds there so yeah i mean it's definitely now it's it's a different story i mean there's a lot of information about it very good yeah you know what's kind of interesting about your point about how like the ethereum reddit community would it would be very against collateralized lending is that i think that bitcoin had the same evolution where in early bitcoin people were very against bitcoin lending in general and then miners they were unable to kind of like manage their treasury and suddenly you started seeing

bitcoin lending and the miners always like drive the financial innovation i find before it kind of reaches like goes up the stack to like the user and so i bet you around that time the ethereum miners would have been like this is amazing but the ethereum reddit users are they are usually not miners so it's like yeah and also like kind of like it's it's more for like a professional user group so kind of they they have the need and uh and i think kind of like reddit also you know the user group there was more of a retail so today if you talk about let's say dfi and and you know it's it it's very much understood what's

what's going on but because the ecosystem has grown substantially and uh but then it was like starting to grow and it was like weird times you know 2016 17 uh a bit of uh 18 as well yeah 18 and and then 90 was a bit easier i think when when um maker system and makers practically the stablecoin dies started to pick up and there's more more kind of like things being built on top of that like when ecosystem started to grow it was it became more kind of like core because then then you could you will not need always to explain everything from from

from scratch that i was actually about to ask you if make or doubt because for me at least maker dow and the dai minting was like the first time i understood this idea of like collateral in crypto that would actually create something else um for me at least that was the educating point like that was the that was the the project that got me on board i guess and that was i think like that that process was happening i believe like throughout 2018 so yeah i think 2017 that wasn't really like a known yeah concept and it doesn't i i actually i quite quite remember because you know uh back and then our landing model did didn't have any stable coins

so i mean the only stable coin practice was uh tether which was an omni chain and how we solved the stability so obviously what also just to borrow stable currency is that we we we picked the eater so practically you put a loan request and and you lend out uh let's say 100 usd worth of ether and then then you borrow 100 usd word of each year and return let's say after six months 100 ufc awards of ether that works pretty well but kind of the issue is the kind of like the accounting side of it it's way easier to just call die that doesn't fluctuate and then practically borrow uh one usd let's say word of eater and then

because you practically need to convert it to fiat or uh purchase whatever you need to purchase and it like make yourself a lot of interesting issues and like we tried to kind of build upon it and what i i think for me the the coolest realization of the whole defy space is that it started when we started to see a lot of projects coming in building different things and you started to actually like understand and you know look at their ideas and and started to build on top of those ideas and kind of like rehydrating those uh kind of like uh initiatives i'm trying to understand what eth lend was before dye

actually was it just this like eth collateral to eat yeah so it seems like such a weird like what would you use that for yeah yeah because you could you could kind of borrow usd effect but our goal was actually that they use tokens as a collateral and then borrow uh eat and the the funny part is that erc20s weren't that like a big thing yet so 2016 beginning of 2007 uh 17 practically the market capitalizations were quite small and one of the things like what was interesting that the liquidity started to grow you know as we we saw kyber coming in and and and and also like tax liquidity increase is that kind of like

you don't need to separate any more risks that you can actually pull things together and i in eat land we always thought about it that let's let the kind of like uh counterparties handle their own risk so let's say let let the lender fund collaterals loans with collaterals they're comfortable and we didn't want to like put pools together and today it's it's very obvious that actually like uh i think tara knows uh pretty well that you can do a lot of magic when you actually kind of like have compositions and you know polling and there's many elements involved yeah i mean actually you've talked about kind of the early days but one kind of question is how how were you

able to kind of start with sort of a coin offering in 2017 and survive through the lean times of 2018. especially in 2018 when um i think at least from the investors standpoint investors were really interested in like other layer ones or like basically anything on this podcast that has been featured was funded in 2018 instead of like ethereum based finance and so you know you you survived through that period and then launched so so like maybe walk us through like how you did that and what it was like kind of like going through the downturn and then somehow kind of having this like miraculous exponential growth after yeah i mean 2018 those were really dark of our lives days of 2018. i i

i felt personally kind of like being in a you know ship where everyone is just jumping out and you started to become more lonely in the space because many projects they nothing happened and somehow like when when the bear market started to happen and it was very steep many of the ideas didn't have a lot of uh merits and we we actually had already a product in back in in 2017 and before the funding but kind of like we understood that the product isn't good enough so so kind of like uh that we have to con continue building things and and still still keep up and during actually that 2018 and even 2017 one particular point i

want to highlight is that many of things that was happening on ethereum for example usually projects choose a kind of like a horizontal approach in the sense that they they wanted to create a protocol that other protocols will then consume and the other protocol that that was building want to create a protocol that uh other protocols were consuming and you had this kind of like layers of verticality and and then there was questions about adoption and you know there's so many steps in user experience and so forth so no one wanted to go to actually the end user uh like kind of like end to end from the protocol all the way to end user and for us it was always from the beginning kind of like a

point that we we want to just try to do something that actually the users will use and and and kind of like focus on the the end user and this is kind of relates even today that we focus quite a lot on the user experience so we we try to try to always keep that relationship uh to the end user and not only build on a protocol scale and during 2018 i i definitely noticed that uh it was kind of like you you were building things but uh you're building in a in a silo a bit so there wasn't any distractions and so forth which was good because probably we focus in 2018 and actually even 2019 quite a lot on just

brainstorming ideas and and trying to figure out ways to build things implementation so we spent a lot of time on those and actually that's very healthy so in one way the market wasn't healthy but but the way we we developed and we had time to think things that was super healthy and i think that's the way that protocols should be built so you should like you should not have this this kind of like a pressure of getting things quickly on the market because some other protocol made this feature and everybody loves that and you have to come something else that they're everyone loves you again and they kind of have this you know attention competition uh all the time and

even though like we felt bad like because of the market and everything but we felt good that we could actually just build things and like without much of distraction in a way the the price was so much in the toilet that i guess like everyone had already given up and just left you know i don't know how your token went exactly but i just know that oh it went down there was almost this it was it was yeah harsh although the trough to current level is is kind of one of the craziest things i think that has ever happened in the history of cryptocurrency the the recovery of ave is kind of honestly just insane you need to plot it on a log chart and like just look at how many

orders of magnitude it's jumped i mean it's it's it's actually amazing to see like the ico price is actually a tiny blip relative to the the current yeah and even like post ico it went sold down it's just like and you have a lot of kind of like community members that are also like living on the on the prices and so forth so that's that's kind of like you you feel the pressure and it's it's actually enormous pressure that what protocol builders have it's it's not just pressure from the community but like pressure to to succeed and pressure of security pressure of it's it's a hard business but end of the day we're building some stuff that is in some extent very groundbreaking and i've realized

that maybe recently for us it's always about innovation but now that there is like d5 became an epicenter in in crypto i kind of understood that we actually have what we're building the whole uh ecosystem here is it's going it's going to be something very significant i mean if people will start to use more defy and and and the networks will clog yeah i want to talk about that later on actually but first i want to i think one of the topics that we wanted to cover in this episode with you is that of flash loans now flash loans is something that we've actually mentioned i think to true you were in that episode it was in 20

beginning of 2020 at the stanford blockchain conference where we we actually just talked about it off the cuff we gave a quick definition but flash loans is as i understand it an invention or like one of the features one of the i don't know what you call it but like concepts that ave pioneered yeah i think i i i think of it didn't kind of like pioneer it because um in terms of flashlights we have seen the implementations beforehand and kind of like but what what happened very well is that we made it pop culture so so practically uh when we launched flashlight was actually like one of the latest features we had we talked about it like how cool would be this and that

what kind of things you could do and actually we were even thinking that me like it never was actually a feature but then like at some point we i don't know was it like we had time in development or something we practically added uh the the flashlight function and in the beginning we didn't see that much of usage in in january and i actually took it like i took a kind of a big initiative to actually campaign that hey we have these flash loans and hackathons and also in in like very vocally being in the community and trying to get people to build things because there's so many use cases that you could do besides hacks uh and or so-called arbitrage and and at some

point we started to see like uh interesting things to be built so first projects and then came the the big hacks with flash loans and and that then of course like that was uh more pr and at some point we realized that well we already have like a half a billion last month the whole year was 2 billion worth of flash loans in in the whole year from all so it's uh it's a neat functional functionality um i think i think our audience probably knows what a flash loan is but i do think it might not hurt to just quickly say just for our audience it's a flash loans are a tool that lets developers borrow instantly without collateral and they can do this as long as they return the liquidity

within one block transaction so it's almost like a like an ins that's why it's called flash basically it's like an instantaneous loan and then repayment and what they do with that loan is where and like this is interesting that you actually use the term hacks these flash loan hacks because i always understood them as sort of like arbitrage loopholes like they found price differences basically in different protocols and we're able to use this this instantaneous flash loan concept to like do a bunch of things like kind of basically just like shave off those the differences as as profit yeah and that's exactly and practically we when it comes to like the

the hacks and and arbitrage but definitely i think like the arbi charge is is what happens but let's say a hack has exploit so one of the interesting things about uh d5 is if if there's a protocol where you know there's some sort of like an possibility to exploit is it designed as as it should be or is it just arbitrage because there are people in the d5 community that think that every like exploiting a smart contract is an arbitrage opportunity and but i don't feel that way i think kind of like if if there is a chance that users can lose serious amount of funds maybe the protocol isn't designed that way because you will not deploy anything like that i mean other for example i know a lot of

protocols will not want to deploy stuff that actually makes their users feel upset and that's the kind of thing but the the interesting part about flashlights is how they help people without their users probably knowing it so when you go to uh this app called the fly saver or for example instead up that are practical ways to manage your different positions you have you might for example create a wall in a maker dial borrowed or created printed die and and practically you spend that die but you want to close that vault your eater for example might be there stuck so you could do that you can't do that if you don't have the the funds available but uh what you can do is that you just

practically go to these services and click a button and confirm transaction and what happens in the background is that a flash loan is taken from the other protocol in in in form of die then practically the the loan is closed ether is taken away from the uh the collateral and and then partly sold to die the flash loan is returned and and then the user gets the rest of the collateral and cool part about flashlights is that there is a reward for using that liquidity so it increases the kind of on that block the deposit rates and and that's a small but quite meaningful uh gesture for for the depositors that's cool i actually didn't know that flashlights were now being used in other

protocols that's super that's news to me tarou you probably knew that but that's really cool i think it was used in other protocols before it was used for attacks [Laughter] it's just that like no one it's just that like i think the problem with defy is the opposite of the problem the zk community we're in the zk community everyone like talks about the engineering but never the users and in d5 everyone only talks with the users and trading and not about the actual engineering but a lot of the engineering work is actually being done has been done in january like the first flash loan defy saver stuff was like a long time ago actually right like i remember that the integration was so it's just i think people don't pay attention to

the githubs as much as they should in d5 i think now now in the last six months i've noticed it's increased a lot like the comments have increased a lot but in the bear market days like i remember in 2018 and 19 i'd like look at your repo compound maker and like there was like basically no contributors like even doing code reviews or like looking at yeah yeah and i think that's that it should there should be more actually activity but i think now protocols are opening more development and and with with the uh community developers grant programs so what i hope to see is that actually there will be more community developers that are participating in different protocols and in that way kind of like a uh contributing so

i i think the the best days of development community for for ethereum projects is is just like coming up that's that's that's my uh take um yeah for sure it definitely makes sense what other projects since then have actually started to experiment with flash loans is there new concepts around flash loans is it is has it actually evolved more recently or is it still what was released in january 2020 i i think there's like i would say like applications where you can make you know capital efficiency for for the end users so i would say like for example a way to swap depth is is one of the coolest things i instead up it's a good example so you could swap depth between

let's say compound of a back and forth depending on the interest rates and practically what's happening in the background is that there's a flash loan that is taken paid off and there's interes interesting kind of like uh developments every time you're in a position where you need capital to do transactions and i mean change positions kind of always have to evaluate whether flashlights could be used but i still think could there be something else in the future i think probably yeah i mean i i never doubt the you know innovation that that uh we have in ethereum community because i i think many of the projects are innovating quite a lot but someone calls comes out of the blue

and you know has very cold stuff things that i would not expect to to to happen and especially when you look at traditional finance how how things work there what kind of products and services there are and how you could build them in in the d5 ecosystem there's a lot of innovation and i think the various d5 projects has in interesting formulas and and even like in other protocols there there's still a lot of things to do there there's still a lot of things to do optimize innovative interest rates risk and i don't think we are still even we're not peaking d5 is not peaking yet i i don't think so i have a last question about uh flashlight specifically though which is the type of tokens that you can

actually have flash loans with i don't know if i just said that right but like you know like obviously you can take a flash loan of eth you can take a flashlight of dye i guess but like there's also some weird crappy coins like is it any erc20 are there any limitations yeah i'm just curious like how you actually deal with the various types of tokens and the flash loan concept yeah so at least that of it you could flash borrow eat and and other coins i i unlimited anybody as much as there is of course so so this is this interesting part so where's liquidity and where now other protocols are also

implementing the flashlight feature if that particular asset is listed there as liquidity you can do it but what's now interesting is that uh some of the protocols are implementing main thing functionality so i i don't know if maker already has but practically i think they have the ability to this proposal didn't pass governance oh uh to add flash mints but maybe it's good because i i i don't know about you moments are a little bit scary yeah i i don't feel confident for the listeners flash mints are basically imagine so a flash loan lets you borrow an arbitrary amount of capital in a pool take a function that depends on capital

provided as the input let the function execute if that function doesn't halt that means it's found in arbitrage condition or some type of uh reasonable state that can pay back the loan and then the loan is closed a flash mint is imagine you have a function where i say hey what if i had an infinite amount of dye like how would that change my function so i go to the die contract say hey mint an infinite amount of dye run my function in a single transaction and then burn all of that dye and so it's it's a little scarier in that now now you really do meet the bitcoiner's worst nightmare of like no supply cap but when you say it didn't pass where didn't it pass to rooney maker doubt governance ah okay so flash minting is in maker dial right now this

is i need someone there's a pull request that already has it implemented it's just that governance voted not to add it to the core protocol i see i see but like flash minting is this something that one could also propose for avi it's for an erc20 so it's just for any asset you can add it oh i see so like once the proposal oh so that that was actually the question is it the erc process or was it like the maker dow internal governance no it's the erc process no sorry it's maker dao there is an erc for flash minting but i don't think that's gonna get i mean like people have made flash mintable tokens it's just none of the ones that have high money velocity have flash minting added right like at the end of the day you need a token that people actually care about

to have this feature for anyone to do anything super malicious with it but it is weird because you could imagine a flashlight calling a flash mint and like that to me actually is like one of the kind of weird you you flash borrow some asset and then you use that as collateral to borrow something that's flash mintable and then you call flash mint on it so obviously there's constraints to this on like what functions can get executed in a flashlight but it's kind of interesting and i think there's a good reason people don't want to add it i'm now remembering james actually in that episode of the more recent episode we talked about this and he said that it's only when

like flash minting would only work if it's actually implemented into the defy protocol contract am i right like you like ave would have to enable it for ave particularly to be able to flash man yeah for the for the of the token for example yeah but like the erc the erc already exists like there is a standard of on how to do it and so yeah just just for our audience to understand a little bit more yeah what's interesting actually was was that unlimited main thing or did they actually have a cap they had a cap function yeah but it was initially set to minus one so infinite to accent yeah because i could imagine like let's say if there's a certain amount of die

let's say two billion well of course in that case you could use something that ave which has already died to flash borrow but maybe if it has some cap but then again if i i'm thinking about it like the idea of it yeah i mean now you will just go to aven and just do flashlight from there with the dye i mean you don't need the main thing unless there is not enough liquidity anywhere in thai then you could have that right you could imagine a flash loan that does something where it makes an lp share and it mints a bunch of flash mints die to like manipulate the oracle price yeah so it's it's a little bit weird you could actually like basically drown out all the other lps with a flash mint yeah yeah that's that's scary that's the part where i think it's scary like you

don't want those in unislop because like it'll it'll kind of actually mess up a lot of the arbitrage or incentives but actually one thing i did kind of talk about which is you know and this is something i spent a lot of time trying to explain to like kind of technical people in finance is that like flashlights are actually like extremely unique to crypto and they don't exist in the normal market but there are analogs and you know they're kind of unique because with the blockchain you can verify whether you know like the loan actually was used for the thing it was supposed to the thing made a profit and it can be returned but in in like the financial market there's a lot of like stuff that looks quite a bit like this where like a bank

will give you a really really short-term loan for you to do a trade and then you pay it back like repurchase agreements and so i actually i'm curious do you think you know i know you guys are making like an institutional push and a push for like more non-defined native users which is great how do you see institutions using flashlights or like maybe bigger entities yeah i mean it's it's quite an interesting question like obviously like if they if they're doing something in in defined they need the liquidity but let's say that they they're trading and they they they want to use flash loan to flash borrow and do trades but one of the things could be fascinating is that uh if you're on the level

in institutional usage that you are actually tokenizing things and uh upon that tokenizing imagine like that you could tokenize some sort of depth or any kind of like nothing in the depth but could be anything and you you practically could just temporarily mint enough in d5 that it becomes like very attractive then you can ask a question like you have an instrument that is in traditional finance that actually is in value let's say 1 million but you could temporarily indeed get it into 10 million and that might be interesting it's it could have interesting like dynamics in terms of like is it that case you know if you want to do

stuff would you rather do it in d5 than than in paper finance and in traditional finance but that that could be something i i could see like innovative way of getting flash loans into something where you know you can't stretch you have an instrument that you can't just stretch in traditional finance it's just like uh it will not work because of the nature but when you tokenize that that asset then you have the value on chain and then you with the main thing you can stretch because you're actually the instrument doesn't it it doesn't decrease in value of this one block maintain because the next block is back in the same position again unless someone else stretches on that block that could be something although then you'd then come back though with this stretched amount and you'd need some

some vehicle to like reimburse that on into the like real world assets i guess yeah i could imagine that some cool situation where you have a couple of this this kind of like assets and and then you can you basically you pile up even this asset this kind of asset types that are very difficult to stretch in in traditional finance and then you create a marketplace where you can trade with these assets and then you will have a bit more margin on your trades or you can use them somehow i i honestly i i don't know what could be that kind of asset but i could imagine that this could be interesting in institutions to kind of realize that maybe that could be a way of utilizing flashlights that

we have something that we we have limited amount but we can actually quite easily trade it and and uh yeah it could i don't know that could be one thing i mean i mean one of the things is the way i usually explain what a flashlight is is like imagine to a trader is like if you're a trader and you go to like an exchange and you say hey i want to borrow you know x amount of bitcoin for one hour the exchange will quote you some price and if you say i want to borrow it for 30 minutes they'll say i'll cut you half the price roughly and if you say 15 they'll say roughly half the price now what happens when you say you want to borrow it for zero duration

and it's actually impossible in normal finance to actually do a zero duration loan unless you can verify in the way that you can on chain um and so there is kind of a question of like what assets are compatible with zero duration loans and those are the types of things where like there's a ton of instruments actually in traditional finance that are kind of illiquid where people are too afraid to borrow against them unless it's a really really long time period but there's kind of the flip side which is actually if you could do a zero duration loan and take a small percentage of the basis point i was really a liquid asset you would totally offer that and so that's sort of where i've always been kind of curious how

financed people if this is communicated correctly to them would like figure out like oh like houses barely trade but somehow i can like get some margin on my house on like the brick in my house and like you know i think that's more interesting than like hey i tokenize the house buy one brick from this house yeah exactly you basically you give a you give additional functionality you provide more efficiency i i think yeah i would really love to see this happen like in that way like that you know like you always see like flash on like in use cases that people build like inefficiency but this will be like actually the tokenization level

and and it could be cool to see like if if something happens yeah i mean in general i think there should be more tokenization i mean i would love to see more different kinds of assets but there there's their own challenges there as well i i always feel like this is the real reason to bother tokenizing like a a real world asset so people are always like oh like what's the point of tokenizing a real world asset i can make an spv a special produced vehicle or a reit like a real estate investment trust put a bunch of things in there and sell you shares in it and isn't that the same why do i need a token but actually the zero duration loan is is fundamentally impossible in the world of lawyers and pens sorry not to insult your former

colleagues but it's actually impossible in that world where whereas i actually think if you're tokenized you get this functionality and i think that that's one of the the until this year i didn't realize that that's actually the real you know kind of in crazy benefit of tokenized assets is you get stuff like this well taro we have a weekend we can build something exactly there you go okay so more recently you have a new function or instrument called credit delegation what is what's credit delegation yeah so so practically how the lending and borrowing works in office that let's say user comes into the the

protocol deposits let's say assets and and then starts to earn interest right then a credit line is open to you so you could actually borrow against your assets but i think it's roughly 70 percent of the depositors there actually are not exercising their credit lines because their interest more wise in in actually earning yields and what we realized that actually that what you could actually do is delegate that credit line that you have to to someone else that you might trust for example i could delegate to tarun i i i trust him i could delegate to a smart contract that has some sort of close loop function that it can only farm a token and then i can call back the delegated

funds or one interesting function is just that that trusted person could be an entity so i could imagine that some beautiful day there might be a some kind of like a uh institution that is borrowing that so so we are delegating to the institution and there's they're borrowing from other without a call at all so so this is the the key thing so the depositor keeps the call at all and keeps earning on on the deposit but then there's the the delegatee takes the the the borrowings and what could be interesting this entity relationship that you could convert it to let's say dollars and put it to work in traditional finance so kind of that we get defy a two-way stream so there's

there's assets coming in liquidity coming in but also it's a way of source liquidity and consumers and for the record you know uh this this type of thing does happen in in in traditional finance uh quite often because it it sort of like helps you have the appearance of under collateralized loans that are actually technically collateralized yes so it's about normally like what we're used to in device we have cryptographic collaterals right but very typical uh scenario in you know traditional financial world is that you're going into a bank and and you're taking a loan and you have a cosigner so so someone else is is putting the collateral and you're borrowing but in essence like what we're

looking to achieve is that some sort of way that we add a bit more like trust networks around the the protocol what's good about this like in the in like technical sense risk sense is that the protocol doesn't bear additional risk so the protocol is collateralized so it has a collateral and there's a practically under collateralized loan relationship but it's practically with the peers and you can even pull it you can create a world where there could be multiple depositors depositing into a world that is borrowing to farm in in defy or to convert stable coins usd and just let it out in traditional

finance so the next point that i want to talk about with you is i want to talk about the things that nobody wants to talk about gas prices and usability in terms of the base chain being ethereum from where you're sitting you were originally named ethlend you're clearly like deeply within the ethereum community smart contracts are at the core of everything you're doing but what happens in moments when either eath is so expensive that gas just inevitably is expensive or like the network is so congested that prices also go up for gas so it makes small basically small loans or small lending or small

you know minting collateralizing all of those things become incredibly expensive especially for users that don't have excessive amounts of funds so what are your thoughts on on that phenomenon like you've definitely watched it i'm sure it affects your your thinking definitely um yeah i mean the the original idea also kind of in in italian period is that we we we kind of saw the the uh on chain landing and earning a way that you know it democratizes a bit because it it's not restricted to borders right and uh what's cool about the other protocol and the deposits is when you deposit let's say

100 usd c you get in return so called a token so 100 uh a usdc and that those a tokens practically grow in balance so it's direct crediting of what you earn and plus the underlying debt for the depositors so in essence it's kind of like a global permission savings account and usd nominated that has automated treasury management and like it's globally accessible to kind of like it's not restricted to to me and cool is that practical i will get the ceo darren will get the same yield someone in brazil will get the same yield so that's kind of the there's this democracy thing going on and at the same time gas prices are

getting high and you know usually like issue here is that you know if you deposit uh 100 usdc into the protocol but you're paying 30 usd in gas and even higher i mean we saw some crazy stuff going on and recently and you are not earning anymore actually you are going into a situation where you're paying to deposit i mean that's a negative interest rate if you think about it totally i mean i can i can say from personal experience having played around a little bit during defy summer but being a little bit of a chicken with the amounts that i actually wanted to play around with i definitely earned nothing because of gas prices like any any earnings that i made were

eaten up by pretty excessive gas prices so i would say i fall victim to exactly that so what what would you say is as a project what what are you thinking about how are you do it sounds like this democratization is your goal so this sort of prevents it like are you looking at l2s what are you thinking yeah i think uh we always try to state that like ethereum is like our headquarters the community is here it's it's a great community and i think just talking about the tech practically what we have here is is enormous security in the sense that uh how much kind of like ethereum as a network secures transactions but i

agree that you don't need to secure all the transactions at the same level so imagine a a system where you go to a bank and you transfer funds and all the people in the world would need to kind of like accept that that transfers say yes yeah then you have secure high security but not all the transactions need this and use cases and like this is always kind of like an issue for us because as we want to be uh ethereum native we also understand that if everyone is going to layer twos and we're staying here like we will become like the bitcoin of of of like uh you know landing protocols the maxis well i actually did just while while we

were talking think about a weird use case of credit delegation which uh which actually matches this l2 question which is imagine a credit delegation from someone who wants to fund someone to be a validator for a layer two yeah for example so you do need some base protocol you need this type of stuff on the base protocol because even the layer two you're not getting around the fact that someone's locking up capital on the base protocol yeah and so in some sense you you can't forsake the layer one at all you have to just make it easy to transfer from the layer one position to layer two yeah and that's that's the kind of thing in so the cool thing is that if the layer two ecosystem is is big enough you know you could just

access directly and and you know buy assets and if there's gateways but the the beginning will be very not like this i mean the beginning is like transition phase and the thing is that uh usually like when we start discussions we have calls with with some of the other p5 project like projects we we start discussion so what's your like uh l2 like strategy and everyone is asking the same question all the time and this reminds me of 2017 when like every fortune 500 ceo company was asked what's your block yeah exactly exactly the same what's your l2 strategy is taking it over

this is challenging because some of the projects are doing things on let's say obm and then you have some cool stuff like you have the uh uh zero knowledge with uh zk sync which is quite interesting because you practically can eliminate this this kind of like a work horse that you need people to validate and and and also the the stock wear and and also there's there's matic and plasma and and you know there's different kinds of things and you know you could cross port like make usability everywhere like with the token as positions but you know deploying infrastructure to each and every blockchain is a big thing so if let's say if you have to

change something in the main chain with the same infrastructure you have to change in other places and and also if you think about for example zk making proofs on all of the functions and it's it's not that straightforward so it's it's kind of like it's still a big question to us like how we'll do the layer two and and it's not just about layer two it's just about how we make get rid of the the gas issue one thing to point out is flash loans and zero knowledge proofs are not it's not actually even clear that they can be compatible with each other exactly so so we already lose one baby [Laughter] there are projects that are emerging

that have the exact same or like it's very very simple for ethereum-based smart contracts to be redeployed on new chains is this anything you've even considered or do you feel like even asking the question is a bit sacrilege no we we have actually and you know the work that it goes there and managing i mean once you deploy you deploy but but then you kind of like i think probably like we estimated that the the biggest work actually is to manage the risk so if you have like let's say different change and the thing is it's not just kind of like uh i would say like in risk-wise uh let's say there's three interesting chains that we want to deploy so first we have our own different other

markets and then we have the different chain deployments it's it's a whole lot of work so one of the or things is that we want to decentralize our risk management so that there's parties that can contribute to the risk management and quite the governance and that that could help but it's it's quite a lot of work and at the same time we want to keep the you know rate of innovation constantly high enough so any management thing will actually like draw it back and you know some of the stuff i still need want to see that they work like ovm i want to see it actually work so so uh things are very early and the good thing about like protocols like ave is that

it's not kind of like one of the first that needs to be in in layer two because you know obviously trading and that requires like more more frequent stuff could be but still i mean if everyone is going somewhere it's it's like we have to be in the same party so i mean there's no other choice i mean so i i by the way i i this reminds you an allegory that was told to me by someone who's a friend of mine who is like the third or fourth employee at dropbox and um so like in 2010 basically you know iphones kind of just came out like the app store like the non you know cydia george hot's illegal app store but like the

apple app store just started and dropbox was like okay we only have enough engineering resource to build for one platform either apple or android and they chose apple and samsung after a while and this reminds me a lot of all the layer ones right now and standing you can tell me if this matches your experience but this is kind of what i have observed is samsung came to them was like hey look we will pay you to build your app and we will build your entire app for you if you put it on if you make an android app and support it and whatever and you know i think he was saying like startups at that time of their stage were like maybe 50 of apps took those deals and the other 50 didn't

and stayed on apple but he said within two years 100 went back to apple so like yeah i thought that was like a very interesting thing because it reminds me a little bit about this about the current do you remember there was already thrown a bit like uh i mean this disgusting isn't like a a new thing there was like way a long time ago i mean i can't remember the time frame where like the layer twos and everything there was a lot of discussion and people were planning and was it actually even before the bear market or something that then people forgot what about it or something but you know oh the the crypto kitties yeah oh yeah yeah exactly yeah yeah yeah wrecked the network you know the i think the thing that's interesting is like other layer ones always capitalize on

on this moment to raise more money but the interesting thing right now is like i think like 2018 all the new layer ones and professor coins and stuff were like oh yeah we're gonna like beat ethereum on our own like we'll build our own stable coin we'll do this we'll do that 2019 they're like it's maybe a little more hesitant about that thesis and then this year 2020 like since summer all i've seen is every layer one big like we're building a bridge and so that basically turns them into layer twos yeah exactly i think everyone's gonna kind of end up being a layer too and now the layer the competition amongst layer twos might be more intense than the competition on the apps that's my that's my 2021 prediction the fight for block space is going to be

aggregators fighting layer twos are a form of aggregators things like urine are a form of aggregators so individual users won't actually be making single transactions they'll be batched somehow yeah yeah sorry that's my that's my hot take twenty-one interesting addiction all right stani this has been a really cool conversation and dig into ave i i have one last question that i want to ask you which is about kind of going back to the story you told about your background being having studied law since you know law and you know this space super well like what is your feeling on kind of regulation how the laws of the ecosystem work versus the laws of the real world i

don't know if we should say that anymore the the other world we're all so used to just staring at screens that i don't actually know what the real world actually is anymore but anyway yeah what's your thoughts on regulation you know at somebody you kind of like think about like how you know what should be the relationship with regulation we have and what what we're doing what's happening in the uh space and when you're dealing with smart contracts it's kind of like one of those things where it's practically regulation so it's just different type of regulation because the nature is different so traditionally law has been created to protect right so you create law then you create also agreements on top where on on matters that practically you can

agree upon and eventually go to court if something went the other way and what we have now is is that practically all kinds of rules could be built into smart contracts and you need to go to court because uh they're they're self-executing the issue of course is that most of the value in transactioning is happening in the legacy systems but it doesn't actually like restrict most of the stuff going into the decentralized way you know even like in the physical world there could be decentralized network there and then you have the the actual like cryptographic value networks which is the theory and one thing we

we should do this year is build more kind of uh you know different kinds of protection mechanisms in the sense that you know traditionally let's say law has been about uh it could be about investor protection consumer protection and so forth those kind of functions can be built into smart contracts and even make better transparently and i think probably blockchain is the best rec tech tool the best one like you have all this transparency and you know practically you can build more security mechanisms and and kind of like it's just like i i don't think we have realized yet the the potential here like how it could actually smart

contract could replace law completely that is something we actually have even thought about one thing i need to chill about ave is that the the governance because we divided the the vote delegation where you can delegate votes to let's say uh protocol politicians uh from actually delegating proposition power and this is interesting in the sense because in let's say governments and and different bodies usually you have lawmakers that are creating the law and then you have the the politicians who are voting on on the proposals and here in these interest systems the the the law is practically the code that we create right so practically that's the idea so

you have different people for for creating code which is the the regulation and different people voting whether it's good or bad code regulation practically there's the old school debate about whether code is law but uh uh it's it's uh we can have another another podcast sounds like a totally new topic it's an interesting um scenario though because i always think of crypto as being such a cowboy kind of like wild west scenario in a lot of ways and yet what you're describing is like a very rule-abiding society as well and so that's kind of an interesting juxtaposition yeah i mean one one thing to note though

is that lending protocols in general both compound and ave have been kind of the only protocols to prove that they need a governance token in some ways right like they actually really use them quite a bit and you actually use them to safeguard assets to be like we're not going to have this asset we're going to change those parameters whereas like a lot of other governance tokens have very dubious direct utility to them yeah to the protocol i mean sometimes they might i'm not i'm just saying it takes a little while but in in the case of lending it's always been something where you need some form of like oversight because you know there's there's an implied social contract that's true i i never actually thought about this

way but yeah i i do agree i mean there's so much risk exposure and i don't think we even realize how how much different kinds of risk there are in in d5 that's also another topic but but kind of like that's also called part about d5 because everything is transparent you can calculate everything the exposure and make interesting tools you might not be able to do in the similar extents extensively in traditional finance because you're trusting always someone or it'll take you a long time yeah to get everyone to give you the data like yeah cool so i want to say thank you stani for coming on the show and sharing

all of this with us thanks anna thanks it was fun thanks yeah and to our listeners thanks for listening