If Alice and Bob open a state channel with each other, for example a payment channel, and the state is as follows:
Alice initial balance: 1ETH
Bob initial balance: 1ETH
Bob sends Alice 0.20ETH
Alice sends Bob 0.25ETH
Bob sends Alice 0.30ETH
Final state: Bob=0.75ETH , Alice=1.25ETH
And Alice attempts to finalize the channel and settle on the main chain, however Bob (a malicious actor) proposes an alternate finalization as follows:
Bob sends Alice 0.20ETH
Alice sends Bob 0.25ETH
Bob sends Alice 0.01ETH
Bob sends Alice 0.01ETH
Final state: Bob=1.03ETH , Alice=0.97ETH
How is the contract able to decide which is the malicious actor in this scenario?
The only solution I could think of is if Alice wishes to publish the state to the blockchain, the final signature must be from Bob and vice-versa, but I couldn't find much documentation on this problem so I'm not sure if that solution fails in certain scenarios or not.