Uniswap V4
I have found the information, we will have to test it, it sounds good, I leave it here in case you are interested
Uniswap V4 is the latest version of the decentralized exchange protocol Uniswap, introducing significant improvements compared to its predecessor, V3. Below are the main differences and similarities between both versions.
Key differences between Uniswap V4 and V3:
Singleton Design:
V3: Each trading pair had its own independent smart contract, which increased transaction costs due to the need to interact with multiple contracts.
V4: A single contract called "PoolManager" is implemented, which manages all trading pairs. This unified design significantly reduces gas fees and improves operational efficiency.
Customizable Hooks:
V3: The protocol logic was fixed, limiting the customization capabilities for developers.
V4: Introduces "hooks" that allow developers to add custom rules to trading operations, such as automatic fee adjustments and dynamic liquidity management.
Flash Accounting System:
V3: Required multiple token transfers during a transaction, which increased gas costs.
V4: Utilizes a flash accounting system that performs a single token transfer at the end of the transaction, thereby optimizing gas usage and reducing costs.
Dynamic Fees:
V3: Fees were fixed and predefined, with no possibility of adjustment according to market conditions.
V4: Allows fees to be dynamically adjusted based on volatility and other market factors, benefiting both liquidity providers and traders.
Similarities between Uniswap V4 and V3:
Concentrated Liquidity: Both versions maintain the concept of concentrated liquidity, allowing liquidity providers to allocate funds to specific price ranges to maximize capital efficiency.