It is the stuff of folklore in tax and traders' circles, a deal that was such a success that it became an embarrassment.
During the financial crisis in 2008, a couple of Macquarie bankers devised a tax-driven trade that fared so well that it virtually wiped out the profit of the bank's Australian business, and a large chunk of franking credits with it.
But in Hong Kong the deal was a monumental winner, delivering a profit in the order of $850 million, according to former executives au fait with the transaction.
Now there is speculation that the repercussions from this infamous "tax arb" may even be contributing to the sharp rise in Macquarie's tax expenses.
In its most recent profit results, the bank's tax rate jumped to 38.5 per cent, well above its historical rate and well above the 30 per cent corporate benchmark. More on that later.
Given the sensitivity of the deal - its tax-driven aspects - it was shopped around inside the bank.
Originally turned down by the debt markets team as too risky, the equity derivatives division eventually took it on.
The idea was to set up a "cross-currency swap" denominated in sterling and yen.
One side of the trade was booked in Australia.
The other side was booked in Hong Kong, which has a low corporate tax rate. So two currencies were involved and two jurisdictions.
Whatever the macro-economic rationale for the trade, it was a spectacular success.
Its architects were betting on the sterling rising against the yen and being able to book the profit in Hong Kong, where they would attract little tax, and the losses in the higher-taxing jurisdiction, Australia.
On cue, global markets descended into turmoil in 2008 and the yen fell sharply against the British pound.
The two sides of the trade were equal and opposite, which means that, on a pre-tax basis, the trade was hedged.
So, if markets went up or down, money was made or lost in equal proportion.
It was at the after-tax level that the rollicking profit was to be had. If money was lost in Australia, money would be made in Hong Kong, and very little tax would be paid.
The effect of the deal was not only to boost the bank's bottom line but also to move profit from Australia to Hong Kong. And that's where the bank may have come unstuck under part 4A of the tax code, which deems that you have to have a proper basis to conduct a transaction other than to shift profit to more attractive tax climates.
Anyway, Macquarie made a profit in the realm of $850 million, such a profit that it stuck out like a sore thumb.
As it had put such a hole in the bank's taxable income in Australia, it not only reduced the tax rate to almost zero but it also ate up all the franking credits.
Macquarie was by no means alone in striking these "tax arbs". They were practised by the big banks too. The difference was that this was enormous, as was its effect on the bank's P&L.
In its financial report in 2008, a tax rate of just 1.7 per cent was recorded. But the question now is, has Macquarie's arbitrage come back to bite it?
It is no secret that the Tax Office has stepped up its enforcement activities for Australia's big companies.
Neither is it a secret that Macquarie and other investment banks are under scrutiny for their use of offshore banking units (OBUs). What we don't know are details of specific transactions and penalties.
In its most recent investor update on September 23, Macquarie explained the dramatic rise in its tax rate thus: "Effective tax rate of 38.5 per cent due to increased profitability in the US, write-down of tax assets and increased provisions for tax uncertainties".
Its annual report mentioned "write-down of tax assets particularly in Asia".
Whatever "tax assets" means, we are talking an effective tax rate of 42 per cent in the second half. And the outlook is for more of the same: "tax rate is currently expected to be broadly in line with FY13."
For a company that earns 63 per cent of its income in Australia, tax of $533 million on a pre-tax profit of $1.4 billion is a big deal indeed.
Cutting-edge trades have always been the hallmark of Macquarie, but the bank's recipe for success can at times be its Achilles heel too.