In the previous lesson, we have uncovered that DeFi uses blockchain technology (mainly smart contracts and decentralized oracles) in order to facilitate decentralized, transparent, and accessible financial instruments. In this lesson, we will share more about how the market works by taking an in-depth look at how blockchain technology fits into DeFi at a macro level.
Decentralized applications (dApps) are applications that run like any other computer app. The key difference is that dApps run on distributed computing systems - blockchain networks. From a technical perspective, it is possible to view DeFi platforms as a simple dApp that serves a certain function and purpose in the crypto ecosystem.
All of DeFi’s projects run with the help of core blockchain technology (introduced by Bitcoin) and newer features like smart contracts (introduced by Ethereum). So to understand how the tech fits into DeFi, we will cover these two first.
Blockchain technology is the foundation of everything related to cryptocurrency, including DeFi. Simply put, blockchains are digital ledgers that permanently store immutable data that is distributed to the entire network. The data is public and cannot be changed or deleted, which gives the networks a special level of transparency.
Bitcoin is the first blockchain network. It was first proposed by anonymous developer Satoshi Nakamoto in 2008 and by 2009 Bitcoin went live. The cryptocurrency is unique and revolutionary for two major reasons: security and scarcity.
To process transactions, blockchain networks like Bitcoin use the Proof of Work (PoW) consensus model. PoW involves users called miners who use electricity and hardware power to solve complex mathematical problems in return for rewards, which are gained for confirming blocks. A block is a group of signed transactions added by regular users who wish to move their coins.
Each transaction contains a hash that proves its chronological order on the ledger. Consequently, all blocks have their hashes as well, which are connected to the hash of a previous block, thus forming a sequential chain of blocks.
Since the entire ledger (a blockchain’s transaction history) is distributed among thousands of nodes in the form of copies, it is next to impossible to attack Bitcoin. For example, a malicious individual would need to control more than half of the network’s nodes (machines run by miners) in order to establish a different consensus and agree to another version of the blockchain.
Bitcoin is scarce because it has a limited supply of coins. Unlike fiat currencies, it is impossible to infinitely print and issue new coins to the blockchain since the limitation is literally programmed into the cryptocurrency. There will only ever be 21 million Bitcoin in existence, and the circulating supply will slowly expand as more miners release coins on the market.
Scarcity enables Bitcoin to behave like a store-of-value asset, meaning that it can serve as a safe haven or hedge in times of need, which is why investors refer to Bitcoin as ‘digital gold.’ Combined with great cryptographic security, the feature of scarcity makes Bitcoin one of the best-performing investment assets of all time.
Ethereum is another network that brings additional utility to blockchain technology with the help of smart contracts, which are coded in the Solidity programming language to create a rich dApp environment that adds on-chain features other than payments.
As mentioned earlier, smart contracts are pieces of self-executable computer programs that act autonomously and activate on the basis of predetermined conditions. While their execution speed may be slow in contrast to centralized data systems, smart contracts bring important benefits to the table, such as decentralization, security, and transparency.
Anyone can read and evaluate a smart contract’s code to determine whether it is malicious or not - which is a light contrast in comparison to the banking world. Moreover, smart contracts do not pick sides and only follow what they are told to do, which ensures that transactions never take a surprising turn.
Smart contracts are essentially neutral intermediaries that process deals and agreements made between at least two individuals. They remove the need for trust in an otherwise trustless system since users can utilize smart contracts instead of relying on the good faith of the other side. Additionally, they make it possible to bypass centralized intermediaries like exchanges and banks, which would traditionally aid users with on-chain deals.
To summarize, Ethereum can be seen as a version of Bitcoin that possesses smart contract functionality - which makes it capable of executing computational logic and facilitating features that are otherwise uncommon in first-generation blockchains.
In DeFi, users interact directly with smart contracts. Nearly all products and services are non-custodial, meaning that assets can remain in the user’s wallet and do not have to be deposited onto platforms. For example, an individual can swap tokens on Uniswap directly via his MetaMask wallet. The tokens in question never enter Uniswap’s native crypto wallets. Instead, the tokens are swapped with other tokens contained in the exchange’s smart contracts.
While the non-custodial feature does significantly heighten the level of decentralization in DeFi, it has a costly disadvantage that can deter investors.
A centralized exchange usually processes internal trades to transfer assets, an act that does not charge any additional fees apart from the trading fees. Since a DEX does not directly hold the assets and the user must interact with smart contracts, all transactions charge Ethereum’s gas fees.
Blockchain networks are supported by miners, a group of users who host nodes and confirm transactions by solving complex mathematical puzzles. To attract these miners to operate in the first place, blockchains must reward them with transaction fees.
Transaction fees on Ethereum are called gas fees. Gas is spent on every possible smart contract transaction or activity, including transferring tokens, checking balances, calling a smart contract function, and so on.
Gas has one more function: it sets priorities for different tasks. The more complex a task is, the more expensive it is. Therefore, gas functions as a limitation that prevents the network from being overloaded by cheap and simple tasks.
If there are not enough miners and Ethereum faces a surge in activity, an effect called network congestion occurs. Within that moment, gas fees skyrocket, and the gas price for all transactions increases.
Network congestion can last for weeks, if not months, and the blockchain’s state can return to normal only if demand falls down. Investors who trade small sizes are naturally inclined to pause their DeFi activity during this period of time since fees account for a significant portion of their transactions.
This marks the end of our overview on the importance of blockchain technology and its position in DeFi. We note that all aforementioned topics are incredibly complex, which is why it is difficult to encapsulate them in such a small format. For further reading, we recommend reading the blockchain and Ethereum courses on Shrimpy Academy.
From this point forward, all lessons deal with use cases within the DeFi ecosystem. The upcoming lesson explains what decentralized exchanges are and how they work. How does blockchain technology fit into the DeFi landscape and why are smart contracts and gas fees important for understanding DeFi?
Each day Shrimpy executes over 200,000 automated trades on behalf of our investor community. And joining them is easy.
After you sign up and connect your first exchange account, you’ll deploy an investment-maximizing strategy in as few as 5-minutes.
Whether you create your own strategy or follow a premium community leader, we believe the power to automate belongs in the hands of every crypto investor.