7.4 Security Considerations

Integer Overflow Protection

All arithmetic operations use checked methods:

// BAD (can overflow)
let result = a + b;

// GOOD (safe, returns error on overflow)
let result = a
    .checked_add(b)
    .ok_or(ErrorCode::MathOverflow)?;

Oracle Collusion Prevention

Economic Security:

  • Minimum stake requirement (10,000 PATH)

  • Slashing for incorrect outcomes (10-100%)

  • Rewards distributed only to majority consensus

  • Commit-reveal prevents coordination during voting

Technical Security:

  • Hash commitments prevent front-running

  • Time-locked commit/reveal windows

  • Weighted voting by stake (Sybil resistance)

Example Attack Vector:

Slippage Protection

All trades enforce user-defined minimum outputs:

Platform Veto Mechanism

Anti-Spam:

  • Veto requires staked PATH (skin in the game)

  • Frivolous vetoes result in lost gas fees

  • Successful vetoes may reward vetoers (future enhancement)

Threshold Requirements:

Access Control

Role-Based Permissions:

Action
Required Authority

Create Market

Approved platform

Resolve Market

Oracle (staked)

Dispute Resolution

Any user (with stake)

Claim Creator Fees

Market creator

Claim Platform Fees

Platform authority

Update Protocol Params

Governance multisig

Implementation:

Last updated