$ cryptoforge info referral-system ╔══════════════════════════════════════════════════╗ ║ Referral System ║ ╚══════════════════════════════════════════════════╝ ────────────────────────────────────────────────── Store: Sub Protocol Category: contracts Files: 12 Price: $9.99 Tech: Solidity ^0.8.24, OpenZeppelin v5, Foundry Chains: Ethereum, Arbitrum, Base, Optimism, Polygon ────────────────────────────────────────────────── $ cryptoforge describe referral-system On-chain referral tracking with commission payouts. Referrers earn a configurable percentage of referred subscription purchases. Supports multi-level referrals (up to 2 levels) and batch commission claims. $ cryptoforge features referral-system [+] On-chain referral link tracking [+] Configurable commission rates per tier [+] Multi-level referrals (up to 2 levels) [+] Batch commission claiming for gas efficiency [+] Referral analytics (count, revenue, conversion) [+] Anti-gaming: self-referral prevention [+] Minimum payout thresholds [+] Full Foundry test suite with referral chain scenarios $ cryptoforge preview referral-system ────────────────────────────────────────────────── // SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Referral System /// @notice On-chain referral tracking with commission payouts. contract ReferralSystem { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package } ────────────────────────────────────────────────── $ _