The Future of DeFi Part 2 | Unitize Day 4

Betty Chen presents Acala, a Polkadot parachain with a multi-collateral stablecoin, on-chain DEX, and liquid staking. Speakers discuss cross-chain DeFi architecture, composability risks, and how rapid growth in yield farming has created security vulnerabilities that need addressing.
Questions this video answers
~1,300+ nodes; ~4,000+ active accounts; ~14,000+ meaningful transactions (on testnets peak).
He said TVL had recently surpassed $1.6 billion and 'actually today' surpassed $2 billion; he also noted December 2019 TVL was under $700 million.
Chapters
Composability is that could any users be able to use all the defi products in different chains easily. Basically in my words. And the question Vitalik says is yes, but Ether is naturally supported, but all the contract based token or ERC20 need modifications. And here is his words said the ERC20 cylinder would have you need to modify, be able to do something, be able to transfer from one shark to another shard. And so there are a lot of open questions here. Will this modification significantly increase for example the token creator, for example the ERC20 token creators effort to maintain all these tokens? Because it looks like There are multiple ERC20 contracts represent for the same asset in different shots and maintain all these contracts will be much more difficult than right now. And second, would this modification introduce additional for example security efforts so that people need to put more efforts in security in order in testing to make sure those for example contract based tokens are working properly. And I think this make right now the security situation become even more even worse. So after summarizing what we have observed in right now the defi platform, we believe that in the future, when the defi market grows rapidly, we need a platform with first better security, better user experience and better scalability. And there's a bonus that it can also help developer to provide a better developer experience without having too much concerning of standard security issues, user experience issues or scalability issues. So our thoughts to provide a better platform is to provide a olution that use first multi native token plus dex plus sharding so multi nimbit token we allow the users not only to create for example to use the default native token like Ether or QKC on us, but every user is able to create their first class citizen native token and be able to claim their ownership, be able to mint whether they use the SYNR or Cameo Dao. And further, using DAX together with this native token will allow users to use this native token as transaction fee while we still maintain a lot of adjust a lot of problems of for example pricing or different pricing of native tokens. And lastly with sharding we hope that we can easily scale the network and not only the default native token, but all the native token can naturally enjoy the scalability that brings by the sharding technology while we've almost nothing in terms of development actual development efforts. So first let me go to some details why how we are able to solve these existing problems. So first existing problem in terms of security is that we call it called infinite approval. What does that mean? So because of the limitation of the rank the current platform for any ERC token, the users must before participating any DEFI application a user must first approve the DeFi application the smart contract to span the user's assets. On behalf of a user. So for example, suppose I want to put $10 in compound and say hey, I want to lend to somebody else. Then before I move this $10 to compound first I say hey, I will approve compound contract to move $10, spend my $10 to anyone and then I participate in the for example land. Then the contract will move my $10 to the contract and market internally say hey, there's a $10 that I have I can use this $10 to lend to somebody else to earn interest. And so the approved has means that I have to trust the contract that will not do bad thing, that will not steal my assets. And in addition it has an allowance parameter. So for example just now in the previous example I use $10 but in reality to avoid multiple approvals because each time users want to deal with just fixing tenants the next time you need to do another approve for $100 if you want to land. So basically all the Dapps where I use Uniswap Compound they will ask user to just submit approved with infinite allowance. That means the DAPP is able to spend all my assets using another name for example USDC even in just in my account, not in the contracts account. So here is an example when I submit for example before I participate in the compound so it will submit a proof with two parameters. So first parameter which start with 3, 9, 8 blah blah blah. This is basically the contract of compound saying that hey, I approve this contract to spend for me and the next one is FFF infinite F that is basically infinite. Basically how much this contract can spend on behalf of me that is infinite. And as a result this hacked contract can transfer not only my assets that is stored in the contract but also all the corresponding assets in my account. So for example I have 1 million USDC proof of contract and say I want to participate but some data the contract is hacked and the contract can the hacker can move all my $1 million even it is just in my account. So the recent incident of banker is that they found an issue that the hacker is able to move using the contract and then be able to move useless assets. And in addition this problem become I would say much harder to know unless you are being really attacked because a few DAPP provides called unapproved operation. Then say hey, I don't want you, I don't want to Trust anyone that is be able to spend my assets on me. But actually a very few DI provides that. And so. Another question is called non standard ERC token. So we saw that a lot of non standard ERC tokens introduce extra features and prefer the security concerns. For example ERC 777 we have called eventual issue which caused this defi called landf me attack because this all of the use the heavily audit compound code and even ERC20 tokens in itself have bugs that may for example, the main chain token has this bug so they can issue infinitely. So with the node multi native token we designed, we allow everybody to issue the first class tokens and use it to transfer between different contracts. So there's no approved operation. A user just sends its native token to participate the DAPP and it will never risk the asset in the user account. And all the native tokens they have standard behavior. So we don't need to worry about the further security implications of extra features and ERC20 token that brings and eliminate a lot of entrance issue. Another things that user experience is that we believe the future defi platform it can allow user to use any native token as transaction fee and to eliminate the other token for example ether. All this education cost. But the concern is that we heard the default native tokens utility value and here our answer is no. How we are able to do that? Basically we when we perform a transaction using other native token the system will automatically swap it using a system wise DAX it can be implemented as a uniswap or you can be implemented in other kind of simplified DAX and user. From user perspective you just pay any native token. But when the miner process this transaction it will receive default gas token after swap. And this also help the miners to identify those transactions with high values and put higher priority part into transaction into network. And lastly better scalability. So native tokens are stored in the user's account. And so since like as long as we are able to move default native token like ether between shards which we charlie give a comprehensive discussion on how to achieve that then we are also able to be able to move native token between different shards. And that means all these native token can immediately enjoy the scalability that enabled by more shards. And from DAPP developers in order to support this native token they would just deploy the contrast in different shards with a very minimum co chains. And so as I mentioned, this audit token can enjoy increased scalability with more shards. Just naturally there's no extra work to do just issue a difficult token, mint it and scalability is done, credibility is done and we'll also be able to move these tokens so we are able to enable cross shard composability. People can enjoy all the defi products in different charging very easily. And so we try to give a list of examples how to do this. So I won't go to details and here is the link. And lastly the bonus. Basically right now we have a native token ERC and native coherent ether and ERC 20 tokens and the developers need to basically put extra effort in order to support both set of codes. So right right hand side is a source code of compound. Actually you can see that in order to support ERC20 and ether it has to provide two separate codes in order to make sure the system work correctly. And also a lot of cloud old defi like make dao it use it start with Ether first and then when it migrate to using other ERC20 tokens they have do a lot of effort in terms of migration and create further concerns in terms of security or arbitrage space a lot of things. So you can read this story about how they replace their DAI with legacy dai that's called sai. So as a summary we are projecting that the needs of the next generation to defi platform with better security, better experience, better scalability and in terms of better developer experience. And so our conclusion is that multi native token with DEX plus sharding could be a really good solution. It provides better security by using standardized native token and which avoids a lot of security defaults as I should mention infinite approval non standard ERC 20 re entrance issue all kinds of this from user experience wise with system wise default dax it provides a way to exchange any default token native token to default gas token. So the gas token still has its utility value as gas so all the transactions still use it. But all the users of native token holders they do not need to hold the gas token and they can use any native token USDT USDC as transaction fee just like we use it to pay, for example visa or master. And lastly next is scalability. Sharding needs the scalability for native tokens. So for any native token scalability check just they can enjoy the benefit of scalability being by those sharding and be able to moving all the native tokens from different shards to another shard to another, from one shard to another shard Then this defi composability is also enabled so the people can use the token to participate all the defi products in different shard chains in the network and lastly well with this native token there's a very minimum chokehold change is required for the existing code so that it can harvest all the benefits I just mentioned in terms of security experience and scalability. And so this is basically the last slides. We actually have been working towards this direction since we start and we are putting a lot of effort to make all those that is also be able to happen. So from security we are now able to be able to have all our users to issue and mint those native token. And from the user experience wise we already program Exchange in the system wise exchange to provide this swap feature so the user can use any native token to pay as gas token which we will enable it in our mainnet in the half next half a year. And from scalability wise we have finished this when the project was starting with sharding and we are also natively support moving all kinds of native token between shards and so all kinds of this composability that listed by Vitaly. All the scenarios are now enabled and lastly the platform code is enabled to be able to handle this multimedia token. We already support that and we are also providing library code to try to simplify all the development process with better test case with better document and we've also better fixed them on monitoring tools. So our next step is to host campaign on our testnet I think this month and this campaign will last maybe for one or two months and so that people can really experience the all kinds of this I would say benefits, security, experience, scalability through our first testnet and later mainnet in the next half of the year and people can earn the reward in terms of QKC by issuing, minting and playing for example performing transfer transaction or deploy the users of smart contract in testnet and to play with these native tokens. So that's all for my today's talk. Thank you very much for attending my presentation. So if you have any questions feel free to reach out CrowdChain IE and visit our forum community at CrowdChain IO and we were happy to answer any question you have and also if you want to participate in this event we are really happy and will welcome everybody to participate. Thank you.
Sam.
Welcome to join this talk. Very happy to be here actually at the Unitize 2020 to talk cross chain Defi in action and also introduce you to the Acala network that is the DeFi chain for Polkadot and a bit of intro for myself. My name is Betty Chen, I'm the co founder of two projects Acala Network and also Lamina. Both are projects building within the Polkadot ecosystem. So Polkadot is this multi chain universe. So in this talk I'll give a bit of the context of Polkadot network, what it looks like and what it meant for defi and probably debt builders in general to build on Polkadot. And then I will drill into a bit of detail for DeFi that is Acala as the defi shard or the defi chain that provides financial primitives such as stablecoin, decentralized exchange, liquid staking as well as a bunch of financial optimizations that will be very attractive to a lot of the financial innovations and debt builders. And lastly I will actually very lightly touch on Acala's DAO 3.0 how we use on chain governance and also our decentralized solvent wealth fund to achieve digital solvency. If time allows, I will briefly provide a live demo to everyone here. So before I actually get into Acala specifically I actually want to provide a bit of context for cross chain and that is to speak about Polkadot being the heterogeneous multi sharded protocol. Polkadot is really like layer zero if you like. SA actually provides all the primitive status, trust, security, interchange communication for layer 1 blockchains like Acala to both specialized or specific blockchains or shards that are interoperable in a meaningful and secure way with one another. And if you look at Ethereum 2.0 that is a multi shard with single consensus, but each shard is exactly the same and that is homogeneous on the other side of the spectrum, like Cosmos on the other hand, each hub is completely independent and you can have completely different consensus. And also security is provided by its own hub. And Polkadot really occupies a unique design space in the middle that is like each shard or each chain would be a specialist chain and they can be different hence heterogeneous. And each special chain could be optimized for defi use cases, gaming, IOT or anything that you can think about. But they share security provided by Polkadot. And another point I want to make here is also the upgradeability which many people probably didn't realize is you probably realize the only constant we have is change. And historically in blockchain evolution we've been lacking of this concept of agency and that is a change agent that a group of people can express their will and also execute actions to achieve their purposes. So Polkadot through the substrate framework allows forklifts upgradability with on chain governance. And I'll show a little bit of how Acala actually implements this. This is what it Looks like if you actually build on Polkadot. So Acala is the defi shard or the defi parachain and that is just the name for heterogeneous shard or heterogeneous chain and amongst many others. Right. And Polkadot relay chain is the proof of stake network that will provide security and also interoperability for message passing between different type of chains. Yeah, as I mentioned, parachain is just named for heterogeneous chains connected to polkadot. And Acala network is really the specialist defi parachain defi shot for Polkadot Acada, you can think about it as the special economic zone on Polkadot network. It provides financial optimizations and financial primitives. So we could have optimizations like fee schedules are customizable. So when you say transfer some DAI or some US dollars, you could just pay US dollars as fees rather than the network token. And we can also optimize for Oracle operations, for example, we can employ quality of service so that Oracle operations are prioritized as important services on a chain for defi applications. And Acada also provides a bunch of defi primitives. So there's a cross chain capable stablecoin that can use cross chain assets such as such as bitcoin and other assets as collateral for credits, credit line facility. And also the dollars or the stablecoin that's generated is also cross chain capable in that regard. And the second thing we offer is as primitive as a decentralized exchange that obviously will boost liquidity for the chain. But I will talk a little bit more later on. What else does it offer? Because it's quite a unique way for us to bootstrap the network using a dex. Then the third thing that we offer as a primitive is liquid staking which will release much of the liquidity on the POS network specifically for defi which will otherwise be locked in for proof of stake. So I'll talk a little bit more on that a bit later as well. So really Acala is the open platform for other DAPP to build on top of. And there's a spectrum of options depending on sophistication and also levels of customization required for your DAPP and the different ways that we can build together within Polkadot and also on top of Acala. I'll give also a bit of context here is on the substrate framework. For those who are not familiar with it, Substrate is really just a blockchain framework that abstracts away much of the complexity of building a blockchain, but at the same time allows you to have various level of customization for application or protocol developers. Builders like ourselves, we mostly focus on customizing chain logic for our purposes. For example, in our case we focus on optimizing or building more functionalities for financial implementations. But we're not worried too much about consensus or the P2P communication or story per se. But you could customize all of those if you like and this really allows depth development on top of Acala have many different options to build on Acala. So for proof of concept or quick deployment you can deploy your solidity smart contract directly on Acala and via EVM capability on Acala or substrate chains. But at the same time you can leverage the existing financial primitives that's been provided like StableCoin, like dex, etc. Otherwise you can also use a more efficient rust based ink smart contract facility provided by Parity to build and deploy on Acala as well. Either way it's a smart contract. Then the second way that you can build on top of Acala is you can deploy a more integrated chain logic. That's what we call runtime modules. You can actually develop a more integrated solution on Acala network and that version does require permission and also requires security audit because it does change the chain logic. But a good example is we're currently working with quite a popular Bitcoin bridge team and they would build what we call a runtime module. Really is customizing and integrating with our existing facilities. For example, when you do a cross chain Bitcoin transfer to Acala, you no longer need to pay fees in our network token. You can just pay the version of Bitcoin as transaction fees. That is the type of customization that can be allowed with this type of integration. Of course the third way is you can build your own chain, but of course you will need to provide your own liveness as well as chain maintenance, etc. But you can also integrate and use Acala's facility using the cross chain facility provided by Polkadot as well. Those are the three ways you can build smart contract or more integrated runtime module. Or you just build a chain and connect with Acala. Let's look a little bit more closer at Acala's protocol. We have three core protocols offered as financial primitives open for anyone to use directly or build on top of and the first one is the multi collateralized Stablecoin and the second is Dex. Third is liquid staking so I'll go through each one of them. So for stablecoins we offer cross chain valuable and also high quality assets and Autonomous credit facility. And this is like maker inspired. So the credit realization mechanism is quite similar but we've improved quite a bit on optimization, liquidation and also liquidity provisioning for the stablecoin facility. So for example we can use Bitcoin as a cross chain asset and provide programmability and also credit facility for these otherwise isolated asset class more use cases. And at the same time, and at the same time there is also other financial innovations can be built on top of this. And there's also this decentralized exchange that's also very interesting to mention here. It is a very simple like constant product automatic market making system that many DEFI people in the DEFI will be quite familiar with. But in addition to use it for bootstrapping liquidity on a CARA network, it also supplements our stablecoin liquidation mechanism. Whereas auctions might be a good mechanism for optimizing pricing, but it's not so good for efficiency. So when we had the Black Thursday happened in Ethereum's defi arena and we had a huge inefficiency in auctions, right? So in here instead of only using auctions for liquidating collaterals in case of liquidation, we can subsidize it for selling collaterals on the decks first if slippage is good before auctioning them off. So at the same time liquidity providers will have multiple ways to generate income. So apart from getting exchange fees as a return, they also get additional profit sharing from stability fees of the stablecoin. There will be more ways to farm here. And another thing is the third protocol that we offer is tokenized staking liquidity or liquid staking if you like. So on a proof of stake network staked assets like dots, there's a competition between staking and defi. So there's a competition from getting yield from staking versus getting return from defi activities. So we've created this trustless and also super easy way for you to stake your dot through the HOMA protocol. It's simply a swap. You're swapping your dot with the ldot token and you are staking. And this ldot is yield bearing. You'll be earning staking yield by just sitting on it. But of course you can also transfer it. You can use it to borrow more liquidity or do more defi stuff. So liquid staking is really the stereo for DeFi on the POS network. So yeah. So to sum up though, to sum up, Acala is the cross chain defi shared or the cross chain special economic zone for polkadot multi chain universe and we have the highest level of security provided by Polkadot and we have cross chain assets in and out of the network at the same time, Bitcoin and others alike. And we've also made available a number of financial primitives for others to use and also build upon. And that is like stablecoin, liquid staking and also decentralized exchange. In addition, ACALA is a DAO 3.0, so is a decentralized autonomous organization version 3.0. The reason being. So it actually has a change agency with on chain governance. It has a voting system, allows token holders collectively to make decision and also in a very smart way. So there's elected councillors to make delegate decision making. It also has democracy modules for referendums and also collective decision making. And the second thing it also offer is execution apparatus. And this actually ensures decisions are binding. So for example, if we want to raise interest rate from 5% to 20% upon making that collective decision by voting on chain, it can be executed on chain and the decision makers can choose execution strategy. For example, it can say increase from 5% to 20% over three months period and gradually increase over every block to soften the block, for example. So that also will be implemented on the KATA network as well. And the third thing for DAO 3.0 is the decentralized sovereign wealth fund. I won't have much time to go into details, but at a high level it's a trustless fund that will reinvest the network surplus generated from the revenues of the network, for example, the stability fees, the transaction fees, etc. And all the surpluses will go into this fund and will be invest in foreign crypto assets. And these assets will need to meet certain criteria. For example, they will need to have value, they need to have used and and also utility. So for example, DOT will be a good first candidate for that. So the fund will probably hold DOT and it can stake DOT to earn a return to earn a yield. And also later it can use the DOT to purchase or rent security for the chain. And once it can actually do that autonomously, it will become self sustaining and also economically sovereignty and it will have enough money for its security. So it will be independent chain. But at the same time we'll continue to generate wealth for continuous development and improvement or running or maintaining the chain. Of course, the most important thing is the wealth fund itself is also owned by the network, so collectively owned and governed by the token holders via governance. And I think that is a truly digital jurisdiction in the making. And this is a chart that what it looks like when you zoom out a little bit with Polkadot relay chains and also other parachains like IoT chains, gaming chains, social network chains, etc. And Acala occupies the space of Defi and various applications we build on top of. So apart from the bitcoin bridges that I mentioned, there's also other types of Stablecoin it's going to land on Acala. There's room for many different types of Stablecoin and other type of assets to land on Acala and do many interesting financial innovations there. So this is where we are at. So we've launched multiple testnets so far and there are already three testnets candidates been launched and we've launched also a whole suite of financial products with what I've mentioned. So the Dex is available, the Stablecoin is available as well as the liquid staking. And what we've achieved so far is at the peak of it we've got 1,300 plus nodes running for the test network, 4,000 plus active accounts been generated, 14,000 plus meaningful transaction that's actually doing the defi or trading activity activities that we've seen. And later I'll provide links for people to actually be able to try all of this. We are also fortunate enough to be backed by some of the top VCs in the field at Polychain like Hash Key, KR1 and many others who actually help us to build many of this stuff together. And also our ecosystem projects teams who will build with Acala one way or another as I mentioned, either deploy on Acala or actually connect to Acala in one way or another. And then we started to actually grow outside of Polkadot as well because there's also Ethereum and also other communities who's looking to connect because the future is probably more multi chain than chain maximization. Yeah. And then lastly there's also a bunch of Liveness providers or more traditionally they are validators who joined us to provide liveness to the network. And I think this is a point where I would like to run a bit of live demo. I think it's quite a brief act if you can do live demo. But I think if a picture worth a thousand words, a live demo probably worth the whole presentation. So let's see here you actually land on the financial suite that I was talking about, a server center and in here you are able to browse into the Acala network and you will see various tokens available on the testnet. So this dot there's ACA is the network token, the AUSD is Acala dollar that's been generated as the collateral stablecoin and then there's also cross chain assets like Bitcoin as an example. And also LDOT is the liquid staking token which I will explain a bit later as well. So let's just go through an example. So this is the self service loan. It's a credit facility that you can use cross chain asset to generate US dollars. So let's say I have a bit of Bitcoin that I've breached in from the bitcoin network and then I will use the bitcoin to generate some US dollars. So in here as you can see with the balance I have, so I'll just use one bitcoin to borrow and I could borrow up to $7,600. And if I do that, okay I'm definitely allowed but I'm close to liquidation so I'll be a bit conservative. So I'll just go for $7,000. Even for that I'm giving a warning because if the bitcoin, if Bitcoin actually drops to 7700 then I'll get liquidated. So let's be more conservative. So that's how much I will borrow. Like with one bitcoin I'll borrow $6,500. And yeah, so at the moment the interest rates is arbitrary. So before we go live we'll have a bit of fine tune of rates and etc. But also bear in mind all of this can be upgraded and changed on chain with governance. So this is popping up as the pogo JS is the wallet that provided. That is always the thrill of doing a live demo. Something's not working. Yeah, so. Oh, okay. So that is the transactions done and you'll notice actually happened quite quickly because the average block time is between two to four seconds and without optimization. So this is how fast it can get on here. And here's the loan that I've created for myself, $65,000 and it's already having some interest being generated. And in here also self manage, I can pay back the loan or I can generate a bit more US dollars and I can deposit more bitcoin or withdraw as I wish. And at the same time we have integrated with explorers like Subscan and you can actually browse all the chain activities on here quite easily. The next thing I want to show you is quite quickly and I'm going to go through the entire demo is here is a uniswap like exchange that's made available here so you can Actually say I've got some US dollar that I just generated from the bitcoin. And then now I want to, maybe I want to double down like on bitcoin, I just leverage trade on bitcoin. So I can just do that. Right, so. And then you just exchanges. Yeah, not too fast about it. But what is interesting is this deposit and earn. So that is the place where liquidity providers can provide liquidity, can deposit liquidity to the swap pool. And this liquidity for one it will just use for the dex for exchange, but secondly it will use for liquidation for the stable coins. So as I mentioned before, when liquidation happen, it will actually liquidate the collaterals on here first given the right slippage and liquidity provider will gain extra reward. So the total return will be actually quite lucrative given the additional stability fee, profit sharing. And then lastly I'll just quickly show the liquid staking portion of it. Normally when you stake you have to go through a number of steps to put your dots, bond your dots and also go through a process to stake and choose the validator. Then here we have a meta staking protocol where you just simply swap your dot with the liquid or ldot token, which is a fungible ERC20 like token that you can hold in your wallet. Then once you stake your dot, you can just leave it and then your L dot will continue to be in your wallet and it will generate dot returns. And you can actually see all the details in here. What's also interesting is apart from you can transfer the dots and et cetera, you can actually redeem your dot immediately. So normally when you stake there's unbounding, you have to wait for a certain period of time before you can unstake. But with the design of our pool or our liquid staking protocol, you can actually have that liquidity immediately if you like. But of course you will need to pay a bit of fee to make up the liquidity that you have. And then with the ldot that you have, you probably already seen it when I click through the credit line here is that you can actually use your L dot to generate credit facility. You can generate US dollars using your L dot. So think about that. So your LDOC is yield earning sitting there, yield earning while you actually loaning out a bit of liquidity for yourself to use or trade or do anything else. So that is the beauty of crypto in a sense that your money can be in two places at one time. And then lastly, this is still work in progress. So on the interface on the UX side of it. So here is what governance looks like. So on Acala, when I say voting system, it's not just a simple vote per se because we have to consider different functionalities of the votes and also different ways of voting. So for example, on Acala the General Council will look after the entire chain. So for any upgrades, any runtime upgrades, change any of the chain logic, etc. And then the Hongzong Council, which will also be elected council seats, they will look after say the stablecoin parameters. So for example, if I want to change interest rates or change liquidation rates, for example, these guys will be delegated decision makers if you like to make those decisions. And then technical councils, if there's a bug or anything, it requires urgent change and they can raise it and go through the process. And then for us it is a practical progressive decentralization which means at the very beginning it will be relatively centralized. So a lot of these councils decisions are made by the councils and then the next step for us is to open this up to referendum. So to all token holders or stakeholders where they are able to propose any proposals and also participate in referendums as well as electing council members. This is an example of a motion or a proposal that people made and you can actually see this is a changing liquidity incentive, right for Dex and then how much is changing too. And as soon as this motion is passed the threshold required, then this will be executed on chain. Of course execution strategy is also customizable and people can require to say it's going to execute immediately or I want it to change over time. For example, all in all that is Acala Network that I want to show you today and that is only at the beginning of cross chain defi in action. I think this is only the beginning because as we progress through you can see there will be end users using these protocols and then also empowering a lot of currently isolated asset classes like Bitcoin to have programmability to be used in defi and also many other use cases. And the next step is for more dev developers to come on board, which we are talking to quite a few of them to actually build and innovate for multi chain future. So that is my talk today. If there's any questions or any inquiries, we'll put some link through at the end of the talk and don't hesitate to contact us and ask questions. And also most importantly try out the dapp, try out applications and tell us what you think. Thank you.
How4.
Y.
E.
Oh it's B B always.
Open Trade where you want to, when you want to.
Huobi, your trustworthy crypto exchange.
Hi, I'm Richard Ma, CEO of quantstamp. And today I'm going to talk about how despite all the hacks, the future is still Defi. So Defi has been growing really rapidly recently and I think we've really seen product market fit with Defi. It's possibly one of the first category of applications that I think has achieved product market fit. And the vision of Defi is to replicate many of the financial products and services that are in traditional finance, but now on the blockchain and without a central authority. So people can basically do many of these functions in a permissionless way. Right now the value that's locked in Defi has recently surpassed $1.6 billion and actually today it's actually surpassed $2 billion. And this has really built as a trend over the whole of 2019. And now with the launch of Compound, it's really increased. So why does this matter? Well, you know, it means that people are actively lending, borrowing, using Dexs and on chain derivatives and more and more often, you know, we've seen this trend accelerate. So In December of 2019 there was less than 700 million that was locked in Defi. So it's around tripled in the last six months. And it also indicates a desire for an alternative financial system because as we see with COVID central banks are printing more and more money and the interest rates that are available in the traditional financial system are quite low. So people are looking for a better option. One of the benefits of Defi is composability. So what that means is the analogy is like money Legos, you can produce components that live on a blockchain and other companies can then build on top of those components and make more interesting applications. By linking up these different applications, you can get more functionality without having to repeat all the work that someone else is doing to build up these building blocks for you. Over time this has a compounding network effect where as more and more services in the ecosystem are available, it becomes easier to build additional services on top of it. And one example of that is called Archer. So archtrees, they allow people to donate interest that is parked into an app called Compound and use that to plant trees. So Archer, they have a non profit that is planting trees and if you deposit your dai, your savings into their contract, your principal is actually preserved. So you're not really losing any money on your principal, but the extra interest is going to their fund to plant trees and they're using this composability concept because arcrees is based on top of rdai, which allows you to separate the principal and the interest from your interest payment. And also Compound, which is an app that allows you to get interest on your money on the blockchain. Compound is growing quite rapidly. In June of this year they released a comp token, which is a governance token that's being farmed out, being provided to people that use a compound system. And since they have this distribution compound moved from the second most used project in defi to the first. So they eclipsed MakerDAO in that process. If you look at the chart on the right, I think it's definitely a testament to the incentives of doing yield farming because it can increase interest rates. But we also see more and more teams doing this. This is kind of the yield farming trend. It's also, in a short amount of time, the comp token has become the highest market cap token of any defi token. Over 700 million has flowed into it to take advantage of these yields. Because you get the existing yields that you can't really get in traditional finance where the yields are all below 1%, but you also get an additional yield from the distribution of the comp. And so this is kind of a double edged sword. It provides new opportunities, but also new risks. So I'll talk about opportunities first. One of the opportunities is that Compound is basically like a decentralized money market. So people can supply, other people can borrow using their collateral and pay interest and get interest. And it's all being facilitated by the smart contracts. And every day if you're a borrower or you're a supplier, you get paid additional comp. And this is at times made the interest rates as high as 50 to 100% a year. It fluctuates based on the overall usage. The major risk is that one is that most people don't really understand the smart contracts. And so they're kind of trusting Compound to do a good job with their audits and reviews. But also the way that people are getting these yields are also becoming more and more complex. People are trying to farm extra yields by basically borrowing funds using their collateral and then redepositing those funds into different wallets and then borrowing against those again and over and over. Some apps allow you to do that four times where you're kind of folding your deposit back, but theoretically you can do it even more than four times. The problem with this is that it increases the increases the leverage in the system. So it's Kind of an indirect incentive that people are trying to capture by doing this. But it increases the smart contract risk as well. Because now there's going to be a lot more value that's locked into these contracts. And if you look at traditional finance, there's very few companies that within.
A.
Month of launch they can get so much money deposited into their systems. 700 million within a month. The other risk is that increases the risk of liquidation. So depending on what asset you're borrowing and supplying, if the value of your collateral falls significantly or the value of what you're borrowing goes up significantly, you can get liquidated. And there's a fee that's associated with getting your position liquidated. And that fee could be potentially a lot higher than what you're earning interest rates in the first place. So those are kind of the risks. Regardless of the opportunities and risks, it's a very new ecosystem. This has not really been around for a very long time, but it has a lot of promise. It can tackle some long standing problems that I think many of us who got into blockchain wanted to try to tackle. Personally is the reason why I was really interested in blockchain. The main problem is that the traditional financial system is very inefficient. If you want to go to a bank and do a bank transfer, that's pretty inefficient. There's kind of not a lot of liquidity for borrowing. If you wanted to even get a loan most of the time, that's a very complicated process. Even if you had the collateral and could prove that you had these assets, you have to go through a long process to get a loan. With defi, it's very fast. It's all handled by smart contracts. So that reduces a lot of the costs and friction that's kind of captured in the traditional financial system. And what I've seen with the new DEFI applications that we're auditing is that now there's many different sectors that these applications are tackling as well. So I think over time that the composable nature of these applications is going to be really strong because the security of these applications will get improved out over time. The user sophistication will also improve over time, but also the applications will become more specific. So that's another benefit. Now I'm going to talk about some applications that we're excited about. At quantstamp, we've been auditing dozens and dozens of new defi applications, including many different DAOs. One DAO that we've worked with pretty Closely is called Metacartel Dao. We've also audited almost a dozen projects for the Makerdao grants ecosystem. So let me just talk about some of them. So four of them I'm going to talk about. One is called Idle, second one is Nuo and then Pull together and zero collateral. So Idle, what they're doing is very much based on this kind of composability money Legos theme. So right now one of the problems for users of Defi is that there are a lot of different services where you can get yields on your deposits. And what Idle does is similar to like a wealth front where they're automatically rebalancing your portfolio and trying to get you the maximum yields for your specific risk parameters so you don't have to constantly go around and hunt for the best yield. They will automate this process by rebalancing. I think that's pretty cool because it's kind of another layer on top of these protocols like Compound that can do a meta balancing of all this optimization of the yields. The second project I'm going to talk about is nuo. So Nuo, they're a project based out of India that offers global borrowing and lending and margin trading. One of their really cool features is that they are actually coming up with a new bank called Juno which is kind of a bridge between traditional finance and DeFi and allows people to open a bank account and get access to the great interest rates in Defi. It's been around for a while and we're pretty happy to have. The third project I'm going to talk about is Pull Together. So Pull Together is interesting in that it's a very blockchain native creation. It's a brand new idea. So what they're doing is offering a no loss lottery where if you participate weekly, there's no chance that anyone who participates can lose their funds. And the reason is that they basically pull everyone's funds together and then deposit that into Compound Finance every week. They then select provably random winner and the winner of that week gets the interest from the whole pool so everyone else doesn't lose their deposits that they purchased the lottery ticket with. And the other benefit is of a no loss lottery is that because you never lose your deposit, you never have to spend money for the lottery tickets. They allow you to roll over the lottery tickets from week to week. So, you know, a lot of people buy lottery tickets and it's usually because there's some kind of psychological reasons why people like to buy lottery tickets to try to win a really big jackpot. And what I like about Pull Together is that they're kind of using this same psychological trick to make something really approachable for people, part of people's daily habits, and adding a better savings element to that. Because if you buy regular lottery tickets and you don't win, then you're kind of spending your money. But here it's encouraging people to save more. And they're also using composability because they're funneling the interest rate payments, but also using compound to get the interest as well. Last one I'm going to talk about is zero collateral. So right now, one of the problems in decentralized lending is that whenever I want to get a loan, I always need to supply collateral that is higher than the amount on my loan. So let's say I want to get like, you know, $100 of USDC loan, I have to maybe supply $200 worth of ether. And as you can imagine, normally when I go to a bank, like a regular bank to get a loan, usually the whole point of getting a loan is that I don't have the collateral, right? So if I want to, you know, buy a house or get an auto loan, I don't have the cash to be able to supply as collateral, only to take out a fraction of it. So I think they're trying to improve the experience by offering this kind of under collateralized loan. And their initial approach is that when you get your first loan, they will start to track how much interest you paid into the system. And over time they will, if you get another loan, they will deduct the amount of interest that you paid in. And it's possible eventually to get to a point where you actually don't need any collateral by having continuous like kind of a blockchain based credit score to reduce the amount of your collateral that you use. So I think it's a very interesting idea that's still pretty new and hopefully over time we're going to see more of this onto the security issues. So in 2020 alone, there's been about $26 million that's been lost due to hacks in defi. On the right. This is pretty recent news where liquidity pool and balancer was drained due to a deflationary token. Many of the defi projects there's been vulnerabilities that have been found and in some cases stolen. So one of the largest attack vectors in defi is through these under collateralized loans. And the way the attacker does this is they manipulate the price of some assets on the blockchain temporarily, and then they deposit those assets that are temporarily inflated into one of these lending protocols and then they borrow another asset, a different asset, using this artificially inflated price. And after they borrowed it, the blockchain is immutable, so there's no way that the protocol can get the money back. And in effect, they got free money from inflating some artificial on chain price. So I'm going to show some examples of this. So first there's this Statera example which happened very recently from Balancer. And what they did was Normally in the ERC20 token, when you transfer it, the amount of the token at the start and after the transfer stays the same. This is called the invariant. But the Statera token, it didn't respect this invariant because it's built as a deflationary token. So every time you transfer it, 1% is destroyed. And this can be very confusing for protocols because they're not built to handle this type of token. So what the attacker did was they found a pool that had this deflationary token and some other ones like Ether, wrapped Bitcoin and Chainlink and some synthetics, and they repeatedly swapped the token back and forth with wrapped eth until there was a very small amount of stator token left in the pool. And because of the logic in the pool, they were able to use this very small amount of token to swap for all the rest of the assets like Ether and Bitcoin. And after they've drained all these other assets, they can basically walk away with the money. This happened to two different pools and about half a million dollars was stolen. Another hack that happened before this one was called Deforce and in that one about $25 million was stolen. This actually leveraged a reentrancy attack, so it was somewhat of a known issue. So the attacker was basically able to borrow a lot of other assets on the DForces platform and exit with all those assets. And obviously the blockchain is immutable. But fortunately what happened was that I think the team and some members of the community were actually able to track down the hacker and at the end they returned the funds to divorce. So that's another type of vulnerability that's out there. The third one that I'm going to talk about is the BCX hacks. So there were actually two of them and they worked in slightly different ways, but they had the same outcome. Basically, the attacker was able to open a large uncollateralized under collateralized debt position, leave with the debts and have the temporarily change price revert back to normal. So in the first one what the hacker did was that they artificially inflated the price of wrapped Bitcoin on Uniswap. And this is Uniswap V1 and now Uniswap, you know, there's Uniswap V2. So now the attack is not possible anymore. But they basically took this overpriced wrapped bitcoin and got a lot of eth from it and then just basically walk away the eth and then have the bitcoin price return to normal. The second one that they did was using Kyber. So they actually artificially inflated the price of S USD versus Ether and then they deposited this over inflated S USD as a collateral, took out a big loan, and then after they took out the loan, they just don't have to repay the funds. So that was the second attack and this happened during Ethanberg. So still fairly recent. The reason is for showing these examples is that we think security is very crucial for Defi's growth. Imagine if you were part of these pools or using these products and one day you find out that whatever funds you had to put in to lend are now gone. It might not be possible to have the team refund you because the project is supposed to be decentralized and there's no way in many cases to track down the attacker. And so your funds are gone forever. So what this means is that it's much more crucial in this case to have proper security ahead of time and for the users to be educated when they decide which products to use and how to protect themselves. Not to over leverage or to take too many financial risks and to understand exactly what type of risks they're taking. We think that on top of just doing security audits, that getting security monitoring, live monitoring, encouraging increased transparency from the projects, and also getting insurance in the future is going to help to increase Defi's potential. And also many of these projects are going to be battle tested over time. And as they get battle tested over time, the risk will start to decrease if they don't keep adding more features. We're pretty much heavy believers in Defi and I think there's a couple of reasons. One is that world is increasingly global and so as kind of one of the first Internet native generations, we're used to dealing with each other on the Internet, making transactions, doing E commerce. And there's no logical reason why traditional finance is so landlocked, often locked to local jurisdictions. The second reason is that it can make markets More transparent and permissionless. It can give people a lot more access to different services and create financial opportunity for people. And I think that, you know, many of you in the audience could even be building this next generation of really awesome financial products. And I look forward to seeing what you all build for quantstamp. For all you know, we think that our role is to help to secure the decentralized web. You know, there's so much risk out there. Whenever projects release new products, people kind of jump onto it without fully understanding. And so we're trying to safeguard many of these new projects who are building really cool stuff and making sure that we can continue to have more users, join the whole ecosystem and feel secure doing that. And we think that Defi it provides a lot of value to society. And this trend grows because of the money Legos. So as people build interesting building blocks, those are kind of permanent and new people can take advantage of those over time. So we're very much in kind of this building the foundations phase. As part of building the foundations, Quantstamp also recently audited one of the leading Ethereum 2.0 clients for Prismatic Labs. This client is very similar to the Geth client that people use for eth1. And we think that this is going to have a lot of impacts on Defi. We recently completed audit and the progress is going really well for the Prismatic team. They've done an amazing job in terms of releasing it and having it be so well tested and so well built. Some of the impacts is that once these stages of 2.0 launches, we can see much lower fees for Defi. One of the big problems right now is that the fees are so high on these networks because a lot more people are using Ethereum now. They're using it for the stablecoin transactions for many of the Defi products. And having lower fees can also decrease the barrier for game companies. Because when you're making large financial transactions on Defi, you might not care about the high gas fees, but if you're running a game, that becomes a lot more important with the transition to proof of stake. It also means that the blockchain can process a lot more transactions in terms of throughput. What that means is we can handle more people who are using this because right now one of the big bottlenecks is not just in terms of fees, but also how many transactions you can just handle. And in the near term, I think, you know, some of this is going to continue to move to Layer two. And there's been many cool companies that's building products for Layer two that we think are going to start taking off. Lastly, we think that there's going to be some impacts on composability, which is kind of linking all the products together due to sharding and researchers are still finalizing that, but that's going to continue over time. But maybe we can get a lot of the benefits from having these initial 2.0 plus some layer 2 solutions. In terms of what's next, we think that there's going to be a lot of great opportunity for growth and deployment development in DEFI is definitely going to continue and that we're still in the early days and we look forward to seeing what some of you in the audience build because we're very strong believers ourselves and we want to see this wave continue. And that's it. If you want to learn more about the recent hacks and dive into it more, you can go to quantstem.com blog where we try to break down the hacks or go to our QR code. And thanks everyone for attending my talk. Appreciate it.










