Money is any object or record that is generally accepted as payment for goods and services and repayment of debts in a given country or socio-economic context. The main functions of money are distinguished as: a medium of exchange; a unit of account; a store of value; and, occasionally in the past, a standard of deferred payment. Money originated as commodity money, but nearly all contemporary money systems are based on fiat money.