The following will work for any transaction, meet regulatory approval, and provide any imaginable functionality. Stock market to grocery stores, retail and wholesale.
Stock Exchange example:
My offer 100 IBM. Offer 100 IBM at $10/share.
My terms $1000.
His counter $970. Bid 100 IBM at $9.70/share.
My counter $980. Offer 100 IBM at $9.80/share.
He accepts. Buyer hit the offer.
Example: I have 11 oranges and want 10 apples
My Offer 11 oranges
My Terms 10 apples
His Terms-escrow AAA Escrow Co.
His Terms-value 10 oranges
His Counter-value 9 apples
His Counter [computer-generated contract]
My Terms-escrow ABC Escrow Co.
My Terms-value 9 apples, 1 soda
My Counter-value 10 oranges
My Counter [computer-generated contract]
His Terms-value 8 oranges
His Counter-value 2 sodas
His Counter-value 9 apples
His Counter [computer-generated contract]
I Accept
Computer-generated contract:
He owes 9 apples, 2 sodas
I owe 8 oranges
Terms: ABC Escrow Co.
Database columns
EventID
TransactionID
CommerceID
EventType
Description
TimeStamp
Event Types
Offer
Terms (value, escrow)
Accept
Counter (offer, value)
Notice
Complete
Cancel
Deliver?
Receipt?
The above provides a full audit trail. All data is stored in text format. "Relational" data is stored in ancillary tables with the EventID for reference.
The above works intra-firm as well as inter-firm. It is an EDI format that operates on an event-basis, so it works the same on paper. The protocol allows flexibility in mode of transfer and security, without changing the structure.