Unlocked by Universal Navigation Inc.

    This research report has been funded by Universal Navigation Inc. . By providing this disclosure, we aim to ensure that the research reported in this document is conducted with objectivity and transparency. Blockworks Research makes the following disclosures: 1) Research Funding: The research reported in this document has been funded by Universal Navigation Inc. . The sponsor may have input on the content of the report, but Blockworks Research maintains editorial control over the final report to retain data accuracy and objectivity. All published reports by Blockworks Research are reviewed by internal independent parties to prevent bias. 2) Researchers submit financial conflict of interest (FCOI) disclosures on a monthly basis that are reviewed by appropriate internal parties. Readers are advised to conduct their own independent research and seek advice of qualified financial advisor before making investment decisions.

    Uniswap: Get Hooked on V4

    Key Takeaways

    • Uniswap v4 expands beyond a traditional AMM by introducing a flexible developer platform for custom liquidity strategies and automated trading logic.
    • Hooks have already enabled MEV capture, automated liquidity rebalancing, AI agent control, customized oracles, programmatic capital reallocation, and much more. 
    • Uniswap v4 underwent nine audits by independent firms, a $2.35M security competition, and is backed by a record-breaking $15.5M bug bounty program for critical bugs.
    • The robust security framework, ~95% reduction in costs, and customizable hooks unlock key features necessary for institutional adoption.

    Subscribe to 0xResearch Newsletter

    Introduction

    The Uniswap Protocol has been synonymous with DEX trading ever since the v1 release in 2018 and the introduction of the novel, and still widely used, x * y = k constant product function. The next upgrade (v2) brought about real traction through support for ERC20 pairs and price oracles, which helped to spur DeFi summer. Then again, Uniswap Labs introduced several more improvements with v3, most notably concentrated liquidity (enabling up to 4,000x greater capital efficiency compared to v2). Now, after much anticipation, Uniswap Labs has released the long-awaited v4 protocol

    Unlike the previous versions, Uniswap v4 is not only an improvement for LPs and traders but, more importantly, for developers as well. This is because v4 transforms the Uniswap Protocol into a developer platform that allows for customizable markets and AMMs. This is made possible by the introduction of hooks (more on this later). Similarly, it allows developers to express their creativity and users to express their diverse preferences, culminating in an AMM with unlimited possibilities. Uniswap v4 also encapsulates security as it is one of the most audited codebases deployed on Ethereum and was built in public with thousands of pull requests from community members. 

    Key Features

    Uniswap v4’s innovation is centered upon customizability, efficiency, and lowering costs. 

    Unlimited Customizability

    Uniswap v4 provides developers with a customizable platform that has the potential to support unlimited features. This means anyone can create new types of market structures, assets, and new functionality on top of the Uniswap Protocol, thanks to the introduction of hooks. This flexibility finally allows DEXs to compete with existing TradFi incumbents – a huge game changer for the space.

    Hooks

    Hooks are the mechanics that can be attached to a newly created pool, allowing for unique and customized pools with specific features. For each pool, the creator can define a “hook contract” that implements logic executed at specific points in a call’s lifecycle. Being able to inject custom commands before/after a swap, before/after adding liquidity, or at any other point of the transaction call, creates significant optionality. Below we highlight how beforeSwap and afterSwap hooks work as part of the swap execution flow. 

     

     

    Hooks can be used to implement features that were previously built into the protocol, like oracles, as well as new features that previously would have required independent implementations of the protocol. Some examples of novel hook implementations include: onchain limit orders that fill at tick prices, volatility-shifting dynamic fees, and even mechanisms to internalize MEV for liquidity providers. With minimal requirements for creating a working hook, developers can immediately take action on this front. 

    Furthermore, Uniswap v4 allows for different fee tiers, and as a result, swap fees can be either static or dynamically managed by a hook contract within and beyond the 1 to 30bps range. The hook contract can charge their own fee on top of the swap fee and allocate that to liquidity providers, swappers, hook creators, or any other party. The only limit is that once the pool is created, the chosen hook flags are then immutable. 

    All in all, hooks benefit various stakeholders through multiple pathways.

    1) Traders can now, thanks to the introduction of hooks, access greater opportunities for experimentation in new markets and novel AMM designs. This includes limit orders, custom oracle implementations, and TWAMMs. 

    2) Liquidity Providers benefit as hook-managed fees allow for dynamic fee structures and the possibility of direct fee allocation to liquidity providers. Hooks also allow for new liquidity provision strategies and can attract a wider range of applications and LPs, which can lead to deeper overall liquidity on Uniswap v4. This is also particularly beneficial for large traders, as deeper liquidity minimizes market impact when executing large orders. Furthermore, MEV internalizing hooks can provide additional revenue for LPs while minimizing the impacts of impermanent loss.  

    3) Developers can now tap into the Uniswap Protocol and let their creativity and financial ingenuity shine through. Hooks turn Uniswap v4 into a modular, programmable trading infrastructure, allowing developers to build autonomous agents, reactive strategies, and entirely new DeFi primitives that were previously impossible within AMMs.

    4) All other stakeholders can also benefit from hooks by intentionally routing transactions through specific pools that allocate a percentage of swap fees to the chosen party. Additionally, the new donate() function allows users, integrators, and hooks to pay in-range liquidity providers directly in either or both of the tokens of the pool.

    Improved Efficiency

    Singleton Design

    Traditionally, when creating a pool on previous versions of the Uniswap Protocol, separate contracts were created for each new token pair. Uniswap v4 introduces a “singleton” design where all pools created (no matter which hooks are used) are managed by a single contract. Creating a pool is now a state update rather than deploying a brand new contract, making pool deployment over 99% cheaper than previous protocol versions. Below we show the median fee to create a pool on v4 vs v3 across all deployed chains. The data begins with the launch of v4 and while this is definitely not an apples-to-apples comparison, it shows the cost is considerably smaller at 0.4% of the cost. 

    Flash Accounting

    Flash accounting is a novel mechanism in Uniswap v4 designed to enhance efficiency and reduce gas costs by batching balance updates. Rather than immediately updating token balances with each operation, as is standard in most decentralized exchanges, Uniswap v4 defers these updates until the end of a transaction. This approach drastically cuts down on redundant state changes, lowering gas usage and enabling more complex interactions to occur atomically. For example, usually when a user performs a multi-hop swap, gas is paid every time a token moves to another token. An ETH > UNI swap may go ETH > WETH > UNI, and gas is paid as the balances are updated after each operation. Uniswap v4 introduces a log, via transient storage, that tracks each operation and defers balance updates until the end, minimizing state changes and significantly reducing gas costs. This is akin to how banks accumulate credits and debits with other institutions, and only the net differential needs to be transferred when the day closes. Flash accounting also simplifies complex pool operations, such as atomic swapping and adding. When combined with the singleton model, it also simplifies multi-hop trades or compound operations like swapping before adding liquidity. Below we show the savings made from multi-hop trades. 

    Combined, both of these new features materially reduce gas costs and improve trade efficiency by consolidating liquidity pools into a single smart contract. However, cost efficiencies aren’t the only gains to be made from these updates. Hooks can also improve capital efficiency through more flexible liquidity provisioning, reducing idle capital. For example, if an LP’s position moves out of range (or even close to it), it can programmatically be moved back in range. This way, an LP’s capital can always be deployed and earn fees instead of becoming inactive. 

    Even hook contracts are designed to be gas-efficient, as the protocol determines which hooks to run based on the contract’s structure rather than storing configuration flags. This approach improves efficiency and helps provide predictability and safety. Once a hook is set for a pool, its behavior is immutable and verifiable over time. With all of these well-architected changes, v4 is optimized for both traders and LPs and is by far the lowest-cost implementation of the Uniswap Protocol to date.

    Native ETH

    Uniswap v4 is making (native) ETH tradeable again. While Uniswap v1 only allowed ETH paired against ERC-20 tokens, this was removed in later versions due to the complexity and concerns of liquidity fragmentation across WETH and ETH pairs. Fortunately, singleton and flash accounting solve these issues, so Uniswap v4 allows for both WETH and ETH pairs. With this support for native ETH trading, v4 reduces the need for WETH in many cases and lowers gas costs. Users will also save on gas since native ETH transfers cost nearly half of ERC-20 transfers (21k gas vs ~40k gas).

    The Current Landscape

    The Uniswap Protocol is currently the market-leading DEX across Ethereum and many L2s. To date, across all versions, the Uniswap Protocol has facilitated over $3T in trading volume. Below we show the cumulative volume of each version since its respective activation dates. 

    It should be noted that Uniswap v2 still has over $1.5B in TVL, largely due to ease of liquidity provision and existing integrations. Hooks can be used to replicate v2 and possibly recapture some of the TVL and give LPs greater flexibility and profitability. Below we show the TVL by version. 

    Research Charts Template (169) (38).png

    Below we show the Uniswap Protocol’s market share across the chains with the most volume where the Uniswap Protocol has a presence. Across Ethereum and all of the L2s, the Uniswap Protocol has a 50% market share. 

    Uniswap Protocol’s dominance used to be higher across multiple chains (especially Ethereum). However, new competitors like Fluid or Aerodrome have begun to chip away at the incumbent’s dominance. This is due to specific features offered, like multipurpose capital or capital allocation incentives that the Uniswap Protocol did not offer. However, thanks to the introduction of hooks, developers can now create similar — and potentially superior — features on top of Uniswap v4.

    Current Implementations

    With the Uniswap Protocol evolving from “simply” an AMM to a developer platform, the developer market has been left to its own devices, giving rise to a variety of unique and useful protocols. Even though it hasn’t been long since the release of v4 there are already some noteworthy projects to explore, with over 200 external hooks deployed and $400M+ in volume in “hooked pools.”

    Flaunch

    Flaunch is a token launchpad and DEX, the mission of which is to provide a fair launch for all participants. When a coin is created, the price is fixed for the first 30 minutes and no selling is permitted. Once the initial 30-minute window is over, buyers can sell the coins at the same price they paid, thereby mitigating a portion of the downside risk. Furthermore, when a coin is flaunched, the creator decides how the fees are split between themselves and the community. The fees allocated towards the community are used to buy back the token from the open market, thereby rewarding all token holders. Regardless of the split, 100% of trading fees go to a combination of creators and buybacks. This is arguably one of the fairest ways to launch a token for the community, and the novel mechanisms are all thanks to the chosen hook implementations. Lastly, Flaunch enables creators to distribute NFTs that grant rights to the trading fees, creating a secondary market for the coin’s trading fees. Since its inception, Flaunch has facilitated over $90M in trading volume and returned over $550K to creators and the community.

    Bunni v2

    Bunni, known for maximizing LPs’ profits through automated range management, has released its own upgrade to capitalize on Uniswap v4 (and was the first DEX to do so). Thanks to the introduction of hooks, Bunni v2 was able to introduce several advanced features to enhance liquidity management and trading efficiency. The protocol allows for dynamic liquidity shapeshifting, where positions can be modified without removal while implementing automatic position rebalancing and fee auto-compounding. Trading efficiency was improved through constant gas costs regardless of tick crossings, making large trades more economical. Another challenge successfully addressed is the risk of sandwich attacks during liquidity rebalancing. An auction mechanism was introduced to recapture MEV (Maximal Extractable Value) and optimize fee revenue that adjusts based on market volatility/activity. Below we show the weekly and cumulative volume for Bunni v2 over time.

    AI Hooks

    AI progress has been front of mind in recent months, and Uniswap v4’s hook architecture opens the door for autonomous trading strategies powered by onchain AI agents. Hooks allow developers to inject logic at key lifecycle points in a pool, such as on swap, mint, or burn, enabling novel forms of programmatic behavior. This makes it possible for AI agents to autonomously manage liquidity, rebalance positions, or even respond to real-time market signals without human intervention. In this way, hooks act as a powerful primitive for building autonomous finance applications. A compelling early example of this is Silicon Valley Fund (SVF), an “autonomous agent-run hedge fund” built on Uniswap v4. SVF uses hooks to let AI agents manage LP positions, execute swaps, and rebalance portfolios according to pre-defined strategies. Users can customize the fund’s investment thesis through prompt engineering—whether it’s tracking memecoins, mirroring an index, or farming DeFi yields. SVF showcases how AI-native agents and hooks can combine to create expressive, automated financial systems directly onchain.

    Rigorously Audited and Built in Public

    As previously mentioned, v4 encapsulates the ethos of DeFi, not only through its permissionless markets but also from the Lab’s commitment to transparency and security. The caliber for security was already extremely high as Uniswap v2 and v3 have processed over $2.75T in all-time volume, with zero hacks. Uniswap v4 was built with the same mindset and with thousands of community members publicly aiding its development with hundreds of PRs, making it one of the most collaborative and thoroughly vetted DeFi protocols in history. 

    Apart from community contributions, this is one of the most audited codebases ever deployed to Ethereum (and L2s). Uniswap v4 underwent nine rigorous audits by six independent firms and worked with the Uniswap Foundation, Certora, and Cantina to run a $2.35M security competition. Furthermore, Uniswap Labs has a $15.5M bug bounty program for critical bugs found in Uniswap v4, the largest bug bounty of all time.

    The Future Landscape

    Uniswap v4 represents a fundamental shift not only for DEXs but also for DeFi infrastructure as a whole. This unprecedented flexibility enables the creation of bespoke trading experiences and specialized liquidity pools that were previously impossible.

    Potential for Institutional Sandboxes

    Firstly, the Uniswap Protocol’s record of $3T+ in all-time volume processed without any hacks has garnered confidence (and Lindy Effect) among the community. Secondly, Uniswap v4’s enterprise-grade security reviews, including nine independent audits and a record-breaking $15.5 million bug bounty program, position it well for institutional adoption. Institutions can enable “compliant hooks” by allowing for arbitrary rules and logic to affect pool behavior, such as restricting pool access to participants based on KYC or geolocation status. Both of these whitelisted credentials can be proven through (soulbound) NFTs issued by the institution itself or another recognized authority. Institutions can also integrate their own oracle solutions for offchain assets, derivatives markets, or any other financial instrument. Gas cost reductions, combined with Uniswap Protocol's security and flexibility, strengthen its position as a competitive alternative to centralized exchanges. 

    Optimizing MEV

    Multiple teams have already released various implementations of DEXs that attempt to capture MEV through Dutch auctions, application-level sequencing, and fair pricing by executing all transactions within a block at the same price. But with v4’s introduction of hooks, teams don’t need to create entirely new DEXs anymore – there are other possible paths forward, such as a custom oracle to provide tailored price data, integrations with the mempool, builder bid tracking, and even real-time dashboard monitoring of MEV events. Another interesting solution is a hook that can adjust LP fees proportionally based on priority fees (for the L1, the more MEV a transaction generates, the higher the priority fee). This is something that would be possible on Uniswap Labs’ recently released Unichain. Combined with the low costs of an L2, the improved gas efficiencies, and dynamic fees, MEV optimization on Unichain could create a more inviting environment for LPs than any other chain. If these market dynamics begin to play out and LPs start to capitalize on the opportunities, we may start to see network effects that popularized the saying “liquidity begets liquidity.” 

    Other Use Cases

    Uniswap v4 brings back the “money lego” property of DeFi but in one integrated platform. Hooks can be connected to lending protocols, yield aggregators, options contracts, or even social media platforms. Developers could enable randomized execution, batch auctions, autocompounding vaults, leveraged LP positions, flash-loan triggered rebalancing, TVL-weighted fees, stochastic liquidity, and whatever their imagination or the market desires. Traders, aggregators, and market makers can leverage hooks for custom execution strategies. Custom launchpads can be created to bootstrap liquidity across a wide range of asset types. AI hooks, while already technically possible, will likely be vastly improved upon. With new markets emerging, agents could use customized oracles to look at prediction markets to inform their reasoning when swapping tokenized stocks through an NFT-gated exchange. The possibilities are truly endless. 

    Conclusion

    Uniswap v4 has the potential to usher in a new era of DeFi infrastructure as a whole. The increased efficiency through its new singleton design, flash accounting, and native ETH has already reduced gas costs by up to 99%. Thanks to hooks, it has also successfully addressed key limitations of previous versions while increasing flexibility by orders of magnitude. There are already 200+ hook implementations, and the design space has only now started to be explored. Furthermore, thanks to robust security practices and potential for efficient and KYC’ed trading hooks, its potential for institutional adoption has greatly opened up. As time passes, future hooks can minimize negative MEV, integrate AI agents, and multi-asset and multi-chain trading, and so much more. With this transformation to a developer platform, Uniswap v4 aims to embed itself as a cornerstone of future DeFi infrastructure, truly embodying the ethos of permissionless innovation and customizable finance.


    The information contained in this report and by Blockworks Inc. and related affiliates is for general informational purposes only and is not intended to provide legal, financial, or investment advice. The report should not be construed as an offer or solicitation to buy or sell any security, token, or financial instrument and does not represent any recommendation or endorsement of any investment or financial product or service. Blockworks Inc. and related affiliates are not registered as a securities broker-dealer or an investment advisor in any jurisdiction or country.