You may know Keith Rabois as one of the first employees of PayPal, a good friend of venture capitalist and tech god Peter Thiel, and a member of the "PayPal Mafia," a group of former PayPal higher-ups who went on to fundamentally shape the way Silicon Valley does business. Rabois is now the COO of the multibillion-dollar startup Square, or, at least he was until yesterday, when he resigned before publishing a grand open letter partially confessing to misdeeds related to an imprudent sex scandal.

In his letter, posted to his personal Tumblr account, Rabois doesn't provide many details about what exactly he's being accused of, but it seems the gist is that a lover of his who worked outside of his purview at Square is now accusing him of sexual harassment—and looking for a hefty out-of-court settlement. Rabois admits that he did have an interoffice relationship with a male employee at Square, which he calls "poor judgment," but he also claims that the affair was completely mutual.

Here is the letter in full:

Yesterday I resigned from Square, and I want to take the opportunity to explain to you why.

The past few days have been the toughest, saddest, most frightening, and emotionally draining of my life. They have deeply affected me, both personally and professionally.

In May 2010, I met someone via mutual friends. With increasing frequency, we hung out, drank wine, and I helped prepare him for interviews with tech startups. As our friendship deepened, we spent more time together, and our relationship became physical. We regularly worked out at the gym, occasionally hung out at my home, and exchanged intimate, personal information, as people in similar relationships often do.

Several months after our relationship began, I recommended that he interview at Square. He went through the interview process and was ultimately hired. I had no impact on his potential success at the company. At no point did he ever report directly to me, and I have seen his work product less than a handful of times.

Last week, a New York-based attorney threatened Square and myself with a lawsuit. I am told this lawsuit would allege that the relationship was not consensual, and would go on to accuse me of some pretty horrible things. I was told that only a payment of millions of dollars will make this go away, and that my career, my reputation, and my livelihood will be threatened if Square and I don't pay up.

I realize that continuing any physical relationship after he began working at Square was poor judgment on my part. But let me be unequivocal with the facts: (1) The relationship was welcome. (2) Square did not know of the relationship before a lawsuit was threatened; it came as a complete surprise to the company. (3) He never received nor was denied any reward or benefits based on our relationship. And (4), I did not do the horrendous things I am told I may be accused of. While I have certainly made mistakes, this threat feels like a shakedown, and I will defend myself to the full extent of the law.

I decided to resign from Square so my colleagues could continue to do great work without the distraction that a lawsuit would most certainly bring. I deeply regret that I let my personal and professional lives to become intertwined, and I apologize to my colleagues and friends (at Square and elsewhere) who I've let down, and who will bear the brunt of some of the unnecessary, negative attention this situation will likely bring.

I am already working on something new and hope to announce that in February.

If this is purely a money grab, as Rabois' counter-charges say, chances are he could have afforded to pay: Besides his PayPal money, Square, a mobile payments company, was valued at $3.25 billion late last year.

People in the know about Rabois' history might find it funny that he's now entangled in a gay affair. In 1992, while a student at Stanford law school, where he initially met Thiel, Rabois stood in front of an instructor's home and shouted, "Faggot! Hope you die of AIDS!" and "Can't wait until you die, faggot!" Rabois and others would later characterize his slurs as an exercise in free speech, but, nevertheless, Rabois was run out of Stanford and forced to finish his JD at Harvard.