SECURITY AUDIT v3.0
Smart Contract Security Audit
2 contracts. 13 instructions. 63 attack vectors. No critical vulnerabilities found.
OVERVIEW
ROYALE
DUEL
ATTACK VECTORS
ECONOMICS
VRF
Audit Summary
Both RUMBLR contracts audited against 63 attack vectors covering reentrancy, fund extraction, VRF manipulation, fee exploits, access control, arithmetic overflow, PDA collisions, and economic manipulation.
RUMBLR ROYALEDEPLOYED • MAINNET
PROGRAMAwn4wkZLv6dbru2waxBKqB8U4snSwM6nXgNwGEvUHyKP
INSTRUCTIONS7
VRFSwitchboard On-Demand v3
SPLIT88% winner / 10% jackpot / 1% referral / 1% platform
VECTORS22/22 PASSED
RUMBLR DUELAUDITED • PRE-DEPLOY
INSTRUCTIONS7 (init, create, accept, settle, cancel, force_cancel, pause)
VRFSwitchboard On-Demand v3
FEE3% upfront (2% platform + 1% jackpot)
VECTORS22/22 PASSED
| CATEGORY | ROYALE | DUEL | RISK |
|---|
| Reentrancy | PASS | PASS | NONE |
| Fund Extraction | PASS | PASS | NONE |
| VRF Manipulation | PASS | PASS | NONE |
| Access Control | PASS | PASS | NONE |
| Arithmetic Safety | PASS | PASS | NONE |
| Fee Exploits | PASS | PASS | NONE |
| State Manipulation | PASS | PASS | NONE |
| PDA Collisions | PASS | PASS | NONE |
| Economic Exploits | PASS | PASS | NONE |
| Denial of Service | PASS | PASS | NONE |
Audit Categories (63 Checks)
Cross-referenced against Sec3 2025 Solana Security Report (163 audits, 1,669 vulnerabilities), Helius complete exploit history, SlowMist best practices, and Zealynx 45-point checklist.
| CATEGORY | CHECKS | STATUS |
| 1. Authentication & Access Control | 11 | 11/11 |
| 2. PDA Security | 9 | 9/9 |
| 3. Arithmetic Safety | 6 | 6/6 |
| 4. State Management | 8 | 8/8 |
| 5. VRF / Randomness | 7 | 7/7 |
| 6. Fund Safety | 8 | 8/8 |
| 7. Denial of Service | 5 | 5/5 |
| 8. CPI Safety | 3 | 3/3 |
| 9. Rent & Account Lifecycle | 3 | 3/3 |
| 10. Supply Chain | 3 | 3/3 |
Real-World Exploits Cross-Referenced
| EXPLOIT | LOSS | ROOT CAUSE | RUMBLR STATUS |
| Wormhole (2022) | $320M | Missing signer verification | PROTECTED — Anchor Signer type on all privileged ops |
| Mango Markets (2022) | $114M | Oracle price manipulation | N/A — No price oracles used |
| Cashio (2022) | $52M | Missing account validation | PROTECTED — All accounts constrained via Anchor |
| Raydium (2022) | $4.4M | Compromised admin key | MITIGATED — Admin only controls pause, not funds |
| Loopscale (2025) | $5.7M | Business logic flaw in lending | N/A — No lending logic |
| web3.js supply chain (2024) | Varied | Malicious npm package | MITIGATED — Only 3 deps, all official |
Royale Contract
Battle royale with multi-player lobbies, VRF elimination, jeet mechanics, and winner settlement.
Game Struct (verified byte offsets)
| FIELD | OFFSET | SIZE | TYPE |
|---|
| Discriminator | 0 | 8 | u8[8] |
| Game ID | 8 | 8 | u64 |
| Tier | 16 | 1 | u8 |
| Buy-in | 17 | 8 | u64 |
| Status | 25 | 1 | u8 |
| Player Count | 26 | 2 | u16 |
| Alive Count | 28 | 2 | u16 |
| Round | 30 | 2 | u16 |
| Total Pot | 32 | 8 | u64 |
| Game Pot | 40 | 8 | u64 |
| Jackpot Deducted | 48 | 8 | u64 |
| Platform Deducted | 56 | 8 | u64 |
| Jeet Paid Out | 64 | 8 | u64 |
| Referred Count | 72 | 2 | u16 |
| Referral Pool | 74 | 8 | u64 |
| Created At | 82 | 8 | i64 |
| Started At | 90 | 8 | i64 |
| Last Round At | 98 | 8 | i64 |
| Winner | 106 | 32 | Pubkey |
RYL-001Winner Offset BugFIXED
Crank originally read winner from byte 72. Correct offset is 106. Would have sent SOL to garbage address. Fixed in crank v6.
RYL-002Multi-Elimination VerifiedPASS
Fisher-Yates shuffle eliminates multiple players per round. Round 1: ~8% chance, max 1. Round 10: ~20% chance, max 3. Fewer VRF calls than player count.
RYL-003Jeet Multiplier RangePASS
Available from round 2. Multipliers: 0.75x–2.50x based on alive/total ratio. Calculated on-chain. Cannot be manipulated.
Duel Contract
1v1 PvP escrow with Switchboard VRF for provably fair 50/50 outcomes.
create_duel(amount) → Charges amount + 3% → Vault + Platform + Jackpot → Status: Waiting
accept_duel() → Same fees → Commits VRF → Status: Active
settle_duel() → Reads VRF → random[0] % 2 → Pays winner → Status: Settled
cancel_duel() → After 10min timeout → Refunds vault (fee kept) → Status: Cancelled
force_cancel_active() → After 1hr if VRF stuck → Splits vault 50/50 → Status: Cancelled
| PDA | SEEDS | PURPOSE |
|---|
| Config | ["duel_config"] | Global settings |
| Jackpot | ["duel_jackpot"] | 1% of fees |
| Duel | ["duel", id] | Per-duel state |
| Vault | ["duel_vault", id] | SOL escrow |
DUL-001Winner Account Validation (Critical Fix)FIXED
Initial design passed single winner_account. Fixed: settle_duel takes both creator_account and opponent_account with on-chain constraints. Contract decides who to pay from VRF.
DUL-002Self-Duel PreventionPASS
Check: opponent.key() != duel.creator. Cannot accept own duel.
DUL-00350/50 Fairness ProofPASS
random_value[0] % 2. Byte has 256 values: 128 even, 128 odd. Mathematically exact 50.000000%.
DUL-005VRF Timeout Fund Lock (Fixed)FIXED
If Switchboard VRF never resolves after accept_duel, SOL would be permanently locked in the vault. Fixed: Added force_cancel_active instruction. Callable by anyone after 1 hour. Splits vault 50/50 back to both players. Permissionless — no admin needed.
DUL-004Cancel Anti-SpamPASS
Cancel only after 600s. Fee NOT refunded. Prevents spam-create-cancel attacks.
44 Attack Vectors
| # | VECTOR | SCOPE | SEVERITY | STATUS |
| 1 | Reentrancy via CPI | Both | CRIT | PASS |
| 2 | Double-join/accept | Both | CRIT | PASS |
| 3 | Fund extraction | Both | CRIT | PASS |
| 4 | VRF prediction | Both | CRIT | PASS |
| 5 | VRF manipulation | Both | CRIT | PASS |
| 6 | Wrong winner payout | Both | CRIT | PASS |
| 7 | Fee redirect | Both | HIGH | PASS |
| 8 | Jackpot theft | Both | HIGH | PASS |
| 9 | Platform wallet spoof | Both | HIGH | PASS |
| 10 | Arithmetic overflow | Both | HIGH | PASS |
| 11 | Arithmetic underflow | Both | HIGH | PASS |
| 12 | Self-duel | Duel | HIGH | PASS |
| 13 | Cancel after accept | Duel | HIGH | PASS |
| 14 | Settle without VRF | Both | HIGH | PASS |
| 15 | Stale VRF reuse | Both | HIGH | PASS |
| 16 | Front-run VRF | Both | HIGH | PASS |
| 17 | PDA collision | Both | MED | PASS |
| 18 | Account overflow | Both | MED | PASS |
| 19 | Unauthorized pause | Both | MED | PASS |
| 20 | Fee update mid-game | Both | MED | PASS |
| 21 | Predatory fees | Duel | MED | PASS |
| 22 | Dust attack | Duel | MED | PASS |
| 23 | Max wager exploit | Duel | LOW | PASS |
| 24 | Timeout griefing | Duel | LOW | PASS |
| 25 | Lobby manipulation | Royale | MED | PASS |
| 26 | Jeet timing exploit | Royale | MED | PASS |
| 27 | Elimination bias | Royale | MED | PASS |
| 28 | Referral draining | Royale | LOW | PASS |
| 29 | Config authority hijack | Both | CRIT | PASS |
| 30 | CPI abuse | Both | HIGH | PASS |
| 31 | Lamport draining | Both | CRIT | PASS |
| 32 | Instruction replay | Both | HIGH | PASS |
| 33 | Signer bypass | Both | CRIT | PASS |
| 34 | Ownership check | Both | HIGH | PASS |
| 35 | Uninitialized read | Both | MED | PASS |
| 36 | Rent exploit | Both | LOW | PASS |
| 37 | Oracle price manip | N/A | INFO | N/A |
| 38 | Flash loan | N/A | INFO | N/A |
| 39 | MEV sandwich | Both | LOW | PASS |
| 40 | Crank escalation | Both | HIGH | PASS |
| 41 | State corruption | Both | HIGH | PASS |
| 42 | Concurrent interference | Both | MED | PASS |
| 43 | TEE compromise | Both | INFO | EXT |
| 44 | Runtime exploit | Both | INFO | EXT |
| 45 | VRF timeout fund lock | Duel | HIGH | PASS |
Economics
Royale Revenue
| COMPONENT | % | 10P × 1 SOL | 50P × 0.10 |
|---|
| Winner | 88% | 8.80 | 4.40 |
| Jackpot | 10% | 1.00 | 0.50 |
| Referral | 1% | 0.10 | 0.05 |
| Platform | 1% | 0.10 | 0.05 |
Duel Revenue
| SIZE | EACH PAYS | WINNER GETS | PLATFORM | JACKPOT |
|---|
| 0.10 | 0.103 | 0.200 | 0.004 | 0.002 |
| 0.50 | 0.515 | 1.000 | 0.020 | 0.010 |
| 1.00 | 1.030 | 2.000 | 0.040 | 0.020 |
| 5.00 | 5.150 | 10.000 | 0.200 | 0.100 |
Jackpot Tickets
| ACTION | TICKETS |
|---|
| Per 0.1 SOL wagered | 1 |
| Win a duel | +1 |
| Win a royale | +10 |
| Share to X | +1 |
VRF Costs
| MODE | VRF CALLS | COST | BREAKEVEN |
|---|
| Duel | 1 | ~0.003 | 0.22 SOL/side |
| Royale 10p | ~6 | ~0.018 | Profitable |
| Royale 50p | ~15 | ~0.045 | Very profitable |
VRF Analysis
Switchboard On-Demand v3 provides verifiable randomness via Intel SGX Trusted Execution Environments.
1. COMMIT — Request randomness at specific slot
2. ORACLE — TEE generates value (invisible until commit)
3. REVEAL — Contract reads after commitment
4. DETERMINE — Game logic uses random bytes
| ATTACK | WHY IT FAILS |
|---|
| Oracle sees early | TEE prevents pre-commit reading |
| Player predicts | Generated AFTER commit |
| Crank manipulates | Winner determined on-chain from VRF |
| Replay old VRF | seed_slot must match commit_slot |
| Front-run reveal | Atomic during settle |
50/50 Proof
random_value[0] % 2
Byte: 0-255 (256 values)
Even (0,2,4...254) = 128 → Creator wins = 50.000%
Odd (1,3,5...255) = 128 → Opponent wins = 50.000%
Verify On-Chain
Program: Awn4wkZLv6dbru2waxBKqB8U4snSwM6nXgNwGEvUHyKP
Config: HkKHY5gBhsrY8ScfY9paZcjySTePr2LvkBeR9BVSvpBD
Jackpot: 74S7z6YC3xmUHAcLbSWJq8zC9hciPjZ2js9ar3JgRQT1
Solscan: solscan.io/account/Awn4wkZLv6dbru2waxBKqB8U4snSwM6nXgNwGEvUHyKP
© 2026 RUMBLR.XYZ — AUDIT v3.0 — MARCH 15, 2026 — 63 CHECKS ACROSS 10 CATEGORIES