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_LIMIT_ORDER_EXECUTION_FEE: u32 = HUNDRED_PERCENT / 100;
pub const MAX_LIQUIDATION_THRESHOLD: u32 = HUNDRED_PERCENT * 95 / 100;

pub const NO_STOP_LOSS: i32 = -2147483648;
pub const NO_TAKE_PROFIT: i32 = 2147483647;

pub const TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_A: u32 = 1;
pub const TUNA_POSITION_FLAGS_STOP_LOSS_SWAP_TO_TOKEN_B: u32 = 1 << 1;
pub const TUNA_POSITION_FLAGS_TAKE_PROFIT_SWAP_TO_TOKEN_A: u32 = 1 << 2;
pub const TUNA_POSITION_FLAGS_TAKE_PROFIT_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_MASK: u32 = (1 << 7) - 1;

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