The Optimism airdrop has been a comedy of errors, but it now has a somewhat happy ending.

The hacker who stole 20 million Optimism (OP) tokens last week has returned 17 million of them. The tokens were meant to be used as governance for the company's new DAO, the Optimism Collective DAO. A DAO, or decentralized autonomous organization, grants voting privileges to people who hold its governance token.

Etherscan data shows the OP was sent back in 17 separate 1-million token transactions starting around 8 a.m. ET on Friday. The hacker exchanged 1 million OP for ETH, sent another 1 milion to Ethereum co-founder Vitalik Buterin and still has 1 million OP in their wallet.

In a Twitter thread, the Optimism Foundation called the 2 million OP that hasn't been returned "a bounty," and that it was in the process of recovering the 1 million OP that had been sent to Buterin.

Optimism is what is known as an Ethereum layer-2 scaling solution. This means that its transactions bypass the often crowded Ethereum mainnet. But in order to work properly, layer-2 Optimism wallet addresses need to be synced with layer-1 Ethereum addresses.

After announcing that it would be launching its native Optimism (OP) token on June 1, the company sent 20 million OP to the wrong blockchain address. The error resulted in the 20 million OP tokens being stolen.

Optimism hired crypto market maker Wintermute to distribute the tokens in a highly anticipated airdrop. But because Optimism sent them to a Wintermute layer-1 address that hadn't yet been synced to layer-2, they were all inaccessible.

Wintermute said that the tokens would be secure. But within a day, a hacker stole all 20 million tokens. They were worth $35 million at the time.

"There is hope that it is a whitehat exploit, in which case the remaining funds are potentially recoverable," Wintermute wrote in a blog post, pointing out that only a portion of the tokens were liquidated after they were stolen. "However, we are currently operating under the premise that it is not the case, since we haven't received any communication from them and our message on the chain was left unanswered."

On Friday, when the tokens were returned to Optimism, OP was trading at $0.92 and the returned tokens were worth about $15.6 million.

Daily Debrief Newsletter

Start every day with the top news stories right now, plus original features, a podcast, videos and more.