Jim Carrey used to be the man who made more per film than any other actor in Hollywood. He used to command $20-$25 million per feature. Now, he's made what people are referring to as the worst deal in Hollywood, for his upcoming film Yes Man. Carrey will get paid on what's called a 'cash break' deal, which means he won't get paid until the film makes money.
Now, if you've never read any of the infamous stories of creative accounting that take place in the movie business, you should know that, as far as studios are concerned, films rarely make money. That is, after you pay for the production, the other actors' deals, marketing, P/R, development costs which could run into years worth of salaries for people, and much, much more.
Of course, maybe Carrey doesn't need the money, and just wanted to work. That's always possible.
IMDB.com: Jim Carrey Deal -- Unmasked