When a user swaps, a propAMM prices the trade from a small set of parameters
rather than a stack of resting limit orders. A simplified version of the logic
runs through four steps.
The latest oracle update gives the contract the current fair value for the pair,
from which it prices the best bid and best ask. This refreshes every block, and
more than once per block when the price moves enough.
A maker holds inventory in both the base and quote asset and generally wants the
two balanced. The price for a given swap skews based on how far current vault
reserves sit from target. If the vault is heavy in the inbound token, the price
worsens for the taker, which encourages rebalancing flow.
The goal is a new oracle update every block, but transactions occasionally fail to
confirm. To limit damage from toxic flow exploiting a stale price, the propAMM
penalizes its own quotes as the oracle ages, widening the spread in proportion to
how many blocks have passed since the last update.
Around the fair value sits a bid and ask spread, with increasing depth as quotes
move further from mid, producing a familiar order book depth profile. The entire
profile is reconstructed deterministically from a small parameter set, so a single
oracle update repositions the whole curve in one transaction. A propAMM can
express any depth curve; this is just the most common design.