The Giants went above and beyond to keep another star on Tuesday, re-signing Tim Lincecum to a two-year, $35 million contract that will result in him forgoing free agency.

The San Francisco Chronicle’s Alex Pavlovic was the first to confirm the dollars.

It’s still a paycut for Lincecum, who made $18 million in 2012 and $22 million this year under the terms of a two-year contract that took him through his final arbitration years. Of course, he signed that deal coming off a fourth straight season in which he made the All-Star team, received Cy Young votes and struck out at least 220 batters. He’s done none of those things the last two years.

In fact, Lincecum has been one of the game’s worst starters the last two years. Of the 88 pitchers to qualify for the ERA title in 2012, Lincecum finished dead last in ERA+, which accounts for pitcher friendly AT&T Park. In 2013, he finished 77th of the 81 to qualify. His strikeout rate remains quite strong, but with his velocity diminished, he’s giving up more hits and homers than ever before.

Providing some hope for the future is that Lincecum’s peripherals have been better than his ERAs the last two years. Still, unless some velocity comes back, he’s probably not going to be anything close to a $17.5 million-per-year pitcher these next two seasons. Given that the Giants do play in such a pitcher friendly ballpark and that they’ve had success with reclamation projects under Dave Righetti’s watch, it’s hard not to think there would have been much better ways to spend all this money.