The origin of blockchain technology has resulted in a dynamic shift in financial and technological systems. This shift has resulted in how applications are developed and their fundamental structure in their operation.
DeFi referred to as Decentralized Finance, is a dynamic technological evolution of the traditional financial space. Hence, to adequately define DeFi, we need to have a basic understanding of traditional finance.
Traditional Finance is the process that involves the creation, management, investment of money, and financial assets. All these activities are controlled or regulated by a central authority.
In traditional finance, the following are the core properties:
- They hold custody of customers’ funds.
- They serve as an intermediary for transactions.
- They are highly regulated.
- Customers have no privacy to the service provider.
- User data are stored in opaque databases and applications.
Decentralized Finance, subsequently, utilizes blockchain technology to solve the centralized authority problem in traditional finance, towards decentralizing control and operation.
We can define DeFi by examining the following factors:
- Custody & Settlement.
- Censor of Transaction execution.
- Protocol Governance.
Decentralized Finance is a system characterized by non-custody settlement, non-censor of transaction execution, and no single protocol governance.
The other dimension of DeFi is Centralized Decentralized Finance with single protocol governance, while there is a non-custody settlement and non-censor of transactions.
Central Intermediary and Decentralized Finance where there is non-custody of settlement and protocol governance, but there exists the censor of transaction execution is another dimension of Decentralized Finance.
How DeFi is built and the roles in DeFi
DeFi is built on top of a decentralized Smart Contract platform. Within the DeFi Ecosystem, we have the following roles:
- The Users
- The Protocol
- The Keeper
The users are the entities that operate with the application and services built on layers of the DeFi stack. The users require the application layer to interact with the protocol layer.
The protocol is the smart contract where the code is written and executed to create the underlying financial services required by the users.
The keeper is an intermediary between the users and the protocol. The role of the keeper is to send trigger events from the user layer to the blockchain.
DeFi applications in the blockchain may need information from the outside world. This process is executed with the Oracle database management system to store data from outside the blockchain network and supply the data into the blockchain network.
A blockchain is a distributed database with Atomic settlement. As a result, the blockchain may need to interact with another blockchain that may have another type of financial asset. To ensure the successful interaction between the two blockchains, a bridge enables the transfer of such information.
The Layers in The DeFi Stack
There are five layers in the DeFi Stack. They are as follows:
- The Settlement Layer
- The Asset Layer
- The Protocol Layer
- The Application Layer
- The Aggregation Layer
The Settlement Layer
This is the first layer of the DeFi Stack upon which other DeFi transactions are logged on the blockchain. On this layer, transactions occurring on DeFi applications are settled through the use of a currency which could be a stablecoin or a cryptocurrency such as USDT and ETH.
The Asset Layer
The asset layer implements the different financial assets, such as the native protocol asset (Ethereum). In this layer, there are standard protocols on how to interact with the token contract. ERC20 is one of the standards used on this layer to maintain a different balance for the asset.
The Protocol Layer
The protocols are created as smart contracts with rules defined to govern tasks and activities on the asset. The protocol layer is where different types of financial services are implemented, such as Lending, Derivatives, Asset Management, and more. As such, it provides liquidity to the DeFi ecosystem.
The Application Layer
The application layer is user-facing. It is an intermediary between the user and the cloud servers that interpolate with the entire stacks of the blockchain and particularly, the underlying protocol layer.
The Aggregation Layer
This layer consists of different applications from the application layer, all stacked up into one application to provide user access to other DeFi services. An example is a cryptocurrency wallet with multiple services such as staking, lending, and exchange.
DeFi Building Block and Services
The following are some of the building blocks and services of Decentralized Finance:
- Asset Tokenization.
- Decentralized Exchanges.
Tokenization is the process of securitizing an asset into the blockchain network. Upon tokenization of such security, the representation of the asset on the blockchain is what we call “Tokens”.
Asset tokenization can be in the form of a Governance Token whereby the future dimensioned pathway of the token is decided by a vote on the blockchain. A security token is also another form of asset tokenization whereby the token is used to represent the state of a real-life asset.
These are tokens whose price is tagged to the type of assets such as fiat and precious metal. Stable coins can be created via Off-chain Collateral(Fiat), OnChain Collateral (Crypto Asset), Non-Collateralized (Algorithmic).
Decentralized exchange is also another service of DeFi. It is a marketplace that allows users to trade different assets in the financial market. They are dimensioned across custodial and non-transparent principality, which are essentially Centralized Exchanges and non-custodial and transparency for decentralized exchanges.
Risk and Security Structures in DeFi
The entire blockchain network is susceptible to security breaches of all types. This article is beyond the scope of examining all the types of security risks in DeFi. But as a pointer on the risks that exist on all layers of DeFi, they include:
While we can’t examine all of these in detail, to some extent all security risk is an extension of the following security structures:
- Technical Structure
- Economic Incentive Structure
The security risks that arise as a result of the technical structure are through the exploitation of technical flaws of the blockchain systems.
Economic Incentive Structure
The security risk in this structure exists to exploit the incentive structure of the protocol to realize an unintended profit at the expense of the protocol or its users.
This article has covered all the foundational sections of decentralized finance, explaining the origin of DeFi as a spin-off of traditional finance, its layers and services, and the type of risks on the network.
Peer Review Contributions by: Wilkister Mumbi