Open Cross

The session fee

The fee on every swap is a pure function of the clock. It is highest exactly where a stale pool price is most likely: deep into the closed hours.

The formula

With base and peak in basis points, since the seconds since the last close and since_open the seconds since the bell:

Open:    fee = base + (peak - base) * max(0, decay - since_open) / decay
Closed:  fee = base + (peak - base) * min(since, ramp) / ramp
Collect: no swaps (the Open Cross is collecting orders)

The program computes the fee in parts per million with integer arithmetic only. The fee is always taken in USDC: on a buy it comes off the USDC paid in, on a sell off the USDC paid out.

Launch parameters

ParameterValueBound enforced by the program
base_fee_bps25 (0.25%)1 to 100
peak_fee_bps60 (0.60%)at least base, at most 300
close_ramp_secs7,200 (2 hours)at most 12 hours
open_decay_secs1,800 (30 minutes)at most 2 hours
cross_window_secs600 (10 minutes)60 seconds to 1 hour
freeze_secs120 (last 2 minutes: add, no cancel)shorter than the window
min_order_quote$50$1 to $10,000

Parameters change only through UpdatePool, with notice, and take effect at a session close. Values outside the bounds are rejected with ParameterOutOfBounds.

Worked examples (New York time)

MomentSince the closeFee
Wednesday 9:30the bell0.60%
Wednesday 9:4515 minutes after the bell0.25% + 0.35% x 15/30 = 0.425%
Tuesday 11:00market open, decay done0.25%
Tuesday 16:3030 minutes0.25% + 0.35% x 30/120 = 0.3375%
Tuesday 17:001 hour0.425%
Tuesday 18:00 onward2 hours or more0.60%
Saturday 03:0035 hours0.60%
Wednesday 9:25collection windowno swaps, orders only

Why these numbers

The spike replayed six months of the three pools with a flat 0.25% fee against 0.25% open and 0.60% closed. At 70% volume retention in closed hours, LP net income rose 31% to 45% on all three stocks. Even at 50% retention LPs stayed 10% to 13% ahead. Traders already pay an implicit cost in closed hours from drifting prices: 60bp on SPYx, 151bp on NVDAx and 171bp on TSLAx on average per closed window. The added 0.35% is a fraction of that.

The fee split between LPs and the protocol is set in the config account and capped at 25% for the protocol.