Uniswap V2 Offers Better Price Feeds and Doubles Down on Flash Loan Concept

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 recent decentralized finance (DeFi) hacks.

The update’s release is tentatively scheduled for Q2 2020, though Uniswap’s blog post stresses that it is “not an announced release date.”

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 always the base currency.

Uniswap V2 will allow direct token-to-token swaps, which is especially useful for swapping one U.S. dollar stablecoin for another. While this can be done right now by 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-back exploits conducted on the bZx platform. One of the reasons why the second hack was possible was bZx relying on Uniswap and Kyber as price oracles — despite their relatively low liquidity.

Uniswap V2 attempts to partially fix this issue by creating a time-averaged price feed. In order to influence the price values relayed by the platform, the attacker would need to affect at least two blocks in direct succession.

This design is said to prevent attacks based on flash loans, according to Vitalik Buterin, as the flash-lent funds can only exist for one block. Taking the time average of the prices also makes the protocol more resistant to any kind of manipulation in general.

Adding flash funding of its own

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

The swap allows users to withdraw an…

Source Link