All they have to do is revert everything back as if the glitch never happened. They have a full transaction history in their database, and can filter by associations to these crates, opening, selling, buying them, or buying any unusuals in the crate droplist that were listed during the glitch. Valve holds funds for 45 days after the end of the month that the purchase took place. So they can revert all transactions and refund money. If they wanted to keep the profit spike they made off of this, they can refund to Steam Wallet instead of payment method. Those that want to refund to their payment method can do so manually through Steam Support, by refunding the Steam Wallet transaction.
The only people who would lose money are people who traded items and did a separate monetary transaction outside of Steam, which Valve is not responsible for and disclaims all liability from in their EULA and warnings in their trading interface.
No one can really complain then. This was a glitch, and I don't know what people were expecting. They have done this in the past too.
Any other solution has a downside to some party, unless Valve foots the bill, and lets the people who sold crates/unusuals keep the money, while still refunding the people who bought stuff based on the glitch. And if we go down the ethics route, they totally should (it was their mistake after all), but I don't think they will (they can pretend it never happened).