Invest
June 13, 2023 10:15 p.m
Last updated: Jun 14, 2023 at 11:05 am
Uniswap CEO Hayden Adams published the draft technical white paper for Uniswap v4 on Tuesday. As the inventor and main developer of Uniswap, Adams introduced several improvements that build on Uniswap v3’s liquidity adjustment.
Namely, the Uniswap v4 “hooks” and a “flash accounting” system for the new singleton contract architecture. The latest open-source release is being hailed as an entirely new protocol that will coexist with v3, leaving it up to developers to decide which features to adopt.
What does this mean for Uniswap’s liquidity providers given its dominant 72% market share among decentralized exchanges (DEXes)?
The role of hooks in liquidity pools
Instead of relying on traditional order books, DEXes like Uniswap rely on liquidity pools. These smart contracts track the balances of token pairs like USDT/ETH for swaps. Users act as Liquidity Providers (LPs) to populate these pools with deposits.
Traders then empty liquidity pools when they need a token exchange and pay fees to the LPs based on the amount of liquidity provided. With v4, Uniswap introduces plugins called “Hooks”. Your goal is to adjust the relationship between LP positions, fees and swaps.
So far, Adams has published four hooks examples to show what’s possible:
- Bespoke on-chain oracles as token price feeding mechanisms allowing liquidity pools to act as oracles. This could apply to the Geomean version 3 oracles, where “Geomean” refers to the geometric mean – the average price of an asset over a given period of time.
- On-Chain Limit Orders.
- Time-Weighted Average Market Maker (TWAMM) is a new breed of automated market maker (AMM) that splits long-term orders into infinitesimal virtual orders. This allows large orders to be completed without falling victim to sandwich attacks.
- Dynamic fees based on volatility oracles. For example, it would be possible to earn LP fees for trading and withdrawing liquidity by granting these permissions to hook contracts.
Other potential hook novelties include auto-composite LP charges that provide feedback on LP positions. Likewise, internalized MEV (Maximum Extractable Value) gains are paid back to LPs. Essentially, Uniswap v4 hooks allow dApp developers to externally deploy contracts that execute custom logic in the liquidity pool lifecycle.
Adams predicts that many hook designs “will be as complex as the protocols themselves.”
Singleton architecture and Flash accounting
While hooks extend the customizability of Uniswap v4, the newly introduced singleton design allows the liquidity pool to be managed with a single contract. This makes pool provisioning 99% cheaper. The singleton architecture goes hand in hand with Flash accounting.
Flash accounting simplifies more complex liquidity pool executions, such as B. Atomic swapping or adding liquidity. Previously, such operations ended with token transfers in and out of pools on each exchange. In contrast, Flash Accounting in version 4 updates the internal net balance (delta) of the pool.
“It’s basically just a new cool way of balance accounting and making sure the pool balance and user balance is safe.”
Uniswap Labs smart contract engineer Sara Reynolds at The Block
Therefore, external transfers only occur at the end of the token pair lock via the transient storage specified in EIP-1153. For singleton contracts, flash accounting saves on gas fees by reducing liquidity fragmentation costs. These savings are necessary because hooks will “significantly increase the number of pools.”
Native ETH support and ERC1155 accounting
The Ethereum blockchain is the main host of Uniswap, so DEX relies on Ethereum’s smart contract standard, such as ERC-20. Although Ether (ETH) is Ethereum’s native cryptocurrency, it is not an ERC-20 token. The Uniswap v4 upgrade brings back native ETH in token swaps from Uniswap v1.
In version 2, such a feature was removed due to concerns about liquidity fragmentation when trading Wrapped Ether (WETH). However, as singleton architecture and flash accounting reduce the impact of liquidity fragmentation, native ETH support is back. This is significant as native ETH transfers cost half as much as ERC-20 token transfers.
Finally, v4’s singleton architecture will support minting and burning of ERC-1155 tokens. Enjin, a Singapore-based blockchain company, has developed this new token standard for creating fungible (altcoins) and non-fungible assets known as NFTs. As with flash accounting, this allows users to avoid costly ERC-20 transfers in and out of liquidity pools, bringing additional efficiencies to high-frequency swappers or LPs.
This article originally appeared on The Tokenist
Sponsored: Investing Tips
A financial advisor can help you understand the ins and outs of investment property. Finding a qualified financial advisor doesn’t have to be difficult. SmartAsset’s free tool puts you in touch with up to three financial advisors based in your area, and you can interview the right advisors for free to decide which one is right for you. If you’re ready to find an advisor who can help you achieve your financial goals, get started now.
Investing in real estate can diversify your portfolio. But expanding your horizons can come with additional costs. If you want to minimize costs as an investor, you should take a look at online brokerages. They often offer low investment fees, helping you maximize your profits.
Learn Crypto Trading, Yield Farms, Income strategies and more at CrytoAnswers
https://nov.link/cryptoanswers
Comments are closed.