Patent portfolios are trading hands faster than ever as Facebook has agreed to purchase a large number of patents from Microsoft. The social network is handing over $550 million in cash for a selection of patents that Microsoft obtained from AOL just two weeks ago in a deal valued at $1 billion.

It seems that everyone has come out smelling like a rose as a result of the recent patent shuffle. The original deal saw AOL shares jump 37 percent while still retaining perpetual licensing to the intellectual property sold.

For Microsoft, they were able to redeem more than half of what they paid AOL for the patents. Microsoft executive vice president and general counsel Brad Smith told All Things D that Redmond never felt it was necessary or important to own all of the patents.

As the latest recipient in the patent exchange, Facebook is able to further pad their portfolio ahead of a planned public offering scheduled to take place next month. It further strengthens a relationship between Facebook and Microsoft that started when the latter purchased 1.6 percent of Facebook for $240 million in 2007.

There’s little doubt that the social network will be the target of many more intellectual-based lawsuits so adding more protection is a good idea. Yahoo filed suit against Facebook last month claiming violation of 10 patents. Zuckerberg and company returned fire with a counter-suit claiming Yahoo infringed on 10 of their own patents. Yahoo dismissed the counter-suit as an attempt to distract “from the weakness of its defense.”