Compostability in DeFi

What is Compostability?

Composability is the ability to combine different components or building blocks to create new applications and services. In Decentralized Finance (DeFi), composability lets developers leverage and combine existing protocols, smart contracts, and financial services to create more complex and innovative financial products. Think of it as financial LEGO blocks – each piece can connect with others to build something greater than the sum of its parts.

Existing features on the Stellar network include a decentralized exchange (DEX), multi-asset support, path payments, and more. These tools and features help developers create connected financial applications more easily.

What is Compostability?

Composability enables DeFi protocols to interact seamlessly on a network, unlocking the creation of complex financial products that were once unimaginable.

For instance, a user can provide liquidity to an AMM liquidity pool (LP) and receive LP tokens representing their share of the pool in return. If the AMM is composable with other protocols on the network, the user can deposit their LP tokens as collateral in a separate lending pool to borrow against them. That's composability at work! This seamless integration not only enhances the user experience but also increases the accessibility of financial services, aligning with Stellar Development Foundation (SDF)'s mission of financial inclusion.


Composable DeFi on the Stellar network encourages financial innovation. It lets developers try out new financial models and products. This helps the financial ecosystem grow and change.

A few benefits of composability:

  • Makes development more efficient through reusable components
  • Enhances security by leveraging well-audited smart contracts
  • Reduces liquidity fragmentation to support ecosystem growth

Types of Compostability in DeFi

DeFi composability exists in several forms.

Atomic composability

Components interact in a single transaction.

Universal composability

Components collaborate seamlessly, no matter which blockchain they use.

Aggregated composability

Means combining different protocols to make a new service.

Vertical composability

Means creating new layers on top of existing ones.

How does composability work in the traditional world?

Traditional finance (TradFi) has limited composability. When you want to do a complex financial task, like getting a mortgage, changing currency, or investing, you usually:

  • Visit separate institutions.
  • Complete different paperwork.
  • Wait days or weeks between steps.
  • Pay fees at each stage.

The siloed nature of TradFi limits innovation and accessibility. Banks, payment processors, and investment firms operate independently, with proprietary systems that don't easily connect with other services.

How does composability work in DeFi?

In DeFi, composability creates an open financial ecosystem where:

  • Permissionless integration: Any developer can build on existing protocols without asking permission from the blockchain network.
  • Transparent interactions: All transactions and rules are visible on the blockchain.
  • Programmable money: Assets and protocols can be programmed to interact automatically.
  • Oracle verification: Transactions rely on trusted data oracles that provide verified external information from multiple sources, ensuring accuracy and increased security.

Examples of highly composable components in DeFi

Automated Market Makers (AMMs) are platforms like DEXs. They let users trade assets without using traditional order books. This helps provide liquidity for other applications.

Lending Protocols: These services enable asset lending and borrowing, which can be integrated into other applications to build new financial products.

Stablecoins: like USDC on Stellar network provide a steady unit of account, enabling other DeFi applications to build and leverage them for their own use cases.

Yield Aggregators: These protocols automatically move assets to wherever they can earn the highest returns, combining multiple DeFi strategies.

Cross-border Payment Solutions: The Stellar network allows for quick and cheap international payments. This makes it a great base for flexible remittance apps.

And many more!

Risks Associated with DeFi Compostability

Even with its benefits, DeFi composability comes with some important risks such as:

Interdependence

If one component fails, it can trigger a cascade of failures across connected protocols.

Complexity

As systems become more interconnected, they become harder to audit and secure.

Smart Contract Vulnerabilities

Bugs in one protocol can be exploited, affecting all connected applications.

Oracle Failures

Many DeFi applications rely on external data sources; if these fail, multiple protocols can be affected.

Join the Stellar Network Community

As the Stellar network ecosystem grows, especially with Stellar smart contracts Soroban, new DeFi apps will keep appearing. This will create new chances for users and developers.

Many of the composable projects built on the Stellar network were developed by active members of the community. By joining this active group of developers and users, you will access shared knowledge, teamwork, and the latest trends in DeFi.

Here's how to get involved:

  • Connect: Join the Discord and follow us on Twitter to participate in discussions about Stellar network and DeFi.
  • Build: Apply for funding through the Stellar Community Fund to develop your own composable DeFi projects.