Hyperliquid – an L1 designed for DeFi at scale (Part I)

This article was written in collaboration with the team at Hyperactive Capital.

With a revitalized fervor for DeFi since the US elections coinciding with the imminent launch of HYPE, we at Felix are excited to share more about our motivation for building on the Hyperliquid L1.

Felix protocol contributors have spent years building and managing DeFi protocols. Our contributors come from the auditing and engineering firm Three Sigma, which has worked with well-known protocols like zkSync, Maple Finance, and Starknet, as well as the risk management firm Anthias Labs, which counts the likes of Aave, Compound, and Euler as previous clients.

We’ve experienced the limitations of the current crop of smart contract networks. DeFi has come a long way nonetheless, with hundreds of billions of dollars of capital housed in protocols on top of blockchains like Ethereum and Solana. Still, we believe there is a lot to be desired for crypto rails to become the backend of all finance.

Scaling DeFi

Protocols like MakerDAO, Aave, and Uniswap have established themselves as the kingpins of the Ethereum DeFi ecosystem. They’ve validated the value proposition for DeFi, showing that there is indeed a market of users that want to trade, borrow, and lend on crypto rails. This has cemented Ethereum as the leading DeFi chain, with its asset diversity, battle-tested protocols, and large swaths of institutional players. This has been achieved despite Ethereum being constrained by its relatively expensive and slow platform.

There's extensive room for growth in DeFi, in particular for use cases that have grown outside of Ethereum on exchanges and alternative blockchains, and Hyperliquid's quick ascent highlights that point. In the last year and a half, Hyperliquid has quickly become the go-to destination as an on-chain perp exchange, beating out incumbents like dYdX and GMX while attracting centralized exchange traders as well. It has revealed the market's appetite for high-performance, cost-effective trading infrastructure, while maintaining the benefits of an on-chain experience (self-custody, composability, etc.). Hyperliquid has since expanded its scope to also include a general purpose EVM environment, setting it up to vertically integrate all of the user patterns that today are spread across the likes of Ethereum, Binance, and Solana.

Indeed, the next step for Hyperliquid is to expand beyond its trading infrastructure and to offer an array of composable and integrated services for its users. By adding a generalized smart contract environment to the Hyperliquid L1, we believe the future of DeFi lives on Hyperliquid - a fast and low-cost L1 built with out-of-the-box orderbook infrastructure and deep liquidity, all while maintaining the benefits of a decentralized validator set and non-custodial financial services.

1. Performance, while maintaining decentralization

Performance is critical to improving the DeFi user experience. Ethereum has demonstrated the ability of DeFi to compete with low frequency finance, but it has yet to conquer the traditional finance use cases that operate at sub-second speeds. High latency and slow block times lead to a cascade of issues: failed trades, increased slippage, and poor price execution – all of which hurt traders and liquidity providers alike. These challenges have historically forced users to choose between the speed of centralized exchanges and the autonomy of decentralized systems.

Hyperliquid looks to balance these trade offs. To unlock its performance gains, Hyperliquid runs on a custom, Rust-based consensus algorithm, HyperBFT. Building upon proven consensus algorithms like HotStuff, HyperBFT is designed to function effectively under partially synchronous conditions while maintaining strong security guarantees. Others have written about this in more detail, such as this article by ASXN.

As it stands, the Hyperliquid testnet has close to 40 validators. It seems that Hyperliquid is going for high performance and sufficient decentralization. This allows for fast transaction execution while preserving the core benefits of decentralized systems: censorship resistance, self-custody, and trustless operation. The extent of Hyperliquid’s decentralization remains an area of healthy contention, but we note that this is a) far superior to the status quo of centralized exchanges, and b) enough for the use cases it is meant to facilitate.

2. Out-of-the-box trading infrastructure

What sets Hyperliquid apart is its built-in trading infrastructure. Unlike other chains where protocols must build everything from scratch, Hyperliquid provides multiple out-of-the-box components through three distinct but interoperable execution environments:

  • a perpetual futures orderbook

  • a spot orderbook

  • a general EVM environment for smart contracts

The perpetual futures environment implements sophisticated orderbook mechanics directly at the protocol level, including advanced order types, robust mark price oracles, and dynamic funding rate calculations. This native implementation results in significantly lower gas costs compared to smart contract-based alternatives, while enabling features like atomic order matching and instant position updates that would be prohibitively expensive to implement in a pure EVM.

We believe these features compound on one another in powerful ways. The presence of native order books attracts sophisticated market makers who can deploy their strategies with minimal technical overhead. These market makers create deep, two-sided liquidity with tight spreads, which in turn attracts more traders. The low latency and gas efficiency mean market makers can update their quotes more frequently and maintain tighter spreads, creating a positive feedback loop cycle of improving liquidity.

Ultimately, this specialized infrastructure allows protocols like Felix to focus on building higher-level applications without needing to solve complex order book mechanics or market microstructure problems. Rather than spending months implementing basic trading functionality, we can focus on building DeFi services on top.

3. Composable DeFi

The composability between EVM and order book infrastructure, which was recently possible with the pre-compiles feature release, opens up interesting possibilities. At the most basic level, smart contracts will be able to programmatically manage perp and spot positions, enabling sophisticated business logic to plug into a permissionless system.

Imagine a vault contract that automatically adjusts leverage based on volatility metrics or funding rates, or implements trailing stop orders that dynamically update based on market conditions. Furthermore, lending markets can now integrate directly with perpetual positions, using them as collateral with automated risk management systems. This is particularly powerful for yield generation strategies, where smart contracts can simultaneously provide liquidity to spot markets while managing hedge positions in perpetual markets, capturing funding rate differentials and automatically compounding yields. We could even see new market structures emerge from this infrastructure. For example, hybrid liquidity pools can combine AMM-style liquidity with orderbook markets, with smart contracts automatically placing and updating limit orders based on pool state.

One thing we're particularly excited about from a risk management and capital efficiency standpoint is executing spot orderbook liquidations – something we've never seen before in DeFi. Rather than relying on basic liquidation mechanisms, lending protocols can now execute sophisticated unwinding strategies through limit orders, significantly reducing slippage and improving recovery rates. This controlled unwinding process helps prevent the cascading liquidations that have historically plagued DeFi during volatile periods.

4. Institutional DeFi

The programmability of smart contracts paired with the sophisticated orderbook infrastructure potentially opens up a new set of services for institutional-grade firms. Tapping into the trading activity, smart contracts can implement sophisticated risk management systems that institutional-grade firms are accustomed to: autonomously monitor portfolio Value at Risk, track correlation between positions, execute emergency deleveraging when needed, and more. Margin management is more easily programmable, with smart contracts automatically managing margin efficiency across multiple positions and collateral types. While other chains have this capability on the smart contract side, the key point is that the pairing of on-chain trading infrastructure and programmability is a truly differentiated offering.

Building Hyperliquid together

The Felix team’s ambition is to offer a second-to-none experience for Hyperliquid traders, who are looking to borrow against collateral, earn yield, and more. The Felix team is excited to work with other builders who are pursuing the Hyperliquid vision.

To provide some food for thought, one idea that we are interested in is the possibility of PURR delta-neutral positions. Using Felix, users can potentially borrow against their PURR collateral, take their loan and deposit as margin, and short PURR in the perps market, maintaining a perfectly hedged position. What other things can you do while composing with Felix? What other experiences can we build? We’re excited about the possibilities.

Try Felix

Over the next several weeks, we’re excited to invite the broader Hyperliquid community into the fold. We are starting to roll out the Felix testnet beta to users, and will be prepared for mainnet once ready. Whether you’re a seasoned trader in the trenches of Hyperliquid perp / spot, or just learning about Hyperliquid L1, we’d love to chat with you.

To get involved:

To stay up-to-date on Felix, follow @felixprotocol on Twitter.

Subscribe to Felix Protocol
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.