kolmogorov
a measurement made on the chain by the chain
in 1965, a soviet mathematician named Andrey Kolmogorov defined a number that measures how compressible a string is. the smaller the number, the more pattern the string contains. a market is a string.
when the trades on a token follow a hidden schedule, the string becomes compressible. when they do not, the string resists every algorithm thrown at it. the protocol below is the first attempt to compute this number on chain in real time. it does not always succeed. when it does, the result is a single decimal between zero and one.
the program lives at a single address on solana mainnet. it is registered as a token-2022 transfer hook on the kolmogorov mint, which means it runs on every transfer of the token regardless of which application initiated the transfer. on each invocation it appends the (slot, source, destination, amount, active_price) tuple to a 512 entry circular buffer stored in a program derived address. the buffer is a fixed length binary string.
the program then estimates the kolmogorov complexity of the buffer using lempel-ziv parsing. shorter compressed lengths mean lower complexity, which means hidden structure is present. the result is stored alongside the buffer as the running K(x) estimate.
fig. 1 — the surcharge function σ(K) = α · (K − 0.853)². swaps that arrive while the complexity estimate sits at the natural reference pay nothing extra. swaps that arrive while the estimate has drifted either direction pay a quadratically growing surcharge.
the chart above is the input. the protocol does not look at this chart the way a person does. it looks at the binary encoding of it and asks whether the encoding can be made shorter.
when the K(x) estimate drops below a hardcoded reference of 0.853, the protocol treats the deviation as evidence that hidden structure is present in the trade stream. it computes the squared distance between the current estimate and the reference. that distance becomes the surcharge applied to the transfer that triggered the measurement. the surcharge is taken from the input amount of the transfer through the token-2022 hook's standard return value.
the surcharge is routed to a vault. the vault is a single program derived address shown in the right column of this page. anyone with a solana rpc connection can read its balance directly.
fig. 2 — the 512-entry circular buffer of recent transfers (left) and the lempel-ziv dictionary the protocol builds from it (right). when the dictionary is short relative to the buffer, the trade stream is compressible, which means hidden structure is present and the surcharge fires.
the distribution of trades across time is one of the inputs to the K(x) estimate. when the distribution is flat, the stream looks random and the complexity is high. when the distribution is spiked, the stream contains structure and the complexity drops. the protocol responds to the second case by firing the surcharge.
kolmogorov was deployed and immediately sealed. the upgrade authority was revoked in the same session as the deployment. the natural reference complexity of 0.853 is a hardcoded constant compiled into the binary. the lempel-ziv parameters, the buffer size, the surcharge curve, and the vault address are all part of the sealed code.
there is no admin key. there is no migration function. the only mutable state on chain is the circular buffer, the K(x) estimate, and the vault balance, all of which are overwritten by the next transfer regardless of who sends it.
