We give a general construction for margining derivative contracts. This generalises usefully to futures, options, collateralized loans, and state contracts such as prediction markets. For partly collateralized contracts, each side is long an option on their own defaulting and short an option on...