The ECJ decision in X BV (C-585/22) clarified the relationship between the arm's length principle and domestic anti-avoidance provisions in the context of intercompany lending. The ECJ established that the two can coexist: the arm’s length principle focuses on preventing base erosion from intercompany transactions with non-market prices but with economic substance, while anti-avoidance rules apply to “wholly artificial arrangements” lacking commercial rationale. This article analyses the justification for this distinction.