total_staked / tokens_minted
marinade_state.msol_price: u64, and that's mSOL price in SOL multiplied by 0x1_0000_0000 (shifted), so to obtain mSOL/SOL as f64 you should do:
let msol_price_f64: f64 = marinade_state.msol_price as f64 / 0x1_0000_0000 as f64, and then you get the true mSOL/SOL price.
let SOL_lamports = (mSOL_lamports as u128 * marinade_state.msol_price as u128 / 0x1_0000_0000 as u128) as u64
let mSOL_lamports = (mSOL_lamports as u128 * 0x1_0000_0000 as u128 / marinade_state.msol_price as u128) as u64
let mSOL_usdc = (SOL_usdc as u128 * marinade_state.msol_price as u128 / 0x1_0000_0000 as u128) as u64
marinade_state.calc_msol_from_lamports()for better precision when computing mSOL from SOL and vice versa.