In such a system, there must be a coincidence of wants before two people can trade - they must want exactly what the other has to offer, when and where it is offered, so that the exchange can occur. A medium of exchange permits the value of a good to be assessed and rendered in terms of the intermediary, most often, a form of money widely accepted to buy any other good.
To serve as a medium of exchange, a good or signal need not have any inherent value of its own, that is, it need not be effective as a store of value in itself. Paper money is a useful medium of exchange in part because it has no such value, thus, it cannot lose that value if damaged, and so damaged paper money is easily replaced. Gold was long popular as a medium of exchange and store of value because it was convenient to move large quantities, but it wasn't reactive, and so would not tarnish or lose weight or value.
A longer term obligation need not be measured in the same terms as the immediate medium is, that is, the medium need not be a standard of deferred payment. Many currencies in periods of high inflation have become unacceptable as denominations of debt - creditors demand contracts that specify payments in some stable currency such as the US dollar, or a quantity of gold or food perhaps, but continue to use the unstable local currency as the daily medium of exchange. The standard of deferred payment tends to trade at a premium in such circumstances, and some goods are not available to those who deal in the medium of exchange currency only.
Although the unit of account must be in some way related to the medium of exchange in use, e.g. coinage should be in denominations of that unit making accounting much easier to perform, it has often been the case that media of exchange have no natural relationship to that unit, and must be 'minted' or in some way marked as having that value. Also there may be variances in quality of the underlying good which may not have fully agreed commodity grading. The difference between the two functions becomes obvious when one considers the fact that coins were very often 'shaved', precious metal removed from them, leaving them still useful as an identifiable coin in the marketplace, for a certain number of units in trade, but which no longer had the quantity of metal supplied by the coin's minter. It was observed as early as Oresme, Copernicus and then in 1558 by Sir Thomas Gresham, that bad money drives out good in any marketplace. A common explanation is that people will always keep the less adultered, less clipped, sweated, less filed, less trimmed coin, and offer the other in the marketplace for the full units for which it is marked. It is inevitably the bad coins proffered, good ones retained.
The fact that a bank or mint has always been able to generate a medium of exchange marked for more units than it is worth as a store of value, is the basis of banking. Central banking is based on the principle that no medium needs more than the guarantee of the state that it can be redeemed for payment of debt as "legal tender" - thus, all money equally backed by the state is good money, within that state. As long as that state produces anything of value to others, its medium of exchange has some value, and its currency may also be useful as a standard of deferred payment among others, even those who never deal with that state directly in foreign exchange.
Of all functions of money, the medium of exchange function has historically been the most problematic because of counterfeiting, the systematic and deliberate creation of bad money with no authorization to do so, leading to the driving out of the good money entirely.
Other functions rely not on recognition of some token or weight of metal in a marketplace, where time to detect any counterfeit is limited and benefits for successful passing-off are high, but on more stable long term social contracts: one cannot easily force a whole society to accept a different standard of deferred payment, require even small groups of people to uphold a floor price for a store of value, still less to re-price everything and rewrite all accounts to a unit of account (the most stable function). Thus it tends to be the medium of exchange function that constrains what can be used as a form of financial capital.
It was once common in the United States to widely accept a cheque as a medium of exchange, several parties endorsing it perhaps multiple times before it would eventually be deposited for its value in units of account, and thus redeemed. This practice became less common as it was exploited by forgers and led to a domino effect of bounced cheques - a forerunner of the kind of fragility that electronic systems would eventually bring:
In the age of electronic money it was, and remains, common to use very long strings of difficult-to-reproduce numbers, generated by encryption methods, to authenticate transactions and commitments as having come from trusted parties. Thus the medium of exchange function has become wholly a part of the marketplace and its signals, and is utterly integrated with the unit of account function, so that, given the integrity of the public key system on which these are based, they become to that degree inseparable. This has clear advantages - counterfeiting is difficult or impossible unless the whole system is compromised, say by a new means of prime number factoring. But at that point, the entire system is broken and the whole infrastructure is obsolete - new keys must be re-generated and the new system will also depend on some assumptions about difficulty of factoring.
Due to this inherent fragility, which is even more profound with electronic democracy and the voting machine, some economists argue that units of account should not ever be abstracted or confused with the nominal units or tokens used in exchange. A medium is just that, a medium, and should not be confused for the message.