contract IBalanceInfo {
    function totalBalance() public view returns(uint);

    function availableBalance() public view returns(uint);

    // called when one needs to give some sum to some party. Strictly internal!
    function reserveBalance(uint value) internal returns(uint);

    // the amount of reserved balance
    function reservedBalance() public view returns(uint);

    // called during the withdrawal of money from contract. Strictly internal!
    function freeBalance(uint value) internal returns(uint);

    event BalanceReserved(uint value, uint total);
    event BalanceFreed(uint value, uint total);
}
function reserveBalance(uint value) internal returns(uint);

// called when one needs to give some sum to some party. Strictly internal!