feat(contracts): referral commission splitter and on-chain model checkpoint attestation - #1168
Merged
chinweobtagaz merged 1 commit intoAug 30, 2026
Conversation
…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
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two new Soroban smart contracts.
Changes
SC-54 — Decentralized Referral & Affiliate Commission Splitter (#1154)
contracts/referral_splitter/: new Soroban contractregister_referral(referee, referrer)— permanent on-chain binding; self-referral rejected; second registration rejectedsettle_wager(referee, amount)— automatically splits configured commission (basis points) to referrer; emitsref_earneventget_earnings(referrer)— cumulative referrer earnings queryAI-41 — On-Chain Model Checkpoint Hash Attestation (#1155)
contracts/model_attestation/: new Soroban contractattest(submitter, model_id, hash, tournament_id)— immutable SHA-256/Blake3 hash registry with ledger timestamp; emitsattestedeventverify(model_id, hash)— returnstrueif hash matches stored attestationget_record(model_id)— full record lookup including submitter and timestampcontracts/Cargo.tomlworkspaceCloses #1154, Closes #1155, Closes #1152, Closes #1153