Paul Grewal, the legal leader who helped Facebook weather its Cambridge Analytica scandal, has joined cryptocurrency platform Coinbase.

Grewal is stepping into the role of chief legal officer for the San Francisco-based fintech company after more than four years as Facebook’s vice president and deputy general counsel. In May 2016, Grewal left his post as a magistrate judge for the U.S. District Court of the Northern District of California to join the social media giant.