Here's a description of how this works:
Let’s look at a concrete example to get a better sense of what’s going on. A taxpayer has a property which has appreciated. It currently has a market value of $1 million, with a cost basis [how much was paid for it] of $100,000. This taxpayer wishes to conduct an outright sale. If that happens, though, the taxpayer would incur a significant liability because of the sizable gain [capital gains tax on the difference between the cost basis and the sale price]. The taxpayer, therefore, finds a related party who has a much higher basis of, say, $950,000 on a property with a current market value of $1.1 million. The parties then conduct a direct swap exchange.
Based on the foregoing example, the related party receives a property with a market value of $1 million. Meanwhile, the cost basis of $950,000 stays the same. The related party then ultimately sells the relinquished property and incurs a much, much, smaller liability [capital gains tax] from the sale. The two parties then distribute the profits between themselves. Eventually, the related party reacquires the replacement property with a deed back.
This type of transaction may not run afoul of the requirements of Section 1031 on paper. Clearly, though, it offends the underlying purposes of Code Section 1031. The sole purpose of the related party is to realize greater profits. The courts have now collapsed these types of transactions. “Basis shifting” is now a well-established violation of the related party rules.
Of particular note, this is already a violation. What the IRS wants to do is actually enforce the rules that this behavior violates.