Skip to content

feat: Multi-sig disputes, dynamic fee split, spectator tipping, anti-cheat deposits (#977, #978, #979, #980) - #1090

Merged
chinweobtagaz merged 1 commit into
OpenKnight-Foundation:mainfrom
khaadish:feature/khaadish-defi
Aug 26, 2026
Merged

feat: Multi-sig disputes, dynamic fee split, spectator tipping, anti-cheat deposits (#977, #978, #979, #980)#1090
chinweobtagaz merged 1 commit into
OpenKnight-Foundation:mainfrom
khaadish:feature/khaadish-defi

Conversation

@khaadish

@khaadish khaadish commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

khaadish - DeFi & Security Features

Issues Addressed

Closes #977 - Multi-sig Dispute Resolution

  • Created multi-sig dispute system with configurable thresholds
  • Voters can cast For/Against/Abstain votes
  • Dispute resolves automatically when threshold is met
  • Prevents double-voting with address tracking

Closes #978 - Dynamic Fee Split

  • Configurable fee distribution: platform, creator, winner, treasury
  • Basis points allocation (must total 10000)
  • Per-game fee split calculation and storage
  • Flexible reward distribution based on game outcome

Closes #979 - Spectator Tipping

  • Spectators can tip players during live games
  • Optional message with tip
  • Tracks total tips received per player
  • Game-specific tip history

Closes #980 - Anti-Cheat Security Deposit

  • Players deposit security funds before playing
  • Configurable min/max deposit amounts
  • Refund after cooldown period (no cheating)
  • Admin can seize deposits for cheating violations

Changes Made

Contracts

  • contracts/game_contract/src/lib.rs - Added all 4 features

Technical Details

Multi-sig Vote Logic

if dispute.votes_for >= dispute.threshold {
    dispute.resolved = true;
}

Fee Split Calculation

platform_amount = total_prize * platform_fee_bips / 10000;
winner_amount = total_prize * winner_share_bips / 10000;
treasury_amount = total_prize - platform - creator - winner;

Deposit Refund Flow

if current_ledger >= deposit.deposited_at + refund_period {
    // Refund to player
} else {
    return Err(ContractError::DepositLocked);
}

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@khaadish 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 ffd178b into OpenKnight-Foundation:main Aug 26, 2026
1 check failed
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