In July 2016, the Portland Trail Blazers signed restricted free agent Meyers Leonard, their backup center, to a four-year, $41 million contract. It was at the tail end of a surge of large contracts given out that summer, the greatest time in NBA history to be a free agent.

This summer, the Blazers' starting center, Jusuf Nurkic, will be a restricted free agent. He might find it hard to draw an offer from an outside team larger than what his backup is being paid.

In the 2015-16 season, the Boston Celtics assembled an impressive 48-34 season behind the play of a collection of gritty perimeter players. Two of them were Evan Turner and Marcus Smart. Turner was a bit more effective as an offensive creator, Smart more of a defensive grinder. But they played similar minutes and offered similar stats.

Turner, who had the fortune of being an unrestricted free agent that summer, got a $17.5 million per season deal from the Blazers. This summer, Smart, who will be a restricted free agent, might face an environment in which role players could struggle to field outside offers above the $8.8 million midlevel exception, according to multiple league executives.

Smart and Nurkic aren't alone. It's always hard to be a restricted free agent, but even unrestricted free agents this summer -- players such as Avery Bradley, Isaiah Thomas, DeAndre Jordan, Lou Williams and Will Barton -- will likely find things dramatically different than just a couple of years ago when teams handed out a billion dollars in just 24 hours.

These situations illustrate a fast-changing NBA economic climate that is already showing up as teams dig into trade deadline maneuvers. The bull market that surged in the league in 2016 and 2017 is giving way to a bear market. The league is about to face a cash crunch.

"The trade market is mostly sellers right now," one general manager said. "There's only a few buyers. Looking at everyone's books, I don't think that's going to change much this summer."

Here are a few numbers to explain

Currently, there are five teams slated to pay the luxury tax this season, which means those teams are spending more than $119 million on payroll. Last season, there were two such teams. In the 2015-16 season, there were seven. That's a total of 14 teams over a three-year span.

That was about the same as the previous three-year span: From 2012-13 to 2014-2015, a total of 16 teams paid the tax. Average it out, and roughly five teams per season have been willing to pay the penalty since 2012, which is relevant because that season is when a more penal luxury tax was introduced.

Next season, 12 teams are currently projected to be in luxury tax territory, and another handful could easily get there by re-signing their key free agents. For example, the Milwaukee Bucks aren't currently projected to be in the tax but would cross into the zone if they re-sign free-agent-to-be Jabari Parker.

"Add it all up, and it's a bad year to be a free agent -- or a team looking to reduce salary."

"The luxury tax was not designed for this many teams to pay it," a league executive said. "Many of those owners probably didn't think they'd be paying it. Quite a few of those teams are probably going to take steps to get out of the tax or limit new spending."

This season, teams are paying players a collective $3.13 billion in salaries. But after large jumps in the salary cap the past few years -- from $63 million in 2014-15 to $99 million this season -- the cap is projected to increase only to $101 million next season.

That's $60 million in money added to the cap. That sounds like a lot, but NBA teams already have $3.02 billion committed to players under contract next season. About 18 months ago, the NBA told its teams that the projected the cap for the 2018-19 season was going to be $107 million.

"Picture the spending on salaries as a large tank of water," one GM said. "The last several years, the tank has been getting bigger, and so we've been filling it with more water. But this year the tank is staying about the same size. There's no place for the water to go. There's only so much the owners are going to spend when you have a luxury tax out there."

The players are guaranteed 51 percent of the NBA's basketball-related income each season, so they are guaranteed to get a certain amount of "water," to use that analogy. However, most of that percentage appears to be tied up in players already under contract, so there won't be as much "new" money to go around.

Teams with $10M+ cap space

Atlanta Hawks

$21 million

Brooklyn Nets

$15 million

Chicago Bulls

$24 million

Dallas Mavericks

$20 million

Los Angeles Lakers

$35 million

Philadelphia 76ers

$30 million

Phoenix Suns

$17 million

Right now, there are just seven teams expected to have significant cap space next summer. Last year, 10 teams had significant space. In 2016, more than 25 teams had at least $10 million in room. Some of the teams projected for room this summer, such as the Chicago Bulls, might sit out of the free-agent market and instead look for trades. The Bulls already demonstrated their intentions by taking on Omer Asik and the $19 million remaining on contract in return for getting a first-round pick from the New Orleans Pelicans.

Other teams with coming cap space who aren't ready to contend immediately -- like the Atlanta Hawks and Phoenix Suns -- may be more judicious with their money instead of making big offers to free agents like nearly every team was doing just two years ago. Instead, they may look for trade opportunities and it could depress the free-agent market further.

"There are going to be a lot of teams who are looking to move money," a general manager said. "And there aren't many places for it to go. So it will be hard to offload salary, and if you want to, the teams with space will probably charge high prices to take money from your books."

All these factors have executives expecting the midlevel exception to be the primary option for many teams looking to add players. But with half the league in the tax or in danger of going into the tax, many teams won't spend the full $8.8 million and instead will opt for the "taxpayer midlevel" of $5.4 million.

Add it all up, and it's a bad year to be a free agent -- or a team looking to reduce salary.

When will the situation improve?

"Is it going to be a little bit of a tough period? Yes, but we'll wake up in the summer of 2019 and 2020, when those contracts that were signed in 2016 come off the books, and there will be a lot of money again," longtime NBA agent Mark Bartelstein said.

"I've seen much worse. The cap was trapped between $50 and $60 million for [eight] years. Now the cap is at $100 million, and there's still only 15 players on a team. Things are always changing in the NBA because it's so fluid. Players will understand the risk and reward. NBA free agency is always a competitive marketplace."