//contracts/pool-manager/src/manager/commands.rs

pub fn create_pool(
    deps: DepsMut,
    env: Env,
    info: MessageInfo,
    asset_denoms: Vec<String>,
|>  asset_decimals: Vec<u8>,
    pool_fees: PoolFee,
    pool_type: PoolType,
    pool_identifier: Option<String>,
) -> Result<Response, ContractError> {
...
    //@audit only check on asset_decimals is the array length.
    ensure!(
        !asset_denoms.is_empty()
            && asset_denoms.len() >= MIN_ASSETS_PER_POOL
            && asset_denoms.len() == asset_decimals.len(),
        ContractError::AssetMismatch
    );
...
    POOLS.save(
        deps.storage,
        &identifier,
        &PoolInfo {
            pool_identifier: identifier.clone(),
            asset_denoms,
            pool_type: pool_type.clone(),
            lp_denom: lp_asset.clone(),
|>          asset_decimals,//@audit incorrect decimals will be directly saved and used in stableswap.
            pool_fees,
            assets,
        },
    )?;
//contracts/pool-manager/src/helpers.rs
pub fn compute_swap(
    n_coins: Uint256,
    offer_pool: Uint128,
    ask_pool: Uint128,
    offer_amount: Uint128,
    pool_fees: PoolFee,
    swap_type: &PoolType,
    offer_precision: u8,
    ask_precision: u8,
) -> Result<SwapComputation, ContractError> {
...
        PoolType::StableSwap { amp } => {
|>            let offer_pool = Decimal256::decimal_with_precision(offer_pool, offer_precision)?;
|>            let ask_pool = Decimal256::decimal_with_precision(ask_pool, ask_precision)?;
|>            let offer_amount = Decimal256::decimal_with_precision(offer_amount, offer_precision)?;

            let new_pool = calculate_stableswap_y(
                n_coins,
                offer_pool,
                ask_pool,
                offer_amount,
                amp,
                ask_precision,
                StableSwapDirection::Simulate,
            )?;
