func: function createLiability(
          bytes _demand,
          bytes _offer
      )
          external 
          onlyLighthouse
          returns (RobotLiability liability)
      {
          
          uint256 gasinit = gasleft();
  
          
          liability = new RobotLiability(robotLiabilityLib);
          emit NewLiability(liability);
  
          
          require(liability.call(abi.encodePacked(bytes4(0x0be8947a), _demand))); 
          singletonHash(liability.demandHash());
  
          require(liability.call(abi.encodePacked(bytes4(0x87bca1cf), _offer))); 
          singletonHash(liability.offerHash());
  
          
          if (liability.lighthouseFee() > 0)
              xrt.safeTransferFrom(liability.promisor(),
                                   tx.origin,
                                   liability.lighthouseFee());
  
          
          ERC20 token = liability.token();
          if (liability.cost() > 0)
              token.safeTransferFrom(liability.promisee(),
                                     liability,
                                     liability.cost());
  
          
          if (address(liability.validator()) != 0 && liability.validatorFee() > 0)
              xrt.safeTransferFrom(liability.promisee(),
                                   liability,
                                   liability.validatorFee());
  
          
          uint256 gas = gasinit - gasleft() + 110525; 
          totalGasUtilizing       += gas;
          gasUtilizing[liability] += gas;
       }