Categories
Blockchain DeFi

How to get started with DeFi.

A beginners guide, part 2 in a 2 part series.

For part 1 click here.

Chapter 4.

Networks

Ethereum mainnet, what does this mean? The Ethereum blockchain is a smart contract blockchain, what that basically means is that apps can be built on it by writing code in smart contracts. The mainnet, short for main network is the where all the applications are deployed to, this in contrast to other Ethereum networks (Ropsten, Kovan, Rinkeby, Goerli) which are test networks that are used by developers during the development of apps to test the functionality of the smart contracts.

Another type of network is Layer 2 networks, just called L2’s for short in blockchain speak. These L2’s are currently on the leading of Computer science research into distributed computing and cryptography, the main goal of these L2’s are to help relieve the network congestion caused by the amount of people transacting on the Ethereum mainnet aka Layer 1(L1).

Because of the high usage and the fee module used to calculate how much a transaction costs (gas) the Ethereum mainnet has become incredibly expensive to use, for example;

  • To send some ETH to another account it would cost $15 in ETH.
  • To do a swap from one coin to another on Uniswap, it could even cost $50.

These amounts are currently limiting usage to only those people who have large amounts of crypto, effectively limiting access to those of us who aren’t millionaires.

Current Ethereum Layer 2’s to name a few are (in order of my preference);

  • Polygon (Technically a side-chain)
  • Optimism
  • Harmony
  • ZkSync
  • Arbitrum

The cool thing about these Layer 2’s is that existing apps on Ethereum mainnet can be ported over with not much change. Which is helping to drive user adoption of these networks, we can see this from the TVL (Total Value Locked, amount of money deposited on the network).

TVL on Polygon, source https://defillama.com/chain/Polygon

Basically from zero to over $5 billion in less than 1 year 🤯, this is just 1 Layer 2.

The transaction fees we can expect to pay on these Layer 2’s are usually just fractions of what is on Ethereum mainnet. Here are some rough numbers;

  • Polygon
    • Less than $0.01 per transaction
  • Optimism
    • Less than $1 per swap on Uniswap

Chapter 5.

How to actually use DeFi

Now that we’ve learnt about DeFi, how does one make bank? It’s kinda easy, there are three categories;

  • Earning interest on deposits.
  • Providing Liquidity in a Decentralised exchange.
  • Staking (not strictly DeFi)

The following information relates to apps on Polygon.

DeFi savings account

Just like your bank account where you are earning interest on your savings, there are DeFi apps that have similar functionality.

Here we can see the % interest (APR) on Balancer

These apps work by lending out your deposits to others that then borrow and pay a % interest. The rate is determined by the smart contracts of the respective app. In times where there is high demand for a certain coin, borrow interest rates can be extremely high (50%) but this is usually short lived.

And the opposite applies when demand for a coin is low, we see this quite often for Bitcoin (WBTC) on aave.

The % interest paid out can be paid in any type of coin, so pay close attention to that. Usually on the apps if you hover your mouse over the percentage that is shown, a little window will show the break down of what coin/s the interest is paid out in.

Providing Liquidity in a Decentralised exchange

Probably the most lucrative way to earn some passive income in the DeFi space, also riskier and more complex. There are many risks when providing liquidity;

  • Smart contract exploit (not an exclusive risk to providing liquidity)
    • This is when a hacker finds a vulnerability in one of the smart contracts that make up these apps and exploits it by withdrawing all the tokens to their own wallets.
  • Rug pull
    • The team who developed the app accesses some locked functionality in the smart contract enabling them to withdraw all the tokens to their own wallets.
  • Impermanent loss
    • This one is a bit complicated to explain, to not bore you. You can read up about it over on Binance here.

Take a look at this screen shot from uniswap see how people providing liquidity for the ETH token earned $713k in fees in 24 hours, that is paid directly to you. And that is just for 1 token, you can be a liquidity provider for any token you want.

The app paid out $713k in fees in 24 hours. Incredible!

The total amount that the uniswap app is making for users is well into the millions of dollars, some nice passive income.

Here’s a great introductory video from bfresh.

Staking

Staking is a really cool way of earning some coins and at the same time supporting the security of Proof of stake(PoS) blockchains.

Nowadays it’s even possible to do it directly through some wallets in;

  • Polkadot (Ledger live)
  • Cosmos (Kepler wallet)
  • Near (Near wallet)

Ethereum solo-staking is an incredibly complex task and not recommend for your average crypto investor/enthusiast. You also need a minimum of 32 ETH to do this.

All the above wallet examples integrate nicely with hardware wallets like Ledger and Trezor.

https://www.stakingrewards.com/ is a great resource where you can see the current % in staking rewards that you could possibly earn.

Categories
Blockchain DeFi

How to get started with DeFi.

A beginners guide, part 1 in a 2 part series.

Chapter 1.

What does decentralised finance (DeFi) even mean?
Good question, It’s the idea that anyone can access financial services be it earning interest on deposits, investing in markets or even borrowing money. So even if you don’t have a bank account you can still have access to all of these services and have the opportunity to take part in financial markets.

Categories
Blockchain NFT

Deploying my first Ethereum smart contract

So I finally got into the whole NFT hype going on at the moment, I wanted to try out writing some Solidity code and doing the whole development process of creating something that lives on the blockchain.

I partnered with a visual designer friend of mine, she is a talented artist and I really liked the style of her work. So we decided to create an NFT collection of her Pigs and Pencils art work, the collection would consist of only 32 unique pieces that would be dropped through out the end of 2021 and 2022.