The Uniswap decentralized exchange announced on March 23 a planned release of its second major version, Uniswap V2. Among the major features, the new platform will feature flash swaps — a similar feature to the infamous flash loans that some blame for contempo decentralized finance (DeFi) hacks.

The update'south release is tentatively scheduled for Q2 2022, though Uniswap's blog postal service stresses that it is "non an announced release engagement."

Uniswap is a decentralized cryptocurrency exchange platform that offers similar functionality to ShapeShift or Bancor. Unlike traditional decentralized exchanges, there is no order book. Trades rely on asset pairs where Ether (ETH) is ever the base currency.

Uniswap V2 will allow directly token-to-token swaps, which is especially useful for swapping i U.S. dollar stablecoin for another. While this can be done right now past routing through ETH, a direct exchange reduces losses from fees and slippage.

Preventing DeFi oracle bugs

Uniswap was at the center of two back-to-dorsum exploits conducted on the bZx platform. One of the reasons why the second hack was possible was bZx relying on Uniswap and Kyber as cost oracles — despite their relatively low liquidity.

Uniswap V2 attempts to partially set this event past creating a fourth dimension-averaged cost feed. In order to influence the price values relayed by the platform, the attacker would need to affect at to the lowest degree two blocks in straight succession.

This blueprint is said to foreclose attacks based on flash loans, according to Vitalik Buterin, every bit the flash-lent funds can only be for one block. Taking the fourth dimension average of the prices also makes the protocol more resistant to any kind of manipulation in general.

Calculation flash funding of its own

Flash loans were generally blamed for the hacks, despite the fact that many commentators pointed to disquisitional vulnerabilities in bZx software. Despite their bad reputation, Uniswap V2 will feature a funding characteristic dubbed flash bandy.

The swap allows users to withdraw an unlimited amount of ERC-20 tokens from a liquidity pool, provided that in the same block, either the tokens or their ETH equivalent are returned.

The feature would allow capital letter-less DeFi arbitrage — where traders play on the price difference of the same asset between diverse platforms. It could besides make acquiring leverage through Maker (MKR) more efficient.

The lending platform is currently used by some traders to enter leveraged Ether positions by recursively purchasing ETH with the Dai (DAI) minted by the system.

With the wink swap, the desired leverage can exist reached by but borrowing ETH from Uniswap and returning it as DAI from Maker. While it simplifies the process, it does not brand it adventure-gratis as Maker suffered unfair liquidations recently.