They've been inconsistent about whether or not they use money on Earth. I don't think they do but most other places seem to. On DS9 Quark charges latinum for drinks and gambles with it but the Starfleet officers who live there aren't being paid. I don't think they're paying rent for their quarters. And Starfleet maintenance does repairs for Quark's bar and holosuites. It's weird. And then on the promenade there's the replimat, which is like a little cafeteria area where you get replicated food and drinks and sit down to eat and that looks like it's free. Quark charges but there's no kitchen in the back. He's just replicating stuff too. Anyway. I don't know.