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 11 • SocialFi, Gaming & Community Utilities
~6 min read•11 of 20

Token Rain & Red Packets: In-Community Multicall Rain & In-Chat Oracle Drops

Atomic batch distributions up to 200 addresses and ECDSA oracle-verified lucky chat packets

1. RainDistributor.sol Architecture

RainDistributor.sol facilitates atomic community airdrops to up to 200 addresses (MAX_RECIPIENTS = 200) in a single transaction. Each recipient transfer is isolated with a 30,000 gas cap, ensuring that a failing receiver address never halts the distribution to other members.

2. TribFiPacketDrop.sol & Oracle Verification

In live community chat rooms, creators and members can drop interactive Red Packets. The creator locks tokens or ETH into TribFiPacketDrop.sol. Active chat participants claim their share by presenting a cryptographically signed voucher from the protocol oracle:

// TribFiPacketDrop.sol - Oracle-Verified Claim
function claimPacket(
    string calldata packetId,
    uint256 amount,
    bytes calldata signature
) external nonReentrant {
    bytes32 messageHash = keccak256(abi.encodePacked(packetId, msg.sender, amount, block.chainid));
    bytes32 ethSigned = MessageHashUtils.toEthSignedMessageHash(messageHash);
    require(ethSigned.recover(signature) == oracleSigner, "Invalid oracle signature");
    require(!claimed[packetId][msg.sender], "Already claimed");
    claimed[packetId][msg.sender] = true;
    _payout(packet.token, msg.sender, amount);
}

3. Equal vs Lucky Pareto Distribution

Drops support two mathematical models:

  • Equal Distribution: Total pot is divided symmetrically among all claimers.
  • Lucky Distribution: Randomized Pareto curve giving participants random variance with rare "Jackpot" shares.

4. Anti-Bot Claim Restrictions & Refunds

The oracle requires verified account age and chat participation before issuing signatures. Creators can call refundPacket() after the claim deadline to recover any unclaimed tokens.