diff --git a/public/blog-posts/a-mev-racing-story.md b/public/blog-posts/a-mev-racing-story.md index 37d8420b..2104b1f3 100644 --- a/public/blog-posts/a-mev-racing-story.md +++ b/public/blog-posts/a-mev-racing-story.md @@ -14,7 +14,7 @@ His vehicle is now a mangled wreck, and he is trapped inside, immobile. The spec You feel the crushing weight of your mortality bearing down on you. He was a racer, just like you. An individual who existed solely for the thrill of the competition. Yet, that very thrill has brought about his demise. -![https://images.unsplash.com/photo-1534307965816-94396c7de0d2?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb](https://images.unsplash.com/photo-1534307965816-94396c7de0d2?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb) +![](img/blog-posts/a-mev-racing-story/route.jpg) The Merge event in Ethereum has unleashed a host of dangers in the [Ethereum Dark Forest](https://www.paradigm.xyz/2020/08/ethereum-is-a-dark-forest). These beasts now roam the woods, waiting for unsuspecting victims to fall into their trap. The [recent attack](https://twitter.com/samczsun/status/1642848556590723075) on MEV bots was likely just the first of many such events, and we can expect more to come. @@ -32,7 +32,7 @@ To understand what led to the current situation, it is essential to comprehend t In summary, PBS distinguishes the two roles responsible for generating new blocks in the blockchain network: the Proposer and the Builder. One noteworthy aspect of this separation is the ability of validators to use Blind blocks. This technique enables validators to sign a block's header without viewing its contents, making the signature valid for the entire block once it is revealed. The [Flashbots MEV-Boost](https://ethresear.ch/t/mev-boost-merge-ready-flashbots-architecture/11177?u=benjaminion) design leverages this technique to provide a fair and efficient way for miners to extract value from the mempool. -![https://i.imgur.com/t7l5heX.png](https://i.imgur.com/t7l5heX.png) +![](img/blog-posts/a-mev-racing-story/graph-1.jpg) _How was the proposer able to view the content of the block if Flashbots relay uses Blind blocks?_ @@ -72,7 +72,7 @@ Although the recent patches have reduced the risk of attacks, it has not entirel 4. If attester majority is reached for the first block from the proposer, all transactions from the Flashbots block will be vulnerable for replaying, since they are not part of the chain. 5. The proposer modifies the Flashbots block, extracts value, and proposes the modified block on his consecutive slot. -![https://defi-wonderland.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fce431091-9995-4cab-8d93-0afcb83c3ec8%2FUntitled.png?id=640e3afd-ed74-4d77-90c5-c5a9ebf3e4c3&table=block&spaceId=7683bccd-1174-4689-a817-b27fd9d7ef00&width=1000&userId=&cache=v2](https://defi-wonderland.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fce431091-9995-4cab-8d93-0afcb83c3ec8%2FUntitled.png?id=640e3afd-ed74-4d77-90c5-c5a9ebf3e4c3&table=block&spaceId=7683bccd-1174-4689-a817-b27fd9d7ef00&width=1000&userId=&cache=v2) +![](img/blog-posts/a-mev-racing-story/meme.jpg) The chances of a malicious validator winning a race in the same block are “““low”””. However, multiblock attacks are a **very real and serious concern**. Validators from large validator pools, such as Coinbase, Binance, Lido, and Rocketpool, hold a significant portion of the validator power. There is a [high probability](https://alrevuelta.github.io/posts/ethereum-mev-multiblock) that stakers will propose multiple blocks in a row, and coordination among validators is also possible if the potential reward is significant. This was also one of the main reasons we built [PRICE](https://oracles.rip), an oracle that is able to detect and correct [TWAP multiblock manipulations](https://www.notion.so/Oracle-Manipulation-101-cbcea67b7796496995437907d3b1b4ba?pvs=21). @@ -102,7 +102,7 @@ Suppose the attacker paid an average price of **`pi`** (price of STG/WETH) for t [Amount in and out (bot) and reserves post swap (bot)](https://etherscan.io/tx/0xd2edf726fd3a7f179c1a93343e5c0c6ed13417837deb6fc61601d1ce9380e8dc#eventlog): -![https://defi-wonderland.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9ed3a5b3-4cbd-489a-96f2-cf5486128f3d%2FUntitled.png?id=b15aecbd-3a63-4086-a240-551a4b8bd62d&table=block&spaceId=7683bccd-1174-4689-a817-b27fd9d7ef00&width=1150&userId=&cache=v2](https://defi-wonderland.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9ed3a5b3-4cbd-489a-96f2-cf5486128f3d%2FUntitled.png?id=b15aecbd-3a63-4086-a240-551a4b8bd62d&table=block&spaceId=7683bccd-1174-4689-a817-b27fd9d7ef00&width=1150&userId=&cache=v2) +![](img/blog-posts/a-mev-racing-story/amount.jpg) We assume the pool was initially on equilibrium. If not, the attacker can profit even further. This means `pi=p0`. Notice `p0=ypre/xpre` (where `xpre` are the `reserve0` before the victim’s swap and `ypre` are the `reserve1` before the victim’s swap). We want to know now how much must the attacker input in order to bring the pool back to the initial price `pi`. The attacker will input STG (x) and output WETH (y) in the back-run transaction. Let’s use the constant product formula and find how much should the attacker input to bring the pool back to the initial price `pi`: @@ -136,7 +136,7 @@ def attack(x,y,xpre,ypre): The ideal parameters for the STG/WETH pool attack would have been to input approximately 4.53 STG and output around 2454.10 WETH, resulting in a profit of around 2454.09 WETH or around 4.7M USD at the current value. However, the attacker's actual input was larger and their return was slightly smaller due to fees. It is possible that the attacker had prepared this attack beforehand, as the difference between the ideal and actual parameters is small. -![https://defi-wonderland.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F34441066-c231-4d9b-94ed-f540a8dd1835%2FUntitled.png?id=1d7184c1-11af-4093-877d-1ae9a74601ec&table=block&spaceId=7683bccd-1174-4689-a817-b27fd9d7ef00&width=1600&userId=&cache=v2](https://defi-wonderland.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F34441066-c231-4d9b-94ed-f540a8dd1835%2FUntitled.png?id=1d7184c1-11af-4093-877d-1ae9a74601ec&table=block&spaceId=7683bccd-1174-4689-a817-b27fd9d7ef00&width=1600&userId=&cache=v2) +![](img/blog-posts/a-mev-racing-story/amount-2.jpg) You can play around and change the variables in the following colab file: diff --git a/public/blog-posts/liveness-2-and-beyond.md b/public/blog-posts/liveness-2-and-beyond.md index 3a4bcb37..b1c816fc 100644 --- a/public/blog-posts/liveness-2-and-beyond.md +++ b/public/blog-posts/liveness-2-and-beyond.md @@ -129,7 +129,7 @@ In [this blog post](https://vitalik.eth.limo/general/2023/06/20/deeperdive.html) Both zkSNARKs and KZG allow for proof aggregation, further reducing user costs. -![Untitled](img/blog-posts/liveness-2-and-beyond/graph-1.png) +![Untitled](img/blog-posts/liveness-2-and-beyond/graph-1.jpg) In what follows, we will focus on the existing approaches to tackle this verification step. Even though storage proofs (with or without zk) are the most secure method, we will also consider other options in our analysis. For each, we will analyze the tradeoffs, possibilities, costs and state of development. @@ -171,7 +171,7 @@ At the time of writing, they have deployed their contracts on mainnet only. A po Also, note that the current implementation consumes above [500k gas per query answer](https://etherscan.io/address/0xd617ab7f787adf64c2b5b920c251ea10cd35a952), even more than the current MPT implementations. Axiom has, of course, a lot of additional benefits, such as allowing queries to go back in time. -![Gas comparison for different proofs. Image taken from [Relic’s documentation](https://docs.relicprotocol.com/overview/comparison).](img/blog-posts/liveness-2-and-beyond/table-1.png) +![Gas comparison for different proofs. Image taken from [Relic’s documentation](https://docs.relicprotocol.com/overview/comparison).](img/blog-posts/liveness-2-and-beyond/table-1.jpg) Gas comparison for different proofs. Image taken from [Relic’s documentation](https://docs.relicprotocol.com/overview/comparison). diff --git a/public/blog-posts/oracle-manipulation-101-math-edition.md b/public/blog-posts/oracle-manipulation-101-math-edition.md index 3d0f5246..e7109608 100644 --- a/public/blog-posts/oracle-manipulation-101-math-edition.md +++ b/public/blog-posts/oracle-manipulation-101-math-edition.md @@ -22,7 +22,7 @@ $x*y=L^2 \hspace{1cm}(1)$ where $L$ is called Liquidity. This $L$ is modified only when someone adds or removes the token balance and is constant otherwise. -![https://i.imgur.com/zdwwOgV.png](https://i.imgur.com/zdwwOgV.png) +![img/blog-posts/oracle-manipulation-101-math/1.png](img/blog-posts/oracle-manipulation-101-math/1.png) Anyone can swap token A for token B or vice versa on this pool, modifying the balances $x$ and $y$ in the pool according to $(1)$. You can visualize this behaviour in the Figure ([source](https://medium.com/block-journal/uniswap-understanding-the-decentralised-ethereum-exchange-5ee5d7878996)). @@ -119,7 +119,7 @@ L_N,\quad p_N ℹ️ Given 2 numbers, $a_1$ and $a_2$: > Arithmetic mean: $\frac{a_1+a_2}{2}$ @@ -244,7 +244,7 @@ You can gain more by playing around at [this link](https://colab.research.google - Using longer TWAPs will make movements exponentially harder. - Moving the price over several blocks reduces the costs exponentially. -![https://i.imgur.com/sTVbO3c.png](https://i.imgur.com/sTVbO3c.png) +![img/blog-posts/oracle-manipulation-101-math/5.png](img/blog-posts/oracle-manipulation-101-math/5.png) > ℹ️ To manipulate a $TWAP$ to the desired price, an attacker needs to move the spot much more so that the average falls on target. The longer the $TWAP$ length $N$ is relative to the attack's $M$, the harder it is to manipulate. That is why longer $TWAPs$ are suggested for a safer query. > @@ -262,7 +262,7 @@ We will exclude trading fees for simplicity of reading, but you can trivially ad ## Math for Attack Scheme pre PoS -![https://i.imgur.com/D9UKvny.png](https://i.imgur.com/D9UKvny.png) +![img/blog-posts/oracle-manipulation-101-math/6.png](img/blog-posts/oracle-manipulation-101-math/6.png) The regular scheme for attacking a lending market is the following: @@ -306,7 +306,7 @@ $Profit = \Delta x_{out} - \Delta x_{in} = min[fP_fy(\frac{L\sqrt{P_f}-x}{L\sqrt You can play around simulating the arbitrage scenario in [this link](https://colab.research.google.com/drive/1RwpF-lKq968mvsyL0jgyw9rO_cTqYxPl?usp=sharing). You can see in the Figure below that the optimal attack in this scenario will correspond to using all capital from the manipulation to borrow up to the available reserves (no $\Delta y_{sell}$ left). It's possible to find this optimal price analytically as a function of the reserves, which LPs can use to define safe semi Full-Range positions. Notice this graph does not take TWAP into account and is only valid for markets which query the spot price. -![https://i.imgur.com/MepFPt3.png](https://i.imgur.com/MepFPt3.png) +![img/blog-posts/oracle-manipulation-101-math/7.png](img/blog-posts/oracle-manipulation-101-math/7.png) To include the $TWAP$ parameters in the analysis, we should compute the Cost of Manipulation $C_{manipulation}^*$ with the spot price added using Eq. $(3)$ while keeping the $TWAP$ price to obtain the stolen amount. We can also simulate this and check that manipulation cost increase radically to the point where single-block attacks are never profitable. Notice that the $TWAP$ is not an on-off switch and has different levels, which we can measure with the ratio $\frac{Length_{attack}}{Length_{TWAP}}\simeq \frac{M}{N}$, with $N$ the approximate number of blocks in the $TWAP$ and $M$ the number of blocks the manipulation lasted. @@ -322,13 +322,13 @@ Two main factors can endanger $TWAP$-based oracle liquidity: 1. Bad liquidity positions in Uniswap v3: as we mentioned, a pool is, in most cases, easier to manipulate when liquidity is concentrated rather than over the Full Range. Price manipulation costs zero over regions with no liquidity. -![https://i.imgur.com/g33Ssp5.png](https://i.imgur.com/g33Ssp5.png) +![img/blog-posts/oracle-manipulation-101-math/8.png](img/blog-posts/oracle-manipulation-101-math/8.png) 1. No liquidity in secondary markets: there is no way for arbitrage to close the trade effectively. As we mentioned, the absence of arbitrage makes manipulation back to the initial price possible (the attacker recovers capital used for price manipulation). It also unlocks multi-block attacks (requires less upfront capital). Both issues are typical for small projects. This is, for instance, what happened to the stablecoin FLOAT in Rari (see the FLOAT incident in Rari [here](https://etherscan.io/address/0xa2ce300cc17601fc660bac4eeb79bdd9ae61a0e5) and [here](https://www.defilatam.com/rekt/us-1-4-m-ataque-al-pool-90-de-rari-y-una-leccion-de-oracles-en-lending-para-aprendices)): liquidity was deployed only over the 1.16-1.74 USDC per FLOAT in Uniswap, which meant that manipulation cost was zero outside this range. As there was no liquidity in secondary markets, the attacker could wait for a few blocks and significantly impact the registered $TWAP$. Then, they proceeded to empty over $1M USD from the Pool 90 Fuse for only 10k FLOAT. -![https://i.imgur.com/0ggvoYl.jpg](https://i.imgur.com/0ggvoYl.jpg) +![img/blog-posts/oracle-manipulation-101-math/9.jpg](img/blog-posts/oracle-manipulation-101-math/9.jpg) > ⚠️ These attacks are the most common for small projects. Attacks in these contexts are hard to distinguish from rug pulls. A lending market can protect itself by reverting the borrowing if the difference between $TWAP$ and spot price is large, but as time passes, the $TWAP$ will get close, and basic checks will pass. Both users and lending markets should be aware of these risks when using or listing low-liquidity tokens. PRICE will include additional methods to mitigate this risk. @@ -336,7 +336,7 @@ Both issues are typical for small projects. This is, for instance, what happened After the Merge, big stakers have a [high chance](https://alrevuelta.github.io/posts/ethereum-mev-multiblock) of proposing multiple blocks in a row, which makes manipulation back to the initial price possible and significantly lowers the attack cost. It also makes TWAPs cheaper to move, as the attacker can maintain the manipulated price for longer. -![https://i.imgur.com/fqvGvDd.png](https://i.imgur.com/fqvGvDd.png) +![img/blog-posts/oracle-manipulation-101-math/10.jpg](img/blog-posts/oracle-manipulation-101-math/10.jpg) Suppose the validator has $n>2$ consecutive blocks. In that case, the attacker can manipulate over $n-1$ blocks to reduce the initial capital required. In the final block $n$, they can exercise partial manipulation back to the initial price (or near it). As we have shown in Eq. (1), the final spot price to manipulate a $TWAP$ becomes closer to the initial price as the number of proposed blocks increases ($M$ in the equation). It's straightforward to show that the attack cost decreases enormously with this parameter. When protecting an oracle, we must be ready for the worst-case scenario, i.e. the post-PoS multi-block attack. @@ -364,9 +364,9 @@ You can play around with a simulation for this attack [here](https://colab.resea The equilibrium price is a function of $a_{colateral}$. The higher this capital, the lower the target $TWAP$ (but also, the less profit). For significant enough price manipulations, $a_{left}$ is sufficient to be profitable, and $a_{colateral}$ might be unnecessary. This dependence with $a_{colateral}$ complicates the use of almost Full Range positions as a more efficient alternative to Full Range positions. -![https://i.imgur.com/gJmgVKc.png](https://i.imgur.com/gJmgVKc.png) +![img/blog-posts/oracle-manipulation-101-math/11.png](img/blog-posts/oracle-manipulation-101-math/11.png) -![https://i.imgur.com/pnmBvFS.png](https://i.imgur.com/pnmBvFS.png) +![img/blog-posts/oracle-manipulation-101-math/12.png](img/blog-posts/oracle-manipulation-101-math/12.png) This scheme requires an additional up-front capital $a_{back}$ , which is trivially recovered by manipulating back, but it's also the heaviest capital. The up-front cost falls exponentially with the attack length (number of consecutive blocks to propose). The longer the $Lenght_{TWAP}$ the market uses relative to the attack length $Length_{attack}$, the more serious this capital becomes. diff --git a/public/blog-posts/oracle-manipulation-101.md b/public/blog-posts/oracle-manipulation-101.md index 5d289d76..565739ac 100644 --- a/public/blog-posts/oracle-manipulation-101.md +++ b/public/blog-posts/oracle-manipulation-101.md @@ -17,7 +17,7 @@ To understand the likelihood of an attack, we must compare the following: Assuming the market participants are rational and are not trying to give money away, an oracle will stay safe if the manipulation cost is higher than the profit. -![https://i.imgur.com/sMMktN2.png](https://i.imgur.com/sMMktN2.png) +![img/blog-posts/oracle-manipulation-101/quote.jpg](img/blog-posts/oracle-manipulation-101/quote.jpg) ## 1. Cost of Manipulation @@ -38,7 +38,7 @@ $P_f \simeq \sqrt[M]{\frac{TWAP^N}{P_i^{(N-M)}}} \hspace{1cm}(1)$ Where $P_i$ is the initial price of the pool, $N$ is the approximated number of blocks of the TWAP duration, and $M$ is the number of blocks covered by the attack. -![https://i.imgur.com/sTVbO3c.png](https://i.imgur.com/sTVbO3c.png) +![img/blog-posts/oracle-manipulation-101/graph-1.jpg](img/blog-posts/oracle-manipulation-101/graph-1.jpg) ## 2. Profit from Manipulation @@ -64,7 +64,7 @@ The core idea behind this attack is that borrowing and defaulting are equivalent It's an arbitrage among markets with different math. -![https://i.imgur.com/JSih1Zo.png](https://i.imgur.com/JSih1Zo.png) +![img/blog-posts/oracle-manipulation-101/meme.jpg](img/blog-posts/oracle-manipulation-101/meme.jpg) The stolen amount from the lending market attack after manipulating the spot price to $P_f$ to move the $TWAP$ to $TWAP_{final}$ is @@ -74,7 +74,7 @@ The stolen amount must be distinguished from the net Profit, as the manipulation ## Attack Scheme pre PoS -![https://i.imgur.com/D9UKvny.png](https://i.imgur.com/D9UKvny.png) +![img/blog-posts/oracle-manipulation-101/football.jpg](img/blog-posts/oracle-manipulation-101/football.jpg) The regular scheme for attacking a lending market is via the following steps: @@ -103,13 +103,13 @@ Two main factors can endanger $TWAP$-based oracle liquidity: 1. Bad liquidity positions in Uniswap v3: as we mentioned, a pool is, in most cases, easier to manipulate when liquidity is concentrated rather than over the Full Range. Price manipulation costs zero over regions with no liquidity. -![https://i.imgur.com/g33Ssp5.png](https://i.imgur.com/g33Ssp5.png) +![img/blog-posts/oracle-manipulation-101/lp.jpg](img/blog-posts/oracle-manipulation-101/lp.jpg) 1. No liquidity in secondary markets: there is no way for arbitrage to close the trade effectively. As we mentioned, the absence of arbitrage makes manipulation back to the initial price possible (the attacker recovers capital used for price manipulation). It also unlocks multi-block attacks (requires less upfront capital). This is, for instance, what happened to the stablecoin FLOAT in Rari (see the FLOAT incident in Rari [here](https://etherscan.io/address/0xa2ce300cc17601fc660bac4eeb79bdd9ae61a0e5) and [here](https://www.defilatam.com/rekt/us-1-4-m-ataque-al-pool-90-de-rari-y-una-leccion-de-oracles-en-lending-para-aprendices)): liquidity was deployed only over the 1.16-1.74 USDC per FLOAT in Uniswap, which meant that manipulation cost was zero outside this range. As there was no liquidity in secondary markets, the attacker could wait for a few blocks and significantly impact the registered $TWAP$. Then, they proceeded to empty over $1M USD from the Pool 90 Fuse for only 10k FLOAT. -![https://i.imgur.com/0ggvoYl.jpg](https://i.imgur.com/0ggvoYl.jpg) +![img/blog-posts/oracle-manipulation-101/float-rari.jpg](img/blog-posts/oracle-manipulation-101/float-rari.jpg) > ⚠️ These attacks are the most common for small projects. > @@ -121,7 +121,7 @@ This is, for instance, what happened to the stablecoin FLOAT in Rari (see the FL After the Merge, big stakers have a [high chance](https://alrevuelta.github.io/posts/ethereum-mev-multiblock) of proposing multiple blocks in a row, which makes manipulation back to the initial price possible and significantly lowers the attack cost. It also makes TWAPs cheaper to move, as the attacker can maintain the manipulated price for longer. -![https://i.imgur.com/fqvGvDd.png](https://i.imgur.com/fqvGvDd.png) +![img/blog-posts/oracle-manipulation-101/pos.jpg](img/blog-posts/oracle-manipulation-101/pos.jpg) Suppose the validator has $n>2$ consecutive blocks. In that case, the attacker can manipulate over $n-1$ blocks to reduce the initial capital required. In the final block $n$, they can exercise partial manipulation back to the initial price (or near it). As we have shown in Eq. (1), the final spot price to manipulate a $TWAP$ becomes closer to the initial price as the number of proposed blocks increases ($M$ in the equation). It's straightforward to show that the attack cost decreases enormously with this parameter. When protecting an oracle, we must be ready for the worst-case scenario, i.e. the post-PoS multi-block attack. @@ -141,7 +141,7 @@ An attacker could also manipulate the TWAP without getting arbitraged if they pr > ⚠️ The [Math article](https://www.notion.so/Oracle-Manipulation-101-Math-edition-e9ceba0198dc4cc384bb7de919806a9c) shows that this attack can easily reach profitability, even after considering the $TWAP$. Increasing the $TWAP$ parameters will require the attacker to have a more significant up-front capital (redeemable after the attack). The absence of arbitrage in this scenario makes everything smoother from the attacker's perspective. -![https://i.imgur.com/gJmgVKc.png](https://i.imgur.com/gJmgVKc.png) +![img/blog-posts/oracle-manipulation-101/graph-2.jpg](img/blog-posts/oracle-manipulation-101/graph-2.jpg) > ⚡ So, we are in danger once again… > diff --git a/public/blog-posts/rip-oracles.md b/public/blog-posts/rip-oracles.md index 4d9af79a..e36d639d 100644 --- a/public/blog-posts/rip-oracles.md +++ b/public/blog-posts/rip-oracles.md @@ -2,7 +2,7 @@ Oracles are a single point of failure and can make or break a DeFi protocol. The Unfortunately, crypto is a flock of black swans, so you better be prepared. -![](https://mirror.xyz/_next/image?url=https%3A%2F%2Fimages.mirror-media.xyz%2Fpublication-images%2FyNzll8jScgGaLk9MUCT6g.png&w=1920&q=90) +![](img/blog-posts/rip-oracles/swan.jpg) ## Are we talking about this again? @@ -10,7 +10,7 @@ There are a plethora of resources to understand the importance of oracles. We re But what’s the status quo of oracles? We know that no solution is perfect, but we must understand what’s going on in order to make informed decisions. We must be aware of the risks and act accordingly. -![](https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F4876b58d-7446-4f67-9a18-9b9485e53e6f%2FZpJ0fyHflctgsKya3yJEp.png?id=e98244cb-b285-4450-b12a-b37f15e7d98a&table=block&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=1360&userId=&cache=v2) +![](img/blog-posts/rip-oracles/meme.jpg) > _“But we have Chainlink! A decentralized solution that works like a charm”_ @@ -18,7 +18,7 @@ But what’s the status quo of oracles? We know that no solution is perfect, but **TL;DR:** Chainlink is the most widely used solution in DeFi. It’s the most reliable and cheap, but incentives for nodes are centralized and non-scalable, making the whole system permissioned. -![](https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F3fe5852e-1637-4b6f-a27c-70bba6e5f0b7%2Fchainlink.png?id=14295de7-90f9-4a83-acac-17e7d9fdb05b&table=block&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=2000&userId=&cache=v2) +![](img/blog-posts/rip-oracles/chainlink.png) - **Incentives are centralized:** Right now, incentives for data feeders are not decentralized since they rely on Chainlink, a centralized entity. They are subsidized and paid via LINK emissions from a multi-sig (an additional potential point of failure). - **Incentives will keep being centralized:** [An upgrade](https://blog.chain.link/sustainably-growing-chainlink/) is scheduled for decentralizing these payments using a stake/slash mechanism. The Chainlink Node Operator [recently paid 30M LINK](https://etherscan.io/address/0x98c63b7b319dfbdf3d811530f2ab9dfe4983af9d#tokentxns) to bootstrap these mechanisms. @@ -42,7 +42,7 @@ There are also issues with the API, [software](https://www.cryptotimes.io/venus **TLDR:** Maker’s internal oracle, which defends more than $8b, is expensive to maintain and therefore, not efficient for scale. -![](https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F15d3b0a6-415c-4744-9ce3-94d062483710%2Fmaker.png?id=da3a9a84-58a0-4934-9e89-d9ce1cdbf7e5&table=block&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=2000&userId=&cache=v2) +![](img/blog-posts/rip-oracles/maker.png) Maker uses their oracle to report collaterals’ prices in the protocol. Although this oracle is not designed to be used by other protocols, we might consider using the same methodology on our protocol, right? @@ -55,7 +55,7 @@ Maker uses their oracle to report collaterals’ prices in the protocol. Althoug **TLDR:** Uniswap v3 introduced a novel way of querying price data. It is decentralized and sustainable (thanks to swappers and LP’s subsidies), but it is complicated to rely on due to liquidity’s unpredictability. -![](https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9a222962-0761-4d60-8378-0e7e315983bc%2Funi_v3.png?id=84a2b924-f40b-41a6-9148-f9db42277f0c&table=block&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=2000&userId=&cache=v2) +![](img/blog-posts/rip-oracles/uniswap.png) Uniswap has the most decentralized and sustainable solution for oracles, but it also has a long track of exploits and manipulations. This improved after v3, but it’s [still happening](https://twitter.com/raricapital/status/1455569653820973057), and it’s prone to a PoS multi-block attack. @@ -76,7 +76,7 @@ Medians were [suggested](https://github.com/euler-xyz/median-oracle) several t **Price** is a permissionless and reliable solution that leverages UniV3 and keeper automation to provide safe price quotes on any existing token. -![](https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fecf4b512-8dee-417a-ae99-84214200a0da%2Fprice.png?id=7ac05301-00ef-4e55-a4e8-3b9802276a5e&table=block&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=2000&userId=&cache=v2) +![](img/blog-posts/rip-oracles/price.png) Price is built on top of Uniswap v3, thus inheriting all its decentralization and sustainable features. In addition, it solves the issues we marked above: @@ -84,7 +84,7 @@ Price is built on top of Uniswap v3, thus inheriting all its decentralization an - **Complexity:** Everything is managed by smart contracts. We created a hassle-free experience for our users. - **Multi-block attacks:** Price uses automation to detect and correct price manipulations, including multi-block attacks. These corrections unlock safer, more precise TWAPs, even for short time frames. -![](https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Faa7e5aeb-76d9-4cf3-a91e-01d80b165075%2Fend.png?id=381a2f94-dd81-4b45-93d6-d1d02fb3070d&table=block&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=2000&userId=&cache=v2) +![](img/blog-posts/rip-oracles/meme-2.png) ### **And the best of it all? Price is just around the corner…** diff --git a/public/img/blog-posts/a-mev-racing-story/amount-2.jpg b/public/img/blog-posts/a-mev-racing-story/amount-2.jpg new file mode 100644 index 00000000..9e53bec6 Binary files /dev/null and b/public/img/blog-posts/a-mev-racing-story/amount-2.jpg differ diff --git a/public/img/blog-posts/a-mev-racing-story/amount.jpg b/public/img/blog-posts/a-mev-racing-story/amount.jpg new file mode 100644 index 00000000..a8d7d44e Binary files /dev/null and b/public/img/blog-posts/a-mev-racing-story/amount.jpg differ diff --git a/public/img/blog-posts/a-mev-racing-story/cover.jpg b/public/img/blog-posts/a-mev-racing-story/cover.jpg new file mode 100644 index 00000000..55fc455e Binary files /dev/null and b/public/img/blog-posts/a-mev-racing-story/cover.jpg differ diff --git a/public/img/blog-posts/a-mev-racing-story/graph-1.jpg b/public/img/blog-posts/a-mev-racing-story/graph-1.jpg new file mode 100644 index 00000000..6281792a Binary files /dev/null and b/public/img/blog-posts/a-mev-racing-story/graph-1.jpg differ diff --git a/public/img/blog-posts/a-mev-racing-story/meme.jpg b/public/img/blog-posts/a-mev-racing-story/meme.jpg new file mode 100644 index 00000000..97689fe8 Binary files /dev/null and b/public/img/blog-posts/a-mev-racing-story/meme.jpg differ diff --git a/public/img/blog-posts/a-mev-racing-story/route.jpg b/public/img/blog-posts/a-mev-racing-story/route.jpg new file mode 100644 index 00000000..6d28eacc Binary files /dev/null and b/public/img/blog-posts/a-mev-racing-story/route.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-conclusion.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-conclusion.jpg index ffee46bd..65865ee2 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-conclusion.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-conclusion.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-cult.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-cult.jpg index a1d91cde..21042df4 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-cult.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-cult.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-door.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-door.jpg index 167ab675..f6d25403 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-door.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-door.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-final-piece.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-final-piece.jpg index c08e5c6e..adaee2c6 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-final-piece.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-final-piece.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-knight.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-knight.jpg index d101b40f..e59d1eb3 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-knight.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-knight.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-machine.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-machine.jpg index 91824ef1..e63fb6d1 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-machine.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-machine.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-paper.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-paper.jpg index 64cd0819..aa8b9206 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-paper.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-paper.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-repair.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-repair.jpg index 96b79bb3..ace69c65 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-repair.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-repair.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/alice-tree.jpg b/public/img/blog-posts/liveness-2-and-beyond/alice-tree.jpg index 048f84a1..8cae90b4 100644 Binary files a/public/img/blog-posts/liveness-2-and-beyond/alice-tree.jpg and b/public/img/blog-posts/liveness-2-and-beyond/alice-tree.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/graph-1.jpg b/public/img/blog-posts/liveness-2-and-beyond/graph-1.jpg new file mode 100644 index 00000000..b2f0c5f1 Binary files /dev/null and b/public/img/blog-posts/liveness-2-and-beyond/graph-1.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/graph-1.png b/public/img/blog-posts/liveness-2-and-beyond/graph-1.png deleted file mode 100644 index bf5823ee..00000000 Binary files a/public/img/blog-posts/liveness-2-and-beyond/graph-1.png and /dev/null differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/table-1.jpg b/public/img/blog-posts/liveness-2-and-beyond/table-1.jpg new file mode 100644 index 00000000..9949f2a9 Binary files /dev/null and b/public/img/blog-posts/liveness-2-and-beyond/table-1.jpg differ diff --git a/public/img/blog-posts/liveness-2-and-beyond/table-1.png b/public/img/blog-posts/liveness-2-and-beyond/table-1.png deleted file mode 100644 index 59f10aa3..00000000 Binary files a/public/img/blog-posts/liveness-2-and-beyond/table-1.png and /dev/null differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/1.png b/public/img/blog-posts/oracle-manipulation-101-math/1.png new file mode 100644 index 00000000..fe96e7ee Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/1.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/10.jpg b/public/img/blog-posts/oracle-manipulation-101-math/10.jpg new file mode 100644 index 00000000..e8e0e500 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/10.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/11.png b/public/img/blog-posts/oracle-manipulation-101-math/11.png new file mode 100644 index 00000000..3ec2db3e Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/11.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/12.png b/public/img/blog-posts/oracle-manipulation-101-math/12.png new file mode 100644 index 00000000..cb512325 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/12.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/2.png b/public/img/blog-posts/oracle-manipulation-101-math/2.png new file mode 100644 index 00000000..6d64c20e Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/2.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/3.jpg b/public/img/blog-posts/oracle-manipulation-101-math/3.jpg new file mode 100644 index 00000000..ca5715a0 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/3.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/4.png b/public/img/blog-posts/oracle-manipulation-101-math/4.png new file mode 100644 index 00000000..d216e3f3 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/4.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/5.png b/public/img/blog-posts/oracle-manipulation-101-math/5.png new file mode 100644 index 00000000..25543b53 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/5.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/6.png b/public/img/blog-posts/oracle-manipulation-101-math/6.png new file mode 100644 index 00000000..48803aa6 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/6.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/7.png b/public/img/blog-posts/oracle-manipulation-101-math/7.png new file mode 100644 index 00000000..b7f0088b Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/7.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/8.png b/public/img/blog-posts/oracle-manipulation-101-math/8.png new file mode 100644 index 00000000..99d5e24d Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/8.png differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/9.jpg b/public/img/blog-posts/oracle-manipulation-101-math/9.jpg new file mode 100644 index 00000000..89abf9e4 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/9.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101-math/cover.jpg b/public/img/blog-posts/oracle-manipulation-101-math/cover.jpg new file mode 100644 index 00000000..a9cadfe0 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101-math/cover.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/cover.jpg b/public/img/blog-posts/oracle-manipulation-101/cover.jpg new file mode 100644 index 00000000..dcc00c80 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/cover.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/float-rari.jpg b/public/img/blog-posts/oracle-manipulation-101/float-rari.jpg new file mode 100644 index 00000000..89abf9e4 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/float-rari.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/football.jpg b/public/img/blog-posts/oracle-manipulation-101/football.jpg new file mode 100644 index 00000000..cc1645dc Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/football.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/graph-1.jpg b/public/img/blog-posts/oracle-manipulation-101/graph-1.jpg new file mode 100644 index 00000000..2a7242ef Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/graph-1.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/graph-2.jpg b/public/img/blog-posts/oracle-manipulation-101/graph-2.jpg new file mode 100644 index 00000000..33d661c3 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/graph-2.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/lp.jpg b/public/img/blog-posts/oracle-manipulation-101/lp.jpg new file mode 100644 index 00000000..c365f735 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/lp.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/meme.jpg b/public/img/blog-posts/oracle-manipulation-101/meme.jpg new file mode 100644 index 00000000..0b4765a4 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/meme.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/pos.jpg b/public/img/blog-posts/oracle-manipulation-101/pos.jpg new file mode 100644 index 00000000..23a967f3 Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/pos.jpg differ diff --git a/public/img/blog-posts/oracle-manipulation-101/quote.jpg b/public/img/blog-posts/oracle-manipulation-101/quote.jpg new file mode 100644 index 00000000..44e7dace Binary files /dev/null and b/public/img/blog-posts/oracle-manipulation-101/quote.jpg differ diff --git a/public/img/blog-posts/rip-oracles/chainlink.png b/public/img/blog-posts/rip-oracles/chainlink.png new file mode 100644 index 00000000..838daf8d Binary files /dev/null and b/public/img/blog-posts/rip-oracles/chainlink.png differ diff --git a/public/img/blog-posts/rip-oracles/cover.jpg b/public/img/blog-posts/rip-oracles/cover.jpg new file mode 100644 index 00000000..4a3a552f Binary files /dev/null and b/public/img/blog-posts/rip-oracles/cover.jpg differ diff --git a/public/img/blog-posts/rip-oracles/maker.png b/public/img/blog-posts/rip-oracles/maker.png new file mode 100644 index 00000000..dbb0a65b Binary files /dev/null and b/public/img/blog-posts/rip-oracles/maker.png differ diff --git a/public/img/blog-posts/rip-oracles/meme-2.png b/public/img/blog-posts/rip-oracles/meme-2.png new file mode 100644 index 00000000..3ec94995 Binary files /dev/null and b/public/img/blog-posts/rip-oracles/meme-2.png differ diff --git a/public/img/blog-posts/rip-oracles/meme.jpg b/public/img/blog-posts/rip-oracles/meme.jpg new file mode 100644 index 00000000..b0a879f2 Binary files /dev/null and b/public/img/blog-posts/rip-oracles/meme.jpg differ diff --git a/public/img/blog-posts/rip-oracles/price.png b/public/img/blog-posts/rip-oracles/price.png new file mode 100644 index 00000000..e253e7ed Binary files /dev/null and b/public/img/blog-posts/rip-oracles/price.png differ diff --git a/public/img/blog-posts/rip-oracles/swan.jpg b/public/img/blog-posts/rip-oracles/swan.jpg new file mode 100644 index 00000000..ee91462d Binary files /dev/null and b/public/img/blog-posts/rip-oracles/swan.jpg differ diff --git a/public/img/blog-posts/rip-oracles/uniswap.png b/public/img/blog-posts/rip-oracles/uniswap.png new file mode 100644 index 00000000..43633d90 Binary files /dev/null and b/public/img/blog-posts/rip-oracles/uniswap.png differ diff --git a/src/components/common/Section.tsx b/src/components/common/Section.tsx index ef000322..56d9ef27 100644 --- a/src/components/common/Section.tsx +++ b/src/components/common/Section.tsx @@ -27,8 +27,6 @@ const StyledSectionBackground = styled.div<{ position: absolute; width: ${SPACING_530}; z-index: 0; - // right: -calc((100vw - var(--page-max-width)) / 4); - // right: calc((100vw - 100%) * -1); ${({ align }) => align === 'left' && diff --git a/src/data/blog.json b/src/data/blog.json index 337c1418..68844dc2 100644 --- a/src/data/blog.json +++ b/src/data/blog.json @@ -13,7 +13,7 @@ "description": "What do we know about the dark forest 2.0?", "date": "05/04/23", "tags": ["MEV", "Flashbots"], - "image": "https://images.unsplash.com/photo-1536909526839-8f10e29ba80c?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&w=7200" + "image": "img/blog-posts/a-mev-racing-story/cover.jpg" }, { "id": "oracle-manipulation-101", @@ -21,7 +21,7 @@ "description": "What does a Uniswap v3 oracle manipulation look like?", "date": "12/26/22", "tags": ["Price", "Oracles", "Uniswap V3"], - "image": "https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F9297e650-550e-4395-97f6-84ea64d688fd%2Fimage.jpeg?table=block&id=cbcea67b-7796-4969-9543-7907d3b1b4ba&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=2000&userId=&cache=v2" + "image": "img/blog-posts/oracle-manipulation-101/cover.jpg" }, { "id": "oracle-manipulation-101-math-edition", @@ -29,7 +29,7 @@ "description": "What does a Uniswap v3 oracle manipulation look like?", "date": "12/26/22", "tags": ["Price", "Oracles", "Uniswap V3", "Math"], - "image": "https://price-oracle.notion.site/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F645a9912-e67f-4cca-a108-4d9ea0dbc64c%2Fimage.png?table=block&id=e9ceba01-98dc-4cc3-84bb-7de919806a9c&spaceId=de552277-5ae2-4d88-932f-dd538421d024&width=1360&userId=&cache=v2" + "image": "img/blog-posts/oracle-manipulation-101-math/cover.jpg" }, { "id": "rip-oracles", @@ -37,6 +37,6 @@ "description": "Status quo: Current hazards and how to solve them", "date": "12/26/22", "tags": ["Price", "Oracles"], - "image": "https://mirror-media.imgix.net/publication-images/Go3xqXtpWA1ze8b-ULayp.png?height=1440&width=2880&h=1440&w=2880&auto=compress" + "image": "img/blog-posts/rip-oracles/cover.jpg" } ]