Using the DAI savings rate - Assignment

You mean in your main net wallet? that case no, testnets are exactly the same as mainnet, but independent on their activity.

Carlos Z

Carlos, doing well. Hope you are too!
I thought I did send screenshots. I followed the https that you sent me. The same as the one above. If you will notice at the end of that session, the https is different on the assignment. The above is easier to follow and even then not in quite the same order. I avoided Mainnet and gas costs. However, a careful eye on each step because it is easy to make mistakes. Requesting and asking for testnet (at the bottom of the list) has some circles. And switching to “buy” instead of “request,” and the next step is to buy more ETH. Not necessarily a trick but an easy mistake. I have $40 that I most likely will never use from the first few times that I attempted the assignment. The second time was much easier. I will resend the screenshots.
Thank you so much for your directions.

Lorraine

The scope of DeFi has provided such good yield opportunities. Even with dual-farming of stable coins. Borrowing the collateral at a low interest rate an either going more speculative with yield farming and being slightly more conservative you can cover a large portion of the risk involved with taking a CDP. It does require you to be active but there is potential to make yield farming a profession which is exciting.

2 Likes

done! , i found some technical issues with the testnet , but it was fun

1 Like

Hi Amadeo. It’s been impossible for me so far to get Kovan test ETH. Any suggestions?

1 Like

You could try with this guide :nerd_face:

Carlos Z

KOVAN Testnet: A DeFi deep dive
PART 1

I would never attempt to do any of this on mainnet because the fees would be abysmal…

DISCLAIMER

Treat this as a guide only! This guide is my own personal experience of using the Kovan testnet and it may serve as a calm starting point for anyone who is trying to get involved with DeFi through the testnet.

Anything you decide to do beyond this walkthrough is entirely your responsibility and any losses or glitches you come across is not my fault! I am not a professional nor am I a financial advisor! It’s important that you know the risks of crypto and do your own research before diving into DeFi

*It’s important to note that because I’m using a testnet, I won’t be able to generate an actual interest on my assets, but instead, I can test out different protocols and see what things would be like if I were to do the same things on the mainnet (You can make mistakes on the testnet without severe financial repercussions since the assets have no value).

*These are the steps I took which enabled me to do this assignment. Please treat this as a guide that you can use to boost your knowledge of the DeFi world using Kovan!

Without further ado, let’s gogogogogo!

Intro:

OH my days! This assignment has been quite challenging to do! Especially on the Kovan testnet! Nevertheless, I have been able to use the Kovan Testnet to save DAI on the Oasis save app. I have also been able to use the Oasis borrow app to use testnet ETH as collateral to get 100 more DAI, which was then used to deposit into the chai.money app and the Oasis save app.

I’ll go through my journey below and provide links to all the resources I used to help me do this!

  1. Getting Testnet ETH

So to start things off, I needed Kovan Testnet ETH, and I tried to use the Kovan faucet, but the website was down, at the time of writing. So I searched far and wide on the internet looking for a solution to how I can get some Kovan Eth, because your boi was not tryna use real assets and potentially get liquidated :laughing:!

I eventually found out that mycrypto wallet released a faucet, so I requested for as much ETH as I could, going through the whole captcha thing several times, before they finally said I had reached my daily limit.

So now I have testnet ETH and need to acquire Testnet DAI.
image

  1. Getting Testnet DAI via DAI Faucet

I was searching the world wide web once again putting in the search bar, " how to get testnet DAI", “Kovan DAI faucet” etc. I then stumbled across a github page that talked me through the process of acquiring Kovan DAI by interacting directly with the smart contract.

From your MetaMask wallet, send ETH to the DAI faucet address, “0x786e3c83cd270414649079A758Ad92f961EDdA0A” in order to receive Kovan DAI. Do make sure that the gas limit is high enough otherwise the transaction will fail; failed transactions still take a bit of ETH from your total balance (gas fees), but it isn’t a lot (since we are in the testnet).

Ofc, I made my fair share of mistakes by not setting the gas limit high enough, which made some of my transactions fail. After adjusting the gas limit to at least 200,000, I was able to send ETH to the DAI faucet Smart contract and receive DAI.
image

2.5) Getting DAI via Uniswap

When I received my DAI, I was a bit surprised about the exchange rate between ETH and DAI, however, the github page does mention that the exchange rate can be far off from the mainnet.

Kovan Exchange rate:
image

Mainnet Exchange rate:
image

As you can see, ETH is worth a lot less in the Kovan Testnet, the difference took me by surprise, lemme not lie :sweat_smile:, but we move!

I essentially used Uniswap to swap ETH for DAI, which is similar to step 2, but with a cool interface. Just follow along the steps (May start with approving an asset then going into the actual swapping) and eventually you will have DAI! Be careful not to use all of your ETH for the swap cause you still need some for transaction fees when interacting with the DeFi Protocols.

  1. Oasis Savings

Once I reliably had DAI, I now went to the Oasis save app to deposit some DAI into the savings account.

I have already done this using my testnet Account, so I’ll be showing the steps which someone would take if doing this for the first time, using a fresh account.

  1. Select “Start saving”
    image

  2. Select the “DAI savings rate” product (The only available choice):
    image

  3. Select “Continue anyway” (remember, we are just testing the functionality of the protocol, so don’t expect to generate interest):
    image

  4. Create a Proxy and confirm:
    image
    image

Confirm the transaction through MetaMask:
image

  1. Once the proxy has been completed, set permissions:
    image

Confirm the Transaction:
image

  1. Deposit your DAI:
    image

Create DAI savings:
image

Confirm via MetaMask:
image

I am now saving X amount of DAI via Oasis!

(Do note that the final amount is different to the previous amount shown on the “Create DAI savings” step. This is the case because I had to get more testnet ETH by selling some DAI on Uniswap to cover fees xD! This is why its important to have enough ETH to cover Transactions!)
image

On this screen, you can now see my deposited DAI on the clean Oasis GUI, earning 0% interest :laughing:!
image

So now I know how to save, I will go into how I managed to put some collateral, in order to generate DAI, which can be used for more DeFi on Chai!

This comment is getting kinda long now so I will continue the second part of the guide as a reply later on!

If you made it this far, you’re a real one! Thanks for reading and stay tuned for part 2, dropping soon!

3 Likes

KOVAN Testnet: A DeFi deep dive
PART 2

Treat this as a guide only! This guide is my own personal experience of using the Kovan testnet and it may serve as a calm starting point for anyone who is trying to get involved with DeFi through the testnet.

Anything you decide to do beyond this walkthrough is entirely your responsibility and any losses or glitches you come across is not my fault! I am not a professional nor am I a financial advisor! It’s important that you know the risks of crypto and do your own research before diving into DeFi

In this guide, I will show the steps I took when using Kovan ETH to make a collateralised debt position (CDP) using the Oasis borrow app, and using the DAI generated to put into the chai.money savings app.

4). Oasis borrow app

  1. I am first welcomed with this prompt to verify my account by signing a message:
    image

Sign the message:
image

Accept the T&C’s:
image

Now you’re good to go!

  1. Now it’s time to open a vault so that we can create a CDP to generate DAI!

After clicking on “open new vault” on the top of the screen, you’ll be taken to this page:
image

During my tests, I opted to open a vault with Ether because it’s the only asset I had:
image

  1. Configuring the vault

This part was a bit tricky to get my head around because I had to deposit ETH and generate a minimum of 100 DAI (since that’s the required amount needed to open a vault). The catch was to deposit an acceptable amount of ETH, which enabled my collateralization ratio (CR) to be at a good level.

The CR on this amount is way too close to the minimum CR (150%). I am pretty sure that if I was to make this transaction on the mainnet, my position would be soon liquidated:
image

This CR on the deposit amount is ok, since it is green, however, on the next price update, if we were on mainnet, the updated CR would be close to 150%, which increases chances of liquidation:
image

I spent a while playing around with the numbers to see which deposit amount would make the warning disappear, and found the following to have worked:
image

So with that amount, with a decent CR, I now go to confirm the transaction, and then go on to create the vault:
image

Confirm the transaction on MetaMask:
image

Boom! I have now created my Vault on Oasis!
image

Now by clicking on “Go to Vault # 4209” it takes me to this screen, where I now have a balance of 100 DAI, which I can spend however I want:
image.

With this newly generated DAI, I’m now going to deposit in the chai.money app!

  1. Saving with Chai.money

By navigating onto the chai.money app, I can see my balance of 100 DAI, whoch I was able to generate through the CDP I made on Oasis:
image

I want to turn my DAI into CHAI, so that I can earn 0% APY, so I simply put in an amount of DAI I wish to convert:
image

Then, by clicking convert, I am asked to allow the chai.money app to spend my DAI:
image

After I confirm, I now need to confirm the actual transaction which will convert my DAI into CHAI:
image

Now, I have 83 CHAI and 17 DAI!
image

  1. Paying back my loan

After doing all of this, I decided that it’s finally time to pay back my loan and turn all my assets back to ETH.

  1. First, I want to turn my CHAI back into DAI. In order to do this I need to withdraw (or “Draw” my CHAI in order to convert it back into DAI.

So I look at my total balance (83 DAI) and click convert.

However, when I clicked convert, something mad happened:
image

This error comes up! Now ofc, I tried to click confirm, thinking that this was just a random glitch, but when I do, the transaction fails:
image

Yes I tried refreshing my browser, closing and reopening metamask, but this error still appears…

I was wondering for a while, how could this be? I have 83 DAI deposited in Chai.money and I want to withdraw 83 DAI… however, it dawned on me, I technically don’t own 83 DAI. It is my CHAI, that I now own, that is worth 83 DAI which is reflected in my balance. For some reason, the app doesn’t display my CHAI balance, but there is a way to see it and convert it back to DAI.

To find out the CHAI balance, I opted to interact with the smart contract on etherscan (there is a much simpler way, which I found out just now as I’m typing this, but since this is my journey, I will explain the long way xD

  1. At the bottom of the page, I saw the Kovan CHAI contract address and once clicking on it, I was taken to the address page on etherscan:

CHAI contract address:
image

CHAI token page on etherscan:
image

  1. Whilst still on the CHAI page on etherscan, I now need to go deeper into the contract and find out my balance. To do this, I clicked on:
    Contract --> Read Contract --> balanceOf then I pasted my address into the input field:
    image

As you can see, the amount of CHAI I have in my account looks huge! But to find the true amount, we have to multiply the balance by 10e-18, since most tokens use 18 decimals. So my balance in CHAI is 81.996…

A more efficient way to see your CHAI balance is to simply go onto your MetaMask and click on “Add token”:
image

Then paste the Kovan address for CHAI (found at the bottom of the website):
image

Once you click “Next”, you will now see your CHAI balance and will be able to add it to your MetaMask account!
image
image

Now I know the balance, I can now reliably withdraw the correct amount of assets from the Chai.money app:
image

I noticed I have 1 DAI worth of CHAI left in the app, so I am going to remove all of it:
image

I now noticed that I have 99.98 DAI, but I need 100 DAI in order to pay back my loan… The CHAI token is worth slightly more than DAI, and because the chai.money app won’t let me convert all of my CHAI to DAI (because it doesn’t convert small balances into DAI) I am left over with the balance which is slightly lower than what I originally deposited. (I hope this made sense xD)

Because of this, I am now compelled to go onto Uniswap and use the remaining ETH I have to purchase some DAI:

So I go onto Uniswap, and swap some ETH in order to get 0.1 DAI
image

I do all the confirmations and now have 100 DAI:
image

Now it’s time to pay back the loan!

In this image, I am back onto the Oasis borrow app and am now withdrawing my ETH collateral, plus paying back the DAI I borrowed in the same transaction (This apparently saves on gas fees)…
image

So I confirm the vault changes:
image

Do all the MetaMask confirmations:
image

And I have paid back my DAI debt!

However, I still have ETH which is still deposited for some reason idk about, so I’ll simply withdraw it:
image

Now that my vault is empty, my DeFi journey on the Kovan testnet has come to an end…
image

I think I have some DAI on the Oasis save app but I genuinely can’t be asked to show how to withdraw it, as it is pretty straightforward. Refer to the first part of the guide and go back onto the save app in order to follow along the withdraw process.

Once again, thanks so much for reading and I hope that this guide can make someone’s experience a little bit smoother when it comes to interacting with DeFi using the Kovan testnet!

4 Likes

I will try to do this now, I will do it on the testnet, still new to everything, but excited to be learning about it!!!

1 Like

Whilst watching this I’ve had a number of ideas which could utilise Maker DAO CDP. I seriously can’t wait to firm up my ability to write smart contracts.

Utilising the time value of money up front in protocols such as Flashstake could provide a nice spin on recurring no-loss lottery types.
These brand new emergent properties from the decentralised lending protocols is astounding.

Thanks for the course Amadeo! :heart:

P.S. I love the visitor you had in the final Maker Dao Video when you were explaining where the word ‘Dai’ came from.
The comment she made was an absolute treat and gave me a good laugh.

1 Like

I’ve been putting these to practice on simulation mode on DeFi Savers platform. Very fun!

1 Like

I am still learning and not comfortable locking my ETH in a smart contract. It is in my hard wallet at the moment and it will stay there for now. However, I am extremely interested in exploring different opportunities in DeFi space, getting a loan on your crypto as collateral. I am not planning to sell my BTC or ETH for years and getting a loan with a small interest rate without selling your crypto and triggering a taxable event seems like a no-brainer.

2 Likes

I am using different app to make some interest just to understand the whole universe. But my problem is to understand where the value is coming from. I mean the system should generate the productive value not just put some money from one to another pocket and call it differently.

Hello, I couldn’t find this question asked anywhere else. But what is the difference between the following on Oasis please? :

ETH-A 3.5% stability fee
ETH-B 9% stability fee
ETH-C 1% stability fee

Maybe I am a tad bit slow, but what is the point of borrowing and lending with defi. Is it just the interest rates? If I need a loan i need to over collateralize it meaning I need money to borrow money. Other than way of getting insane yield are the other use cases I am missing?

1 Like

Thank you for documenting and sharing your journey into the DeFi process. I’m in the middle of the DeFi 101 course myself and find it daunting - there’s a steep learning curve for me as I am very new to this crypto/blockchain technology and does not know much about the finance world either. This walkthrough of yours will come in handy in the future once I’ve understood the basics of DeFi and am ready to go thru this process myself.

@CryptoLilies, there’s a new version of this course? Can you respond with the course title? I would love to take that course - I need to take the new version as this current one has been a toughie for me. Thanks!

@MattPerry FYI I was told by my adviser that this course is being updated to reflect the latest developments in blockchain.

Thanks for the info! Ill redo the class when they update it for sure.

1 Like

Holy… This is an insane answer. Thanks for the elaborate contribution :slightly_smiling_face: