We investigate financial contract management on distributed ledgers and provide a working solution implemented on the Ethereum block-chain. The system is based on a domain-specific language for financial contracts that is capable of expressing complex multi-party derivatives and is conducive to automated execution. We propose an architecture for separating contractual terms from contract execution: a contract engine encapsulates the syntax and semantics of financial contracts without actively performing contractual actions; such actions are handled by user-definable contract managers that administer strategies for the execution of contracts. Hosting contracts and contract managers on a distributed ledger, side-by-side with digital assets, facilitates automated settlement of commitments without the need for an intermediary. We discuss how the proposed technology may change the way financial institutions, regulators, and individuals interact in a financial system based on distributed ledgers.