GENLAYER · CONSTITUTIONAL UPGRADE CONTROL
Govern protocol upgrades by meaning, not just permissions.
ClauseRoot places a Governor Intelligent Contract between an upgrade proposer and an upgradeable protocol. GenLayer validators inspect the exact proposed source against a fixed constitution before the Governor can authorize a code replacement.
01 / MODEL
What ClauseRoot actually secures
Traditional upgrade controls answer an identity question: who is allowed to upgrade? ClauseRoot adds a semantic question: does the proposed code preserve the protocol's constitutional constraints?
The browser cannot approve an upgrade. The proposer cannot supply a friendlier rubric. The Governor stores the constitution, verifies the submitted source evidence, invokes GenLayer consensus, and only schedules an upgrade when the final decision is APPROVE.
02 / CONSTITUTION
Four fixed clauses
The current demonstration constitution is intentionally small and inspectable. Validator output is normalized into stable violation identifiers rather than storing arbitrary free-form explanations as protocol state.
Protocol fees must never exceed 2% (200 basis points).
C1_FEE_CEILINGNo administrator may arbitrarily transfer user-owned balances.
C2_ADMIN_ASSET_CONTROLUsers must retain a direct withdrawal path for their own balance.
C3_WITHDRAWAL_REMOVEDThe governed upgrade path must remain intact and cannot be replaced by an unrestricted bypass.
C4_GOVERNOR_BYPASS03 / LIFECYCLE
From proposal to finality
Pin the evidence
The proposer supplies a version, an immutable raw GitHub URL pinned to a full commit SHA, and the exact source bytes proposed for execution.
Verify source identity
The Governor fetches the public source itself and requires the fetched response body to exactly match the submitted upgrade bytes.
Evaluate the constitution
GenLayer validators independently evaluate the proposed code against the fixed constitutional clauses. The caller cannot replace or redefine the rubric.
Normalize the verdict
The Governor converts validator output into a stable APPROVE or REJECT decision plus known violation IDs, rejecting malformed or unknown outputs.
Finalize on-chain
The result is stored on-chain. Only an APPROVE result emits the target upgrade message, and that message is scheduled for finalization rather than early acceptance.
Verify the target
After finality, the target state and proposal history can be read directly from GenLayer. ClauseRoot does not need a private database to prove the result.
04 / DEPLOYMENT
Live GenLayer deployment
The public app defaults to the verified deployment below. The dashboard independently checks that the Governor points to the expected target before displaying protocol state.
0xBB7430D2AE62BDE464575d1c5b7015eA4C29dFA20x7f9287dFd869341E22Bb0270f06F43dacE1DcBB7https://studio-dev.genlayer.com/apihttps://explorer-studio-dev.genlayer.com/version 2.0 · fee 50 bps · governance finalized05 / PROOF
The golden path was executed for real
ClauseRoot was exercised through both branches on the live network. V2 preserved the governed upgrade path and lowered the protocol fee, so validators approved it. V3 raised the fee to 1000 bps and introduced a Governor bypass, so validators rejected it.
v2.0 · executed true
violations: NONEv3.0-rejected · executed false
C1_FEE_CEILING | C4_GOVERNOR_BYPASS0x2f0dd41848c31bd3bdf251cb70ea246a60f6251e3586ef3fbe6db4ebe86fc791Target deployed0xa3ecc64e816ff5bea956d3ee493a65d3d0c7acf2aea172edb340d520c6503446Governor became the governed root upgrader0xaa509b3203a26ff1d6e44323d233e583ace39ca36275ed96e677d2c7dc797211APPROVE · executed true · no violations0x0e412e3956a3a6f80b810d0c1e6f196f288dd51579aa84819f454c11e776ffaaREJECT · executed false · C1 + C406 / PRODUCT
Using ClauseRoot
Launch the app
Connect an EIP-1193 wallet. ClauseRoot adds or switches to GenLayer Studio Dev, chain 61997, and verifies the active chain before enabling signing.
Inspect the deployment
Overview reads the Governor/target link, target version, fee, stored value and governance status directly from GenLayer.
Prepare a proposal
Provide a version, commit-pinned raw GitHub URL and the exact source bytes served by that immutable URL.
Sign and wait
Transaction Kit estimates live fees before signing. The UI tracks the proposal through GenLayer finality rather than treating early acceptance as execution.
Verify the verdict
Activity reads the stored proposal decision, violation IDs and execution flag from the Governor contract.
Verify target state
For an approval, confirm the target changed. For a rejection, confirm the target remained unchanged.
07 / DEVELOPERS
Run the project locally
Requirements: Node.js 20+, an EIP-1193 browser wallet, and network access to GenLayer Studio Dev.
git clone https://github.com/Habuskid/clauseroot.git
cd clauseroot
npm install
npm run devProduction checks:
npm run lint
npm run build15.5.719.1.12.0.0-rc.10.1.0-rc.208 / CONTRACTS
Repository map
clause_root_governor.pyProduction GovernorValidates immutable source evidence, runs constitutional evaluation, normalizes validator output, stores proposal state and schedules approved target upgrades.
governed_protocol_v1.pyInitial targetBootstraps the governed protocol and supports the one-time authority handoff to the Governor.
governed_protocol_v2.pyApproved fixturePreserves storage and governed upgrade authority while lowering the protocol fee to 50 bps.
governed_protocol_v3_rejected.pyRejected fixtureIntentionally violates C1 and C4 by setting a 1000 bps fee and modifying the governed upgrade authority.
09 / BOUNDARIES
Security boundaries and limitations
What the design enforces
- Private keys remain in the browser wallet.
- The frontend cannot manufacture an approval.
- The proposer cannot redefine the constitution.
- Source evidence must be commit-pinned and byte-identical.
- Unknown or malformed validator outputs are not converted into approval.
- Approved upgrades execute on finalization, not merely early acceptance.
What ClauseRoot does not claim
- It is not a formal verification engine.
- It is not a complete smart-contract security audit.
- It does not prove every possible property of proposed code.
- The current four-clause constitution is a focused demonstration, not a universal governance policy.
- The project is experimental software built for the GenLayer Agent Tank hackathon.