File
A member files an amendment, grant, admission or expulsion and attaches exactly the bond. The charter, roster and treasury are frozen into the motion.
RATCHET is a small assembly that governs itself through a written charter of tiered articles. Every motion needs a supermajority that grows with how entrenched the articles it touches are, and GenLayer’s AI validators must agree exactly on what “touches” means.
One motion is on the floor at a time. It is filed with a bond, classified by AI validators, voted on, can be challenged once, then settled by plain code.
A member files an amendment, grant, admission or expulsion and attaches exactly the bond. The charter, roster and treasury are frozen into the motion.
Validators answer one yes/no question per article: would this motion touch it? They must match exactly. The tier is computed in code.
The tier sets the threshold: majority, two thirds, four fifths or unanimity of the frozen roster. A passing count never ends voting early.
Think the first reading was too lenient? Post a bond. An inclusive re-read can raise the tier, never lower it and pays you a bounty.
Anyone can finalize. The effect applies, bonds return, payouts become pull balances. No owner, no admin, no upgrade path.
Turn the wheel to harden a motion’s tier. Then try to turn it back: the pawl will not let you. That is the whole idea of the contract.
Tier 1 · ORDINARY: a strict majority is enough.
Booleans, tiers, thresholds: every decision-bearing value must be identical between leader and validators. No tolerance band. Only the free-text reason may differ.
A challenge can only add touched articles. Entrenchment grows, it never loosens, and weakening an entrenched article needs that article’s own supermajority.
Bonds are escrowed. A successful challenger wins their bond back plus half of the proposer’s. A motion nobody votes on forfeits its bond to the commons.
Payouts credit a balance; people withdraw() themselves, so a failing recipient can never block the assembly. Bounced transfers return to the treasury.
One contract file. No owner, no upgrade path, no off-chain authority. Parameters are fixed at deployment and the charter changes only through motions.
get_ledger proves the contract balance covers treasury + escrow + claimable at all times. Tested with 190 tests and 49 mutants.
A 2½-minute walk-through: connect a wallet, switch network, file a motion, watch the validators classify it, vote, then challenge it and see the tier tighten.
The recording uses the site’s built-in simulation mode (try it yourself) so nothing costs gas. The live pages talk to the deployed contract.

Mochi is the GenLayer cat who watches every motion. Click the bubble for a tip, or open the docs to learn how tiers, bonds and challenges fit together.
Connect your wallet on Studionet, file a motion, or challenge one that looks too lenient.