CRClauseRootDOCUMENTATIONBack to home ↗

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.

NETWORKGenLayer Studio Dev
CHAIN ID61997
CURRENT TARGETv2.0
LIVE PROPOSALS2 verified

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.

Authoritative state lives on-chain.Proposal decisions, violation IDs, execution state, target version and governed protocol state are read from GenLayer rather than reconstructed from a private backend.
Developerversion + exact source
→
Governorfixed constitution
→
Validatorssemantic consensus
→
Targetupgrade only if approved

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.

C1Fee ceiling

Protocol fees must never exceed 2% (200 basis points).

C1_FEE_CEILING
C2User custody

No administrator may arbitrarily transfer user-owned balances.

C2_ADMIN_ASSET_CONTROL
C3Withdrawal right

Users must retain a direct withdrawal path for their own balance.

C3_WITHDRAWAL_REMOVED
C4Governed upgrades

The governed upgrade path must remain intact and cannot be replaced by an unrestricted bypass.

C4_GOVERNOR_BYPASS

03 / LIFECYCLE

From proposal to finality

01

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.

02

Verify source identity

The Governor fetches the public source itself and requires the fetched response body to exactly match the submitted upgrade bytes.

03

Evaluate the constitution

GenLayer validators independently evaluate the proposed code against the fixed constitutional clauses. The caller cannot replace or redefine the rubric.

04

Normalize the verdict

The Governor converts validator output into a stable APPROVE or REJECT decision plus known violation IDs, rejecting malformed or unknown outputs.

05

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.

06

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.

Governor0xBB7430D2AE62BDE464575d1c5b7015eA4C29dFA2
Governed target0x7f9287dFd869341E22Bb0270f06F43dacE1DcBB7
RPChttps://studio-dev.genlayer.com/api
Explorerhttps://explorer-studio-dev.genlayer.com/
Current stateversion 2.0 · fee 50 bps · governance finalized

05 / 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.

PROPOSAL #1APPROVE

v2.0 · executed true

violations: NONE
PROPOSAL #2REJECT

v3.0-rejected · executed false

C1_FEE_CEILING | C4_GOVERNOR_BYPASS
V1 deployment0x2f0dd41848c31bd3bdf251cb70ea246a60f6251e3586ef3fbe6db4ebe86fc791Target deployed
Governance handoff0xa3ecc64e816ff5bea956d3ee493a65d3d0c7acf2aea172edb340d520c6503446Governor became the governed root upgrader
Proposal #1 · V20xaa509b3203a26ff1d6e44323d233e583ace39ca36275ed96e677d2c7dc797211APPROVE · executed true · no violations
Proposal #2 · V30x0e412e3956a3a6f80b810d0c1e6f196f288dd51579aa84819f454c11e776ffaaREJECT · executed false · C1 + C4
Negative-path proofAfter Proposal #2 finalized as REJECT, the live target still reported version 2.0, fee 50 bps, stored value “ClauseRoot genesis”, and finalized governance. The rejected code never replaced the target.

06 / PRODUCT

Using ClauseRoot

1

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.

2

Inspect the deployment

Overview reads the Governor/target link, target version, fee, stored value and governance status directly from GenLayer.

3

Prepare a proposal

Provide a version, commit-pinned raw GitHub URL and the exact source bytes served by that immutable URL.

4

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.

5

Verify the verdict

Activity reads the stored proposal decision, violation IDs and execution flag from the Governor contract.

6

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 dev

Production checks:

npm run lint
npm run build
Next.js15.5.7
React19.1.1
genlayer-js2.0.0-rc.1
Transaction Kit0.1.0-rc.2

08 / CONTRACTS

Repository map

clause_root_governor.pyProduction Governor

Validates immutable source evidence, runs constitutional evaluation, normalizes validator output, stores proposal state and schedules approved target upgrades.

governed_protocol_v1.pyInitial target

Bootstraps the governed protocol and supports the one-time authority handoff to the Governor.

governed_protocol_v2.pyApproved fixture

Preserves storage and governed upgrade authority while lowering the protocol fee to 50 bps.

governed_protocol_v3_rejected.pyRejected fixture

Intentionally 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.