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

Published at: March 24, 2020

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 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-less DeFi arbitrage — where traders play on the price difference of the same asset between various platforms. It could also 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 flash swap, the desired leverage can be reached by simply borrowing ETH from Uniswap and returning it as DAI from Maker. While it simplifies the process, it does not make it risk-free as Maker suffered unfair liquidations recently.

Tags
Related Posts
Crypto options are turning mainstream
Despite ongoing vaccination efforts and pandemic aid, the world’s economy looks remarkably different than it did over a year ago. The new financial landscape and continued uncertainty have accelerated the shift away from traditional financial institutions. As the economy attempts to roar into high gear from a standing start, the world of cryptocurrency has taken to the main stage. It has cemented itself as a recognized asset class by major asset managers, investment banks and hedge funds. As the speed of mainstream adoption continues to take the financial world by storm, it is also paving the way for investors to …
Technology / July 10, 2021
Limit order protocols offer more flexibility and efficiency to DEX traders
As decentralized exchanges (DEXs) evolve, their functionalities become more and more advanced, often matching those of centralized exchanges (CEXs). One such functionality is the ability to place limit orders, which offers more flexibility and efficiency to DEX traders. This article looks at the existing limit order features and their prospective implementations. Unlike a market order, which is executed immediately at the last market price with potential slippage, a limit order is executed at a predefined price as soon as it is reached. Market orders are used by default in all automated market maker-based DEXs. They are simple and straightforward for …
Decentralization / Nov. 13, 2021
OKEx shared insights on trading, regulation, DeFi and more during recent Markets Pro AMA
Founded in 2017, OKEx is a centralized cryptocurrency exchange based in Seychelles. According to CoinGecko, OKEx is the world's third-largest cryptocurrency brokerage, with nearly $12 billion in trading volume within the past 24 hours. The exchange lists 312 coins and 518 cryptocurrency trading pairs. It's often difficult for new cryptocurrency enthusiasts to navigate the complex world of trading and finance. OKEx seeks to bring such sophisticated trading methods to everyday users' disposal by building simple user interface. During an exclusive ask me anything, or AMA, session with Cointelegraph Markets Pro Users, OKEx staff discussed trading tools, financial regulation, the OKExChain …
Adoption / Nov. 26, 2021
Industry experts weigh in on SEC hiring more crypto cops
The United States Securities and Exchange Commission (SEC) is seeking to hire more people to focus on digital assets, raising the number of personnel charged with safeguarding investors in cryptocurrency markets almost twofold. The SEC's Cyber Unit, which comprises the Crypto Assets and Cyber team, is expected to hire 20 new people to increase the overall force to 50 dedicated positions, as reported by Cointelegraph on May 3. This development comes as the regulatory body attempts to keep up with the rise in the popularity of virtual assets. The SEC's decision to expand its cryptocurrency unit has been praised by …
Adoption / May 11, 2022
BREAKING: Curve Finance team warns users to avoid using site until further notice
On Aug 9, automated market maker Curve Finance took to Twitter to warn users of an ongoing exploit on its site. The team behind the protocol noted that the issue, which appears to be an attack from a malicious actor, is affecting the service’s nameserver and frontend. Don't use https://t.co/vOeMYOTq0l site - nameserver is compromised. Investigation is ongoing: likely the NS itself has a problem — Curve Finance (@CurveFinance) August 9, 2022 Curve stated via Twitter that its exchange — which is a separate product — appeared to be unaffected by the attack, as it uses a different DNS provider. …
Decentralization / Aug. 9, 2022