Index and execution
The index is the midpoint of the source's best bid and best ask for YES, read from its order book, never the last trade. Polymarket books come from its CLOB (clob.polymarket.com/book); Kalshi books from its trade API (/markets/{ticker}/orderbook), where a YES ask is 1 minus the best NO bid.
The server reads the book at trade time. A price sent by a client is never used. The keeper reads it every minute for every market with open positions.
Fills at the touch
A long pays the source's best ask. A short pays 1 minus the best bid. Each fill is at least 0.5 point away from the index, so the source spread is the price of the trade and the pool never sells stale odds. Closing works the other way: a long sells at the best bid, a short at 1 minus the best ask.
Every fill records the book it used (best bid, best ask, time). It is in the ledger batch, so anyone can compare it with the source's public price history.
Guard
A market goes close-only while its source spread is above 5 points, the source is not accepting orders, or the index is older than 3 minutes. Opens are refused; closes still work. It reopens by itself once the book is healthy.