A half-decade on from the collapse of the housing bubble, it looks like the Justice Dept. and Citigroup may have finally reached a deal that will have the bank forking over several billion dollars to close the book on allegations that it sold off a large number of worthless mortgages in the lead-up to the 2008 crash.

According to the Wall Street Journal, the price tag on the settlement is currently sitting around $7 billion, which is a compromise between the $10 billion the government wanted Citi to pay and the $4 billion figure the bank had been scribbling on its napkin and sliding across the table.

It’s a huge turnaround from only a few weeks ago, when it looked like a deal would not be reached and the dispute would end up being resolved in court.

Citi believes that its bad behavior was nowhere near that of fellow big bank Chase, who reached a massive $13 billion settlement with the DOJ in 2013 over similar allegations. But the DOJ argued that while Citi might have only sold about one-fifth the number of worthless mortgage-backed securities as Chase, the ones sold by Citi performed worse.

Like other settlements in recent years, some of the $7 billion in the Citi deal would be in the form of relief to borrowers, most likely through mortgage reductions and modifications.