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. This post presents math fundamentals and simulations of BrownFi AMM, showing it capital efficiency as high as Uniswap V3 and 100X better Uniswap V2.
For all spot exchanges, price discovery mechanism is the core function. Uniswap invented CPMM model , making it the most popular and widely used pricing mechanism among AMMs. BrownFi AMM employs an elastic Parameterization of Limit Order-Book (PLOB) from a published research papers on IEEE Access to construct a novel pricing mechanism associated with a rectangle liquidity distribution.
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 .
For any trade, e.g. an amount-OUT of token X , we compute price impact which is directly proportional to the relative order size (rectangle-shape liquidity distribution) or (V-shape liquidity distribution). Liquidity concentration parameter Kappa offers low (or high) slippage if it is small (or large), respectively.
We compute the average trading price , where the current market price (possibly fed by external or internal oracle), and a reversal coefficient.
Finally, we compute the amount-IN based on the amount-OUT and the computed average trading price, then execute swaption. Moreover, we update the new pool-internal price (if needed) as .
Mathematically, for , our elastic PLOB model is proven to be equivalent to Uniswap CPMM model , hence Uniswap V2 is a special case of BrownFi's elastic PLOB model. When order size is large or close to the reserve , price impact (so is trading price) will be large or super-large (tending to infinity), formally, . This makes BrownFi elastic similar to Uniswap V2 (however, BrownFi doesn’t possess path-independence like the CPMM model), hence the liquidity is unbounded. Elasticity and simplicity of BrownFi mathematical model make it resilient to market volatility and simple retail LPs like Uniswap V2 while offering high capital efficiency like Uniswap V3.
To compare capital efficiency between Uniswap V2, V3 and BrownFi AMM, the idea is simple: regarding the same trade and slippage, which AMM optimally requiring less capital is more efficient. Without loss of generality, we give simple conventions:
Consider the pair (ABC,USDT), price 1 ABC = USDT, taking .
Trade order: buying ABC, and paying USDT. Trading fee is zero.
Slippage 1%. This means the actual trading price is , higher 1% than the current price, hence the actual pay USDT.
Now, we are going to find how much capital is needed by Uniswap V2 pool vs Uniswap V3 pool vs BrownFi AMM pool .
The CPMM model gives . Because , we have and , hence . The Uniswap V2 pool capital is (1010, 1010).
The concentrated liquidity formula of Uniswap V3 allows us to find a curve limited by a price range such that it can serve the trade with optimal capital, reading , where .
Choosing a narrow price range where (volatility around the market price), and we replace and to obtain: The Uniswap V3 bin capital is (10.05, 10.05), satisfying buying amount.
Regarding the conventions of amount-OUT ABC and amount-IN USDT, we consider three liquidity compression/concentration and .
The BrownFi pool capital is (510, 510).
The BrownFi pool capital is (15, 15).
The BrownFi pool capital is (10.5, 10.5).
For any price, to compare the capital between the two pools, we compute the ratio of their capital amounts. For the given trade, we summarize the capital amounts of the computed pools:
Uniswap V2 pool (1010, 1010) = 2020
Uniswap V3 bin (10.05, 10.05) = 20.1
BrownFi pool (10.5, 10.5) = 21
BrownFi pool (15, 15) = 30
BrownFi pool (510, 510) = 1020
We conclude with some advantages of BrownFi AMM.
BrownFi is as capital-efficient as Uniswap V3 (range ) and 100X better than Uniswap V2.
BrownFi AMM always concentrates liquidity around market price, hence LPs always get trading fee (LPs on Uniswap V3 suffer out-of-price-range). On the other side, thank to price impact, our AMM is still elastic to large orders, thus, offers unbounded liquidity (i.e. traders cannot draw out token reserve).
BrownFi AMM offers simple UX for retail LPs like Uniswap V2. Furthermore, LPs can adjust their liquidity concentration parameter according to their prediction on market volatility, no need to specify price range, so more flexible than Uniswap V3 and V2.
Two limitations those BrownFi AMM requires oracle price-feeding to operate smoothly against malicious price manipulation/arbitrage, and our model is not path-independent. Overall, BrownFi AMM fills the gap between Uniswap V2 and V3, offering a complementary solution to unlock high capital efficiency with flexible market making strategies and simplicity. Imagine that $1M liquidity on BrownFi AMM is equivalent to $100M liquidity on Uniswap V2. Thus, BrownFi AMM fits liquidity-boosting demand of new ecosystems and new tokens with very limited capital.
Readers refer to a conceptual introduction of BrownFi.