Module consts

Module consts 

Source

Constants§

BASE_DAILY_REWARDS
The base daily rewards amount for the payment-based system (before community decay). This is the maximum daily rewards when community health is struggling.
BASIS_POINTS
Basis points for percentage calculations (1 basis point = 0.01%).
CONFIG
The seed of the config account PDA.
CONFIG_ADDRESS
The address of the config account.
END_AT
Project End Time - The unix timestamp after which mining will stop.
EPOCH_0_START
Epoch 0 start date: Same as START_AT for consistency
EPOCH_DURATION
The duration of a daily epoch, in seconds (24 hours).
INITIALIZER_ADDRESS
MAX_PAYMENT_PROOF_LENGTH
Maximum merkle proof length for payment proofs (supports ~33M participants). This prevents DoS attacks through extremely long proofs.
MAX_SEAL_PROOF_LENGTH
Maximum merkle proof length for seal proofs (supports ~1M epochs). This prevents DoS attacks through extremely long proofs. Each epoch = 1 day, so this supports ~2,700 years of history.
MAX_SUPPLY
The maximum token supply (300 million).
METADATA
The seed of the metadata account PDA.
METADATA_ADDRESS
The address of the mint metadata account.
METADATA_NAME
The name for token metadata.
METADATA_SYMBOL
The ticker symbol for token metadata.
METADATA_URI
The uri for token metdata.
METRICS
The seed of the community metrics account PDA.
METRICS_ADDRESS
The address of the community metrics account.
METRICS_BUMP
The bump of the metrics account.
MINT
The seed of the mint account PDA.
MINT_ADDRESS
The address of the mint account.
MINT_BUMP
The bump of the mint account.
MINT_NOISE
Noise for deriving the mint pda. Noise for deriving the mint pda.
ONE_MIRACLE
One Miracle token, denominated in indivisible units.
PAYMENT_POOL_LIMIT
Pool limits for reward distribution (based on MAX_SUPPLY). These ensure proper allocation and prevent over-minting.
PROOF
The seed of proof account PDAs.
SNAPSHOT
The seed of the snapshot account PDA.
SNAPSHOT_ADDRESS
The address of the snapshot account.
SNAPSHOT_BUMP
The bump of the snapshot account.
SOCIAL_POOL_LIMIT
START_AT
TEN_MIRACLE
Ten MIRACLE token
TOKEN_DECIMALS
The authority allowed to initialize the program. The decimal precision of the Miracle token. There are 10^6 indivisible units per Miracle (called “glows”).
TREASURY
The seed of the treasury account PDA.
TREASURY_ADDRESS
The address of the treasury account.
TREASURY_BUMP
The bump of the treasury account, for cpis.
TREASURY_TOKENS_ADDRESS
The address of the treasury token account.
USDC_MINT
USDT_MINT
Common stablecoin mint addresses.
WSOL_MINT

Functions§

calculate_customer_reward_transparent
Calculate time decay factor based on years since launch. This is used for time decay calculations.
calculate_customer_reward_transparent_with_cap
Complete transparent calculation chain for customer rewards WITH activity capping. This function matches the on-chain calculation behavior exactly.
calculate_daily_rewards
Community Health Targets (now configurable via UpdateTargets instruction) These constants have been moved to Config.community_targets Launch defaults: target_weekly_users = 500, target_weekly_activity = 5_000 (2,500 payments × 2), target_retention_rate = 5000 Calculate daily rewards with smooth community decay and time decay.
calculate_daily_rewards_split
Calculate daily rewards split between customers and merchants. This function extends the base daily rewards calculation with customer/merchant allocation.
calculate_merchant_reward_transparent
Complete transparent calculation chain for merchant rewards. This function combines all steps of the reward calculation for transparency.
calculate_merchant_reward_transparent_with_cap
Complete transparent calculation chain for merchant rewards WITH activity capping. This function matches the on-chain calculation behavior exactly.
miracle_epoch_0_genesis
Genesis hash for epoch 0 (hash of “MIRACLE_EPOCH_0_EXTREME_WAYS”) This is the foundation of the entire epoch hash chain