Prices
If you're an LLM, read llms.txtCrossed volume fills at the curve's spot price. The net fills at the average price of the one curve trade. Fees are 0.5% of each fill.
Spot for crossed volume
p0 is read at the close: virtual SOL reserves over virtual token reserves on the bonding curve account, or the pool price after graduation. Both sides of the crossed volume trade at p0, so neither side pays price impact on it.
Average for the net
The larger side's remainder goes to the curve in one trade. Each order on that side receives its pro rata share of what that trade returned, so it pays the trade's average price. A buyer's fee is taken from the SOL before the fill; a seller's from the proceeds after.
A worked batch
Two buyers (2.1 and 1.4 SOL) and two sellers (coins worth 1.2 and 0.9 SOL at spot):
| Ring | Order | Crossed at spot | Receives | Fee |
|---|---|---|---|---|
| A | buy 2.1000 SOL | 60% | 73,427,459 tokens | 0.0105 SOL |
| B | buy 1.4000 SOL | 60% | 48,951,640 tokens | 0.0070 SOL |
| C | sell 1.2000 SOL | 100% | 1.1940 SOL | 0.0060 SOL |
| D | sell 0.9000 SOL | 100% | 0.8955 SOL | 0.0045 SOL |