my idea was here
https://pastebin.com/U1fR92tYbut I just realized A can just not grab the rebate thus not paying for the file
best way to do this is then classic mutually assured destruction contract or transaction
like 2-2 multisig with specific output amount where each signs their input to create and both lose funds unless both sign the payment transaction from the multisig once both parties are happy.
having total output amount will assure both parties contributed enough to match the output or tx is always invalid, bond/refund from file provider is obviously smaller than payment. then either you form the multisig on chain and then depend on both parties being happy or you, both can lose money if either is unhappy, and money never leaves your account if the multisig transaction isn't formed.
as always most things are solved with multisig lol
____
sorry for bad link, was trying to erase the post but board didn't let me. thanks for link as well.