Skip to content

feat(contracts): implement Governance and Model Attestation contracts (#363) - #368

Draft
s6pa1rta3n-lab wants to merge 1 commit into
nexoraorg:mainfrom
s6pa1rta3n-lab:fix-issue-363
Draft

s6pa1rta3n-lab wants to merge 1 commit into
nexoraorg:mainfrom
s6pa1rta3n-lab:fix-issue-363

Conversation

@s6pa1rta3n-lab

Copy link
Copy Markdown

Summary

Resolves #363.

Implements the Governance and Model Attestation contracts for Chenaikit on Soroban, completing the on-chain model lifecycle management and parameter governance layer.

Key Deliverables

  • Governance Contract (contracts/governance):
    • Configurable proposal threshold, voting periods, quorum requirements, and execution timelock delay.
    • Lifecycle state machine: Active, Defeated, Succeeded, Queued, Executed, Cancelled.
    • Typed proposal actions: AuthorizeModel, AddOracleWriter, RemoveOracleWriter, SlashNode, ChangeConfig, Custom.
    • Timelock-enforced cross-contract execution dispatching.
    • Unit tests covering proposal creation, quorum checks, majority checks, double-voting rejection, timelock enforcement, cancellation, and cross-contract executions.
  • Model Attestation Contract (contracts/model-attestation):
    • Model provenance and attestation lifecycle: Created, Active, Deprecated, Invalidated.
    • Multi-version model tracking with automatic deprecation of previous active versions upon new attestation.
    • Governance authorization enforcement and admin handoff capabilities.
    • IPFS/URI metadata association and 32-byte weights hash verification.
    • Unit tests validating full lifecycle transitions and unauthorized transition rejections.
  • Common Utils (contracts/common-utils) & Cross-Contract Integrations:
    • Shared error categories mapped to Soroban contract errors.
    • Extended oracle-network and credit-score with governance administration endpoints.
    • Added bounded ring buffer collection utilities and standardized role helpers.

Test Coverage

All crates in contracts/ pass cargo test, cargo clippy --all-targets -- -D warnings, and cargo fmt --all --check:

  • common-utils: 9 passed
  • credit-score: 3 passed
  • fraud-detect: 62 passed
  • governance: 9 passed
  • model-attestation: 16 passed
  • oracle-network: 11 passed

Payout Routing

  • EVM (Base/Arbitrum/Polygon/ETH): 0xF46C9F6d70C50BF81ef3588AB523a90a594a2F89
  • Stellar: GCL6OXAMLD75BMTINA6EMRUDWK5THQUSHMYNLSNBCJAPZJHNYJTUNIBC

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

@s6pa1rta3n-lab is attempting to deploy a commit to the Isaac Gellu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Governance + Model Attestation contracts

1 participant