DeFi Stack: Getting a Grip on the DeFi Ecosystem

It's important to know as much as possible about decentralized apps before diving in. Learning about the DeFi stack is a good place to start.

after reading this, you'll understand:

  • The DeFi ecosystem is built in layers, from the foundation to the platforms that combine dApps.

  • The common description of the DeFi stack is: Settlement, Asset, Protocol, Application, and Aggregation.

  • A blockchain's native asset, such as Hedera’s HBAR, is part of both the settlement and asset layers.

after reading this, you'll understand:

  • The DeFi ecosystem is built in layers, from the foundation to the platforms that combine dApps.

  • The common description of the DeFi stack is: Settlement, Asset, Protocol, Application, and Aggregation.

  • A blockchain's native asset, such as Hedera’s HBAR, is part of both the settlement and asset layers.

Decentralized finance applications continue to gain popularity, as they offer many ways to transact without the need for intermediaries. Still, DeFi can be confusing and isn't always seen in the best light. For example, the Solana-based Mango platform suffered an exploit that resulted in $100 million in losses in October. Such incidents lead many to wonder if their funds are safe on decentralized exchanges. Indeed, when it comes to using decentralized applications it's important to know as much as possible before diving in. A good place to start is learning about the DeFi stack.

What is the DeFi stack?

The DeFi ecosystem has several layers, and each one has a profound impact on those above and beneath it. The system is called a stack because the layers are hierarchical and build on one another. They are commonly identified as:

  • Settlement

  • Asset

  • Protocol

  • Application

  • Aggregation


The settlement layer is bedrock distributed ledger technology and its native asset. For example, the Ethereum blockchain technology and ETH token make up Ethereum's settlement layer, and Hedera Hashgraph and HBAR make up Hedera's settlement layer. The settlement layer is responsible for settling the transactions that occur in the higher application layer. As the building block other layers rely on, the settlement layer must ensure state changes adhere to a specific ruleset.


A chain's native asset is part of both the settlement and asset layers. The asset layer also consists of other assets created on the same blockchain. For example, the popular Shiba Inu meme coin was created using the ERC-20 token standard, meaning Shiba Inu is part of Ethereum's asset layer. Each asset represents an atomic unit of value. These assets are often traded using dApps in the stack's application layer, which impacts each asset's value.

Stablecoins, such as Tether and DAI, are part of the asset layer, but the algorithms used to peg them to other assets are part of the protocol layer. This relationship is an excellent example of how each layer interacts with those above and below it.

Many chains incorporate fungible and non-fungible token standards into their protocol layer, enabling creation of NFTs within the asset layer.


The protocol layer is often made up of numerous smart contracts that enable specific activities. Contracts used for decentralized exchanges, lending platforms, and other DeFi protocols are part of the protocol layer. This layer plays an important role in the overall stack. For example, synthetic assets could be considered part of the asset layer, but the smart contracts used to create them would exist in the protocol layer.

Protocols are essential for a functioning DeFi ecosystem, as they provide developers with pre-written code that works as intended. These protocols provide a specific set of rules and code that developers can use to create applications and use cases. If a developer wants to make a dApp that enables initial coin offerings, they can use pre-written protocol code rather than starting from scratch. Protocol codes help developers reduce the time spent creating new dApps and enhance the security for end users.


The application layer is the layer most people use regularly. This layer consists of applications that can be used to interact with specific protocols and assets. If you use flash loans to trade cryptocurrencies, you'll likely use a browser-based application that interacts with a lending protocol.

The protocol layer can be seen as a back-end layer. The application layer often makes up the front end seen by DeFi users. Since the application layer makes DeFi accessible to a broader audience, it is largely responsible for DeFi's flourishing economic system. Businesses and individuals use web-based decentralized exchanges for financial transactions. Without them, blockchain transaction volume would be significantly lower.


The aggregation layer enables DeFi platforms to combine numerous dApps in one convenient location. Aggregators might allow end users to lend money, purchase assets, mint new assets, and check prices in one location. The aggregation layer is at the top of the DeFi stack since aggregators often use applications, protocols, and assets.

The DeFi stack in action

Let's take a look at some specific examples of how DeFi networks operate through the stack.


NFTs are non-fungible assets that use code from a DLT's protocol layer. Some DLTs have multiple token standards that interact with NFTs. For example, the ERC-721 standard is the most commonly used protocol for minting Ethereum-based NFTs. However, the ERC-1155 standard is often used to exchange multiple NFTs in a single transaction. In many cases, dApps are created to enable the creation and trading of NFTs. These dApps are typically aggregated platforms that combine applications used for minting, trading, and price tracking.

Decentralized exchanges

Decentralized exchanges are an excellent example of how layers of the DeFi stack function together. These exchanges often have numerous assets and rely on protocols written for trading assets without needing a centralized intermediary. Transactions are settled on-chain at the settlement-layer level, and many exchanges aggregate dApps that enable lending, derivatives, and more.


Stablecoins are digital assets with values pegged to other assets or controlled by algorithms that burn or mint tokens to stabilize the price. Algorithmic stablecoins use protocols to combat significant price fluctuations. The MakerDAO protocol, for example, lets users take out loans in DAI using other cryptocurrencies as collateral. Users must deposit more cryptocurrency than they borrow, which protects the protocol from price crashes involving tokens that back DAI.

A sturdy DeFi stack

The DeFi stack makes up the entirety of the DeFi ecosystem, and all dApps, currencies, and smart contracts exist within a layer, or layers, of the stack. For a DLT to be secure, every element of its DeFi stack must also be safe. Hedera is a proof-of-stake public network used to create dApps through Solidity-based smart contracts and Hedera's consensus and token services. The network uses a hashgraph distributed consensus algorithm invented by Dr. Leemon Baird, the co-founder of Swirlds Inc. and Hedera.

The Hashgraph consensus mechanism results in transaction finality that is faster and more secure than DLTs that use proof of work. Additionally, the Hedera network requires only a fraction of the energy used by proof-of-work DLTs.