Skip to main content

Constants Reference

Complete reference of all configurable and fixed constants in the PlayOrbs system.

Token Constants

ConstantValueDescription
TOKEN_DECIMALS9PORB token decimal places
TOTAL_SUPPLY_CAP100,000,000Maximum PORB supply
INITIAL_EMISSION10 PORBStarting per-round emission
DECAY_RATE0.85Per-epoch decay multiplier
EPOCH_LENGTH10Rounds per epoch

Fee Constants

ConstantValueDescription
VAULT_SHARE80%Prize pool percentage
PROTOCOL_SHARE20%Protocol fee percentage
LP_SHARE50%Protocol → LP vault split
REFERRAL_SHARE10%Dev fee → referrer split
DEV_FEE_BPS2000Default protocol fee (20%)

Pool Constants

ConstantValueDescription
BOUNTY_SHARE70%Prize → bounty split
SURVIVAL_SHARE30%Prize → survival split

Scoring Constants

ConstantValueDescription
FIRST_PLACE_PTS5001st place bonus
SECOND_PLACE_PTS3502nd place bonus
THIRD_PLACE_PTS2503rd place bonus
KILL_PTS100Points per kill
PARTICIPATION_FLOOR_PTS50Base participation

Physics Constants

Arena

ConstantValueDescription
BOUNDARY_SHAPEcircleArena geometry
BOUNDARY_RADIUS190Pixels
BOUNDARY_RESTITUTION1.08Wall bounce energy
TANGENT_IMPULSE0.02Wall sideways kick
MIN_SPEED4.0Minimum velocity
MAX_SPEED9.5Maximum velocity
TWO_PORBS_MAX_SPEED25.0Endgame speed cap

Orb

ConstantValueDescription
PORB_RADIUS12Pixels
BASE_SPEED4.0Initial velocity
PORB_RESTITUTION1.008Collision energy

Gravity

ConstantValueDescription
GRAVITY_BASE0.000001Base acceleration
GRAVITY_AMP_FRAC0.4Oscillation amplitude
GRAVITY_PERIOD_FRAMES40Oscillation period
OSCILLATE_BELOW_PORBS3Oscillation threshold

Tether

ConstantValueDescription
HIT_DAMPING0.125Break speed reduction
BREAK_SPEED_MIN7.5Minimum break speed
IMMUNITY_FRAMES200Protection period

Shockwave

ConstantValueDescription
SHOCKWAVE_ENABLEDtrueToggle
SHOCKWAVE_LIFE_FRAMES40Duration
SHOCKWAVE_MAX_RADIUS100Maximum size
SHOCKWAVE_RING_THICKNESS5Visual width
IMPACT_THRESHOLD8.0Trigger velocity

Sudden Death

ConstantValueDescription
SUDDEN_DEATH_ENABLEDtrueToggle
AFTER_FRAMES600Trigger delay (~5s)
DURATION_FRAMES360Transition (~3s)
GRAVITY_MULTIPLIER16Gravity scaling
CENTER_SHIFT_RADIUS100Orbit radius
CENTER_SHIFT_PERIOD150Orbit period
PORB_ATTRACTION0.5Inter-orb gravity

Spawn Constants

ConstantValueDescription
SPAWN_MODEringsAlgorithm
SPAWN_PAD58Minimum spacing
START_INSET104Distance from boundary
RING_GAP30Between-ring distance
RINGS_MIN1Minimum rings
RINGS_MAX5Maximum rings
SPAWN_VELOCITYnoneInitial direction
SPAWN_JITTER0Random offset

Account Size Constants

AccountSizeDescription
ROOT_ACCOUNT~560 bytesGlobal state
ROUND_PAGE~23.5 KB120 rounds
ROUND_META195 bytesPer round
ROUND_PLAYER86 bytesMembership
PLAYER_STATS129 bytesPer-season
VAULT~165 bytesPrize escrow
SEASON_SNAPSHOT59 bytesFrozen data

Storage Constants

ConstantValueDescription
PAGE_SIZE120Rounds per page
MAX_TIERS16Maximum tier count
MAX_PLAYERS65535u16 limit

Randomness Constants

ConstantValueDescription
SEED_LENGTH32Bytes
MERKLE_TREE_DEPTH20Levels
ECDSA_CURVEsecp256k1Signature scheme
HASH_ALGORITHMSHA-256Digest function

Emission Probability Constants

ConstantValueDescription
HAZARD_RATE1.0λ for hazard model
EMISSION_DECAY0.85Per-epoch multiplier
MIN_EMISSION0.01Minimum PORB/round

Time Constants

ConstantValueDescription
FRAME_RATE120FPS
FRAME_DURATION8.33 msPer frame
SEASON_DURATION30 daysDefault season

Configuration Formulas

Kill Weight

w(A) = 1 + log₂(A)

Epoch Emission

E(n) = E₀ × (0.85)^n

Gravity Oscillation

g(t) = base × (1 + ampFrac × sin(2π × t / period))

Emission Probability

P(emit) = 1 - e^(-λ × Σorbits)

Next Steps