Engineering principles for building financial systems