Decentralized Finance for Coders [Free Video Course]

5/5 - (5 votes)

This course will show you the ins and outs of decentralized finance (DeFi). Each step links to a more detailed article/tutorial, so you can dive deeper into the rabbit hole.

Let’s get started!

Step 1: Getting Started with DeFi

What is DeFi?

Decentralized Finance, also referred to as β€œDeFi,” enables customers to access financial services that include lending, borrowing, and trading.

These financial services use Decentralized applications (Dapps) in implementing their functionality and they do not rely on centralized finances to execute their operations. The vast majority of these services are being created on the Ethereum blockchain.

To use the DeFi tools, you don’t need to be an Ethereum expert, although it helps to be familiar with how Ethereum or layer-2 blockchains like Polygon operate.

Defi is not a single service or a product, but an assortment of several goods and services that can replace traditional institutions like banking, bonds, insurance, and trading.

It is possible to integrate these services, each having its own functionality, to build one protocol with multiple functions. Thus grouping services like borrowing, lending, staking and many others together to create one multi-functional financial application. As it is workable to assemble these services, DeFi apps are also called β€œmoney LEGOS”.

πŸͺ™ Learn More: You can read the full tutorial on the Finxter blog.

Step 2: MakerDAO 101 for Coders – How DeFi Lending and Borrowing Works

DeFi breakthroughs have been happening on Ethereum because of its prominence, but it is also emerging on other blockchains like Solana, Polkadot, Algorand, and many more.

We will look at three popular DeFi dApps: MakerDAO, Compound, and Aave. I will explain MakerDAO in this article and the other two – Compound and Aave in the next.

MakerDAO is a good example of understanding the DeFi ecosystem, where DAO stands for decentralized autonomous organization. It employs two tokens. A stablecoin called DAI and a governance token called MKR. We will discuss each of them β€Œand their use cases.

Fig: MakerDAO (pic credit)


πŸͺ™ DAI is a crypto-collateralized stable coin with a 1:1 parity with US dollar ($), and value backed by ETH (Ether) as collateral in the smart contract called the Maker collateral vault. DAI token has the money function and acts as currency.

πŸͺ™ MKR token is the governance token issued by the Maker protocol to the lenders or stakeholders that grants voting rights and decision-making in the improvements of the Maker protocol. The MKR token holders also govern the stability of DAI. Thus MKR token has a utility function.

Users can mint new $DAI tokens when they take their digital assets ($ETH, $BAT, $USDC, $YFI, $LINK) with MakerDAO’s smart contract. Thus, by staking digital assets, you can create $DAI.

MakerDAO 101 for Coders - How DeFi Lending and Borrowing Works

πŸͺ™ Learn More: You can read the full tutorial on the Finxter blog.

Step 3: Compound for Developers: Yield Farming, Borrowing, Lending

Compound is a popular lending and borrowing platform for various ERC-20 tokens.

As per DeFi pulse, Compound has a Total Value Locked (TVL) of $2.56 billion USD.

Figure 1: Defi Pulse for Compound

You can deposit items that can be pledged as collateral for loans through Compound.

Based on your collateral, you are only permitted to borrow up to a particular percentage (about 60–70%). Credit ratings are meaningless, and since Ethereum accounts are anonymous, it is nearly impossible to get payment in the event of a loan default.

Compound for Developers: Yield Farming, Borrowing, Lending

πŸͺ™ Learn More: You can read the full tutorial on the Finxter blog.

Step 4: Aave for Defi Developers

Aave launched in 2017 is a DeFi protocol similar to Compound with a lot of upgrades.

Beyond what Compound provides, Aave gives several extra tokens for supply and borrowing. As of now, Compound offered nine different tokens (various ERC- 20 Ethereum- based assets).

Aave provides these nine besides an additional 13 that Compound does not.

Depositors give the market liquidity to generate a passive income, while borrowers can borrow if they have an over-collateralized token or can avail flash loans for under-collateralized (one-block liquidity).

Aave for DeFi Developers - A Simple Guide

πŸͺ™ Learn More: You can read the full tutorial on the Finxter blog.