Sign-and-trade deal
In the National Basketball Association (NBA), a sign-and-trade deal  is a type of transaction allowed by the collective bargaining agreement (CBA) where one franchise/team signs an unrestricted free agent or restricted free agent player to a new contract, only to then immediately trade him to another team of the player's choosing. This is typically done to enable the player to obtain a higher salary and/or greater number of years on their contract than NBA salary cap rules would ordinarily allow a destination team that signs him directly to a contract.

Benefits and function
The sign-and-trade helps NBA teams capitalize on financial assets that they would otherwise lose—with nothing gained in return—if a player became a free agent. It is a factor in the departing player's increased salary and extended contract. It helps the team gaining the player, by enabling it to offer a better/more economically competitive contract to the player, than otherwise would be allowed under league rules. Often, circumstances arise wherein a team—knowing that one of its players is planning on pursuing (unrestricted) free agency in the coming off-season—knows that another NBA team is sure to sign him. The unrestricted free agency status prevents the team from stopping or financially benefiting from a new deal the player may sign with any other team(s); so, the player could sign with another team, leaving the original team with neither money nor a replacement (i.e., a player traded from the acquiring team, to them) player, in exchange. However, because the original team starts out as the player's current contract holder, the team can offer the player more money per year than any other team, and, can sign the player to a longer-lasting contract—per the league's CBA.  Therefore, it is in the player's economic best interests to get the richest/longest deal possible by re-signing with the current team, then be traded to the new team—which, under NBA rules, will be obligated to honor the newly signed contract's terms—rather than pursue outright free agency, alone.  The player's original team will receive players, cash, and/or (future) draft picks in return for the departing player, depending on the terms of the trade.

As of the 2017 CBA, sign and trade contracts of five years are forbidden, since the player would not be allowed to sign outright for five years with his new team. Nevertheless, the sign and trade allows players to sign with a new team who is already over the cap for more than the mid level exception amount of approximately $10 million, and in some cases can give the player's old team a trade exception subject to base year compensation rules.

Restrictions
Under terms of the current CBA, sign-and-trades come with many significant restrictions. Transactions under this rule require all of the following to be true:
 The player must re-sign with his former team.
 Additionally, the player must have been on the team's roster at the end of the immediately previous season. This provision, introduced with the 2011 CBA and maintained in the 2017 CBA, closed a loophole that allowed a team to sign-and-trade any player to whom it held "Bird rights", regardless of whether the player was active in the league. An example of such a transaction banned under the current CBA is the Dallas Mavericks' inclusion of Keith Van Horn in the trade for Jason Kidd in order to match salary.
 While restricted free agents can be signed and traded, this is not allowed if that player has signed an offer sheet with another team.
 The team receiving the player cannot have a payroll that exceeds the so-called "apron"—a designated level above the NBA luxury tax threshold—after the trade. A team with a payroll above the apron can only receive a player in a sign-and-trade if the transaction drops that team's payroll below the apron. Once the transaction is complete, the team receiving the player is hard capped at the apron for the entire season.
 The receiving team cannot have used the so-called "taxpayer mid-level exception" in that season. The taxpayer mid-level exception is a limited financial buffer that teams with total payroll above the luxury tax threshold must use to sign players for up to 3 years.
 The regular season has not yet started.
 The player must receive a contract of either 3 or 4 years (not including any option years), where only the first year must be fully guaranteed. (5-year sign-and-trade contracts were abolished in the 2017 CBA to disincentivize the transaction.) In turn, this means that he cannot be signed using a salary cap exception that does not allow the team to offer a 3-year contract.

Rescission
Sign-and-trades are considered to be "atomic transactions". Under NBA rules, if the acquiring team voids the trade, then the new contract signed with the initial team is voided as well. This prevents the initial team from being 'stuck' with a player they either do not want and/or cannot afford to keep under the terms of the signed contract. The player is also protected from being contractually obligated to a new team that they may no longer want to work for. Such an event happened in 2005, when small forward Shareef Abdur-Rahim was acquired by the New Jersey Nets in a sign-and-trade with the Portland Trail Blazers. The trade was subsequently canceled by the Nets, when a physical exam detected scar tissue (which increases the odds of future injury) in Abdur-Rahim's knee.  As a result of the cancellation, Abdur-Rahim once again became a free agent; his new contract with the Trail Blazers (who had his "Bird rights") was voided, and he later signed with the Sacramento Kings.

Footnotes

References 

National Basketball Association labor relations