Resources/DeFi

From Polytech Center Barcelona
Revision as of 18:24, 20 August 2020 by Rose (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Intros

Flash loans

Derivatives

Trading cheat sheets

Known vulnerabilities

Risk calculation

Interest rate arbitrage

MKR (simplified) does the following:

Allows users to deposit ETH as collateral and then take out loans relative to that collateral (max loan = collateral/ 1.5). The collateral is released when the loan is repaid.

This is called a CDP (collateralized debt position) and is equivalent to opening a bank account with MKR. Users deposit ETH in exchange for the ability to print DAI with interest (loans) and earn interest on savings.

The MKR interest rate is called the "Stability fee" and it is currently 0, i.e. I can borrow money without incuring cost, and can't make any money on saving.

However, interest rates differ across different DEFI platforms which gives the potential for arbitrage (see: https://loanscan.io/).

For example you can use borrowed DAI to give loans on other platforms for interest (e.g. interest rate is 0.00% on MKR but 4.42% on Compound).

You can also:

  • Lend DAI and borrow ETH
  • Use the borrowed ETH to open a new CDP with MKR
  • Lend the new DAI and borrow more ETH
  • Repeat and earn interest rate spread when (DAI lending rate > ETH funding rate + MKR CDP stability rate)

There are some existing bots that do this, see: https://github.com/makerdao/simple-arbitrage-keeper and https://developer.makerdao.com/keepers/ (I'm sure there are many more). There are also very low tech ways to use this to make small money:

  • Take out loans when ETH/USD price is low, pay back when ETH/USD is high (e.g. deposit 1 ETH collateral, take out 500 DAI, trade for 0.5 ETH. Market moons, repay 500 DAI for 0.25 ETH, get collaterol back and earn 0.25 overall). This could probably be automated on smaller price movements as well.

Another thing this is good for is getting through bear market crashes without cashing out crypto, because you can use your existing crypto to generate DAI and pay it back when the market recovers.

DeFi Analytics