header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP

Do you really know how to use the "Hook" in Uniswap V4?

2025-05-15 12:36
Read this article in 7 Minutes
Hook originated from Uniswap, transcends Uniswap
Source: 0xTodd


Recently, I deposited some funds into Uniswap V4, so I took a close look at Uni's hooks. Many people have actually told me privately that they did not feel the same amazement when Uni launched V4 as they did when V3 was launched. This is mainly because the concept of "hooks" itself is too abstract and hard to grasp.


Instead of translating "hook" directly as "钩子 (gōu zi)," in my humble opinion, it might be better translated as "plugin." A hook is intended to give a pool some functionality beyond Uni itself. The documentation extensively emphasizes when a hook can be called, a detail that most people are not interested in. It would be better to explain what a hook can actually do.


【Examples of Hook Usage】


-- For example, it can restrict certain specific addresses from using a pool you create, such as the ETH-USDT pool;
-- Or it can make your pool charge higher fees during busy times and lower fees during idle times;
-- Or it can even allow your pool to operate without the X*Y=K curve equation (PS: probably inspired by Curve at the time).


In short, you are free to develop various functionalities that you need, which the Uni team may never officially introduce.


It's a bit like the Steam Workshop, where things are no longer done by the official team and instead left to others to create freely.


Another change is that previously, there were only two profit positions in the Uni ecosystem: LP and traders, and both were paying each other. With the introduction of hooks in V4, it actually allows some script kiddies to have a profit position as well.


When you write a hook, others can pay to use your hook when creating a pool (selling... hooks?). Each pool can use one hook plugin, but a set of hook plugins can be subscribed to by countless pools, with a very low marginal cost. There is a website called Hook Rank that lists hundreds of hooks, showing how much money various hooks have earned. Currently, one of the most commonly used hooks is Flaunch, and I see that the developer has already earned over $1 million.



What does it do? With its hook, you can create a pool for a meme coin and set the pool's fees to any ratio you want, for example, 80% directed to your wallet and the remaining 20% used for buybacks.


Fortunately, when Donald Trump's son issued $Trump, he was not aware of this feature. Otherwise, he would have directed all the fees to the future of global finance, wouldn't he?


Additionally, as the saying goes, only your competitor truly understands you. Following suit, Pancake also decisively introduced a hook, albeit not named V4 but referred to as Pancake Infinity. Of course, that is another story for another time. All in all, hooks are quite an interesting thing, significant enough to be crowned with the name V4.

Let's share another real-world example of a hook.


Ever since Pancake also launched Infinity (aka V4), hooks on the BSC chain have begun to evolve. For instance, this hook called Brevis has actually created a VIP account effect on-chain: individuals holding $CAKE long-term, when transacting in the CAKE-BNB pool with this hook, experience lower fees compared to others; furthermore, high-volume traders on-chain also get lower fees.



It is speculated that this hook triggers a pre-transaction event, assigning special accounts to special fees. It has successfully implemented this familiar business model, without altering the underlying Pancake structure, using a third-party smart contract, which is indeed quite innovative.


Furthermore, considering that each pool usually can only have one hook, this pool is very likely to become one of Pancake's designated pools in the future.


Brevis's core business is in ZK and is part of YZI Labs' Portfolio. It has been mentioned before that working with ZK is currently one of the most challenging levels in the industry, so it is naturally not a difficult task to personally go ahead and create a hook.


Moreover, if in the future it can form a strong bond with Pancake, introducing various hook functions, perhaps in the future, Pancake as a DEX could have even more trading functions than Binance's main platform. And Brevis, pushing various hooks, would become the number one hero of the Pancake Infinity era. Looking forward to the new era of hooks.



Original Post Link


Welcome to join the official BlockBeats community:

Telegram Subscription Group: https://t.me/theblockbeats

Telegram Discussion Group: https://t.me/BlockBeats_App

Official Twitter Account: https://twitter.com/BlockBeatsAsia

This platform has fully integrated the Farcaster protocol. If you have a Farcaster account, you canLogin to comment
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit