Skip to content

How are costs modeled?

Every fill pays two costs. The pool fee. And price impact.

The fee comes from the deepest main pool. Pool fees are in parts per million. We divide by one million. A v4 pool with a dynamic fee uses the default 0.003.

Impact grows with order size. Depth D is the pool value. Half of it sits on each side.

impact = x / (D / 2)
buy price = chain price × (1 + impact)
sell proceeds = notional × (D / 2) / (D / 2 + notional)
round trip % = 100 × (2 × fee + impact_in + impact_out)

x is the order in USD. The sell side is exit-bounded. It asks what the whole lot sells for now.

CostWhere it shows
FeefeeUsd on each trade
ImpactimpactUsd on each trade
BothnetUsd after costs

Depth is $100,000. The order is $500. Impact is 1% each way. The fee is 0.3%. The round trip is 2.6%.

Read how positions are marked.