    // Simplified logic from process_xinit_unstake
    entry fun process_xinit_unstake(account: &signer, staker_addr: address, unstaking_type: u64, unstake_amount: u64) acquires ModuleStore, CabalStore, LockExempt {
        // ... permission checks, reward compounding ...
        let m_store = borrow_global_mut<ModuleStore>(@staking_addr);
        let x_init_amount = m_store.staked_amounts[unstaking_type];

        // --- VULNERABILITY ---
        // 'unstake_amount' is the original amount burned (== total supply in this case).
        // 'sx_init_amount' reads the supply *after* the burn in initiate_unstake, so it's 0.
        let sx_init_amount = option::extract(&mut fungible_asset::supply(m_store.cabal_stake_token_metadata[unstaking_type])); // Returns 0

        // This attempts bigdecimal::from_ratio_u128(S, 0) --> Division by Zero!
        let ratio = bigdecimal::from_ratio_u128(unstake_amount as u128, sx_init_amount);
        // Transaction reverts here.
        // ... rest of function is unreachable ...
    }
let pool_before = m_store.staked_amounts[pool];
let supply      = fungible_asset::supply(meta);

let unbond = if supply == 0 {
    // last holder  give them the entire pool
    pool_before
} else {
    let r = bigdecimal::from_ratio_u128(unstake_amount, supply);
    bigdecimal::mul_by_u64_truncate(r, pool_before)
};
// Assume pool index 1 is an LPstaking pool
let pool_idx: u64 = 1;

//  step 1: mint exactly 1 CabalLPT to Alice 
let mint_cap = &ModuleStore.cabal_stake_token_caps[pool_idx].mint_cap;
cabal_token::mint_to(mint_cap, @alice, 1);          // total supply = 1

//  step 2: Alice initiates unstake of the ENTIRE supply 
cabal::initiate_unstake(&signer(@alice), pool_idx, 1);
/*
 * inside initiate_unstake:
 *    cabal_token::burn(1)             total supply becomes 0
 *    schedules process_lp_unstake()  (async)
 */

//  step 3: worker executes queued call 
cabal::process_lp_unstake(&assets_signer, @alice, pool_idx, 1);
/*
 * inside process_lp_unstake:
 *
 *   let sx_supply = fungible_asset::supply(lp_metadata);   // == 0
 *   let ratio     = bigdecimal::from_ratio_u128(1, sx_supply);
 *                          dividebyzero  abort
 *
 * transaction reverts with EZeroDenominator
 */
