Hmmm, and yet...
...they regularly played poker with "Federation credits" or "gold-pressed latinum". And I really don't see much point to living in a hell-hole mining dilithium crystals unless there was some kind of big payback in doing so.
Even in the Star Trek universe, they needed money to keep things working.