John Shea of the San Francisco Chronicle was the first to report that Matt Cain and the San Francisco Giants would agree to terms on a five year contract prior to the Opening Day deadline that both parties set for their negotiations. Shortly after this rumour, it was confirmed that Cain would sign a deal worth $112.5 million including a $5 million bonus and a $7.5 million buyout of an option (that could vest with enough games started in 2017) for a sixth year.

If that option vests or is picked up, it would make the contract worth $127 million over six years.

The guaranteed part of the deal would be the 29th richest in baseball history, and the fifth highest sum paid out to a pitcher, behind teammate Barry Zito among others, and, perhaps most importantly, the highest ever paid to a right handed pitcher.

In a vacuum, a $112.5 million deal assumes Cain will be worth somewhere around 18 wins above replacement from ages 28-32. From ages 22-26, Cain was worth 19.9 WAR according to FanGraphs, 21.0 WAR according to Baseball Reference and 15.2 WARP according to Baseball Prospectus.

Not in a vacuum, the deal represents a great signing for the Giants, who retain the services of an improving starting pitcher who hasn’t reached his typical peak years. Anytime a team can lock up talent like Cain at his age at a reasonable price like this, it should be done, even for an organization already stocked with excellent starting pitching.

With his first few years in the league, Cain gained a reputation for being a fly ball pitcher that greatly benefited from pitching at AT&T Park. While constantly defying those who predicted an eventual drop off in his results based numbers, Cain has become more of a complete pitcher in recent years, even raising his ground ball rate above 40% last season after making a sinking fastball a part of his repertoire. For what it’s worth, this Spring, he’s used the pitch even more frequently and with more movement.

The terms agreed to here now set the bar for other potential free agent starting pitchers of a similar quality to Cain, including Cole Hamels and Zack Greinke. As previously mentioned, the $112.5 million may be less than Cain would have gotten on the open market. However, it mitigates any risk for Cain having an off year or an injury in 2012.

Of course, the best thing to come out of the signing is a comment from Jeremy Affeldt:

I was excited he signed. I’ve been paying for lunch for four years. Now I’m not bringing my wallet at all.