Current DeFi is Old. Let’s Move On

Blockchain, News, Opinion | August 2, 2022 By:

With the remarkable rise of blockchain technology and the fusion of finance with computer science, the world of decentralized finance (or DeFi) has seen a massive explosion over the last few years, especially around decentralized exchanges (DEXs) and lending/borrowing protocols. With a current TVL of $86.37 billion, DeFi is still in its early stages and has a lot of space to grow. We can all agree that the infrastructure layer needs to be improved to host a future decentralized economy and provide developers with the resources they need to create dApps that will be widely used and adopted.

Let’s break down the most significant DeFi improvements.

Performance and infrastructure improvements

The sweet spot for DeFi applications is where speed and cost improvements are possible without compromising security or significantly affecting protocol revenue.

Rollups

To accomplish the objectives above, Ethereum developers are using the rollup system. It’s important to highlight the fact that running DeFi on the main chain is not very practical. Why? With the capacity of 12 to 15 TPS (transactions per second), it doesn’t take many users to clog the chain and drive up transaction fees above reasonable levels. So, rollups come in quite handy in situations like that.

Although not the sole solution, rollups are the most typical response to the scalability trilemma issue. Unfortunately, rollups encounter performance and latency challenges in high-volume applications despite being the holy grail for scalability. Transactions that take a few seconds to complete and the capped capacity of 1-2k transactions per second are not ideal for large-scale DeFi dApps.

There are two types of rollups: ZK rollups and Optimistic rollups.

ZK rollups are a scaling solution that uses validity proofs to prove that off-chain computations are correct. They use math instead of fraud proofs – with it comes the trade-off of extra complexity required to make executions compatible with Solidity and EVM tooling. The zero-knowledge rollup solution offers the same security guarantees as the Ethereum mainnet, with a big scalability boost; validating blocks is faster and cheaper because less data is included.

On the other side, ZK Rollups do not support composability, which means different ZK Rollup applications cannot natively interact with each other. Not only this, ZK proofs are expensive and complicated, and the interaction between the main chain dApp and sub-chain dApp is restricted until the communication and contract standards are solved. This quality greatly undermines the composability of DeFi applications.

Similar to ZK-Rollups, optimistic rollups verify that transactions are authentic and not fraudulent by employing fraud proofs rather than validity proofs. Depending on the transaction, it is estimated that this technique would increase scalability by 10-100 times. Due to fraud proofs, this model’s flaws become apparent. They operate under the premise that proof will always be ready for submission on time. While this is not a drawback for the ZK-Rollups solution, everyone will suffer longer waiting times when exiting an optimistic rollup solution.

The current transition to Optimistic rollups is understood to be a short-term solution. Down the line, applications will need to change the environment again to a sharding + ZK Rollup model. The shift from one solution to another creates friction and wastes energy from the developer’s perspective. On top of everything, ZK-rollups suffer from the EVM and Solidity incompatibility, and producing fraud proofs can be a big challenge.

The final critique for the rollup-centric model is that sequencers responsible for executing, compressing, and packaging transactions are centralized, which could lead to censorship of transactions. Additionally, the majority of rollups only have one sequencer, which makes decentralization extremely difficult. This might be the cause of the fact that nobody has done it to date.

Arbitrum and Optimism have been the most known and widely used implementations of Optimistic rollups.

App-chains

Following the strong uptake of Cosmos chains like Cosmos Hub, Terra, BNB, Juno, Evmos, and Osmosis, app-chains, or application-specific blockchains, are slowly rising in popularity.

The modus operandi of this model is that every application needs its own chain with complete control over how blockspace is used. Imagine having DeFi, NFTs, games, and other protocols all competing for the same, limited blockspace – they cannot scale and reach their full potential if they need to share space resources with one another. Security is often pointed out as a weakness for this particular scaling solution because every chain’s security depends on its own token market cap and the amount of staked tokens. Projects need to find validators and have the certainty that those validators will be responsible and will not act maliciously. With the launch of Interchain Security in Q3, chains will be able to rent the security from the Cosmos Hub to help resolve this security issue. The key difference in Cosmos is that the community has full control over the protocols and chains are entirely independent of each other. Additionally, thanks to IBC (inter blockchain communication protocol), sovereign chains are not isolated from the rest of the ecosystem and can easily communicate with one another. IBC can be used for more than just token transfers; things like sharing security with other chains, oracle, and other arbitrary data and even controlling accounts on other blockchains are possibilities and the specific skill that cosmos chains enjoy.

The average user of crypto protocols can have trouble understanding what is going on under the hood. This could soon be changing with the introduction of Interchain accounts since ICA will make things seamless so that users do not have to do multiple IBC swaps. This new module native to the Cosmos ecosystem will enable users to control accounts on other chains, performing tasks like swaps, posting limit orders, staking, etc. will become a reality for the first time in this industry. Performing cross-chain tasks from the same UI could be the key step to broader crypto adoption.

Tools like Tendermint, Cosmos SDK, IBC, the CosmWasm smart contracting language, and other modules make Cosmos chains great for specialized use cases, and DeFi is no exception. If we assume that DeFi will be used by hundreds of thousands, if not millions of users, this architecture makes total sense. Mixing dozens of unrelated dApps competing for the blockspace will eventually lead to higher gas fees and chain congestion. This might be why some protocols like dYdX switched gears and jumped on the Cosmos train.

Product focused improvements

Building innovative, useful decentralized applications that will create additional value for the masses and stakeholders is the second biggest improvement that the DeFi industry can utilize.

CLOB – Central limit orderbook

Most financial applications in traditional finance create markets using CLOBs or central limit orderbooks. Utilized by centralized exchanges, they work by matching bids and asks for specific assets, allowing traders to buy and sell at the lowest ask or highest bid at any given time. Orderbooks with sufficient liquidity can offer low spread and slippage, low fees, and fast trades. Although these are excellent advantages, they are frequently only accessible through centralized exchanges, which increases regulatory exposure.

An orderbook is bound by the restrictions of the underlying blockchain while creating a decentralized exchange. Since most chains are not designed to support orderbook transactions with high volume, due to consensus constraints and the lack of chain-level optimization, the AMM (automated market maker) approach has become very popular in DeFi.

AMMs work by offering a portion of trading fees to liquidity providers who deposit a pair of assets to a pool. Users can then trade these assets at a constant market price. Decentralization, constant price quotations, and liquidity for long-tailed assets are all features of AMMs.

Reliance on LPs, however, has certain disadvantages for AMMs, including high slippage, capital inefficiency, impermanent loss risk for LPs, and increased front-run risk.

Swapping big amounts of tokens in an AMM model is not viable because if there isn’t enough liquidity in the pool to accommodate particular trade, traders will get hit hard with slippage, impacting the price and getting a sub-optimal trade. Traders can only buy at the current price without the possibility of exercising limit, stop-loss, or taking profit orders. On top of all those drawbacks, miners/validators can front-run trader’s transactions and profit off of that.

Final thoughts

Last but not least important is having standardized native bridges like IBC & XCM for interoperability inside the ecosystem and generalized external bridges like Axelar & Nomad for cross-chain interoperability between ecosystems. Free-flowing liquidity from one system to another will unlock the true potential for crypto and over time ensure resiliency and stability. In order to do that, we need things mentioned above, as well as more user-friendly interfaces that translate complex dApp functionally into simple and intuitive visualization.

To obtain the best of both worlds, Sei Network has built and optimized a layer 1 chain using the Cosmos SDK to facilitate an orderbook. Meaning Sei can provide not only the decentralized, permissionless nature of a DEX but also the speed and capital efficiency of a CEX (centralized exchange).