NOTE: This research and development was done as a joint collaboration between Arrakis, Conor McMenamin and Uniswap Foundation (Conor’s research was partially funded by a Uniswap Foundation grant). We welcome further collaboration and see this as a community effort!
The phenomenon of loss-versus-rebalancing (LVR) has hooked the industry since its definition by [Roughgarden et al. 2022]. In response, we built a hook that retains arbitrarily high amounts of LVR that would otherwise take place in unprotected AMMs. First of all, what the h**k is LVR? LVR is easiest to understand in the case of high-volume trading pairs, ETH-USDC for example. ETH-USDC trades continuously on centralized exchanges such as Binance and Coinbase, with prices almost identical across each. This means that there's a widely accepted market price for ETH-USDC at any given moment. At this price, people can both buy and sell, excluding spread and fees.While ETH-USDC is trading on CEXs, blockchain-based AMMs are waiting for the next block to update their prices. In the time between blocks, the market price of ETH-USDC is updating constantly, while AMM prices remain unchanged, sitting there helplessly while upcoming block builders wait until the last possible instant before trading against the AMM. At this last possible instant, the first thing a builder will typically do is move the AMM price to that of the market price. This is an arbitrage. Risk-free profit for the builder, and a guaranteed loss (versus-rebalancing) for the LPs in the AMM.
This happens every block like clockwork, and losses are significant. Roughgarden and co. proved that the expected profit for block-builders (loss for the AMM) against a Uniswap V2 pool with expected daily price move of 5% to be ~10% of the pool's value per year. For the ETH-USDC pool with TVL of $239M, that is $23.9M. Across all pools, expected annualized LP losses are well over $100M.
This proof of concept Diamond hook (based on the protocol outlined in an ETHresearch post authored by Connor ) charges the builder for this LVR-specific trade, forcing it to occur at the beginning of the block. Given the all-seeing capabilities of professional builders when constructing a block, Diamond requires builders to commit at the start of the block to the final pool price at the end of the block. The reason for this is that we expect rational builders to move the final pool price to the LVR-maximizing price, which corresponds to the market price when the block is built. Otherwise, there is a profit-making opportunity left in the block.
The pool price moves to this committed price at the beginning of the block, with proceeding swaps taking place as normal against the liquidity pool. To ensure the committed price is adhered to, Diamond forces the builder to deposit collateral to the smart contract before any trades take place. Before any swap is confirmed, there must be enough collateral deposited to return the pool price to the confirmed price. In exchange for this service, Diamond rewards the builder with some % of the implied LVR, and the ability to back-run arbitrarily many pool transactions. Although this is significantly less extractable value for the builder than is currently being extracted, it is still effectively risk-free. Given the explicit protections for LPs that Diamond provides, we expect this reduced value for the builder will be counteracted by more liquidity, and the increase in transaction volume that comes with it.
We hope that with this article you have gotten a better understanding of LVR, as well as the high-level ideas behind the theoretical Diamond hook that can reduce LVR. At Arrakis we are continually researching and exploring the opportunities for LP efficiency. if you would like to dive deeper and also take a look at the code head to our github documentation here.