When the free-agent floodgates open at 12:01 a.m. ET on Friday, an unprecedented spending spree will sweep through the NBA. There's more than $1 billion in cap room in the marketplace, and not enough players worthy of the massive contracts that will be handed out.

Here's everything you need to know about the salary cap, luxury tax, trade rules, Bird rights and the rest of the structure behind what will be a chaotic period of player movement:

Salary cap

Thanks to a massive influx of revenue from the league's broadcast and digital rights agreements, the cap explodes from $70 million last season to approximately $94 million for the league year beginning July 1. The official figure will be announced in the hours before the free-agent moratorium is lifted on July 6 (more on that later), after the league and the National Basketball Players Association have completed their financial audit. Any way you slice it, it's the largest one-year spike in league history.

As a result, 21 teams have room for a maximum-salary free agent without having to make any roster moves. Several others -- including the Spurs and Warriors -- are in a position to unload a contract or two in trades to get there.

In other words, buckle up. Wild will not begin to describe this ride.

This anomaly threatens to disrupt the player compensation system by driving salaries upward and skewing competitive balance. But the league failed to include a mechanism in the CBA to address unexpected revenue, and couldn't get the NBPA to accept its proposal to smooth the TV revenue into the player compensation pool gradually. Thus, about $1.7 billion of new revenue hits the system at once. As per the 2011 collective bargaining agreement, the players are guaranteed between 50-51 percent of it through salary and benefits.

The cap is calculated with a convoluted formula based on basketball-related income (BRI). Even before factoring in the new TV money, league revenues have risen almost $1 billion in the past three years, resulting in the cap rising from $58.7 million in 2013-14 to $70 million last season. In short, business is booming and a lot of players are about to get paid.

Yet it's important to understand that this isn't a one-year phenomenon. The league's most recent projection is that the cap will balloon again to about $110 million for the 2017-18 season. So if your team strikes out this summer, it can do this all again in 12 months.

Under the CBA, teams are required to spend up to 90 percent of the cap, which means the team salary floor is about $85 million. Any team that fails to spend the minimum faces a surcharge for the difference, with the money distributed to the players on that team.

Luxury tax

The luxury tax, which the NBA strengthened in the 2011 CBA in an effort to make the cap harder, also is calculated based on revenue. Thus, the tax line vaults to $113 million this season and a projected $127 million next season, based on league estimates.

For up to $5 million above the tax threshold, teams are charged $1.50 per dollar. The tax penalties escalate from there in $5 million increments. For teams that have been in the tax for three of the past four seasons, the penalties are even stiffer.

The rising tax level has taken some of the bite out of the penalties. Nonetheless, teams that exceed it by more than $4 million also lose some important player acquisition tools, such as the full mid-level exception (a cap exception that can be used to sign a player). Also, a team cannot acquire a free agent in a sign-and-trade transaction if the deal puts the team more than $4 million above the tax line, or "apron." For that reason, sign-and-trades have become rare under the current CBA, but the extra room this summer could bring them back into style.

Unrestricted free agents

Unrestricted free agents, like Kevin Durant, are able to negotiate with and sign with any team of their choosing (as long as the team has cap room, which, um, almost everybody does). If the player's current team has his Bird rights (more on that later), it can offer up to a five-year deal with annual increases of 7.5 percent of the first-year salary in the contract. Other suitors can only offer a maximum of four years with 4.5 percent annual increases. The exception is when the player is signed-and-traded (more on that later).

Restricted free agents

Restricted free agents -- i.e., first-round picks who have completed the fourth year of their rookie scale contracts, or veteran free agents with three or fewer years of service -- cannot sign outright with another team. The player can sign an offer sheet with a team that has room under the cap for the first-year salary in the contract up to that player's designated max (more on that later).

The player's current team has three days to match the offer sheet. If it does, the player is considered to be under contract with his current team under the principle terms of the offer sheet. If not, the offer sheet from the pursuing team becomes a binding contract. The top restricted free agents on the market this summer are Andre Drummond (Pistons), Bradley Beal (Wizards) and Harrison Barnes (Warriors).

Maximum salaries

The maximum amount a player can earn is limited to a percentage of the salary cap based on years of service, as follows:

  • 0-6 years (such as Hassan Whiteside): The deal can start at $22.2 million (25 percent of the cap).
  • 7-9 years (such as Durant): The deal can start at $26.6 million (30 percent of the cap).
  • 10-plus years (like LeBron James): The deal can start at $31 million. (35 percent of the cap).

It's worth nothing that the above maximum salaries actually come in slightly lower than the above percentages of the actual salary cap, because a different formula is used to calculate maxes -- 42.14 percent of BRI vs. the 47.74 percent that determines the cap itself. But, what's a few million among friends?

Moratorium

As we learned last summer with DeAndre Jordan, all contracts agreed to during the initial phase of free agency are just that -- agreements. Deals are not official or binding until the NBA and NBPA finish their financial audit and establish the official cap and tax levels for the coming season.

In the past, the moratorium has been 10 days. Last July, Jordan -- an unrestricted free agent -- agreed in principle to a deal to leave the Los Angeles Clippers and join the Dallas Mavericks. Prior to the moratorium being lifted, Jordan changed his mind and decided to re-sign with the Clippers. Chaos and emoji wars ensued. In March, the league and union agreed to shorten the moratorium period to five days. So this time around, deals become official on July 6 -- providing less time for free agents to change their minds and putting more pressure on the lawyers and accountants to finish their audit.

Cap exceptions

Teams are allowed to exceed the salary cap to re-sign their own free agents, providing they have the player's "Bird rights." To have a player's Bird rights, the player must have played for the team uninterrupted for three seasons. These contracts can be up to five years in length. "Early Bird" rights are a weaker version of this exception, by which a team can exceed the cap to re-sign one of its own free agents after the player has served two consecutive years with the team. These contracts can be 2-4 years in length.

For example, Durant can't sign a one-year deal with a player option with another team and then get the full max in 2017. To be eligible for the full max with Bird rights, he'd have to play for three years with the same team. That's why LeBron can't get the full max with Cleveland until 2017 and why Durant, for example, can't sign a one-year deal with a player option with the Lakers and then sign a five-year max deal with the Lakers next summer.

Teams that are over the cap also have other exceptions they can use to add players: the mid-level (taxpayer and non-taxpayer); room exception (only for teams that are below the cap that have lost their mid-level and bi-annual exceptions); the bi-annual exception (only available to teams that are still less than $4 million below the tax line after using it, and have not already used their taxpayer mid-level or room exception). With so many teams having cap room, though, many of these exceptions will become moot in most situations.

Base-year compensation

Now we're really getting into the nitty gritty. Base-year compensation is an antiquated concept that was designed in previous CBAs to prevent teams from re-signing their own free agents with Bird rights only to facilitate trading them. In its limited use now, it only applies in sign-and-trade scenarios.

So for example, if Durant were signed-and-traded to the Clippers, he would be subject to base-year compensation. In other words, his salary would count on the Thunder's side of the equation as his prior year's salary ($20 million) -- not his new salary ($26.6 million under current cap projections). The Clippers would have to use Durant's new salary, making it more challenging to satisfy league rules stating that salaries must be within 125 percent of each other for a trade to be allowed.

There is a lot to understand about his year's free agency period. USATSI