Referral Contract
Registration, upgrades, basis-point splits, and deferred ETH claims
Referral Contract
Referral manages registered wallets and independent paid plans on Robinhood Chain. It does not mint FOSNFT collectibles, select recipients, or calculate their allocations.
Initial rates
| Referrer's active plan | Share of a direct referral's payment | Admin share |
|---|---|---|
| $2 plan | 50% | 50% |
| $5 plan | 60% | 40% |
| $10 plan | 82% | 18% |
The referrer's own active plan at payment time determines the split, for both registration and upgrades. The buyer's plan determines the payment amount, not the commission percentage. Without a referrer, 100% goes to the admin. Dollar labels are nominal plan names; exact payment is the configured ETH price.
Specified write interfaces
| Function | Behavior |
|---|---|
register(address referrer, uint256 tier) | Register once with tier 2/5/10 and exact configured ETH payment |
upgrade(uint256 newTier) | Upgrade 2→5, 2→10, or 5→10 for the current price difference |
claim() | Withdraw a referrer's deferred transfer balance |
withdraw() | Withdraw available admin funds without taking deferred user liabilities |
The direct referrer must be registered, cannot be self, and cannot be changed after registration. Zero address means no referrer. A referred registration increments referralCount; the specification does not describe upgrades as new referral registrations.
State and reads
| State | Meaning |
|---|---|
isRegistered | Wallet registration status |
userTier | Wallet's current plan |
referredBy | Fixed direct referrer |
referralCount | Direct registrations referred |
totalEarned | Recorded referral earnings |
pendingWithdrawals | Deferred ETH owed to the wallet |
tierPrice | Configured ETH price for each plan |
tierReferrerBps | Plan's commission rate in basis points |
adminWallet | Admin beneficiary |
Useful reads are getUpgradeCost, getUserInfo, getReferralLink, and adminWithdrawable. The supplied summary does not provide their complete ABI types, so use the verified ABI rather than inventing return tuple layouts. Main specified events are Registered, Upgraded, and PaymentDeferred; event argument signatures are not supplied.
Accounting
cost = tierPrice[newTier] - tierPrice[oldTier]
refAmount = floor(payment * tierReferrerBps[userTier[directReferrer]] / 10000)
adminAmount = payment - refAmountWithout a direct referrer, refAmount = 0. The referrer's active plan at payment time applies to registration and upgrade payments. Later plan changes never recalculate already processed payments. Admin funds must exclude pendingWithdrawals liabilities.
Authority and Verify integration
Owner controls include prices, percentages, admin wallet, and Verify connection. Prices must remain strictly ordered 2 < 5 < 10. When Verify is connected and Referral is an approved minter, initial registration issues a certificate with origin type 5, origin ID 0, and empty URI. Upgrade certificate issuance is not defined.
See public referral examples. Test ETH prices reported in the specification are not production prices. Validate exact amount enforcement, unauthorized reconfiguration, rejected receiver claims, and reentrancy before deployment.