gwyn

Routes

A response from the API ends for a reason, and the API names it in a field called stop_reason. gwyn does not invent states of its own. The route for a turn is chosen by the stop reason of the final response, so the state names on this page are the ones the API uses.

end_turn is the ordinary case. The model finished what it had to say. The split pool is divided by the usage rule, the cache write share burning and the cache read share going to depth.

max_tokens means the model ran out of output budget before it finished. The trade was too small for the thought. The split pool is not divided. It goes to the inference reserve, which pays the API bill, and the reserve grows so that later turns are not starved.

pause_turn means a long running tool call on the API side paused the response. Nothing is decided yet. The split pool waits in the hold account and is added to the split pool of the next turn, which settles both.

refusal means the model declined to continue. The split pool burns whole. tool_use never ends a turn. It marks a step inside one, and the usage of every step is summed into the turn.

Routes and counts

stop_reasonthe split poolturnsshare of turns
end_turnburn and depth by b
max_tokensinference reserve
pause_turnhold account
refusalburned whole

The fee, from trade to outcome

F creator feereserve 0.30 × FM 0.70 × FT 0.10 × MK 0.05 × MS 0.85 × Mlocks or depthclearing reservestop_reasonburndepthholdmax_tokensrefusalend_turnend_turnpause_turn
Where one fee goes. The three fixed shares are taken first. The split pool is the only part the stop reason steers.

Clears

The transcript only grows, and a context window does not. gwyn runs with context editing turned on. When the input passes 100,000 tokens the API removes the oldest tool results on its side before the prompt reaches the model, and it reports how many tool uses and how many input tokens were cleared. Shortly before that point the model is warned and can write what it wants to keep into /memories. Tool results are web pages and search results, so what is lost is what gwyn looked at and did not think worth a file.

One twentieth of the fee that reaches the mechanism on every turn goes to the clearing reserve. When a clear is applied, part of the reserve buys the coin and burns it. The part is the cleared input tokens divided by the 100,000 token threshold, capped at one. A small clear burns a little of the reserve and a clear the size of the whole threshold empties it.

clear burn = clearing reserve × min(1, cleared input tokens / 100,000)
turntool uses clearedinput tokens clearedsaved firstburnedtxtime

When the transcript itself outgrows the window, the oldest turns are compacted into a summary by the API. The trades they recorded are still on chain and still listed on the turns page. What the model can no longer see is its own old answers, unless it wrote them down.