New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Ant I Uniswap V4 Deep Dive: Hooks, Architecture & Developer Tools I ETHGlobal Taipei 2025

ETHGlobalThu, Oct 9, 2025, 12:00 AM

Explore Uniswap V4's groundbreaking features in this ETHGlobal Taipei 2025 workshop with Ant from Uniswap Foundation. Learn about the new Singleton architecture, flash accounting system, and revolutionary hooks that enable custom AMM logic. The presentation covers V4's key innovations including ERC-6909 token standard, gas efficiency improvements, and modular design for developers. Discover how to build custom hooks and participate in Uniswap's developer programs to create next-generation DeFi applications. 00:00 - Introduction to Uniswap Foundation and its mission 01:16 - Overview of Uniswap protocol evolution 02:26 - Uniswap V4 architecture and Singleton design 04:30 - Flash accounting system and gas savings 06:19 - ERC-6909 token standard benefits 08:16 - Understanding hooks and their modular capabilities 09:31 - Four main types of hooks explained 10:51 - Real-world hook implementations 11:30 - Hackathon hook ideas to build 12:11 - Getting involved with Uniswap developer programs 13:17 - Resources for builders and incentives _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🇹🇼 *ETHGlobal Taipei* This workshop is specifically for ETHGlobal Taipei, a 3-day hackathon held April 4-6 2025, that brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ Follow *Uniswap Foundation* X: https://x.com/UniswapFND ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal​ Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Transcript

[Music] welcome everyone I'm excited to introduce you to un sp4 today this presentation will walk you through the evolution of the new SP protocol focusing particularly on the newest version wei4 and its groundbreaking features I'm and I'm a developer ambassador of the new SP foundation and I help out with developer support and Integrations for the UN sport Foundation some of my responsibilities include supporting developers to build on Unis before unit chain educating the community about the protocol capabilities facilitating connections between Builders and resources and so on my background is in smart contract and software development and I've been involved with Unis swap since the Hulk incubator program first launched if you have any questions about this presentation feel free to reach out to me in the UN swap Discord before we dive into the technical aspects I want you I want to introduce you to the UN Foundation what is the UN Foundation a question I'll answer for you now the UN Foundation was created to support the growth decent decentralization and sustainability of the UN swap Community our mission is to pursue a more open and fair Financial system through grants we drive value in five key Focus areas first protocol Innovation we want to develop Vel new core infrastructure and growth strategies that create value for both the Unis Swap and the broader defi Community second developers we want to on board new developers to build on the new protocol and support them throughout the development life cycle third governance we want to empower un for governance to support protocal growth and to sustain itself fourth research we want to see defi research and its practical implementations final one is the security we want to protect the protocol users through investment into security let's now talk about the UN protocol the new protocol is a peer-to-peer system designed for exchanging cryptocurrencies specifically y20 tokens on the ethereum blockchain the protocol is implemented as a set of persistent non upgradable smart contracts and to design it is designed to prioritize sensitive resistance security self custody and the function without any trusted inter Med is now let's take a look at how the UN protocol has evolved over time this context is important for understanding sign the significance of the we4 release Here is a brief comparison between different versions of Unis SW we can see it introduced better token support and capital efficiency over time Unis V2 released in 2020 was a major improvement over 31 it supported direct lc20 to lc20 swaps and used a global constant product curve it had a fixed fee structure of 0.3% and used a factory contract to deployer pair contracts for any 2year tokens however it didn't support on train programability new swwa fee released in 2021 introduced concentrated liquidity with its price C segmented into price TS and ranges this allowed for more Capital efficiency in offered multiple Feats but still used the factory contract deployment model and lap oning programability now Unis sw4 scheduled for release in 2025 represents a significant paradigm shift it supports both usc2 to usc2 and Native if to erc20 trading pairs it introduces programmable amm curves Dynamic fee across and infinite fee spectrum and most importantly a Singleton architecture the key Innovation is on programmability through hes which can R custom logic at various life cycle events let's explore the architecture of Unis V4 the core design philosophy of Unis SW V4 is flexibility through modularization it's designed to be maximally flexible with each life cycle event such as before after swap before after adding liity and so on the this model approach allows developers to create customiz trading experience while maintaining the core security and reliability that the unit SW is known for a major architectural change in refall is to move to a Singleton design pattern in previous versions each trading pair required a separate deploy contract with V4 all pool states are managed by a single pool manager contract on the right side of this slide you can see the comparison between V3 and V4 architectures in V3 to swap if for d your transaction will need to go through multiple pair contracts potentially if to usdc and us and then usdc to die in we before with this single turn architecture all pools exist within the same contract allowing for more efficient routing and significantly reduce the pool deployment cost all pool State and logic are encapsulated within the pool manager contract which streamlines interactions and improves gas efficiency and that's awesome to have one contract for all pools another significant Innovation we for is Flash accounting but what exactly is this in previous version of Unis swap every time a swap was made tokens were transferred between po contracts for intermediate steps which was expensive in terms of gas but with refor fin accounting each balance changing operation for example like swaps and liquidity modifications updates and internal net balance known as stta only final balance changes required actual token transfers here's a concrete example imagine you have 20 usdc and 20 usdt but you want to add liquidity with just 15 usdc and 25 usdt in previous versions this was this would require multiple external cost as tokens were transferred between pool contracts when swapping from usdc to USD but with reforce flash accounting we only need to track the data thus we need we can Dr and modify liquidity in a single code and only the final balance changes in four to actual token transfers as shown in this diagram when we swap 5 usdc and 5 usdt to create a decided liquidity position no token transfers occur between these operations the final state after all operations is what gets settled the benefits of flash accounting are substantial looking at these transaction examples you can see the dramatic difference in that gas cost between V3 and V4 for similar operations V3 cost $ 57.4 to in gas while we before cost only $ 4.63 a reduction of over 90% this efficiency isn't just a technical Improvement it translates directly to better returns for LP as Hayden Adams the found of Unis noted on Twitter usdc usdt on V4 is currently higher returns than V3 even at a time fraction of the TL lower gas cost is more profitable with LP and this benefits will compound as we for scales up one way we for improv G deficiency is also through the implementation of ERC 6909 a minimum and G efficient standard for managing multiple usc2 tokens from a single contract it provides a simplified alternative to the more complex YC 1155 multi toen standard here's how it works instead of choosing to move tokens in and out of the pool manager developers can choose to op in a lifted es20 tokens within the pool manager contract and in exchange pool manager meam andc 6909 token representing this claim in subsequent interactions requiring paying tokens the users will not need to transfer usc2 tokens into the pool manager and instead they can simply burn some or all of the claim tokens that they have now let's get to what AR arguably the most exciting part of un we before hooks hooks in un before represents a modular approach to building onchain functionality instead of requiring developers to for the entire protocol to add custom features hooks allow them to Simply attach their custom logic to specific life cycle effects and as the co-founder of arus Finance caser do if said what's fascinating about ref is its expressibility through hooks the question becomes not what could be a we4 hook but rather what couldn't be a we4 hook here are some key concepts for hooks first hook is pool specific each liquidity pool in new smoke B before can have its own hope contract attached to it and they will be called by the pool manager but they are also optional for we pools and then the whole contract is specified when creating a new pool in the pool manager initialized function also you can see hooks as a plug and play modules that can be attached to different stages of a life cycle for example before or after initialize before after swap etc etc host can be also categorized into four main types first LP profitabilities this use Dynamic fees or auctions to reward LPS or hooks that we hyper provocate liquidity to maximize returns second liquidity death hooks these hooks Val redistribution to reward liquidity de with the goal of directly depending liquidity third asset class support hooks this Hook support sophisticated asset classes by tightly coupling pool design with asset tokenomics fourth is the quality of life counter folks this C Implement features like limit orders time rated average Market maker and manipulation resistant oracles let's explore some concrete examples of H they already being developed we can see that arus develop leing hooks to create deep on liquidity and recapture map for LPS bunny builds a reification hope to amplify returns by combining steady AP Wise from Landing FS with SP feets so develop a hul called storm to minimize bre floss on the unit sport protocol flunch is a new approach to coin launches by with distri building 100% of the swap fees to creators and their communities by V4 hooks let's also explore some ideas of hooks that you can build for this hackathon first is the dynamic V hook it automatically adjust what Fe basos market conditions and to optimize V generation and liquidity utilization this H can be made customizable to specific asset Pairs and types as well second is the obal HX it can enable customer more novel price feeds by recording data for example time rated aage price for integration with the other D5 protocols third can be Auto hatching hook it protects LP from IL through automated hatching strategies and also we have permission to P hook it enables compliant hooks for institutions by allowing for arbitrary rules and logic to affect pool Behavior such as restricting pool access to parp based on kyc or GE allocation status now that you understand what un for before is bringing to the table let's let's talk about how you can get involved the use Discord server is the best place to network with other developers ask questions and get support for your we4 projects as you can see from the screenshot there's an active Community discussing hes integration challenges and other technical aspects for the protocol to stay informed about the latest developments you can also subscribe to our weekly Builders updates newsletter this provides regular insight into new features Community projects and upcoming events you can follow these links shown in the slide to subscribe we also have this Unit H program in partnership with hm Academy this program provides resources for developers learning to build hooks they offer educational materials hackathons and incubation support for for promising projects their hook directory is shown in this screenshot soase projects Bu from the new swap hook incubator they're currently accepting public hook submissions so if you are developing a hook consider submitting the hook to this program you can also scan the QR code here to access all of these resources and start building on new swap before while we understand most steps in this program might be intrinsically motivated to join this program we also want to highlight the benefits of J heon that we provide this incentive for any developers wanting to build in un swap before I hope this presentation has given you a good understanding on your new swapo and its capabilities and I'm very excited to see what you're going to be with v before thank you [Music]

Automatic transcript — names and jargon may be misspelled.