Surprisingly, it can maintain the trustless nature of on-chain contracts, while being drastically more efficient and private.
Using a hash-based commitment scheme, we introduced a contract to achieve fair coin toss without a trusted third party.
To discourage any party from aborting in the coin toss, each has to pay some deposit during the setup phase in Tx0.
This above approach can be generalized to arbitrary types of contracts, where security and fairness is desired when multiple distrusting parties want to conduct businesses without relying on a trusted third party.
Retaining the trustless benefit of on-chain smart contracts enjoy salient advantages.
In the toy example, we save 2 out of 6 transactions, a 33% reduction of on-chain transactions.
Since only a subset of transactions are settled on chain, anyone who only watches the blockchain may not obtain full information to figure out what is going on.