Lightning Network is a decentralized system that enables real-time, massive trading networks without trusting each other and third parties.
The Lightning Network evolved based on the micropayment channel and creatively designed two types of trading contracts: the sequence expired revocable contract RSMC and the hash time lock contract HTLC. RSMC solves the problem of one-way flow in the channel, and HTLC solves the problem of currency cross-node transfer. These two types of transaction combinations constitute the lightning network.
Below we look at the problems in the micropayment channel, that is, the problems that RSMC needs to solve:
For two-way payment, both parties can transfer money to each other instead of a single channel.
One party withdraws halfway, and the other party must immediately get the money back, instead of waiting for nLockTime to expire to get the money back. …