def get_bonds_outstanding(vesting_bonds):
    """
    Assumptions
    -----------
    * All vested bonds are immediately staked

    Arguments
    ---------
    vesting_bonds: a list of vesting bonds, each a dict containing the bonds
                   sold at a particular time.

    Returns
    -------
    bonds_outstanding: The total number of bonds outstanding,
                       i.e. still not vested.
    vesting_bonds: An updated list of vesting_bonds
    ohm_staked: The number of OHM vested and immediately staked.
    """
    bonds_outstanding = 0.
    ohm_staked = 0.
    rm_list = []

    for i, bond in enumerate(vesting_bonds):
        if bond['rebase_i'] > 0:
            bond['bond'] -= bond['reward_per_rebase']
            ohm_staked += bond['reward_per_rebase']
            bond['rebase_i'] -= 1
            bonds_outstanding += bond['bond']
        else:
            rm_list.append(i)

    # Remove fully vested bonds
    for rm_i in rm_list[::-1]:
        vesting_bonds.pop(rm_i)

    return bonds_outstanding, ohm_staked, vesting_bonds