Kointax.ioKointax.io

Uniswap v4 Hooks: taxation of custom pools in Spain

Uniswap v4 introduces Hooks: code snippets that anyone can add to create pools with custom behaviors (dynamic fees, limit orders, integrated yield). New tax scenarios for LPs.

Equipo declaracrypto·April 25, 2026·6 min read

Uniswap v4 Hooks: how custom pools are taxed in Spain

Uniswap v4 was released in 2025 and represents a leap in the protocol's architecture: instead of standard pools, any developer can now create hooks (code extensions) that modify the behavior of a liquidity pool. This creates new possibilities and new tax scenarios.

What are Uniswap v4 Hooks?

Hooks are smart contracts that are executed at specific times in the lifecycle of a pool:

  • Before or after someone makes a swap.
  • Before or after someone adds or withdraws liquidity.
  • At the time of pool initialization.

Examples of popular hooks:

  • Limit orders: the LP specifies that it wants to buy at a certain price and the hook executes automatically.
  • TWAMM (Time Weighted AMM): divides large orders into many small ones over time.
  • Dynamic fees: fees change according to market volatility.
  • Auto-compounding: pool fees are automatically reinvested.
  • KYC/whitelist: only approved wallets can use the pool.

Key change vs v3: the Singleton and ERC-6909

In v4, all pools are in a single Singleton contract. LP balances are managed using ERC-6909 (a multi-asset token standard).

Tax Implication: LP position may no longer be an NFT (as in v3); may be an ERC-6909 fungible token. This simplifies the positions but can change the nature of the asset.

LP taxation in pools with Hooks

Auto-rollover hooks (auto-compounding)

If the hook automatically reinvests the pool fees into the position:

  • The LP does not make an explicit "claim" for the fees → there is no periodic distribution.
  • The value of the position grows implicitly.
  • Taxation: When withdrawing liquidity → the difference between the value withdrawn and the cost of the assets deposited (including reinvested fees) = total profit.
  • Possible treatment as implicit accumulation (similar to accumulation investment funds).

Hooks with limit orders

If a hook automatically executes an ETH purchase when USDC reaches a certain price:

  • The hook executes the swap automatically: transmission of USDC for ETH.
  • Even if you have not interacted manually, there is a taxable event at the time of execution.
  • The date of the taxable event is the date of execution of the hook.

Tax issue: The investor may not know exactly when the limit order was executed if they do not actively monitor.

TWAMM Hooks

The TWAMM divides a large order into micro-orders over time:

  • Example: you want to sell 100 ETH in 30 days → ~3.33 ETH/day is executed automatically.
  • Each micro-execution is technically a taxable event.
  • However, for practical purposes, it could be argued that it is a single deferred operation.

No DGT criteria: The conservative position is that each micro-execution is a taxable event. The most flexible stance might consider the entire operation as a single event.

Hooks with dynamic fees

If the pool fees vary according to volatility:

  • In periods of high volatility, LPs receive more fees.
  • The taxation of fees remains the same: movable capital when they are distributed.

How to identify which hook a pool uses?

Before entering a Uniswap v4 pool, check:

  • The address of the hook contract (identifiable in the browser).
  • The pool documentation (many projects publish the hooks they use).
  • The Uniswap v4 interface can indicate if there are special hooks.

This is important because auto-compounding or TWAMM hooks change the timing of taxable events.

The novelty of "flash accounting" (flash accounts)

Uniswap v4 also introduces flash accounting: token transfers are optimized at the end of a complex transaction (netting is done).

Fiscal: For the user, the net result of the transaction is what matters, not the intermediate internal movements of the singleton. If X tokens enter and Y tokens exit → it is an exchange of X for Y.

The Singleton and the implications of gas

With v4, the gas for complex operations drops significantly (fewer separate contracts). The gas fees paid (in ETH) continue to be the highest acquisition cost of the asset received.

Summary

Uniswap v4 hooks do not change the basic principle ("each swap is a transmission", "fees are return on equity"), but create scenarios where:

  1. Transmissions occur automatically (limit orders, TWAMM).
  2. Fees are accumulated implicitly (auto-compounding).
  3. The timing of the taxable event may be uncertain if there is no active monitoring.

Recommendation: Monitor positions actively and use tracking tools that support Uniswap v4.

Updated: April 2026 | Fiscal year: 2025

Ready to calculate your crypto taxes?

declaracrypto.es — FIFO, LIFO, HIFO or WAC method. 80+ compatible exchanges. Excel + PDF report ready for your tax return.

Start free — no card needed