Understanding DeFi: composability explained

Monolith
Monolith
6 min readDec 9, 2021

--

Composability is one of the core features of decentralised finance. When you use DeFi, you can interact with protocols in limitless combinations, stacking your activities on top of one another like building blocks. Composability is what allows you to earn interest on DAI by swapping it for aDAI in Monolith, leveraging Aave’s lending and borrowing protocol. The term “composability” refers to the interoperability of components within a design system. A more composable system allows different elements to work together in different combinations. In this feature, we’ll explain the effect of composability in the DeFi ecosystem.

Composability explained

Decentralised finance has created new possibilities unlike anything that exists in the traditional world. You can use DeFi to exchange value, take out loans, borrow assets, earn yield, enter liquidity pools, mint stablecoins and other synthetic assets, and much more. As the space grows, it’s likely that even more innovations we can’t yet imagine will surface.

The DeFi ecosystem currently centers on Ethereum, the world’s leading smart contract blockchain. Ethereum lets anyone build apps using its programming language Solidity, and the permissionless nature of the network allows anyone to code their own contracts.

You don’t need to ask anyone to integrate an element of another protocol in your own application. Similarly, you don’t need to ask permission to use a protocol — you just need an Ethereum address and some ETH to process transactions on the network.

DeFi is made more powerful by the number of key applications that run on Ethereum. Part of the magic of DeFi is the ability to use apps in different combinations, a breakthrough that’s given rise to the phrase “money legos”. On Ethereum, you can carry out complex strategies like borrowing SNX from Aave, depositing SNX into Synthetix to mint sUSD, then using Curve to swap sUSD for LINK — all without leaving the ecosystem.

All of this is made possible by the composability of DeFi. The applications on the Ethereum network can run interchangeably, and they all support ETH and other ERC-20 tokens. They can be used in endless combinations, with no third party intermediary controlling any element of the network activity. Composability is a core basis of DeFi, and it’s what’s helped the ecosystem grow so quickly; there’s over $40 billion locked in DeFi protocols on Ethereum today.

Composability in the traditional world

Composability exists in many forms in the traditional world. When you use PayPal to pay for an Uber, or when you sign into the Airbnb app with your Facebook login, you are leveraging the composability of each application.

While such integrations can be useful, they rely on the trust of another party. PayPal acts as an intermediary any time you use it to make a payment, and Facebook can hold data from when you signed into Airbnb through the social network.

DeFi, however, creates a trustless system whereby every transaction and activity can be verified on the blockchain. No one party holds the power, and Ethereum acts as the neutral settlement layer. Because DeFi is permissionless, it allows anyone to build on the network, further increasing the possible activities and interoperability between them. As the network grows, it becomes more powerful.

The smart contracts that make DeFi work are immutable; they can’t be turned off or shut down like a bank account can. DeFi is often referred to as “open finance”, because it opens up new possibilities for how we understand value. Its composability greatly expands this potential.

DeFi’s “money legos”

The vast array of components that form the DeFi ecosystem can be thought of as “money legos.” You can interact with them in different combinations, benefiting from a level of capital efficiency that vastly surpasses the traditional system. Examples of DeFi’s money legos include:

Yearn.Finance — Yearn.Finance is a yield optimisation aggregator that integrates DeFi’s key protocols. It uses smart contracts to calculate the optimal returns for the user across each integrated protocol. It makes use of composability and allows the user to put their assets to work, saving on gas fees compared to if they moved their funds between each protocol.

Synthetix — Synthetix is a liquidity protocol for synthetic assets. By depositing SNX, users can mint “Synths” of assets such as crypto tokens (BTC, ETH), currencies (USD, AUD), precious metals (gold), and even stocks (TSLA). It uses the decentralised oracle Chainlink for price feeds, making use of the composable nature of the DeFi protocol.

Aave — Aave is one of DeFi’s leading lending protocols. At its core, it lets users lend and borrow ETH and ERC-20 tokens permissionlessly, but it offers much more thanks to the composable nature of DeFi. In Aave, you can deposit DAI in exchange for aDAI, an aToken that directly accrues interest (it’s also available in Monolith).

Aave recently launched an AMM market, allowing users to lend and borrow liquidity provider tokens. But perhaps the best example of Aave’s use of composability is the innovation of flash loans, which allow users to borrow an unlimited amount of funds without providing collateral, as long as they pay the amount back in the same transaction. Flash loans can be used as a profit maximising strategy through activities like arbitrage, wash trading and collateral swapping, often involving complex multi-step processes across different protocols.

Composable Ethereum

The DeFi ecosystem is largely built on Ethereum. This makes applications like Synthetix and Yearn.Finance more interoperable; there’s less friction involved in moving between chains. When new applications build on Ethereum, it increases the potential possibilities of the ecosystem. It adds to the utility of each existing protocol, while improving Ethereum’s network effect. Ethereum acts as the settlement layer for DeFi — it’s the foundational base chain on which the ecosystem runs.

However, composability could one day extend to other blockchains. A multi-chain world could see DeFi running across several Layer 1 projects, each of them fulfilling a different purpose. Such a climate would require interoperability to work seamlessly.

Ethereum will add sharding with the completion of Ethereum 2.0. The process will involve adding 64 new chains to spread the load of the network. Some have pointed out that this could make Ethereum’s network less composable, though it’s probably too early to say how the update will affect DeFi.

The risks of composability

Though regarded as a fundamental basis of DeFi, there are several risks to the composability of the ecosystem. There’s a protocol risk with any blockchain like Ethereum; if the base chain suffered an attack, every application built on the network would also be at risk.

There are also smart contract risks in DeFi. Any bug in a contract’s code can cause disaster for a protocol and potentially affect other integrated applications. Attackers have exploited bugs to drain funds from protocols, often making use of flash loans to maximise their returns. This can leave users facing considerable losses.

Moreover, there’s a risk associated with combining smart contracts. The contracts for one application may be secure until combined with those of another application. For example, on 12th March 2020, a crash in the price of ETH wreaked havoc for DeFi protocols as holders rushed to exit their positions. A gas price spike caused a lag across price oracles, leading to widespread liquidations in protocols like Maker.

The user can also present another major risk. Due to the complexities of DeFi, the risk can be compounded when a user leverages the composability of the network to interact with multiple protocols.

Conclusion

In conclusion, composability is key to DeFi’s functionality. Thanks to Ethereum’s permissionless network, anyone can use protocols in combination like “money legos”, benefitting from the interoperability of the ecosystem. Developers can also deploy their own contracts, compounding Ethereum’s already-strong network effects. DeFi on Ethereum has hit $40 billion in total value locked thanks to its composability. Though there are many risks to DeFi, a more composable Ethereum is vital to the health of the ecosystem. In the future, it’s possible that DeFi will see more cross-chain composability, as more networks develop their own financial applications. Either way, it’s unlikely that Ethereum’s decentralised finance space will disappear anytime soon. Now why not use Monolith to swap your own tokens for interest-bearing assets? Thanks to DeFi’s composability, breakthroughs like this are now a reality.

Sign up to Monolith here
Learn about token.com
here

--

--

Monolith
Monolith

Monolith is the world’s first DeFi wallet and accompanying Visa debit card made for spending crypto assets anywhere.