It's been years since I worked in the domain name space, but as I recall vaguely, part of the registrar accreditation agreement is that you have provisions to transition your customer domain names to another registrar in the event you stop being a registrar, voluntarily or involuntarily.
The way this has worked in the past (again iirc) with other companies is that the registrar wholesale migrated their names to another provider who purchased them at a discount.
I've never been through the process personally, but given the quantity of registrars that are going into and out of business from time to time, I'm sure it's a process that's been pretty well standardized.