They'll pay him $36 million over the next three years. Next year is still only Perez' age-27 season, believe it or not, and he's already struck out over 1000 batters in the majors. He still has tremendous upside and I think that's worth paying $36 million for, but with his body type, performance record and mechanical problems, he's more likely to break down completely over the course of the deal than emerge as an ace.
(Speaking of Perez's body type, I noted with amusement that Perez is listed at 6'3", 217. I've been wrong before, but I can't believe he weighs more than 190.)