Skip to content

Releases: OpenZeppelin/uniswap-hooks

v1.2.1

27 Nov 18:13

Choose a tag to compare

v1.2.1 Pre-release
Pre-release

Hardhat support

  • Add npm dependencies for hardhat support

v1.2.0

27 Nov 17:55

Choose a tag to compare

v1.2.0 Pre-release
Pre-release

Base

BaseHook: Deprecate onlySelf and onlyValidPools modifiers to improve extensibility and simplify hook implementation patterns. (#105)

Fee

BaseFeeHook: Add fee hook implementation to enable custom fee logic in derived contracts. (#65)

BaseDynamicFee: Refactor dynamic fee calculation to support more flexible fee structures and improve gas efficiency. (#105)

General

RehypothecationHook: Implementation of a rehypothecation mechanism allowing collateral reuse within liquidity pools. Hook enables efficient capital utilization while maintaining proper accounting. (#84)

Oracles

PanopticOracle: Add Panoptic-style oracle implementations for improved price data aggregation and manipulation resistance in hook contexts. (#99)

Development

  • Add balance delta assertions to improve test coverage and validation of state changes during hook execution. (#100)
  • Refactor magic values across test suite for better maintainability and readability. (#106)
  • Add Solhint linting with pre-commit hooks for code quality enforcement. (#69)
  • Apply Solhint rule fixes across codebase. (#95)
  • Update Solhint configuration and disable no-unused-vars for function parameters. (#102)
  • Update CI/CD workflows and dependency versions. (#94)
  • Update remappings and bump Solidity pragma to 0.8.26. (#98)
  • Address Slither static analysis detections. (#103)
  • Update vulnerable dependencies (cookie, tmp). (#107)
  • Fix documentation publishing workflow to avoid errors with no changes. (#108)
  • Update git submodules to latest versions. (#109)
  • Bump library version to 1.2.0. (#104)

v1.1.1

27 Nov 21:12

Choose a tag to compare

Hardhat support

  • Add npm dependencies for hardhat support

v1.2.0-rc.1

27 Oct 23:56

Choose a tag to compare

v1.2.0-rc.1 Pre-release
Pre-release
Update docs

v1.2.0-rc.0

23 Oct 19:52

Choose a tag to compare

v1.2.0-rc.0 Pre-release
Pre-release
Release v1.2.0-rc.0

v1.1.0

11 Jul 21:41
e59fe72

Choose a tag to compare

Base

  • BaseAsyncSwap: Add interface IHookEvents to the contract in order to standardize event emissions in hooks. Add _calculateSwapFee function to calculate the swap fee amount in an asynchronous swap. (#47)
  • BaseCustomAccounting: Add interface IHookEvents to the contract in order to standardize event emissions in hooks (#47).
  • BaseCustomCurve: Add function _getSwapFeeAmount to calculate the amount of fees paid to LPs. (#47)
  • BaseHook: Update imports from v4-core (#66)

Fee

  • BaseDynamicAfterFee: Add interface IHookEvents to the contract in order to standardize event emissions in hooks (#47). Add functions _transientTargetUnspecifiedAmount, _transientApplyTarget, _setTransientTargetUnspecifiedAmount and _setTransientApplyTarget to handle the target unspecified and the apply flag using transient storage. Rename _getTargetOutput to _getTargetUnspecified and handle both exact input and exact output cases for targets. (#86)
  • BaseDynamicFee: Update imports from v4-core (#66)
  • BaseOverrideFee: Update imports from v4-core (#66)

General

  • AntiSandwichHook: Implementation of a sandwich-resistant pool using hooks. Specifically, it guarantees that no swaps get filled at a price better than the price at the beginning of the block. (#80)
  • LimitOrderHook: Hook to enable limit order placing on liquidity pools. The orders are placed as out-of-range liquidity increases. The hook allows for cancelling orders and withdrawing tokens after the orders are fulfilled. (#77)
  • LiquidityPenaltyHook: Hook that provides Just-in-time protection to pools. It penalizes LP fee collection during _afterRemoveLiquidity and disables it during _afterAddLiquidity if liquidity was recently added to the position. (#67)

Interfaces

  • IHookEvents: Interface created in order to standardize event emissions in hooks (#47)

Utilities

  • CurrencySettler: Update to use SafeERC20 (#49)

v1.1.0-rc.2

17 Jun 03:19

Choose a tag to compare

v1.1.0-rc.2 Pre-release
Pre-release
Update docs

v1.1.0-rc.1

13 May 14:04

Choose a tag to compare

v1.1.0-rc.1 Pre-release
Pre-release
Update docs

v1.1.0-rc.0

28 Apr 14:03
9d1d623

Choose a tag to compare

v1.1.0-rc.0 Pre-release
Pre-release
Improvements on LimitOrderHook (#58)

Documentations updates and namespace aligment following #51.

v1.0.0

24 Feb 23:04

Choose a tag to compare

Base

Base contracts for building secure and modular Uniswap hooks, providing core functionality and common patterns for hook development.

  • BaseCustomAccounting: Base hook implementation for custom accounting, including support for swaps and liquidity management.
  • BaseCustomCurve: Base hook implementation for custom curves.
  • BaseHook: Base implementation for hooks.
  • BaseAsyncSwap: Base hook implementation for asynchronous swaps.

Fee

Hooks for managing and customizing pool fees, including dynamic fee adjustments, fee overrides, and post-swap fee calculations.

  • BaseDynamicFee: Hook to apply a manual dynamic fee via the Uniswap PoolManager contract.
  • BaseOverrideFee: Hook that overrides and applies a fee before swapping automatically.
  • BaseDynamicAfterFee: Hook that applies a fee based on a delta after swapping.

Utilities

Libraries and general purpose utilities to help develop hooks.

  • CurrencySettler: Library used to interact with the PoolManager to settle any open deltas, with support for ERC-6909 and native currencies.