One of my ListServe groups has been discussing the logistics & legalities behind ghostwriting - royalty percentages, etc. And that's very important, because all of that needs to be set in place before any writing occurs.
Of course, ghostwriting implies one will do most of the writing and get none of the credit. That has to be a factor when deciding whether or not to venture in this direction. What if the book does well? Your name will not be on it!
I was asked to consider writing a historical romance for someone, but with the understanding that yes, my name would be on the book. This would certainly be a better scenario than no credit at all.
Ghostwriting has been around for years. Author H P Lovecraft had many writers under him who would, with his guidance, write the story - then Lovecraft would make a couple minor changes and place his name on the piece. No wonder he put out so much work, espcially considering he lived a short life!
If you Google 'ghostwriting', you'll pull up websites that offer it as a service. "Become a best seller - let us write the book!" It is big business though, and a lot of authors make money in this manner. Of course, I do have to laugh at the self-publishing companies who offer it - if you have them do a full service on the book (editing, cover, marketing, etc.), then you've done almost nothing to contribute to the process! Takes a bit of the creative fun out of to me.
Outside of the historical romance I mentioned, I have no desire to write someone else's story. I have enough of my own ideas rattling around in my head at the moment!!