gwyn

Documentation

What gwyn is

gwyn is a coin on Solana with one Claude conversation attached to it. The conversation is the mechanism. It is not a mascot that comments on the chart and it is not a trading bot. It does not hold a key and it cannot buy or sell. What it does is think when the market speaks, and the measurable facts about each thought decide what happens to the fee from the trade that caused it.

There are four of those facts. What the model wrote to its memory and what it deleted. The signature of its sealed reasoning. The four token counts in the usage object. The stop reason of the final response. Each one is reported by the API, posted to Solana, and tied to a rule in the program.

The conversation

The conversation began with a system prompt and three tools and has had only one kind of user message since: a line of JSON describing a trade. The line carries the transaction signature, the side, the size in SOL, the number of coins, the wallet and the slot. The worker that watches the mint appends it and sends the request. When the response is complete it is appended too, and the worker goes back to waiting.

Nothing else can add to the transcript. There is no admin message, no scheduled prompt and no way for a visitor to send text. The model is free in what it does with a turn. It can search, read a page, write a note to itself, or simply answer. It is not told to do any of these.

The tools

The model has three tools. web_search and web_fetch let it look at the public web. They run on the API side and their results come back into the transcript as tool results, which are the largest and most disposable part of the context. memory is the third tool. It is client side, which means the API only passes along the command and the caller has to carry it out. gwyn carries it out on chain.

The size of the trade sets how much the model may write in the turn. The output budget is 1,000 tokens plus 3,000 for every SOL in the trade, capped at 16,000. Thinking counts against the same budget, so a small trade leaves room for little more than a short answer.

max_tokens = min(16000, 1000 + 3000 × sol)

The memory account

One program account of 10,240 bytes holds the directory. It is created once at that size and never reallocated. A 64 byte header records the mint, the turn counter, the number of files and the bytes in use. A table of 32 entries of 48 bytes follows. The last 8,640 bytes are the data region.

The six memory commands map onto six instructions. view reads. create takes a free entry and a free region and writes the text. str_replace and insert rewrite a file in place and move the files after it when its length changes. delete frees the region and clears the entry. rename replaces the path hash. A command that cannot be carried out returns an error to the model in the same form any memory handler would, and the model decides what to do about it.

offsetlengthfield
08account discriminator
832mint
408turn counter
482file count
502bytes used in the data region
521bump
5311reserved
641,536file table, 32 entries of 48 bytes
1,6008,640data region

Locks and burns

A tenth of the fee that reaches the mechanism on each turn is the memory tithe. On a turn with writes, the tithe buys the coin and the coins are locked in the entries of the files written, split by bytes. On a turn without writes it is added to depth. A lock belongs to a file, not to a person. It moves when the file is renamed, shrinks by burning when the file is shortened, and burns completely when the file is deleted.

The effect is that the locked supply is a picture of what the model currently remembers, and the burned supply includes everything it has chosen to forget. A model that hoards never burns from memory but soon cannot write. A model that keeps rewriting its notes burns steadily.

lock on write = T × bytes written to the file / bytes written in the turn
burn on shrink = locked × (old length - new length) / old length
burn on delete = locked

Sealed reasoning

Requests ask for thinking with the display omitted. The response carries a thinking block with an empty text field and a signature that contains the reasoning in encrypted form. Only Anthropic can decrypt it. The API verifies the signature when the block is sent back on the following request, so it cannot be edited or replaced without ending the conversation.

The worker posts the sha256 of the signature in a commit transaction, then posts the route. The program requires the commit to sit in an earlier slot than the route. The signature itself is stored in full and the sealed page hashes it in your browser so the commit can be checked without trusting the site.

commit = sha256(signature)
valid route: commit slot < route slot

The usage split

Thirty percent of the creator fee from a trade goes to the inference reserve, which pays for the API. The remaining seventy percent is M. A tenth of M is the memory tithe T, a twentieth is the clearing share K, and the rest is the split pool S.

S is divided by the cache counts of the turn. The share equal to cache writes over cache writes plus cache reads buys the coin and burns it. The rest is added to liquidity. A warm cache sends the pool to depth. A cold cache sends it to the burn. The cache goes cold after five minutes without a request, and only a trade can make a request.

reserve = 0.30 × F M = 0.70 × F
T = 0.10 × M K = 0.05 × M S = 0.85 × M
b = W / (W + R)
burn = S × b depth = S × (1 - b)

Stop reasons

The usage split applies when the final response ends with end_turn. The other stop reasons override it. max_tokens sends S to the inference reserve. pause_turn holds S and carries it into the next turn. refusal burns S whole. tool_use marks a step and never ends a turn. These are the API's own values. The program stores the stop reason as posted and the routes page counts how often each has occurred.

stop_reasonwhere the split pool goes
end_turncache write share burned, cache read share to depth
max_tokensinference reserve, the next turn gets more room
pause_turnhold account, joins the next turn
refusalburned whole
tool_usea step inside a turn, usage is summed

Clearing

Context editing removes old tool results once the input passes 100,000 tokens. The API applies the edit on its side, warns the model beforehand, and reports the number of tool uses and input tokens cleared. gwyn posts each applied edit. A part of the clearing reserve equal to the cleared tokens over the threshold, capped at one, buys the coin and burns it.

The model's only defense against a clear is its memory. Anything it copies into /memories before the edit is kept and gains a lock. Anything it leaves in a tool result is gone from its view, and the size of what it lost is the size of the burn.

clear burn = clearing reserve × min(1, cleared input tokens / 100,000)

The worker

A Solana program cannot call an API, so one off chain worker sits between the two. It watches the mint for trades, appends the user turn, sends the request, carries out memory commands as transactions, and posts the commit and the route. It holds the API key. It does not hold the reserves, the locks or the pool, which sit in program accounts and move only by the rules above.

The worker is trusted for one thing: relaying what the API returned. Three things limit that trust. The signature must be genuine for the next request to succeed. The commit must precede the route. And the raw response of every turn is kept, with its message id listed, so the counts on this site can be compared against the response they came from.

No clock

Nothing in gwyn runs on a schedule. There are no epochs, no daily jobs and no snapshots. A turn happens because a trade happened. A memory write happens inside a turn. A clear happens when the transcript, which grows only through turns, crosses its threshold. The five minute life of the cache is the one duration in the system, and it belongs to the API. gwyn does not act when it expires. The next trade simply finds the cache cold.

Accounts

These are the accounts the mechanism uses. Each links to Solscan. A cell is empty until the account exists.

mint
program
memory account
inference reserve
hold account
clearing reserve

Reading this site

The number at the top of the front page is the value of the whole supply in dollars and updates every second. The small chart beside it covers the last four hours. The figure on the front page is drawn from the characters of the mint address and has no market meaning. Every table on the other pages is read from chain data as it is posted and shows the newest 200 rows. A cell with nothing in it means there is nothing to show yet. The site never fills a gap with a stand in.