NEXORA STORE V16 — REFER & EARN

1. BACK UP live database and existing bot files first.
2. If not already installed, import migrations/2026_10_17_customer_account_referrals.sql (V11).
3. Import migrations/2026_10_18_referral_join_deposit_v16.sql in phpMyAdmin.
4. Only after migrations succeed, upload V16 files to the SAME bot directory.
5. Admin → Bot Connection: ensure bot username is correctly configured.
6. Use /start and tap 🌟 Refer & Earn to get your own invite link.

RULES
- Only a first-ever /start through a personal invite link creates a referral and pays inviter 0.05 USDT once.
- Every later APPROVED wallet top-up by that invited user pays inviter 0.2% of the credited USDT amount.
- Both manual and automatic approvals use the same transactional reward system.
- No rewards for unapproved payments, repeated /start, or self-referral.
- The previous first-purchase reward feature is disabled.
- Rewards are tracked using unique keys; top-up approval and referral commission commit together.
- Precise wallet ledger upgraded to 6 decimals. 1.00 USDT deposit -> 0.002 USDT.
- No historical top-up bonuses are backfilled, and preexisting referral invites stay linked.
- RATE is FIXED in code. Admin can edit additional referral message, not rates.

NOTE: Telegram account-based referrals do not prevent all fake-account abuse. Watch unusually high join rewards.
NOTE: The original referral code remains in deep-link ?start= payload; it is no longer shown as a separate code to users.
