Contract & risk model

Security & Contracts

How ZhenRegistry isolates admin and signing keys on X Layer, enforces holder-bound badges, and handles responsible disclosure.

Source (Sourcify 196)exact_match
Holder gas cap50,000 gas
Ack SLA72h / 7d
01

Contracts & key isolation

Administrative control and verdict signing are strictly separated across distinct keys on X Layer mainnet (chain 196).

ComponentAddressRoleScope
ZhenRegistry0xba2B0f…2C9819Badge registryVerifies EIP-712 signatures, checks live ownerOf, stores seller badges.
Registry Owner0x0b81DB…BdB82cOwnable2StepCan revoke badges, rotate signer, adjust fee and withdraw fees. Renounce disabled.
API Signer0xf29352…a3f045Hot signing keySigns non-danger verdicts only; zero admin or withdrawal rights.
TapeOut Factory0x1f09da…760761Read-only sourceEnumerates every TapeOut processor deployed on X Layer.
FAB-Genisis0x87bfca…c8f9a6Read-only sourceFabX Proof-of-Design processor contract read by the indexer.
ZhenAnchor0xb29e39…a8c006Merkle root anchorStores the Merkle root of each index snapshot. Write-once, blocks only increase.
Anchor Owner0x0b81db…bdb82cOwnable2StepCan replace the anchorer. Cannot change or remove a root already posted. Renounce disabled.
Anchorer0x209149…854a5eHot wallet with a little OKBPosts the root of a newer snapshot after each refresh. Cannot overwrite a root or move funds of the contracts.
02

On-chain guards

EIP-712 seller & domain binding

Every signature binds to chainId 196, ZhenRegistry address, msg.sender, subject, verdictHash, checkedAtBlock, a 256-bit nonce and a 15-minute deadline.

Danger verdicts rejected on-chain

attest reverts with DangerNotBadged if level >= 2, and POST /api/v1/badge/sign refuses any verdict containing hidden findings.

50,000-gas holder auto-lapse

attest and isVerified call processor.ownerOf(id) via assembly staticcall capped at 50,000 gas and 32 return bytes, dropping badges immediately upon transfer.

Monotonicity & permanent revocation

A seller can overwrite their badge only with a strictly newer checkedAtBlock. Revoked subjects revert with SubjectRevoked forever.

03

Known boundaries & disclosure

  • Processor deployer lookup: TapeOut processors do not expose an on-chain deployer getter, so processor badges verify against the indexed creation transaction sender.
  • Buy-back badge reactivation: If a circuit is transferred away and later bought back by the earlier badge recorder, isVerified turns true again under the older checkedAtBlock. Always inspect checkedAtBlock alongside active status.
  • Private reporting: Report issues via GitHub private security advisories. Expect acknowledgement within 72 hours and a status update within 7 days.
In scopeOut of scope
ZhenRegistry signature checks, fee accounting, holder checks, revocationUpstream TapeOut or FabX contracts (report to their owners)
Signing API key handling, injection, SSRF or wrong-verdict indexer bugsCompromised user wallets/browsers or public read API rate limits