The plaintiffs lawyers and 33 state attorneys general accusing Apple Inc. of e-book price-fixing have finally coughed up the details of their proposed settlement with the tech giant, which was first disclosed in vague terms a month ago. The deal is an unusual one, calling for Apple to pay between $450 million and nothing at all, depending on what an appeals court does with a July 2013 liability verdict from U.S. District Judge Denise Cote in Manhattan.

Lead plaintiffs counsel Steve Berman of Hagens Berman Sobol Shapiro informed Cote of an agreement in principle on June 17 but didn’t disclose the specifics. Here’s the full story, according to a motion to approve the settlement filed with the judge on Wednesday: If the U.S. Court of Appeals for the Second Circuit affirms Cote’s ruling that Apple conspired with publishers to fix e-book prices, Apple will pay $400 million to consumers, plus $50 million in attorney fees and payments to the state AGs. If the appeals court instead vacates Cote’s verdict and orders a retrial on liability, Apple will pay $50 million to consumers and $20 million in attorney fees and payments to the state AGs. If the Second Circuit outright tosses the case, Apple gets off scot-free.