Publisher avatar
LearnCrypto
11 min read

Getting started with DEFI

Getting started with DEFI

What you'll learn

  • What DEFI is
  • What you can do with DEFI
  • The practical steps involved for the main DEFI functions
  • The risks & drawbacks

In its basic form, Decentralised Finance (Defi), gives you access to a range of financial services, from the simple kind that would normally be provided by your high street bank, to the complex instruments used by Hedge Funds and Investment Bankers; all you need is a browser wallet and vigilance.

By locking your cryptocurrency into Smart Contracts, in a process known as staking, you can earn interest, denoted as an Annual Percentage Yield (APY) - a term familiar to traditional finance (tradfi). 

As a reward you for staking funds - providing liquidity - you also get rewarded in a token specific to each Defi project. That token gives you voting rights in any discussion of changes to the way its system works, and has speculative value.

DEFI tokens have shown remarkable increases in value since 2020.

How DEFI uses Smart Contracts

A Smart Contract is essentially an agreement to fulfil certain terms expressed in computer code. Right now your bank account might give you the right to a certain amount of monthly interest, cashback on direct debits at the cost of a monthly fee. 

That agreement is reached through a formal application process - which may take several days - is managed through a mixture of people and software and recognised in writing.

By contrast, a Smart Contract uses programming language (Solidity on Ethereum) to express the mathematical parts of an agreement - how much interest, when it should be paid - and the underlying Ethereum blockchain executes the agreement so it is transparent and cannot be amended, at the cost of a fee, paid in Gas (denominated in ETH).

In this basic respect, Defi recreates the sort of saving and investment opportunities that were once the preserve of traditional finance (tradfi) with the crucial difference that it entirely cuts out the middleman. 

You interact with code, not people, and there is no formal process - no forms or KYC. This new permissionless model democratises wealth generation and is an antidote to the closed network way that financial networks currently operate. 

It does mean, however, that there is no guard rail, so you’ll need to be comfortable with the level of autonomy in order to enjoy the potential rewards which don’t stop at earning interest and tokens.

Advanced users can stake cryptocurrency A and mint (generate) a new synthetic currency B, which they can then use elsewhere in the Defi ecosystem, wherever it can generate the best yield in a process known as Yield Farming. 

If this seems daunting, you can always earn passive interest on your crypto but with the comfort of working with people (CEFI), not Smart Contracts. We explain the difference between CEFI and Defi in a separate article.

The Risk/Reward Trade-Off of DEFI

While tradfi APYs have trended towards zero (some banks even now provide negative interest on savings), Defi offers double or even triple-digit percentage returns. 

The attraction is obvious: who wouldn’t want to double their money in a year simply through locking it into a decentralised finance protocol and letting time take care of the rest?

Not only that, the huge interest in Defi has seen the value of the underlying tokens users earn for staking increase massively in value, with new protocols launching all the time adding extra dimensions to the Farming landscape.

There is of course a trade-off. Due to their novelty and highly experimental nature, Defi protocols come with a number of unique risks that you need to be aware of.

Smart Contract Vulnerability

Smart Contracts are coded instructions. Incorrectly coded instructions, with weak logic can enable hackers to exploit the contract and steal the funds. Do a quick Google and you’ll see how prevalent the issue is.

Smart Contract Costs

Defi needs to interact with a blockchain to execute Smart Contracts which incurs a fee. Those Ethereum based Defi projects have seen Gas fees reach extraordinary levels. Not all projects rely on Ethereum, so shop around. There are an increasing number of cheaper Smart Chain alternatives, listed below.

You Are Fully Responsible

Defi is a double-edged sword. You can be staking and farming in no time, but you are fully responsible. There is no recourse should you lose the private key controlling access to your Defi wallet or incorrectly allocate funds.

Broadly speaking, the more established Defi protocols, with a higher total value of assets locked into them (also known as TVL), are safer. This is because their code has been extensively audited and “battle-tested” in a live environment. 

They’re also maintained by teams of highly accomplished developers. That doesn’t make them entirely safe, however: hacks and exploits still occasionally occur.

Newer protocols will offer higher APY in order to build up liquidity, and their tokens will start from a lower base value, but their reputation hasn’t been established.

While the temptation is to lock your assets into the protocol that promises the highest APY, it’s prudent to perform due diligence into the project before you start staking your precious crypto.

  • Has the code been professionally audited? 
  • How long has the project been operational? 
  • What is the total value locked into the protocol? (A higher number generally implies greater legitimacy.)

The risks of yield-bearing crypto projects were illustrated in March 2020, when a cascade of forced liquidations led to huge losses on the decentralized finance (Defi) lending platform Maker. 

The plummeting value of Ether (ETH), which acts as the platform’s base collateral, caused Collateralized Debt Positions (CDPs) to fall below the ETH:DAO collateralization ratio and trigger losses of $6.65 million.

Another platform, Cred, was forced to suspend inflows and outflows of funds relating to its Earn program after filing for bankruptcy. It is worth remembering that there’s no Lender of Last Resort in the crypto industry.

Popular Defi protocols

Decentralised finance has around a dozen well established protocols that can be regarded as the “big banks” of Defi. The difference, of course, is that you don’t have to custody your funds with these projects, as you would when depositing assets into a bank account: rather, a Smart Contract controls the whole process. Provided the code is bug-free, your funds should be safe, with employees incapable of making off with your money.

Popular defi protocols include:

Maker: A stablecoin issuance and lending protocol. By staking assets such as ETH and WBTC as collateral, you can mint stablecoins known as DAI, which are collateralised against the locked crypto. 

This provides a form of decentralised lending, and allows you to use DAI within defi for other purposes. Upon repaying the borrowed amount, you can claim back your staked cryptocurrency.

Aave: A decentralised protocol for lending and borrowing. Stake your assets and earn interest on your deposits. Aave also offers uncollateralised loans.

Compound: An algorithmically controlled protocol for earning interest on staked assets.

Yearn Finance: A decentralised hedge fund that invests staked assets into various defi protocols, and pursues yield-generating strategies to increase the wealth of its users.

How to interact with defi protocols

Interacting with defi protocols requires a compatible web wallet such as MetaMask. After visiting the web app of the protocol in question, such as Yearn Finance, you will be prompted to connect your MetaMask wallet to the site by clicking the verification message that pops up.

Thereafter, any time you wish to interact with the Defi protocol, such as to deposit ETH into one of its Smart Contracts, a similar pop-up will appear. This time, your transaction will be broadcast to the Ethereum network and you’ll be charged a fee.

Any subsequent transactions will follow the same process, including staking assets, unstaking, and collecting any tokens that have been earned as yield. In each case, you’ll be required to wait anywhere from a few seconds to a few minutes for the transaction to confirm on the Ethereum network.

Deposit WBTC on Yearn Finance

Here’s an example of the steps you would take to initialise a yield farming strategy. In this case, we’re going to deposit WBTC (Wrapped Bitcoin) into a vault on Yearn Finance:

  1. Make sure you have WBTC stored in your Ethereum MetaMask wallet. (If you don’t, you can buy it on SushiSwap in exchange for ETH.)
  2. Visit Yearn Finance and connect your MetaMask wallet when prompted.
  3. Select WBTC from the available vaults and click the dropdown arrow to the right of the WBTC row.
  4. Enter the amount of WBTC you wish to deposit or just click ‘Max’ and then ‘Approve.’
  5. Approve the two transactions that will pop-up in MetaMask. The first will authorise Yearn Finance to store your WBTC in its smart contract and the second will transfer the WBTC.

And that’s it. You now have WBTC stored in a Yearn vault and will earn the displayed APY for as long as your assets remain in the vault. When you wish to withdraw, simply reverse the process described above.

Smart Chain DEFI alterntives to Ethereum

While the majority of Defi activity revolves around Ethereum, there are similar protocols and products available on smart contract networks such as TomoChain, TRON, Binance Smart Chain, Avalanche, and Matic.

Interacting with their respective protocols entails the same process – you can even configure MetaMask wallet to connect to these networks – but with the bonus that transactions are much faster and cheaper than on Ethereum.

Despite the advantage these newer blockchain networks have in terms of speed and fees, they are less popular than Ethereum. This is because of the deeply entrenched Defi ecosystem that has formed around Ethereum. Thus, Defi users tend to tolerate Ethereum’s shortcomings on account of the many opportunities it provides for investing and growing your crypto assets

Understanding the risks of Defi

We’ve already touched upon the importance of using tried and tested Defi protocols, whose code is less susceptible to vulnerabilities. Here are additional steps you can take to reduce the risk of suffering loss of funds, and to protect your crypto assets.

Consider Insurance

Just as you can take out travel insurance before going on holiday, you can take out Defi insurance against loss of funds through hacks and exploits. Projects such as Cover and Nexus offer this service.

Research the team behind the project

Many Defi projects are operated by pseudonymous teams who wish to keep their identity private. This is perfectly normal, and there are ways for such projects to gain community trust by taking measures to prove that they cannot steal user funds even if they wanted to. 

However, as an additional safety measure, you may wish to use Defi protocols backed by known teams, whose public reputations would be harmed if they were to act immorally.

Choose simple yield generation strategies

Simple Defi earning strategies (e.g. “stake token A to earn token B”) are far less susceptible to vulnerabilities than more complex ones. The more moving parts a smart contract has, the likelier the chance of a vulnerability creeping in that can be exploited.

Don’t invest more than you can afford to lose

This should apply to everything you do, in crypto and in life. It’s particularly true of Defi, though, since there’s no recourse should you lose your funds.

As a general rule, it is prudent to place no more than 5% of your assets into any one protocol. That way, should the worst happen, your portfolio won’t be wiped out.

Decentralised finance is one of the most exciting sectors in crypto and a hub of innovation and opportunity. It’s an unforgiving environment, however, that calls for a moderate degree of knowledge before entering. 

Only place your assets into Defi protocols once you’ve taken the time to understand how they work and considered the upside and downside of doing so.

Once you understand how it all fits together, Defi can be extremely effective way to earn cryptocurrency..