I suggest to add a fourth type of transaction, the swap. This makes trading assets identified by traces atomic and observable.
Rule 4. Swap
A valid swap has two inputs and one or two marker payments to project address(es). The swap has two regular outputs with addresses matching the inputs but swapping the input quantities reduced by payments to project address(es).
A is an address having ALPHA (project address) trace, B has (optional) BETA trace. a is the quantity of ALPHA swapped for b amount of BETA.
Inputs Outputs
A a B a - marker
B b A b - marker
ALPHA marker
BETA marker
Interpretation:
Swap a(-marker) of ALPHA for b(-marker) of BETA
Rule 4. Swap
A valid swap has two inputs and one or two marker payments to project address(es). The swap has two regular outputs with addresses matching the inputs but swapping the input quantities reduced by payments to project address(es).
A is an address having ALPHA (project address) trace, B has (optional) BETA trace. a is the quantity of ALPHA swapped for b amount of BETA.
Inputs Outputs
A a B a - marker
B b A b - marker
ALPHA marker
BETA marker
Interpretation:
Swap a(-marker) of ALPHA for b(-marker) of BETA
interesting