Devnet

Test funds only. Transactions are not real.

Security & Risks

Understanding the security model, potential risks, and trust assumptions.

Security Model

Proof of Chance is designed with a "don't trust, verify" philosophy. This page explains our security measures, the risks you should understand, and the trust assumptions inherent in the system.

Smart Contract Security

Audit Status

Our smart contracts are under continuous development. We recommend users only participate with amounts they can afford to lose while we work toward formal audits.

Security Measures

MeasureImplementation
Access ControlRole-based permissions with admin authority
Re-entrancy GuardsState updates before external calls
Integer OverflowRust's built-in overflow checking
PDA SecurityAll accounts are PDAs with verified bumps
Input ValidationAll parameters checked before processing

Known Limitations

  • Smart contracts may contain undiscovered bugs
  • Solana runtime upgrades could affect behavior
  • Complex interactions may produce unexpected results

Entropy & Attestation Security

Player-Sourced Entropy

Proof of Chance uses participant-submitted lucky secrets to generate entropy:

  • Each ticket purchase commits a hash of lucky secret + random salt
  • During the upload window, participants reveal lucky secrets and attest on-chain
  • The program verifies each reveal and aggregates hashes deterministically

This makes the entropy public, recomputable, and resistant to admin control.

Attestation Guard

Attestations anchor winner-count voting and reveal accountability:

  • Participants attest on-chain after uploading their lucky secrets
  • Winner count is resolved from all attesters (ticket-weighted)
  • Only reveal-included attesters are eligible to win
  • If no attestations occur by the deadline, refunds are issued

Trust Assumptions

When using Proof of Chance, you're trusting:

What You DON'T Have to Trust

  • ❌ That we're honest → Verify on-chain
  • ❌ That missing reveals were hidden → Verify attesters vs reveal-included flags
  • ❌ That winners were selected correctly → Reproduce algorithm
  • ❌ That your ticket was counted → Query blockchain

What You DO Have to Trust

  • ✅ The Solana blockchain is secure
  • ✅ The smart contract code matches documentation
  • ✅ Your wallet software is legitimate
  • ✅ You keep your lucky secret private until the upload window

Risk Categories

Smart Contract Risk

Risk: Undiscovered bugs could lead to loss of funds.

Mitigation:

  • Open-source code for community review
  • Progressive rollout with limited prize pools
  • Plans for formal audits

Economic Risk

Risk: Lottery participation involves financial risk.

Mitigation:

  • Clear display of odds and prize structures
  • Only participate with discretionary funds
  • Transparent fee structures

Infrastructure Risk

Risk: Solana network issues could affect lottery execution.

Mitigation:

  • Timeout handling for failed operations
  • Refund mechanisms if attestations are missing by the deadline
  • Manual intervention capabilities for admin

Provider Availability Risk

Risk: The provider could fail to upload reveals during settlement.

Mitigation:

  • On-chain reveal-included flags make omissions visible
  • If at least one reveal exists, finalization proceeds from revealed subset; if zero reveals exist, refunds are issued
  • All events are on-chain and auditable

Admin Capabilities

Transparency about what the admin CAN and CANNOT do:

Admin CAN

  • Create new lotteries with parameters
  • Set ticket prices and window defaults
  • Close lotteries early (if needed)
  • Upgrade the program (with timelock)

Admin CANNOT

  • Purchase tickets (currently not enforced, but auditable)
  • Alter deterministic winner draws after reveal inclusion is fixed on-chain
  • Modify winner selection after uploads are finalized
  • Access the prize pool directly
  • Change historical lottery data

All admin actions are recorded on-chain and can be audited. If you see suspicious admin behavior, it will be visible in the event logs.

Responsible Participation

Guidelines

  1. Only use discretionary funds — Never gamble with money you can't afford to lose
  2. Verify before large participation — Use the audit tools to check lottery integrity
  3. Understand the odds — Your chance of winning depends on total tickets
  4. Report suspicious activity — Contact us if you observe anomalies

Seeking Help

If you experience issues with gambling, please seek support:

Reporting Vulnerabilities

If you discover a security vulnerability:

  1. Do NOT disclose publicly
  2. Contact us at security@proofofchance.com
  3. Include detailed reproduction steps
  4. Allow reasonable time for patching

We appreciate responsible disclosure and may offer bug bounties for significant findings.

Edit this pageLast updated: January 2026