Johnny Cueto celebrates after pitching a complete game for the Kansas City Royals in a win over the New York Mets in Game 2 of the 2015 World Series. (Peter G. Aiken/USA Today Sports)

As baseball’s winter meetings closed last week in Nashville, there was some thought that with all the money pulsing through the sport’s arteries, only one player had misplayed his hand. Johnny Cueto, long the ace of the Cincinnati Reds before being traded last season to the Kansas City Royals, reportedly turned down a six-year, $120-million deal from the Arizona Diamondbacks — who turned around and spent $86 million more on Zack Greinke.

Yet the way the sport’s economics are configured at the moment, it appears it’s hard for a player to make a bad bet on his own worth. Monday afternoon, the San Francisco Giants announced they had agreed to a six-year deal with Cueto, the last remaining frontline starter on the market. The tally, according to FoxSports: $130 million — or $10 million more than Cueto originally turned down. Cash in that bet.

As important: The contract also includes a clause that allows Cueto to opt out after just two seasons, headed into 2018. Which brings this somewhat full circle, because the reason Cueto was pitted against Greinke in Arizona was only because Greinke’s seven-year contract with the Los Angeles Dodgers included its own opt out after three years — an option Greinke took, and wisely, as it turns out.

This is, now, the new way long-term baseball contracts for stars are constructed — with a way for a player to bet on himself as more and more money pours into the game. Lefty David Price signed his seven-year, $217 million deal with the Red Sox, but if he pitches well, expect him to take another crack at free agency following the 2018 season. Outfielder Jason Heyward, the top position player signed thus far, reportedly has two opt outs in his eight-year, $184 million deal with the Chicago Cubs.

These deals are typically described as win-win pacts. If the player opts out, it means he has played well enough that he expects to receive more on the open marketplace than he’s due in the back years of his contract, so the club would have received superlative performance in the initial years. If the contract is back-loaded, with much of the money after the opt-out year — such as the 13-year deal the Marlins granted Giancarlo Stanton, with $218 million of the $325 million total coming in the final seven seasons — the player could be enticed to stay. Win-win.

But there are, some executives believe, severe downsides for clubs. If a player is hurt or underperforms — and Stanton, for all his talent, played just 74 games because of injury this year — the team could end up with a huge sum to be paid to a player who’s not willing to subject himself to the bidding process again. That could severely inhibit roster construction.

Which brings us to Cueto, the Giants and the National League West. Greinke’s opt-out clause started this game of pitching musical chairs. The offseason began with Price, Greinke, Jordan Zimmermann and Cueto as the unquestioned leaders of the starting pitching market. Zimmermann, the former Washington National, signed first, agreeing to a five-year, $110 million deal with Detroit that was as much about comfort as it was cash. Price went next to Boston, an immediate impact for new President of Baseball Operations Dave Dombrowski.

So it seemed as if the Giants and the Dodgers would vie for Greinke and Cueto, with Greinke a good bet to go back to Los Angeles, where he said he had been comfortable and happy over his three seasons. But now that all the chairs are gone, it is the Dodgers, with the game’s greatest payroll, that have been left without any of the frontline available pitchers available this winter.

Now, they could well have a long view, because though there’s not nearly the quality in next year’s free-agent class as this one, there is Stephen Strasburg, who hails from southern California and who was drafted and signed by Washington when current Dodgers President Stan Kasten ran the Nationals. There are worse wagers than Strasburg-to-the-Dodgers.

But for now, both the Diamondbacks and Giants have improved themselves at the top of their rotations — markedly. Arizona will roll out Greinke in front of Shelby Miller, acquired last week in a trade with Atlanta, and Patrick Corbin, fully recovered from Tommy John surgery. The Giants will send Madison Bumgarner to front a rotation that will include Cueto, Jeff Samardzija (signed to a five-year, $90 million deal earlier this offseason), a recovering Matt Cain (who has made only 26 starts the past two years because of elbow problems) — with veteran Jake Peavy and Chris Heston, who threw a no-hitter last summer, suddenly candidates for the final spot.

Cueto’s inclusion in that group will spur some is-he-worth-it debate, mostly because in the postseason — the only time that matters for the three-time world champion Giants — he has largely folded. Though he threw a two-hitter for the Royals in Game 2 of the World Series just this October, his overall postseason ERA is 5.35 in seven starts, and he has particularly wilted on the road.

His résumé, though, is hard to dispute. Even pitching in the home-run haven of Cincinnati’s Great American Ball Park, here is the list of pitchers with better ERAs than Cueto’s 2.71 over the past five seasons (minimum 500 innings pitched): Clayton Kershaw. That’s it. There’s only one. (Oddly, in the advanced metric of fielding independent pitching (FIP), 22 pitchers rank ahead of Cueto.)

How Cueto pitches in spacious AT&T Park will be fascinating next year. But his deal — complete with the newfangled convention of the opt-out and the 2015 standard of nine figures — makes him fascinating beyond that, because he’ll alter the National League West race whether he stays or goes.