TribFi Protocol Documentation • Base Mainnet

TribFi Protocol Whitepaper

The decentralized architecture for fair-launch community tokens, zero-rug locked liquidity, and lifetime creator rewards on Base. Built with fixed 1 Billion token supplies, 5% anti-snipe limits, and permanent non-custodial smart contracts.

Section 12 • SocialFi, Gaming & Community Utilities
~6 min read•12 of 20

Tribe Mini-Games: Commit-Reveal VRF Duel Engine & Deflationary Burns

Permanent block entropy, multi-token duels (Coinflip, Dice, RPS), and automated house fee burn

1. 3-Phase Commit-Reveal VRF Architecture

MiniGamesEcosystem.sol provides an on-chain PvP and PvE mini-games engine. To guarantee mathematical fairness without paying expensive off-chain oracle fees, it employs a 3-phase Commit-Reveal scheme.

  1. Phase 1 (Creation): Player 1 commits their secret move hash: keccak256(choice, salt).
  2. Phase 2 (Join): Player 2 commits a secret seed: keccak256(secret). The contract permanently locks block entropy.
  3. Phase 3 (Settle): Player 1 reveals their salt and choice. The contract computes the deterministic outcome.

2. Permanent Block Entropy & Anti-Cheat

Standard Ethereum blockhash lookups become 0 after 256 blocks (~5 minutes), causing unrevealed games in other protocols to brick. TribFi solves this by capturing and permanently storing block entropy in state during Player 2's commit:

commitEntropy = keccak256(blockhash(block.number - 1), block.prevrandao, block.timestamp, player2, player1);

3. Supported Game Types (Coinflip, Dice, RPS)

Supports binary games (Coinflip, Rock-Paper-Scissors, Red/Black, High/Low), 6-sided Dice duels, 2-dice Craps, Card draw battles, and 1–100 Percentile battles.

4. Deflationary Burn & Freeplay Faucets

House fees (default 3.0%, capped at 10%) are automatically sent to BURN_ADDRESS (0x0...dEaD) when burnHouseFee is active. This permanently reduces token supply whenever tribe members play. A daily Freeplay Faucet provides 1,000 credits for risk-free training.