WHEN the Los Angeles Dodgers signed Zack Greinke to a six-year, $147m contract in December 2012, it looked like yet another example of a Major League Baseball (MLB) team comically overpaying a free-agent pitcher. Over three years had passed since Mr Greinke’s last truly outstanding season, and his fastball was already slowing down. Nonetheless, he received the biggest deal ever for a right-handed pitcher, which would run until he reached the relatively advanced age of 34. Los Angeles also included an opt-out clause, which gave Mr Greinke the option to tear up the second half of the agreement and become a free agent again following the 2015 season, were he so inclined. But given how his career trajectory had plateaued, and how much money he would be leaving on the table if he walked away, this looked like a token pot-sweetener that was highly unlikely to be used.

It turned out to be anything but. Mr Greinke enjoyed a stunning renaissance for the Dodgers. In both 2013 and 2014 he finished in the National League’s top ten in earned-run average (ERA), a standard measure of pitcher performance. And this year he enjoyed an unlikely season for the ages, posting MLB’s best ERA since 1985 and the second-best since 1968. On November 4th Mr Greinke exercised his right to opt out. One month later, he received his reward: a fresh, mammoth six-year, $206.5m contract with the Arizona Diamondbacks, representing the highest average annual value (AAV) in MLB history.

On the surface, Mr Greinke’s saga looks like a cautionary tale about the perils of offering opt-out clauses. As a one-sided option, they turn contracts into a “heads I win, tails you lose” quagmire for clubs: if the player disappoints, the team is stuck paying him to underperform, whereas if he exceeds expectations, he is free to waltz off to a competitor. And to be fair, given how dominant Mr Greinke has become (at fielding and even hitting, as well as his primary task of pitching), the Dodgers will probably have a hard time finding someone else to match his production for the $71m they would have paid him over the next three seasons. Nonetheless, it is little surprise that the new statistically savvy brain trust in Los Angeles decided to let Mr Greinke walk. And although opt-outs by definition benefit players, clever general managers increasingly appear to be utilising MLB’s peculiar economics to twist these “concessions” to their own advantage.

Annual salaries are a surprisingly misleading measure of compensation for baseball free agents (players who have completed at least six years in the big leagues, and thus gain the right to sell their services on the open market). Players generally prefer to set down roots in one city rather than having to move every few years. They also tend to be rationally risk-averse. Because of the diminishing marginal utility of money—the fact that an extra $100 is a huge help to a poor person, but makes no difference to a billionaire—players would usually rather lock in a bigger, longer deal at a lower AAV than maximise their compensation for a few years and hope they stay healthy and productive enough to retain future bargaining power. Their powerful union has reinforced this tendency: it tends to define progress by setting new benchmarks for total guaranteed money in contracts, instead of record-breaking AAVs.

On the other side of the negotiating table, teams have a strong incentive to reward players by tacking on extra years to their contracts rather than by offering more money up front. MLB’s luxury tax, designed to discourage overspending by rich teams and maintain competitive balance, is levied on club payrolls each season. Higher wages raise a franchise’s tax burden, whereas longer deals at the same rate do not. Moreover, the game’s remarkably steady revenue growth (up from $1.4 billion a year in 1995 to around $9.5 billion today) has made the final years of lengthy contracts far more affordable for clubs than the early ones.

These matching incentives mean that contract length, rather than annual compensation, is the primary distinction between the rewards for good players and great ones. Albert Pujols, widely recognised as the biggest star in baseball when he became a free agent in 2011, was given a ten-year deal at $25.4m per season, and Robinson Canó, probably the best free agent to hit the market since Mr Pujols did, also got ten years at a $24m AAV. In contrast, second-tier talents like Jon Lester, Josh Hamilton or Hanley Ramírez, who when they were signed were projected to contribute perhaps half as much on the field, received similar AAVs ($25.8m for Mr Lester, $25m for Mr Hamilton and $22m for Mr Ramírez) but for far shorter durations (six, five and four years respectively). In nearly all contracts for star free agents, players accept a below-market wage at the start of the deal in exchange for a guaranteed eight-figure salary well into their expected twilight years.

In theory, this pattern should make opt-outs nearly worthless: the seasons at the end of a contract that a player would abandon are precisely the years in which he expects to be paid more than he is worth. However, players’ agents have been rather crafty at timing the clauses to maximise their impact. Baseball players tend to peak around age 27, remain fairly close to that level until 31 or 32, and then begin a decline that grows more precipitous every year afterwards. Of the 13 contracts in MLB history that have been publicly reported to include a guaranteed opt-out clause (see table), ten set it to trigger when the player would be between 30 and 32—when he is still near the height of his powers, but unlikely to retain them for much longer.

Clubs are of course aware of the perils of inking a player on the wrong side of 30 to a long-term deal. But in a classic demonstration of the winner’s curse in auctions, it only takes one team to decide that a star is the “last piece of the puzzle” to a championship…or that his arrival will make the franchise more attractive to other players…or that it will demonstrate to fans a commitment to win…or just that this time is different, for the opt-out to yield a windfall. Of the seven players in MLB history whose opt-outs have come due so far, six have exercised the clause. (The exception, Vernon Wells, was already absurdly overpaid.) All six, now including Mr Greinke, have been lavishly rewarded.

The most notorious example is Alex Rodríguez, whose ten-year, $252m deal signed in 2000 contained MLB’s first-ever opt-out rights. Seven years later, coming off what was probably the greatest season by a player at his position in history, he upstaged the World Series by announcing he was opting out in the middle of Game Four. The New York Yankees insisted that they would never re-sign him if he were to scrap the final three years and $81m on his deal, $21m of which was due to be paid by his previous employer. But in the end the team buckled, and handed Mr Rodríguez a new ten-year deal worth $275m, representing a gain of seven years and $203m. The decision proved to be a coup for Mr Rodríguez: by the time his original contract was set to expire, he had admitted to using performance-enhancing drugs, and his contributions on the field had already begun to deteriorate. Had he not opted out, he would have been paid far less.

Mr Rodríguez is surely the biggest beneficiary of an opt-out clause, but he is far from unique. Mr Greinke wrangled an extra three years and $135m compared with his previous contract. A.J. Burnett tacked on three years and $58m. CC Sabathia added an additional season at $30m. The only player whose opt-out might have been a mistake was J.D. Drew, who walked away from three years and $33m remaining with the Los Angeles Dodgers in 2006 to sign a five-year, $70m deal with the Boston Red Sox. He wound up compiling excellent seasons in 2008 and 2009, and could probably have made more money overall had he hit the market afterwards. But he had no way to know in 2006 that his value would peak in 2009 and then collapse immediately.

In and of itself, it should come as little surprise that every player who has opted out has secured a richer, longer deal—anyone who did not expect an improvement (like Mr Wells) would simply stay put. But the opt-outers’ performance has not come close to matching their compensation. So far, just four players have already played at least one season after the end of the contract from which they walked away: Mr Rodríguez, Mr Burnett, Mr Drew and Rafael Soriano. According to the statistics site Baseball-Reference, during the three seasons before they opted out, they averaged an excellent 4.2 wins above replacement (WAR, a comprehensive measure of player value) per season (see chart). After adjusting their salaries for wage inflation using MLB’s long-run rate of 5% a year, the average AAV in 2015 dollars of their contracts containing opt-out clauses was $21.9m. Since the free-agent market this year is expected to pay about $6.2m per WAR, these players’ employers paid them $4.1m a year less than they were worth during those seasons.

The years following their opt-outs, however, have proven far less rosy for their clubs. Unsurprisingly, the seasons covered by their new contracts but not their old ones have been a debacle: the group averaged just 1.7 WAR per year while still being paid a beefy $20m annually in 2015 dollars, representing a loss for their teams of $9.4m a season. Perhaps even more concerning for potential suitors is that the first part of their new deals—the years for which they would have remained under contract had they not opted out—have also proven disappointing. During those campaigns, they were paid $23.4m a year in 2015 dollars for an average of 2.8 WAR per season, a deficit of $6.2m.

The analytics departments of MLB’s better-informed clubs are well acquainted with this grim track record. And based on the frequency with which opt-outs have been exercised, they are increasingly offering the “player-friendly” clauses as a means of relieving themselves of the burdensome back ends of long-term contracts. The Dodgers were able to secure four additional years of the services of Clayton Kershaw, baseball’s best pitcher, at a relatively affordable price, in exchange for allowing him to walk after he turns 30. On the same day that Mr Greinke’s new deal was announced, the Boston Red Sox inked David Price to a seven-year, $217m agreement with an opt-out after the third season. And most aggressively, last year the notoriously penny-pinching Miami Marlins signed an unprecedented contract with Giancarlo Stanton, the sport’s most feared slugger. It spans 13 seasons and will pay him a record $325m—of which $218m are due after his opt-out clause in 2020. If he does indeed leave that money on the table to try his luck on the open market, the team will have scored an astonishing bargain: Mr Stanton could probably receive around $40m a year if he were willing to sign a short-term deal. But if he gets injured, or his skills deteriorate, or the market simply turns south, he would probably hold on to his original contract, which could come close to bankrupting the franchise.

So far, opt-out clauses have tended to benefit the teams that offered them as well as their recipients: in five of six cases, players’ production in the seasons they were eligible to walk away from has not been worth their scheduled salaries. But six examples is far from an iron-clad sample size. Clubs that are counting on opt-outs to shorten risky deals are assuming that there will always be a greater fool willing to pay a fortune for an ageing star’s past performance. Such spendthrifts do still exist in MLB. However, as a greater number of teams implement a quantitatively driven approach, fewer and fewer of them remain in decision-making positions. Whether contracts like Mr Price’s and Mr Stanton’s turn out to be peaches or lemons depends largely on whether profligate general managers are merely endangered or outright extinct by the time their opt-out clauses come due.