Are you clear on who is proposing this? A publisher, especially for erotica, is usually looking for an author, not a ghostwriter. Ghostwriter would mean another "author" will be credited as the author of the piece.
Sharing the risk could be one way of handling it--half an agreed fee for the story up front and the other half within thirty days of delivery of the story. Thus, if the publisher doesn't want to take the risk, you lose nothing, and you take no more risk than getting half pay if you deliver the story and the publisher doesn't pay.
"I don;t spend time checking on what other people are doing, I just worry about my own shit." -- Lovecraft68
"although I may come across here as somewhat abrasive at times I respect people's efforts and take feelings into consideration." -- Lovecraft68