The bank UBS has agreed to a $230 million settlement in connection with its handling of residential mortgage-backed securities leading up to the financial crisis, the office of Attorney General Eric Schneiderman announced Wednesday.

According to the AG’s Office, $189 million of the settlement has been flagged for consumer relief for homeowners and communities, including affordable housing construction, with the remaining $41 million going into state coffers. With UBS’ settlement, Schneiderman said his office has now recovered more than $3.93 billion in cash and consumer relief from RMBS settlements, more than any other state.