HelioxReferralTreasury
Immutable referrer registry and withdrawal vault for direct referral commissions
The referral treasury stores referrer relationships, tracks claimable balances per token, and lets referrers withdraw credited commissions later. It does not decide the commission rate; that comes fromHelioxConfigs.referralCommissionBps() through HelioxPayments.
Public Surface
| Function | Role |
|---|---|
| referrerOf(user) | Read the immutable referrer pointer recorded for a user. |
| claimable(user, token) | Current claimable commission balance. |
| totalEarned(user, token) / totalWithdrawn(user, token) | Lifetime accounting for accrued and withdrawn commissions. |
| getTotals(user, token) | Convenience read for claimable, earned, and withdrawn totals. |
| withdraw(token, to, amount) / withdrawAll(token, to) | User withdrawal paths for accrued commission. |
| setMinPaymentForCommission(token, minAmount) | Owner-set dust threshold for commission eligibility. |
Contract Guards
setReferrerOnRegister() is Heliox-only and keeps the referrer mapping immutable after first assignment.
onPayment() is Payments-only and credits only the portion returned by the treasury flow.
There is no multi-level payout path in the current contract surface.
Emergency Withdrawals Are Not A ToggleBoth
emergencyWithdrawERC20() and emergencyWithdrawNative() are hard-disabled pure functions that always revert withEmergencyWithdrawDisabled().