Cyrano Jones. Mudd was in two other episodes, only one of which actually depicted him as anything like a trader.
Jones traded in exotic items. He sold living creatures, which presumably could not be replicated (though I see no technical bar to it–this is more likely a legal restriction), flame gems, and “Antarean glow-water”. There did not seem to be much of a market for the latter two items, but presumably they were not available from replicators for some reason; given the names, maybe they had energy signatures that were incompatible with replicator tech, or maybe they had just never had patterns encoded.
Mudd was actually trading in women, essentially selling the equivalent of mail-order brides (with a side line of “Venus drug”). Presumably, there are some pretty strict laws against replicating people.
“Post-scarcity” does not necessarily mean that anything and everything is available to everyone at all times. It means that, at minimum, all necessities are available to everyone at no cost. There can still be things to buy or trade for–services, novelties, and art, to name a few–and you still need some way to mediate these exchanges.
The RPG Eclipse Phase goes into a great deal of detail on post-scarcity economies. The setting has an equivalent to replicator tech–nanofabrication devices called cornucopia machines–and effectively unlimited power. It addresses three major types of economy in a system where such tech exists.
The “old” or traditional economy: Cornucopia machines exist, but are strictly controlled by one or more manufacturing companies, who sell the items they produce to a captive market. (Think of old mining towns with a company store.) The economy runs on money.
The transitional economy: Cornucopia machines are available to the general public, but are restricted to only producing necessities–you can make your own food, drink, clothing and shelter effectively for free, or for the price of a nominal tax. Corporations control the unrestricted machines, and use them to manufacture luxury goods for sale. There’s also a barter system of sorts, in which people produce novel designs and recipes for the public machines and swap them for other designs, services, or non-manufactured goods. The barter economy is mediated chiefly by reputation–this is similar to the reputation systems on some message boards. Basically, if you’re known to produce good things and help people out, people are more likely to trade with you. The economy runs on a combination of money and rep (which can be thought of in terms of “credit”).
The “new” economy: Unrestricted (or nearly unrestricted–many of them lock out weapon of mass destruction designs) cornucopia machines are available to anyone. You can make pretty much anything you want, though if your design uses rare materials, you’ll probably have to supply them. Trade is almost entirely in novel designs and services, and is handled by rep. People who contribute a lot to the community–by doing support work to keep things running and by producing popular designs–garner high reps, and can trade on those reps to get things they want. If you stop producing and start mooching, people notice, and your rep drops. The economy runs entirely on rep, except when trading with outsiders (who have no local rep, and have little reason to value the rep of locals). If a local needs to buy something from an outsider, he can trade on his rep to get money from someone who has sold something to an outsider–basically a currency exchange between “credit” and “money”.
In the time of TOS, it seems to me that the Federation runs on something like an advanced transitional economy; necessities are readily available to all, but services and luxury goods like jewelry and pets must be traded for. Rep and money are effectively interchangeable symbols for the goods and services you provide, and are quantified as “credits”. Uhura, for example, provides a valuable service to the Federation through her service in Star Fleet–she’s contributing to the common defense and exploration. She receives credit (rep) for that, which she can use to acquire other goods. In practical terms, credits are money, but the attitude behind them is changing, which is why Kirk at one point claims that they don’t use money.
In TNG, they’ve moved farther into a transitional economy, almost to a “new” economy within the Federation. Most luxury goods can be replicated easily, but people trade for luxury goods that they don’t have replicator patterns for–bolts of cloth with a novel design, particular vintages of wine, items that still can’t be replicated, and so forth. The rep system has fully assumed the role of money, with automated tracking and conversion mechanisms for dealing with external systems, but the Feds (snooty bunch that they are) regard it as something very different. They never go into the details of how much various people get “paid”, but it’s possible that an officer’s pay fluctuates depending on current public attitudes toward Star Fleet–so when a ship makes some great discovery, or is dealing with a publicly known threat, their pay may spontaneously rise. If they screw up in some spectacular way, they may actually get their accounts docked.
So, when Riker is gambling with credits, he is literally staking his reputation (or part of it, at least) on his skill and luck.