Entity overview with key relationships and fields.
discord_user_id(unique) — primary external identity.epic_account_id— populated after Yunite lookup.- Cursor fields:
last_settled_kill_count,last_settlement_atfor idempotent accrual→settlement. region_code,abuse_flagsfor analytics and abuse detection.
- 1:N user → wallets (one primary assumed).
verifiedindicates ownership verification.
- Audit trail of verification events:
source,status, detail.
- Kill delta for a user in a minute bucket (
epoch_minute). - Unique constraint
(user_id, epoch_minute)ensures idempotency. settled/payout_idlinks to payout when included.
- Aggregated unsettled accruals at settlement time.
- Idempotency via SHA-256 over sorted accrual IDs (
idempotency_key). - Retry metadata:
attempt_count,first_attempt_at,last_attempt_at. - Status:
pending→sentorfailed.
- Actions performed through admin endpoints.
actor_email,target_type,target_id, summary/detail.
- Structured anomaly flags:
flag_type,severity,detail.
- Encrypted key-value store for sensitive runtime config (e.g., operator seed).
- Fields:
key,encrypted_value,set_by,description.
- Tracks incoming BAN donations to the operator wallet.
- Fields:
amount_ban,blocks_received,source,note. - Drives milestone progression and payout multipliers.
User ──< WalletLink
User ──< VerificationRecord
User ──< RewardAccrual ──> Payout
User ──< Payout
User ──< AbuseFlag
Payout ──< RewardAccrual (backref)
- Numeric(18,8) mapped to Python
Decimalfor exact arithmetic. - Serialization via helper to avoid floating-point drift.
last_settled_kill_countadvances only after payoutstatus=sent(crash-safe).- Accrual computes delta from lifetime kills snapshot against settled cursor.