How itworks.
What the contract does with a digit, what it keeps, what it costs, and who can do what.
1 · the arithmetic
Each of the 10 neurons sums its 64 weights times the 4-bit pixels, an integer softmax turns the sums into probabilities, and a lesson moves every weight a pixel touches; if the network still reads the digit wrong it takes another step, 2 at most, all in 16-bit integers with no floating point.
z[o] = sum(w[i][o] × x[i]) + 16 × b[o]
p = softmax2(z)
scale 65,536
E[o] = (o = label ? 65,536 : 0) - p[o]
w += (E × x + 512) >> 10
b += (E + 32) >> 62 · what is stored where
65 storage slots hold a model's 650 numbers; every lesson adds a row (sample, label, teacher, block) and the hash of the 1,300 bytes of weights it made, all readable with a plain call.
3 · gas, measured
| operation | gas | at today's gas price | what it is |
|---|---|---|---|
| teach | 401,882 | — | one lesson, the mean of 3,000 |
| teachBatch | 161,052 | — | per lesson, 32 in one transaction |
| fork | 1,566,346 | — | copy any past version |
| forkHead | 1,679,802 | — | copy the head |
| predict | 122,731 | free | a read-only call |
| evaluate | 2,185,450 | free | the score on all 200 benchmark digits, read-only |
Gas measured on a local chain running the deployed bytecode; the cost column is the gas times the gas price BSC Testnet reports now, and read-only calls cost nothing.
4 · why anyone can replay it
Every version comes from the genesis seed (or a forked version) and the lessons in order, and the contract stored each version's hash: your browser reads the lessons with modelInfo, lessonsRange and hashesRange, runs the same arithmetic and compares hash after hash. Replay a model to watch it happen.
5 · the benchmark and its limits
200 handwritten digits from the test set of the UCI data, 20 of each, stored as the code of a data contract; the benchmark is public, so a score is a yardstick, not a proof, and nothing pays out on it.
6 · bad lessons, and forks
Anyone who may teach the main model can teach it a wrong label, and a run of them pulls its score down; nothing is deleted, any earlier version can be forked, and the owner can make such a fork the main model.
7 · the holder gate
Teaching the main model can be limited to holders of the token: the contract checks the teacher's balance at the moment of the lesson, and nothing more.
- gate token
- —
- minimum balance
- —
8 · the token and the treasury
The token is a tax token: its buys and sells pay a trading tax, which the launchpad's tax processor forwards to the treasury contract. Trading tax goes to the project's treasury contract; the developer wallet can withdraw its BNB.
- received so far
- —
- owner
- —
9 · the contracts
- network
- BNB Smart Chain Testnet, chain 97
- benchmark data
- 0x22aF0C6dFFcD60C86D57EeeCB27395Ec89f89362
- deployer and owner
- 0x1B3b5D45Fe31116dE19f0360D9513b2C0Fe3FBdD
- main model
- 1, genesis seed 3
colophon
The plates are drawn by code from the network's own weights and lessons at block 136,274,299, and redrawn in your browser from the chain as it is now; the digits come from the Optical Recognition of Handwritten Digits data set by E. Alpaydin and C. Kaynak (UCI Machine Learning Repository, 1998, CC BY 4.0); the type is Newsreader by Production Type and IBM Plex Mono by IBM, both under the SIL Open Font License.