Tidal AMM gives two prices:
Marginal price of symToken/Token - The price of the highest price bin that has liquidity in it. This would be the execution price of a tiny swap order from leverage buyers.
System average price of symToken/Token - The weighted average price of all liquidity on Tidal AMM.
Formula for the system average price:
P0ā=SUM(S1ā+......+Snā)SUM(S1āāP1ā+......+SnāāPnā)ā where:
S=Sizeofliquidityposition(Token)P=Binpriceofliquidityposition(symToken/Token)P0ā=Systemaverageprice