Architecture
The pieces of Sillu, what each one may do, and what depends on what.
The pieces
| Contract | Job | Holds money | Who can change it |
|---|---|---|---|
SilluTreasury | Created the Sillu processor and is its creator for good. Forwards the processor's part income to one fixed payout address. | Passes BEM through | Nobody. No owner, no admin. |
LessonBook | The list of lessons: pin counts, limits, and the tests a chip must pass, stored on chain. | No | The operator can add a lesson and retire one. A lesson can never be edited. |
Fab | The only door to a Sillu chip. Buys the parts, tapes out, records who made the chip, hands it over, and sends it to the Grader. | A BEM float, an OKB float, OKB income | The operator sets prices, which lessons are free, the daily free cap, the relay address and a ceiling on one chip's BEM cost, can pause it, and can withdraw income and float. It cannot change who made a chip. |
Grader | Runs a chip against its lesson's tests on chain and records the result. Marks the first chip of each design. Keeps the smallest passing chip per lesson. | No | Nobody. A result, once written, stays. |
Credential | One token per learner per lesson passed, which cannot be moved. | No | Nobody. Only the Grader can issue, and nothing can revoke. |
None of the five can be upgraded. Their addresses are fixed into each other when they are deployed: the Grader's constructor checks that the Credential names it, and the Fab's checks that the Grader names it. A change of rules means new contracts beside the old ones, whose records stay valid.
What depends on what
Read an arrow as "needs". The Credential trusts only the Grader. The Grader trusts only the Fab for who made a chip, and TapeOut for what the chip computes. The Fab and the Grader are deployed as a pair that name each other, so neither can be swapped out from under the other.
The path of one lesson through these pieces, step by step, is drawn in How it works.
The relay
The relay exists only for the free lessons. It checks who is asking, then submits the learner's signed design and pays the gas. It holds no power over results: it cannot name a chip's maker, pass a chip or move the float. The paid path does not touch it.
It is a Cloudflare Worker. For each request it checks the sign-in tokens against the sign-in provider's published keys, recovers the signer of the design, requires that signer to be a wallet of the signed-in learner, counts the request per learner, per wallet and per network address, checks every condition the Fab will check, simulates the call, and only then sends it from its own wallet, one transaction at a time. Any failure answers a fixed code and sends nothing.
| Endpoint | What it does |
|---|---|
POST /v1/free-tape-out | Headers Authorization: Bearer <access token> and privy-id-token. Body { design, signature, netlist }. Answers { txHash, circuitId } once mined, or { error: CODE }. |
GET /v1/health | 200 when the chain endpoint and both counters answer. |
The website
The site is a static export: plain files with no server behind them, so it can be published on TapeOut's DeWEB. Every number it shows is read from X Layer by the reader's browser.
| Page | What it reads | What it writes |
|---|---|---|
| A lesson | The lesson and its tests from the LessonBook; the price and free tries from the Fab; the signed-in wallet's passed chips, which become the blocks it may place | A signed design to the relay (free), or Fab.tapeOut with the price (paid); Grader.grade for a sampled lesson |
| The course | Every lesson, its price and whether it is free; for a signed-in wallet, the chips it made | Nothing |
| Verify | A wallet's passes, the chips and their wiring, the lesson's tests, then eval or step to run the chip | Nothing |
Money
| Flow | Coin | From | To |
|---|---|---|---|
| Lesson price, paid lessons | OKB | Learner | The Fab: 0.0013 goes on to TapeOut as the tape-out fee, the rest is Sillu's income |
| Fee per parts purchase, 0.01 BEM | BEM | The Fab's BEM float | TapeOut, which burns half |
| Part price, one base unit per part | BEM | The Fab's BEM float | SilluTreasury, then the payout address |
| Tape-out fee on free lessons, 0.0013 OKB | OKB | The Fab's OKB float | TapeOut |
| Gas on free lessons | OKB | The relay's own wallet | X Layer |
The Fab keeps three ledgers that never mix: OKB income, OKB float and BEM float. A learner on the paid path holds only OKB. A learner on the free path holds nothing. Income and float can leave only to one payout address fixed when the Fab was deployed.