New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Alex Bazhanau ~ Short and Sweet: Easy DeFi Leveraging Bloqboard

Ethereum DenverWed, Oct 9, 2019, 12:00 AM

Alex Bazhanau of Bloqboard speaks on Short and Sweet: Easy DeFi Leveraging Bloqboard

Transcript

[Music] our next talk is Alex Bosna from blackboard short and sweet easy defy leveraging blackboard let's give it up for Alex thanks hello everyone so I'm Alex from blackboard and I'd like to tell you how you can easily integrate with decentralized Finance protocols to execute short and long positions without losing a custody of your assets and without knowing the specifics of the protocols so a couple of words about our company what we are doing so blackboard is centralized asset lending platform and with blackboard you can easily interact with the different protocols like make it Dow compound Dharma and you can do this with the app and it's okay for consumers for customers to manually do trading and then borrowing assets then selling it executes in short and long positions but if you are developer it's not a good solution right so that's when blackboard lending wallet comes in so this solution allows you as a developer to program your trading BOTS or other software and integrate your software with the decentralized finance sector system without knowing how it works and actually its solution it's actually I have the text for my workshop I just forget to share it with you so you can open this link bitly slash to be e z WQ to and it will contain a link to peer pet net it some kind of platform for my engine text and it's built by protocol labs so it relies ipfs and CR gt2 to allow you to manage text and to be distributed in decentralized manner so you can follow this text if you will have some if you will stop somewhere and you can go next with this text yes so and let's get the back to lentil wallet so advantage wallet is it says yeah ah sure one sec take it like this is it ok yeah so report its solution that gives you opportunity to engage in unchained lending or n simple HTTP API in non-custodial manner so this software runs on your server in the cloud or at your computer and it will manage all the transactions for you so you really don't need to go deep to the MacDowell smart contracts or compartments about contracts and also this social capital integration with Triboro hyper decks so it will allow you to sell immediately the assets that you have borrowed on one of the landing protocols and also you'll help to repay some some dust okay so as I mentioned with this solution you don't really need to have any experience with web sorry or smart contracts or a cerium so all you have to do is just to create an cerium account pass it to this software and interact with the software over there convenient HTTP API and it's easily it's really reduces the barrier for new developers to deep to dig into the decentralized finance ecosystem and also this social have the auto-generated web interface so you even don't need to do any coding in order to interact with this solution so I will show you how to how to use this and how to interact with digital Iceland in protocols so first of all you need to go to the github repository with the source code and it's it's open source project so you can review this if you want and you can ensure that your private key will note you will not go somewhere else and you will be having the custody of your assets and once you go to this github repository you can clone it to your computer and you already did it on my computer so after the after the step when you clone this repo you can just install the NPM packages so and then you can then you need to pass the account the count with the assets to this solution yeah so the second step you need to generate and you private public key pair you can do this with any client like my user wallet so we need just to create a new account by keystroke file we can generate some random password here alright then I can download the JSON file that contains the private key to my computer and then I can access the account on the my wallet for example so I'm pasting the passport that I used when I was creating the account it's just the empty account then you need to send some easier and by the way the latter wallet can work with the rest net with : but not all of the protocols working good on test Nets so to be honest the only network way when you can test all the protocols is the main net so you need to have some real easier to to try this so and once you created the account you just need to send some easier to this account yeah please don't send the big amounts the first place you test on the small amount first and then if you show if you don't if it shows that you don't lose the money you can try it with the larger amount but this project is not like complete solution it's a rather MVP so it's not audited it's maybe not tested well so the queues it at your own risk alright so and once you credit account you can click print and you can get the private key from my user wallet and then you need to go into the repositories that you have cloned and you need to need to paste the private key of this newly credit account to the to the app so on the github page you will see how how you can do this wait a sec yes so in the repository you have the resources folder and the account Jason so this file can contains the private key from your from your account with which you will interact with the smart contracts right so you need just to paste the private key here I already done this with my account and I already have some easier on it and after this we can we can do we can run the application actually so all I need to do is just copy this command and the emblem run start so yeah I'm sorry that you have the not GS installed on your computer if you don't have please install some recent version and let me make it bigger right so I'm running the command NPM brand start from the project directory and it started so once the application launched I can go through this link it's linked to a local host let me open in the new tab so we on the on this third step when we we are opening the outer generated user interface of the lending wallet and we can see what kind of actions I can do with my Asteria montrezl right now with my with my account so first of all I can check balance of my account I can specify some specific token if I want to check only one balance but if I just leave it by default I will get all my balances in all supported tokens so for now the solution supports only wrapped issue die 0x rep and B 80 but more tokens will come up when they will have like more adoption more liquidity right so it's just a top probably top five for the noids it's actually the tokens that supports that compound protocol supports so on this account already sent 0.1 Easter for this account and in order to interact with different protocols I need to wrap it because the whole decentralized finance system like a system it works fee is not with the ether itself but rather we've wrapped Easter so in order to wrap the Israel you can just click to this green green area it's the user interface for posting the wrap action and to actually when we send the request request to the lending wallet that that runs on my local machine right now it will create a transaction to wrap the issue and it will send it through a serial network so I just need to click try it out on the right corner right right upper corner and I need to specify the amount of the rebbe of the ether that I want to wrap just keep in mind that I need to leave some ether for gas fees so let me convert 0.05 ether and you also can specify do you want to wait till that transaction will be mined or you want to receive the response from from the lending wallet immediately so by default it will wait for the transaction but I don't know I don't want to wait right now I just want to show you what happened immediately so I click execute and this user interface will send the post request to the local server of Blackboard lending wallet and in the response you can see the transaction log that occurred during the execution of this rep rep and endpoint so it actually returns the data about the transaction that happened and as you can see here there is a hash field and we can copy it and paste to either of either scan just to see what happened with this it's my net transaction so it takes time to - but yeah we need to wait a little bit and yeah and while we're waiting I want to tell what we're going to do next after we wrap our our ether into wrap ether so actually what we are going to do in this workshop we are going to make cross protocol arbitrage of interest rates because the nowadays on micro down we have the APR of one wait a sec I will show you could say block board line involved and also what what platform and you can see that for borwein die on maker APR is like inter annual percentage rate is 1% but I can supply I can rent the the same die to compound with the two point 36 percent and by this I can earn the difference in the AP hours so that's what we are going to do we going to borrow die from maker and supplies to compound and by this action we can earn some some money so let me check if transaction was mined yeah we successfully grab our issue and we can check on the smuggler user interface the new balance of our account so yeah you can see that we successfully wrapped 0.05 easier and with this I can go to make a Dow section of this user interface and I can easily supply my collateral my rapt ether that will be used as a collateral and I can borrow died in the same transaction so under the hood this Leonard would utilize the blackboard make your gateway smart contracts the that sort of like a wrapper around the major dollar system so and it allows you to do borrowing in the single transaction so let's see I want to supply my rapt ether and I want to borrow let's say one die I will live CD PID blank and in this case the blackboard linear wallet will create the the new CD P for me so let's let's execute this action yeah probably forget to you have get to specify that I don't need to wait for the transaction transactions so the lender wallet will return the response only once the transaction will be mined by default but in the in the logs actually I can just go to either scan and we can see that the transactions were already sent to to the cerium Mysterium Network yes so actually the wallet sense two transactions first was the unlock in the red ether in order to supply the tokens to mark on C smart contact you need to unlock them first it's like like some kind of rule across all the theory own protocols like precocity based on cerium smart contracts so in the second transaction will will be actually borrowing the dye with rapt ether yes so as you can see the first transaction already successfully executed and here comes the second transact transactions transaction that will do both supply and borrowing in the one in one transaction yeah it's also successful in mind as and as you can see we utilized the supply rapt ether and borodai function of the blackboard Michael Dell gate by a smart contract and as we can see on interest can we supplied 0.05 wrapped East row and borrowed one died and let's see what happened with our but with our balances on blackboard lending wallet yeah so as you can see we already supplied all wrapped either and now we have one die so and if we go down to the maker Dow section of this API we can see there are two get requests that allows you to thesis see the status of your CD piece so the first one will show the open CD piece of the current if their own account so we just opened and you see DP you when we was supplying the assets and the second endpoint will allow you to see the status of the CDP in programmatic way so this in point which returns a JSON with the borrowed died balance and also with outstanding die balance because like in make your doll you have to pay the interest rates like like in every London protocol into base some APR some interest rate in order to borrow some principal so as you can see this APR I'm like this interest in occurs every block and if we click once again like right now I have three three four four here and now I have four zero three eight so yeah the stayed in outstanding debt increase every block but the APR is only one percent and we can supply this one dye to the compound protocol and earn additional like additional percents or on this on this dye so I am going to sum our compound section and actually we can check the current balances in compound so it's the cannula credit credit account and I don't have any supplied balances in compound yet but we are going to supply let's say we want to supply one die we don't want to wait till the transactions will be mined and we just send in these transactions so as you can see there are two transactions the first is unlock the die to compound protocol and then we actually supplying the die to the compound yes it takes time for either scan to update the status of this transaction but yeah well while we're waiting let's let's discuss what we are going to do next visit this balance on compound because I just recently supplied the asset on compound it also first of all it gives me some additional interest a cylinder okay and in the same time I can use it as a collateral to borrow some other assets on compound and visit this die I can borrow let's say I can borrow some other tokens like for example dat and I can then sell it on Kaiba exchange also from this landed wallet and if the price of dat will go down let's say in a week I can buy it back with the lower price and I can repay my outstanding debt and I can leave the difference to me so actually I will be doing the shorten of be a TV with compound and khyber so let's check the transaction for the supply yeah so I successfully supplied one die to the compound and let me check this it's borrow balance I haven't borrowed anything yet let's see the supply balance yes so as you can see we supplied one die and because we already waited a couple of blocks I have some additional dust already like it's like my my profit already occurred actually and we can compare it with the outstanding debt in Michael Dow and probably like in like in couple of minutes we will have more balance in compound than our debt in die and that's how we can make some money yeah of course like you need to supply some ether to make it out to borrow the dye but it's another story right so now I can have some collateral in compound that making me some profit and also I can use it for borrowing some dat so let's say I want to borrow 0:05 dat yeah I can check the transaction on either scan and while we are waiting for the mine event we can prepare the transaction on Khyber so in the Khyber section we have the cell endpoint and I want to specify that I want to buy a ripe rapt ether and I want to sell dat and the amount that I want to sell we can take it from the from the bottle and from the bottle section so yeah I want to sell my baat I just need to wait yeah I successfully borrowed it from compound as you can see and let lets let us check the the bottle balance first just to ensure that everything goes right yes so as you can see already borrowed the amount of baat but I already have some outstanding interests to repay so hopefully we will be able to do some profit with dat so I'm selling it on Khyber I'm sorry I'm I'm trying to borrow on this now I just want to sell it yes sir first of all we need to unlock tokens for Khyber smart contract the first transaction is unlock and the second transaction is actually trade yeah so it takes time to update the status but the quietly awaiting I can just show you what else we can do with the went in wood so like we already cover to make a dowel Khyber section compound section and also have actually have the Dharma integration on land in wallets so you can easily fetch open depth requests or open length offers from our block board Dharma relayer API and you can feel those orders right from this landing wallet so you don't have to integrate with us directly so yes so you know you need actually need just two for example we just fetch the order book from block board right now and you if you are developer you can create a some kind of filtering logic that will filter out the orders that you are interested in and you can feel the orders that you want yeah for some reason the production was reverted but yeah but you can check it later wise but it was very but the whole principle is like this you can you can borrow on compound you can borrow on maker you can borrow on Dharma with this solution and you can sell it not just actually with scriber we can sell it with any personalized exchange and we can easily integrate any index here and also there is a plan for balance integration so you can also programatically send and withdraw money from balance account it actually really takes time because in to wait for confirmations but you also can you'll be able to use violence with this because there is a problems problem that on the exes there is not so much a treaty nowadays so for some big traders it's not a solution to use the exes for short or long but we centralized exchanges it can be done yeah so let me use some smaller amount all right so York while waiting for the transaction maybe you have some questions if you don't have some questions like and just want to yeah we already described the some of the future directions and beside this we are going to explore the ability to integrate this logic in some trading libraries because some traders are using some libraries for integration with exchanges so it can be helpful helpful for them and neckla also wanted to do some technical work and we're going to do better nonce management and Moe integrations are coming actually more protocols will be integrated here and yeah it's open source projects so we are calling for developers to help us to build this and to allow other developers to easily engage with the personalized finance ecosystem right so thanks everyone maybe you have some questions right so that's that's it oh sorry yeah oh let's check on yeah I can go to you after the procession we can deal with this yeah all right thank you everyone that was Alex from blackboard let's get up relics [Applause]

Automatic transcript — names and jargon may be misspelled.