Skip to main content

streak_api/
consts.rs

1use solana_program::{pubkey, pubkey::Pubkey};
2
3/// Authority for `Initialize`. Replace with your deploy multisig before mainnet.
4pub const ADMIN_ADDRESS: Pubkey = pubkey!("6asgn8Vq8KKSQx4wm5zVfEfB76wqGVpEpWxajGkbQ8yr");
5
6/// Signs executor-gated instructions: `AdminInstantSettlement`, `AdminPayout`, `AdminVoidPeriod`,
7/// `AdminInitWeek`. Replace before production.
8pub const EXECUTOR_ADDRESS: Pubkey =
9    pubkey!("3B1WXgrV68V6ayymC7C8eVoCMeqeJLR7HWXkxfQxLUeF");
10
11/// Basis points denominator (100%).
12pub const MAX_BPS: u16 = 10_000;
13
14/// PDA seed for the `Treasury` account.
15pub const TREASURY: &[u8] = b"treasury";
16
17/// Ticket revenue split to daily pool (BPS).
18pub const TICKET_DAILY_BPS: u16 = 7000;
19
20/// Ticket revenue split to weekly pool (BPS).
21pub const TICKET_WEEKLY_BPS: u16 = 1500;
22
23/// Ticket revenue split to buyback reserve (BPS).
24pub const TICKET_BUYBACK_BPS: u16 = 1000;
25
26/// Ticket revenue split to team (BPS).
27pub const TICKET_TEAM_BPS: u16 = 500;
28
29/// SPL USDC recipient for team-fee legs.
30pub const FEE_COLLECTOR: Pubkey = pubkey!("FEeB92JDVmVuuoaoTjKyfDPPrLTWPGg2EJTrY3TmTx3T");
31
32/// SPL USDC mint (devnet test mint — replace with Circle mainnet mint for production).
33pub const USDC_MAINNET_MINT: Pubkey = pubkey!("GAmHPNMcgh9BTpe3DWirqMwvYCeDskE2im6fUhZyukJp");
34
35/// Pyth **Receiver** program (pull feeds).
36pub const PYTH_RECEIVER_PROGRAM: Pubkey = pubkey!("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ");
37
38/// Pyth **Push Oracle** program (continuously-maintained push feed accounts, ~400 ms heartbeat).
39pub const PYTH_PUSH_ORACLE_PROGRAM: Pubkey =
40    pubkey!("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");
41
42/// BTC/USD canonical Pyth feed ID.
43pub const PYTH_BTC_USD_FEED_ID: [u8; 32] = [
44    0xe6, 0x2d, 0xf6, 0xc8, 0xb4, 0xa8, 0x5f, 0xe1,
45    0xa6, 0x7d, 0xb4, 0x4d, 0xc1, 0x2d, 0xe5, 0xdb,
46    0x33, 0x0f, 0x7a, 0xc6, 0x6b, 0x72, 0xdc, 0x65,
47    0x8a, 0xfe, 0xdf, 0x0f, 0x4a, 0x41, 0x5b, 0x43,
48];
49
50/// BTC/USD Pyth push feed account (shard 0, identical on mainnet-beta and devnet).
51pub const PYTH_BTC_USD_PRICE_FEED_ACCOUNT: Pubkey =
52    pubkey!("4cSM2e6rvbGQUFiJbqytoVMi5GgghSMr8LwVrT9VPSPo");
53
54/// Maximum age in seconds for a Pyth price to be considered fresh.
55pub const PYTH_MAX_PRICE_AGE_SECS: u64 = 60;
56
57/// Duration of each 5-minute market bucket in seconds.
58/// `open_ts = period * MARKET_BUCKET_SECS`, `close_ts = open_ts + MARKET_BUCKET_SECS`.
59pub const MARKET_BUCKET_SECS: i64 = 300;