EthCC 2: Stani Kulechov
Ethereum Paris·Wed, Oct 9, 2019, 12:00 AM
Speaker
EthCC 2 EthCC, the Ethereum Community Conference is created by the community, for the community. It brings together great minds and forethinkers, and allows the community to grow. Follow us : @AssethFR https://ethcc.io
Transcript
all right hey guys hope you all got a good coffee break so basically there's more security talk today now going to address very interesting issue which basically concerns most of the dubs today and related to the year seat when a token standard so yeah so the topic today is to approve or not to approve and kind of thinking about the balancing between the security and the user experience when you're building protocols or dubs so a couple of things about Ave so would say that basically a vase is a project that is behind of kind of foix a bit would say a bit older project name it land so basically we do crypto back loans on smart contracts and have been a couple of years now almost on maintenance and basically we are a marketplace where we connect lenders and borrowers borrowers can basically pledge ERC twenty collaterals and lenders can basically lend out eater or for example died now the interesting part in our application is that we deal extensive amount of issues or topics we cover a lot about the years here 20 tokens we currently use as a collateral over 100 tokens and as we all know for example die and most of the stable coins are based on the year c 20 tokens standard so kind of like the topic that we are discussing today is pretty much interesting last year we had a 20 million USD lending volume which was pretty cool yeah so basically users pledge different kinds of tokens here's a 20 s borrow funds and to be able to to to borrow against your assets you need to do certain transactions and approve your tokens so that's the thing that we're discussing today so how many of you guys know this very famous function of the year C 20 tokens standard and what does it do cool see you guys nice so very simple stuff I mean the idea of you hit one is that I mean the approve function is basically that before you do a transaction how it basically works is that you allow an address to spend certain amounts of funds and basically after you have done the approval then you can basically be the smart contract that you have approved konishi initiate the transfer from and spend those particular funds right so there is certain issues for the apps I think roughly couple of years ago mainly the case was usually that when you needed to transfer transfer or C 20 tokens you basically had a dub design or user experience design where you actually approve tokens before you make the transaction right so every time you want to make a transaction you go and approve and you need to pay gas so what happen is that for example in eat land you need to transfer the collateral and approve the function so you might have when you want to withdraw the collateral you have to approve so it's kind of like a bottleneck in the user experience and that has been kind of like an issue and what the haps then kind of solved or circumvented this issue is by actually pre approving extensive amount of tokens so you guys have seen maybe the upper picture there is basically from our application where user approves basically billions amount of tokens whatever the one is the pillow is from compound which is one of the landing protocols as well on ethereum so as a user when you start to interact with the the app or the protocol you're approving billions tokens and kind of first when you see this thing you are a bit a bit more scared I mean it's kind of like it also it doesn't make sense much because you might have maybe 100 or 1000 words of dye and you're asking yourself what the [ __ ] I'm approving billions of billions of tokens of dye and I actually I don't know what's the correct figure here basically but if someone is skilled in maths can actually calculate that so kind of like this is the approach that's where we are now and basically approving and pre approving and this helps in the user experience because you do it once so so basically you don't need to do it over and over again and you usually approve the proxy smart contract behind of the the DUP to approve so it's basically one-shot thing well kind of the security issue here is that once we start to do these approvals and and the allowances you're approving a lot of tokens and they usually the user doesn't have the opportunity to get the approval back to zero for example or there might be an issue for example that the gap operator changes the smart contracts so there's a new smart contract updated in the the client side you will see you interact only with the new smart contracts so kind of like you even don't have a possibility to set it to zero and we're talking here about users who are not that technical right so definitely a technical person might find find those smartphone shots where you have approved billions of tokens and set it back to zero but that's that's not the case for all especially newcomers to the decentralized finance for example yeah so imagine a situation basically you approve billions and tokens let's say die and and and it fill you and basically you approve a proxy smart contracts and that proxy smart contract basically gets compromised and that for example hacker can send those funds wherever and spend those funds in in any way and and send them around the protocol so it's kind of like a big it's it's a small thing but it's in a way that we are now building applications and protocols once we have more and more dubs doing this thing and and we have actually deputies who are using or like consuming multiple apps for example there we might have in the future that one user might consume 10 different dubs or 20 and the problem becomes bigger and bigger and that's where the the risk comes I don't I haven't heard a case yet where where this kind of issue has arised but I would say it's better to think about it now before it's too late and now the question is like how we can improve the control of the allowances and there is a couple of scenarios that we and and our developers that Oliver has thought about it especially one of our lead engineers ernesto thought about that one of the ideas is to basically control the elements is for example we could have time locks so for example if you are proving billions of tokens billions of the I or or or 0x or it or basically any other your c20 you approve to certain amount of blocks so let's say 100 blocks or or 1000 blocks so the security risk is limited there another way of course would be if we designed wallets or add features it's kind of like an off of chain solution so basically we could add features where we could take all the allowances and and and and put them in the database and present to the user and also monitor the events on the ethereum blockchain basically when when these approvals Allah wants this happen and and basically show it to the user and let the users the ability to actually control and and set their approvals to zero so it's kind of like more of an approach that is of chain but also requires kind of like more more attention for the developers who are developing the the user interfaces on owned apps or or wallets so these are pretty interesting ways that how we can address the issue but I think the the main thing what we have to think about is what we're taking home today is to take the approve series thanks guys any questions [Applause] I think it was pretty clear right thank you [Applause]
Automatic transcript — names and jargon may be misspelled.