ismax
January 31, 2023, 12:01pm
10
You can see this post which is related, and offers a way to integrate an invalidation logic into the smart signature (aka LogicSig) so that it can be used at most once :
Hello,
I want to use LogicSig to make an atomic swap between Alice and any other person which gets the LogicSig of Alice, and I want the LogicSig to be used at most once.
Let’s call the other person Bob, the process would look like so :
Alice creates the LogicSig whose logic enforces the transactions she wants in the group
Bob happens to get the LogicSig (Alice does not know Bob) and he agrees with the atomic swap that Alice wants
Bob creates the 2 transactions from Alice to Bob and from Bob…