How would you design a distributed system that maintains data consistency for financial transactions?