I think this is the right approach. It starts to look more and more like a bilateral payment channel network like Lightning, but built on a better substrate (where rebalancing between your channels happens naturally, rather than requiring a full on-chain transaction).
Unfortunately I believe it’s a little more complicated than I had thought—the exit game needs to account for a lot of edge cases, including the following difficult case:
- Alice has signed an atomic transaction trading her coin 1 for Bob’s coin 2 but doesn’t have a signature from Bob
- the operator begins withholding blocks
- Bob attempts a withdrawal from coin 1 (from some possibly invalid new transaction, which could be after the atomic trade) and coin 2 (from the coin Alice was trying to trade with him) simultaneously.
Alice would need to challenge coin 2 to find out the information she needs to challenge coin 1’s withdrawal.
We think there’s probably a way to do it if you augment the exit game, and possibly have two rounds of signatures on each atomic transaction. But requiring the ability to safely have multiple atomic transactions in flight seems like it’s courting unmanageable complexity, so I’m not sure if that part of the defragmenting protocol will be worth it.