In this paper, we explore common oracle-related attacks, as well as the cost and profit potential associated with them. We focus specifically on TWAP oracles. We conclude with an initial framework for safely setting TWAP oracle parameters.
Oracles represent critical infrastructure for DeFi. They often lie at the heart of different DeFi protocols and are a key component to their safety model. As such, they represent an important attack vector and are in fact a common target for SC attacks.
As such, the importance of studying how they work and, in particular, how they can be attacked cannot be overstated.
In this paper, we focus on two particular attacks related to lending protocols:
1. The first one is the case where the attacker manipulates the oracle to artificially increase the value of his/her collateral in order to borrow more than the protocol would allow under normal circumstances.
2. The second one is the case where an attacker manipulates the oracle to artificially decrease the value of a user's collateral in order to liquidate the given user and earn the corresponding liquidation fee.
As was said before, we analyze the cost and profit potential of both these types of attack on Constant Product Market Maker based TWAP oracles.
Our results show that under certain conditions these oracles are safe to use (i.e. cost of attack > potential profit).
We conclude with an initial framework for setting the TWAP window.
This framework intends to strike a balance between safety and price accuracy (the window tradeoff).
We're very excited to finally share this with the community!
This research paper was done by our very own @ayana_eltai and @JonathanErlichL. Please hit them up if you have any questions or feedback!
• • •
Missing some Tweet in this thread? You can try to
force a refresh
In today’s Delphi Daily, we analyzed net miner positions, @Uniswap gaining market share the battle between @geniexyz and @gemxyz, and MEV profits slowing down.
For more 🧵👇
1/ In May 2021, when V3 was released, @Uniswap began to eat into @CurveFinance’s market share.
Due to the comparable price execution in V3 alongside an undercutting in fees, Uniswap has been able to match Curve’s volumes in stableswaps, turning this into a nearly 50/50 market.
2/ @geniexyz and @gemxyz are two NFT aggregator platforms making it easy to shop across a number of NFT marketplaces. Both make it easy to bulk purchase NFTs in a single transaction.
Gem’s superior fee execution consistently amounts to 30-40% less in gas fees relative to Genie.
In today’s Delphi Daily, we examined #bitcoin breaking through key resistance levels and TVL of L2s and options protocols.
For more 🧵👇
1/ Over the weekend, Bitcoin rallied through the $38.5k and $39-$41k resistance levels we had been watching.
The 2022 yearly VWAP (pictured above in white) was acting as a key resistance level. With Bitcoin now trading around $42.5K, the VWAP was breached convincingly on Friday.
2/ TVL on L2s has risen back to levels seen at the beginning of the year (~$6bn)
This growth is driven primarily by @Aribtrum and @MetisDAO.
Among the seven largest L2s by TVL, only Arbitrum (+19% YTD) and Metis (+94% YTD) have seen positive growth in 2022.
0/ Should we be worried about the composition of DAI’s collateralization?
In today’s Delphi Daily, we examined DAI’s reserves, USDC’s continued growth, bearish BTC option traders, and @boredapeYC’s floor continues to rise.
For more 🧵👇
1/ USDC has grown massively over the past year, recently crossing $50B in supply.
USDT is still the market cap leader, although its growth has slowed down compared to USDC since May 2021.
The USDC/USDT supply ratio has grown from 0.2 to 0.64 over the past year.
2/ DAI, a crypto-collateralized stablecoin by @MakerDAO, has seen its asset weightage shift towards stablecoins.
Many criticized DAI for being backed by 60% stablecoins, as it means that DAI is also exposed to the same centralization and regulatory risks of the stablecoins.