all articles

How to Invest in DeFi? What Is Smart Contract?

January 10, 2024
15
min. read
Contracts Embedded in the World

“...A canonical real-life example, which we might consider to be the primitive ancestor of smart contracts, is the humble vending machine. Within a limited amount of potential loss (the amount in the till should be less than the cost of breaching the mechanism), the machine takes in coins, and via a simple mechanism, which makes a beginner's level problem in design with finite automata, dispense change and product fairly. Smart contracts go beyond the vending machine in proposing to embed contracts in all sorts of property that is valuable and controlled by digital means…”

Copyright (c) 1995 by Nick Szabo

What is DeFi?

Imagine yourself walking through a huge field with many vending machines. They are all different, some are similar. Not a soul around, no one is bothering you with tempting offers. You approach the soda machine and shove a bill into it. Your change happily jingles, you open the can and take the first sip.

In 1994, Nick Szabo, a computer scientist and cryptographer, published the smart contract concept, citing a conventional vending machine as an example. The parties conclude deals without intermediaries, contract terms are fulfilled automatically under specific conditions. You put money in, and the machine produces a can of Cola and change, if necessary.

NFT Bored Ape Yacht Club #8817

Let's say that you can exchange a can of cola for chips in a nearby vending machine, pawn the chips for a notebook and a pen in the third one, draw a monkey in a cap and give this piece of paper to the fourth, who’ll give you a loan for it, which you can use to buy a whole grilled chicken, and you will still have the money to get your chips back, buy life insurance and register your copyright for an entire folder of the same drawings.

In the DeFi world (decentralized finance), the role of vending machines is played by decentralized services based on smart contracts; the roles of money, cola, chips and other assets - by DeFi tokens (digital assets that are also smart contracts), and the field with the vending machines is a blockchain (accounting book), which documents all smart contracts and transactions. There are no intermediaries here, and security is provided by cryptographic methods. The blockchain does not have a central authority and all its information is accessible from any computer. 

The vending machine and smart contract analogy

It is important that a smart contract cannot be altered, just as the records in the corresponding blockchain. This allows developers to build ecosystems with the highest level of trust, where digital assets can be transferred from one owner to another only under certain conditions described by smart contracts.

Since its inception, Ethereum remains the most popular blockchain for creating smart contracts. This is its main difference from the Bitcoin blockchain, which has very limited options for creating smart contracts simply because Bitcoin was invented for a different purpose - as a payment system. 

The emergence of Ethereum has opened up wide opportunities for users to create smart contracts, which means new tokens (DeFi tokens), new services, applications, projects, etc. The DeFi world has turned into a whole universe of trading, gaming, credit, insurance and other machines of various financial services, where you can exchange anything for anything, remaining nobody and nowhere, so today many people are wondering How to invest in DeFi? or How to buy DeFi tokens?

How does DeFi work?

DeFi includes digital financial services or applications created in the form of automatically executed smart contracts in a blockchain, (for example, in Ethereum or in Binance Smart Chain - BSC). DeFi as an industry comprises the blockchains themselves, the so-called bridges for transferring digital assets from one blockchain to another, smart contracts, countless tokens, and applications for their convenient use (exchanges, wallets), in short, everything that is somehow connected with digital assets and services for their purchase, sale, storage, collateral, lending, etc. 

“Ecosystem” is a very trendy word today. DeFi can be described as a set of decentralized ecosystems, each of which is home to its own life forms. It resembles a universe with many galaxies, stars and starlets, comets, asteroids and just space debris.

In DeFi, you can buy and sell DeFi tokens, earning on the rate difference, as well as stake DeFi tokens. Essentially, staking is similar to cryptocurrency mining, whose blockchains are structured differently from the Bitcoin blockchain (among others), and do not require physical mining hardware. A mining reward in Bitcoins is most likely to be received by whoever has more mining power (mining pools), and in case of staking - whoever holds more of the corresponding cryptocurrency (staking pools). 

However,  staking is not used for DeFi token issuance, rather, for the opportunity to invest in these DeFi projects. The staking pool in this case is actually a liquidity pool of a specific DeFi project, whose funds are usually utilized for its development, and the staking itself is the attraction and blocking of user funds within the DeFi project in exchange for certain benefits, for example, the voting rights in project development matters or/and receiving passive income for staking through periodic payments. 

In addition to staking in DeFi, you can borrow or lend your funds with interest, just as banks do in everyday life. On the one hand, banks attract money for deposits, on the other hand, they issue loans. In DeFi, funds are funneled to the so-called liquidity pools, from which they are used, i.e., to support market trading (liquid trading occurs when assets are available at market prices in large quantities) or to issue cryptocurrency loans (lending protocols).

The funds in the DeFi protocols can be provided by the users themselves, since attractive conditions are specially created for this purpose, making it profitable. This is usually done by trading pairs, for example ETH-USDT in a ratio of 1:1 at face value, i.e., 1 ETH and 1500 USDT (provided that 1 ETH = 1500 USDT). The platform pays a certain percentage for the provided liquidity, and it can reach impressive values, since projects compete fiercely with each other for the funds raised. On any site that depends on the funds raised in any way, you will easily find the “Add liquidity” button and a description of how and what to do to start receiving investment income.

Knowledge of various DeFi protocols is very important for correctly answering the question of How to invest in DeFi technologies?

What are leading DeFi Protocols?

The more funds a DeFi project attracts, the more popular and successful it is. Therefore, DeFi projects are ranked not using the classical Market Cap, but by the volume of blocked funds - TVL (Total Value Locked).

Total Value Locked All Chains according to DeFiLlama

As of the beginning of 2023, Ethereum is the absolute champion, BSC and Tron follow at a considerable distance, then come Avalanche, Polygon, Arbitrum, Optimism and then - everything else. BSC, Tron and Avalanche are different blockchains, while Polygon, Arbitrium and Optimism are second-level protocols implemented on the Ethereum blockchain. Their purpose is to increase user convenience by reducing network fees and increasing transaction speed (bandwidth). In a more general sense, this increases network scalability and stems from the fact that when Bitcoin or Ethereum were created, they were not designed for such a large number of users and operations per unit of time. Each protocol utilizes its own approach to solving the so-called “scalability trilemma”, that is, to creating an equally fast, secure and decentralized network.

The DeFi segment as a whole contains several categories where liquidity is distributed:

Protocol Categories according to DeFiLlama
According to DeFiLlama

Here, billion-dollar positions are held by decentralized exchanges, lending protocols, collateral (CDP), bridges and derivatives. Decentralized exchanges (DEX) are the most popular DeFi user services, which can also be used to compile various ratings:

DEXes TVL Rankings

Decentralized exchanges Uniswap, Curve, PancakeSwap, Balancer have billions of TVL and occupy the top positions in the DEX rating.

The leading lending protocols, where you can either take out a loan secured by cryptocurrencies, or, as with exchanges, share liquidity for a percentage, also have billions of TVL. For instance, AAVE is implemented in Ethereum, Polygon and other networks, Compound - in Ethereum, JustLend - in Tron, Venus - in BSC:

Lending TVL Rankings

If there is a question of How to invest in DeFi crypto projects, first of all, you need to decide which DeFi protocol to work with, which platforms to use and which DeFi tokens to deal with.

How to get started with DeFi

So, let's imagine that you have decided to start working in DeFi and are ready to take the first step. We will assume that you already have experience in working on a centralized exchange (CEX), because otherwise it would be much more difficult to realize the answer to the question How to invest in DeFi in practice.

Let's say that up until now you’ve only dealt with a large cryptocurrency exchange like Binance, and you know how to exchange ordinary (i.e. fiat) money for cryptocurrency. Exchanges like Binance (Coinbase, Huobi, KuCoin, etc.) are centralized services, because they are managed by executives and work like regular commercial companies. To register there, you need to pass the KYC (Know Your Customer) procedure, send in your passport scan and other personal data, in a word, it’s almost like in a bank. 

The opposite is true in DeFi. Instead of CEX (centralized exchanges), DEX (decentralized exchanges) operate here, and they don’t care who you are and where you come from, they perceive you as an anonymized wallet where you can exchange one DeFi token for another. DEX also comprises smart contracts in one or more blockchains. It's just a vending machine where you can exchange digital chips from your wallet for a digital coke. When you work on a centralized exchange, you store your funds there and are not insured against losing access to them. On decentralized exchanges, your assets remain in your crypto wallet, the exchange only helps to swap some assets for others.

To do this, you will need a cryptocurrency wallet that can be connected to an exchange. On any DEX you will find the cherished “Connect wallet” button. There are lots of such wallets, i.e., MetaMask, Trust Wallet, Token Pocket, or BitKeep (Bitget Wallet); they are installed as a browser extension or a mobile application (dApp). All the operations performed in the DeFi wallet are inexpensive, but not free; they require a cryptocurrency (or a token in the case of second-level blockchains) that corresponds to this blockchain, i.e., Ether in Ethereum, BNB in BSC, TRX in Tron, etc. These are cryptocurrencies, since each has its own blockchain. Matic in Polygon, OP in Optimism are so-called native management tokens, since they are implemented on a second-level protocol created in the Ethereum blockchain using the Ether cryptocurrency. All of them can be bought on CEX and transferred from there to your DeFi wallet. 

The next step entails sending the actual money with which you plan to buy something and place it in the wallet. Tokenized dollars, or USDT issued in almost all popular blockchains, or the Binance exchange dollar (BUSD) for the BSC network, or any other stablecoin (a token pegged to the dollar or another real-world asset) that you like. Then you are fully ready to work in DeFi, finally breaking away from the umbilical cord of centralization.

What to do after I buy DeFi tokens

The most popular cryptocurrency wallet for working in DeFi is MetaMask. Its key feature is that it offers both a phone app and a browser extension that allow you to connect to any desired site on your computer by clicking the “Connect wallet” button on that site, i.e., a decentralized exchange. Once the wallet is connected, you can swap any available tokens for each other or send them to the exchange's liquidity pool. 

If you are connected to the DeFi project website, rather than the exchange, you can stake DeFi tokens, and in case of the lending protocol - to loan or borrow them. There are aggregator sites that list all kinds of DeFi services, and you can choose the most attractive interest rate for the provided liquidity there, without going into much detail about the future use of your funds.

How to buy DeFi tokens? DeFi means convenience, speed and security of working with digital assets, so it is not surprising that most operations in DeFi are performed using smartphones. Let's say you already downloaded MetaMask and are ready to buy the desired tokens on a decentralized exchange. Suppose you work in the Binance Smart Chain. Then you will need the BNB cryptocurrency to pay commissions and, for example, the PancakeSwap exchange to carry out transactions.

You have already created your MetaMask account, recorded and hidden a secret 12-word seed phrase for data recovery and transferred BNB and USDT to your wallet from a centralized exchange. It's time to connect to a decentralized exchange to make your first transaction. To do this, click the “hamburger” in the upper-left screen corner (Fig.1.1), select “Browser” in the list that opens up (Fig. 1.2), and start typing “pancakeswap.finance” in the search bar. The wallet will most likely suggest the site you are looking for, which you can choose without any more typing (Fig. 1.3).

Invest in DeFi using the Metamask wallet
Fig. 1

Now that you are on the DEX website, select the “Trade” tab in the lower left corner (Fig. 2.1), after which you will immediately be taken to “Swap” (Fig. 2.2), which you need, because a swap is a transaction of exchanging tokens for other tokens. Now you need to click on each token to select the ones you want (Fig. 2.3). Type the name of the token in the “Select token” tab that opens up. 

The exchange will offer several similar tokens, and you will need to choose the one you need. Be careful when choosing, because fraud with clone tokens is not uncommon on decentralized exchanges. Ideally, you need to verify the token’s smart contract address in the “Token details” tab in the wallet against the address from the specific DeFi project website.

Invest in DeFi on Binance Smart Chain
Fig. 2

Let's say you want to exchange USDT tokens for Cake tokens of the PancakeSwap exchange. In that case, Figure 2.2 should fully meet your expectations. Just enter the desired amount of tokens and click the "Swap" button at the bottom of the page. 

Looks like you just made your first transaction on a decentralized exchange and became the owner of new DeFi tokens. Now it all depends on your goals. You probably bought tokens for a reason and already know that you will stake them or send them to some liquidity pool, or just wait for the token to rise in price enough to exchange it for something else. The DeFi world is so diverse that as you gain experience, you’ll be overwhelmed with ideas about which tokens and why to buy.

The future of DeFi

The development of DeFi is closely connected with the attention of regulators, most importantly, the SEC in the USA. Right now DeFi is like the Wild West, with no rules or guarantees. Everyone acts at their own risk. High-quality DeFi projects stand side by side with outright fraud, and no one is immune from hacking, theft, misleading and any other actions aimed at seizing your funds dishonestly. 

In addition, many promising projects start out with a bang and end with a fizzle, like the UST algorithmic stablecoin of the LUNA project. However, failures and bankruptcies are not unique to DeFi and the entire crypto industry, so, when asking How to invest in DeFi crypto industry, be prepared: the risks of investing in DeFi are absolutely routine, and the only way to successfully combat them is to limit them. Think of banal and efficient advice like “don't put all eggs in one basket”, “don't put everything on red", “invest in risky projects only what you can afford to lose”, etc.

If you are wondering How to invest in DeFi technologies, that is, to view the industry more as a technological breakthrough related to blockchain, decentralization, anonymity, and other similar phenomena, then, of course, the more high-quality projects there are in DeFi, the better for everyone. Also, the initial technological explosion is always followed by a rollback, as it happened with the so-called dotcom bubble, when everything related to the Internet grew at a furious pace, and then in the early 2000s collapsed in such a way that people still remember it, and as a result, very few projects have survived to this day (Amazon is one).

Nevertheless, new Amazons have definitely already appeared in DeFi, it’s just that we don’t yet know their future. However, as the DeFi industry develops, expands and changes in the process of incessant attempts to regulate it, we will see which projects can withstand changes, and which will die out like dinosaurs. The main thing is that DeFi history is being written right before our eyes, and we are all direct witnesses and even participants in this process.

How to Invest in DeFi: FAQ

Do you need a wallet for DeFi?

Yes, of course. A wallet is indispensable when you invest in DeFi, you need it to store DeFi tokens and connect to various DeFi services. Today, users have a choice of a huge number of wallets for working in DeFi, the most popular of which are MetaMask, Trust Wallet, TokenPocket, and BitKeep (Bitget Wallet). These wallets are installed as browser extensions or mobile applications, so you can work both on your computer and on your smartphone.

The most important thing in working with a wallet in DeFi is to deal only with the tokens whose projects you trust, carefully study these projects’ whitepapers, make sure that the token address (its smart contract) is exactly indicated on the project's website, since token clones and other types of fraud are very common.

Also, pay great attention to the safety of your wallet’s secret phrase, since it solely ensures the security of your digital assets and the possibility of restoring access to them in case your smartphone or computer is lost.

How to Invest in DeFi

In order to invest in the DeFi industry, you will need some experience with working on a regular large centralized exchange like Binance, a MetaMask wallet and a certain amount of digital assets that you will transfer to a wallet for subsequent work. If you’ve decided to buy DeFi tokens, you most likely have some investment ideas and funds already.

After the funds are placed in your wallet, you can connect it to any decentralized services, for example, decentralized exchanges (DEX), lending protocols, etc. By connecting to the desired service, you can make transactions by buying or selling, loan or borrow tokens, stake or send them to liquidity pools to receive passive income, etc.

The opportunities offered by DeFi are very extensive. As you gain experience in various DeFi projects, you will quickly understand what suits you and what does not. Limit your risks, and your capital will grow.

What are the risks of using DeFi?

DeFi is a relatively young industry, so by investing in it, you take on increased risks. Remember that decentralized finance is not regulated by anyone, so mistakes lead to an irretrievable loss of funds. This may not be only due to fraud, but also to inattention. The most important thing in DeFi is never to lose vigilance, check token addresses, read project whitepapers to better understand their tokenomics, check for an audit of the project's smart contracts (usually indicated on the website), and do not go through with a transaction if you sense that something seems fishy.

When working with a new DeFi service, start with small test amounts to understand their work mechanics, make sure that everything works exactly as you expected, for example, that you can not only buy the token you are interested in, but also sell it without unforeseen losses.

In addition to the risks of specific DeFi projects, there are risks of a global nature, for example, regulatory issues. The SEC's concern about DeFi is quite serious, and the desire to regulate DeFi is only bound to grow. Keep your finger on the pulse, and monitor industry development, positive and negative news. 

Any investment is associated with risk, therefore, when thinking about how to invest in DeFi, be prepared for the fact that the risks of working in DeFi are the same as in any other market, but greatly enhanced by the comparative youth and novelty of the DeFi industry itself, which allows to both earn and lose a lot.

Read more articles

Subscribe to our newsletter for the latest news

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.