@Account Closed
There is not a simple answer to this question, as the "best" way will depend on the investors situation. There are several self directed retirement plan formats they can choose from. So, the caveat to the following is that the investor should speak with an industry and/or tax professional.
An IRA or 401k can invest in real property, either to hold or to flip. The IRA account holder can direct the investments for a flip transaction, but cannot be personally involved as the contractor or personally receive any benefit from the transaction. The are essentially making the decisions, executing the contracts and handling the expense/income transactions exclusively for the benefit of their retirement plan.
When a tax exempt entity such as a retirement plan engages in a trade or business, and is therefore competing with taxpaying businesses, there is a trust tax known as UBTI that applies. The maximum rate can be as high as 39.6% on the gains from a transaction. A clear understanding of the impacts of this taxation is critical. The bottom line, however, is that even though there is the cost of this taxation when an IRA engages in flipping, the net, after-tax returns can still be superior to other investments an IRA might make.
An alternative is for the IRA investor to be the bank instead of the flipper. By providing capital to another party (who must be unrelated to the IRA account holder), and simply receiving interest on the loaned money, this becomes a passive investment transaction not subject to UBTI.
For some investors, it can make sense for the IRA or 401k to form a "blocker corporation". In this case, the retirement plan holds the ownership of a C Corporation that then engages in the flipping activities. The Corporation will pay tax on the gains from flipping, usually at a lower rate in the 25% range. The corporation can then issue dividends to the retirement plan and that income is tax-sheltered to the plan. This is a more sophisticated approach that will only benefit serious investors with the willingness to adhere to several layers of compliance, and comes with the additional administrative costs of the corporation, but it can result in significant tax savings.