Counterfactual is comprised of several components: a library for off-chain applications, an intuitive generalized state channels protocol, and a set of Ethereum smart contracts.
Instead of prompting users to sign and submit transactions that get sent to a blockchain network directly, users sign (sometimes automatically) commitments that could be sent to a blockchain, but are instead sent directly to their counterparties.
Counterfactual provides a simple client library, similar to Web3, that applications can use to construct and transmit messages to their counterparties using the off-chain protocol.View on Github
Counterfactual defines a protocol for off chain applications that is maximally secure, flexible, and intuitive while remaining abstract enough to cover arbitrary blockchain transactions. At its core, the protocol is centered around a type of conditional transaction based on the outcome of an "AppInstance"; a state channel application. These applications can be installed, updated, and uninstalled within a state channel.View on Github
All transactions that users sign while using the protocol are ultimately designed such that they could be placed on the blockchain in the case of a party being unresponsive or attempting to deviate from the protocol. Counterfactual implements the minimum functionality needed for dealing with state channels of abstract transactions by combining the best in class research from teams like L4, Magmo, Sprites, Perun, and many others into a single on-chain set of contracts.View on Github