1/ Oracles Usage in AMMs

Many AMMs ( @synthetix_io, @Bancor, @BreederDodo, @perpprotocol, etc.) have adopted oracles to provide reference pricing, but does it really work?

I'll explain 👇
2/ These AMMs use oracles in many different ways. Some use the prices from the oracles to derive a "Zero Slippage" quote price for any size trade (A). Others use them to "rebalance" to external market prices (B). The last group uses them to determine funding rates (C)
3/ These projects that utilize AMMs can roughly be bucketed into the categories above

A) Zero Slippage - @synthetix_io @CoFiXProtocol
B) Rebalancers - @BreederDodo @Bancor
C) Perpetuals - @perpprotocol @MonteCarloDEX
4/ @synthetix_io exchange was the first AMM to utilize oracles. This resulted in a lot of issues since traders could always front-run price changes before oracle updates. Even when fees were pushed to 1%+ / trade, some frontrunners were still consistently profitable
5/ Even when @synthetix_io demo'd on Layer 2 with sub second block times, there was evidence of soft frontrunning from some of the competitors in the trading competition

"Fee reclamation" was implemented to fix this, with the caveat that it settles you at a future price.
6/ @CoFiXProtocol takes an interesting spin on this by adding a spread and adjusting prices based on market volatility. The spread and vol adjusted prices help protect against frontrunning, but LPs would still be vulnerable during moments where volatility suddenly increases
7/ @Bancor and @BreederDodo use oracle updates to shift their price curve to center around external market prices. Part of the motivation is to "reduce value leakage from arbitragers". I discuss here why that really isn't an issue: https://twitter.com/Rewkang/status/1310675403837599746
8/ The other issue here is that arbitragers will, in mature markets, always be able to close price gaps before oracle updates settle on-chain.

Oracle updates on Ethereum Layer 1 can't be every block (usually every 2-10 min), and arbers will take profits as quickly as they can.
9/ Another mechanic employed is applying liquidity amplification. While this is good for takers, it can be a double edged sword because it proportionally increases the IL faced by LPs.

Bancor and Dodo use a mechanic to "realize" IL, so in these cases it would be permanent loss
10/ @perpprotocol and @MonteCarloDEX don't have the same issues since the trade prices are not directly influenced by the oracles, rather only trading activity.

Oracles are merely used to determine funding for positions and since prices are TWAPed, there is limited frontrun risk
11/ A & B projects face the same problem that @synthetix_io faced early on, and almost renders the point of using an oracle for price updates pointless without 100% frontrun protection (but these have their tradeoffs).

Higher TPS networks can make these models more effective
12/ I think some of these AMMs could do better removing oracles since it can increase profitability for LPs: gas usage decreases> Tx get cheaper > More arbitrage trades around local vol > More fees for LPs

Excited to see what continued innovation come from these teams
TL;DR Using oracles can theoretically allow you to increase liquidity for traders but practically this is inhibited by arbitragers/front runners

They might work better on higher TPS L1/L2

There might be more problems when the DEXs get large as the reference markets
You can follow @Rewkang.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: