Author: YBB Capital researcher Ac-Core, compiler: 0xjs@黄金财经
TLDR
The essence of modular lending is not just cross-chain and aggregation, but cross-chain and aggregation play an important role in modular lending.
Modular lending leverages the security, consensus, and data availability provided by the base layer, focusing on the functional modularization of the execution layer and the application layer.
Modular lending breaks down the process into several independent modules, such as collateral management, interest rate calculation, risk assessment, and liquidation mechanisms, and each module communicates through a standardized interface.
The current characteristics of the modular DeFi protocol are similar to the logic of OP Stack's one-click deployment on the chain. Deployment requires the establishment of a module combination on top of the protocol itself to create new financial products and services.
I. The Origin of Modularity
The concept of modular blockchain originated from two white papers. In 2018, Mustafa Albasan and Vitalik Buterin co-authored the paper "Data Availability Sampling and Fraud Proofs", which proposed a system that allows light clients to receive and verify full-node fraud proofs, and designed a data availability sampling protocol to reduce the trade-off between on-chain capacity and security, solving the blockchain scalability problem without compromising security and decentralization.
Subsequently, in 2019, Mustafa Albasan detailed a new architecture in the white paper "Lazy Ledger". This architecture uses blockchain for sorting and ensuring transaction data availability without handling transaction execution and verification. This new architecture aims to solve the scalability problem in existing blockchain systems and was originally called a "smart contract client". The execution of smart contracts is performed by another execution layer on this client, forming the prototype of the first modular data availability layer project Celestia.
With the emergence of Rollup technology, this concept has become more concrete, following the logic of executing smart contracts off-chain and uploading the results as proofs to the "client" execution layer. Under the reflection of blockchain architecture and new expansion technologies, Celestia came into being, defining a new paradigm of "modular blockchain".
2. The emergence of modular blockchain
The modular blockchain aims to solve the "impossible triangle" dilemma in the blockchain field through decoupling and reconstruction. Simply put, it decomposes the main functions of the monomer chain into multiple layers, each focusing on a specific function, thereby achieving scalability. Generally speaking, the basic functions of the monomer chain can be divided into the following four layers:
Data availability layer: ensure that data in the network is accessible and verifiable, including data storage, transmission and verification functions, and maintain the transparency and trust of the blockchain network. Representative DA projects include Celestia, Avail, EigenDA, etc. Monolithic chains such as Ethereum and Solana can also meet DA needs (Bitcoin lacks a good verification solution for traditional Rollups due to its non-Turing completeness, but its scalability is rapidly improving).
Consensus layer: handles the agreement between nodes to achieve consistency of data and transactions in the network. Through consensus algorithms such as PoW or PoS, it verifies transactions and creates new blocks. Most DA projects also require their consensus layer, which is usually designed for low hardware requirements and simple verification light nodes.
Execution layer: processes transactions and executes smart contracts, including transaction verification, execution, and status updates. Layer2 projects such as Arbitrum, Optimism, and ZKsync act as the execution layer of modular blockchains, verifying the correctness of transactions through the main chain and inheriting the security of the main chain.
Settlement layer: completes transactions, ensures asset transfers and permanent records on the blockchain. The main role of the modular settlement layer is to verify Rollup validity proofs and status data, among which well-known projects include Dymension and Cevmos.
The lightning network, sidechain and other solutions proposed around Bitcoin in the early days can be described as "modular pioneers". However, due to the non-Turing completeness of Bitcoin, these expansion solutions have been slow to progress and have various defects, and have not been widely adopted. Traditional blockchains have tried to solve the trilemma by reconstructing the underlying framework, but with little success. To solve this problem, Vitalik Buterin proposed improvements around Rollups. With the maturity of error proofs and zero-knowledge proofs, it has become realistic to build an execution layer on Ethereum in a Lego-like way. Ethereum has set its ultimate goal as a layered expansion path centered on Rollups. This upgrade method centered on Rollups is expected to surpass previous expansion solutions and become the ultimate solution for blockchain expansion.
3. The evolution of modular loans
Image source: Legendary Quant
Modular DeFi lending leverages the security, consensus, and data availability provided by the base layer, focuses on the functional modularization of the execution layer and application layer, and runs these modules on the blockchain. The key modular parts include:
Collateral management module: responsible for storing, managing, and processing users' collateral to ensure its security and compliance.
Interest rate calculation module: dynamically adjusts lending rates based on market supply and demand, user credit scores and other factors.
Risk assessment module: assesses the credit risk of the borrower to decide whether to approve the loan application and determine the required collateral amount.
Liquidation mechanism module: when the borrower fails to repay on time, initiates the liquidation procedure to protect the interests of the platform and other users.
The modular lending system needs to obtain all necessary transaction and contract data from the data availability layer to achieve interaction and verification between modules. The operation results of each module need to be confirmed and recorded by the consensus layer to ensure the security and consistency of all module state changes. Most of the logic of modular lending runs on the execution layer, and the functions of each module are realized through smart contracts. The final settlement and liquidation of lending transactions rely on the settlement layer to ensure the finality of lending and liquidation transactions.
3.1 Core Concepts
Modular design: The lending process is broken down into multiple independent modules, such as collateral management, interest rate calculation, risk assessment, liquidation mechanism, etc. Each module can be independently developed, tested and deployed.
Interoperability: Standardized interfaces allow modules to communicate with each other, making it easy to combine different modules and even use certain modules across platforms.
Upgradeability: Since each module is independent, any module can be upgraded individually without affecting the entire system. This feature enables the system to respond quickly to market changes and technological advances.
Security: Modular design can isolate risks. For example, if a module has a security vulnerability, only that module needs to be fixed without affecting the entire system.
3.2 Key Components
Collateral Management Module: handles the deposit, withdrawal and management of collateral to ensure the security and compliance of user collateral.
Interest Rate Calculation Module: dynamically adjusts the loan interest rate based on market supply and demand, borrower credit score and other factors.
Risk Assessment Module: assesses the risk of the borrower, decides whether to approve the loan request and determines the required collateral amount.
Liquidation Mechanism Module: when the borrower fails to repay on time, initiates the liquidation procedure to ensure the safety of the funds of the lending platform.
3.3 Advantages
Flexibility: different modules can be combined as needed to meet different loan needs.
Efficiency: optimize the performance of each module to improve the efficiency of the entire system.
Innovation: Developers can innovate for specific problems by introducing new modules to enhance functionality.
Transparency: Modular systems provide greater transparency, allowing independent auditing and verification of the operating logic and status of each module.
3.4 The role of cross-chain and aggregation in modular lending
Image source: Detailed explanation of cross-chain bridges
The essence of modular lending is not just cross-chain and aggregation, although both cross-chain and aggregation play an important role. The core idea of modular lending is to enhance the flexibility, scalability, security and innovation of the system by modularizing the various functions of the lending process. Cross-chain and aggregation are part of the realization of this core idea, but not all.
Cross-chain (interoperability):
Cross-chain technology: enables assets and functional modules on different blockchains to interoperate. This is crucial for modular lending because it allows users to transfer assets across blockchains and use various decentralized applications (dApps).
Multi-chain support: By supporting multiple blockchains, lending platforms can enhance their usability and flexibility and attract more users and assets.
Aggregation:
Aggregation protocol: Aggregates multiple lending protocols and liquidity pools to provide a unified interface and better user experience. For example, users can access multiple lending markets through an aggregation platform to obtain the best lending rates.
Liquidity aggregation: By aggregating multiple sources of liquidity, improve the efficiency of fund use and market liquidity.
3.5 Other key aspects of modular lending
Modular design:
Functional modularization: Decompose the lending process into independent functional modules (such as collateral management, interest rate calculation, risk assessment, liquidation mechanism, etc.), and each module can be independently developed, deployed, and upgraded.
Standardized interface: Modules communicate through standardized interfaces to ensure compatibility and interoperability between modules.
Security and risk management:
Risk isolation: Modular design can isolate risks within specific modules. If a module has problems, it will not affect the entire system.
Security audit: Each module can be audited independently to enhance the security of the entire system.
Flexibility and Scalability:
Flexible combination: Users and developers can flexibly combine different modules to meet diverse lending needs.
Scalability: The functionality and performance of the system can be expanded by adding or replacing modules without rebuilding the entire system.
Some mature DeFi platforms, such as Aave, Compound, and MakerDAO, have also adopted a modular design concept. For example, MakerDAO is moving to a more decentralized SubDAO model, while Aave's protocol consists of multiple smart contracts for handling lending, collateral management, liquidation, etc. Developers and users can combine these contracts as needed, and even develop new contracts to expand the functionality of the platform.
Fourth, Modular Lending Project
4.1 Morpho Labs
Morpho Labs aims to improve the efficiency and user experience of the decentralized lending market through technological innovation and optimization, and promote the growth of the DeFi ecosystem. Morpho Labs seeks to attract more users and funds into the decentralized finance space with its modular design and frictionless transaction mechanism. Key innovations include Morpho Blue and Meta Morpho, which improve DeFi lending efficiency and interoperability.
Image source: Morpho Labs official
Morpho Blue
Morpho Blue is an advanced version of the lending protocol provided by Morpho Labs. It aims to minimize the deployment of crypto assets (ERC20 and ERC4626 tokens) on the Ethereum Virtual Machine and create independent lending markets. Morpho Blue provides a trustless base layer for lenders, borrowers, and applications, running under a dual license (BUSL-1.1 and GPLv2). Once deployed, it will run permanently on the Ethereum blockchain. (1) The main features and components include:
Collateral: Users must provide collateral supported by the protocol to borrow assets.
Liquidation Loan-to-Value Ratio (LLTV): The protocol sets a minimum value requirement for the collateral relative to the borrowed asset. For example, if the ratio is 90%, the value of the borrowed asset must not exceed 90% of the collateral value, otherwise the position will be liquidated.
Borrowing: Users initiate the borrowing process by interacting with the protocol. They specify the amount of the asset they wish to borrow and provide the necessary collateral.
Interest rate: Borrowers pay interest on the amount borrowed according to the protocol’s interest rate model. Interest accumulates over time and is paid when the loan is repaid.
Repayment: Borrowers can repay the borrowed assets and accrued interest at any time to settle the loan. Once the repayment is confirmed on-chain, the borrower can retrieve their collateral from the smart contract.
Liquidation mechanism: To reduce the risk of default, the protocol contains a liquidation mechanism. If the value of the borrowed assets exceeds the LLTV due to market fluctuations or accrued interest, the position can be partially or fully liquidated to repay the loan and any outstanding interest.
Borrowing: Users initiate the borrowing process by interacting with the protocol, specifying the amount of assets they want to borrow, and transferring those assets to the smart contract.
Withdrawal: Lenders can withdraw their borrowed assets and accrued interest at any time as long as there is sufficient market liquidity.
A notable feature of Morpho Blue is the ability to create permissionless trading markets, allowing users to build independent markets consisting of loan assets, collateral assets, LLTV, oracles, and interest rate models (IRM). Each parameter is chosen during market creation and is immutable, with LLTV and interest rate models selected from a set of options approved by Morpho governance.
Meta Morpho
Meta Morpho is an independent meta-protocol designed to create MetaMorpho Vault based on Morpho Blue, enabling seamless integration and interoperability between different DeFi platforms and protocols. Key features include:
Cross-platform integration: Allows users to seamlessly transfer assets and strategies across different DeFi protocols.
Enhanced interoperability: Provides better interoperability through standardized interfaces and protocols, facilitating smoother collaboration between different DeFi protocols.
Automated management: Use smart contracts and automated tools to improve the efficiency and reliability of asset management and strategy execution.
Liquidity aggregation: Aggregate liquidity from different platforms to improve the liquidity and efficiency of the overall market.
4.2 Euler Finance
Image source: Euler Finance Official
On February 22, 2024, the lending protocol Euler Finance announced that it will be relaunched and released its v2 version. This modular lending platform mainly consists of two main components: Euler Vault Kit (EVK) and Ethereum Vault Connector (EVC), which are designed to enhance the flexibility and functionality of the protocol.
Euler Vault Kit (EVK)
EVK is a toolkit that allows users to create and manage custom "vault" systems. EVK allows users to deposit assets into vaults and set different strategies and rules as needed. It is integrated with EVC, allowing developers to freely build ERC-4626 vaults. The main features of EVK include:
Custom strategies: Users can set different strategies according to their needs and risk preferences, such as specific lending rates and liquidation rules.
Multi-asset support: EVK supports a variety of assets, allowing different types of crypto assets to be deposited into vaults.
Flexible management: Users can flexibly manage and adjust vault settings to adapt to market changes and personal needs.
Security: EVK provides high security through smart contracts and decentralized technology to ensure the safety of user assets.
Ethereum Vault Connector (EVC)
EVC is a tool for connecting EVK on Ethereum. It allows users to seamlessly transfer assets and strategies between different DeFi protocols, gives vaults super powers to act as collateral for other vaults, and facilitates seamless communication between ERC-4626 vaults and other smart contracts. The main features of EVC include:
Unified interoperability layer: EVC allows users to transfer assets from one vault to another, regardless of whether they belong to the same protocol. This greatly improves the liquidity and flexibility of assets.
Strategy sharing: Users can share and apply the same strategy between different vaults, thereby simplifying the management process.
Automated management: EVC realizes the automated transfer of assets and the application of strategies through smart contracts, reducing the complexity of manual operations.
Enhanced liquidity: By connecting different vaults, EVC improves the liquidity of the overall DeFi ecosystem and enables users to use their assets more efficiently.
Euler Vault Kit (EVK) and Ethereum Vault Connector (EVC) are important features launched by Euler Finance, designed to provide greater flexibility and management efficiency. With EVK, users can create and manage custom vaults; with EVC, they can seamlessly transfer assets and strategies between different vaults. These tools enhance users' control and management capabilities over assets, helping to improve the liquidity and efficiency of the DeFi ecosystem.
V. Views on current modular lending
DeFi protocols refer to a series of decentralized applications (dApps) built on blockchain networks that provide traditional financial services such as lending, trading, and insurance without relying on traditional financial institutions. Modular DeFi protocols break these services into independent modules, which increases flexibility and innovation, allowing users and developers to mix and match different functions.
Currently, DeFi is mainly composed of yield aggregators, lending protocols, derivatives and options, insurance protocols, etc. These modules can be freely combined to create new financial products and services. But their essence is similar to the "one-click on-chain" logic of OP Stack. Modular DeFi protocols need to build module combinations within their own frameworks to create new financial products and services.
While modular DeFi brings flexibility, it also comes with potential risks. UniSwap ignited the DeFi craze and became the "blueprint" for various DeFi protocols today. Since its inception, UniSwap has never been hacked, mainly because it relies on a simple core invariant (tokenBalanceX * tokenBalanceY = k) and integrates with immutable smart contracts.
However, modular flexibility also brings relative complexity. The high degree of interconnectivity between different DeFi protocols means that if an upgradeable contract in one protocol fails, it could trigger a chain reaction that affects other protocols, potentially leading to systemic risks for the entire ecosystem. This is an important aspect to consider.