The Miami Heat announced Tuesday night that it has traded veteran guard Mario Chalmers to the Memphis Grizzlies.

The Heat, in a four-player swap, sent Chalmers and forward James Ennis to the Grizzlies in exchange for guard Beno Udrih and forward Jarnell Stokes.

The financially-motivated trade will save the Heat a projected $7.8 million.

The Heat had a team salary of $92.4 million coming in the trade, which put it $7.8 million over the NBA’s $84.74 million luxury tax threshold. Exceeding the tax threshold could prove very costly for the Heat.

If the Heat exceeds the tax threshold, it would become the NBA’s first team to ever pay the “repeater tax,” which adds an extra $1 for every dollar by which a team is over the luxury tax threshold, over and above the incremental tax rates that would apply.

For every dollar by which the Heat exceeds the tax level this season, it will need to pay at least $2.50 in taxes. That rate increases to $2.75 per dollar for any incremental amount by which the Heat exceeds the tax by $5 million, increasing further to $3.50 per dollar for any incremental amount by which the Heat exceeds the tax by $10 million, increasing further to $4.25 per dollar for any incremental by which the Heat exceeds the tax by $15 million, and increasing an additional $0.50 for each $5 million increment thereafter.

The final tax tally is calculated based upon the Heat’s team salary as of the start of its last regular season game, which prompted months of speculation that Pat Riley would attempt to shed Chalmers’ $4.3 million salary to reduce the team’s burden. Chalmers was reportedly made available in trade throughout the summer, with the Heat asking for essentially nothing in return.

The Grizzlies, however, were operating above the NBA’s $70.0 million salary cap and did not have a large enough exception to take on Chalmers’ salary without sending back salary to the Heat.

By rule, Memphis needed to send back between $2.8 million $5.5 million in salary in a straight up trade for Chalmers.

Miami was also constrained in potential trade scenarios, not only by its desire to reduce payroll for this season but also by its unwillingness to take back any contracts that include long-term money. The team has big plans for the summer of 2016, when the salary cap is projected to vault higher on the strength of the league’s massive new national TV rights deals, and limited projected cap room with which to execute upon them.

The only Grizzlies player whose salary fell within the necessary range for Memphis and accommodated the Heat’s desire to reduce its payroll for this season while taking on no long-term money was Matt Barnes ($3.5 million), but such a swap would only have produced $2.8 million in savings for the Heat and made little strategic sense for the Heat or Grizzlies. That, in turn, meant that Memphis needed to send out at least two players in return for Chalmers.

The only Grizzlies player with a salary high enough to be combined with just one more Grizzlies player in exchange for Chalmers was Udrih, who is earning $2.2 million on his expiring contract. Therefore, in order for the trade not to require Memphis to send out at least three players, it essentially had to involve Udrih, along with a second low-salaried Memphis player. And since the Heat was already at its 15-player maximum, taking on two players necessitated it send out not only Chalmers but also a second low-salaried player itself, which essentially had to be Ennis. The final piece of the trade became Stokes, whose $845K salary is identical to that of Ennis.

The difference in the salaries of Chalmers and Udrih will shave a projected $5.9 million off the Heat’s tax bill, with Miami saving an additional $1.9 million in salary over the remainder of the season.

The deal leaves the Heat with a team salary of $90.3 million, and $5.6 million above the tax threshold. At that level, the Heat is facing a projected tax bill of $14.2 million.

Adding that to the $90.0 million in salary obligations to the team’s current players, the $670K in salary paid to Chalmers, Ennis and Shabazz Napier prior to their trades, and the $2.7 million in cash the Heat has already surrendered in trade, yields total projected payroll and related obligations of $107.6 million.

The most the Heat has ever paid was $102.8 million in 2013-14.

Miami could pursue additional cost-reducing trades prior to the NBA’s Feb. 18 trade deadline, with an eye toward further reducing or possibly even eliminating its tax bill.

Though the Heat has denied it, league sources had suggested that the Heat requested more time from the Grizzlies before completing the trade, after the sides agreed in principle to the framework, in an attempt to recruit a third team to absorb the contract of either Stokes or Udrih. The parties went ahead with the direct deal when no third team agreed to join in, bringing to conclusion trade talks that had been going on for several days.

Had the Heat been able to find a taker for either Stokes or Udrih, it would have produced an additional $3.0 million or $7.6 million of savings, respectively. Perhaps more importantly, though, it would also have left the team a mere $4.8 million or $3.5 million below the tax, respectively, in either case just a potential trade of Chris Andersen’s $5.0 million expiring contract away from avoiding the repeater tax altogether(1).

Instead, at $5.6 million over the tax, Miami now needs more than just a trade of Andersen to fall below the tax. As such, the Heat will surely make Stokes (and possibly Udrih) available in trade to any team that wants him. Dealing him would accomplish the same goal of leaving the Heat an Andersen trade away from avoiding the repeater tax, without further affecting the Heat’s on-court product (Stokes will likely be inactive on most nights for the Heat) and while providing the team with additional flexibility (the Heat currently has the maximum 15 players under contract, all of which are guaranteed).

While the Heat reportedly attempted this summer to trade Andersen to any team willing to take him without sending back any salary in return, it has never been all that plausible. It would not only require a potential trade partner to take on his remaining salary obligations ($1.6 million at the trade deadline), but also necessitate the trade partner have the salary cap space or a large enough trade exception to swallow the 37-year-old’s entire $5.0 million cap hit.

The only teams currently capable of swallowing Andersen’s contract are the Cleveland Cavaliers, Golden State Warriors, Milwaukee Bucks, Minnesota Timberwovles, Philadelphia 76ers, Portland Trail Blazers, and Utah Jazz.

The Heat also has limited assets with which to entice such a potential trade partner to so: It does not currently have any first-round picks available for trade (no matter how far into future), very few second-round picks (a conditional 2017/2018 pick and unconditional picks in 2021 and 2022) and just $721K of available cash.

Though it has not been discussed as prominently as has been the case with Andersen, the Heat could potentially instead pursue a trade of Josh McRoberts, who might be more marketable, perhaps for little to nothing in return.

Trading McRoberts, who has three years and $17.3 million remaining on his contract, would not only remove his $5.5 million salary from the Heat’s tax calculation for this season – leaving Miami just $88K above the tax line – but also clear an additional $5.2 million of cap space for the Heat next summer – raising its projected total cap space (at the league’s current $89 million salary cap figure) from $37 million to $42 million.

If the Heat is unable to complete a tax-reducing trade by the Feb. 18 deadline, another potentially less evident means by which to lower the team’s tax hit my present itself in the final days of the regular season, care of the Portland Trail Blazers or Philadelphia 76ers.

The Blazers and Sixers currently have team salaries below the league-mandated $63 million minimum. Teams which finish the season with a team salary below the minimum are surcharged for their shortfall, with the money distributed among the players on that team. “Team salary” for the purposes of the minimum is calculated based upon the sum of all salaries that underlie each team’s current and previously terminated contracts as of the last day of the regular season, independent of how much the team may have actually paid out on those contracts. Teams below the minimum can therefore save a great deal of money by claiming players off waivers who have been released by their teams late in the regular season. By doing so, the full value of the contract they will have claimed would count toward the minimum team salary calculation, thus reducing the shortfall, even though the vast majority of it will have been paid by the team which released the player.

If, for example, the Heat were to place Andersen on waivers in the last week of the regular season to entice the Blazers – who are currently $13.6 million below the minimum – to claim him, Portland could save itself nearly $5.0 million from what might it otherwise owe in shortfall payments.

Therefore, depending upon where the Blazers and Sixers wind up in the closing days of the regular season (each could, of course, continue to add salary throughout the course of the season, rendering such a strategy ineffective for Miami), the Heat could choose to release Andersen in the hopes that he might be claimed off waivers. If he were to be, Miami would get to wipe away his entire $5.0 million salary from its tax calculation, potentially putting it in position to avoid the tax altogether.

Miami will surely monitor the evolving salary cap situations of the Blazers and Sixers throughout the course of the season, as it evaluates whether to take such an approach.

If the Heat is able to avoid the tax this season (and assuming it will avoid the tax next season as well, which is all but certain), the repeater tax – which triggers if a team pays the tax for a fourth time in five years – will not be an issue in Miami until at least the 2020-21 season.

But even if it does pay the tax this season, the repeater tax still won’t be an issue for the Heat until at least the 2019-20 season, which could in turn suggest the Heat may not be as motivated to drop below the tax as one might think. Nonetheless, the trade does produce significant savings for the Heat, and puts it in position to think about possibilities for dropping below the tax.

While the Chalmers trade makes a great deal of sense for the Heat from a financial perspective, it is difficult to justify from a strategic perspective.

Despite his individual statistical struggles thus far this season, Chalmers was a significant factor in the success of the Heat’s second unit.

Though Udrih could possibly claim some of Chalmers’ minutes in the Heat’s rotation, the trade will more significantly increase the playing time of the Tyler Johnson and, to a lesser extent, Josh Richardson.

Johnson has become an emerging talent at shooting guard for the Heat. He is short (6-foot-3) and slight (190 pounds), but he makes up for it with serious hops and sweet shooting. He’ll throw down a highlight-reel dunk just as easily as he’ll swish a three-pointer or grab a rebound typically reserved for a player twice his size. The trade, however, will shift him primarily toward a point guard role. Projecting Johnson as a full time point guard presents an element of risk. His game is more predicated to a shooting guard role. His shooting abilities are greatly enhanced when his feet are set, and he is not a natural ball-handler or distributor. In that regard, pairing him alongside Chalmers was a significant contributing factor to his (and the Heat’s) success.

Richardson has been sporadically used by the Heat thus far this season, and will need to earn any increased minutes he initially receives. The Heat has high hopes for him. It selected him with the 40th overall pick in 2015 draft, but had him ranked 24th overall on its draft board. As a rookie, however, it is unlikely he will see extended minutes whatever the circumstances.

From a strategic standpoint, therefore, the Heat has effectively traded a valuable contributor in Chalmers, the primary benefit of which is to create a few extra minutes for a player in Johnson who benefits from playing alongside him. It’s a transaction which does not make any sense if not for the corresponding financial benefit.

The deal also creates a $2.1 million trade exception for the Heat, equal to the difference in the salaries of Chalmers and Udrih. It has up to one year to utilize the exception, which can be used to acquire player(s) making up to value of the exception plus $100K in trade or on waivers without sending back salaries in return. The Heat now has three trade exceptions – for $2.1 million, $1.7 million and $1.3 million – though none are likely to be utilized.

The trade has no impact on the Heat’s summer of 2016 plans.