Robert Farmer, a prodigious fund-raiser who contrived a formula to circumvent federal campaign spending limits with so-called soft money, and who was credited with raising $800 million for four presidential candidates and the Democratic Party, died on July 22 in Miami. He was 78.

The cause was complications of pancreatic cancer, his brother, Brent, said.

While three of the four candidates whose fund-raising Mr. Farmer masterminded captured the Democratic nomination, only Bill Clinton went on to win the presidency. But Mr. Farmer’s legacy to campaign financing was more enduring.

As the father of soft money, he figured out in 1988 that in addition to the $8.3 million the national party could contribute to its presidential nominee, he could funnel $42 million more to state Democratic organizations.

Since early in the 20th century, corporations and unions had legally been barred from contributing to federal elections. But they, and wealthy individuals, circumvented that prohibition and other contribution limits for individual candidates by giving vast sums to political parties. The parties, theoretically, would spend it on operating and other expenses and not on winning elections.