The codification of the economic substance doctrine in the United States has given rise to controversy there and in countries with investments in the United States. This article analyses the origin of this doctrine and the consequences of its codification. It also considers EU anti-tax avoidance legislation and court cases.