BrownFi renovates AMM with high capital efficiency and simplicity

This article introduces BrownFi, a renovated AMM, developed to unlock high capital efficiency with flexible market making strategies and simplicity. Our simulation shows that BrownFi AMM offers capital efficiency as equivalent as Uniswap V3 (range ±2% \pm 2\%) and 100X better Uniswap V2.

Problem: the gap between Uniswap V2 vs V3

Constant Product Market Making (CPMM), invented by Uniswap, is a legacy model of Automated Market Making (AMM) protocols in Decentralized Finance (DeFi). Uniswap V1 and V2 utilize the invariant xy=k x*y=k, making it the most popular price discovery mechanism in DeFi, reused by many other Decentralized Exchanges (DEXes). It unleashes liquidity provision for everyone, every tokens, and allows instant trade (i.e. swap), all with simplicity, atomicity, infinite liquidity. However, traders usually suffer a high slippage at trades. A swap pool requires super-large liquidity to offer low slippage (e.g. liquidity value must be 202X larger than the trade order size to ensure 1% slippage). This implies a low capital efficiency (CE), thus, in particular, bad experience and liquid-boosting challenge for new ecosystems or ill-liquid trading pairs. That is why Uniswap V3 comes to improve CE. By liquidity concentration technique, Uniswap V3 can guarantee the same 1% slippage with ~2X capital larger than the order size. This means Uniswap V3 offers capital efficiency 101X higher than V2. Unfortunately, liquidity on Uniswap V3 is bounded by bins (defined by price tick ranges). Therefore, managing liquidity positions across tick ranges is complicated and only suitable for professional liquidity providers (LPs) with extensive financial knowledge and skills. Average LPs find it very difficult to manage price ranges frequently against market volatility, also tick spacing, fee tiers. Maverick Finance, TraderJoe, improves UX of Uniswap V3’s concentrated liquidity model, but introducing hidden risks and/or centralized control out of the core protocol. Furthermore, those concentrated liquidity paradigms only fit well-established tokens with high liquidity and relatively low volatility. This article shows that oracle-based AMM models offer a significant advantage by eliminating arbitrage opportunities, including round-trip and sandwich attacks inherited by Uniswap and other CPMM-AMMs. Additionally, half of LPs on Uniswap V3 is providing liquidity at loss due to high impermanent loss and out-of-range positions, while oracle-based AMMs outperform CPMM regard CEX-listed assets. In summary:

  • Uniswap V2 and the likes: simple and general but low CE.

  • Uniswap V3 and the likes: high CE but complicated UX, not fitable for retail LPs, not fitable for new tokens with low liquid and high volatility.

  • LPs on Ethereum have lost $750M since the Merge (Sep 2022). In particular, half of Uniswap V3’s LPs lose for high IL.

  • Oracle-based AMMs outperform Uniswap and CPMM-AMMs over CEX-listed assets in the sense of profitable returns for average LPs.

This is a gap between Uniswap V2 and V3. Resolving it (i.e. finding a high CE with simple UX for retail LPs) will bring huge benefits for emerging blockchain ecosystems where capital is limited and quality liquidity is ill and highly dependent on bridged assets, also most LPs are average users.

Solution: an innovative oracle-based AMM

BrownFi introduces a novel spot AMM model based on oracle price, to offer high capital efficiency, flexible market making, while keeping simple UX, fungibility & reusability of LP tokens of Uniswap V2. The core concept of BrownFi AMM employs an elastic Parameterization of Limit Order-Book (PLOB) from a published research papers on IEEE Access, a notable scientific journal. In brief, the core function of BrownFi AMM is based on an invention of a NOVEL pricing mechanism:

  • Given a pair of tokens X and Y, where X is base token (e.g. ETH) and Y is quote token (e.g. USD), with corresponding token reserve (x0,y0)(x_0, y_0).

  • For any trade, e.g. an amount-OUT dxdx of token X, we compute the average trading price Pt=P0(1+αR)P_t = P_0 * (1 + \alpha *R), where RR denotes price impact factor, P0P_0 the current pre-trade price (fed by oracle), and a reversal parameter α>0\alpha>0.

  • Price impact factor R=Kf(δx)R= \Kappa * f(\delta x) is directly proportional to a function f(δx)f(\delta x) of relative order size δx=dx/x0\delta x=dx/x_0. Liquidity concentration parameter K\Kappa (Kappa) offers low (or high) slippage if it is small (or large), respectively.

  • Finally, we compute the amount-IN dy=dxPtdy=dx*P_t based on the amountOUT and the computed average trading price, then execute swaption.

Mathematically, for K=2\Kappa=2, the elastic PLOB model is proven to be identical with Uniswap CPMM xy=k x*y=k, i.e. Uniswap V2 is a special case of BrownFi's elastic PLOB model. Note that our Kappa is not as same as in the liquidity invariant xy=kxy=k of Uniswap. Elasticity in BrownFi AMM is implemented in the price impact function f(δx)f(\delta x), more explicitly, limδx1f(δx)=\lim_{\delta x \to 1} f(\delta x)=\infty. This means when order size dxdx is large or close to the reserve x0x_0, price impact (so is trading price) will be large or super-large (tending to infinity). Elasticity plays an important role to ensure that liquidity never runs out, despite large swaps. BrownFi’s liquidity elasticity (more precisely, price impact elasticity) is closely similar to Uniswap V2 (which is not available on Uniswap V3), hence making BrownFi AMM resilient to market volatility. Moreover, our simple mathematical model allows us to make all trading and liquidity provision experiences on BrownFi AMM as simple as Uniswap V2, fitting all average LPs.

Simulation & Backtest

The PLOB model has two shapes of liquidity distribution: Rectangle vs Vshape. The former is equivalent to a flat order-book, close to Uniswap V3 bins, while the later is similar to the statistical liquidity distribution of legacy limit order-books. BrownFi applies rectangle liquidity distribution while the research papers gives extensive investigations on Vshape.

Liquidity distribution of PLOB: rectangle vs Vshape.
Liquidity distribution of PLOB: rectangle vs Vshape.

In the following, we simulate the rectangle liquidity model, which is closest to Uniswap V3 bins. For the same trade setting (order size 10 tokens, slippage 1%, price P=1P=1, zero trading fee), Uniswap V2 requires $2020 capital, while Uniswap V3 is $20.05 and BrownFi (small Kappa K=0.001\Kappa =0.001) is $21. From comparison, we see that BrownFi is as good as Uniswap V3 (range ±2% \pm 2\%) and 100X better than Uniswap V2.

Capital efficiency comparison between BrownFi vs Uniswap V2, V3
Capital efficiency comparison between BrownFi vs Uniswap V2, V3

Further, in the published research papers, back-testing results showed that the elastic PLOB model outperformed Uniswap V2 in 8-month time-frame, brings better gains for LPs (i.e. turning impermanent loss to impermanent gain).

Conclusion

BrownFi AMM fills the gap between Uniswap V2 and V3, offering a high CE like Uniswap V3 with simple UX for retail LPs like Uniswap V2. Our simulation shows that BrownFi AMM offers capital efficiency as equivalent as Uniswap V3 (range ±2% \pm 2\%) and 100X better Uniswap V2.

It is worth to mark that BrownFi AMM does not directly compete Uniswap V2 and/or V3. BrownFi is a novel oracle-based AMM, a complementary solution to unlock high capital efficiency with flexible market making strategies and simplicity, hence fitting liquid-boosting demand of new ecosystems with limited capital. Readers refer to math and capital efficiency comparison of BrownFi and the need and advantages of oracle-based AMMs.

Contact us

Website, Twitter, Telegram, blog

Subscribe to BrownFi AMM
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.