Releases: OpenZeppelin/uniswap-hooks
v1.2.1
Hardhat support
- Add npm dependencies for hardhat support
v1.2.0
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
v1.2.0-rc.1
Update docs
v1.2.0-rc.0
Release v1.2.0-rc.0
v1.1.0
Base
BaseAsyncSwap: Add interfaceIHookEventsto the contract in order to standardize event emissions in hooks. Add_calculateSwapFeefunction to calculate the swap fee amount in an asynchronous swap. (#47)BaseCustomAccounting: Add interfaceIHookEventsto the contract in order to standardize event emissions in hooks (#47).BaseCustomCurve: Add function_getSwapFeeAmountto calculate the amount of fees paid to LPs. (#47)BaseHook: Update imports fromv4-core(#66)
Fee
BaseDynamicAfterFee: Add interfaceIHookEventsto the contract in order to standardize event emissions in hooks (#47). Add functions_transientTargetUnspecifiedAmount,_transientApplyTarget,_setTransientTargetUnspecifiedAmountand_setTransientApplyTargetto handle the target unspecified and the apply flag using transient storage. Rename_getTargetOutputto_getTargetUnspecifiedand handle both exact input and exact output cases for targets. (#86)BaseDynamicFee: Update imports fromv4-core(#66)BaseOverrideFee: Update imports fromv4-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_afterRemoveLiquidityand disables it during_afterAddLiquidityif 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 useSafeERC20(#49)
v1.1.0-rc.2
Update docs
v1.1.0-rc.1
Update docs
v1.1.0-rc.0
Improvements on LimitOrderHook (#58) Documentations updates and namespace aligment following #51.
v1.0.0
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.