Rob Kardashian is broke and the money he's paying Blac Chyna for child support is being fronted largely by the Kardashian family, but Chyna's gravy train may be leaving the station ... TMZ has learned.

TMZ broke the story, Rob has agreed to pay Chyna $20k a month in support, although some of the money is going directly to nannies. We're told Rob's primary motivation -- he loves baby Dream and wanted to make sure he'd get 50/50 custody.

Chyna was holding a domestic violence restraining order over his head -- which could ruin his chances of getting 50/50 custody -- and part of the deal was that she'd drop it in return for getting the cash. The Kardashians felt all along Chyna's motivation was money.

So the question ... how's Rob paying $20k a month? We're told his family is totally invested in Dream, and they want to make sure they have a strong relationship with her. They also worry about Chyna and her ability to care for the child, and that's another motivation to front Rob the money.

Rob is making no money now ... his days on the reality show are over, and his sock business is hardly turning a profit.

Here's the wild card -- Rob can always go back to court and ask for a modification of child support based on his income or lack thereof, so Chyna's days getting $20k a month may already be numbered.