Author: Natalie Mullins
Original title: The DeFi Appchain Design Space
The design space of the blockchain has recently received attention: not only the monolithic architecture blockchain, but also:
Modular blockchain
Data Availability and Consensus Layer
Roullp and the execution environment
Application-specific chains, etc.
There are many options to choose from, and the most important question is not which design is best for a decentralized platform, but which design gives a decentralized platform the best chance of competing with a centralized platform?
secondary title
Advantages of application chain
When we consider the various architectures mentioned above, it is not immediately obvious which options are best suited to address important user experience pain points while remaining sufficiently decentralized. Each approach has trade-offs, but Lisk offers a crucial and unique advantage: sovereignty.
image description
Example: Apples Vertical Integration
In addition to the fact that technological sovereignty means reducing reliance on middleware solutions, it also relieves applications from competing for block space with unrelated or rival applications, and reduces development roadmaps and constraints on any other projects. Governance dependencies. These benefits are especially attractive for projects that have already implemented some concept of scale, need more throughput, need frequent upgrades, and/or want predictability around how the platform theyre building on will change and evolve.
Technological sovereignty also allows application developers to unleash their creativity by experimenting with different consensus models, custom node requirements, state models, and other exciting features that will be explored through examples in the next section. Just as many new L1s have emerged specifically for core architectures that lack the social consensus implemented on existing chains, Lisks bring the same level of optimization to individual applications.
text
trade-offs and concerns
Lisk is not a perfect solution for all projects and ultimately represents an opinionated opinion about what trade-offs blockchains and applications should make. Many critics cite (1) loss of synchronous composability and (2) liquidity fragmentation as reasons why the Lisk approach is not suitable for DeFi, but these concerns are not that simple. Just as the liquidity of general L1 has been concentrated in some popular applications, the same may happen in the ecosystem of DeFi application chains. Instead of letting users switch between DEX chains, lending chains, perps chains, liquid mortgage chains, etc., it is more likely that all these functions will eventually be integrated into the core products of some highly liquid DeFi application chains, so that fragmentation changes Its not that easy. question. It’s also worth noting that while the Ethereum mainnet remains the center of gravity for DeFi, its rollup-centric scaling roadmap has its own implications for simultaneous composability and liquidity fragmentation.
secondary title
User Experience Pain Points
Speaking of the current state of UX for most DeFi projects, here are just a few pain points:
This list is not exhaustive, but it does start to paint a picture of how much DeFi applications need to do to have a real chance of competing with CeFi. The following sections will highlight some DeFi application chains that address some of these issues head-on.
Compelling features and experiments
The best way to fully grasp the power of Lisk is to explore some of the most compelling and innovative user experiences being built today, especially on Osmosis, Mars Protocol, Penumbra, and dYdX.
Osmosis
Osmosis is the application chain DEX and emerging liquidity center in the Cosmos ecosystem. Co-founder Sunny Aggarwal outlined the initial inspiration for Osmosis in a blog post titled DAOifying Uniswap Automated Market Maker Pool, with the core idea of bringing the customizability and sovereignty of Cosmos to the AMM world. Today, the protocol allows users to create liquidity pools with unique and variable parameters, allowing experimentation with different types of bonding curves, multi-weight asset pools, and more. A hybrid liquidity model of experimental order book matching and centralized liquidity pools is also being developed.
As a pioneer in the DeFi application chain field, Osmosis has introduced many innovative features to the market, including hyperliquid staking, which provides an elegant solution to the incentive problem of having to choose between staking rewards and DeFi rewards. Users can instead stake any LP equity token that includes $OSMO, which can incentivize contributions to chain security while also bringing additional value back to the community. This feature is made possible by the fact that the Osmosis chain can identify application-level assets and use them in PoS consensus, and as more features and asset types come online, theres no reason it cant be used for other similar use cases.
In terms of creating a CEX-like user experience, Osmosis is working on offering margin trading and lending as part of its core offering. The team is currently working with Mars Protocol to integrate lending directly into the Osmosis trading engine, which will enable staged liquidations, cross-margining of assets, and the use of Osmosis LP stock as collateral for margin trading. Osmosis writer Steview Woofwoof succinctly outlined the benefits of this design in a Medium post earlier this year:
“Phased liquidation ensures that unexpected volatility doesn’t liquidate leveraged positions instantly and catastrophically. Efficient cross-margining means that because the DEX and lending engine are so tightly coupled, Osmosis (unlike stateless DEXs) can keep track of how much money you borrow from different assets and pools. All the collateral provided block-by-block in , so it can basically be used as one big collateral pool for all your loan and margin positions.
Another benefit of building lending protocols into DEXs is that it eliminates the need for oracles. In fact, the Osmosis price feed itself may be oracled for use by other platforms. Of course, it may still be useful to use external oracles for backup or for added security against certain types of attacks (price manipulation, dDOS, etc.).
Osmosis is also exploring several creative ways to handle MEV on its DEX that are easier to implement as a blockchain, including:
Threshold Encryption - Encrypts user transactions before broadcasting them to block producers, and allows decryption and execution only after the block has been voted on and finalized.
Fee discrimination - charging different fees for different types of trades (even if arbitrage trades are more expensive).
skip - Builds Flashbots-like functionality into the base protocol (i.e. auction slots within blocks).
Internalized MEV - builds an in-protocol arbitrageur that runs at the start of each block and provides revenue to $OSMO stakers.
Mars agreement
Mars is a cross-chain credit protocol developed by Delphi Labs and the forerunner of a new DeFi primitive known as contract-to-contract (C2C) lending. The Mars team initially deployed on Terra, and has since taken a step back to reassess their product strategy and decide which ecosystem to invest in going forward. After surveying the entire L1 and L2 landscape, the Mars team finalized a unique Outpost Hub model that would allow them to enjoy the benefits of deploying to an existing L1 and the benefits of Appchain sovereignty.
Outposts are instances of Red Bank, a non-custodial and overcollateralized lending protocol that can be deployed to a variety of different chains - allowing atomic synchronous composition with other applications on the same L1. This is also a source of liquidity for C2C lending, as authorized smart contracts can borrow from Red Bank without providing collateral. The current plan is to build the first Outpost on Osmosis.
Mars Hub is an application chain with two key functions:
Manage all Outposts (including voting on which contracts can be approved for C2C lending)
Collect revenue from all Outposts and distribute it to $MARS stakers and validators
So far, the cross-chain strategy of most DeFi protocols is to redeploy on all popular L1s, or to build an application chain that needs to bridge other chains. This Hub Outpost model attempts to achieve the best of both worlds by combining with the existing highly liquid DeFi ecosystem and simplifying governance and token value accumulation - both of which should alleviate some of the fragmentation issues faced by the main approaches.
The team at Delphi Labs have been outspoken about their intense focus on building the best user experience for DeFi, and once live, Mars will be one of the most ambitious attempts to date to compete with centralized exchange user experience. The development roadmap includes many other exciting new features, such as Rover Credit Accounts, which will allow users to trade across various DeFi products with leverage from a single account and liquidation thresholds, while also replicating the sub-accounts favored by many The experience is on CEX. You can read more about it here.
Penumbra
Penumbra is a cross-chain shielded asset pool and application chain DEX, which uses privacy to improve users on-chain trading and market-making experience. The projects vision arose out of frustration with the lack of adoption and interest in privacy-preserving tools like Zcash, and a desire to build a product that would be better because of its privacy. However, as the past few years have shown, the issue of privacy has proven to be more difficult than many initially realize (especially when building private DEXs).
There have been many well-funded attempts at building ways to privately compute on a blockchain, but Penumbras team was unhappy with any of the existing approaches. Instead, they decided to ask a more subtle but crucial question:
If useful blockchains revolve around public shared state, how do we build private ledgers with useful functionality?
For Penumbra, the concept of a public shared state is central to the usefulness of blockchains precisely because it means that anyone who wants to use a blockchain needs only to coordinate with the chain itself, not with an off-chain counterparty to coordinate. Because of this, they argue that while previous attempts to design privacy-preserving L1 and roullp may address privacy concerns, they do so in a way that severely limits the extent to which users can meaningfully interact with the public shared state.
Ideally, private computing will be done in a way that preserves the privacy of individuals, while also allowing transparency of important aggregated data. However, it turns out that building a system that can manage these tradeoffs requires a fundamentally different state model than any on the market today, so the Penumbra team has been building one from the ground up. Additionally, while they are very intentionally focused on only the trading and market-making use cases right now, the research and design work the team is doing may have broader implications for privacy and scalability in other cases.
Privacy on the blockchain is achieved by moving user data and execution off-chain: replacing on-chain user data with a cryptographic commitment to that data, and replacing plaintext execution with zero-knowledge proofs of the correctness of state transitions. This requires a different state model. Unlike state models centered on globally mutable state, where valid transactions change as they execute, there is the notion of immutable, composable state fragments, where each transaction consumes input state fragments and produces output state fragments ( This is conceptually similar to Bitcoins UTXO model). This allows state fragments to be replaced by commitments to those state fragments, while transaction content can be replaced by proofs of valid state transitions. The problem with this approach, however, is that since execution is moved off-chain, it is no longer possible to access the shared state, since the exact final output of the proposed state transition must be included as an input to the transaction. For example, DEX exchanges need to freeze the exact state of the AMM reserve and the exact output price before committing the transaction to the exchange).
unique state model
Penumbras state model is built first and foremost to facilitate private interactions with public shared state, and it does so by using an actor model that explicitly separates off-chain computation (which is private and handles per-user state) from on-chain computation , which is public and handles shared state.
In the actor model, users create messages (rather than transactions), encrypt them and send them to smart contracts. Each smart contract is then executed once per block and takes as input all messages sent to it during that block, allowing batching of transactions or using any other kind of custom application logic. This also has some nice scalability advantages, since each contract is only executed once, so the computational cost can be amortized across all transactions in a block. Validators will then decrypt some information about the batch total before executing the transaction asynchronously and producing a public output.
This asynchronicity is achieved by creating private NFTs that record intermediate states of execution and model future states. Once the contract responds with an output message, the private NFT is consumed and used to prove that the correct future state is being modeled, at which point the message from the contract is used to generate the executed private output. The tradeoff here is that execution may happen over multiple blocks.
private pledge
To protect delegator privacy and validator accountability, the Penumbra team had to take a novel approach to staking design. Instead of thinking of unbonded and bonded as different states of the same stake token, bonded stake is recorded as delegated tokens. These tokens represent a percentage share of the validator delegation pool, just like LP tokens represent a share in a liquidity pool. While the size of each validators delegation pool is part of the public chain state, delegation tokens preserve privacy by being fungible with each other and residing in a multi-asset shielded pool where all value on Penumbra is recorded. Finally, staking rewards are calculated by tracking the exchange rate between staked tokens and delegated tokens, which has the nice tax-efficiency advantage since only unbonding is a taxable event.
At the end of the day, Penumbras bet is that privacy is actually an integral part of the trading experience, and more importantly, the customizations they make will lead to better execution because enabling private strategies means letting in more sophisticated and well-capitalized players Arena, which has better liquidity, better pricing, and less slippage. Its vision is to create a user experience that offers more privacy than CeFi, with the open and permissionless advantages of DeFi.
dYdX
After being the largest application deployed to Ethereum L2, perpetual exchange dYdX recently announced their plans to build V4 as an application chain. In the official newsletter following the announcement, a “unique combination of decentralization, scalability, and customizability” was cited as the main reason for the move, but it’s worth digging into each of these reasons:
Decentralization
scalability
scalability
Given dYdX V3s current custom wallet. Juliano himself described the endeavor as very risky, but also made it very clear that he believed it was the best available option for creating the highest quality user experience for the dYdX product.
in conclusion:
For all the benefits and innovative experiments highlighted above, its important to acknowledge that building application-specific blockchains is technically more complex than deploying applications as smart contracts or even in specialized execution environments (rollups, subnets, etc.) more challenging. This reality should not be underestimated, but neither should the potential benefits of the more open design space that Lisk provides. Superior user experience is not only how decentralized products beat their centralized competitors, but is also an integral part of building a moat in an open source, permissionless world.