What could exist?
Mine the model’s latent design space. Give every ambition a body. Learn the language of the problem by building too much of it.
A field guide to deliberate rewrites
We built a market protocol twice before reaching for formal methods. That was not a detour. It was how the object became visible.
The first build mined possibility. The second extracted constraints. The third is turning those constraints into machine-reasonable semantics—and will probably deserve to be composted too.
Thesis
A prototype is not a smaller product. It is an instrument for discovering what the product is.
The usual advice is to plan to throw one away. But throwing away code discards only the implementation; it says nothing about what must survive. Compost is a better metaphor. The structure breaks down. The nutrients—requirements, invariants, counterexamples, measurements, vocabulary—return in a form the next system can actually use.
Mine the model’s latent design space. Give every ambition a body. Learn the language of the problem by building too much of it.
Reason against the whole, now-visible shape. Separate essential constraints from the accidental machinery that first revealed them.
Make the semantics executable, the interfaces structural, and the assurance boundary precise—without sanctifying the third prototype.
Dragon’s Clutch / the latent-space build
At the beginning, the design existed as ambition, analogy, and pressure in a series of prompts. The only way to argue with it was to give it mass.
The first Dragon’s Clutch tried to hold the whole thought at once: categorical claims, structured payoffs, direct trading, batch clearing, dealer liquidity, real oracle resolution, funding, recovery, replay, retirement, operators, and a user interface. A swarm pulled possibility out of language and made it compile.
This kind of first build is not architecture in the mature sense. It is excavation. The design is still haunted by “illusory ghosts”: requirements that sound necessary only because no complete system exists yet to contradict them. So we materialized the ghosts—roughly fifty protocol accounts, a cumulative 51-action namespace, many lifecycle families—and watched what they did.
The excess was productive. It revealed hard things that had been easy to blur in prose: collateral and liveness funding are different substances; resolution failure needs a real outcome; a state partition must be canonical before it can mint liabilities; a clearing candidate can be valid without being globally optimal; retirement and replay need an owner.
It also revealed accidental things: semantic separation had become separate rent-bearing accounts; the internal workflow graph had become the public protocol; old and successor authorities coexisted; mocks persisted after their questions were answered; project lanes became an archipelago.
Sometimes we just need to build a bad first version, before you can understand what I’m trying to say in my prompts.
Project conversation · 24 August 2026
A liability is meaningful only when its backing, custody, and conservation rule are explicit.
Duplicated account projections cannot become parallel authorities for the same persisted fact.
Rerunning evidence is not progress when known lifecycle gaps remain unimplemented.
Agent isolation is useful only until its seams start shaping the protocol itself.
dClutch / the constraint build
The second implementation did not begin from the old module tree. It began from the facts the old tree had made impossible to ignore.
The fresh repository was a change in conduct as much as code. Dragon’s Clutch became compost, not a compatibility target. The new universal core became small. Trading, clearing, liquidity, transferable claims, and resolution became optional capabilities. Direct signed trading became the ordinary path; sophisticated batch clearing became a venue rather than the ontology of every market.
Provider data stopped being a mock authority. Product became the single owner of its finite result domain, including the failure outcome. Funding became typed: collateral, rent, liveness, fees, reserves, and bounties could no longer borrow each other’s names or balances. A small terminal root could retain replay authority instead of an elaborate closing ritual recovering every lamport.
This is why a second build can be more intelligent than a refactor. We could now reason against the entire visible shape, compare it to other protocols, and distinguish an essential market invariant from the scar tissue of the first route that happened to implement it.
But the second build also became a new instrument. Rust const generics specialized widths, actions, codecs, and account frames into machine code. The semantics were cleaner; the artifact was not. A complete old-style monolith grew past ten megabytes when every supposedly implemented capability was finally made reachable.
Our protocol seems shaped kinda weird right now. I wonder if we did folly.
Project conversation · 24 August 2026
Binary size was not an optimization footnote. It was the ontology leaving a footprint.
The dominant cause was repeated N=2…16 monomorphization across General, Dealer, Structured, Bearer, and Position machinery—not debug information and not one unusually bad function.
The second system found the next true constraint: put what varies in data; keep only universal invariants in code.
The formal turn / a semantic specializer
The third build starts over again—this time with better instruments and fewer excuses.
The promising architecture is not “write the same protocol in Lean,” and it is not “have Lean print a great deal of Rust.” Either could reproduce the same forest more ceremonially. The semantic source should instead emit compact canonical data: typed schemas, transition bytecode, certificates, builders, hostile vectors, and proof obligations.
A small fixed-memory interpreter can execute the variable part. Small physical adapters can own the irreducibly Solana-shaped parts: signatures, account memory, token custody, provider calls, and CPI postconditions. Translation validation can compare the generated semantics to the safe-Rust interpreter and then pin the exact SBF artifact path.
This is “ABI via data structures” with consequences. The account frame stops being forty handwritten positional beliefs. A market transition stops being one more action number. Product widths stop multiplying the binary. The same semantic object can drive the onchain checker, operator, interface, documentation, tests, and machine proofs.
And the third attempt is still a prototype. Formal technology does not make an immature language good, a narrow theorem broad, or an adapter trustworthy. It lets us name the claim, its digest, its assumptions, and the boundary where ordinary engineering resumes. That is higher assurance—not absolution.
Lean-owned economic transitions, canonical bytecode, typed schemas, boundedness and conservation certificates.
One reusable safe-Rust interpreter plus narrow claims, custody, resolution, and runtime adapters.
The current work is a proof-producing successor architecture, not a claim that dClutch is formally verified. Individual theorems cover named semantic transitions and generated artifacts. Rust decoding, the interpreter, compiler path, SBF runtime, Solana, CPI programs, and operational deployment remain separately measured or explicitly trusted until each connection is established.
Plan to throw one away.
Plan to compost at least three.
“Three” is not a magic number or a release plan. It is permission to stop defending an implementation merely because it taught us something expensive.
Compost is selective continuity. Keep the knowledge that survived contact with reality. Let the machinery that merely carried it lose its privileged place.
A repeatable development loop
Swarm widely enough to force interactions into the open. Then converge at semantic interfaces before the temporary work graph becomes product architecture.
A build, benchmark, test, or proof earns its place by closing uncertainty. Repetition without an implementation decision is validation theater.
A formal prototype can be wrong in more disciplined ways. Its artifacts should make the fourth build easier—not make the third impossible to question.
The numbers are not victory banners. They are traces of learning. Each measurement is paired with the limitation that keeps it honest.
The first architecture made its internal workflow graph public.
Useful semantic inventoryThe second architecture made product width and capability breadth into repeated machine code.
Negative evidence, not a releaseController, claims executor, and custody adapter executed one real signed Direct fill.
Architecture proof, not parityTyped schemas and transition programs begin replacing repeated ABI beliefs.
Still crossing trust boundariesThe project is not the current tree
A protocol becomes legible by surviving implementations that are allowed to die. The ambition is continuous. The code is seasonal.
On 25 August, the dClutch history was grafted back beneath Dragon’s Clutch as a subtree. The compost and its successor now share a literal history without pretending they share one architecture. That feels about right.