Negotiating deals in the NBA is hard when you know the ground rules. Good luck doing it when you don’t — when you can only make educated guesses about where the salary cap is going over the next two seasons, and those guesses could be off by $10 million or so for 2016-17.

Case in point: Klay Thompson’s new deal is not a max contract, despite having been reported as such, per sources familiar with the matter. The first-year salary in a true max contract is set as a percentage of the cap rather than a straight dollar figure — a 25 percent share of the cap for most players coming off rookie contracts, with 7.5 percent annual raises from there.

Had Thompson signed a true max contract, we wouldn’t know his precise salary, since we don’t know the salary-cap figure for the 2015-16 season — the first in Thompson’s fat new deal. The league has projected the 2015-16 cap at about $66.5 million, and under that cap number, a Year 1 maximum salary for Thompson would come in at about $15.5 million. But if the cap shot up higher than that, Thompson’s salary under a true max contract would shoot up with it.

The Warriors have protected themselves from such a scenario by giving Thompson almost the exact dollar-for-dollar equivalent of a max contract under the $66.5 million cap scenario — but doing so outside the confines of a maximum contract, per several sources familiar with the matter. In other words: Thompson’s contract sticks at four years and $69 million regardless of what happens to the 2015-16 cap between now and the start of next season.

The Warriors may not end up needing such protection. No one knows what will happen to the cap in 2015-16 and 2016-17, the first year of the league’s mammoth new national TV contract, but the league’s most recent projections for 2015-16 remain in the range of $66 million to $68 million, per several league sources. It appears unlikely the league bakes any of the anticipated TV money into the cap figure a year early, meaning the 2015-16 cap will sit right around where the NBA had projected it.

But the Warriors were smart to structure the deal this way, since the league’s finances are so fluid. The league and players’ union have only just started discussing “smoothing” proposals for the TV money that would have the cap increase in similar year-by-year increments instead of shooting up in a single season — that 2016-17 campaign.

Who knows where those talks will lead? If the TV money flows in without any smoothing scheme, the cap could jump from about $66.5 million in 2015-16 to somewhere in the $90 million ballpark the following season — an unprecedented one-year spike. The league would like to spread that jump over several seasons so teams can plan with some certainty and one class of free agents — those hitting the market in the summer of 2016 — don’t get to cash in on a once-in-a-lifetime bonanza while their peers sit out.

Michele Roberts, the new executive director of the union, made it clear last week she is not prepared now to accept the league’s smoothing plan. Several agents have told me they would prefer the one-year spike, even if it favors some of their clients over others.

A one-year leap like that would plunge the league into chaos, and some agents enjoy negotiating amid such turmoil. Players eligible for max contacts in that summer would naturally favor the highest possible cap figure, since their deals would come in as a percentage of that cap figure. A 30 percent share of $90 million is bigger than a 30 percent share of $80 million.

The Warriors have an intense interest in how this all works out. If the cap jumps unchecked into the $90 million range in 2016-17, the Dubs, even with Thompson’s pricey new deal, could re-sign one of the Draymond Green/Harrison Barnes duo and still have enough cap space to fit a max contract for Kevin Durant or some other player.

It might seem crazy to talk this early about Durant’s free agency, and to link a team like Golden State to Durant. But we’ve been through this before with Carmelo Anthony, Kevin Love, Dwight Howard, Deron Williams, and others: The machinations surrounding a star player’s free agency don’t start when his contract expires, or even in the final season of his contract. They start the year before, when everyone can see the end of the contract in the distance, and maximizing the star’s trade value becomes a pressing issue if that star is disgruntled.

There is no evidence Durant is disgruntled. Repeat: There is no evidence Durant is disgruntled. If the Durant/Russell Westbrook/Serge Ibaka three-man core stays healthy, Durant is living within a roster that could hit 60 wins in every season for at least the next five years. That is a tough situation to leave.

But you’re kidding yourself if you think the Thunder aren’t well into the process of thinking about Durant’s future, or that other teams aren’t lining up their cap sheets to make a run at him. It might be unpleasant to read and hear chatter about a thing that is 18 months away, and I do my best to focus on the actual NBA games during the NBA season. But this is reality.

Back to Golden State: Green has been a more productive player than Barnes, in part because he’s a more realistic heavy-minutes option at power forward. Green is also a free agent this summer, and if he has another strong season, he’s going to command something in the $7 million–plus range.

Bring Green back at that number, and the Warriors will be looking at a payroll approaching $90 million for next season — about $7 million or so above the tax line, as Adam Lauridsen and Tim Kawakami have pointed out. The Warriors have never paid the luxury tax. Combine that payroll with tax payments, and the Warriors would be shelling out something like $105 million just to field their team next season.

Are they willing to do that? History suggests they are not. The only way they could duck the tax or meaningfully trim their bill would be to trade David Lee or Andre Iguodala, both valuable contributors. Golden State would have to attach a sweetener to Lee, and the team is already out a 2017 first-round pick to the Jazz.

The Warriors might be willing to bite the tax bullet for one season, depending, again, on where the league and union end up on smoothing. If things break right for Golden State, the tax line in the following 2016-17 season will shoot far beyond the point at which they’d really have to worry about ever paying it again.

Regardless: Don’t be shocked if Lee ends up in trade rumors over the next few months. Barnes in theory could work as that trade sweetener, since the Warriors could probably get by on the wing with Iguodala, Thompson, Shaun Livingston, Leandro Barbosa, and Green logging spot minutes at small forward.

As for Thompson, he was getting a max deal, now or over the summer in restricted free agency. He’s a world-class shooter, a very good defender at multiple positions, and he has exploded early this season with a more confident off-the-dribble game. He’s a grinder. Almost everyone has a need on the wing, and we saw this summer with Gordon Hayward and Chandler Parsons that teams dying for wing help are not afraid to chase a restricted free agent.

The Mavs nabbed Parsons with a three-year offer sheet, and teams in Golden State’s position fret now about rivals copying that model. Golden State could have matched such a three-year deal, but ask Minnesota how it feels to ink a core player to a shorter deal when avenues to an extra year or two were easily available to you.

If there’s a critique here, it’s that Golden State didn’t go the whole hog and just sign Thompson to a full five-year max extension. Doing that would have required offering Thompson a true max deal, and with the glittery new TV deal promising future free-agency bounties, Thompson might have wanted to reenter the market after four years instead of five.

Thompson hasn’t yet produced like a “max” player, but if he can sustain 80 percent of his fantastic early-season level, he’ll easily play up to this salary. Now is the time to lock up young players to long-term deals. What looks like a large share of a $66 million cap will look comparably small when that cap shoots up to $90 million.

Alec Burks has been a perfectly average wing player over his first three seasons, and the Jazz just tossed him $10.5 million per year starting next season — nearly double the current average player salary. Burks is a slithery rim attacker who earned a bundle of foul shots last season, but he has been a reluctant and mediocre 3-point shooter. His off-ball defense is too often either spastic or spacey.

But he’s just 23, he wants to be in Utah, and he’ll get better. Almost every young guy does. There’s a reason extensions tend to morph into better bang-for-the-buck deals than veteran free-agency signings. Young guys improve. We all laughed at the extensions for Mike Conley and DeMar DeRozan, and we all learned a hard lesson. Burks will shoot more 3s under Quin Snyder, and he’ll become a more heady defender — even if he’ll never have the size to slide up a position and guard the tallest and bulkiest small forwards.

That $10.5 million looks like a lot now, but it might account for just 11 percent of the cap in two seasons. That’s a fine contract for a legit starter at a thin position. Utah will be just about capped out this summer once you factor in Enes Kanter’s cap hold, but it’s not a mega free-agent destination. If the Jazz sense some nibbles from a bigger free agent, they could open up space by renouncing Kanter’s Bird rights and buying out Trevor Booker’s nonguaranteed deal — a painful move, given that Booker looks like a nice fit under Snyder.

Utah could bring Kanter back and still have plenty of flexibility in the summer of 2016, though its cap room would shrink if the league and union agree to deflate the cap. Like a bunch of other teams, Utah can only hope for more information in the interim.

Speaking of cap holds! The Spurs and Kawhi Leonard did not agree on an extension, which seems insane, since Leonard is a two-way beast who just won the freaking Finals MVP award. The reason is simple, as Matthew Tynan pointed out at the wonderful blog 48 Minutes of Hell: If Tim Duncan and Manu Ginobili retire, the Spurs could have enough cap space to lure a max-level free agent who might fit their system. If we do say farewell to those two legends, R.C. Buford should be sharing some tapas with Marc Gasol at the stroke of midnight on July 1, though there will be lots of other big men available if Gasol decides to stick around in Memphis.

Signing Leonard to a max contract now would imperil that plan. It would immediately slot Leonard onto the books for 2015-16 at $15.5 million. With Leonard instead entering restricted free agency, he will appear on the Spurs’ books as a $7.2 million cap hold charge. That $8.3 million gap would probably be enough to take the Spurs out of the max-level free-agency derby if the cap sticks in the $66 million to $68 million range. Again: It might go higher. It probably won’t, but we don’t know for sure, and the Spurs are playing it conservatively here.

That $8.3 million difference could be especially important given that Danny Green is also a free agent. His cap hold is about the same as Leonard’s, meaning the Spurs will have to work some limber cap gymnastics to keep both their starting wings and sign a max free agent.

The Rockets can tell you how delicate these balancing acts are. They let Parsons sit in free agency as a super-cheap cap hold, hoping he might sit tight, let Houston sign Chris Bosh into cap space, and then re-sign a big contract that would rocket Houston over the cap — a legal maneuver as long as it is executed in that order, since teams can blow past the cap in bringing back their own guys.

That is San Antonio’s dream plan: Nab a max free agent with cap room, and then bring back both Leonard and Green (if possible) by using their Bird rights to jump over the cap.

It’s a dangerous game. Someone might toss Leonard a Parsons-style three-year max, just to test San Antonio’s mettle. The Spurs would surely match it, but a three-year contract is not the ideal outcome when you can lock in such a talented player for five years. San Antonio is not letting Leonard go. That knowledge might be enough to scare teams out of devoting precious cap space to a failed Leonard gambit, but it takes only one brave soul to scuttle a complex plan.

The Spurs are using the hammer of restricted free agency to frighten suitors and get what they want. That’s the point of restricted free agency. Holding off also hedges against Leonard possibly taking a step back for whatever reason, including health issues, and we haven’t seen how Leonard would really fare as a top offensive option over a full season.

On the flip side, if Leonard makes another mini leap and the Spurs offer something less than the max, he could follow Greg Monroe’s lead and sign the one-year qualifying offer. That hasn’t been a legitimate threat for players in the past, but if the league can’t negotiate any cap smoothing plan, players in Leonard’s situation might look harder at signing a one-year contract and reentering free agency for the 2016 bonanza. The risk/reward would change. We just don’t know yet.

As for the other defense-first wing stud who couldn’t agree on a deal, the Bulls are hoping the same “they’ll match any offer” fear works as a deterrent in Jimmy Butler’s free agency. Butler played most of last season with turf toe, and nearly all of it without Derrick Rose to free him up for easier looks. He’s a ferocious defender at both wing positions, and if he shoots better this season, some team with max-level cap room might be tempted into lavishing a huge offer sheet on Butler.

The Bulls would surely match it, since they’ll have no cap space to replace Butler. They were smart to try to coax Butler into a cheaper team-friendly deal now, holding firm, and banking on Butler’s restricted status to dampen his free-agency market in the summer. Butler was smart to tell Chicago to screw off, and play it out. He could also go the qualifying offer route if Chicago proves intractabull (see what I did there?), but even when teams have a clear edge in the restricted free-agency stalemate, they tend to offer a fair deal in the end. Eric Bledsoe got his five-year, $70 million deal in August after an endless standoff with the Suns; the threat of Bledsoe following the Monroe model might have pushed Phoenix over the edge.

The Blazers had Nic Batum over a barrel in 2012, but eventually gave him a big $11 million–per-year deal. The Wolves scared everyone away from Nikola Pekovic, but they didn’t use that leverage to lowball him; Big Pek got his five-year, $60 million contract. Maintaining goodwill with players is important, and it sends the right message to future free agents.

Bottom line: It was hard to sign a truly bad extension this fall, and it will be hard to sign a truly bad contract this summer. Charlotte and Minnesota probably overpaid Kemba Walker and Ricky Rubio, respectively, given the leverage the teams would have had in restricted free agency and the leaguewide depth at point guard, but those will be no-harm, no-foul deals when the cap is at $90 million.

Welcome to the new, and still evolving, NBA.