Smart contracts for multi-party transaction processing