use solana_pubkey::{pubkey, Pubkey};

pub const HUNDRED_PERCENT: u32 = 1000000;
pub const LEVERAGE_ONE: u32 = HUNDRED_PERCENT; // 1.0x

pub const MAX_LEVERAGE: u32 = 11 * LEVERAGE_ONE;
pub const MAX_PROTOCOL_FEE: u16 = (HUNDRED_PERCENT / 100) as u16;
pub const MAX_LIQUIDATION_FEE: u32 = HUNDRED_PERCENT / 5;
pub const MAX_LIQUIDATION_THRESHOLD: u32 = HUNDRED_PERCENT * 95 / 100;

pub const NO_LOWER_LIMIT_ORDER: i32 = -2147483648;
pub const NO_UPPER_LIMIT_ORDER: i32 = 2147483647;

pub const UNLIMITED_SUPPLY_LIMIT: u64 = u64::MAX;

pub const TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_A: u32 = 1;
pub const TUNA_POSITION_FLAGS_LOWER_LIMIT_ORDER_SWAP_TO_TOKEN_B: u32 = 1 << 1;
pub const TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_A: u32 = 1 << 2;
pub const TUNA_POSITION_FLAGS_UPPER_LIMIT_ORDER_SWAP_TO_TOKEN_B: u32 = 1 << 3;
pub const TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD: u32 = 1 << 4;
pub const TUNA_POSITION_FLAGS_AUTO_COMPOUND_YIELD_WITH_LEVERAGE: u32 = 1 << 5;
pub const TUNA_POSITION_FLAGS_ALLOW_REBALANCING: u32 = 1 << 6;
pub const TUNA_POSITION_FLAGS_LOCKED: u32 = 1 << 7;
pub const TUNA_POSITION_FLAGS_MASK: u32 = (1 << 8) - 1;

pub const WP_NFT_UPDATE_AUTH: Pubkey = pubkey!("3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr");
pub const DEFAULT_PUSH_ORACLE_PROGRAM_ID: Pubkey = pubkey!("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");

pub const JUPITER_PROGRAM_ID: Pubkey = pubkey!("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");
pub const JUPITER_EVENT_AUTHORITY: Pubkey = pubkey!("D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf");
pub const JUPITER_PROGRAM_AUTHORITY_8: Pubkey = pubkey!("9nnLbotNTcUhvbrsA6Mdkx45Sm82G35zo28AqUvjExn8");
pub const JUPITER_PROGRAM_AUTHORITY_11: Pubkey = pubkey!("69yhtoJR4JYPPABZcSNkzuqbaFbwHsCkja1sP1Q2aVT5");
