Uniswap

Activity

Stars and mentions · Last 30 days, Oct 5 – Nov 3

GitHub stars76
Mentions12
09182736Oct 5Oct 19Nov 3
UTC days · repositories Uniswap owns6 repositories

Top repositories

Uniswap’s repositories ranked by new stars, as on trending.

Loading

Contributes to

Repositories outside Uniswap’s account where Uniswap opened or reviewed pull requests in the past 365 days.

Who noticed Uniswap

Everyone who starred or forked Uniswap’s repositories since the archive began in 2011.

Notable accounts

Ordered by the stars their own repositories have received.

Biggest fans

Accounts that starred the most of these repositories.

Breakout weeks

Each repository’s best week of new stars, with the release published around it.

Mentions

11posts
Nov 40 posts
  1. Uniswap v4 Hooks Explained — And What We Built for OnChain Revenue Sharing Uniswap v4 introduced one of the most significant architectural changes in DeFi: hooks. If you've heard the term but aren't sure what it means in practice, this post breaks it down — and shows a real hook we built and got merged into the official Uniswap hook registry. What Are Uniswap v4 Hooks? In previous versions of Uniswap, the protocol was essentially closed. You could create pools, add liquidity, and swap tokens, but you couldn't customize what happened during those operations. The logic was fixed. V4 changes that with hooks — external smart contracts that "hook into" the lifecycle of pool operations. Think of them like middleware for a DEX. Every major pool action in v4 has a before and after stage: - beforeSwap / afterSwap — runs before or after a token swap - beforeAddLiquidity / afterAddLiquidity — runs when liquidity is added - beforeRemoveLiquidity / afterRemoveLiquidity — runs when liquidity is removed - beforeInitialize / afterInitialize — runs when a pool is first created When a pool is created, the pool creator specifies a hook contract address. From that point on, every operation on that pool calls the relevant hook functions. The hook can run custom logic, modify behavior, collect fees, enforce rules — whatever the contract is designed to do. The key insight: hooks don't modify the Uniswap core protocol. They're external contracts that the protocol calls at defined points. This means anyone can write a hook, and pool creators choose which hook (if any) to attach to their pool. Why Hooks Matter Before v4, if you wanted custom behavior on a DEX — say, distributing a portion of swap fees to a list of stakeholders — you had two options: fork the entire protocol, or build a wrapper contract that interacted with the pool externally. Both were messy. Hooks make this native. Some real use cases: - Dynamic fees — adjust swap fees based on volatility, time of day, or pool utilization - On-chain limit orders — execute trades when price hits a target - TWAP (time-weighted average price) orders — spread large trades over time - Custom access control — restrict who can trade in a pool (KYC pools, DAO-gated pools) - Revenue distribution — automatically route a share of pool activity to stakeholders That last one is what we built. BatchDistributeHook: What It Does Our hook lets pool operators push-distribute ERC-20 tokens or native currency (ETH) to up to 200 recipients in a single transaction through the Spraay batch contract on Base. The use case: a pool generates fees or revenue, and the operator wants to distribute those funds to a list of stakeholders — liquidity providers, DAO members, team wallets, community funds, whatever the arrangement is. Without a hook, the operator would need to manually collect fees, calculate shares, and send individual transactions to each recipient. With BatchDistributeHook, they call the distribution function and the Spraay batch contract handles the rest: one on-chain transaction, all recipients paid, all amounts verifiable. The hook interacts with Spraay's batch contract on Base at 0xb9c1ab7bd023c784c19b8e9f10ce9cded9ff9010. This is the same contract that powers all of Spraay's batch payment infrastructure — the same one our e-commerce plugins, robot fleet payments, and gateway all settle through. How It Works The flow is straightforward: 1. A pool is created with BatchDistributeHook as its hook contract 2. The pool operates normally — swaps, liquidity, everything works as expected 3. When the operator wants to distribute accumulated tokens, they call the hook's distribute function 4. The hook approves the Spraay batch contract to spend the specified token amount 5. The batch contract executes a single transaction that transfers tokens to all recipients 6. Each recipient's share is settled on-chain, verifiable by anyone The operator defines the recipient list and amounts. The hook handles the approval and contract interaction. The batch contract handles the multi-send efficiently. Up to 200 recipients per batch means this scales to meaningful distribution sizes without needing multiple transactions. Merged Into the Uniswap Hook Registry Uniswap maintains an official hook registry — a curated list of hooks that developers have built for the v4 ecosystem. Getting listed means the hook has been reviewed and meets the registry's standards. Our BatchDistributeHook was merged into the Uniswap hooklist as PR #10617 in October 2026, listed as "Add BatchDistributeHook hook on base." It's now part of the official v4 hook ecosystem. This matters because it puts Spraay's batch payment infrastructure directly into the Uniswap developer surface. Anyone browsing the hook registry looking for distribution solutions finds our hook, and through it, the batch contract that powers the rest of our protocol. The Bigger Picture Hooks are still early. Most v4 pools are running without hooks, and the ecosystem of available hooks is still growing. But the architecture is powerful: it turns Uniswap from a fixed protocol into a programmable platform. For us, BatchDistributeHook is a proof point. The same batch contract that settles robot fleet payments and e-commerce vendor payouts can also settle DeFi revenue distribution — all through one on-chain primitive. That's the advantage of building infrastructure instead of applications: the same settlement layer works across use cases. If you're building on Uniswap v4 and need batch distribution, the hook is on the registry. If you're building anything that needs to pay multiple recipients on Base in one transaction, the Spraay batch contract is open and documented. --- Spraay Protocol is multi-chain batch payment infrastructure built by Plagtech. BatchDistributeHook is listed on the Uniswap v4 hook registry. Learn more at spraay.app.

  2. @0x94305 @0xmons Is this the surprising part? github.com/Uniswap/v4-hooks-public/blob/main/docs…

    2 likes · 59 views
  3. @Avenoxai DeFi zaten opensource bro kimseden korkusu yok adamların aave/aave-v4 Uniswap/v4-core

    2 likes · 42 views
  4. clz - opcode to return number of leading 0s in a bit Before clz Binary search to find most and least significant bits With clz msb = 255 - clz(x) lsb = 255 - clz(x & -x) What's x & -x? See code comment Code github.com/t4sk/notes/blob/main/foundry/src/Bit.s… Binary examples github.com/Uniswap/v3-core/blob/main/contracts/li… t.co

    4 likes · 767 views
  5. If you are building on top of Uniswap Must see github.com/Uniswap/v4-core/blob/main/src/librarie…

    6 likes · 1 repost · 280 views
  6. $STONKCOIN dev update ▲ what got done: ▲ Uniswap reviewed and merged our StockHook into their official hook registry: fixed fees, not upgradeable, open to every swapper hooklist#10528 ▲ the "impersonator" wallet warning is gone from Uniswap and MetaMask ▲ DexScreener token info verified ▲ in review: routing in the Uniswap app. until then trade in the game's Trade tab or on KyberSwap the network: ▲ 104 players, hashrate up from 113 to 146 KH/s in a day ▲ 216,000 $STONKCOIN mined a day, halving in 41 days ▲ 497,100 $STONKCOIN burned so far ▲ 3.59 $NVDA paid to holders. stake $STONKCOIN in nodes to boost your share up to +50% play: stonkcoin.tech CA: 0xA37d551f2a768aF49ec5a1df68eFBFaC91971bD3

    11 likes · 5 reposts · 598 views

Achievements

Awards earned by the repositories Uniswap owns. Select an award to embed its badge.

No awards yet

Repositories earn awards by reaching the top three in a completed trending day or week.

A repository earns an award for finishing first, second or third in a completed trending day or week, ranked by new stars, new forks or pull request authors. Awards follow a repository through renames and transfers and count toward its current owner. Weeks run Monday to Sunday, UTC.