Skip to content

feat(contracts): referral commission splitter and on-chain model checkpoint attestation - #1168

Merged
chinweobtagaz merged 1 commit into
OpenKnight-Foundation:mainfrom
bobaivigitalpoint-ui:feat/sc-54-ai-41-referral-attestation
Aug 30, 2026
Merged

feat(contracts): referral commission splitter and on-chain model checkpoint attestation#1168
chinweobtagaz merged 1 commit into
OpenKnight-Foundation:mainfrom
bobaivigitalpoint-ui:feat/sc-54-ai-41-referral-attestation

Conversation

@bobaivigitalpoint-ui

@bobaivigitalpoint-ui bobaivigitalpoint-ui commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Two new Soroban smart contracts.

Changes

SC-54 — Decentralized Referral & Affiliate Commission Splitter (#1154)

  • contracts/referral_splitter/: new Soroban contract
  • register_referral(referee, referrer) — permanent on-chain binding; self-referral rejected; second registration rejected
  • settle_wager(referee, amount) — automatically splits configured commission (basis points) to referrer; emits ref_earn event
  • get_earnings(referrer) — cumulative referrer earnings query
  • Commission configurable at initialization (default pattern supports 10% = 1000 bps)

AI-41 — On-Chain Model Checkpoint Hash Attestation (#1155)

  • contracts/model_attestation/: new Soroban contract
  • attest(submitter, model_id, hash, tournament_id) — immutable SHA-256/Blake3 hash registry with ledger timestamp; emits attested event
  • verify(model_id, hash) — returns true if hash matches stored attestation
  • get_record(model_id) — full record lookup including submitter and timestamp
  • Both crates registered in contracts/Cargo.toml workspace

Closes #1154, Closes #1155, Closes #1152, Closes #1153

…testation (SC-54 AI-41)

- SC-54: referral_splitter Soroban contract — permanent on-chain
  referee→referrer bindings, configurable commission in basis points,
  settle_wager() splits fee to referrer automatically, self-referral
  rejected, earnings tracked per referrer, referral_earn event emitted
- AI-41: model_attestation Soroban contract — immutable SHA-256/Blake3
  model weight hash registry, attest() records hash+tournament_id with
  ledger timestamp, verify() checks hash matches stored attestation,
  attested event emitted on registration
- Register both crates in contracts/Cargo.toml workspace

Closes OpenKnight-Foundation#1154, Closes OpenKnight-Foundation#1155
@drips-wave

drips-wave Bot commented Aug 29, 2026

Copy link
Copy Markdown

@bobaivigitalpoint-ui Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chinweobtagaz
chinweobtagaz merged commit 15a5a2a into OpenKnight-Foundation:main Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants