Redfin, the real estate site based in Seattle, has finally raised its IPO. Founded in 2004, this was 13 years in the making.

Despite an ugly patent lawsuit from a former co-founder over one of Redfin’s pending patent applications — one filed just this Monday — the company priced above the $12 to $14 range, at $15 per share, a number that values the company at $1.2 billion. It also means the company just raised $138 million.

Redfin has garnered at least $167 million in equity funding over the years, with Greylock Partners its largest shareholder, with a 12.4 percent stake prior to the IPO. Madrona Ventures holds 11.4 percent, Tiger Global has 10.5 percent and DFJ owns 10.2 percent.

Redfin makes money by taking between a 1 percent to 1.5 percent commission off home sales that happen via its site. Redfin compares this to what it estimates is a 5 to 6 percent industry average, because agent payments can add up.

Redfin’s 2016 revenue was $267.2 million, up from $187.3 million in 2015 and $125.4 million in 2014. Losses narrowed to $22.5 million for 2016, down from $30.2 million in 2015.

In the first quarter of 2017, it lost $28.1 million, up from the $24.3 million loss in the same quarter of last year. This was when they began originating and underwriting loans through a new program, Redfin Mortgage.

The company is listing on the Nasdaq under the ticker symbol “RDFN.” Goldman Sachs and Allen & Co. led the offering.