Permissionless Listing / Isolated Markets

Update

I’ve decided to build a new price oracle as there are no existing fully on-chain manipulation resistant reliable price oracles which aggregate multiple DEXs for the purpose of lending and borrowing.

Having a solid fully on-chain price oracle will be the hardest aspect of this proposal. It must be fully on-chain to support permissionless listing. The downside is that a lot of liquidity of various tokens are on CEXs, which makes on-chain prices easier to manipulate.

To combat price manipulation, I’m using the following strategies:

  • Aggregating DEXs
  • Weighting the price from each DEX by the total liquidity of the base token (ETH or stablecoin) and possibly other factors
  • Using sliding window oracles
  • Using a large observation period (8 hours or more)
  • Using a somewhat small period granularity (15 minutes)
  • Choosing the best algorithm(s) to calculate [stable] price and liquidity (for weighting)

One of the easiest ways to manipulate an aggregated DEX price oracle is to create a new liquidity pool on one of the smaller DEXs (assuming one doesn’t exist) and setting the token price really high (or low). Arbitrage bots and regular traders would probably be slow to realize this discrepancy making it less costly to pull off such an attack.

To combat such an attack:

  • Use large observation windows
  • Use algorithms that give more weighting to DEXs/pools which have had large amounts of liquidity earlier on

The oracle solution I’m building is/will be very abstract and flexible so as to support many different ways to calculate prices.

More discussion of algorithms and parameters will follow.

Cheers to DeFi Summer 2.0!

2 Likes