Gas is paid whenever a request is processed on the blockchain. Even if a transaction fails, it still takes computing power to determine whether or not the transaction can succeed. The Ethereum network charges gas for the operations executed up until the transaction fails. These transaction fees are not paid to the ZED, but to the Ethereum network and miners, so do not hate on us!