We'd be met at airports in 20-foot limousines, and taken to places like the Atlantis hotel in Dubai or the Singapore Grand Prix. There'd be a hundred grand spent in the bar.

In 2013, Jas Bains was an ambitious young lawyer, enjoying the high life that came with working for an extremely profitable City hedge fund.

Today, he is jobless and has lost most of his wealth, having spent years fighting legal battles and attempting to clear his name of association with a huge tax scam.

The irony, he says, is that he blew the whistle on the scam in the first place – only to find himself one of the targets of a £1.4bn lawsuit.

He is reflecting one month after the case ended, bringing to a close eight years of legal arguments and one of the highest value civil cases ever heard in the UK.

The Danish tax authority was left licking its wounds, after failing to establish that a large group of defendants, including Mr Bains, were liable for huge losses it had suffered.

It all began in 2009, when a banker named Sanjay Shah established a London-based hedge fund called Solo Capital. It also had offices in Dubai. It was one of a network of funds, banks and legal outfits that were to become heavily implicated in the so-called cum-ex trade.

This focused on transactions where shares were sold from one investor to another immediately before the payment of a dividend (cum), but delivered afterwards (ex-dividend).

Those involved exploited delays in processing the sale to create confusion over who actually owned the shares at the moment when the dividend was paid. This tactic allowed both parties to claim rebates on withholding tax - a levy which had only been paid once, when the dividend was issued.

From the outside, it was complicated, but for those involved it led to ever bigger and more elaborate trades which ultimately cost taxpayers across Europe billions.

It initially became popular in Germany before spreading to other countries including France, Belgium, Italy, and Austria. Solo Capital targeted Denmark, with the bulk of its cum-ex trades taking place from 2013 onwards.

Jas Bains joined the company in 2010 as its head lawyer but went on to run the London office. At the time, Solo was a successful firm, making money in five or six different areas pretty well.

And making money meant enjoying the high life, with staff going on sprees to places like Las Vegas, Singapore, and Dubai.

By mid-2014, however, Mr. Bains had fallen out with his boss and left the company for a competitor. Alarm bells were ringing when he heard about the scale of the trades being conducted to defraud Denmark.

With that in mind, in 2015, he decided to blow the whistle. He contacted a Danish lawyer, who put him in touch with the Danish police. He assisted them for two and a half years with understanding how the cum-ex scam worked.

Danish prosecutors did not target Mr. Bains; their focus was on Mr. Shah, who was extradited from Dubai to face fraud charges and was sentenced to 12 years in jail.

However, when the Danish tax authority launched its lawsuit seeking to recover lost money, Mr. Bains found himself among a large group of defendants.

Despite a court ruling favoring him, the impact of the lawsuit meant it was nearly impossible for him to find work in law again. Yet, with the recent case dismissal, he hopes for a chance to move on from years of distress.