The number of initial public offerings has been dwindling recently. Mergers and acquisitions, the other exit, are down substantially as well. But that doesn't mean an exit is impossible.

Just ask the folks over at Sweep. The personal finance app maker announced Wednesday that the financial services company Affirm, launched by PayPal luminary Max Levchin in 2014, had acquired it for an undisclosed amount.

It's an impressive development for a company that was founded in 2014 and didn't officially launch its product--a comprehensive timeline view of a consumer's finances, including pay periods and important monthly payments--until late 2015.

"We are better off being a small part of Affirm's big vision," says Jackson Gates, who co-founded Sweep with Asi Behar. "We are very happy."

So how did Sweep go from startup to acquisition target in such a short amount of time? Here are two takeaways:

1. Stay lean and find the right money 

"Be judicious with capital and align with a good venture capital firm that believes in you and what you're doing," says Gates, a former Pandora executive who also worked at the Paul Allen-led VC firm Vulcan. Sweep took in $1 million in financing from Vulcan, the Valley Fund, and Clocktower Technology Ventures, among others. Over the past year the company has purposely kept its team small--it has just five employees, including the two founders. That means staying small, and working with investors with tested networks, could help connect you to a buyer.

2. Make sure your mission aligns with the buyer 

Affirm's product, which is aimed at millennials but open to everyone, allows customers to make purchases by obtaining credit quickly at the checkout register in stores. By acquiring Sweep, both companies' issues can be addressed. "Affirm needs a personal finance tool, and Sweep needs financing," says Brad Selby, Affirm's vice president of growth and new markets. Gates adds that Sweep can help Affirm's customers get as much information as possible about financing their purchases, and the impact of that financing on the rest of their financial lives.